Final Project Report
Final Project Report
USING PI CONTROLLER
Project Report
Submitted in partial fulfillment of the requirements for the award of Bachelor of
submitted by
Anjali A R (TRV19EE013)
Guided by
Prof Julie T S
Dr Mayadevi N
KERALA
December 2022
Declaration
We, undersigned hereby declare that the project report SPEED CONTROL OF
the requirements for the award of degree of Bachelor of Technology of the APJ
represents our ideas in our own words and where ideas or words of others
have been included, we have adequately and accurately cited and referenced the
and integrity and have not misrepresented or fabricated any data or idea or fact
or source in our submission. We understand that any violation of the above will
be a cause for disciplinary action by the institute and/or the University and can
also evoke penal action from the sources which have thus not been properly cited
or from whom proper permission has not been obtained. This report has not been
previously formed as the basis for the award of any degree, diploma or similar
- Gokul Krishna
- Sivaram R Kumar
2
DEPARTMENT OF ELECTRICAL ENGINEERING
THIRUVANANTHAPURAM - 16,
Certificate
the partial fulfillment of the requirements for the award of B.Tech Degree
First of all, we would like to express our deepest appreciation and gratitude to
Engineering Trivandrum for all their guidance and support. We could not have
completed this project if it wasn’t for their constant guidance and advice.
encouragement.
necessary help extended to us during the evaluation process in doing the project
work.
Department of Electrical Engineering, our family members and friends for their
Almighty, without whose help we wouldn’t have reached this far and completed
the work.
Akhil Johnson
- Anjali A R
- Gokul Krishna
- Sivaram R Kumar
Abstract
source inverter. Gate pulses are generated from the output of hall
pulses which control gates. The speed of the motor is adjusted using
Abstract i
List of Figures iv
List of Tables vi
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Literature Review 4
3.1.3 PI Controller . . . . . . . . . . . . . . . . . . . . . . . . . 14
4 Methodology 16
i
4.3 Design of Commutation circuit . . . . . . . . . . . . . . . . . . . 17
5 Software Design 18
6 Hardware Design 24
ii
8 Conclusion 41
References 42
iii
List of Figures
5.2 Simulink model of speed control of BLDC motor using hall effect
sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5.4 Simulink block used to obtain back emf signals from hall effect
signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.5 Simulink block used to obtain gate signals from back emf signals . 23
iv
7.6 torque vs time graph under full load condition . . . . . . . . . . . 32
v
List of Tables
vi
Chapter 1
Introduction
1.1 Background
Conventional motor drives are widely used for residential and commercial
which have higher power conversion efficiency. They are very popular in EV
a better technique for the speed control of BLDC motor is required. A reliable
and efficient controller can be selected for the efficient working of BLDC motor
its simple algorithm and stability. But PI controller cannot be applied for
selection. The PI controller has some drawbacks such as high starting overshoot,
load changes. PWM technique can be used for the speed control of BLDC motor
1
which overcomes these difficulties. This technique has been widely used in power
converter control. PWM control offers a simple method for controlling the analog
The aim of this project is to design and implement a PI controller for controlling
the speed of a BLDC. A BLDC motor working under no load condition maintains
a constant speed throughout its operation. When load is applied a dip in the speed
can be noticed and it will not regain it later. The proposed system along with
the PI controller helps to regain the speed even after the application of load.
1.3 Motivation
Speed control of BLDC motor is very crucial in many applications. When load
is applied a sudden dip in the speed-time graph of the motor can be noticed.
Unless a controller is implemented the motor will not gain the speed thereafter.
The speed control is required to influence the rotational speed of motors and
machinery. This has a direct effect on the operation of the machine and is crucial
for the quality and the outcome of the work. The proposed system with PI
controller helps the motor to maintain a constant speed throughout its operation
overcome with PWM technique which is more better and simple. Here PWM
2
1.4 Objectives
8.
3
Chapter 2
Literature Review
trial applications. The ability to precisely control the motor’s speed contributes
research has been conducted to develop effective speed control techniques for
accurate speed regulation. The study discusses the design and implementation
of a PID controller and demonstrates its ability to maintain speed under varying
load conditions. The PID control technique provides a simple yet efficient method
Fuzzy logic control is another widely explored method for speed control of
BLDC motors. In [4], the authors propose a PI and Fuzzy Logic Controller (FLC)
approach for speed control. The combination of PI and FLC aims to improve the
4
In [3],the author explores the application of PID control to brushless DC
motors. The authors provide an overview of PID control and discuss its relevance
in regulating motor speed. They propose a PID control algorithm for brushless
promise in speed control of BLDC motors. In [1], the authors propose the use of
an Extended Kalman Filter (EKF) algorithm for speed estimation and control.
the motor speed accurately, enabling effective closed-loop control. The paper
presented. The study assesses the performance and robustness of each approach
Such comparative analyses provide valuable insights into the strengths and
rithms, and machine learning techniques offers new avenues for achieving precise
5
In conclusion, the literature review highlights the extensive research conducted
in the field of speed control for BLDC motors. Various control techniques,
control, optimization algorithms, and machine learning approaches, have been ex-
These advancements provide valuable insights for designing efficient and reliable
6
Chapter 3
source inverter, hall sensors and BLDC motor. PI controller minimizes the error
between the actual output, which needed to be controlled, and the desired output,
which is called the set point. The difference between the reference speed and the
current rotor speed is the error. This error signal is fed as the input to the PI
controller. PI controller uses this error signal to adjust the output voltage of
that the system responds quickly to changes in speed, while the integral term
integral terms, the system can be tuned for optimal performance. The Hall effect
sensor is used to sense the position of rotor and provide feedback to the controller.
Commutation signals are generated using the output from the hall effect sensors.
7
Figure 3.1: Speed Control of BLDC Motor Using PI Controller
using its digital output pins. The duty cycle of the PWM signal is controlled by
adjusting the potentiometer. The Arduino block in the model is used to interface
with the Arduino board and control the digital output pins. The output of the
Arduino block is the PWM signal, which is then fed to the BLDC motor driver to
control the speed of the motor. The BLDC motor driver block is used to interface
with the motor and control its speed based on the duty cycle of the PWM signal.
The input to the BLDC motor driver block is the PWM signal, and the output
is the actual speed of the motor, which can be measured using a speed sensor or
8
Figure 3.2: Speed Control Of BLDC Motor Using PWM Technique
mechanical commutator, they have low maintenance and also have a high power
density, hence makes them ideal for high torque-to weight ratio applications. On
comparing with induction motors, they have lower inertia which leads to faster
dynamic response to reference commands. BLDC motors are more effficient due
chronous motors with trapezoidal back emf waveform. In the current control
loop PI controllers are used. There are two types of permanent magnet BLDC
motors. The BLDC motor has a trapezoidal back emf waveform. Another one is
that with sinusoidal back emf waveform called as permanent magnet synchronous
motor (PMSM).
9
Figure 3.3: Disassembled View of a BLDC motor
The stator windings of BLDC motors are similar to those used in polyphase
permenant motors. Unlike other motors the rotor of BLDC motors are permanent
magnents and has a fixed stator winding. Three seperate voltages are fed to the
contact with commutator on the rotor in order to form an electric path between
a DC electric source and rotor armature windings. But, BLDC motor employs
electrical commutation with permanent magnet rotor and a stator with a sequence
of coils. In this motor, permanent magnet which is the field pole, rotates and
the current carrying conductors stay fixed. The armature coils are switched
position. This is made possible in such a way that armature field is in space
quadrature with the rotor field poles. Hence due to the force acting on the rotor
it begins to rotate. Hall effect sensors or rotary encoders are most commonly used
to sense the position of the rotor in BLDC motors. These sensors are positioned
The rotor position feedback from the sensor helps to determine when to switch
10
are eliminated because of this electronic commutation. Hence more reliable and
less noisy operation is achieved. Due to the absence of brushes, BLDC motors are
capable to run at high speeds. The efficiency of BLDC motors is typically around
to 80 percent.
DC motor, i.e., the Lorentz force law. The law states that, whenever a current
of this reaction force, the magnet will experience an equal and opposite force. In
case of a BLDC motor, the current carrying conductor is stationary while the
permanent magnet moves. When the stator coils are electrically switched by a
the air gap. Since the source of supply is DC, switching makes to generate an AC
voltage waveform with trapezoidal shape. The rotor continues to rotate due to the
windings are energized as North and South poles, with the switching of winding
as High and Low signals. The permanent magnet rotor with North and South
and repulsion forces between the poles of permanent magnets. Thus the motor
on the switching sequence around the coils. The hall-effect sensors gives shaft
position feedback to the electronic controller unit. Based on this signal from
the sensor, the controller decides particular coils to energize. Hall-effect sensors
generate Low and High level signals whenever rotor poles pass near to it. These
11
3.1.2 Voltage Source Inverter
There are many applications which requires a wide range of speed and torque
control for the electric motors. The DC machine fulfils these requirements, and
and brushless permanent magnet motors do not have brushes, and their rotors
maintenance. This also increases the power-to-weight ratio and the efficiency.
A voltage source inverter (VSI) is interfaced between the DC source and the
motor. The inverter is operated in the 120° conduction mode, with only two
Figure 3.4: Voltage Source Inverter Used in 120 degree Conduction Mode
The flat portion of the trapezoidal back EMF waveform is 120° and hence
square-wave currents are forced in this region to produce torque. To achieve this,
the rotor position has to be sensed and is required for every commutation instant.
12
Figure 3.5: Ideal current, back-EMF and line voltage difference waveforms of a
VSI fed BLDC motor drive
Voltage source works in 120 degree conduction mode based on the switching table
However, due to the poor ambience in the bore-well, a hall-effect position sensor-
based control of BLDC motor is very unreliable. In the proposed control scheme,
a position sensorless algorithm is used for the commutation of the motor without
the need of a hall-effect position sensor. A sensing circuit is used to obtain the
on the indirect sensing of the phase back-EMF for determination of the exact
13
commutation instants. The three phase voltages of a BLDC motor are given as:
(3.1)
resistance, inductance, and back-EMF, respectively. The line voltages are given
as:
(3.2)
These line voltages are further subtracted to obtain the line voltage differences.
Hence, the difference of line voltages Vab and Vbc are given as:
(3.3)
It is assumed that the currents in the phases a and c are equal and opposite.
i.e., ia = -ic . Because the current in phase B is zero. It is evident that the line
voltage difference gives the amplified and inverted value of phase b back-EMF
in the shaded region. Similarly, the zero crossings of phase a and c are obtained
3.1.3 PI Controller
14
The control output of a PI controller is calculated using the following equation:
(3.4)
where u(t) is the control output at time t, Kp is the proportional gain, which
determines the strength of the proportional action. e(t) is the error, calculated
as the difference between the desired setpoint and the measured process variable.
KI is the integral gain, which determines the strength of the integral action.
correct the immediate deviation from the setpoint. A higher Kp value increases
helps to eliminate steady-state errors and address any systematic biases in the
system.The integral continuously accumulates the error and drives the control
controller. The gains should be chosen based on the characteristics of the system,
such as its dynamics, response time, and stability requirements. Trial and error
15
Chapter 4
Methodology
Designing a Voltage Source Inverter for the speed control of a BLDC motor
current, and speed control range for the BLDC motor is considered along with
the desired control accuracy, response time, and system efficiency.A three-phase
that have the necessary voltage and current ratings for the motor are selected.
Power losses, thermal factors and switching speed have to be considered while
selecting the power components. A gate driver circuit to provide proper voltage
and current levels to switch the power devices efficiently is designed. The gate
drive voltage, gate resistance, and gate drive current requirements are considered
The desired speed control objectives, such as speed accuracy, response time,
16
speed response and stability is choosen. The integral gain Ki should be chosen
In a BLDC motor the motor phases are commutated to achieve rotation. The
phases at the correct moments are determined. Commutation tables are used to
generate commuation signals. The commutation tables are reduced using K-map
and the digital circuit for generating the appropriate commutation signals are
realised.
17
Chapter 5
Software Design
In this project a Proportional and Integral (PI) controller is used as the speed
controller. The actual and reference speed of the motor is compared and the
error is passed to the PI controller to generate the current reference. This current
reference is further fed to the current controller for controlling the current.
After that, the motor is unable to return to its initial speed. Then, a motor with
tuning method. The Ziegler-nichols approach is widely used for tuning P, PI,
and PID controllers. The integral and differential gains are initially set to zero
in this procedure, and the proportional gain is subsequently increased until the
18
and fo is the oscillation frequency. In order to set the integral and differential
gains as a function of fo , the approach first backs off the proportional gain by
gain. The system becomes unstable if the proportional factor is too high and will
not be able to reach the set point if it is too small. So the proportional factor
controller the proportional action increases the loop gain and makes the system
less sensitive to system parameter variations. The integral action eliminates the
The speed control of the motor is achieved using PI controller. The speed
motor at every instant is measured the difference between the rotor speed and
the reference is the error. The error is given as the input of the PI controller.
19
5.2 Simulation Details
Figure 5.2: Simulink model of speed control of BLDC motor using hall effect
sensor
The figure 5.1 shows the simulink model of a BLDC motor control drive using
20
5.3 Speed control of BLDC motor drive without
PI controller
Figure 5.3: Simulink model of speed control of BLDC motor without PI controller
21
5.3.1 Back emf Determination Circuit
Figure 5.4: Simulink block used to obtain back emf signals from hall effect signals
In figure 5.2 hall effect signals from the motor are used to obtain back emf signals
22
5.3.2 Gate signal Generation Circuit
Figure 5.5: Simulink block used to obtain gate signals from back emf signals
The voltage source inverter is controlled by the gate signals obtained from the
block shown in figure 5.3.The gate signals are obtained from back emf signals
23
Chapter 6
Hardware Design
24
6.2 Design of Voltage Source Inverter
Selection of MOSFETS
Rating of the motor selected is 24V,350W therefore the Current rating of the
motor is equal to 15A. The drain current of a mosfet determines which mosfet
should be used. The drain current of the motor selected should be greater than
1.5 times the starting current, where 1.5 is the safety factor.
Here starting current of the motor is 30A. Therefore the drain current of the
selected motor should be greater than 45A. The maximum value of drain current
of a IRF3205 mosfet is 110A when gate source voltage is 10V and temperature is
Gate driver IC’s are selected considering voltage and current requirements,
FAN7392N IC is chosen as the gate driver IC considering all the above mentioned
parameters.
troller
To control the motor operation, the Arduino uses a combination of digital output
pins and the gate driver IC. The gate driver IC controls the gates of VSI and
control the direction and speed of the motor.The digital output pins AA1, AA2,
BB1, BB2, CC1, and CC2 of arduino are connected to the corresponding input
pins of the gate driver, which controls the motor phases. The specific sequence
of turning these pins on and off determines the rotation direction and speed of
the motor.
Analog pins recieves the potentiometer values that determines the delay
25
between each phase change, the speed of the motor can be controlled. A shorter
delay will result in a faster rotation, while a longer delay will slow down the
motor. This method simulates the effect of a PWM signal by controlling the
timing of the motor phases, achieving speed control without directly generating
a PWM signal.
Item Description
BLDC motor 24V,350 W
Mosfet IRF3205
Gate driver IC FAN7392N
Microcontroller ATmega328p
Potentiometer 100kb
26
Chapter 7
out PI Controller
27
7.2 Simulink model of the Proposed System
28
7.3 Results obtained after simulation
troller
The rated speed of the bldc motor is 1850 rpm. When the motor is simulated
under no load the speed of the bldc motor reaches 1850 rpm at the begining but
the speed suddenly dips to a lower value (1700 rpm). The rated speed of the
motor is never regained. The speed of the motor can be regained by using a PI
controller.
29
Under full load condition
Figure 7.4: Rotor speed vs time graph under full load condition
The rated speed of the bldc motor is 1850 rpm. When the motor is simulated
under no load the speed of the bldc motor reaches 1850 rpm at the begining but
the speed suddenly dips to a lower value (1700 rpm). A load of 4 N-m is applied
to the motor at 0.3 seconds the speed of the motor further reduces to 1500 rpm.
The desired speed of the motor is never regained. The desired speed of the motor
30
7.3.3 Electromagnetic torque
A high initial value of rotor torque is observed at the begining. This high initial
value is due to the starting torque of motor. The starting torque of a BLDC
motor is generally 2-3 times of its rated torque. The value of torque decreases to
zero as the motor and remains zero untill the motor is loaded.
31
Under full load condition
A high initial value of rotor torque is observed at the begining. This high initial
value is due to the starting torque of motor. The starting torque of a BLDC
motor is generally 2-3 times of its rated torque. The value of torque decreases to
zero as the motor and remains zero untill the motor is loaded. A load of 4 N-m
is applied at 0.3 seconds the value of torque increases to 4 N-m and remains at
32
7.3.4 Stator Current
A high initial value of stator current is observed at the begining. The starting
current of the motor is generally 1.5 times its rated value. Since the motor is
operated at no load condition the value of stator current decreases to zero. The
value of stator current remains zero untill the motor is further loaded.
33
Under full load condition
A high initial value of stator current is observed at the begining. The starting
current of the motor is generally 1.5 times its rated value. A load of 4 N-m
is applied to the motor at 0.3 seconds as a result the value of stator current is
34
7.3.5 Simulation results obtained using PI controller
The motor runs at its maximum speed of 1850 rpm. Since there is no load on
the motor when it is operating, its speed stays constant at its rated value during
35
Under full load condition
Figure 7.10: Rotor speed vs time graph under full load condition
The speed control of the bldc motor is achieved using a PI controller.The reference
speed given is 1850 rpm.The speed of the motor is measured at real time and the
error value generated is given to the PI controller. The value of integral given 16
and proportonal is 0.013.After simulation the speed obtained was 1850 rpm. A
load of 4 N-m is applied at 0.3 seconds. when the load toque is applied the speed
reduces from 1850 rpm to 1700 rpm.The required speed (1850 rpm) is regained
at 0.31 seconds
36
7.3.7 Electromagnetic torque
A high initial value of rotor torque is observed at the begining. This high initial
value is due to the starting torque of motor. The starting torque of a BLDC
motor is generally 2-3 times of its rated torque. The value of torque decreases to
zero as the motor and remains zero untill the motor is loaded.
37
Under full load condition
A high initial value of rotor torque is observed at the begining. This high initial
value is due to the starting torque of motor. The starting torque of a BLDC
motor is generally 2-3 times of its rated torque. The value of torque decreases to
zero as the motor and remains zero untill the motor is loaded. A load of 4 N-m
is applied at 0.3 seconds the value of torque increases to 4 N-m and remains at
38
7.3.8 Stator Current
A high initial value of stator current is observed at the begining. The starting
current of the motor is generally 1.5 times its rated value. Since the motor is
operated at no load condition the value of stator current decreases to zero. The
value of stator current remains zero untill the motor is further loaded.
39
Under full load condition
A high initial value of stator current is observed at the begining. The starting
current of the motor is generally 1.5 times its rated value. A load of 4 N-m
is applied to the motor at 0.3 seconds as a result the value of stator current is
40
Chapter 8
Conclusion
In this project report the speed control of bldc motor using a PI controller is
speed is observed when a load is applied and it continue to run at a lower speed.
This has been rectified using a PI controller. By using a PI controller the bldc
motor regains its speed. High starting overshoot and sluggish response due to
sudden load changes is observed while using a PI controller. PWM technique for
41
References
1989.
4, 2018.
42