Optimized PID controller for BLDC motor using
Nature-inspired Algorithms
Manoj Kumar Merugumalla
Department of Electrical Engineering
Andhra University
Visakhapatnam, India
Prema Kumar Navuri
Department of Electrical Engineering
Andhra University
Visakhapatnam, India
Abstract— The class of population algorithms for solving
various problems of global optimization is often called as
methods inspired by nature. Methods in this class are based on
the modelling of intelligent behaviour of organized members of
the population. The nature of this collective intelligence is
found among the social insects, such as ants, bees and among
some species of fish and birds. Population based algorithms
have number of advantages over classical methods for solving
complex optimization problems. This paper presents the
comparison of population algorithms with classical methods of
tuning PID control parameters for the control of speed of
brushless direct current (BLDC) motor .The position of BLDC
rotor here is determined by measuring the changes in the Back
emf. Sensorless control method reduces the cost of motor as it
does not need sensors to detect position of rotor. The BLDC is
modelled in MATLAB/SIMULINK and trapezoidal back emf
waveforms are modelled as a function of rotor position using
matlab code. The proposed population algorithms are effective
in tuning control parameters thereby reducing the time
domain parameters like steady state error, settling time, rise
time and peak overshoot. The population algorithms such as
Particle swarm optimization (PSO) algorithm and bat
algorithm (BA) based on effective objective function-Integral
absolute error (IAE) are proposed for the optimal tuning of
controller parameters. The results obtained from these
algorithms are compared with the classical methods.
Keywords— Brushless direct current motor, sensorless
control, particle swarm optimization, bat algorithm, PID
controller.
I. INTRODUCTION
BLDC motor came into existence in 1960s. The motor has
several advantages such as high efficiency, flat speed-torque
characteristics and high speed range, when compared against
Brushed DC motor. BLDC motors are electronically
commutative motors in contrast to the mechanically
commutated brushed dc motor. The rotor position can be
determined either by Hall effect sensors or by measuring
the changes in the bemf at each of the armature coils as the
motor rotates which is sensorless control method[1]-[3]. The
position of rotor is determined by measuring the changes in
the trapezoidal bemf. PID controller is mostly used for the
speed control of many motors, but tuning of control
parameters is a difficult task. Nature-inspired algorithms
have advantages over classical methods of tuning controller
parameters. To demonstrate the effectiveness of nature-
inspired algorithms over classical methods, the particle
swarm optimization, bat algorithm, Ziegler-Nichols method
and Tyreus-Luyben method are proposed and compared in
this paper. Nature inspired algorithms are applicable to any
virtual problem that can be treated as an optimization task. It
requires some data to represent solutions and a performance
index to evaluate solutions. In Particle swarm optimization
algorithm the particles play the role of agents and are
distributed in parameter space of optimization problem [5].
The particles move in parameter space and change their
direction and speed of motion based on certain rules. At each
iteration the value of target function is calculated according
to the current particle position. Particle also knows the
position of neighbor particles and information about its best
position based on previous values. According to this
information, the rule for changing particle position and speed
in the parameter space is determined. Bat-inspired algorithm
is another method in the class of population algorithm. Bat
have unique echolocation which is used to fly in darkness
and to detect prey [5]. During search process bat generates
signal with frequency and volume.
The objective in the optimal PID-design is to
reduce the overshoots and settling time in system oscillations
with minimum error. Classical methods and nature-inspired
algorithms has been used for optimization of PID controller
parameters. Objective function needs to be formulated for
optimal PID-design.
II. BLDC MOTOR DRIVE SYSTEM
A. BLDC motor
Unlike brushed dc motor, field of brushless dc
motor is on rotor and armature is on stator, armature on
stator has an advantage of conducting heat away from
winding. The BLDC is supplied by the inverter. BLDC
motor accomplishes electronic commutation using feedback
from rotor position to determine the current switching. The
rotor position can be determined either by using a Hall
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
415
effect sensor or by measuring changes in back emf at each
of the armature coils as motor rotates. However sensors
cannot be used in applications where rotor is in a closed
housing. Therefore BLDC sensorless driver monitor BEMF
signal instead of the position detected by Hall sensors to
commutate the signal [4].The schematic diagram of BLDC
motor drive control is shown in figure.1
Fig.1 BLDC motor drive control scheme
The equations that describe the model is as follows:
(1)
(2)
(3)
where Eb and Rb –voltage and resistance of source ,
Rc-resistance in capacitor, isk- converter input current ,
vc- voltage across capacitor, is- source circuit current,
ic- current through capacitor
Voltage equations at the motor side are:
(4)
(5)
(6)
Where Vsa, Vsb, Vsc are the inverter output voltages that
supply the 3-Ф winding. Va, Vb, Vc are the voltages across
the motor armature winding,Vn – voltage at the neutral
point.
The stator winding voltages in terms of the winding
parameters are expressed as in shorter version
(7)
and the electromotive forces of three- phase windings are:
, where, (E=Ke.ωm) (8)
Equation that links the supply and motor sides
(9)
The Torque balance equation of drive system is expressed
as:
TJ +TD+ TS+TL=Te (10)
Torque due to Inertia, (11)
Where, J – Moment of inertia,
Torque due to viscous friction, (12)
Where, B – Friction coefficient,
The Electromagnetic torque of 3-phase motor is
(13)
The electrical position of the rotor is
) (14)
B. Hysteresis current controller
In the PWM current controller instantaneous
current control is not possible, it acts only once in a cycle.
The current may exceed the maximum limit in between two
consecutive switching. Therefore in PWM controller the
current is controlled on an average basis but not on
instantaneous basis. The Hysteresis current controller
overcomes such a drawback. It controls the current within a
narrow band of excursion from its desired value. The
operation of the hysteresis current controller for the drive is
employed using Embedded Matlab Code. The simulink
model of Hysteresis current controller with reference
currents and actual currents as input is shown in figure 3.
Fig.3 Simulink model of Hysteresis Current Controller
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
416
C. Reference current generator
The reference currents in all the three phases are
implemented in SIMULINK using the Embedded Matlab
code. The simulink model of reference current generator is
shown in figure 4.
Fig:.4 Simulink model of Reference current generator
D. PID Controller
The proportional – integral – derivative (PID)
controller occupied the major portion of the control systems
due to its simple structure and ease of operation. In PID
controller, the proportional, integral and derivative modes
have to be tuned and all the three gains combine together for
the control of the drive system [6]-[9]. The controller
parameters are to be tuned properly to provide reliable
performance. The block diagram of PID controller with
proposed tuning methods are shown in figure 2. R(S) is the
reference input signal, U(S) is the controlled output, Y(S) is
the system output and E(S) is the error, which is the
difference between reference and the actual value. The aim
of tuning the controller parameters is to reduce rise time,
settling time with zero overshoot and without steady state
error.
Fig.5 Optimal PID controller
III. CLASSICAL METHODS
A. Ziegler-Nichols method
Ziegler-Nichols method is popular and the most widely used
method for tuning of PID controllers. This method is also
known as online method. [11][12].
Steps involved Z-N tuning method:
Step 1: Deactivate integral and derivative control, i.e. set
τi=0, τd=0.
Step 2: Raise the gain kc until the process begin to oscillate..
Step 3: Note the values as ultimate gain (ku) and ultimate
period (τu)
Step 4: Evaluate control parameters
The step response of closed loop system with ZN-PID and
without ZN-PID (with Kp=1) is shown in figure 6,
electromagnetic torque is shown in figure 7.
Fig.6 Step response of closed loop system with ZN-PID and without ZN-
PID (with Kp=1)
Fig.7 Electromagnetic Torque with ZN-PID
B. Tyreus-Luyben method
The Tyreus-Luyben tuning method developed by
Tyreus and Luyben in 1997 which is based on oscillations
as in the Ziegler-Nichols method, but with modified
formulas for the controller parameters to obtain better
stability in the control loop compared with the Ziegler-
Nichols method. The Tyreus-Luyben procedure is quite
similar to the Ziegler–Nichols method but the final
controller settings are different. Also this method only
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
417
proposes settings for PID controllers. The step response of
the system with TL-PID and without TL-PID (with Kp=1) is
shown in figure 8 and electromagnetic torque waveform is
shown in figure 9.
Fig.8 Step response of closed loop system with TL-PID and without TL-
PID (with Kp=1)
Fig.9 Electromagnetic Torque with TL-PID
IV. NATURE -INSPIRED ALGORITHMS
A. Particle swarm optimization algorithm
The class of population algorithms such as Particle
swarm optimization, bat algorithms for solving global
optimization problems are often called as Nature-inspired
algorithms. They offer practical advantages to the difficult
optimization problems. These algorithms can be applied to
any virtual problem that can be formulated as an
optimization task. It requires a data to represent solutions, a
performance index to evaluate those solutions and some
operators to generate new solutions. In contrast to the
classical methods nature-inspired algorithms can adapt
solutions to the changing circumstances and gives robust
response to changing circumstances. Particle Swarm
Optimization (PSO) algorithm is a population based
stochastic optimization technique developed for solving
optimization problems. A swarm in PSO consists of a
number of particles. Each particle represents a potential
solution to the optimization task [13]-[14. A fairly useful
performance index is the integral of absolute error (IAE),
and it is expressed in the equation as
IAE= (15)
Where ω(t)ref is reference speed and ω(t)act is actual speed.
IAE integrates the absolute error over time. Therefore, the
design problem can be formulated as the optimization
problem and the objective function is expressed as
(16)
Subjected to constraints
PSO algorithm implementation steps are as follows:
Step 1: Read the system data and initial solution generation
randomly.
(17)
(18)
Step 2: Calculation of fitness value (objective function).
Step 3: Calculate objective function value of each particle in
the population and after comparing , pbest for the current
iteration is recorded:
(19)
Where, k is the number of iterations,
Step 4: Calculation of global best i.e. the best objective
function associated with the pbest among all particles is
compared with that in the previous iteration and the lower
value is selected as the current overall global best.
(20)
Step 5: Update the velocity, by using below equation
(21)
C1 and C2 are the acceleration coefficients usually in range
[1, 2]. A large inertia weight (w) provides a global search
while a small inertia weight provides a local search.
Step 6: Checking velocity constraints occurring in the limits
from the following conditions,
Step 7: update the position of each particle at the next
iteration (k+1) is modified as follows:
(22)
Step 8: After reaching the maximum iteration then go to
step 9 for global best otherwise, go to step 2.
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
418
Step 9: The individual which generates the latest global best
is the optimal PID parameters at minimum objective
function.
The flow chart for the particle swarm optimization
technique for the tuning of PID control parameters is
shown in figure 10.The step response of the closed loop
system with particle swarm optimization tuning of PID
controller is shown in figure 11 and electromagnetic torque
with PSO tuning of PID controller is shown in figure 12.
Fig.10 Implementation flowchart of particle swarm optimization algorithm
Parameter description of PSO algorithm:
Population size P : 20
Number of particles npar : 3
Maximum number of iterations Itermax : 50
Cognitive parameters C1, C2 : 2, 2
Max. Inertia weight factor Wmax : 0.9
Min. Inertia weight factor Wmin : 0.4
Fig.11 Step response of closed loop system with PSO-PID
Fig.12 Electromagnetic Torque with PSO-PID
B. Bat Algorithm
Bat algorithm is another population based
algorithm which exploits echolocation behavior of bats to
find their prey Bats are the second largest order of
mammals. They migrate to hundreds of kilometers. Bat
echolocation is a perceptual system where ultrasonic sounds
are emitted to produce echoes.bat algorithm was proposed
by Xin-She-Xang for for solving engineering optimization
problems [15-16].
Steps for implementation of Bat algorithm:
Step 1: initialize the algorithm parameters such as
dimension of the problem, population size and number of
maximum iterations (Itermax).
Step 2: generation of PID gains randomly
pop
d
pop
d
poppop
pop
d
pop
d
poppop
dd
dd
xxxx
xxxx
xxxx
xxxx
X
121
11
1
1
2
1
1
22
1
2
2
2
1
11
1
1
2
1
1
(23)
Where, d is the number of decision variables, which
represents PID gains,
Step 3: calculate fitness evaluation using eq.15 and record
the best solution.
Step 4: Starting evolution procedure and frequency for each
Bat is assigned randomly
fi = fmin + (fmax – fmin) β (24)
Where β [0, 1] is a vector drawn randomly from a uniform
distribution. Initially each bat is assigned a frequency
randomly which is drawn uniformly from minimum and
maximum values.
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
419
Step 5: generation of bat positions randomly
(24)
(25)
Step 6: evaluation of Fitness (Objective function)
Calculate fitness value for each initial solution using Eq. 16
Step 7: Selection of best solution among initial bats.
Step 8: Stop if the number of maximum iterations is
reached. Otherwise, Step 4 to Step 7 is repeated.
The problem specific implementation flow chart of bat
algorithm has been given in figure 13.
.
Fig.13 Implementation flow chart of Bat Algorithm
Parameter description of Bat algorithm:
Population of bat pop : 20
Dimensional search space of bats N : 6
Loudnes A : 0.5
Pulse rate R : 0.5
Minimum frequency fmin : 0. 00
Maximum frequency fmax : 2. 00
Max.no of iterations Itermax : 50
The step response of the closed loop system with BA-PID is
shown in figure 14 and electromagnetic torque response is
shown in figure 15.
Fig.14 Step response of closed loop system with BA-PID
Fig.15 Electromagnetic Torque response with BA-PID
The comparison of step responses of classical tuning
methods are shown in figure 16, small oscillations can be
observed in classical methods of tuning. Step responses of
nature-inspired algorithms are shown in figure 17 without
oscillation and overshoot. The actual speed of the motor
tracks the reference speed with minimum disturbance and
quickly settled at reference speed without delay with the
population algorithms. These algorithms effectively tune the
control parameters under sudden load changes and abnormal
conditions. The step responses of all methods are shown in
figure 18. The electromagnetic torque responses are shown
in their respective sections. The step response of the PSO-
PID at rated speed of 700 rpm is shown in figure 19. The
step response of PSO-PID with step change in reference
speed and when subjected to a load torque at 0.5 seconds is
shown in figure 20.
Fig.16 Step response of closed loop system with TL-PID, ZN-PID
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
420
Fig.17 Step response of closed loop system with BA-PID, PSO-PID
Fig.18 Step response of proposed tuning methods
Fig.19 step response of PSO-PID at rated speed of motor
Fig.20 step response of PSO-PID with step change in reference speed and
subjected to load torque at 0.5 seconds
Table.1 Performance Parameters of ZN-PID, TL-PID, PSO-
PID, BA-PID
Controller
Parameter
ZN-PID TL-PID BA-PID PSO-PID
Kp 2.25 1.704 0.3484 1.4891
Ki 4.444x103 1721.76 4.883 3.9750
Kd 0.056x10-3 1.217x10-4 0.0002 0.0007
Peak time(tp) 0.0035 0.0033 0.0131 0.0067
Rise time (tr) 0.0035 0.0032 0.0091 0.0028
Settling time(ts) 0.0041 0.0045 0.0133 0.0066
Delay time(td) 0.0016 0.0015 0.0017 0.0016
Max.peak
overshoot(Mp)
0 0.29 0 0
Steady state
error(ess)
0.85 0.81 0.20 0.03
The motor drive used for simulation process has following
specifications:
Motor rating : 0.5 HP
Number of Poles : 4
Inductance : 0.0272H
Back emf constant : 0.5128V/rad/sec
Torque constant : 0.49 N-m/A
Moment of inertia : 0.0002 kg-m/s2
Rateds speed : 700 rpm
DC voltage : 160V
Frequency : 2kHz
CONCLUSION
In this paper the nature-inspired algorithms are
proposed to search the PID controller parameters for the
speed control of BLDC motor and compared with the
classical methods. The overall control system has been
modeled and simulated in MATLAB/SIMULINK. Several
time domain parameter performance measures such as rise
time, peak time, delay time, settling time, peak overshoot
and steady-state error of nature inspired algorithms are
compared with classical methods. The results obtained from
the simulations clearly demonstrate the improved
performance with the nature inspired algorithms particularly
particle swarm optimization algorithm when the system
subjected to sudden loads and with the sudden change in
reference speed. Since nature-inspired algorithms exhibits
robustness and good performance, these are ideal for the
speed control of brushless direct current motor.
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
421
REFERENCES
[1] Chenjun Cui, Gang Liu, Kun Wang, and Xinda,
‘Sensorless Drive for High-Speed Brushless DC motor’:
IEEE Transactions on Power Electronics, Vol. 30, No. 6,
June 2015.
[2] Tae-Hyung Kim and Mehrdad Ehsani, ‘Sensorless
Control of the BLDC Motors From Near-Zero to High
Speeds’, : IEEE Transactions On Power Electronics, Vol.
19, No. 6, November 2004.
[3] Alin ¸ Stirban, Ion Boldea and Gheorghe-Daniel
Andreescu ‘Motion-Sensorless Control of BLDC-PM
Motor With Offline FEM-Information-Assisted Position
and Speed Observer’, IEEE Transactions On Industry
Applications, Vol. 48, No. 6, November/December 2012.
[4] SriLatha Eti, N. Prema Kumar ‘closed loop control of
BLDC motor drive using adaptive fuzzy tuned PI
controller’International journal of Engineering research
and applications. [5] S.V. Konstantinov, A.A.‘Baryshnikov comparative
analysis of evolutionary algorithms for the problem of
parametric optimization of PID controllers’, Elsevier
procedia Computer Science 103 ( 2017 ) 100 – 107.
[6] Juniku and P. Marango ‘PID design with bio- inspired
intelligent algorithms for high order systems’, vol. 9, pp.
44–52, 2015.
[7] Z. Jinhua, Z. Jian, D. Haifeng, and W. Sun, ‘Self-
organizing genetic algorithm based tuning of PID
controllers’, Inf. Sci. (Ny)., vol. 179, no. 7, pp. 1007–
1018, 2009.
[8] R. Jan, C. Tseng, and R. Liu ‘Robust PID control design
for permanent magnet synchronous motor’,: A genetic
approach,” vol. 78, pp. 1161–1168, 2008.
[9] C.L.Lin, H.Y.Jan, Evolutionarily multiobjective PID
control for linear brushless DC motor, in: Proc. of IEEE
Int. Conf.Industrial Elect. Society (3) Nov. 2002, pp.
2033-2038.
[10] Mahdi Mansouri, Hr. Aghay Kaboli,Jalil
Ahmadian,Jeyraj Selvaraj ‘Hybrid Neuro-Fuzzy - P.I.
Speed Controller for B.L.D.C. Enriched with an Integral
Steady State Error Eliminator’, : 2012 IEEE International
Conference on Control System, Computing and
Engineering, 23 - 25 Nov. 2012, Penang.
[11] P. M. Meshram ,Rohit G. ‘Kanojiya,Tuning of PID
Controller using Ziegler-Nichols Method for Speed
Control of DC Motor’, : IEEE- International Conference
On Advances In Engineering, Science And Management
(ICAESM -2012) March 30, 31,2012 117.
[12] N. Yadaiah1, SMIEEE and Srikanth Malladi ‘An
Optimized relation between Ti and Td in Modified
Ziegler Nichols PID controller Tuning’ : 2013 IEEE
International Conference on Control Applications (CCA)
Part of 2013 IEEE Multi-Conference on Systems and
Control Hyderabad, India, August 28-30, 2013.
[13] Ker-Wei, Yu, Shang-Chang Hu, ‘An application of AC
servo motor by using particle swarm optimization
base,sliding mode controller’, : Proceedings of IEEE
Conference on Systems, Man and Cybernetics(5), 8-
11October 2006, pp. 4146-4150.
[14] L. Gao, H. Gao, C. Zhou ‘Particle swarm optimization
based algorithm for machining parameter optimization’, :
Proceedings of the 5th World Congress on Intelligent
Control and Automation(4) June 15-19, 2004, pp. 2867-
2871.
[15] Nitish Katal, Parvesh Kumar, Dr. Shiv Narayan, Optimal
PID Controller for Coupled-Tank LiquidLevel Control
System using Bat Algorithm’, : 978-1-4799-5912-
9/14/$31.00 ©2014 IEEE.
[16] K. Premkumar a, B.V. Manikandan,‘Bat algorithm
optimized fuzzy PD based speed controller for brushless
direct current motor’:Engineering Science and
Technology, an International Journal 19 (2016) 818–840.
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 12, Number 1 (2017) © Research India Publications. http://www.ripublication.com
422