A Neuro-Fuzzy Controller For Speed Control of A Permanent Magnet Synchronous Motor Drive
A Neuro-Fuzzy Controller For Speed Control of A Permanent Magnet Synchronous Motor Drive
with Applications
Expert Systems with Applications 34 (2008) 657664
www.elsevier.com/locate/eswa
Abstract
This paper introduces a neuro-fuzzy controller (NFC) for the speed control of a PMSM. A four layer neural network (NN) is used to
adjust input and output parameters of membership functions in a fuzzy logic controller (FLC). The back propagation learning algorithm
is used for training this network. The performance of the proposed controller is veried by both simulations and experiments. The hard-
ware implementation of the controllers is made using a TMS320F240 DSP. The results are compared with the results obtain from a Pro-
portional + Integral (PI) controller. Simulation and experimental results indicate that the proposed NFC is reliable and eective for the
speed control of the PMSM over a wide range of operations of the PMSM drive.
2006 Elsevier Ltd. All rights reserved.
Keywords: Fuzzy logic control; Neural networks; Permanent magnet synchronous motor drive
0957-4174/$ - see front matter 2006 Elsevier Ltd. All rights reserved.
doi:10.1016/j.eswa.2006.10.002
658 C. Elmas et al. / Expert Systems with Applications 34 (2008) 657664
i DC
3 phase
V DC full bridge PMSM
inverter m
Sa Sc
ia
hysteresis
band ib
current
ic
controller
* e reference
r speed I* current
controller
regulator
r
r
d p
dt 2
Fig. 1. Block diagram of the speed control of a PMSM drive.
(NFC, PI), a reference current regulator, a hysteresis band the total phase inductances and ia, ib, ic are the phase cur-
current controller, a three phase PWM inverter. hr is the rents, VDC is DC link voltage and iDC is DC link current.
rotor position, xr is the actual speed and ia , ib , ic are the Assuming the PMSM phase windings are balanced, the
reference phase currents. The speed error ex is dierences model of the motor is obtained as follows. The stator volt-
between the reference speed xr and the actual speed xr. age equations of a PMSM in matrix form can be repre-
Using speed error ex, the speed controller generates I* ref- sented as
erence or control current. 2 3 2 32 3 2 3 2 3 2 3
va Ra 0 0 ia Laa Lab Lca ia ea
6 7 6 76 7 6 7d6 7 6 7
4 vb 5 4 0 Rb 0 54 ib 5 4 Lab Lbb Lbc 5 4 ib 5 4 eb 5
2.1. Motor and inverter dt
vc 0 0 Rc ic Lca Lbc Lcc ic ec
An equivalent circuit of a PMSM and three phase full 1
bridge inverter are given in Fig. 2. In this gure, va, vb, vc
are the phase voltages, ea, eb, ec are the back emfs, Ra, Correlations of the inductances in (1) can be represented as
Rb, Rc are the stator winding resistances, Laa, Lbb, Lcc is (Lyshevski, 1997),
iDC
Sa Sb Rc
Sc
va vb vc
V DC
ic
L cc
Lbc
Sa Sb Sc , r
ec f S Lca
N
L bb eb ea
L aa
Rb Ra
ib
L ab
ia
2.2. Hysteresis band PWM where I* is the output of the speed controller as seen from
Fig. 1, and it is called reference or control current.
A hysteresis band current controller is used to provide
pulse width modulation signals. The functions of hysteresis 3. Design of the neuro-fuzzy controller
band current controller is given in (9)
The block diagram of the NFC for the speed control of
1; ix ix P hrb the PMSM is shown in Fig. 3. The NFC is composed of a
hx 9
0; ix ix 6 hrb pattern set, an o-line learning algorithm with back prop-
agation and a neuro-fuzzy network. The neuro-fuzzy net-
where x represents a, b, c respectively, hx represents the work is trained using o-line learning algorithm. For the
functions of hysteresis band current controller ha, hb, hc, o-line learning, a pattern set is realized using dynamic sig-
hrb is the range of band hysteresis band current controller, nal analysis of the motor. The pattern set is a look up table
ix represents reference phase currents ia , ib , ic , ix represents that consist of ex(l), e_ x l and DI*(l). l is number of pattern
actual phase currents ia, ib, ic. Using the obtained functions in the pattern set (l = 1, . . ., 300). The look up table is used
of hysteresis band current controller, va, vb, vc the phase in o-line learning.
voltages depended on DC link voltage VDC is obtained as The NFC has two inputs, the speed error ex and the
following: derivative of speed error e_ x . The output is change of the
660 C. Elmas et al. / Expert Systems with Applications 34 (2008) 657664
pattern set
.
e ( l ) e ( l ) I * ( l )
off-line learning
algorithm ia , b , c
*
r e I
*
neuro-fuzzy current 6 3
regulator inverter PM SM
r d network
I *
and controller
dt e. neuro-fuzzy r r
controller
d p
dt 2
Fig. 3. Block diagram of the NFC for the speed control of the PMSM.
control current DI*. For the NFC, a four layer neural net- Layer II: In this layer, each node performs a fuzzy set and
work as shown in Fig. 4 is used. Layers I, II, III and IV rep- the Gaussian function is adopted as membership
resent the inputs of the network, the membership functions, function
the fuzzy rule base and the outputs of the network, 2
respectively. xII
1;j m II
1;j
netII1;j 2 ;
rII
1;j
3.1. The feedforward algorithm
y 1;j f1;j net1;j exp netII
II II II
1;j
Layer I: Inputs and outputs of nodes in this layer are rep- 2
xII
2;k m2;k
II
resented as
netII2;k 2 ;
netI1 ex ; y I1 f1I netI1 netI1 ex rII
17
2;k
netI2 e_ x ; y I2 f2I netI2 netI2 e_ x
y 2;k f2;k net2;k exp netII
II II II
2;k 18
where ex, e_ x are inputs and y I1 , y I2 are outputs of
input layer. In this layer, the weights are unity where mII II II II
1;j , m2;k and r1;j , r2;k are the mean and
and xed. the standard deviation of the Gaussian function,
respectively. There are j + k nodes in this layer.
Layer III: This layer represents rule base used in the FLC.
In this layer, a product operator is used to rep-
w IV
jk resent a rule in each node
m1II, j , 1II, j
netIII III III III III
jk x1;j x2;k ; y jk fjk netIII
jk netIII
jk 19
DC power
supply
is carried out. To describe the back propagation 3.2. The back propagation algorithm
learning algorithm, error criterion E is dened as
Layer IV: The error expression for the input of Layer IV
1 2
El el 21 oE oE oe oy
2 dIV
0 e 23
where M is total number of patterns for l = otIV
0 oe oy tIV
0
1, . . . , M. For each pattern, error value can be
written as The changing of wIV
jk is written as
el dl yl 22 oE oE otIV oa 1
DwIV
jk 0
dIV y III 24
where d(l) is the desired output and y(l) is the ac- owIV
jk ot IV
0 oa owIV
jk b 0 jk
tual output. Additionally, y is equal to the
change of the control current DI*.
reference
actual
1500
1200
speed (rpm)
900
600
300
0
0 0.4 0.8 1.2 1.6 2
time (s)
reference
actual
1500
1200
speed (rpm)
900
600
300
0
0 0.4 0.8 1.2 1.6 2
time (s)
Fig. 7. Experimental results of speed response at step reference speed
Fig. 6. Simulation results of speed response at step reference speed (1500 rpm) under nominal load (TL = 1 N m) (Vert. 450 rpm/div, Horz.
(1500 rpm) under nominal load (TL = 1 N m): (a) PI and (b) NFC. 200 ms/div): (a) PI and (b) NFC.
662 C. Elmas et al. / Expert Systems with Applications 34 (2008) 657664
" #
Using the value obtained from Eq. (24), wIV
jk is ot II 2 xII
1;j m1;j
oE oE 1;j II
adjusted DmII
1;j II d1;j 2
omII
1;j ot1;j omII 1;j r1;j
wIV IV IV
jk l wjk l 1 lw Dwjk l 25 " #
II 2 x II
m II
oE oE ot 2;k 2;k 2;k
DmII
2;k II dII
2;k 2
where lw is learning rate for wIV omII ot2;k omII
jk . 2;k 2;k rII
2;k
Layer III: In this layer, the error received from Layer IV is
computed as 28
2
oE oE otIV oy III
jk 1 " #
dIII
jk IV 0
dIV wIV
jk y 2 xII II
1;j m1;j
III
otjk ot0 oy jk otIII
III
b 0 oE oE otII 1;j II
jk DrII
1;j II II d1;j 3
or1;j ot1;j orII
26 1;j rII
1;j
" # 2
Layer II: The error received from Layer III is computed as oE oE ot II
2;k
2 xII
2;k mII 2;k
" ! # DrII
2;k II dII
2;k 3
orII ot2;k orII
oE X oE otIII II
jk oy 1;j
X III 2;k 2;k rII
dII
1;j II III II II
djk y III
jk
2;k
ot1;j otjk oy 1;j ot1;j
k
" ! #
k 29
oE X oE otIII II
jk oy 2;k
X III
dII
2;k II III II II
djk y III
jk
ot2;k j
otjk oy 2;k ot2;k j Using the values which are obtained from Eqs.
27 (28) and (29), mII II II II
1;j , m2;k and r1;j , r2;k weights
are adjusted as follows:
Additionally, in this layer, the changes of mII
1;j ,
mII II II
2;k and r1;j , r2;k are written as
4
control current (A)
-2
-4
-6
-8
0 0.4 0.8 1.2 1.6 2
time (s)
4
control current (A)
-2
-4
-6
-8
0 0.4 0.8 1.2 1.6 2
time(s)
Fig. 9. Experimental results of control current response at step reference
Fig. 8. Simulation results of control current response at step reference speed (1500 rpm) under nominal load (TL = 1 N m) (Vert. 2.6 A/div,
speed (1500 rpm) under nominal load (TL = 1 N m): (a) PI and (b) NFC. Horz. 200 ms/div): (a) PI and (b) NFC.
C. Elmas et al. / Expert Systems with Applications 34 (2008) 657664 663
mII II II
1;j l m1;j l 1 lm Dm1;j l by using a TMS320F240 digital signal processor (DSP).
30
mII II II
2;k l m2;k l 1 lm Dm2;k l
The DSP has 12 PWM outputs allow managing directly
power devices and high frequency PWM control. Three full
rII II II
1;j l r1;j l 1 lr Dr1;j l bridge IGBT modules (CM75DU-12H) are used for three
31
rII II II
2;k l r2;k l 1 lr Dr2;k l phase voltage source inverter. Three current transducers
are used for measuring the motor phase currents. An incre-
where lm and lr are learning rates, respectively, mental shaft encoder is used for sensing the motor position.
for mII and rII. The TDS3014 digital oscilloscope is used for obtaining the
experimental data.
The simulation and experimental results are obtained
4. Simulation and experimental results for dierent cases such as step speed and the variable load
condition.
To verify the feasibility of proposed NFC both com- Figs. 6 and 7 show simulation and experimental results of
puter simulation and experimental work have been carried speed response of the PI controller and NFC at step refer-
out. The results are compared with the results obtained ence speed (1500 rpm) under nominal load (TL = 1 N m),
from a PI controller. The model of the PMSM, the inverter respectively. As seen from the gures, there is generally
and the controllers which are given in Section 2 and in Sec- good agreement between simulation and experimental
tion 3 are used in the simulation and experimental algo- results. The motor actual speed closely follows the reference
rithms. In this study rst, computer simulations are made speed for all the controllers, but overshoot and oscillation
to verify initial feasibility of the proposed FSMC. The exist in the speed curves for PI controller.
parameters of the PMSM which is used in this study are
given in Appendix A. The simulation algorithms are writ-
ten in C programming language. The experimental setup
is shown in Fig. 5. The control of the system is realized
reference
actual
1500
1200
speed (rpm)
900
600
300
0
2 2.4 2.8 3.2 3.6 4
time (s)
reference
actual
1500
1200
speed (rpm)
900
600
300
0
2 2.4 2.8 3.2 3.6 4
time (s)
Fig. 11. Experimental results of speed response at step reference speed
Fig. 10. Simulation results of speed response at step reference speed (1500 rpm) under variable load condition (Vert. 450 rpm/div, Horz.
(1500 rpm) under variable load condition: (a) PI and (b) NFC. 200 ms/div): (a) PI and (b) NFC.
664 C. Elmas et al. / Expert Systems with Applications 34 (2008) 657664
Figs. 8 and 9 show control currents while motor is run- Table A.1
ning under the same conditions as in Figs. 6 and 7. As seen Motor parameters
from the gures, the control current is 6.5 A for all the con- Features Values
trollers during the transient and approximately 3.7 A for Number of phases 3
the PI controller and the NFC at steady state. As can be Power 400 W
seen from the gures, the chattering of the control current Maximum speed 2000 rpm
Maximum phase current 6.5 A
in the NFC and PI controller is low. Number of poles (p) 4
The load torque (TL = 1 N m) applied between 2.6 s Phase resistance (Rs) 1.6 X
and 3.4 s for variable load condition while the motor is Synchronous inductance (Ls) 2.4 mH
running under no load conditions. Figs. 10 and 11 show Back emf coecient (kf) 0.111 V s/rad
speed response in this case for the PI controller and Inertia (J) 0.001141 N m s2
Friction coecient (B) 0.000198 N m s/rad
NFC. As seen from the gures, overshoot and oscillation
exist in the speed curves for PI controller.
Both simulation and experimental results indicate that
the proposed NFC is less sensitive to the parameter varia- References
tions and external load disturbances than that of the con-
ventional PI controller. Batzel, T. D., & Lee, K. Y. (1998). Commutation torque ripple
minimization for permanent magnet synchronous machines with hall
5. Conclusions eect position feedback. IEEE Transactions on Energy Conversion,
13(3), 257262.
Chen, Y. C., & Teng, C. C. (1995). A model reference control structure
In this paper, an NFC for speed control of the PMSM using a fuzzy neural network. Fuzzy Sets and Systems, 73, 291312.
drive system is presented. A four layer NN is used to adjust Jang, J. S. R. (1995). Neuro-fuzzy modeling and control. Proceeding of the
input and output parameters of membership functions in IEEE, 83(3), 378406.
FLC. Simulation and experimental results indicate that Lee, C. C. (1990). Fuzzy logic in control systems: fuzzy logic controller,
Part I, Part II. IEEE Transactions on Systems Man and Cybernetics,
the proposed controller is reliable, eective in the speed
20(2), 404435.
control of the PMSM with various working conditions. Lin, C. T., & Lee, C. S. G. (1991). Neural-network-based fuzzy logic
The results also show that the NFC is able to tract the ref- control and decision system. IEEE Transactions on Computers, 40(12),
erence speed closely with almost no overshoots and 13201336.
oscillations. Lyshevski, S. E. (1997). Nonlinear robust control of permanent-magnet
synchronous motors: tracking and disturbance rejection. IEEE inter-
national conference on control applications, Hartford (pp. 115120).
Appendix A. Motor parameters Slemon, G. R. (1994). Electrical machines for variable-frequency drives.
Proceeding of IEEE, 82(8), 11231139.
See Table A.1. Zadeh, L. A. (1965). Fuzzy sets. Information and Control, 8(3), 338353.