You are on page 1of 6

This is preprint version of manuscript.

The final version is available at: http://ieeexplore.ieee.org/document/5984237/

Permanent magnet synchronous motor discrete


linear quadratic speed controller
Lech M. Grzesiak Tomasz Tarczewski
Institute of Control and Industrial Electronics Institute of Physics
Warsaw University of Technology Nicolaus Copernicus University
Warsaw, Poland Toruń, Poland
Email: lmg@isep.pw.edu.pl Email: ttarczewski@fzyka.umk.pl

Abstract—This paper describes a discrete linear quadratic speed controller described in this paper allows impact on the
speed regulator (LQR) for permanent magnet synchronous mo- response of each state variable.
tor design. Linearization and decoupling processes of a motor
model were discussed. An internal input model was introduced II. M ATHEMATICAL MODEL OF A MOTOR
to control algorithm in order to eliminate the steady state
AND AN INVERTER
speed error caused by step reference speed as well as load
torque variations. Simulation tests of the drive system with the In an orthogonal d, q coordinate system that rotates at the
PMSM, were carried out in the Matlab-Simulink environment.
electrical speed of the rotor the expression of the voltage and
The designed discrete control algorithm was implemented in a
digital signal processor (TMS320F2812) and tested in a setup flux equation of PMSM is [2]:
system. Simulation and experiment test results confirm properly dψd
operation of the designed drive system. ud = Rs id + − pωm ψq (1)
dt
I. I NTRODUCTION dψq
uq = Rs iq + + pωm ψd (2)
dt
Permanent magnet synchronous motors - PMSM are com-
monly used in small and middle power range motion control ψd = Ld id + ψf (3)
applications because of their reliability, excellent dynamics,
large overload and compact structure [1], [2], [3]. ψq = Lq iq (4)
The speed control of the PMSM is most often realised in where: ud , uq , id , iq , ψd , ψq are voltages, currents and fluxes
a classical cascade structure with PID controllers [4]. Sliding in d and q axis respectively, Ld , Lq are inductances in d and
mode control [5], [6] and nonlinear control based on neural q axis, Rs is resistance of stator, ψf is permanent magnetic
networks and fuzzy logic [7] can be used in cascade structure flux linkage, p is number of pole pairs and ωm is rotor angular
to ensure robustness of the drive. Classical structure is also speed.
used in sensorless control of the PMSM [4]. Additional For a surface mounted permanent magnet machine induc-
signals from observers are also applied to improve control tance in d axis and inductance in q axis are in practical equal
precision [8], [9]. due to magnetic symmetry in circuit [3]: Ld = Lq = Ls . In
State feedback control can be an alternative for a typical such a case an instantaneous value of electromagnetic torque
cascade structure [10], [11]. State feedback speed control is proportional to the current instantaneous value in q axis and
of the PMSM requires an internal input model to eliminate then the torque can be expressed as:
a steady state speed error caused by step reference speed
3
command as well as load torque variations. Due to the coupled, Te ∼
= pψf iq = Kt iq (5)
non-linear model of the PMSM, the use of the linear control 2
theory to design a state feedback discrete speed controller where: Kt is the motor torque constant.
is not obvious. To accomplish this task we have to modify The mathematical model of a power electronic inverter has
the mathematical model to a linear form. The linearization to be considered in order to design a PMSM speed controller.
method with additional variables proposed in [12], [13] was The inverter dynamics can by approximated by using the
used. The design of a state feedback PMSM speed controller proportional element. Because the dead time of transistors can
requires the appointment of a gain matrices. Techniques such be ignored, the switching frequency is much higher than the
as the LQR method have been used to achieve the designed electrical time constant of PMSM and the inverter operates in
behaviour [11], [13], [14]. a linear range. The inverter model can be described as follows
The properties of the proposed control system with a [12], [13]:    
state feedback speed controller were verified in simulation as ud udc
= Kp (6)
well as in experiment results. The nonconventional discrete uq uqc
where: udc and uqc are the inverter control voltages for d and Scopes
q components of the stator space vector voltage, Kp is the
inverter gain. wrefn Tl idn iqn wmn
After putting flux equations (3) and (4) into (1) and (2)
respectively and taking into account mathematical model of the
inverter (6), the voltage equations can be described as follows:
Load
did Rs Kp
= − id + pωm iq + udc (7) Tl id Ki
dt Ls Ls idn
diq Rs 1 Kp ZOH
= − iq − pωm id − pωm ψf + uqc (8)
dt Ls Ls Ls iqn udd udc ud ud iq Ki
The voltage equations presented above are non-linear due ZOH
to the cross couplings and the product of angular speed wmn
and currents in d and q axis respectively. The linearization ZOH uqq uqc uq uq wm Kw
process of the PMSM model was carried out by defining new
wrefn (6)
variables [12], [13]:
Inverter PMSM Measuring
Ls pωm iq Controller units
udo = − (9) Kw
Kp
idn
Ls pωm id + pωm ψf
uqo = (10)
Kp udo
Reference
Equations (9) and (10) were put into (7) and (8) respectively. iqn
The linearization process of the PMSM model has been
described in detail in [12], [13]. The voltage equations take uqo
the following form after the linearization process: wmn
did Rs Kp (9 - 10)
= − id + udd (11)
dt Ls Ls Decoupling unit
diq Rs Kp
= − iq + uqq (12) Fig. 1. Block diagram of designed control system with PMSM
dt Ls Ls
It can be seen that the cross couplings were eliminated because
equation (11) consist only variables with index d and equation
(12) consist only variables with index q. III. D ISCRETE LINEAR QUADRATIC CONTROLLER
To complete the model of a PMSM, the following equation
of mechanical motion have been added:
The PMSM model must be rewritten into a linear state
dωm 1 equation form in order to design a linear quadratic controller.
= (Te − Bm ωm − Tl ) (13)
dt Jm The discussed state equation of the PMSM model can be
where: Jm is PMSM moment of inertia, Bm is viscous friction, described as follows (assuming that external disturbance Tl
TL is torque load. is not present):
Using a linearized model of PMSM to design the discrete
speed controller required that an additional decoupling unit be dx
= Ax + Bu (15)
introduced into control system. The role of the decopuling unit dt
is to complement controller signals udd and uqq by voltages
udo and uqo respectively. The structure (Simulink model) of
the control system is presented in Fig. 1.
Measuring units connected to the outputs of the PMSM
model cause outputs signals to reach ±1 p.u. values respec-
tively. The values of Ki and Kω used in measuring units are
as follows:
1 1
Ki = , Kω = (14)
2Isn ωn
where: Isn = 3, 3 A is the nominal current of the PMSM,
ωn = 367 rad/s is the nominal angular speed of PMSM.
A graphical representation of the decoupling block described
by equations (9) and (10) with respect to measuring units is Fig. 2. Block diagram of the decoupling unit
presented in Fig. 2.
where: The vector of the state variables in equation (19) was aug-
    mented by an internal model of step input (additional state
id − Rs 0 0 variable ec ). The discussed state variable ec corresponds to
   Ls 
