You are on page 1of 6

IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 639

Modeling and PID Control of the Brushless DC


Motor with the help of Genetic Algorithm

Prof. S.Srikanth. Author and Mr. G. Raghu Chandra. Author


Electrical & Electronics Engineering
BYC Engineering College, Odalarevu, INDIA
raghuchandhra@gmail.com

Abstract- Brushless DC (BLDC) motors are widely used for motor, section 3 explains the design of PID controller using
many industrial applications because of their high efficiency, high Ziegler-Nichol's (ZN) method, section 4 gives brief overview
torque and low volume. The aim of this research is to develop a of GA, section 5 briefly illustrate the design of PID controller
complete model of the BLDC motor and to design an using GA method, section 6 presents the comparison between
optimal controller for its position control. Generally PID the results obtained by the GA and ZN method and finally,
controller is used for many control problems because of its section 7 concludes the paper.
simple structure and easy implementation. However in
practice, we often do not get the optimum performance with the
II. MATHEMATICAL MODELING
conventionally tuned PID controllers. For this purpose, Genetic
Algorithm is proposed as a global optimizer to find the
Fig. I shows the basic building blocks of BLDC motor and its
optimized PID gains for position control of BLDC motor.
The efficiency of this method is compared with that of
Driving circuitry.
traditional method. Simulation results showed that PID
control tuned by GA provides more efficient closed loop j---------------------.-------------------------,•
.
riALL 5f.MOR5{A eel
response for position control of BLDC motor. The modeling,
control and simulation of the BLDC motor have been done
using the software package MATLAB/SIMULINK.

Keywords- Brusltless DC motor, PJD control, Genetic


algorithms, Pulse Width Modulation. UHIVINb
CIRCUIT

I. INTRODUCTION

BLDC motors are very popular in areas which need high


performance because of their smaller volume, high force, and
simple system structure. In practice, the design of the
BLDCM drive involves a complex process such as modeling,
control scheme selection, simulation and parameters tuning etc.
An expert knowledge of the system is required for tuning the
controller parameters of servo system to get the optimal
performance. Recently, various modern control solutions are
proposed for the optimal control design of BLDC motor [1][2].
However, these methods are complex in nature and require
excessive computation. In contrast, PID control provides a
simple and yet effective solution to many control problems [3].
Although PID controllers have a simple structure but it is
quite challenging to find the optimized PID gains. The
continuing performance improvements of computational
systems have made Genetic Algorithm (GA) appropriate for
Fig_ 1. Block diagram of BLDC Motor
finding global optimal solution for control system such as the
search of optimal PID controller parameters [4][5].
The Y -connected, 3-phase motor with 8-pole permanent
In this paper, extensive modeling of a BLDC motor and
magnetic rotor is driven by a standard three phase power
GA-based PID scheme is proposed for its position control. The
convertor. The motor specifications are given in Table I.
paper is organized in the following manner. Section 2 describes
mathematical modeling and the driving circuitry of BLDC

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.
IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 640

TABLE I BLDC MOTOR SPECIFICATIONS B. Mechanical subsystem


Number of Poles 8
A mathematical relationship between the shaft angular
Stator resistance 0.0905 ohms
velocity and voltage input to the DC brush less motor is derived
Stator inductance 0.115 mH using Newton's law of motion [6].
Rated Torque 50 Nm
dro
Rated speed 140 deg/sec J -'-= Te - TIII - Fro, (2)
Bandwidth 6-8 Hz dt
Supply voltage 28 V
The angular position is obtained from an integration of the
Nominal current llA

f
angular velocity.
Sampling period 10 J.lS
Friction constant 0.0001 Kg-m s/rad s, = ro,dt (3)
2
Motor moment of inertia 0.000018395 Kg-m s /rad

Generated electromagnetic torque for this 3-phase BLDC


Driving circuit consists of Reference Current Generator, motor is dependent on the current, speed and back-EMF
PID controller, PWM current controller and MOSFET based waveforms, so the instantaneous electromagnetic torque can be
three phase Power Converter. Fig. 2 shows the complete represented as:
Simulink model of three phase BLDC motor with its 1 .
controlling and driving circuitry. The detailed description of Tem =-(e a I a +ebib +e i ) (4)
the major blocks of BLDC motor is mentioned below. rom cc

,mDELING ,\1\0 COTIROL OF BLOC MOTOR C. Description of driving circuitry


Driving circuitry consists of three phase power convertors as
shown in Fig. 3, which utilize six power transistors to
energize two BLDC motor phases concurrently. The rotor
position, which determines the switching sequence of the
MOSFET transistors, is detected by means of 3 Hall sensors
mounted on the stator.

Fig. 2. Simulink model of BLOC motor

A. Electrical subsystem
The electrical part of DC brushless motor and relationship
between currents, voltage, and back electromotive force and
rotor velocity is derived using Kirchhoff's voltage law [6]:

Fig. 3. Three phase Power Convertor


di a di di
v = R a i a +L _ +M b _b +M e _c +ea
a a
d t a d t a dt By using Hall sensor information and the sign of reference
current (produced by Reference current generator), Decoder
dib di di e
Vb-- Rb1' b+L b-+ Mb a - a +Mb -+ P (1)
block generates signal vector of back EMF. The basic idea of
d t d t e dt ?J running motor in opposite direction is by giving opposite
current. Based on that, we have Table II and Table III for
di e di a di
Vc = Rc1· C +L c-+ M -+ M b b +e calculating back EMF for Clockwise and Anticlockwise
dt ca dt c dt c direction of motion as shown below:

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.
IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 641

TABLE II CLOCKWISE ROTATION voltage is less than the reference voltage, control signal is set to
Hall Hall Hall
EMF A EMF B EMF C one for t = 2T" where Ts is sampling time. In other case control
Sensor A Sensor B Sensor C signal is set to zero. In this way a pulse width modulated
0 0 1 0 -1 1 (PWM) signal having fixed frequency with variable duty cycle
0 1 0 -1 1 0 is obtained. This PWM signal is then mUltiplied with the output
0 I I -I 0 I from gate logic to drive three phase Power Convertor.
I 0 0 I 0 -I
I 0 I I -I 0
1 1 0 0 1 -1

TABLE ID ANTICLOCKWISE ROTATION


Hall Hall Hall
EMF A EMF B EMF C
Sensor A Sensor B Sensor C
0 0 1 0 1 -1
0 I 0 I -I 0
0 1 1 1 0 -1
1 0 0 -1 0 1
1 0 1 -1 1 0
I I 0 0 -I I
Fig. 5. Current Control Block

The gate logic to transform electromagnetic forces to the 6


III. DESI GN OFPID CONTROLLER USING ZIEGLER NICHOL S
signal on the gates is given below:
METHOD

TABLE IV GATE LOGIC


A PID controller is designed using the Ziegler-Nichols
EMF A EMF B EMF C QI Q2 Q3 Q4 Q5 Q6
fTequency response method [7]. The discrete time PID
0 0 0 0 0 0 0 0 0
controller is defined as:

-I

-1
-I

0
I

1
0

0
0

1
0

0
I

0
I

1
0

0
t5
c
=K
P
(1+ I:= +T
7; (.:;-1) d
=-l)e
Ts
(5)

I 0 -I I 0 0 0 0 I
The gain tuning of PID is done by increasing the
proportional gain until the system oscillates; that gain is KII• At
I -I 0 I 0 0 I 0 0
this instant, time interval is measured between peaks to get Til"
Table V gives approximate values for the controller gains.
In Reference current generator block as shown in Fig. 4,
PID controller attempts to minimize the difference between TABLE V. T HE ZIEGLER-NICHOLS RULES (FREQUENCY RESPONSE
METHOD )
desired angle and the actual measured angle by taking a
corrective action to generate reference current signal. Direction Controller Kp T; Td
of rotation is based on the sign of that reference current.
PID 0.6 x /(" Tn 12 T,,12

From the above algorithm the step response of the system is


shown in Fig. 6.

: .J
Step Response
1.6 ,-----,---
- =----,-
-----,------,--�---,----___,
-- -----____,
,

14 ______ .m ______m ______m ------m _


- -_-_- ��f��7;�t
1.2:
i
..........-ji-. .... .. i
r :::1
� 1!
.
.� ..... .... � .......... � .......... � ..........

.. .
f ::;.: : : : :t
.... .... . ..
Fig. 4. Reference Current Generator Block
, .......... , ....
In current control block shown in Fig. 5, the reference
o�_� .....
current from current generator is transformed to reference
voltage signal by using Ohm's law (Vre! = ire! R). This reference -0.2 ' .......... , .......... , .......... , .......... , .......... , .......... , .......... , ....
o 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
voltage is then compared with the measured voltage across Time [sec]

control resistance Rc, where Rc=O.OJrL When the measured Fig. 6. Step response

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.
IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 642

TABLE VI CONTROLLER PERFORMANCE by Absolute Error (ITAE), Integral of Absolute Magnitude of


Ziegler Nichols Method the Error (IAE), and Integral of the Squared Error (ISE) [4]. An
Kp
integral Absolute Error (IAE) criterion is used in this paper for
2400
calculating performance index of controller as mentioned
Ti 0.02 below.

f e(t)dt
Td T
0.005
Overshoot 54%
IAE =
(6)
o
Rise Time 0.03 sec

Settling Time 0.09 sec Where T = 1 sec.

C The fitness values


Above analysis depicts that the system response is not
optimum. In order to achieve better performance, GA approach Objective is to minimize the value of performance index.
is used to find the optimal values of PID gains. The fittest chromosome will be the one which has smallest
value of that performance index [5], so we can define fitness
IV. OVERVIEW OF GENETIC AL GORITH M value as

Genetic algorithms try to imitate the properties of natural Fitness value = ------
(7)
selection and natural genetics. It begins with initial population
Performancelndex
that consists of coded strings of binary numbers, called
chromosomes that hold possible solutions of the problem. Their D. Termination Criteria
performance is evaluated by a fitness function. Strings with Termination of algorithm takes place when the value of the
higher fitness value are likely to survive to the next generation fitness function for the best point in the current population is
as parents. It uses three operators namely selection, crossover less than or equal to fitness limit and the change in the value of
and mutation to produce next generations. This procedure is fitness function is less than function tolerance. The best
repeated until it finds the optimal solution to the problem. member of the population was selected and plotted in the
graph. The variation of the PID parameters Kp, Tj and Td are
V. TuNING OFPID CONTROLLER USING GENETIC shown, respectively, in Fig. 7 to Fig. 9.
ALGORITH M ApPROACH
5000 ����-�-�-�-�-�-�-�
The values of the PID controller parameters Kp, Tj and Td
are optimized using GA to ensure optimal control performance.
The steps involved in evaluating best possible controller gains 4000 i
are listed below:
:
':::c:.0..3000 ----------
A. initialization of Parameters
To initialize GA, we have to define certain initial 2000:
• • •
---------- ---------------------- -----------,

. . . j
parameters. The performance of the designed controller
depends heavily on how well we assigned the values to these 1000: --------- - ---------- ----------- ---------_ ----------_ _---------_ _----------

parameters. Parameters with their assigned values are listed o 10 20 30 40 50 60 70 80 90


below: Generation
TABLE VII INITIALIZATION PARAMETERS Fig. 7. Kp convergence
Generations 100
Population size 30 15 ,�-�-�-�-�-�-�-�-��

Bit length of the considered chromosome 6


Maximum number of generations 0.8
10 � ---------- -----------,

Selection method Arithmetic Crossover


Crossover probability 0.8
Mutation type Uniform mutation
Mutation probability 0.05

o :���-�-�-�-�-�-�-�-�
B. Objective Function for the GA o 10 20 30 40 50 60 70 80 90
To calculate the fitness of each chromosome, selection of Generation
objective function is very critical. The objective functions are
Mean of the Squared Error (MSE), Integral of Time multiplied Fig. 8. � convergence

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.
IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 643

It is apparent from the above step response that the


·3
10 X controller performance with GA optimized gains is quite
10 �--�--�-----. efficient as compared to the response obtained from ZN
method. The comparison of results in term of rise time, settling
time and overshoot are listed in table below:

TABLE IX PERFORMANCE COMPARISON

2400 4200
Ziegler Nichols Method Genetic Algorithm Method

0.02 7
Kp

T
i 0.005 0.007142
10 20 30 40
Generation
50 60 70 80 90 T
d 54% 1%
0.03 0.03
Overshoot Less than
9. Td convergence
0.09 0.051
Fig. Rise Time sec sec

It is evident from the results that the best particle has an Settling Time sec sec
excellent convergence before reaching generation limit. The
plot of the error, which is based on IAE criterion for all
iterations, is shown in Fig. 10. Apart from step response, various simulations are carried
out in which sinusoidal and square waves having various
!
400O
amplitude and frequencies are applied. Performance
3800- ----------,- - - - - - - - - - - �- - --,-- ----------,-- ----------;-----------,- - -----,----
comparison of GA optimized controller with the controller
__________ _ 1 - -.. - ---------�- ---------- ______1 __
tuned by ZN method from various simulations are shown in
3400 � Fig.12 to Fig. I S.
W
3200 �
g; 3000 � 4 --------,---,

2800 �
3
2600 �
2400 � 2
............•................-
...-
...-:-.�-
.. -...;--...;--
!
2200
o
L
10
L
20 30 40 50 60 70 80 90

Generations

� .
Fig. 10. JAE convergence 5

f -1·
ft! :
PID parameters acquired after GA optimization are listed
below:
-2·· ·
TABLE VIII.

I :i
OPTIMIZED GAIN USING GENETIC ALGORITHMS

4200 I :d0071429 I ..
Kp -3f-

-4 .
o 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Time [sec]
VI. SIMULATION RE SULTS AND CO MPARISON
Fig, ]2, Sinusoidal response 3deg at 5Hz
With optimized PID gains using GA, the step response of
8 __ __ __ ____ __ __ __----,_------------,

the controlled system is shown in Fig. 11 along with the -- -- -- -- -- -- - - - - Reference


response obtained from ZN method: 6 :·
Step Res ponse

!
-
1.6�--�,,� :----� --�--�--�-,_ __-_-R-ere
- -- ---- -,
- -ce
- '-en 4
............. .

::: : : : : U\::;: : : : : : : : : : : : : :� ����u��:�


- - -
_ . ___ __ ___

t,
g'�

}ft!
; .. . . ,-_
--
0
a.

