Speed Control of DC Motor Using PID and FOPID Controllers Based On Differential Evolution and PSO
Speed Control of DC Motor Using PID and FOPID Controllers Based On Differential Evolution and PSO
Abdelhakim Idir1* Madjid Kidouche1 Yassine Bensafia2 Khatir Khettab3 Sid Ahmed Tadjer4
1
Applied Automation Laboratory, F.H.C., University of Boumerdes,
1 Av. de l'Independance, 35000 Boumerdes, Algeria
2
Department of Electrical Engineering, Bouira University, 10000, Algeria
3
Department of Electrical Engineering, University Mohamed Boudiaf of M'sila, 28000, Algeria
4
Electrification of Industrial Enterprises Laboratory, F.H.C.,University of Boumerdes,
1 Av. de l’Independance, 35000 Boumerdes, Algeria
* Corresponding author’s Email: [email protected]
Abstract: DC motors are widely used in industrial application for its different advantage such us high efficiency,
low costs and flexibilities. For controlling the speed of DC motor, conventional controller PI and PID were the most
widely used controllers. But due to empirically selected parameters 𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑 and limitation of convention PID
controller to achieve ideal control effect for higher order systems, a Fractional order Proportional-Integral-
Derivative PID (FOPID) based on optimization techniques was proposed in this paper. The aim of this paper is to
study the tuning of a FOPID controller using intelligent soft computing techniques such as Differential Evolution
(DE) and Particle Swarm Optimization (PSO) for designing fractional order PID controller. The parameters of
FOPID controller are determined by minimizing the Integral Time Absolute Error (ITAE) between the output of
reference model and the plant. The performance of DE and PSO were compared with several simulation experiments.
The simulation results show that the DE-based FOPID controller tuning approach provides improved performance
for the setpoint tracking, error minimization, and measurement noise attenuation.
Keywords: DC motor, Fractional PID, Tuning parameters, Differential evolution, Particle swarm optimization, Cost
function.
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24
Received: March 31, 2018 242
Step Response
The DC motors are generally used in the linear 2
range of the magnetization curve. Therefore, air gap Coventional PID
flux 𝜑 is proportional of field current:
1.5
𝜑 = 𝐾𝑓 𝑖𝑓 (1)
yout
1
Where 𝐾𝑓 is constant.
The torque 𝑇𝑚 developed by the motor is
proportional to the armature current and air gap flux: 0.5
𝑇𝑚 = 𝐾𝑚 𝑖𝑎 (2) 0
0 5 10 15 20
Times (s)
Where 𝐾𝑚 is the motor torque constant. Figure.2 Closed loop Time(s) with PID controller: 𝐾𝑝 =
response(seconds)
The motor back EMF being proportional to 10, 𝐾𝑖 = 100, 𝐾𝑑 = 0.25
speed is given as:
(6). The resulting simplified mathematical model
𝑑𝜃
𝑒𝑏 = 𝐾𝑏 𝑑𝑡 (3) form is:
𝑑𝜇 𝜆 1 𝑡
𝜇>0 𝑎𝐷𝑡 𝑓(𝑡) = ∫ (𝑡 − 𝜏)𝜆−1 𝑓(𝜏)𝑑𝜏 (13)
𝑑𝑡 𝜇 Γ(𝜆) 𝑎
𝜇
𝑎𝐷𝑡 = {1 𝜇=0 (9)
𝑡 The Laplace transform of the fractional derivative of
∫𝑎 (𝑑𝜏)−𝜇 𝜇<0
𝑓(𝑡) is given by:
Where 𝜇 is a fractional order of differentiation
𝐿{𝐷 𝜇 𝑓(𝑡)} = 𝑠 𝜇 𝐹(𝑠) − [𝐷 𝜇−1 𝑓(𝑡)]𝑡=0 (14)
or integration, generally 𝜇 ∈ ℝ. The negative sign of
𝜇 indicates integration while positive one means The Laplace transform of the fractional integral of
derivation [24].
𝑓(𝑡) is given as follows:
There are many mathematical definitions of
fractional derivatives [25]. One of the most
important used definitions is Grunwald-Letnikov 𝐿{𝐷 −𝜆 𝑓(𝑡)} = 𝑠 −𝜆 𝐹(𝑠) (15)
definition which is perhaps the most popular
because of its suitability for the realization of Where
discrete control algorithms. 𝐹(𝑠) is the Laplace transform of 𝑓(𝑡).
The Grünwald-Letnikov definition of fractional-
3.2 Fractional PID controller
order derivatives is expressed as [26]:
𝑡−𝑎
The Fractional Order PID (FOPID) Controller is
𝜇 1 [ ] the expansion of the generic control loop feedback
𝑎𝐷𝑡 𝑓(𝑡) = lim ∑ ℎ (−1)𝑗 (𝜇𝑗) 𝑓(𝑡 − 𝑗ℎ) (10)
ℎ→0 ℎ 𝜇 𝑗=0 mechanism (PID controller) widely used in industrial
control systems. The FOPID Controller attempts to
Γ(𝜇+1)
With (𝜇𝑗) = Γ(𝑗+1)(𝜇−𝑗+1) correct the error between a measured process
variable and a desired set point by calculating and
then outputting a corrective action that can adjust the
while the definition of fractional-order integral is
process accordingly.
expressed as:
The transfer function of the FOPID controller is
𝑡−𝜆 described as follows:
1 [
𝜆 ]
−𝜆 ℎ
𝑎𝐷𝑡 𝑓(𝑡) = lim ℎ −𝜆 ∑𝑗=0 ( 𝑗 ) 𝑓(𝑡 − 𝑗ℎ) (11)
ℎ→0
𝐺𝑐 (𝑠) = 𝐾𝑝 + 𝐾𝑖 𝑆 −𝜆 + 𝐾𝑑 𝑆𝜇 (16)
With:
Γ(𝑛−𝜆+1) The FOPID equation has five unknown parameters,
(𝜆𝑗) = 𝑗!Γ(𝜆) , Γ(1) = 1 and Γ(𝑥 + 1) = 𝑥Γ(𝑥) where 𝐾𝑝 is the proportional gain, 𝐾𝑖 is the integral
for 𝜆 ∈ ℕ, Γ(𝜆 + 1) = 𝜆! gain, 𝐾𝑑 is the derivative gain, 𝜆 is the fractional-
order integral and 𝜇 is the fractional-order derivative
where: and 𝜆, 𝜇 are positive real numbers.
𝜆! 𝜇!
(𝜆𝑗) = 𝑗!(𝜆−𝑗)! and (𝜇𝑗) = 𝑗!(𝜇−𝑗)! are the The block diagram of control system employing
Soft computing FOPID control action is shown in
binomial coefficients (𝑗 > 0).
Fig.3.
𝜆, 𝜇 : Integral and derivative Order respectively.
Γ(. ) : Gamma function 𝐹𝑖𝑡𝑛𝑒𝑠𝑠
ℎ : Step time.
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24
Received: March 31, 2018 245
where
Start
𝑉(𝑠) : Input Signal
𝐸(𝑠) : Error Signal
Initialize particles in searching space with random position
𝐺𝑐 (𝑠): Controller Transfer Function and velocity
𝐺(𝑠) : System or plant (DC Motor)
𝜃(𝑠) : Output Signal Calculate the next position and velocity of each particle
To evaluate the controller performance, there are Compare and update the personal best position and speed
always several criterions of control quality like
integral of absolute error (IAE), integral of time
Compare and update the goal best position and speed
absolute error (ITAE), integral of squared error (ISE)
and integral of time squared error (ITSE) [27].
A disadvantage of the ISE and IAE criteria Yes
Early stopping
(weight all errors equally and independent of time) is
that they may result in a response with a long settling No
time and relatively small overshoot [27]. To No
overcome this drawback, an integral of time Maximum iteration
weighted absolute error (ITAE) is used in this paper Yes
as fitness function.
Therefore, the controller can be evaluated using Stop: giving gbest as optimal solution
the following performance index:
∞ End
𝐽(𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑 , 𝜆, 𝜇) = ∫0 𝑡|𝑒(𝑡)|𝑑𝑡 (17)
Figure.4 Flowchart of PSO algorithm procedure
J is called as ITAE. It explains indirectly the level
that the controlled object is close to the reference The update formula of velocity and position is
model. Where 𝑡 is the time and 𝑒(𝑡) is the stated by Eqs. (18) and (19):
difference between set point and controlled variable.
𝑣𝑖𝑘+1 = 𝑤𝑖 𝑣𝑖𝑘 + 𝐶1 𝑎(𝑃𝑖 − 𝑥𝑖𝑘 ) + 𝐶2 𝑏(𝑃𝑔 − 𝑥𝑖𝑘 ) (18)
4. PSO and DE optimization methods
In this paper, the FOPID controller is optimized 𝑥𝑖𝑘+1 = 𝑥𝑖𝑘 + 𝑣𝑖𝑘+1 (19)
to achieve the optimal behaviour of the plant. The
optimizer is used to search for the optimal solution of Where:
the FOPID control gain. 𝑣𝑖𝑘 , 𝑥𝑖𝑘 : Velocity and positioning vectors of
particle 𝑖 at iteration 𝑘 respectively.
4.1 Particle swarm optimization algorithm 𝑣𝑖𝑘+1 , 𝑥𝑖𝑘+1 : Modified velocity and position of
PSO is a modern heuristic search method particle 𝑖 at the next iteration 𝑘 + 1
inspired by the social behavior of bird and fish respectively.
schooling. PSO optimization consists of designing 𝑎 ,𝑏 : Random number between 0 and 1
the optimization goal, i.e. the fitness function and 𝐶1 , 𝐶2 : Positive constants
then encoding the parameters to be searched. 𝑃𝑖 , 𝑃𝑔 : Best positions found by particle 𝑖 and 𝑔
PSO exploits a swarm of particles probing respectively
promising regions of the D-dimension search space 𝑤𝑖 : Weight function for velocity of particle 𝑖.
with adaptable velocity. It runs until the stop
condition is satisfied. The best particle’s position In order to design optimum controller, the fitness
gives the optimized parameters for the controller. function are defined in Eq. (17).
The flowchart of a typical PSO algorithm is shown
in Fig.4.
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24
Received: March 31, 2018 246
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24
Received: March 31, 2018 247
1.5 1.5
FOPID-PSO Setpoint
PID-DE
Output Signal
Output Signal
1 1 FOPID-DE
0.5 0.5
0 0
0 5 10 15 20 5 10 15 20
Time(s) Time(s)
1.01 ZOOM
1
fitness Value
1 0.5
Best J=0.53 1 2 3 4 5
1 Numbers of generation
0.99
0.98
2.6 2.8 3 0.5
Time(s) 0 20 40 60 80 100
Numbers of generation
(b) Figure.10 Convergence of behaviours of FOPID-DE
Figure.6 Unit step response of closed-loop system: (a)
FOPID-PSO and (b) Zoom 2.6
2.8
fitness Value
2.6
1.5 2.55
FOPID-DE
Setpoint 1 2 3 4 5
Best J: 2.4509 Numbers of generation
Output Signal
1 2.5
0.5 2.45
0 20 40 60 80 100
Numbers of generation
0 Figure.11 Convergence of behaviours of the: FOPID-PSO
5 10 15 20
Time(s)
Figure.7 Unit step response of closed-loop system: As can be seen in Fig.8, the dynamic properties
FOPID-DE (overshoot and settling time) of the controlled
system response obtained from the FOPID-PSO
As can be seen in Fig.7, the dynamic properties controller are much better than those of the PID-
(overshoot and settling time) of the controlled PSO controller.
system response obtained from the FOPID-DE are Fig.9 shows the responses of the FOPID-DE and
much better than those of obtained from FOPID- PID-DE controllers with the ITAE cost function. As
PSO controller. can be seen from Fig.9, the FOPID-DE controller is
We remark also, in all figures, a sluggish initial more robust and has better trajectory tracking than
responses which is due to ITAE index (ITAE index the PID-DE. In order to compare the search
reduces the settling time and absolute error but it has performance of the different intelligent optimization
sluggish initial response). methods, PSO and DE algorithms are applied to the
Fig.8 shows the responses of the FOPID-PSO FOPID controller optimization with ITAE cost
and PID-PSO controllers with the ITAE cost function.
function. Figs.10 and 11 show the fitness values of
different algorithms and as can be seen, the fitness
1.5 value of the FOPID-DE is decreased to 0.53 after 2
Setpoint
PID-PSO generations. On the second hand, the fitness value of
Output Signal
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24
Received: March 31, 2018 248
yout
yout
[8] D. Maiti, S. Biswas, and A. Konar, “Design of a [19] A. Rajasekhar, S. Das, and A. Abraham,
fractional order PID controller using particle ‘‘Fractional order PID controller design for
swarm optimization technique”, Second speed control of chopper fed dc motor drive
National Conference on Recent Trends in using artificial bee colony algorithm’’, In: Proc.
Information Systems, Vol. 30, 2008. of Nature and Biologically Inspired Computing,
[9] A. Alfi and H. Modares, “System identification World Congress, pp. 259-266, 2013.
and control using adaptive particle swarm [20] A. Jalilvand, A.A. Kimiyaghalam, and H. Kord,
optimization”, Applied Mathematical Modelling, ‘‘Optimal tuning of PID controller parameters
Vol.35, No.3, pp. 1210-1221, 2011. on a DC motor based on advanced particle
[10] D. Xue, C. Zhao, and Y.Q. Chen, “Fractional swarm optimization algorithm’’, International
Order PID Control of a DCMotor with Elastic Journal on Technical and Physical Problems of
Shaft: A Case Study”, In: Proc. of the 2006 Engineering, Vol.3, No.4, pp. 10-17, 2011.
[21] A. Biswas, S. Das, A. Abraham, and S.
American Control Conference, pp. 3182-3187,
Dasgupta, “Design of fractional-order PID
2006. controllers with an improved differential
[11] V. Mehra, S. Srivastava, and P. Varshney, evolution”, Eng. Appl. Artif. Intell., Vol.22,
“Fractional-Order PID Controller Design for No.2, pp. 343-350, 2009.
Speed Control of DC Motor”, In: Proc. of the [22] H. Tajbakhsh, and S. Balochian, “Robust
Third International Conference on Emerging Fractional Order PID Control of a DC Motor
Trends in Engineering and Technology, pp. with Parameter Uncertainty Structure”, Int. J. of
422-425, 2010. Innovative Science, Engineering & Technology,
[12] S.K. Gupta and P. Varshney, ‘‘Fractional Fuzzy Vol.1, No.6, 2014.
PID Controller for Speed Control of DC [23] A. Oustaloup, La commande CRONE:
Motor’’, In: Proc. of the Third International commande robuste d’ordre non entier (in
Conference on Advances in Computing and French), Hermes, Paris, 1991.
Communications, pp. 1-4, 2013. [24] J. Sabatier, A. Oustaloup, A.G. Iturricha, and F.
[13] D. Singh, B. Singh, and N. Singh, Levron, “CRONE control of continuous linear
“Performance Indices Based Optimal Tunining time periodic systems: Application to a testing
Criterion for Speed Control of DC Drives bench”, ISA Transactions, Vol.42, No.3, pp.
Using GA”, International Journal of Power 421-436, 2003.
Electronics and Drive System, Vol.4, No.4, pp. [25] A. Carpinteri and F. Mainardi, Fractals and
461-473, 2014. Fractional Calculus in Continuum Mechanics,
[14] A. Ahuja and B. Tandon, “Design of Fractional Springer-Verlag, Wien and New York, pp. 223-
Order PID Controller for DC Motor using 276, 1997.
Genetic Algorithm”, TELKOMNIKA [26] R. Garrappa, “A grunwald–letnikov scheme for
Indonesian Journal of Electrical Engineering, fractional operators of havriliak-negami type”,
Vol.12, No.12, pp. 8140-8151, 2014. Recent Advances in Applied, Modelling and
[15] A. Ahuja and S.K. Aggarwal, “Design of Simulation, Vol.34, pp. 70-76, 2014.
fractional order PID controller for DC motor [27] A.S. Mouayad and S.A. Bestoun, “A new
using evolutionary optimization techniques”, multiobjective performance criterion used in
Wseas Transactions on Systems and Control, PID tuning optimization algorithms”, Journal of
Vol. 9, pp. 171-182, 2014. Advanced Research, Vol.7, No.1, pp. 125-134,
[16] A. M. Concepción, Q. C. Yang, M. V. Blas, X. 2016.
Dingyü, and F. Vicente, Fractional-order
Systems and Controls: Fundamentals and
Applications, Springer-Verlag London,
Advances in Industrial Control series, 2010.
[17] X. Dingyü and Q. C.Yang, ‘‘Fractional Order
PID Control of a DC-Motor with Elastic Shaft:
a Case Study’’, In: Proc. of American Control
Conference, pp. 3182-3187, 2006.
[18] I. Podlubny, ‘‘Fractional-order systems and
PIλDμ controllers’’, IEEE Transactions on
Automatic Control, Vol.44, No.1, pp. 208-214,
1999.
International Journal of Intelligent Engineering and Systems, Vol.11, No.4, 2018 DOI: 10.22266/ijies2018.0831.24