x=
 iq  , A =  0
  −RLs
s
0 ,
 the integral of the angular speed error:
Kt
ωm 0 Jm −B
Jm
m
Zt
  ec (t) = (ωmn (τ ) − ωref n (τ )) dτ (21)
Kp
Ls 0  
0
u
Kp  , u =  dd 
 
B=
 0 Ls
(16) The control law for system (19) is:
uqq

0 0
uni (t) = −Ke ec (t) − Kx xn (t) (22)
The state equation with gains Ki and Kω of the measuring
Equation (22) presented above must be written in a discrete
units takes the following form:
form:
dxn uni (n) = −Kde ec (n) − Kdx xn (n) (23)
= An xn + Bn un (17)
dt
The discrete form of equation (21) was obtained by using the
where:
    backward Euler discretization method:
idn −R s
0 0
   Ls
 ec (n) = ec (n − 1) + Ts [ωmn (n) − ωref n (n)] (24)
xn = 
 iqn  , An = 
  0 −Rs
Ls 0 ,
where: Ts = 62, 5 µs is the sampling time.

Kt Kω
ωmn 0 Jm K i −B
Jm
m
The gain matrices of the discrete linear quadratic controller

Kp 1
 have the following form:
Ls Ki 0  
 
 Kp 1
 udd ke1
