You are on page 1of 6

BLDCMotor Control Algorithm for Low-Cost

Industrial Applications
Namhun Kim
IE E E , Member
Hamid A. T oliy at
IE E E , S enior Member
Issa M. P anahi
IE E E , Member
Min-Huei Kim
IE E E , S enior Member
Department of E lectrical & Computer E ng.
T ex as A&MU niv ersity
College S tation, T X 7 7 8 4 3 -3 1 2 8
E -mail: T oliy at@ ece. tamu. edu
Department of E lectrical E ng.
U niv ersity of T ex as at Dallas
R ichardson, T X 7 5 0 8 0
E -mail: issa. panahi@ utdallas. edu
Department of E lectrical E ng.
Yeungnam College of S ec. & T ech.
Daegu City , Korea
E -mail: mhk im@ y nc. ac. k r
Abstract - E lectrical motors are an integral part of
industrial plants with no less than 5 billion motors built
word wide ev ery y ear. T he demand for low-cost brushless dc
(BLDC) motors hav e increased in industrial applications.
T his paper presents a BLDCmotor control algorithm for
low-cost motor driv e applications using general purpose
microcontrollers which hav e only one on-chip timer. T he
papere describes how to realiz e pulse width modulation
(P WM) signals with general input/ output (1 / 0 ) ports to
control a three-phase permanent magnet brushless dc motor
using the timer interrupt on MS P 4 3 0 F 1 2 3 2 .
Key words: BLDC motor, P WM, Industrial application,
MS P 4 3 0 F 1 2 3 2 .
I. INT R ODU CT ION
Low end applications of motor control can be found
in div erse line of consumer, medical, and industrial
products. High efficiency v ariable speed and v ariable
torq ue motor control is only possible using electronic
components and microcontrollers. Low cost is still
dominant factor in designing v ery low-end products using
motor control. E x amples are hand-held power tools and
home appliances in the mark et.
Battery powered v acuum cleaner, drill, and electric
saw units were inv estigated. In these products, brush dc or
univ ersal motors were used. T he torq ue/ speed v ariation is
handled roughly by switching 2 -position gearbox unit
connected to motor shaft. T hat is, low cost design has
been achiev ed by transferring the cost of electronic driv es
into the motor ty pe and mechanical parts (gearbox )
sacrificing efficiency and actual performance of the
product for the end user applications. Battery powered
tools could only operate at their nominal speed/ torq ue for
a short period of time before recharging the battery
became necessary . As in the case of power drill and saw,
small increase of the torq ue reduced the rotational speed
of the motor-controlled sy stem. It is also interesting to
note that the price of the battery charger is q uite
comparable with the price of the final product.
Digital electronic control of motors would offer
much higher efficiency and better power usage (longer
operating period for the battery ) at competitiv e cost.
Despite all the obv ious facts, replacing the cost of
inefficient noisy motor ty pes and the mechanical components
with that of the more efficient brushless motors and the digital
electronics/ microcontrollers in home appliances and hand-held
power tools (with cord or cordless) would still req uire
concentrated technical support and mark eting effort. R eference
designs, comparativ e cost analy sis, and application notes for
specific motor control end eq uipment will prov ide design
engineers with the benefits of the microcontroller-based
sy stems shortening learning curv e and their design efforts.
A motor control sy stem can be partitioned into 4 units:
supply line interface, digital processor, motor and sensors,
power conv erter or driv e unit. E lectric power is supplied to the
motor control sy stem v ia supply line interface in the form of ac
or dc signal. Motors use windings on the stator parts and either
permanent magnet (P M) or windings on the rotor parts. S tator
windings is either separated or connected to the rotor windings
in series or parallel configuration. Mechanical components
(brushes) are needed to connect electrical signal to the rotating
part. In a motor, rotation of rotor and torq ue generation occur
when the rotor field and stator field are not parallel, and
max imum torq ue is obtained when these fields are orthogonal
to each other. Motors with stator windings in series with that
of the rotor (using brushes) can operate with either ac or dc
signals and are k nown as univ ersal motors. Despite their v ery
poor efficiency and poor operations (speed v ersus torq ue/ load,
noise, electric spark s, brush wear-out, siz e), they are still
widely used in household appliances, power tools, and y ard
tools.
T he brushless dc motor (BLDC) motor has been used in
v arious industrial applications and has increased demand in
div erse fields because of its high efficiency , simple control
compared with ac motors, low E MI, and high reliability due to
absent of brushes. Most three-phase motors, including BLDC
motor need at least six P WM channels for inv erter power
dev ices such as IG BT s and MOS F E T s. In order to meet these
req uirements, generally a special-purpose processor or a
programmable logic dev ice (P LD) or driv e dev ice to generate
control signal is necessary . U sing special purpose processor or
dev ice for BLDCmotor driv e presents sev eral adv antages such
as small driv e siz e and less dev elopment time. Howev er, these
processors are more ex pensiv e than the general purpose
processors and ev entually will increase the cost of BLDC
motor driv e sy stem.
1 -4 2 4 4 -0 7 1 4 -1 / 0 7 / $ 2 0 . 0 0
C
2 0 0 7 IE E E . 1 4 0 0
S ince the main flux of BLDCmotor is produced by
the permanent magnets, this motor has high power density
and is capable of operating at high efficiencies while
hav ing similar torq ue control performance as a dc motor
[ 1 -2 ] . T rapez oidal ty pe BLDCmotors are generally used
for low-cost industrial applications. T herefore, low-cost
application of BLDCmotors are being considered for
many products, especially its sensorless operation [ 3 ] .
S ensorless techniq ues for BLDCmotor control with
trapez oidal back -E MF s can be classified into two
categories: algebraic eq uation-based techniq ues [ 4 -6 ] and
back -E MF v oltage sensing techniq ues [ 7 -1 0 ] . T he main
idea of using algebraic eq uations is to calculate the flux
link age from the motor parameters and v oltage/ current
measurements. Based on the estimated flux link age, the
rotor position can be detected. T his method can be
operated ov er a wide speed range, but the motor
parameters need to be k nown precisely and at least one
current sensor is req uired. T herefore, the sy stem
performance depends on the accuracy of the motor
parameters.
T he sensorless techniq ues that utiliz e the back -
E MF v oltage of the open-phase include the following
methods,
1 ) T erminal v oltage sensing,
2 ) T hird harmonic back -E MF v oltage sensing,
3 ) F reewheeling diode conduction current sensing.
When a phase is open, the back -E MF v oltage
which includes the information of the rotor position can
be measured at the motor terminals. S ince the terminal
v oltage sensing is simple from the hardware point of v iew,
this approach is widely used in industry for sensorless
control of BLDCmotors.
T he purpose of these sensorless methods is
elimination of the position sensor, which are generally
three hall sensors mounted across from the rotor.
S ensorless techniq ues need ex tra computation time and
ex ternal circuitry to estimate the back -E MF than the
sensor-based sy stems. T herefore, sensorless techniq ues
demand high performance processors, large program
codes, and large memory . F inally instead of position
sensor, other components are req uired, so it is v ery
difficult to decrease the total motor driv e cost.
In order to achiev e low-cost BLDCmotor driv e, a
general-purpose processor with hall sensors is used
instead of eliminating the position sensor and then uses a
special purpose processor. In this paper a general-purpose
processor, such as MS P 4 3 0 F 1 2 3 2 which is an ultra low-
power 1 6 -bit R IS Cmix ed-signal processor from T ex as
Instruments (T I) is used for battery powered applications.
T he dev eloped control algorithm is presented and the
general purpose digital I/ O port is used to generate the
P WM signals. T o v erify the proposed algorithm the
operation of a three-phase BLDCmotor with three hall
sensors under open-loop speed operation is described in
this paper.
II. BLDCMOT OR
P ermanent magnet (P M) motors are sy nchronous motors
that hav e permanent magnets mounted on the rotor, and the
armature windings located on the stator. P M motors are
categoriz ed into two ty pes. T he first ty pe is referred to as P M
sy nchronous motor (P MS M) which has sinusoidal back -E MF
shown in F ig. (1 -a). T he other ty pe has a trapez oidal back -E MF
and is referred to as the brushless dc (BLDC) motor shown in
F ig. (1 -b) [ 1 ] .
In BLDCmotor driv es, the polarity rev ersal is performed
by power transistors switching in sy nchroniz ation with the
rotor position. T herefore, the BLDCmotor has to use either
internal or ex ternal position sensor to detect the actual rotor
position. Also the rotor position can be estimated without the
need for position sensor. Howev er this paper uses three hall
sensors to determine the actual rotor position.
5 0
U -
C>
-5 0 &
0 3 0 6 0 9 0 1 2 0 1 5 0 1 8 0 2 1 0 2 4 0 2 7 0 3 0 0 3 3 0 3 6 0
R otor P osition[ deg]
L, o
co
-5 0 &
0 3 0 6 0 9 0 1 2 0 1 5 0 1 8 0 2 1 0 2 4 0 2 7 0 3 0 0 3 3 0 3 6 0
R otor position[ deg]
(a)T hree phase back -E MF of P MS M (b)T hree-phase back -E MF of BLDC
motor
F ig. 1 T he back -E MF of P M motors.
In general, BLDCmotor may use either 6 0 deg or 1 2 0
deg commutation interv als. In this paper, the 1 2 0 degree
conduction interv al is used. F ig. 2 shows a schematic of BLDC
motor and the ideal current wav eforms v ersus position. Also,
the position sensors outputs are illustrated. F ig. 3 shows the
ideal phase current in each of the motor windings and the three-
phase inv erter, respectiv ely . According to F ig. 3 from the first
interv al, phase A will conduct positiv e dc link current while
phase Bwill conduct negativ e dc link current. P hase Cwill be
left open. As a result, only phase A and Bare conducting and
1 4 0 1
, YU
Hall 3 Il
, N XC
B~ ~ ~ ~ ~ ~ Hall 2
0 9 0 1 8 0 2 7 0 3 3 0 3 6 0
0 9 0 1 8 0 2 7 0 3 6 0
0
3 0
9 0 1 8 0 2 7 0 3 6 0
2 1 0 2 3 3 0
0
3 0
9 0
1 5 0
1 8 0 2 7 0 1 3 6 0
o 9 D
1 5 0 1 8 0 2 7 0 3
o3 J 1 2 1 0 3
0 3 0
9 0
1 8 0 2 7 0 3 3 0 3 6 0
F ig. 2 BLDCmotor structure and signals
Current in winding A, B, C
phase Cis left silent, which means that only two switches
(A_H and B_L) are activ e, while the rest (A_L, B_H, C_H, and
C_L) are inactiv e.
During ev ery P WM cy cle to achiev e this switching
scheme, the desired duty cy cle is imposed by the upper switch
(A_H) of the two inv olv ed switches (A_H and B_L) and the
lower switch (B_L) is k ept on (1 0 0 % duty cy cle). T herefore,
there is no need for dead time to be considered for BLDC
motors. Because whenev er the upper switch is turned on, the
lower switch of the same lag alway s is already off and v ice
v ersa.
III. P R OP OS E DALG OR IT HM
F ig. 4 shows the interrupt block diagram for generating
the P WM signal using the I/ O port which is called asy mmetric
P MW strategy . T o generate these P WM signals, P 3 . 0 -P 3 . 5
ports are used because the MS P 4 3 0 F 1 2 3 micro-controller does
not hav e enough P WM channels to be directly used with three-
phase motor driv es and only has two P WM channels. T imer_A
has 4 mode, up, down, up/ down, and continuous mode, and in
this paper, this is configured in up-mode with MCLK as the
timer clock source, also T imer_A ov erflow interrupt and
T ACCR 1 capture/ compare interrupt are used to realiz e ex act
P WMsignal.
In order to k eep the freq uency constant, the CCR O
register has fix ed v alue, which is 2 0 0 h, and the CCR 1 register
has proper v alue to generate the desired duty ratio. T he
software check s the v alue of CCR 1 register to ensure that it
does not ex ceed the minimum or max imum v alue and prev ents
it from rolling ov er.
T he software flow chart for the three-phase BLDCmotor
with three hall sensors is described in F ig. 5 . T he initializ ation
procedure includes the initializ ation of watchdog timer, digital
I/ O, T imer-A, ADC1 0 , and v ariables. T he main program
consists of the initializ ation, start of conv ersion of the dc link
current, hall sensor check for rotor position detection, switch
signals (S WI, S W2 ) check for increasing the current reference
or decreasing the current reference and the check for motor
rotation direction (S W3 ).
4 4 --o, .
F ig. 3 Inv erter configuration of BLDCmotor.
1 4 0 2
Hall 1
Hall 2
Hall 3
I_A
l_B
IlC
A
B
C
A_H
B_L
AH BH BH CHX
A_H , 9 -B_H BH C_H
C_L CL A L A L
S witchs on in each step
C_H
B_L
BLOCmotor
P I
I
T imer_A Mode: U p Mode
Ov erflow Interrupt
t t tAt t
Current E nd of Current" Current E nd of
S ampling Conv ersion Control S ampling Conv ersion
F ig. 4 T imer_A interrupt block diagram for the P WMsignal using the
digital I/ O.
All algorithms are dev eloped in assembly language and
it is using 4 2 2 by tes of flash memory . T he flash memory
address is from Ox E OOO to Ox F F F F , the interrupt v ector from
Ox F F F F to Ox E F E O, and the main code memory fromOx F F F F
to Ox E OOO. T he dev eloped code is residing in the main code
memory . T herefore, there is no need for connecting ex tra
memory and peripheral dev ices.
IV . S YS T E M CONF IG U R AT ION
F ig. 6 shows the block diagram of the BLDCmotor
control sy stem used in this paper. MS P 4 3 0 F 1 2 3 processor
receiv es feedback signal from the dc link current sensor which
is used to prov ide current feedback for the closed loop current
control. T he rotor position information supplied by the hall
sensors of the BLDCmotor is estimated with the 3 ex ternal
I/ O port. Actual motor current and the direction of rotation
can be changed by the push and toggle switches. F ig. 6
represents the schematic of the BLDCmotor driv e sy stem. T o
control motor current, a proportional controller is used to
supply proper switching pattern for inv erter where three hall
sensors are used. As it is shown in this figure to control the
BLDCdriv e sy stem, only MS P 4 3 0 F 1 2 3 processor is used and
ex ternal timer dev ices for P WM generation, memory for
program download are nev er considered. F ig. 7 shows the
micro-processor used in this paper.
F ig. 6 T he schematic of the BLDCmotor driv e sy stem.
F ig. 5 S oftware flowchart.
T o generate constant P WM signal, P 3 . 0 -P 3 . 5 port
is used as the P WMoutput port, and T imer_A underflow
interrupt (T AIF G ) is serv ed, which is called ev ery
lOOmsec. Also at timer_A underflow interrupt the
specific switching pattern for BLDCmotor operation is
generated based on the position sensors signals. T o
control the motor current, the dc bus v oltage lev el
applied to the motor using proper P WM duty ratio is
adj usted accordingly . T imer_A CCR 1 interrupt is
utiliz ed for regulating this dc bus v oltage.
F ig. 7 T he MV S P -4 3 U F 1 2 . microcontroller boarO.
OF F F h
CCR o
1 4 0 3
ldc
T able 1 T he comparison of processors for bldc motor driv e
P rocessor Manufacture IKU ADC Internal
Memory
P WM
price(us$ ) G eneration
2 . 3 0
On-chip
ADC 8 k
flash,
MS P 4 3 0 F 1 2 3
T I
(Ilpu) (1 0 Obit) 2 5 6 R AM
Notneed
T MS 3 2 0 F 2 4 0 1 A T I 3 . 5 0 On-chip
ADC
2 k R AM On-chip P WM
(1 . 5 2 pu) (1 0 bit)
S T 7 MC1 K2 S T 3 . 3 0 2 2 5 On-chip ADC(1 0 bit) 1 6 k
flash,
On-chip P WM
(1 . 4 3 pu) 4 k R AM
5 6 F 8 0 1 3 Motorola
3 . 1 5 On-chip ADC 3 8 4 -1 . 5 k R AM
On-chip P WM
(1 . 3 7 pu) (1 2 bit) 8 k -6 0 k F lash
T able 1 shows different micro-controllers that are
commonly used in BLDCmotor driv e applications. As
prev iously mentioned, MS P 4 3 0 F 1 2 3 is a general-
purpose processor, which means that it does not hav e
enough P WM generators for motor control. U sing the
dev eloped algorithm for generating the P WM signals
instead of the on-chip P WM generator, it is possible to
reduce the cost by about 3 7 % . All of these micro-
controllers hav e on-chip ADCand enough internal
memory for BLDCmotor control algorithm. T herefore,
there is no need for ex tra components to be used for
motor currents signal sensing.
V . E XP E R IME NT ALR E S U LT S
F ig. 8 shows the current wav eforms, where
Channel 1 illustrates the measured dc link current,
Channel 2 represents the dc link current wav eform using
the current probe and Channel 4 indicates the phase
current wav eform using the current probe.
F ig. 9 shows the P WM signal, where Channel 1 is
the
A-upper signal, Channel 2 is the Blower signal and
Channel 3 is the C_lower signal using the I/ O port and
A-phase
current wav eform using a current probe. As it
is seen in F ig. 9 , the upper leg and the lower leg switches
are not on simultaneously . T herefore, there is no need
for dead-time to be included in this ex ample.
1 2 1 -A T T
S . . X
F ig. 8 DClink current and phase current
3
F ig. 9 P WM signals and current wav eform
V I. CONCLU S ION
In this paper, an efficient algorithm that employ s the
I/ O port for P WM signal generation for BLDCmotor control
with three hall sensors is proposed. T o control bldc motor
don' t need to be considered dead-time for P WM generation,
which allow in proposed algorithms using one timer and
general I/ O port. T he general purpose processor, T ex as
Instruments MS P 4 3 0 F 1 2 3 without any peripheral dev ices is
used, to v erify the proposed algorithm the control algorithm is
implemented on an ex perimental set up and sev eral tests hav e
been performed. It is shown that the proposed low-cost
sy stem has satisfactory performance for industrial applications.
V II. R E F E R E NCE S
[ 1 ] J . R . Hendershot J r. and T J E Miller, Design of Brushless
P ermanent Magnet Motors, Ox ford, 1 9 9 4 .
[ 2 ] T . J . E Miller, " Brushless permanent-magnet motor
driv es, " P ower E ngineering J ournal, v ol. 2 , no. 1 , pp. 5 5 -
6 0 , J an. 1 9 8 8 .
[ 3 ] J . P . J ohnson, M. E hsani, and Y. G uz elgunler, " R ev iew
of sensorless methods for brushless DC, " in P roc. of
IE E E IAS Annual Meeting, v ol. 1 , pp. 1 4 3 -1 5 0 , 1 9 9 6 .
[ 4 ] N. E rtugrul and P . Acarnley , " A new algorithm for
sensorless operation of permanent magnet motors, "
IE E E T ransactions on Industry Applications, v ol. 3 0 , no.
1 4 0 4
l_-
1 , pp. 1 2 6 -1 3 3 , J an. / F eb. 1 9 9 4 .
[ 5 ] N. E rtugrul and P . Acarnley , " Indirect rotor
position sensing in real time for brushless
permanent magnet motor driv es, " IE E E
T ransactions on P ower E lectronics, v ol. 1 3 , no. 4 ,
pp. 6 0 8 -6 1 6 , J uly 1 9 9 8 .
[ 6 ] T . H. Kim and M. E hsani, " S ensorless control of the
BLDCmotors from near-z ero to high speeds, "
IE E E T ransactions on P ower E lectronics, v ol. 1 9 ,
no. 6 , pp. 1 6 3 5 -1 6 4 5 , Nov . 2 0 0 4 .
[ 7 ] J . C. Moreira, " Indirect sensing for rotor flux
position of permanent magnet ACmotors operating
ov er a wide speed range, " IE E E T ransactions on
Industry Applications, v ol. 3 2 , no. 6 , pp. 1 3 9 4 -
1 4 0 1 , Nov . / Dec. 1 9 9 6 .
[ 8 ] S . Ogasawara and H. Ak agi, " An approach to
position sensorless driv e for brushless DCmotors, "
IE E E T ransactions on Industry Applications, v ol.
2 7 , no. 5 , pp. 9 2 8 -9 3 3 , S ept. / Oct. 1 9 9 1 .
[ 9 ] G . J . S u and J . W. McKeev er, " Low-cost sensorless
control of brushless DCmotors with improv ed
speed range, " IE E E T ransactions on P ower
E lectronics, v ol. 1 9 , no. 2 , pp. 2 9 6 -3 0 2 , Mar. 2 0 0 4 .
[ 1 0 ] J . W. S hao, D. Nolan, MT eissier, and D. S wanson,
" A nov el microcontroller-based sensorless
brushless DC(BLDC) motor driv e for automotiv e
fuel pumps, " IE E E T ransactions on Industry
Applications, v ol. 3 9 , no. 6 , pp. 1 7 3 4 -1 7 4 0 ,
Nov . / Dec. 2 0 0 3 .
[ 1 1 ] DS P -Based E lectromechanical Motion Control,
CR CP ress, 2 0 0 3 .
[ 1 2 ] MS P 4 3 0 x lx x F amily U ser G uide(slauO4 9 d)
[ 1 3 ] MS P 4 3 0 x 1 2 x Mix ed S ignal Microcontroller-R ev .
C(msp4 3 0 f1 2 3 )
[ 1 4 ] MS P -F E T 4 3 0 F LAS H E mulation T ool U ser' s
G uide(slaul3 8 b)
[ 1 5 ] MS P 4 3 0 x llx 2 , MS P 4 3 0 x 1 2 x 2 Mix ed S ignal
Micro controller- R ev . D
1 4 0 5

You might also like