PID and PID-Fuzzy Controllers For BLDC Motor in Electric Vehicles
PID and PID-Fuzzy Controllers For BLDC Motor in Electric Vehicles
Abstract: In present days to obtain the desired characteristics in Electric vehicles, the speed control of electric motor is
necessary. This paper mainly concentrates on the fuzzy logic based closed loop speed control of BLDC motor. As due to
the many advantages of BLDC motor like electronic commutation, high torque production, wide speed range, longer life,
less maintenance, etc gained popularity and been used in Electric vehicles and many industrial process. The BLDC motor
drive with non linear characteristics requires a non linear controller like fuzzy logic controller to tune the PID controller.
The speed of the BLDC motor can be controlled under dynamic load conditions and varying set speed or reference speed
using fuzzy tuned PID controller. The PID-Fuzzy controller shows better performance than conventional PID controller and
fuzzy controller minimizes the drawbacks of conventional PID controller. The results are compared between conventional
PID controller with PID-Fuzzy controller by carrying out the simulation process using MATLAB/SIMULINK software.
Keywords: Electric vehicle (EV), Brushless DC (BLDC) motor, Proportional-Integral-Derivative (PID) controller, Fuzzy
logic controller (FLC).
Exact mathematical model of system is not necessary to
I. INTRODUCTION implement the fuzzy logic and PID controller gains can be
In recent trends Permanent Magnet motors are widely adjusted according to the requirement [5].
been used in electric vehicle (EV), particularly BLDC motor By using PID controller we can control the system only
is the one mostly used due to its various beneficial factors. after the error occurrence but not instantly. In sensor less
BLDC motors also have applications in Robotics, systems, the control becomes very complex and difficult,
Aerospace, Industries, Automotive and many more. Due to also has poor transient response and speed range is very
the ease of speed control and availability of wide speed narrow. Even though the cost of system is very less for the
range the Conventional DC motor are used in electric sensor less control it is not preferred in many of the systems
vehicles but there is problem with brushes like electric due to its drawbacks. Hence the three phases of BLDC
erosion and friction. Hence there is an option for switching motor are excited by the inverter based on the rotor position
to Brushless DC motors which are low in maintenance, which is sensed by the Hall Effect sensors available on the
electronically commutated, wide speed ranges, high torque stator of BLDC motor.
and high efficiency, etc. The PID control can be replaced with fuzzy logic
The conventional PID controller provides conventional controller (FLC) [3][4] due to its simplicity and it provides
method for the speed control of BLDC motor which has better efficiency, but it also have demerits like lack of
non-linear characteristics [1]. We can implement PID dimensionality and robustness of the system. With the
controller with simple algorithms and it is robust and are combination of PID and fuzzy logic controller, both the
likely used where we require control on stability [2]. merits can be combined such as speed error can be rectified,
Expertise knowledge is required in order to tune the gains of manual interference can be avoided, robustness of the
PID controller for system control to obtain better system, etc. For a particular speed range using conventional
performance. On the other hand modelling of BLDC motor PID controller we can have the speed control by fixed values
and control technique selection is very difficult and plays the of KP, KD and KI gains. For wide speed range it is not
major role in speed control process. possible to fix these gain values. Hence there is need of
adjusting gains based on the motor speed variation in order current generator and the rotor position information, the
to obtain a better performance. This can be achieved by EMF signals are generated by the decoder block. Table I
implanting PID-Fuzzy controller in a system. Now without shows the logic followed by the Back EMF zero crossing
any manual interference the control gains KP, KD and KI can points. After detecting EMF zero crossing points, these
be updated by using the PID-Fuzzy controller in order to get signals are again passed through another logic circuit for the
and optimised response. generation of the pulses. These pulses are given to the six
switching devices of the inverter in order to control the
II. BLOCK DIAGRAM FOR SPEED CONTROL OF BLDC inverter output. Table II shows the generation of pulses.
MOTOR
The block diagram below shows that it has two loops, TABLE I BACK EMF ZERO CROSSING POINTS
the outer loop and the inner loop. The outer loop is used for DETECTION
speed control and the inner loop is used to provide hall
sensors communication to the inverter circuit. By varying TABLE II SEQUENCE OF INVERTER SWITCHES
the inverter output, the input to the motor can be varied and
Switching states of six switches
the speed can be controlled. The block diagram for speed
control process is shown in Fig 1. Q1 Q2 Q3 Q4 Q5 Q6
error 0 0 0 0 0 0
Reference 0 0 0 1 1 0
Speed Three phase 0 1 1 0 0 0
BLDC 0 1 0 0 1 0
PID inverter motor 1 0 0 0 0 1
1 0 0 1 0 0
Actual
speed Fuzzy 0 0 1 0 0 1
logic 0 0 0 0 0 0
Speed
measurement
Sequence Hall signals at Back-EMF zero crossing
No points
Hall signals Back-emf
Ha Hb Hc Ea Eb Ec
Fig 1. Block diagram indicating speed control of BLDC motor 1 0 0 0 0 0 0
2 0 0 1 0 -1 +1
The position and the speed of the rotor is sensed by the 3 0 1 0 -1 +1 0
hall sensors which are available on the stator of BLDC 4 0 1 1 -1 0 +1
motor. The rotor position is sensed and this information is 5 1 0 0 +1 0 -1
used to provide the sequence for turn ON and OFF of the 6 1 0 1 +1 -1 0
inverter switches and inverter supplies to the BLDC motor. 7 1 1 0 0 +1 -1
The rotor starts rotating when coils on the stator are 8 1 1 1 0 0 0
energized by the supply provided by the inverter to the
III. MATHEMATICAL MODELLING OF BLDC MOTOR
motor which intern produces the required magnetic field.
The speed error can be obtained by comparing the motor
speed from hall sensors with the reference speed. The motor with permanent magnet rotor which has flat
In this speed control process the inverter is controlled toped trapezoidal back EMF wave form is called as
by Back EMF zero crossing detection method. Here the hall Brushless DC motor. BLDC motor is supplied by the
sensors which are 120 degrees apart on the stator give the inverter which has six switches. The inverter supplies for
rotor position. By combining the reference current from the any of the two phases of the motor at a time while leaving
the third phase inactive. The hall sensors which are provided 𝑑2 𝜃𝑚 𝑑𝜃𝑚
on the stator gives the rotor position in order to provide 𝑇𝑒 − 𝑇𝑙 = 𝐽 𝑑𝑡 2 + 𝛽 𝑑𝑡 (11)
information to the inverter circuit about switching sequence 𝜃 = 𝑝⁄2 𝜃 (12)
𝑒 𝑚
of the transistors. The hall sensors are placed 120 degrees 𝑑𝜃𝑚
apart on the stator of the BLDC motor. 𝜔𝑚 = 𝑑𝑡 (13)
The following assumptions are made while modelling the
From equations (1), (2), (3) and (7)
BLDC motor. Considering the inverter switches as ideal,
𝑑(𝑖 −𝑖 )
stator is Y connected, the inductance and resistance of all the 𝑉𝑎𝑏 = 𝑅(𝑖𝑎 − 𝑖𝑏 ) + (𝐿 − 𝑀) 𝑎 𝑏 + 𝑒𝑎𝑏 (14)
phases are equal and not considering the hysteresis losses 𝑑𝑡
𝑑(𝑖 −𝑖 )
and the core losses [6]. 𝑉𝑏𝑐 = 𝑅(𝑖𝑏 − 𝑖𝑐 ) + (𝐿 − 𝑀) 𝑏𝑑𝑡 𝑐 + 𝑒𝑏𝑐 (15)
The electrical equivalent circuit of BLDC motor is
shown in Fig 2. Ignoring the mutual inductances and, ia+ib+ic=0 the above
equations can be rewritten as,
Va R L-M ea
dia R 2 1
= − L ia + 3L (Vab − eab ) + 3L (Vbc − ebc ) (16)
dt
Vb R L-M eb dib R 1 1
= − L ib − 3L (Vab − eab ) + 3L (Vbc − ebc ) (17)
dt
Where K= a, b, c
Vc R L-M ec Vk= voltage of Kth phase of BLDC motor
ik= current of Kth phase of BLDC motor
Fig 2. Electrical equivalent circuit of BLDC motor ek= back Emf of Kth phase
Tk= torque produced by the Kth phase
Representation of electrical and mechanical systems in R= resistance per phase of BLDC motor
form of equations is shown below L= inductance per phase of BLDC motor
M= mutual inductance between phases
𝑑𝑖𝑎 Te= electromagnetic torque produced by motor
𝑉𝑎 = 𝑅𝑖𝑎 + (𝐿 − 𝑀) + 𝑒𝑎 (1)
Ke= Emf constant
𝑑𝑡
𝑑𝑖𝑏 Kt= torque constant
𝑉𝑏 = 𝑅𝑖𝑏 + (𝐿 − 𝑀) + 𝑒𝑏 (2)
ωm= angular speed of rotor
𝑑𝑡
𝑑𝑖𝑐 θm= mechanical angle of rotor
𝑉𝑐 = 𝑅𝑖𝑐 + (𝐿 − 𝑀) + 𝑒𝑐 (3)
θe= electrical angle of rotor
𝑑𝑡
EMF equations for each phases is given below J= moment of inertia of the mechanical system
𝑒𝑎 = 𝐾𝑒 𝜔𝑚 𝐹(𝜃𝑒 ) (4) 𝛽= damping coefficient
𝑒𝑏 = 𝐾𝑒 𝜔𝑚 𝐹(𝜃𝑒 − 2𝜋⁄3) (5) TABLE III which indicates the specifications of the
𝑒𝑐 = 𝐾𝑒 𝜔𝑚 𝐹(𝜃𝑒 + 2𝜋⁄3) (6) BLDC motor used in this experiment.
The electromagnetic torque given by three phases is
𝑇𝑎 = 𝐾𝑡 𝑖𝑎 𝐹(𝜃𝑒 ) (7)
𝑇𝑏 = 𝐾𝑡 𝑖𝑏 𝐹(𝜃𝑒 − 2𝜋⁄3) (8)
𝑇𝑐 = 𝐾𝑡 𝑖𝑐 𝐹(𝜃𝑒 + 2𝜋⁄3) (9)
Total effective torque is given as
𝑇𝑒 = 𝑇𝑎 + 𝑇𝑏 + 𝑇𝑐 (10)
The complete electromechanical system with representation
as equation is given as
TABLE III SPECIFICATIONS OF BLDC MOTOR Here KP, KD and KI are called the Proportional,
Integral and Derivative gain constants respectively, u is
called control signal.
BLDC Motor model 23F-2
The control signal can be given as summation of K P
Wattage 60W time of the error, KD times of the derivative of the error and
DC Voltage 24V KI times of the integral of the error. PID controllers are used
Speed 1500RPM where the simplicity of the controller is required. KP, KD and
Stator phase resistance 2.875Ohm KI are calculated using Zigler-Nicholos method.
Stator phase inductance 8.5Mh
Torque constant 1.4 N-M/A
Rotor inertia 0.8*10-3Kg-m2 Kp Ki Kd
Friction constant 1*10-3 2.35 666.7 0.0015
When the system set point and load are dynamic the
e Ki + fuzzy logic controller helps to provide optimised output
1/S + u using PID controller. Based on the varying reference speed
the fuzzy logic updates the KP, KD and KI values to get the
+ effective output, hence the gain values are determined by the
Kd fuzzy logic controller. There are two inputs to the Fuzzy-
du/dt PID controller those are error and change in error and has
Fig 3. Block diagram of basic PID controller
three variable output KP, KD and α, where KI is given by α.
The gains KP, KD are normalised between 0 and 1 and α has
𝐾𝑖 the range of 1 to 5. The overall simulation model of closed
𝐶(𝑠) = 𝐾𝑝 + + 𝐾𝐷 𝑠 (18) loop speed control of BLDC motor is shown in Fig 5.
𝑆
In this paper Mamdani fuzzy inference system is
𝐾𝐷 𝑆 2 +𝐾𝑝 𝑠+𝐾𝑖
𝐶(𝑠) = (19) considered. Where a set of fuzzy rules are determined, the
𝑠 two inputs are fuzzified using the membership functions at
the input side, establishing the rule strength by mixing
created fuzzy rules with fuzzified inputs, the rule strength
and the output membership functions are brought together to
get consequences, after getting all the consequences the Medium, Negative Small are used in input membership
output distribution is defined and there by defuzzifying the functions which are shown in Table IV, Table V and S, B i,e
output distribution. The Fig 6 shows the process involved in Small and Big are used in output membership functions.
Mamdani fuzzy inference systems. The output value of
Mamdani type is given in the equation (20).
NB B B B B B B B
e(k) NM S B B B B B S
NS S S B B B S S
ZO S S S B S S S
PS S S B B B S S
PM S B B B B B S
PB B B B B B B B
∆e(k)
Fig 6. Illustration of Mamdani type defuzzification
NB NM NS ZO PS PM PB
∫ 𝑢𝑌 (𝑦).𝑦𝑑𝑦 NB S S S S S S S
𝑦= (20)
∫ 𝑢𝑌 (𝑦)𝑑𝑦 e(k) NM B B S S S B B
NS B B B S B B B
𝐾𝑖 = 𝐾𝑝2 ⁄𝛼𝐾𝑑 (21) ZO B B B B B B B
As discussed the Mamdani fuzzy type has two PS B B B S B B B
inputs. The different linguistic variables of the fuzzy logic PM B B S S S B B
set are PB, PM, PS, Z NB, NM, NS i,e Positive Big, Positive PB S S S S S S S
Medium, Positive Small, Zero, Negative Big, Negative
∆e(k)
NB NM NS ZO PS PM PB
NB 2 2 2 2 2 2 2
e(k) NM 3 3 2 2 2 3 3
NS 4 3 3 2 3 3 4
ZO 5 4 3 3 3 4 5
PS 4 3 3 2 3 3 4
Fig 10. Membership function for output Kp
PM 3 3 2 2 2 3 3
PB 2 2 2 2 2 2 2
Fig 17. Speed response using PID at 1500rpm, 3N-m Fig 20. Speed response using PID-Fuzzy at 1000rpm, 5N-m
Fig 18. Speed response using PID-Fuzzy at 1500rpm, 3N-m Fig 21. Speed response using PID at 1500rpm, 5N-m
VI. CONCLUSION
This paper resulted the simulation of closed loop speed
control of BLDC motor using PID and PID-Fuzzy
controllers. Under the condition of varying set point and
dynamic load, the speed of BLDC motor is controlled by the
PID controller whose gains are continuously been updated
by Fuzzy controller for improved performance. By
comparing the simulation results of speed control using
conventional PID controller and the Fuzzy tuned PID
controller, it is observed that the response can reach steady
state faster and the system has less settling time by using the
PID-Fuzzy controller.
REFERENCES
[1]. Vinod KR Singh Patel, A.K.Pandey “Modeling and Performance
Analysis of PID Controlled BLDC Motor and Different Schemes of
PWM Controlled BLDC Motor”International Journal of Scientific and
Research Publications, Volume.
[2]. Atef Saleh Othman Al-Mashakbeh,(2009) ” Proportional Integral and
Derivative Control of Brushless DC Motor”, European Journal of
Scientific Research,(ISSN 1450-216X Vol.35 No.2, pp.198-203).
[3]. ChuenChien Lee, “Fuzzy Logic in Control Systems:Fuzzy Logic
controller–Part1”1990 IEEE. 4. huenChien Lee, “Fuzzy Logic in
Control Systems : Fuzzy Logic controller Part 2” 1990 IEEE
[4]. A.Kiruthika, A.Albert Rajan, P.Rajalakshmi “Mathematical modelling
and Speed control of a Sensored Brushless DC motor using Intelligent
controller” 2013 IEEE International Conference on Emerging Trends
in Computing, Communication and Nanotechnology (ICECCN2013)
[5]. Zhen-Yu Zhao, Masayoshi Tomizuka, and Satoru Isaka, " Fuzzy Gain
Scheduling of PID Controllers” IEEE TRANSACTIONS On Systems,
Man and Cybernetics. Vol. 23, No. 5. September/october 1993.
[6]. R. Krishnan, “Electric Motor Drives : Modeling, Analysis, and
Control,” Prentice Hall, 2001, pp. 577-580.
[7]. T.Saarulatha,V.Yaknapriya,T.Muthukumar3, S.Saravanan,
“Proportional Integral &Derivative Controller For BLDC Motor”
(IJAER) 2014, Vol. No. 8, Issue No. V, November.