Bn =  0  , un =   (18) Kde = ,
 Ls Ki 
uqq ke2
0 0  
kx1 kx2 kx3 kx4
Kdx = (25)
To achieve the zero steady state speed error for a step kx5 kx6 kx7 kx8
reference signal, type 1 system must be designed [10]. The
basic principle of the type 1 system design is to use an The block diagram of the discrete linear quadratic speed
additional state signal constituted by an integral of reference controller with an internal input model was presented in Fig. 3.
and measured angular speed. The state equation of PMSM
with an inverter and the internal model of step input are given
by the equation:
1 kx1
dxni idn
= Ani xni + Bni uni + Eni ωref n (19)
dt
2 kx2
where: iqn
  1
−Rs
Ls 0 0 0 udd
  3 kx3
 0 −R
Ls
s
0 0  wmn
Ani = ,
 
Kt Kω
 0 Jm Ki −B
Jm
m
0  Ts z ec
  4 ke1
z-1
0 0 1 0 wrefn

   
Kp 1 kx4
Ls Ki 0 0
 Kp 1
  
 0 Ls Ki
  0 
Bni = , Eni =  ,
   
kx5

 0 0 

 0



2
0 0 −1 uqq
kx6
 
idn  
 
 i
 qn
 udd ke2
xni =  , uni =  (20)
 
 ωmn  uqq
 
Fig. 3. Schematic diagram of the linear quadratic controller
ec
Gain matrices of the discrete speed controller were de- system will work in the angular speed range 0 ÷ 60π rad/s.
termined by using the linear quadratic optimization method This assumption allows a reduction of the inverter intermediate
[11], [13], [14]. Matlab lqrd function was used to design circuit voltage to Udc ≈ 124 V and the sets given in Tab. I
a discrete linear quadratic controller for the PMSM model value of the inverter gain Kp .
described by a continuous state equation. For the sake of the Computed for PMSM with parameters given in Tab. I,
sampling time Ts = 62, 5 µs taken, the system consisting of sampling time Ts = 62, 5 µs and the weight matrices (27)
Ani and Bni matrices must be optimally scaled first. Matlab discrete speed controller gain matrices are as follows:
function prescale was used to obtain a state-space model with  
maximized accuracy. The scaled model is equivalent to the 0
Kde = ,
system described by matrices Ani and Bni . The following 217, 9115
matrices are obtained as a result of the scaling procedure:  
0, 0573 0 0
Kdx = (28)
0 0, 4773 8, 4472
 
−RLs
s
0 0 0
 
 0 −RLs
s
0 0  IV. S IMULATION AND EXPERIMENTAL RESULTS
Api =  ,
 
1 Kt Kω Bm Simulation tests of the drive system with the PMSM,
 0
 4 Jm Ki − Jm 0 

inverter and the designed state feedback speed controller were
0 0 2 0
carried out in the Matlab-Simulink environment.

1 Kp 1
 The experiments were carried out by using a 628 W PMSM
1024 Ls Ki 0 drive system with a commercial servo-drive [15]. The servo-
 
1 Kp 1 drive used was equipped with an inverter and a digital signal
 0 128 Ls Ki

Bpi = (26)
 
 processor TMS320F2812 produced by Texas Instruments. The
 0 0 
  schematic diagram of the laboratory stand of the PMSM drive
