You are on page 1of 6

2004 IEEE International Conference on Systems, Man and Cybernetics

Optimal PID Speed Control of Brushless DC Motors


Using LQR Approach*
Gwo-Ruey Yu and Rey-Chue Hwang
Electrical Engineering Department
I-Shou University
Kaohsiung County, Taiwan
gwoyu@isu.edu.tw
Abstract - A novel optimal PID controI design is
proposed in this paper. The methodologv of linear-
quadratic regulator is utilized to search the optimal
parameters of the PID controller. The augmented state
vector of performance measure involves output signals
only. The weighting functions are determined through
poles assignment. The existence criteria of the optimal
PID controller are derived. The new PID tuning
algorithm is applied to the speed control of BLDC motors.
Computer simulations and experimental results show that
the performance of the optimal PID controller is better
than that of the traditional PID controller.
Keywords: Optimal PID control, linear-quadratic
regulator, brushless DC motor.
1 Introduction
The most common type of actuator that converts
electrical energy into mechanical motion is the electric
motor. The speed of permanent magnet DC motors is easy
to be controlled for the torque-speed curve being almost
hear 111. Brushless DC (BLDC) motors develop from
permanent magnet DC motors. BLDC motors have the
advantages like permanent magnet DC motors, such as
good response and easy control. In addition, BLDC
motors use Hall effect sensors in place of mechanical
commutations and brushes. Therefore, BLDC motors
possess other benefits that permanent magnet DC motors
lack for, such as low noise, no mechanical loss, and etc.
BLDC motors have been widely applied in many control
systems--the spindle motor in compact disc drives with
the goal of a low moment of inertia for example.
Proportional-Integral-Derivative (PID) controllers
are still implemented in industry enormously. There have
been a lot of approaches to search the parameters of PID
controllers, including time response tuning 121, time
domain optimization [3], frequency domain shaping [4]
and genetic algorithms 151. However, most of them
require substantial experiences and several iterations.
Since linding the optimal parameters of PID controllers is
not an easy task, it is important to establish a systemic
design procedure.
Linear-Quadratic Regulator (LQR) optimal control
problems have been widely investigated in the literature.
The performance measure is a quadratic function
composed of state vector and control input. If the linear
time-invariant systemis controllable, the optimal control
law will be obtained via solving the algebraic Riccati
equation [6]. In reference [7], an optimal PI-lead
controller is designed using LQ technique. However, the
augmented state vector involves differential states such
that the optimal controller will take full state signals. The
drawbacks of the design result in the requirement of
observers. The PWID controller tuning via LQR
approach is presented in reference [ PI. The PI controller is
designed for a 6rst order systemonly. The PID tuning
formula is derived under the constraint of pole-zero
cancellations. One of the controller zeros must be equal to
the larger pole of the system.
In this paper, an optimal PID controller for a general
second-order system is developed using LQR manner.
There is no constraint in the searching space of the
optimal PID parameters. The new PID tuning algorithm is
applied to the speed control of BLDC motors. The
performance measure to be minimized contains output
error signals and differential control energy. The optimal
PID controller receives error signals only, and it doesnt
need to feedback 1 1 1 states. Besides, a systematic
procedure for the selection of weighting functions is
proposed in this context. The Q matrix can be determined
fromthe roots of the characteristic equation. Once the
poles of the closed-loop system are assigned, the
existence criteria of the optimal PID controller are derived.
Both computer simulations and experiment results
demonstrate that the effectiveness of the optimal PID
designs.
2 Brushless DC motors
Permanent magnet DC motors use mechanical
commutators and brushes to achieve the commutation.
However, BLDC motors adopt Hall effect sensors in place
of mechanical commutators and brushes [9]. The stators
of BLDC motors are the coils, and the rotors are the
permanent magnets. The stators develop the magnetic
* 0-7803-8566-7/04/$20.00 0 2004 IEEE.
473
fields to make the rotor rotating. Hall effect sensors detect
the rotor position as the commutating signals. Therefore,
BLDC motors use permanent magnets instead of coils in
the armature and so do not need brushes.
In this paper, a three-phase and two-pole motor
BLDC motor is studied. The main controller of the BLDC
motor is implemented through the TMS320F240 of the
Texas Instrument. The speed of the BLDC motor is
controlled by means of a three-phase and half-bridge
pulse-width modulation (PWM) inverter. Figure 1 shows
the open loop control of the BLDC motor.
Amplifier
I
...................
Commutation
Control
TMS320F240 based Servo Controller
...................................... " .......................................................................................................
Fig. 1. The open loop control of the BLDC motor
The dynamic characteristics of BLDC motors are
similar to permanent magnet DC motors. The
characteristic equations of BLDC motors can be
represented as [lo]
(1)
ye!f =K~ .-(I) (2)
i"(1)= K, . i(i) (3)
di(t)
di
v,,(r) =L- +R . i ( r ) + vsnf ( t )
r(t)= J-+ dub) D . W( l ) (4)
dt
where y,pD(l ) is the applied voltage, 41) is the motor
speed, L is the inductance of the stator, ;(t) is the current
of the circuit, R is the resistance of the stator, is the
back electromotive force, T is the torque of motor, D is
the viscous coefficient, J is the moment of inertia, K, is
the motor torque constant, and Kb is the back
electromotive force constant.
Figure 2 shows the block diagram of the BLDC
motor. Fromthe characteristic equations of the BLDC
motor, the transfer function is obtained
__- 4) K, ( 5 )
v, (s)- ( L ~ +RI A +D)+ K , K ~
Fig. 2. The block diagram of the BLDC motor
3 Optimal PID controller design
Figure 3 shows the block diagram of optimal PID
The transfer function of the BLDC motor is defined
control for the BLDC motor.
as
where y( s) is the speed of the motor, U(:;) is the PWM
control signal. The mathematical equation of a PID
controller in frequency domain is
(7)
k
where k, is the proportional constant, k, is the integral
constant, and kd is the derivative constant. The control
objective is to design an optimal PID controller such that
the tracking error will approach zero. The tracking error is
defined as
e(1) = r - y( t ) (8)
where r is the command, y is the output signal. The
control input signal is
( 9)
that is, the control energy needed to achieve error
regulation will be
(10)
U( I ) =k, je(t)dt +k,e(t) +kd - e( t )
G, (s) =k, +I +kds
S
u( s ) =e(s) - +k, +kds
[:
d
dt
To secure the optimal value of k, , k, and kd ,
introduce the augmented state vector
- -
Fromequation (1 l), the differential equation of i ( t ) is as
follow,
where
i ( l ) =-j (f ) (13)
e(r) =-.V(I) (14)
e ( ( ) =-?(f) (15)
s 2y ( s ) t asy(s)+b&)= m(s) (16)
Fromequation (6), the following equation is obtained
I LQR
1 l
PID PWM
Fig. 3. Optimal PID control
474
Therefore,
Taking the inverse Laplace transform of equation (17)
gets
j ; . (l )+aj ; (t )+bj (f )=cu(t ) (18)
Substituting equations (13)-(15) into equation (18) yields
Thus, the matrices of the augmented system are
(20)
s3y(s)+as2y(s)+ bsy(s)= csu(s) (17)
Z(t)=-ae(t)- bi ( t ) - ci ( r ) (19)
derived
a= [ 0 0 ' '1
iifj (21)
0 - b - a
Let the performance measure be
where Q and R are symmetric matrices, and they are
positive semi-dehite and positive definite respectively.
To minimize the performance measure under the dynamic
constraints (12), the weighting functions Q and R should
be appropriately designed. The optimal differential control
input is obtained
J , =6"( ~r( l ) e. ( t ) +"( t ) ~d( t ) ~1 (22)
C' ( f ) = - R ~ l ~ ' S z ( t )
=-Kz(t) (23)
=- [ K, K2 K,Ht)
where K is the Kalman gain, S is the positive definite,
symmetric matrix to satisfy the algebraic Riccati equation
z r S + S ; j - S ~ R - ' B ' S + Q= O (24)
u(t )=-K,l e(r )dl - K2e( f ) - K3P( t ) (25)
Taking integration on both sides of (23), the optimal
PID controller for the BLDC motor is obtained
that is,
l kr k, k,l=-[K, K , GI (26)
To achieve the desired response, the chosen of
weighting functions Q and R is not easy virtually. In the
next section, the guidelime of selecting weighting is
offered for the poles of the closed-loop transfer function
having been assigned. Furthermore, the existing criteria of
an optimal PID controller are derived to meet the desired
performance.
Theorem Let a, , a2 and a3 be the desired roots
of the characteristic equation of the closed loop system. If
the following conditions are held
(27)
(28)
then exists an optimal PID controller such that the design
specification is satisfied.
Proof:
solution of the algebraic Riccati equation in the formof
a:a: +.:a: +a:.: >b2
U: +a: +a: >a 2 - 26
Let Q be the weighting function and S be the
Q= I"' 0 92 O
l o 0 931
SI2 $13
s=[;;; ; ; % ] (30)
q1 =R-'C's?, (31)
(32)
(33)
k', =R-lcs, , (34)
k,' =R"cs,, (35)
k i =R"cs,, (36)
As) - G(s)G,v,,(s)
4 5 ) - 1+ G(S)cP,D(S)
Substituting the weighting matrix into equation (24) yield
92 =Zbs,, +R-'c2s:, - 2ns,, - 2R-'c2s,,s,,
9, =Zos,, +R-Ic2s:, - 2s2,
Fromequations (23) and (26), the optimal P D controller
is obtained
The closed-loop transfer function is
(3 7)
ck,s2 +ck,s +ck,
si +(u +ckd)s2 +(b +ck,)r t c k ,
-
Let
(38)
s' +(a+ck, )s2 +( b+ ck,)r +ck,
Afier comparing the coefficients, the relationships
between the desired roots and the PID controller are
(39)
=(s -a, 1s -a& - U; )
k -
C
(40)
(41)
S13 =-- RaIa2a3 (42)
cia2 +a,a, +aza, - b
a1+a2+a,--a
k, =
c
k , = -
c
If the PID controller is optimal, equations (39)-(41)
should be equivalent to (34)-(36). Therefore,
2
(43)
(44)
Substituting above equations into equations (31)-(33), the
guideline of selecting weighting is derived
R( a, a, +a, a, +a, a, - b)
C2
C2
521 =
S3r =- R( a, +a2 +a, - U )
(45)
Ra?:a:n:
9 1 = 7
R(u; t a : +a: - a2 +2b)
2
93 =
(47)
Furthermore, the weighting matrix Q
definite. Thus
a:. : t +a:.: >b2
a: +a: +U: >o2 - 26
is positive semi-
(48)
(49)
475
4 Computer simulations
The specifications of the BLDC motor are shown in
table 1. From table 1 and equation (S), the transfer
function of the BLDC motor is obtained
Parameters
R
Kb
D
L
K,
J
275577.36
s2 +417.1s+43561.5
C(S) =
Values and units
21.2 n
0.1433 V sirad
1 x 1 Od kg-m sirad
0.052 H
0 1433 kg-&A
1 x l o 5 kg-m s2/rad
l !L J a0
To control the speed of the BLDC motor at 1000
rpm, a traditional PID controller is designed using trial
and error method first. After several iterations, the values
of k,, k,,, and kd are chosen as 15, 30 and 0.001
respectively. The speed response and applied voltage of
o om o m o m s om o m om om oo, om om
the traditional PID controller are shown infigure 4 and 5.
Tlm.18)
The roots of the characteristic equation are -
346.3922861.9 iand4.4974.
Fig. 4. Speed response of the traditional PID controller
Fig. 6. Speed response of the optimal PID controller
Fig. 7 Applied voltage of the optimal PID controller
476
To illustrate the procedure of choosing weighting
functions, different case studies are considered. Let the
assigned poles (a, , a2 ,a,) be(-100, -200, -300) and set
R =1 . According to equations (45)-(47), the weighting
(q, , q2 , q 3 ) is (4.74~ lo2, 3. 95~ l o2, 6. 93~ 10') and the
optimal PID controller (k, , k , , k d ) is (2.17 x 10,
2.41 x IO', 7 x lo4). The speed response and applied
voltage are shown in figure 8 and 9.
Similarly, let the assigned poles (a, , a2 , a,) be (-
500, -1000, -1500) and set R = l . The corresponding
weighting (4, ,q2 , q 3 ) is ( 7. 4~ lo6, 4. 03~ 10, 4. 49~ 10')
and the optimal PID controller (k, , k, , k d ) is (2.72~ lo',
9.82, 9. 37~ 10"). The speed response and applied voltage
are shown in figure I O and 11. It follows that the rise time
and settling time will be reduced if the poles are assigned
at more left side of the real axis, but the overshoot will be
increased simultaneously.
To get a better performance, we assign the poles
(a, , a2 , a l ) to be (-0.2, -4000, -5000). The
corresponding weighting (ql , q2 ,q,) is (2.1 x lo2,
5.27 x lo', 5.39 x lo4) and the optimal P D controller
( k , , k , , k , ) is(1.45x10,7.24x10,3.1x102).Thespeed
response and applied voltage are shown in figure 12 and
13.
Fig. 10. Speed of (al , a2 ,a,) =(-500, -1000, -1500)
F
5c
-rm
1w
E 3 2m 291 0 om 001 0016 002 T" l W o ms om o m 5 om 0045 00s
Fig. 11. Voltage of (a, , a2 ,a,) =(-500, -1000, -1500)
,om ~~~~~~~~~. . . ~. . . ~ .... ~ ........
yQKp1 1w
200
' 0 0.m 001 DO>$ 002 0025 003 oms om 0045 0.m
T" B(*)
Fig. 8. Speed of (a, , a 2 , a,) =(-loo, -200, -300)
Fig. 12. Speed of (a, , a2 ,a,) =(-0.2, -4000, -5000)
- I ---KI , m 50
f;ri
t o
5
w w
tm lm
l i i 110
2W 2m
K o ~ oms 001 ooi i 002 ooa om om 004 DOAS om
2500 D m 5 001 o ms am ODE 003 0031 om o w 00s
PW*l T "W
Fig. 9. Voltage of (a, , a2 ,a,) =(-loo, -200, -300) Fig. 13. Voltage of (a, , a2 ,a,) =(-0.2, -4000, -5000)
477
5 Experimental results
Figure 14 shows the equipments of the BLDC motor.
The DSP chip of the BLDC motor adopts the
TMS320F240 of the Texas Instrument. The parameters of
the PID controller could he set through the interface
WinDSP. The speed response and duty of the traditional
PID controller are shown in figure 15. The width and
height of a grid represent 0.2 sec and 200 units
respectively. The speed response and duty of the optimal
PID controller are shown in figure 16. Table 3 lists the
experimental performance of the two different controllers.
Fig. 14. The DSP-Controlled BLDC motor
Fig. 15. Experimental results of the traditional PID
I I
Fig. 16. Experimental results ofthe optimal PID
Table. 3. Experimental performance of various controllers
Optimal PID
Rising time (s) 0.0373 0.0191
Settling time (s) 0.324
Overshoot (%)
6 Conclusions
This paper has presented a novel tuning formula that
uses the LQR methodology to seek the optimal PID
parameters. The main merits of the proposed scheme
include (I ) there is no need for the ohseiver design (2)
there is no constraint in the PID parameters (3) the
weighting functions could be determined through poles
assignment. The existence conditions of the optimal PID
controller for desired response are also :submitted. The
whole design idea has been successfully implemented on
the speed control of a BLDC motor. Computer
simulations and experimental results demonstrate that the
excellent performance of the optimal PID controller.
Acknowledgement
This research is sponsored by means of National
Science Council, under grant NSC-92-2213-E-214-014.
References
[l] 0. Moseler and R Isermann, Application ofModel-
Based Fault Detection to a Brushless DC motor, IEEE
Trans. NDElectron., vol. 35, No. 12, pp. 1015-1020,
2000.
[2] Hang C-C. K. J. Astrom and W. K. Ho,
Refinements of the Ziegler-Nichols tuning formula, IEE
Proc. Part D, vol. 138, No. 2, pp. 11 1-1 18, March 1991.
[3] M. Zhuang and D. P. Atherton, Optimum Cascade
PID Controller Design for SISO Systems, IEE Control,
vol. 1, pp. 606-611, 1994.
[4] Voda A. A. and I. D. Landaq A method of the
autocalibration of PID controllers, Autonmlica, vol. 3 1,
No. 1, pp. 41-53,1995.
[SI C.-L. Lin, H.-Y. Jan, and N.-C. Shieh, GA-Based
Multiobjective PID Control for a Linear Brushless DC
Motor, IEEUASME Trans. Mechatronics, vol. 8, No. 1,
pp. 56-65,2003,
[6] G. Marro, D. Prattichizzo, and E. Zattoni,
Geometric Insight Into Discrete-Time Cheap and
Singular Linear Quadratic Riccati (LQR) Problems,
IEEE Trans. Automatic Control, vol. 47, No. I , pp. 102-
107,2002.
[7] M.-R. Issa and E. Barbieri, Optimal PI-Lead
Controller Design, IEEE Proc. SystemTheory, pp. 364-
368, 1996.
[SI J.-B. He, Q.-G. Wang and T.-H. Lee, PVPID
Controller Tuning Via LQR Approach, IEEE Conference
on Decision & Control, pp. 1177-1 182, December 1998.
[9] Allan R. Hambley, Electrical Engineering:
Principles and Application, Prentice Hall, New J ersey
1997.
[IO] Chee-Mun Ong, Dynamic Simulation of Electric
Machinery, Prentice Hall, New Jersey, 1998.
478

You might also like