Sei sulla pagina 1di 6

Model Construction and Verification of a BLDC

Motor Using MATLAB/SIMULINK and FPGA


Control
Ming-Fa Tsai, Tran Phu Quy, Bo-Feng Wu, and Chung-Shi Tseng
Department of Electrical Engineering
Minghsin University of Science and Technology
Hsinchu, Taiwan, R.O.C
E-mail˖mftsai@must.edu.tw
Abstract—This paper presents the model construction of a Inverter
brushless DC motor via MATLAB/SIMULINK and FPGA BLDC
control, so that one can evaluate the performance of the BLDC
Q1 Q3 Q5 Motor
motor control with various control schemes using Vdc
MATLAB/SIMULINK. The constructed model consists of a
2 a
BLDC motor dynamics block, a Hall-sensor signals generation o b
block, a back-emf block, and a PWM-generation logic block. In Vdc c
Q4 Q6 Q2 x z
order to evaluate the model, various cases of simulation studies y
2
are carried out. The control and PWM-generation logic block
then can be transferred to digital hardware circuit in VHDL
hardware description language for co-simulation verification in
the MATLAB/SIMULINK and ModelSim environment.
Experiment results by using FPGA control are also obtained to
verify the correctness of the constructed BLDC model. FPGA
Hall Sensors (x, y, z)
Keywords-BLDC motor, model construction, FPGA control
Fig. 1 The block diagram of the three phase BLDC motor drive.
I. INTRODUCTION
In variable-speed control of AC motor drives, utilization
of BLDC motor has been widely used because the BLDC II. MODELING
motor has simpler structure and lower cost than the other AC The typical inverter drives system for a BLDC motor is
motors [1]-[2]. The study of the model construction for shown in Fig. 1. It can be divided into two parts, one is
simulation is an important phase in the controller design inverter block, and the other one is the BLDC motor.
process of the BLDC motor drives [3]-[6]. In this regard, the Modeling of two parts is described as follows.
simulation environment MATLAB/SIMULINK is quite
suitable for one to learn various controllers design if the A. BLDC motor
corresponding motor’s simulation model is provided. The flux distribution in a brushless dc (BLDC) motor is
Although there have been various types of motor model, such trapezoidal. Given the non-sinusoidal flux distribution, it is
as DC motor model, PMSM model, induction motor model, clearly to derive a model of the BLDC motor in phase
have been available in the SimPowerSystems tool set of variable. The circuit equations of the three phase windings in
MATLAB/SIMULINK simulation system, the BLDC motor phase variables can be described as follows:
model is still lacking. ª dia º
On the other hand, recently the control ASIC design is « dt »
also important for simplification the controller implementation ªvan º ªia º « » ªea º
«v » = R «i » + L − M « dib » + «e »
« b» ( )« » « b»
[7]-[8]. The MATLAB/SIMULINK can also link with (1)
ModelSim which is a simulation software tool for digital « bn » dt
circuit design. It is, therefore, the purpose of this paper to «¬vcn »¼ «¬ic »¼ « » «¬ec »¼
present the construction of a BLDC motor model using « dic »
SIMULINK and demonstrate its application to the co- «¬ dt »¼
simulation with ModelSim simulation tool. where v an , v bn , v cn are the stator phase voltages, R is the stator
The control block then can be transferred to digital resistance per phase, i a , i b , i c are the stator phase currents, L is
hardware circuit in VHDL hardware description language for
co-simulation verification in the MATLAB/SIMULINK and the self inductances, M is the mutual inductance between
ModelSim environment. Experiment results by using FPGA phases, and ea , eb , ec are induced back electromotive forces
control are also obtained to verify the correctness of the (emf). The waveforms of the stator phase current and back-
constructed BLDC model. emf of a BLDC motor is shown in Fig. 2.

978-1-4244-8756-1/11/$26.00 2011
c IEEE 1797
Fig. 3 Back-emf function modeling block.

1 5 4 6 2 3 1
Fig. 2 The BLDC motor waveforms with trapezoidal model.

TABLE I Back-emfs modeled as a normalized function of rotor position