0 0 used in the experiment was presented in Fig. 4.
Simulation and experimental tests were carried out without
The Matlab ctrb function was used to check the control-
load as well as with nominal PMSM load Tln = 1, 5 Nm = 1
lability condition of the system described by matrices Api
p.u. The load was carried out by using another PMSM in the
and Bpi . Speed controller design requires the definition of
experiment.
the weight matrices Q and R. The values of these matrices
are as follows:
 
5,5×10−3 PC
 Ki2
0 0 0 
 −3

5,5×10 A/D SCI
0 0 0
 
 Ki2  DI
Q= 
Buses
3×10−4
 
 0 0 Kω2 0 
DSP core
 
 −1

3,65×10
0 0 0 K 2
ω
DO
  PWM
1 0
R= (27)
0 1
The values of the matrices presented above were provide:
the required PMSM speed without overshoot, achieve 0, 5
p.u. value of phase currents for step speed change from 0 p.u.
to 1 p.u. without load. The trial- and -error procedure was used
to determine the Q and R matrices. The basic parameters of
the drive with PMSM was presented in Tab. I. The designed

TABLE I
BASIC PARAMETERS OF THE DRIVE WITH PMSM

Parameter Value Unit


Rs 8, 5 × 10−1 Ω PMSM R
Ls 3 × 10−3 H
Kt 3, 5 × 10−1 Nm/A
Jm 1 × 10−4 kgm2 RDC Load
Bm 1, 1 × 10−3 Nms/rad
p 3
Fig. 4. Schematic diagram of the laboratory stand
Kp 64, 5
Fig. 5. Simulation test results of the drive system without load A) reference Fig. 6. Experiment test results of the drive system without load A) reference
and measured angular speed, B) angular speed error, C) torque load, D) phase and measured angular speed, B) angular speed error, C) torque load, D) phase
A current, E) phase B current A current, E) phase B current

The angular speed error in p.u. presented in the figures was load torque used in simulation causes that phase currents
determined by the following formula: values reach 0, 9 p.u.
Experimental test results for a PMSM drive with nominal
∆ωmn = ωref n − ωmn (29) load are shown in Fig. 8. Properly speed error reduction rate is
presented in Fig. 8B). Nominal torque load used in experiment
The simulation test results for a PMSM drive without load makes the phase currents values reach 0, 84 p.u.
are presented in Fig. 5. Caused by angular speed reference
the step change speed error depicted in Fig. 5B) is effectively V. C ONCLUSION
reduced to zero thanks to an internal input model. The use of This paper presents a discrete linear quadratic PMSM
a discrete speed controller with gain matrices (28) resulted in speed controller design process. Linearization and decoupling
the lack of overshoot in angular speed response. The lack of process of the PMSM model was discussed. The presented
the torque load makes the phase current values smaller than discrete controller was designed for a linearized model of
0, 26 p.u. the motor with an inverter. Measuring units gains were taken
The results of the experiment shown in Fig. 6 confirmed into account during discrete controller design. An internal
the proper operation of the drive without load. Depicted in input model was introduced to the control algorithm in order
Fig. 6B) angular speed error is free from the overshoot. to eliminate the steady state speed error caused by step
A steady state speed error is not present either. The phase reference speed as well as load torque variations. The values
currents values shown in Fig. 6D) and Fig. 6E) are smaller of controller weight matrices were selected to achieve the
than 0, 21 p.u. respectively. required PMSM speed without overshoot and to achieve the
The simulation test results for a PMSM drive with nominal 0, 5 p.u. value of phase currents for a step speed change from
load are presented in Fig. 7. Caused by torque load step 0 p.u. to 1 p.u. without load.
change, the speed error depicted in Fig. 7B) is effectively The proposed control algorithm was implemented in a DSP
reduced to zero thanks to an internal input model. The nominal controller (TMS320F2812).The simulation and experiment test
Fig. 7. Simulation test results of the drive system with nominal load A) Fig. 8. Experiment test results of the drive system with nominal load A)
reference and measured angular speed, B) angular speed error, C) torque load, reference and measured angular speed, B) angular speed error, C) torque load,
D) phase A current, E) phase B current D) phase A current, E) phase B current