-2 i ·

-4

-6

-8 ........... .................... : .................... ......... . ..


o 0,1 0.2 0,3 0.4 0,5 0,6 0,7 0,8 0,9
Time [sec] Time [sec]

Fig, 11. Performance comparison Fig, ]3, Sinusoidal response 6 deg at 3Hz

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.
IEEE - International Conference On Advances In Engineering, Science And Management (ICAESM -2012) March 30, 31, 2012 644

REFERENCES
- - - -Reference

•; :;
----� - --------+ ---------! - - - -ZN Output
[1] N. Hemati, 1. S. Thorp, and M. C. Leu, " Robust nonlinear control of
" --GAOutput
I' Brushless dc motors for direct-drive robotic applications," IEEE Trans.
....... .. 1. -
- ---- -
Ind. Electron., vol. 37, pp. 460-468, Dec 1990.
I: ,
[2] P. M. Pelczewski and U. H. Kunz, 'The optimal control of a constrained
drive system with brushless dc motor," IEEE Trans. Ind. Electron., vol.
37, pp. 342-348, Oct. 1990.
[3] K. Ang, G. Chong, and Y. Li, "PID control system analysis, design, and

,- -------\, -r' - ,
technology," IEEE Trans.Control System Technology, vol. 13, pp. 559-