Theta_elec x
(θ r ) f a (θ r ) f b (θ r ) f c (θ r )
6θ r
00 - 600 1 -1 1−
π y
6θ r
0
60 - 120 0
1 −3 -1
π
6θ r
1200 - 1800 5− 1 -1 z
π
6θ r
1800 - 2400 -1 1 − 7
π
6θ r Fig. 4 The Hall sensors waveform by rotating the rotor axis of a BLDC
2400 - 3000 -1 9 − 1
π motor with hand.
6θ r TABLE II Hall sensor modeled as a function of rotor angle
3000 - 3600 − 11 -1 1
π
Theta_elec x y z State
The peak value of electromotive forces is derived as: (θ r )
E p = ( Blv ) N = N ( Blrω m ) = Nφ pω m = k eω m (2) 00 - 600 1 0 1 5

where N is the number of conductors in series per phase, v is 600 - 1200 1 0 0 4


0 0
the velocity, l is the length of the conductor, r is the radius of 120 - 180 1 1 0 6
the rotor bore, ωm is the mechanical speed of the motor, B is 1800 - 2400 0 1 0 2
the flux density of the field in which the conductor are placed, 0
240 - 300 0
0 1 1 3
and ke is back-emf constant. The back-emf ek of the kth
3000 - 3600 0 0 1 1
phase can be written from Fig. 2 and (2) as:
ek = ωm f k (θ r ) (3)
where k = a, b, c. The functions f a , f b , f c have the same Three Hall sensors are placed at intervals of 1200 electric
and are embedded into the stator of a BLDC motor. The Hall
shape as ean , ebn , ecn with a maximum magnitude of ± 1 , and sensors waveform by rotating the rotor axis of a BLDC motor
are modeled as a normalized function of rotor position as with hand is shown in Fig. 4. To determine the rotor position,
shown in TABLE I. Using MATLAB/SIMULINK, the we can read the value of a 3-bit code, which are named as
modeling block of the back-emf functions is shown in Fig. 3. states ranged from one to six as shown in TABLE II. Using
Unlike a brushed dc motor, the commutation of a BLDC MATLAB/SIMULINK, the modeling of Hall sensor block is
motor is controlled electronically. To rotate the BLDC motor, shown in Fig. 5.
the stator windings should be energized in a sequence. It is Once the back-emf and Hall sensor modeling blocks have
important to know the rotor position in order to follow the been constructed, the next step is the motor dynamical model
proper energizing sequence. This can be accomplished by using construction. It consists of the mechanical part and the
the Hall sensors. electrical part. The electromagnetic torque is:

1798 2011 6th IEEE Conference on Industrial Electronics and Applications


theta
pi up
1 theta_deg theta_rad u 1
0 lo
x
degree _radian Interval Test
Dynamic 1

5*pi /3 up
u 2
2*pi /3 lo
y
Interval Test
Dynamic

pi /3 up
u
0 lo
Interval Test
Dynamic 2 OR 3
z
Logical
2*pi up
u
Operator 1 Fig. 6 The dynamic modeling block
4*pi /3 lo
Interval Test
Dynamic 3

Fig. 5 Hall sensor modeling block

Te = ¦ kt ik f k (θ r ) (4)
a
k b
The motor mechanical movement equation is as follows. c

dωm
Te − TL = J + Bωm (5)
dt
Besides, the electrical rotor speed and position have the
g
following relationship.
Fig. 7 The three-phase inverter modeling block.
dθ r P
= ωm (6)
dt 2
1
where Ib = [vbn − eb ] (11)
Ls s + R
Te is the electromagnetic torque,
1
TL is the load torque, Ic = [vcn − ec ] (12)
Ls s + R
ωm is the motor rotation speed,
J is the rotor inertia, Taking the Laplace Transform of (5) yields:
B is the damping constant,
k t is the torque constant,
P is the number of poles, Te − TL = ( J s + B ) ωm . (13)
θ r is the electrical angle.
Then, the motor speed can be obtained as (14).
Combining all the relevant equations, the system in state-space
1
form is: ωm = (Te − TL ) . (14)
Js + B
dia 1
= [van − ea − Ria ] (7)
The dynamic modeling block then can be constructed as
dt Ls
shown in Fig. 6.
dib 1
= [vbn − eb − Rib ] (8)
dt Ls
B. Three phase inverter and PWM control
dic 1
= [vcn − ec − Ric ] (9) The power stage is a three-phase inverter for electrical
dt Ls commutation. The simulation block, as shown in Fig. 7, is
where Ls = L − M . Taking the Laplace Transform of (7), (8), constructed by using the power electronic library in the
and (9) yields SimPowerSystems tool set of the MATLAB system. As shown
in Fig. 7, it is necessary to transfer the three-phase output
1
Ia = [van − ea ] (10) voltages with respect to the ground into the three-phase
Ls s + R

