BLDC Motor Open Loop Control
BLDC Motor Open Loop Control
BLDC Motor Open Loop Control
Master of Technology
By
Debanjan Datta
18EE61R05
of
November 2019
1
Table of Contents
Chapter 1 Introduction…………………………………………………………………………….3
1.1 Introduction…………………………………………………………………………….3
1.2 BLDC Motor Control………...………………………………………………………...4
1.3 Objective……………………………………………………………………………….4
Chapter 2 Theory of BLDC Motor Control……………...………………………………………..5
2.1 Trapezoidal Commutation…………………………………..………………………….5
2.1.1 Basic Theory of Trapezoidal Commutation……………………………………...7
2.1.2 Six Step Commutation…………………………………………………………...8
2.1.3 Commutation Table……………………………………………………………...9
2.2 Reason behind the name Trapezoidal Commutation......……………………………….10
2.3 Speed Control and PWM Technique …………………………………………………...11
Chapter 3 Experimental Results and Future Scope………………………………………..……….12
3.1 Obtaining the motor data…………………………………………………………….......12
3.2 Micro-controller and Gate Driver Buffer………………………………………………...13
3.3 Inverter Testing………………………………………………………………………..…14
3.4 Verification of the trapezoidal motor control algorithm……………................................15
3.5 Investigations made on the test bench………………………………………………...…15
3.5.1 Speed Control in Open Loop Configuration……………………………………….16
3.5.2 Results obtained from Open Loop Control…………………………………...……17
Speed vs Duty Cycle variation in open loop……………………………..…17
Generator Side Waveforms…………………………………………………17
Motor side back emf…………………………………………………..……18
3.6 Future Scope of the work……………………………………………………………......19
Chapter 4 References…………………………………………………………………………………..20
2
Chapter 1
Introduction
1.1 Introduction
In recent times, electric vehicles (EVs) have received much attention as an alternative to traditional vehicles
powered by internal combustion engines running on non-renewable fossil fuels. This unprecedented focus
is mainly attributable to environmental and economic concerns linked to the consumption of fossil-based
oil as fuel in internal combustion engine (ICE) powered vehicles. With recent advances in battery
technology and motor efficiency, EVs have become a promising solution for commuting over greater
distances. Plug-in EVs utilize a battery system which can be recharged from standard power outlets. Since
performance characteristics of electric vehicles have become comparable to, if not better than those of
traditional Internal Combustion Engine (ICE) vehicles, EVs present a realistic alternative.
It has been reported in [1] that for the EV applications the brushless DC and permanent magnet motors are
more suitable than other motors. The use of these motors will result in less pollution, less fuel consumption
and higher power to volume ratio. The reducing prices of the permanent magnet materials and the trend of
increasing efficiency in the permanent magnet and brushless DC motors make them more and more
attractive for the EV applications. Principally, a brushless DC (BLDC) motor is an inside-out permanent
magnet DC motor, in which the conventional multi-segment commutator, which acts as a mechanical
rectifier, is replaced with an electronic circuit to do the commutation. Consequently, a BLDC motor requires
less maintenance and is quite robust. However, a BLDC motor requires relatively complex electronics for
control. In a BLDC motor permanent magnets are mounted on the rotor with the armature windings being
hosed on the stator with a laminated steel core. Rotation is initiated and maintained by sequentially
energizing opposite pairs of pole windings, which are said to form phases. Knowledge of rotor position is
critical in order to correctly energize the windings, to sustain motion. The rotor position information is
obtained either from Hall Effect sensors or from coil EMF measurements.
A motor controller unit (MCU) (schematic shown below) for a 48V, 1 kW, 3000 rpm, Hall sensored BLDC
motor for e-rickshaw application will be developed in this work.
Protection 3-phase
Inrush current, Voltage BLDC
battery reverse Source Motor
48 V
polarity Inverter
Battery
(MOSFET)
currents Position
Gate Drivers
Auxiliary Sensing
Power interface
Supply
(dc-dc converter) Microcontroller
3
1.2 BLDC Motor Control
Two separate modules (stages) are required in order to control a BLDC motor: a power module and a control
module. A BLDC motor requires a DC source voltage to be applied to its stator windings in a sequence so
as to sustain rotation. This is done by electronic switching using an inverter as shown in Figure 2 [2] The
inverter circuit employs a half H-Bridge for each stator winding.
In the case of a BLDC motor with three pairs of stator windings, a pair of switches must be turned on
sequentially in the correct order to energize a pair of windings, in what is popularly known as the trapezoidal
commutation. A number of switching devices can be used in the inverter circuit; however MOSFET and
IGBT devices are the most common in high power applications due to their low output impedance. A
microcontroller is commonly used to read rotor position information from the Hall Effect sensors and
determine which phase to energize, switching the appropriate device. Alternatively, phase EMFs can be
monitored to determine the rotor position in sensorless applications. At present however the sensorless
algorithm has not been implemented in this work as the motor in discussion is provided with hall sensors
for decoding position information.
1.3 Objective
At present a test bench comprising of two shaft coupled 48V, 1kW, 3000 rpm BLDC motors and a 3 phase
voltage source inverter (whose working prototype is to be made later on) has been provided to run the motor
control algorithms. An 8 bit microcontroller (launch-pad available) has been finalized and purchased to control
the motor operation for the entire span of the work. Also another 48V 800W single BLDC motor (commonly
used in e-rickshaws) is available for testing purposes. Some of the objectives to be achieved with this setup are:-
1. Obtain the data necessary to run any BLDC motor from a 3 phase voltage source inverter, if the
motor datasheet is not available.
2. To test the working of the inverter by loading it with 3 phase resistive load (laboratory rheostats) and
running the 120 degree conduction mode algorithm using the microcontroller.
3. To assess the correctness of the motor control algorithm by running the single BLDC motor using the
inverter and the microcontroller.
4. To perform speed control of the test bench motors based on an external speed command, using the
same algorithm, from very low speeds upto rated speed.
5. Final aim of this work would be to develop the complete Motor Controller Unit indigenously.
4
Chapter 2
Theory of BLDC Motor Control
In order to drive a BLDC motor, an electronic commutation circuit is required. The widely used
commutation methods for the BLDC motor are: trapezoidal (or six-step), sinusoidal, and field oriented
control (FOC) (or vector control). Each commutation method can be implemented in different ways,
depending on control algorithms and hardware implementation to provide their own distinct advantages.
The table [2] below gives a comparative study of the different characteristics of the various commutation
methods. Of these the trapezoidal commutation scheme being the simplest has been implemented in this
work currently and therefore discussed at length.
5
Figure 3 BLDC Motor Structure Figure 4 Stator Winding Connection of a 3 ph. BLDC Motor
The following figure 6 [3] shows how to generate the magnetic field in the stator. Here, the positive current
is defined as the current flowing into a specific phase, or coming out of a specific phase. Similar to the DC
motor, if the MCU and control circuit in a BLDC motor do not change the direction of the magnetic field
generated by the stator windings in time, the rotor won’t spin. In BLDC motor, a rotating magnetic field
should be generated by the windings. Therefore, there must be a way to conform the position of
commutation and change the direction. This is done by hall sensors in trapezoidal commutation method.
6
2.1.1 Basic Theory of Trapezoidal Commutation
If the rotor wants to spin stable clockwise or counterclockwise, an associated rotating magnetic field must
be generated from the stator windings, which will attract or repel the permanent magnetic (rotor). As shown
in Figure 6 [3] each phase of the stator coil can generate the magnetic field in two directions and so, the
current and the rotating magnetic fields in the three-phase coils can be easily controlled. Six patterns of
magnetic fields (see the following figure) generated are the basis of six-step commutation, which is
explained after this.
7
2.1.2 Six Step Commutation
The Hall effect sensor is a sensing switch that outputs a logic level based on the magnetic field detected.
The Hall effect sensors (Ha, Hb, and Hc) are inserted into the stator. For example, when the Ha sensor is
under the N pole of the permanent magnet, it will output signal 1, otherwise 0. See the following figure.
Combining the outputs of all the three sensors will theoretically give 8 status from 000 to 111. However, in
most cases, because of the hardware constraint, signal 000 and 111 don’t exist. So, the other 6 status can
divide the one electrical 360° of position into six areas, and the exact point where the status changes from
one to another is the position that the commutator changes the direction of the stator’s magnetic field.
Figure 9 [3] depicts an example of commutation where the Hall sensor status is shown to be 010. Now, for
the rotor to spin clockwise, the clockwise rotating magnetic field must be generated in its nearest area, that
is, where the Hall sensor status is 011 (blue arrows in fig. 9) This direction of magnetic field can be
generated by turning on the coil AC, which means that the current flows into A, and runs out of C (refer to
fig. 7) When the rotor runs to the area of 011, the Hall sensor status changes to 011 and at the same time,
the commutator changes from AC to BC, to keep the rotor running after the rotating magnet. Thus, the
power sequence is AC -> BC -> BA -> CA -> CB -> AB -> AC.
Figure 9 Commutation
8
Here is the summary of the commutation process:-
• In one complete rotation of 360 electrical degrees, the excitation of the stator windings will be changed
six times, and each change is called a commutation.
• The angle between S-N pole (rotor) and magnet field (stator windings) is 60-120°, commutation happens
at 60°.
• The commutation position is when the status of the Hall sensor changes.
• At every moment, only two phases have current, while the third one is powered off.
9
2.2 Reason behind the name Trapezoidal Commutation
The principle of the BLDC motor is, at all times, to energize the phase pair, which can produce the highest
torque. To optimize this effect the back EMF shape is trapezoidal. This is actually achieved by
interconnecting the coils in the stator windings in trapezoidal fashion. The combination of a DC current
with a trapezoidal back EMF makes it theoretically possible to produce a constant torque. This is depicted
in Fig. 10 [4] In practice, the current cannot be established instantaneously in a motor phase; as a
consequence the torque ripple is present at each 60° phase commutation. The oscilloscope waveform shown
in Fig. 11, captured on the test-bench running at nearly 1500 rpm (8 pole motor) confirms that the developed
back emf waveform of the BLDC motor with six step commutation algorithm is indeed trapezoidal in
nature. So the phrases six step commutation and trapezoidal commutation can be used interchangeably to
denote the same BLDC control algorithm.
Figure 11 Back EMF of the generator side machine running at nearly 1500 rpm, captured on oscilloscope. As the neutral point
was not accessible for either of the machines, so the generator side machine was loaded with rheostats in star connection to
create an artificial neutral point.
10
2.3 Speed Control and PWM technique. [4]
Commutation ensures the proper rotor rotation of the BLDC motor, while the motor speed only depends on
the amplitude of the applied voltage. The amplitude of the applied voltage is adjusted using the PWM
technique. The supply voltage is chopped at a fixed frequency with a duty cycle depending on the speed
input. The two phase supply duration is limited by the two phase commutation angles. The main advantage
of the PWM strategy is that the chopping frequency is a fixed parameter; hence, acoustic and
electromagnetic noises are relatively easy to filter. There are also two ways of handling the drive current
switching: hard chopping and soft chopping.
In the hard chopping technique, both phase transistors are driven by the same pulsed signal: the two
transistors are switched-on and switched-off at the same time. The power electronics board is then easier to
design and is also cheaper as it handles only three pulsed signals. A disadvantage of the hard chopping
operation is that it increases the current ripple by a large factor in comparison with the soft chopping
approach.
The soft chopping approach allows not only a control of the current and of the rate of change of the current
but a minimization of the current ripple as well. In this soft chopping mode, the low side transistor is left
ON during the phase supply and the high side transistor switches according to the pulsed signal. In this
case, the power electronics board has to handle six PWM signals.
The soft chopping mode has been implemented on the set-up as shown in the oscilloscope waveforms
below. The gate drivers for the high side transistors of the inverter are given PWM signals at a frequency
of 5 kHz or less (keeping in mind the limitation of the micro-controller, STM8) and variable duty cycle
based on the external speed input, while the gate drivers for the low side transistors are supplied with
constant high signals during the conduction of the respective transistors. Also with the soft chopping
approach, one is never turning the upper/lower drivers for a particular phase on/off or off/on at the same
time, so the need for dead time insertion on the bridge driver outputs gets eliminated.
Figure 12 Gate Driver Signals for two high side transistors and two low side transistors, generated using STM8S DISCOVERY board
11
Chapter 3
Experimental Results & Future Scope
Along with the above, the hall sensors were powered from another power supply (5V DC) and the
hall outputs were viewed on an oscilloscope. For one complete shaft rotation, the hall outputs were
seen to be 30 degree displaced (mechanically), which implies that electrical angular displacement
of the hall sensors is 120 degrees. Also from the oscilloscope waveforms, it is possible to label the
hall sensors as H1, H2 and H3. Fig. 13 corroborates these conclusions.
The motor shaft was rotated with hand to cause generator action (no power fed to the phases from
the DC supply in this case) and the three motor phases were connected to rheostats in star fashion.
The developed back emfs were observed in an oscilloscope and at the same time correspondence
of H1 with arbitrarily any one of the motor phases was traced. The motor phases were found to be
trapezoidal in nature and 120 degrees electrically displaced. Thus it is possible to label the motor
phases as A, B and C. These conclusions are corroborated by Figures 14 and 15. After this,
exploiting the 120 degree phase relationship between the hall sensors themselves as well as the
motor phases, it was easy to draw up the entire commutation table for either direction of motor
rotation.
Figure 13 Hall Sensor Outputs for one complete rotation of the motor shaft
12
Figure 14 Back emfs of motoring machine Figure 15 Correspondence of H1 with motor phase A
If Fig. 10 is observed carefully, it can be seen that in general when back emf of any phase is changing,
no current flows in that phase. When back emf is positive constant, voltage supplied to that phase during
motor operation is positive. When back emf is negative constant, voltage supplied to that phase during
motor operation is negative. Based on this argument, using Figs. 13, 14 and 15, the commutation table
for either direction of rotation of the test bench motor can be drawn up easily and is given below.
H3 H2 H1 A B C A B C
0 1 0 NC --- + NC + ---
0 1 1 + --- NC --- + NC
0 0 1 + NC --- --- NC +
1 0 1 NC + --- NC --- +
1 0 0 --- + NC + --- NC
1 1 0 --- NC + + NC ---
Table 3 Commutation Table for motoring side machine of the test bench. Symbols have same meaning as in Table 2.
13
LS06 Buffer is soldered on vero board to connect microcontroller outputs and gate drivers
inputs of inverter. Figure 16 [5] below gives the outline of this chip.
Figure 17 Phase to negative bus of dc link voltages of inverter for 120 degree conduction mode with resistive loads
C1, C2, C3 corresponds to phases A, B, C (phase to neutral) voltages of inverter. 10V is obtained when top
switch of any leg of inverter is on, 0V is obtained when bottom switch is on. When both the switches are
off, 5V is obtained.
14
3.4 Verification of the trapezoidal motor control algorithm
To check the correctness of the trapezoidal control algorithm written, the single 48 V, 800 W BLDC Motor
was used. The data required to run this motor was obtained by the same procedure as described in 3.1 .
Figure 18 shows the phase voltages of the aforementioned BLDC motor during open loop operation.
Figure 18 Phase to negative bus of dc link voltages of the aforementioned BLDC motor
15
3.5.1 Speed Control in Open Loop Configuration.
In open-loop control the speed of the motor is directly controlled by controlling the duty cycle of the
PWM signal that directs the inverter driving the motor. The duty cycle of the PWM signal controls the
ON time of the top side switches of the inverter which in turn controls the average voltage supplied
across the motor winding. The block diagram of a typical open loop motor control system is shown in
the figure [6] below.
The speed-input control is provided by an analog potentiometer. The potentiometer value is measured by
the analog-to-digital (A/D) converter integrated in the STM8. A linear relationship between the ADC input
value measured and motor speed is assumed in this implementation, such that ADC output ranging from 0
to maximum counts corresponds to motor speed ranging from 0% to 100%. Depending on the speed control
input, the open loop control system implemented in STM8 either increases or decreases the PWM duty
cycle, which in turn increase or decreases the average voltage or current applied to the motor via the motor
drive circuitry and controls the motor speed accordingly. The firmware implementation of the open loop
control is shown in the flow diagram below.
16
3.5.2 Results obtained from Open Loop Control
Figure 23. Waveforms for generator side electrical quantities captured at around 1500 rpm.
17
Motor side back emf [7]
Figure 24 presents the oscilloscope plots of the terminal voltages of the three motor phases with respect to
system ground (negative side of the DC bus). Figure 25 gives an enlarged view of one of the motor terminal
voltages with respect to the system ground. During the two floating phases we can clearly see that the low
point (during PWM off time) of the voltage forms an envelope that follows the Back EMF (BEMF) which
would be formed had the motor been rotated externally by means of a mechanical driver (see Fig. 16). The
start of the left hand side floating interval is marked by a spike up to the DC bus level. This is caused by
commutation of the bridge when the low side transistor of that phase turns off and the motor current
immediately transfers into the freewheeling diode on the top side. Since the high side diode is conducting,
the motor terminal voltage is “nailed” to the DC bus and the voltage will stay there until the phase current
decays to zero. This interval is referred to as the clearing or demagnetization time. After the
demagnetization time, actual BEMF would be negative but, because of the freewheeling diodes in the low
side of the bridge, the voltage is clamped to one diode drop below ground and appears flat. At the point
where the BEMF polarity theoretically would have becomes positive, we can see the low side of the voltage
envelop starts to rise, and this is the time instant that we detect as the rising BEMF zero crossing. The
observant reader will probably notice that the high side of the envelope (during PWM on time) also appears
to follow the BEMF. As one would expect, during the conducting phase, the terminal voltage is either at
DC Bus level or zero since it is being actively driven. The start of the right hand side floating phase is
marked by another demagnetization interval. In this case, the commutation is marked by the high side
transistor turning off, which causes current to transfer into the freewheeling diode on the low side. Voltage
will thus be “nailed” to ground until the current decays to zero. During this interval, we follow the voltage
waiting for the falling edge zero crossing.
Figure 24. Terminal voltages of motor side machine with respect to system ground.
18
Figure 25. Enlarged view of one of the three waveforms shown in Fig. 24
19
Chapter 4
References
[1] Nasser Hashernnia and Behzad Asaei, “Comparative Study of Using Different Electric Motors in
the Electric Vehicles ”, 18th Int. Conf. on Electrical Machines, 6-9 Sept. 2008, paper ID 1257.
[2] Shiyoung Lee and Tom Lemley, “ A COMPARISON STUDY OF THE COMMUTATION
METHODS FOR THE THREE-PHASE PERMANENT MAGNET BRUSHLESS DC MOTOR “ ,
Electrical Manufacturing Technical Conference, pp. 49-55, 2009.
[3] Xianhu Gao, “BLDC Motor Control with Hall Sensors Based on FRDM-KE02Z “, Freescale
Semiconductor, Doc. No: AN4776, App. Note Rev 0, 07/2013.
[4] Bilal Akin and Manish Bhardwaj “Trapezoidal Control of BLDC Motors Using Hall Effect
Sensors”, App. Report SPRABQ6 – July 2013.
[5] “SNx4LS06 Hex Inverter Buffers and Drivers With Open-Collector High-Voltage Outputs“,
TEXAS INSTRUMENTS.
[6] Bhargavi Nisarga, Daniel Torres “Sensored 3-Phase BLDC Motor Control Using MSP430“,
TEXAS INSTRUMENTS App. Report SLAA503 – July2011.
[7] Dennis Nolan “Sensorless six-step BLDC Commutation“, AN4220 App. note,
STMicroelectronics.
[8] C. S. Joice, S. R. Paranjothi and V. J. S. Kumar, "Digital Control Strategy for Four Quadrant
Operation of Three Phase BLDC Motor With Load Variations," in IEEE Transactions on Industrial
Informatics, vol. 9, no. 2, pp. 974-982, May 2013.
[9] Cody J, 2008, “Regenerative Braking Control for a BLDC Motor in Electric Vehicle Applica-
tions”, Honours Paper in Bachelor of Engineering degree, University of South Australia, School of
Electrical and Information Engineering.
[10] Chen, J-X., Jiang, J-Z.and Wang, X-J., 2003, “Research of Energy Regeneration Technology in
Electric Vehicle.” Shanghai University Press, Volume 7, Number 2, pp 173 – 177.
20