Bulletin of Electrical Engineering and Informatics
Vol. 4, No. 2, June 2015, pp. 130~135
ISSN: 2089-3191 130
A Comparison between Fuzzy-PSO Controller and PID-
PSO Controller for Controlling a DC Motor
Ali Ghareaghaji
Electrical and Computer Department, Shahid Beheshti University, Tehran, Iran
Email: [email protected]
Abstract
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.
Keywords: DC Motor, Fuzzy logic controller, PID controller, Particle swarm optimization
1. 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
2. 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:
Va = Kv wr + Raia + raτa pia (1)
Received October 11, 2014; Revised December 20, 2014; Accepted January 15, 2015
131 ISSN: 2089-3191
Te=Kv Ia (2)
Va = Vf (3)
/
Kv= (4)
/
Ia= (5)
1
W r= (6)
JP+
τa= (7)
τf = (8)
Va: The input terminal voltage, (v);
Ia: The armature Current (A);
Ra: The armature resistance, (Ω);
La: The armature inductance, (H);
Rf: The field resistance, (Ω);
Lf: The field inductance, (H);
Laf: Field-armature mutual inductance, (H);
J: Total inertia, (kg.m^2);
Bm: Viscous friction coefficient, (N.m.s)
ω: The speed of the shaft, (rad/s);
Figure 1
Table 1
DC Motor 5hp 16.2A 1220 rpm 240V
Ra 0.6 Ω
La 0.012 H
Rf 240 Ω
Lf 120 H
Laf 1.8 H
J 1 Kg.m^2
Bm 0
Bulletin of EEI Vol. 4, No. 2, June 2015 : 130 – 135
Bulletin of EEI ISSN: 2089-3191 132
3. 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).
=
, , +C1Rand( ) (Pbesti,m - , )+C2 Ran ( )(gbestm - , ) (9)
, = , , i=1,2,….,n ; m=1,2,…..,d (10)
Where
n - Number of particles in the group,
d - dimension,
t - pointer of iterations(generations),
, - velocity of particle i at iteration t, ,
w - Inertia weight factor,
c1, c2 - Acceleration constant,
rand() - Random number between 0 and 1,
, - Current position of particle i at iterations,
Pbesti - Best previous position of the i-th particle,
Gbest - Best particle among all the particles in the population.
Figure 2
4. 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
A Comparison between Fuzzy-PSO Controller and PID-PSO Controller for … (Ali Ghareaghaji)
133 ISSN: 2089-3191
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 3
The most important things in fuzzy logic control system designs are the process design
of membership functions for inputs, outputs and the process design of fuzzy if-then rule
knowledge base. They are very important in fuzzy logic control. For the DC drive, set the error
(et) and the error variation d(et) of the angular velocity to be the input variables of the fuzzy logic
controller. The control voltage u(t) is the output variable of the fuzzy logic controller. The
linguistic variables are defined as {NB, NS, Z, PS, PB} meaning Negative Big, Negative Small,
Zero, Positive Small and Positive Big respectively. The membership functions of the fuzzy logic
controller are shown in Figure 4. The fuzzy rules are summarized in Table 1. The type of fuzzy
inference engine is Mamdani.
Table 2
Bulletin of EEI Vol. 4, No. 2, June 2015 : 130 – 135
Bulletin of EEI ISSN: 2089-3191 134
e(t) de(t) u(t)
Figure 3
5. PID Controller
The most commonly used structures of PID are the parallel ideal PID structure, non-
interacting ideal PID structure and the interacting PID structure [1005-1006]. A parallel PID
controller structure is shown in Figure 4, where Kp is the proportional gain, Ki is integral gain
and Kd 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:
K(s) = Kp+ +kd s (11)
Figure 4
proportional controller Kp will have the effect on reducing the rise time and will reduce
the steady-state (SS) error; integral controller Ki will have the effect on eliminating the SS error,
but it may make the transient response worse; and derivative controller Kd will have the effect
on increasing the stability of the system, reducing the overshoot, and improving the transient
response.
6. Case Study
6.1. Optimal Fuzzy Controller Design
Figure 5 shows the block diagram of a fuzzy-PSO controller for controlling a DC motor.
Figure 5
A Comparison between Fuzzy-PSO Controller and PID-PSO Controller for … (Ali Ghareaghaji)
135 ISSN: 2089-3191
In order to design the optimal fuzzy controller, the PSO algorithms are applied to search
globally optimal parameters of the fuzzy logic.
6.2. Optimal PID Controller Design
7. 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.
References
[1] H Hénao, GA Capolino. Méthodologie et application du diagnostic pour les systèmes électriques.
Article invité dans Revue de l'Electricité et de l'Electronique (REE), (in French). 2002; 6: 79-86.
[2] S Raghavan. Digital Control for Speed and Position of a DC Motor. MS Thesis, Texas A&M University,
Kingsville. 2005.
[3] K Ang, G Chong, and Y Li. “PID control system analysis, design, and technology”. IEEE Trans.
Control System Technology. 2005; 13: 559- 576.
[4] A Halila. Étude des machines à courant continu. MS Thesis, University of LAVAL, (in French). 2001.
[5] GA Capolino, G Cirrincione, M Cirrincione, H Henao, R Grisel. Digital Signal Processing for Electrical
Machines, Invited paper. Proceedings of ACEMP'01 (Aegan International Conference on Electrical
Machines and Power Electronics), Kusadasi, Turkey. 2001: 211-219.
[6] Zhixiong Liu. “Investigation of Particle Swarm Optimization for Job Shop Scheduling Problem”. in
Proc. IEEE 3rd Int. Conf. on Natural Computation, Haikou, China. 2007: 799-803.
Bulletin of EEI Vol. 4, No. 2, June 2015 : 130 – 135