2011 6th IEEE Conference on Industrial Electronics and Applications 1799


TABLE III Inverter switches and Hall snesor position relationship voltages with respect to the neutral point of the motor. The
Q1 Q2 Q3 Q4 Q5 Q6 x y z State Pole-to-Phase block executes this function as follows:
off off off on on off 1 0 1 5
off off on on off off 1 0 0 4 ª 2 −1 −1 º
« 3 » ªv º
off on on off off off 1 1 0 6 ªvan º « 3 3 » ag
on on off off off off 0 1 0 2 « » « −1 2 −1 » « » (15)
on off off off off on 0 1 1 3 «vbn » = « 3 3 3 »« »
«vbg »
«¬vcn »¼ « »
off off off off on on 0 0 1 1
« −1 −1 2 » ¬vcg ¼
¬« 3 3 3 »¼
TABLE IV Hall-sensor and switch relation for clockwise rotation
In order to control the BLDC motor in clockwise or
present next Q1 Q2 Q3 Q4 Q5 Q6 counter-clockwise direction, it is necessary to know the
state stete relationship of the six inverter switches state and the Hall
1 5 0 0 0 1 1 0 sensor position. An FPGA control board and an IGBT-based
5 4 0 0 1 1 0 0 inverter have been designed for the experiment to test the
relationship of the inverter switch on-off states and the Hall
4 6 0 1 1 0 0 0 sensor position. The test results are shown in Table III.
6 2 1 1 0 0 0 0 According to TABLE III, the Hall sensor state and the
2 3 1 0 0 0 0 1
corresponding drive state require for commutation in
clockwise rotating mode and counter-clockwise rotating mode
3 1 0 0 0 0 1 1 can be put in the form of a state table as shown in TABLE IV
and TABLE V, respectively.
TABLE V Hall-sensor and switch relation for counter-clockwise rotation Using Karnaugh map for the TABLE IV, we obtain that
the switch states Q 1 , Q 2 , Q 3 , Q 4 , Q 5 , Q 6 in clockwise
present next Q1 Q2 Q3 Q4 Q5 Q6
state state rotation mode are as follows:
4 5 0 0 0 1 1 0 Q1 = y ⋅ z (16)
6 4 0 0 1 1 0 0 Q2 = x ⋅ z (17)

2 6 0 1 1 0 0 0 Q3 = x ⋅ y (18)

3 2 1 1 0 0 0 0 Q4 = y ⋅ z (19)
Q5 = x ⋅ z (20)
1 3 1 0 0 0 0 1
Q6 = x ⋅ y (21)
5 1 0 0 0 0 1 1

vsim ('tclstart', BLDCMIdcfbPIcontrolm )


%Double -click here to launch a new ModelSim
wm
Step
Modelsim startup command 1

TL wm Te
Te
15 Q1 pwm1
v* ia
va
ib
va
Q2 pwm2
ic
ctr
ea iabc
Q3 pwm3 eb
Repeating
X vb vb
Sequence ec
Q4 pwm4 x eabc
Y y
Q5 pwm5 z
vc
vc
Z pwm6
Q6 BLDC motor 1

clockwise inveter

Fig. 8 The SIMULINK simulation block linked with ModelSim for PWM control of BLDC motor.

1800 2011 6th IEEE Conference on Industrial Electronics and Applications


TABLE VI The parameter table of the BLDC motor

Parameter Symbol Value Units


Resistance R 2.875 Ohms
Inductance L 2.7 mH
Back-emf constant ke 0.0042 V/rad/s

Torque constant kt 0.0042 N-m/A

Viscous damping B 0.000089 N-m/(rad/s)


Rotor inertia J 0.0005 Kg-m2
Number of pole P 4 poles

Similarly, the Q 1 , Q 2 , Q 3 , Q 4 , Q 5 , Q 6 switching states


for counter-clockwise rotation mode can be determined
according to TABLE V by using Karnaugh map and are Time, sec.
shown as follows: (a)

Q1 = x ⋅ z (22)
Q2 = x ⋅ y (23)
Q3 = y ⋅ z (24)
Q4 = x ⋅ z (25)
Q5 = x ⋅ y (26)
Q6 = y ⋅ z (27)

The inverter commutation logic in (16)-(27) then can be


