Optimal Design of PID Controller For The Speed Control of DC Motor by Using Metaheuristic Techniques
Optimal Design of PID Controller For The Speed Control of DC Motor by Using Metaheuristic Techniques
Research Article
Optimal Design of PID Controller for the Speed Control of
DC Motor by Using Metaheuristic Techniques
Copyright © 2014 M. M. Sabir and J. A. Khan. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly
cited.
DC motors are used in numerous industrial applications like servo systems and speed control applications. For such systems, the
Proportional+Integral+Derivative (PID) controller is usually the controller of choice due to its ease of implementation, ruggedness,
and easy tuning. All the classical methods for PID controller design and tuning provide initial workable values for 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑
which are further manually fine-tuned for achieving desired performance. The manual fine tuning of the PID controller parameters
is an arduous job which demands expertise and comprehensive knowledge of the domain. In this research work, some metaheuristic
algorithms are explored for designing PID controller and a comprehensive comparison is made between these algorithms and
classical techniques as well for the purpose of selecting the best technique for PID controller design and parameters tuning.
45
40
Table 2: DC motor output response. Table 3: 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 values by using Z-N method.
𝛼 = 1.3𝑡𝑎 − 0.29𝑡𝑏 . (11) Step 2 (evaluate fitness). Each candidate solution is evaluated
against a fitness function.
By using (5) to (11) we get the values of 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑
listed in Table 3. Step 3 (reproduction). The chromosomes with higher value of
fitness value are more likely to reproduce offspring.
3.2. Cohen-Coon (C-C) Method. Cohen and Coon also pro-
posed a method for design and tuning of PID controller. Step 4 (next generation). If the new generation contains
Based on this method, PID controller parameters could be desired solution, then problem has been solved, and if it is not
determined as follows [20]: the case, then the new population will go through the same
process as described above.
𝑇 4 𝛼
𝐾𝑝 = [ + ],
𝛼𝛽 3 4𝑇 Step 5. Termination based on number of iterations or required
fitness value was achieved.
32 + 6𝛼/𝑇 In our design method PID controller parameters (𝐾𝑝 ,
𝑇𝑖 = 𝛼 [ ], (12)
13 + 8𝛼/𝑇 𝐾𝑖 , 𝐾𝑑 ) are viewed as individuals and each parameter value
is coded by a real number.
4
𝑇𝑑 = 𝛼 [ ].
11 + 2𝛼/𝑇
4.2. Particle Swarm Optimization (PSO). The particle swarm
By using (12) and also from (8) to (11) the following values optimization algorithm was proposed by Kennedy and Eber-
of 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 have been obtained and listed in Table 4. hart in 1995 [22]. This algorithm is based on the social
4 Advances in Artificial Neural Systems
behavior of swarm such as bird flocking and fish schooling. Table 5: Parameters of PID through Z-N and C-C methods.
Here, each individual bird is called the particle, and in our
case each individual particle has three attributes which are Method 𝐾𝑝 𝐾𝑖 𝐾𝑑
𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 . Ziegler-Nichols 0.8000 0.6380 0.2508
Each particle in PSO flies in the whole search space with Cohen-Coon 0.3522 0.2317 0.0798
a certain velocity which is dynamically adjusted according
to its own flying experience and the knowledge gain by the
Table 6: Response for Z-N and C-C methods.
velocities of its peers. Each particle is treated as particle in
𝑑-dimensional search space. Method 𝑡𝑠 𝑡𝑟 𝑀𝑝 𝑒𝑠𝑠
The change in velocity and position of each particle is Ziegler-Nichols 6.2222 0.8058 29.2329 0.5
governed by the following relations:
Cohen-Coon 12.6787 1.3370 36.8658 0.5
V (new) = 𝛿V (old) + 𝑎1 [𝑝best − 𝑥 (old)] + 𝑎2 [𝑔best − 𝑥 (old)]
𝑥 (new) = 𝑥 (old) + V (new) , vertex and the search is continued by forming the triangular
(13) patterns. The function values at vertices get smaller and
smaller and the triangle size reduces which ultimately results
where 𝛿 is inertia weight factor, 𝑝best is local best, 𝑔best is in finding the local minimum.
global best, V is velocity of the particle, 𝑥 is the position of
the particle, 𝑎1 [𝑝best − 𝑥(old)] is individual intelligence, and
𝑎2 [𝑔best − 𝑥(old)] is collective intelligence. 5. Results and Discussions
Using the classical methods of PID tuning, Ziegler-Nichols
4.3. Simulated Annealing (SA). The simulated annealing was and Cohen-Coon, PID controller was tuned by keeping
originally inspired by the crystal formation process when the objective that settling time 𝑡𝑠 and rise time 𝑡𝑟 should
solids are cooled down from some high temperature [21]. The be minimum and there should be no overshoots; that is,
slower the cooling is, the more perfect crystal is formed. In maximum percent over shoot 𝑀𝑝 should be zero. The PID
cooling process, we ultimately converge towards minimal and controller parameters obtained by these classical methods are
stable energy state. The system movement towards stability given in Table 5.
is random, but the probability to stay in any particular By using the above values of 𝐾𝑝 , 𝐾𝑖 , and 𝐾𝑑 , PID
configuration directly depends on the energy of the system controller was designed and the closed loop response of this
and on its temperature. The said probability is given by the controller with the plant is shown in Figure 3 and also the
following Gibbs relation: output values of 𝑡𝑠 , 𝑡𝑟 , 𝑀𝑝 and steady state error 𝑒𝑠𝑠 are shown
in Table 6.
𝑝 = 𝑒𝐸/𝑘𝑇 , (14) It is apparent from Figure 3 and Table 6 that the settling
time and maximum percent overshoot are very large and PID
where 𝐸 is the energy in different energy states, 𝑘 is the controller designed by these methods will not provide desired
Boltzmann constant, and 𝑇 is the temperature. performance. So these techniques are not helpful in tuning
In 1970, Kirkpatrick formed the simulated annealing the PID controllers for the systems in which the parameters
algorithm by using the above said analogy. The SA behaves of 𝑡𝑠 , 𝑡𝑟 , and 𝑀𝑝 are critical.
like hill climbing algorithm, but it avoids the local minimum The same problem is also solved by six metaheuristic
and it usually gives good results. As in stochastic hill climbing algorithms, namely, GA, PSO, SA, GA-NM, PSO-NM, and
algorithm, in each iteration of SA a new solution in the SA-NM, for designing and tuning of PID controller. Not only
neighborhood of actual solution is randomly chosen. If the the global search but also the hybrid searching techniques
fitness value of the new solution is better than the previous using the Nelder-Mead algorithm as the local minimization
value, then the new solution is accepted as the new current search technique are also applied. The purpose is to study the
solution. If the fitness function is not improved, then the new optimization capabilities of these metaheuristic algorithms
solution is retained with a probability and to demonstrate that by using these techniques PID con-
troller design and tuning give the more accurate and better
𝑝 = 𝑒−[𝑓(𝑦)−𝑓(𝑥)]/𝑘𝑇 , (15) results. There might be many possible objective functions like
integral of time-absolute-error (ITAE), integral of absolute-
where 𝑓(𝑦)−𝑓(𝑥) is the difference of fitness function between error (IAE), integral of time-weighted-squared-error (ITSE),
the new and the old solutions. and integral of squared-error (ISE), but the objective function
used in these algorithms for the minimization is defined as
4.4. Nelder-Mead (NM) Method. Nelder-Mead method is a follows [24]:
simplex method which is used to find the local minimum
of a function of several variables [23]. For the two variables min 𝐽 = (1 − 𝑒−𝜉 ) (𝑀𝑝 + 𝑒𝑠𝑠 ) + 𝑒−𝜉 (𝑡𝑠 − 𝑡𝑟 ) . (16)
function simplex is a triangle of three vertices and the method
is a pattern search. At the worst vertex the function value One can change the value of 𝜉, which is the weighting
is the largest and this worst vertex is replaced with new factor, in three steps, that is, 𝜉 = 0.5, 𝜉 = 1.0, and 𝜉 = 1.5,
Advances in Artificial Neural Systems 5
Fitness value
0.0001 1.0000
10−0.4
1.4
1.2
1
Amplitude
0.8
10−0.5
0.6
0.4 0 20 40 60 80 100
0.2 Number of runs
0
0 2 4 6 8 10 12 14 16 18 NM-GA
NM-PSO
Time (s)
NM-SA
Cohen-Coon
Ziegler-Nichols Figure 4: Fitness (𝐽) for GA-NM, PSO-NM, and SA-NM, 𝜉 = 0.5.
Table 9: Fitness (𝐽) case 1, 𝜉 = 0.5. Table 10: Fitness (J) case 2, 𝜉 = 1.0.
Algo. Min. Max. Mean Var. Std. Runs Algo. Min. Max. Mean Var. Std. Runs
GA 0.4303 0.6804 0.4693 0.0019 0.0433 100 GA 0.4563 14.5462 0.6789 2.2793 1.5097 100
PSO 0.3010 0.4402 0.3665 0.0037 0.0612 100 PSO 0.3793 0.4566 0.4206 0.0014 0.0368 100
SA 0.3040 15.9880 1.1158 6.7519 2.5984 100 SA 0.3803 18.3989 NaN NaN NaN 100
NM-GA 0.3011 0.5827 0.4272 0.0016 0.0398 100 NM-GA 0.3795 0.5436 0.4604 0.0005 0.0233 100
NM-PSO 0.3010 0.4311 0.3655 0.0038 0.0618 100 NM-PSO 0.3793 0.4559 0.4203 0.0014 0.0371 100
NM-SA 0.3010 0.4573 0.3108 0.0005 0.0229 100 NM-SA 0.3793 0.4015 0.3839 0 0.0046 100
10−0.28
Table 11: Fitness (J) case 3, 𝜉 = 1.5.
1.4 application,” IEEE Transactions on Magnetics, vol. 48, no. 11, pp.
1.2 3348–3351, 2012.
1 [2] A. Sathyan, M. Krishnamurthy, N. Milivojevic, and A. Emadi,
Amplitude
20
“Adaptive quasi-sliding mode control for permanent magnet
10 DC motor,” Mathematical Problems in Engineering, vol. 2013,
0 Article ID 693685, 12 pages, 2013.
−10 [7] H. Zhang, L. Ge, M. Shi, and Q. Yang, “Research of compound
control for DC motor system based on global sliding mode
−20 disturbance observer,” Mathematical Problems in Engineering,
−30 vol. 2014, Article ID 759147, 7 pages, 2014.
0 25 50 75 100 125 150
[8] J. Yao, G. Yang, Z. Jiao, and D. Ma, “Adaptive robust motion
Time (s) control of direct-drive DC motors with continuous friction
Multiple setpoint tracking Zn compensation,” Abstract and Applied Analysis, vol. 2013, Article
Speed command (rpm) ID 837548, 14 pages, 2013.
Multiple setpoint tracking CC [9] R. Namba, T. Yamamoto, and M. Kaneda, “Robust PID con-
troller and its application,” in Proceedings of the 1997 IEEE
Figure 8: Multiple setpoint tracking for Z-N and C-C tuned PID. International Conference on Systems, Man, and Cybernetics, pp.
3636–3641, October 1997.
20 [10] Y. Harrath, B. Chebel-Morello, and N. Zerhouni, “A genetic
15 algorithm and data mining based meta-heuristic for job shop
Speed command (rpm)
Advances in
Fuzzy
Systems
Modelling &
Simulation
in Engineering
Hindawi Publishing Corporation
Hindawi Publishing Corporation Volume 2014 http://www.hindawi.com Volume 2014
http://www.hindawi.com
International Journal of
Advances in Computer Games Advances in
Computer Engineering Technology Software Engineering
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
International Journal of
Reconfigurable
Computing