results presented in this paper confirm the proper operation [7] T. Pajchrowski and K. Zawirski, “Robust Speed Controller of PMSM
of the designed control system. The accuracy of simulation based on Adaptive Neuro-Fuzzy Inference System,” Electrical Review,
iss. 85, pp. 12-17, Aug. 2009.
and experiment test results confirms that the model and [8] X. Yue, D. M. Vilathgamuwa and K.-J. Tseng, “An observer-based robust
linearization method are correct. adaptive controller for permanent magnet synchronous motor drive with
initial rotor angle uncertainty,” IEEE Trans. Energy Convers., vol. 20, iss.
ACKNOWLEDGMENT 1, pp. 115-120, Mar. 2005.
[9] K.-H. Kim and M.-J. Youn, “A nonlinear speed control for a PM
Research work partially financed by The Ministry of synchronous motor using a simple disturbance estimation technique,”
Sciences and Higher Education (Poland) under Grant no. IEEE Trans. on Ind. Electron., vol. 49, iss. 3, pp. 524-535, Jun. 2002.
[10] K. Ogata, Modern control engineering, Prentice Hall, Inc., 2002.
N N514 663640 (from 2011 to 2013). [11] K.-T. Chang, T.-S. Low and T.-H. Lee, “An optimal speed controller
for permanent-magnet synchronous motor drives,” IEEE Trans. Ind.
R EFERENCES Electron., vol. 41, iss. 3, pp. 503-510, Oct. 1994.
[1] M. P. Kaźmierkowski and H. Tunia, Automatic Control of Converter-Fed [12] L. M. Grzesiak, T. Tarczewski and S. Mandra, “Permanent magnet
Drives, Elsevier, 1994. synchronous servo-drive with state position controller,” 13th Power Elec-
[2] K. Zawirski, Control of Permanent Magnet Synchronous Motor, tronics and Motion Control Conference, EPE-PEMC 2008, pp. 1071-
Wydawnictwo Politechniki Poznaskiej, 2005, in Polish. 1076.
[3] T. Glinka, “Electric motors with permanent magnets,” Electrical Review, [13] T. Tarczewski and L. M. Grzesiak, “High precision permanent magnet
iss. 84, pp. 1-7, July 2008. synchronous servo-drive with lqr position controller,” Electrical Review,
[4] D. Janiszewski, “Unscented Kalman Filter Based Permanent Magnet iss. 85, pp. 42-47, Aug. 2009.
Synchronous Motor Sensorless Control,” Electrical Review, iss. 86, pp. [14] A. Tewari, Modern control design: with MATLAB and SIMULINK, John
169-174, Feb. 2010, in Polish. Wiley and Sons, 2002.
[5] S. M. Fazeli, H. A. Zarchi, J. Soltani and H. W. Ping, “Adaptive sliding [15] K. Z. Karwowski, K. J Karwowski, S. Mandra, M. Mizan and
mode speed control of surface permanent magnet synchronous motor A. Wawrzak, “The new SDMT - family of servo-drives for CNC systems
using input-output feedback linearization,” International Conference on with permanent magnet synchronous motors,” International XV Sympo-
Electrical Machines and Systems, ICEMS 2008, pp. 1375-1380. sium Micromachines and Servosystems, 2006, pp. 217-223.
[6] Y. Li, J.-B. Son and J.-M. Lee, “PMSM speed controller using switching
algorithm of PD and Sliding mode control,” International Joint Confer-
ence ICCAS-SICE 2009, pp. 1260-1266.

You might also like