designed with PWM modulation and transferred to digital
hardware circuit in VHDL hardware description language for
cosimulation verification in the MATLAB/SIMULINK and
ModelSim environment. The overall cosimulation block is
shown in Fig. 8.
Time, sec.
(b)
III. SIMULATION AND EXPERIMENT VERIFICATION Fig. 9 Simulation results of motor speed (rad/s) in clockwise rotation: (a) with
duties D = 1, 0.8, 0.6, 0.4 while TL = 0; (b) load conditions TL = 0, 0.1, 0.2,
0.3 (Nt-m) while D = 1.
Since the modeling has been built as the above process,
The performance of the developed BLDC motor modeling is
simulated using motor parameters as listed in the TABLE VI. IV. CONCLUSION
Simulation results of motor speed in clockwise and counter- This paper presents the model construction of a brushless
clockwise rotation cases with various PWM duties and load DC motor via MATLAB/SIMULINK, so that one can evaluate
conditions are shown in Fig. 9 and Fig. 10, respectively. the performance of the BLDC motor control with various
control schemes using MATLAB/SIMULINK. The control
T he PWM control codes in VHDL then can be and PWM-generation logic block then can be transferred to
downloaded to the FPGA device of a control board for digital hardware circuit in VHDL hardware description
experimental verification. Fig. 11 shows the BLDC motor language for cosimulation verification in the
three-phase voltage signals which are nearly trapezoidal. The MATLAB/SIMULINK and ModelSim environment.
switch waveforms of PWM control with different duties are Experiment results by using FPGA control are also obtained to
shown in Fig. 12. As can be seen, the switching waveform in verify the correctness of the constructed BLDC model. The
Fig. 12(a) with D=0.25 has less time period than the switching realization system is established using FPGA and IGBTs gate
waveform in Fig. 12(b) with D=0.50. This indicates that the drive. More experimental work will be done to plot the
motor speed is faster with larger value of switching duty. experimental plots with various load torque and PWM duties
to compare with the previous simulation plots.

2011 6th IEEE Conference on Industrial Electronics and Applications 1801


Q1

Q2

Q3

Q4

Time, sec.

(a) (a)

Q1

Q2

Q3

Q4

Time, sec.

(b) (b)
Fig. 12 Switching signals in clockwise direction with different duties: (a)
Fig. 10 Simulation results of motor speed (rad/s) in counter-clockwise D=0.25, (b) D=0.50
rotation: (a) with duties D = 1, 0.8, 0.6, 0.4 while TL = 0; (b) load conditions
TL = 0, 0.1, 0.2, 0.3 (Nt-m) while D = 1. REFERENCES
[1] C.T. Liu, B.M. Lin, and J.S. Pam, "Desing and development of a zero-
emission scooter for Taiwan," Journal of Power Source 5.vol. 59, pp.
187-187, 1996.
[2] J. W. Dixon and I. A. Leal, “Current control strategy for brushless dc
motors based on a common dc signal,” IEEE Trans. Power. Electron.,
vol. 17, no. 2, pp. 232-240, March 2002.
[3] P. Pillay and R. Krishnan, “Modeling, simulation and analysis of
permanent-magnet motor drives”. II. “The brushless DC motor drive,”
IEEE Trans. Ind. Appl., vol. 25, no. 2, pp. 274–279, Mar./Apr. 1991.
[4] P. Pillay and R. Krishnan, "Application characteristics of permanent
magnet synchronous and brushless dc motors for servo drives,” IEEE
Trans. Ind. Appl., vol. 27, no. 5, pp. 986-996, Sept./Oct. 1991.
[5] U. Vinatha, S. Pola, and K.P.Vittal, ”Simulation of Four Quadrant
Operation & Speed Control of BLDC Motor on MATLAB/
SIMULINK,” IEEE TECON, pp. 1-6, 2008.
[6] Chee-Mun Ong. “Dynamic simulation of electric machinery using
Matlab/Simulink,” Prentice Hall Upper Saddle River, NJ 07458. 2008.
Chapter 7, pp. 259-340.
[7] Ying-Yu Tzou and Hau-Jean Hsu, “FPGA-based SVPWM control IC
for PWM inverters,” IEEE Trans. Power Electron., vol. 12, no. 6, pp.
953-963, Nov. 1997.
[8] A. Sathyan, N. Milvoljevic, and Young-Joo Lee. “An FPGA based
novel digital PWM control scheme for BLDC motor drives,” IEEE
Fig. 11 The BLDC motor three-phase voltage response IEEE Trans. Industrial Electronics, vol. 56, no. 8, pp. 3040-3049, Aug.
2009.

1802 2011 6th IEEE Conference on Industrial Electronics and Applications

Potrebbero piacerti anche