f -----, --------t, �:
576, July 2005.

:
-- - ------ + ------�-!­ ----- - : -- -- ________ ',�.: [4] T. O" Mahony, C J Downing and K Fatla, " Genetic Algorithm for PID
,: Parameter Optimization: Minimizing Error Criteria", Process Control
----�
, �'
-------'�� �} II
-----� ---------! ---------�- ---------� ---------!

and Instrumentation 26-28 July 2000, University of Stracthclyde, pg

�':--:-'- -, .2-----:0. -----0"'-: .5:------::-0.'::-6 ---::'O.c:::-7----,O:-'-.8:------O.-'-::-, 9------'


:- '::- 3--:-' 0.4
148- 153.

8 [5] David E. Goldberg, Genetic Algorithms in Search, Optimization


- O .1-,-------
- O-'-::
and Machine Learning. The University of Alabama, Addison­
Time Isecl Wesley Publishing Company Inc, 1989.
[6] Atef Saleh Othman AI- Mashakbeh," Proportional Integral and
Fig. 14. Square wave response 3 deg at 5Hz
Derivative Control of Brushless DC Motor", European Journal of
Scientific Research 26-28 July 2009, vol. 35, pg 198-203.
[7] Ziegler, J. , and Nichols, N. , "Optimum settings for automatic
contro[(ers", Transations of A S ME, 64, pp.759-768, 1942.

,' !

- - - -
__
-\
___ _

\'
!
-10� O-: .1:------:
0 ----� 0�.2 :- -� 0.�3 �O�.4:------:
0�.5:- -�. 0 6�----O�.-: 7:- -----:
0.�:- 8 -0�.9:--�
Time Isecl

Fig. 15. Square wave response 6 deg at 3Hz

It is clear from Fig. 12 to Fig. IS that the controller


designed with ZN method has high overshoots as was observed
in the step response, while the controller with GA optimized
gains precisely follows the input signal. Fig. 14 and Fig. IS
depict that the response of ZN method appears sinusoidal
against square wave input. The reason is that the controller was
still in its transient state when the next pulse is arrived.

VII. CONCLUSION

In this paper, modeling of three phase BLDC motor and its


optimized PID position control design using GA is presented.
Comparative study is carried out in which the response of GA
based controller is compared with the controller designed using
ZN method. It is obvious from simulation results that the
controller performance with GA optimized gains is much more
efficient than the ZN method in terms of rise time, settling
time, overshoot and set point tracking. However ZN method is
good for providing the starting values of PID gains for GA
optimization. Hence it can be concluded that GA provides an
efficient controller tuning methodology for obtaining improved
and accurate performance of a system.

ISBN: 978-81-909042-2-3 ©2012 IEEE

Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on June 05,2022 at 00:17:53 UTC from IEEE Xplore. Restrictions apply.

You might also like