A Comparison Between Fuzzy-PSO Controller and PID-PSO Controller for Controlling a DC Motor

The Direct current motors are in different types and there are several methods for controlling of their speed. In this paper two ways for speed controlling suggested. First a fuzzy logic speed controller for DC motor is designed and it's parameter calculated by Particle Sward Optimization (PSO). The speed controller designed according to fuzzy rules, then for having better performance, the controller optimized with PSO. Secondly a PID controller that it's parameter find by PSO, is used for speed controlling of a DC motor. At the end the performance of fuzzy logic controller compared with PID controller. The results show that fuzzy-PSO controller has better performance.


Introduction
Today, the use of direct current motor is widespread and they have found in wide applications, because of its easy control and high performance. The speed of DC motor can be adjusted to great extent [1,2]. The controllers of the speed that are conceived for goal to control the speed of DC motor to execute one variety of tasks, is of several conventional and numeric controller types, the controllers can be: PID controller, fuzzy logic controller and the combination form of fuzzy with PSO.
Fuzzy theory was first proposed by Lotfi Zadeh. It expressed by means of if-then rules. The rules and membership function of fuzzy logic controller are based on expert experiences. The PSO algorithm is used to get optimal parameters of fuzzy logic controller. Fuzzy-PSO Combines the concepts of fuzzy logic and PSO to form a hybrid intelligent system that enhances the ability to automatically learn. By this way we can have better speed control on DC motor. Although the PSO find the optimum parameter but we need expert experiences to find the best range of membership functions.
A proportional-integral-derivative controller (PID controller) widely used in industrial plants. Because it is simple and robust that is commonly used feedback controller. PID control with its three term functionality covering treatment to both transient and steady-states response, offers the simplest and yet most efficient solution for many real world control problems [3]. In this paper, a scheduling PID tuning parameters using particle swarm optimization (PSO) strategy for a DC motor speed control is proposed

Model of DC motor
DC machines are characterized by their versatility. By means of various combinations of shunt, series, and separately-excited field windings they can be designed to display a wide variety of volt-ampere or speed-torque characteristics for both dynamic and steady state operation. Because of the ease with which they can be controlled systems of DC machines have been frequently used in many applications requiring a wide range of motor speeds and a precise output motor control [4,5]. The DC motor is driven by applied voltage. Figure 1 shows the equivalent block diagram of a shunt DC motor.
The dynamic of a DC motor may be expressed as:

Particle Swarm Optimization (PSO)
Particle swarm optimization, first developed by Kennedy and Eberhart (J. Kennedy and R. Eberhart, 1995) is one of the modern heuristic algorithms. It was inspired by the social behavior of bird and fish schooling and has been found to be robust in solving continuous nonlinear optimization problems.
In PSO, each single solution is a "bird" in the search space; this is referred to as a "particle". The swarm is modeled as particles in a multidimensional space, which have positions and velocities. These particles have two essential capabilities: their memory of their own best position and knowledge of the global best. Members of a swarm communicate good positions to each other and adjust their own position and velocity based on good positions according to (1002).

Fuzzy Logic Controller
Fuzzy logic control is a control algorithm based on a linguistic control strategy, which is derived from expert knowledge into an automatic control strategy. Fuzzy logic control doesn't need any difficult mathematical calculation like the others control system. While the others control system use difficult mathematical calculation to provide a model of the controlled plant, it only uses simple mathematical calculation to simulate the expert knowledge. Although it doesn't need any difficult mathematical calculation, but it can give good performance in a control system. Thus, it can be one of the best available answers today for a broad class of challenging controls problems [1001]. A fuzzy logic control usually consists of the following: i) Fuzzification: actual inputs are fuzzified and fuzzy inputs are obtained. ii) Fuzzy processing: processing fuzzy inputs according to the rules set and producing fuzzy outputs. iii) Defuzzification: producing a crisp real value for a fuzzy output  Figure 4. The fuzzy rules are summarized in Table 1. The type of fuzzy inference engine is Mamdani.

PID Controller
The most commonly used structures of PID are the parallel ideal PID structure, noninteracting ideal PID structure and the interacting PID structure [1005][1006]. A parallel PID controller structure is shown in Figure 4, where K p is the proportional gain, K i is integral gain and K d is derivative gain; G(s) is the process transfer function; and U(s), E(s), R(s) and Y(s) are process input signal, error signal, input signal and output signal, respectively. It can be seen that, from the transfer function of Controller: proportional controller K p will have the effect on reducing the rise time and will reduce the steady-state (SS) error; integral controller K i will have the effect on eliminating the SS error, but it may make the transient response worse; and derivative controller K d will have the effect on increasing the stability of the system, reducing the overshoot, and improving the transient response. Figure 5 shows the block diagram of a fuzzy-PSO controller for controlling a DC motor.  In order to design the optimal fuzzy controller, the PSO algorithms are applied to search globally optimal parameters of the fuzzy logic.

Results and Discussions
The advantages of using fuzzy logic include the following [9009]: i) Fuzzy controllers are more robust than PID controllers because they can cover a much wider range of operating conditions than PID can, and can operate with noise and disturbances of different natures. ii) Developing a fuzzy controller is cheaper than developing a model-based or other controller to do the same thing. iii) Fuzzy controllers are customizable, since it is easier to understand and modify their rules, which not only use a human operator's strategy but also are expressed in natural linguistic terms. iv) It is easy to learn how fuzzy controllers operate, and how to design and apply them to a concrete application.