PID Speed Control of DC Motor Using Meta-Heuristic Algorithms
PID Speed Control of DC Motor Using Meta-Heuristic Algorithms
Corresponding Author:
Aayush Bhattarai
Department of Mechanical and Aerospace Engineering
Tribhuvan University
Lalitpur 44700, Nepal
Email: [email protected]
1. INTRODUCTION
DC motors are actuators that produce angular rotation when supplied with electrical energy. They
have significant importance in various electrical systems employed in domestic and industrial applications
such as electrical vehicles, industrial mills and cranes, robots, and multiple home appliances [1], [2]. This
importance is due to their advantageous characteristics like precision, convenience, and continuous control
[3]. In order to drive the DC motor at appropriate speed or torque, it is necessary to have a proper control
scheme.
PID controller is one of such control schemes employed in numerous industrial applications [4]. The
term PID is an abbreviation for “proportional integral derivative” and a PID controller is a control system
incorporating these three components. The integrator mitigates the controlled system’s error, and the
derivative provides improved output, adding to other advantageous reasons as to why PID controller has been
preferred for more than eight decades [5]. The parameters of proportional, integrator and derivation gains,
denoted respectively as 𝐾𝑝 , 𝐾𝑖 , 𝐾𝑑 , are tuned to obtain desired output from the controlled process [6].
There are several classical approaches to tune the PID controller namely Ziegler-Nichols [7],
Cohen-Coon [8], Chien-Hrones-Reswick [9], Astrom and Hagglund [10]. However, these conventional
methods typically consume a great deal of time as tuning of parameters must be done iteratively until optimal
solution is obtained [11] and results in undesirable overshoot [12]. To overcome these disadvantages, number
of PID tuning methods have been proposed in the literature. One of such approaches is the usage of meta-
heuristic techniques.
Metaheuristic optimization techniques are stochastic techniques that provides sufficiently acceptable
solution(s) iterating the candidate solution(s) improving a certain metric, often referred to as the fitness value.
Metaheuristic algorithms can effectively overcome the problem of getting stuck in local optima while
exploration in the feasible solution domain and provide effective optimization in problems with complexities
of time or dimensions [13], [14]. Control of DC motor has been a popular area where several meta-heuristic
algorithms find application [15], [16].
In this paper, two metaheuristic algorithms are presented as tuning methods to tune parameters of
speed-controlled DC motor, namely, archimedes optimization algorithm (AOA) and dispersive flies
optimization (DFO). The paper is set in the following order: Section 2 outlines the methodology employed in
the study with a brief description of meta-heuristic algorithms, Section 3 illustrates results and relevant
discussions, and Section 4 concludes the study.
2. METHOD
2.1. Modelling of DC motor
An externally excited DC motor is employed in this study. The schematic of armature-controlled
DC motor is illustrated in Figure 1. The voltage (𝐸𝑎 ) is employed to regulate the angular velocity (𝜔) of the
motor.
Rotating rotor interacts with the fixed field at right angle. So, the voltage induced across its terminal
i.e, the motor back EMF (𝑒𝑏 ) is proportional to the speed (𝜔)
𝑑𝜃
𝑒𝑏 = 𝐾𝑏 (1)
𝑑𝑡
Where 𝐾𝑏 is the back EMF constant. The governing mathematical model for armature loop is
𝑑𝑖𝑎
𝐸𝑎 = 𝐿 + 𝑅𝑖𝑎 + 𝑒𝑏 (2)
𝑑𝑡
Where 𝑖𝑎 is the armature current, 𝐿 is the inductance of armature winding, and 𝑅 is the armature resistance.
Since the torque established by the motor (𝑇𝑚 ) is proportionate to current (𝑖𝑎 ) in the armature
𝑇𝑚 = 𝐾𝑡 𝑖𝑎 (3)
Where 𝐾𝑡 is the motor torque constant. The dynamic equation with coefficient of friction (𝑓) and moment of
inertia (𝐽) is
𝑑2𝜃 𝑑𝜃
𝑇𝑚 = 𝐽 +𝑓 (4)
𝑑𝑡 2 𝑑𝑡
Since, 𝜔(𝑠) = 𝑠𝜃(𝑠). The resulting transfer function for the speed-controlled DC motor is
𝜔(𝑠) 𝐾
𝑡
𝐺𝑀 (𝑠) = = (𝐿𝑠+𝑅)(𝐽𝑠+𝑓)+𝐾 (5)
𝐸𝑎 (𝑠) 𝑏 𝐾𝑡
PID speed control of DC motor using meta-heuristic algorithms (Bishwa Babu Acharya)
824 ISSN: 2088-8694
For the model parameters considered, the resulting transfer function is.
𝜔(𝑠) 1
𝐺𝑀 (𝑠) = = (6)
𝐸𝑎 (𝑠) 0.222866𝑠 2 +0.77067𝑠+1
𝐾𝑖 1
𝐺𝑃𝐼𝐷 (𝑠) = 𝐾𝑝 + + 𝐾𝑑 𝑠 = 𝐾𝑝 (1 + + 𝑇𝑑 𝑠) (7)
𝑠 𝑇𝑖 𝑠
where 𝐾𝑝 , 𝐾𝑖 and 𝐾𝑑 represent proportional gain, integral gain, and derivative gain, respectively. Likewise, 𝑇𝑖
and 𝑇𝑑 represent the integral and derivative time constant. Also, 𝐾𝑖 = 𝐾𝑝 /𝑇𝑖 , and 𝐾𝑑 = 𝐾𝑝 𝑇𝑑 .
The schematic diagram of the proposed controller for speed control of DC motor is illustrated in
Figure 2. Finally, for no-load condition with PID speed controller, the closed-loop transfer function is given
by (8).
Int J Pow Elec & Dri Syst, Vol. 12, No. 2, June 2021 : 822 – 831
Int J Pow Elec & Dri Syst ISSN: 2088-8694 825
procedure AOA
Define population size 𝑁, maximum iterations 𝑇𝑚𝑎𝑥 , constants 𝐶1 , 𝐶2 , 𝐶3 𝑎𝑛𝑑 𝐶4
Initialize population individuals with random positions, densities, and volumes
Evaluate each individual’s fitness and choose the optimum from these fitness value
Set iteration counter 𝑇 = 1
while 𝑇 ≤ 𝑇𝑚𝑎𝑥 do
for each object 𝑖 do
Update density and volume
Update transfer and density decreasing factors TF and d respectively
if 𝑇𝐹 ≤ 0.5 then (Exploration Phase)
Update acceleration and normalize acceleration
Update position
else (Exploitation Phase)
Update acceleration and normalize acceleration
Update direction flag F
Update position
end if
end for
Evaluate each object’s fitness and select the best fitness
Set 𝑇 = 𝑇 + 1
end while
return object with best fitness value
end procedure
that instance. It has been employed in controller designing task for multiple times. Bayoumi and Soliman
[24] employed PSO-based PI/PID controlling scheme for speed and current regulation of brushless DC
(BLDC) motor. H. E. A. Ibrahim, F. N. Hassan, and A. O. Shomer [25] compared performance of PSO with
bacterial foraging optimization (BFO) in regulating a BLDC motor’s speed. R. V. Jain, M. V. Aware, and A.
S. Junghare [26] tuned fractional order PID (FOPID) controller for similar application. The algorithm is
represented in the pseudo code.
For member p
Initialize member
End
Do
For member p
Evaluate the fitness
If new fitness value optimal than personal best (pfbest)
pfbest ← new fitness value
End
Select the member with the best pfbest value as global best (gfbest)
For member p
Evaluate velocity using (1)
Update position using (2)
End
Three response characteristics, particularly, the settling time, rise time and the overshoot of the plant
introduced with the step input were observed. Then the response of the suggested algorithms, ZN method and
PSO were compared. The data obtained are compared with that of PSO as it is the most used algorithm for
synonymous task in literature.
Int J Pow Elec & Dri Syst, Vol. 12, No. 2, June 2021 : 822 – 831
Int J Pow Elec & Dri Syst ISSN: 2088-8694 827
The dimension of the problem to be optimized by the algorithms is three, referring to the three gain
values of PID controller: 𝐾𝑝, 𝐾𝑖, 𝐾𝑑. The range of these gains used is.
PID speed control of DC motor using meta-heuristic algorithms (Bishwa Babu Acharya)
828 ISSN: 2088-8694
has improved the system’s transient response by significantly reducing the peak time, the settling time, and
the rise time. Similar conclusion can be derived for the transient response criteria of DFO-PID which has the
rise time of 0.1098𝑠, settling time of 0.1951𝑠, peak time of 0.5349𝑠, and 0.4600% overshoot. These
response criteria are better when compared to those obtained from ZN method and PSO-PID.
DFO-PID outperforms AOA-PID, ZN-PID, and PSO-PID in terms of rise time, peak time, and
settling time. DFO-PID controller has rise time of 0.1098𝑠, settling time of 0.1951𝑠, and peak time of
0.5349𝑠. Likewise, AOA-PID ranks second with rise time of 0.1100𝑠, settling time of 0.1957𝑠, and peak
time of 0.5516𝑠. With regards to overshoot, AOA-PID outperforms other meta-heuristic algorithms with
0.26% overshoot. Likewise, DFO-PID ranks second with 0.46% overshoot. Figure 4 shows the closed-loop
step response of the system for all these controllers. Although all the meta-heuristic algorithms can reduce
the disturbance in comparison to open loop response, small percentage of overshoot is still prevalent in the
system. Figure 4 illustrates the closed-loop step response of the system for all these controllers.
Table 5 provides the minimum value of the objective function these metaheuristic algorithms
converge to after 100 iterations. This helps one conclude that the proposed tuning methods provide PID
controller parameters with comparatively lower ITAE value which is a desired feature. DFO-PID controller,
evidently, has the lowest ITAE with lowest standard deviation for 10 independent runs. Hence, the DFO-PID
controller is the most accurate meta-heuristic algorithm based on ITAE fitness function. Likewise, DFO-PID
is evident to show minimal variance in the result for different runs illustrating the high repeatability of the
algorithm. AOA-PID ranks second after DFO-PID in terms of fitness function value as well.
Figure 5 illustrates the convergence of the meta-heuristic algorithm for the best simulation run. It is
observed that the suggested methods take less iteration to converge to provide an optimal PID controller. It is
observable that the DFO-PID converges faster than AOA-PID and PSO-PID. While DFO-PID took only 18
Int J Pow Elec & Dri Syst, Vol. 12, No. 2, June 2021 : 822 – 831
Int J Pow Elec & Dri Syst ISSN: 2088-8694 829
iterations to converge to the ITAE of 0.002484, AOA-PID took about 50 iterations to achieve approximately
the same. On the contrary, PSO-PID could only converge to ITAE of 0.003153 even with 100 iterations.
AOA-PID and DFO-PID outperform ZN method and PSO-method in transient response criteria as well as in
minimizing ITAE value. Furthermore, these two proposed methods take comparatively less iterations to
converge to optimal ITAE value than PSO-PID.
4. CONCLUSION
In this study, two new approaches are presented to obtain optimum gain parameters of PID
controller to regulate a DC motor’s rotational speed. In controller design process, meta-heuristic algorithms
are utilized to minimize the ITAE fitness function. Transient response characteristics of DC motor speed
control system were employed to evaluate the efficacy of meta-heuristic algorithms. In this study, AOA,
DFO, and PSO algorithms are considered for performance comparison. The numerical figures and graphical
simulation results conclude that the proposed techniques outperform the classical ZN method and the popular
PSO method. Hence, the proposed technique can be employed to ensure optimum performance of PID
controller in large electrical systems, process industry and automation sector, among others.
REFERENCES
[1] W. Lan and Q. Zhou, “Speed control of DC motor using composite nonlinear feedback control,” In 2009 IEEE
International Conference on Control and Automation, Dec 2009, pp. 2160-2164.
[2] Q. V. Ngo, Y. Chai, and T. T. Nguyen, “The fuzzy-PID based-pitch angle controller for small-scale wind
turbine,” International Journal of Power Electronics and Drive Systems (IJPEDS), vol. 11, no. 1, pp. 135-142,
2020, DOI: 10.11591/ijpeds.v11.i1.pp135-142.
[3] Dil Kumar T R and Mija S.J, “Design and performance evaluation of robust SMC schemes for speed control of DC
motor,” In 2014 IEEE International Conference on Advanced Communications, Control and Computing
Technologies, pp. 88-92, DOI: 10.1109/ICACCCT.2014.7019235.
[4] R. Namba, T. Yamamoto, and M. Kaneda, “Robust PID controller and its application,” 1997 IEEE International
Conference on Systems, Man, and Cybernetics. Computational Cybernetics and Simulation, Oct 1997, vol. 4,
pp. 3636-3641, DOI: 10.1109/ICSMC.1997.633233.
[5] Š. Bucz and A. Kozáková, “Advanced methods of PID controller tuning for specified performance,” PID Control
for Industrial Processes, pp. 73-119, 2018, DOI: 10.5772/intechopen.76069.
[6] L. Chaib, A. Choucha, and S. Arif, “Optimal design and tuning of novel fractional order PID power system
stabilizer using a new metaheuristic Bat algorithm,” Ain Shams Engineering Journal, vol. 8, no. 2, pp. 113-125,
2017, DOI: 10.1016/j.asej.2015.08.003.
[7] N. Yadaiah and S. Malladi, “An optimized relation between T i and T d in Modified Ziegler Nichols PID controller
tuning,” 2013 IEEE International Conference on Control Applications (CCA), Aug 2013, pp. 1275-1280, DOI:
10.1109/CCA.2013.6662928.
[8] G. Cohen, “Theoretical consideration of retarded control,” Trans. Asme, vol. 75, pp. 827-834, 1953.
[9] K. L. Chien, “On the automatic control of generalized passive systems,” Trans. Asme, vol. 74, pp. 175-185,1972.
[10] K. Astrom and T. Hagglund, PID controllers: theory, design and tuning, 1977.
[11] M. N. Ab Malek and M. Ali, “Evolutionary tuning method for PID controller parameters of a cruise control system
using metamodeling,” Modelling and Simulation in Engineering, vol. 2009, pp. 1-8, DOI: 10.1155/2009/234529.
PID speed control of DC motor using meta-heuristic algorithms (Bishwa Babu Acharya)
830 ISSN: 2088-8694
BIOGRAPHIES OF AUTHORS
Bishwa Babu Acharya received his B.E. in Mechanical Engineering from Institute of
Engineering (IOE), Pulchowk Campus, Tribhuvan University, Nepal. His research interests are
Dynamics and Controls, Optimization and Sustainable Energy.
Sandeep Dhakal is a final year mechanical engineering student at Pulchowk Campus, Institute
of Engineering, Tribhuvan University, Nepal. He is actively working in the application of data
science techniques in mechanical engineering to generate meaningful information. His research
interest includes Data Analytics, Data Science, Operation Research, and Supply Chain
Management.
Int J Pow Elec & Dri Syst, Vol. 12, No. 2, June 2021 : 822 – 831
Int J Pow Elec & Dri Syst ISSN: 2088-8694 831
Associate Professor, Nawraj Bhattarai (PhD.) received his B.E. in Mechanical Engineering
degree from Tribhuvan University in 2000. He went on to receive M.Sc. in Renewable Energy
Engineering from Tribhuvan University in 2004 and Ph.D. in Energy System Planning from
Vienna University of Technology, Austria in 2015. He is currently working as Head of
Department in Mechanical and Aerospace Engineering, Pulchowk Campus, Institute of
Engineering, Tribhuvan University, Nepal. His research interest includes the field of Mechanical
Engineering, Renewable Energy Engineering, and Energy System Planning.
PID speed control of DC motor using meta-heuristic algorithms (Bishwa Babu Acharya)