You are on page 1of 9

The block diagram of adaptive fuzzy

control for PMSM drive system

r
e
*
q
i
+
Inference
Mechanism
Reference
Model
1
1

Z
e
e A
1
1

Z
K
i
FI DFI
Knowledge
Base
+
+
_
_
m
e
Mechanism
f
u
P
K
+
I
u
t
K
m m
B s J
1
+
PMSM
1. Fuzzy controller
3. Reference model
*
r
e
m
e
r
e
m
e
r
e
Fuzzy controller (1/3)
1. Define as input variable of fuzzy controller, with e e A
U , DE , E 2. Define linguist value with { }. They are symmetrical triangular
membership function :
) k ( ) k ( ) k ( e
m
*
r
e e A
) ( ) ( ) ( 1 k e k e k e A A
1
A
0
A
1
A
2
A
3
A
4
A
5
A
6
0 6 -6
e
(e)
4 2 -4 -2
1
B
0
B
1
B
2
B
3
B
4
B
5
B
6
0 6 -6
de
(de)
4 2 -4 -2
1
(e)
A
i
A
i+1
e
e
e
i
=-6+2*i
e
i+1
=-4+2*i
2
e i 2 4
2
e e
e
1 i
A
i
+
=

=
+
*
) (
) (e
i
A

) ( ) ( e 1 e
i 1 i
A A
=
+
) (e
1 i
A
+

If is located between the and

then
e
i
e
1 i
e
+
e
de
Fuzzy controller (2/3)
3. Derive M fuzzy control rules from the dynamic response characteristics as
initial condition, such as:
m=1,2,..,M
m
f
m m
U is u THEN DE is e and E is e IF A
A1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12
m1
c1
m2
c2 c3
c4
m4
c5
m6
c6
m3
m5
output
t
Fuzzy controller (3/3)
c
00
dE
1
A
0
A
1
A
2
A
3
A
4
A
5
A
6
0 6 -6
e
e
E
d
e
d
e
(e)

(
d
e
)
1

A
3
(e)

A
4
(e)=1-
A
3
(e)

B
1
(
d
e
)

B
2
(
d
e
)
=
1
-

B
1
(
d
e
)
Rule 1: e is A
3
and de is B
1
then u
f
is c
13
Rule 2: e is A
3
and de is B
2
then u
f
is c
23
Rule 3: e is A
4
and de is B
1
then u
f
is c
14
Rule 4: e is A
4
and de is B
2
then u
f
is c
24
Defuzzification
42 24 41 14 32 23 31 13
42 41 32 31
42 24 41 14 32 23 31 13
f
d c d c d c d c
d d d d
d c d c d c d c
u
* * * *
* * * *
+ + + =
+ + +
+ + +
=
where 0
6
-
6
Fuzzy Rule Table
I nput of e (for i=3)
I
n
p
u
t

o
f

d
e

(
f
o
r

j
=
1
)
Fuzzy I nference and Output
A
0
A
1
A
2
A
3
A
4
A
5
A
6
c
01
c
02
c
03
c
04
c
05
c
06
c
10
c
11
c
12
c
13
c
14
c
15
c
16
c
20
c
21
c
22
c
23
c
24
c
25
c
26
c
30
c
31
c
32
c
33
c
34
c
35
c
36
c
40
c
41
c
42
c
43
c
44
c
45
c
46
c
50
c
51
c
52
c
53
c
54
c
55
c
56
c
60
c
61
c
62
c
63
c
64
c
65
c
66
B
0
B
1
B
2
B
3
B
4
B
5
B
6
B
0
B
1
B
2
B
3
B
4
B
5
B
6
d
31
=
A
3
(e)*
B
1
(de)
d
41
=
A
4
(e)*
B
1
(de) =(1-
A
3
(e))*
B
1
(de)
d
32
=
A
3
(e)*
B
2
(de)=
A
3
(e)*(1-
B
1
(de))
d
42
=
A
4
(e)*
B
2
(de)=(1-
A
3
(e))*(1-
B
1
(de))
4 2 -4 -2
4
2
-
4
-
2
and d
31
+d
32
+d
41
+d
42
=1
4. Construct the fuzzy system with from those M rules using the singleton fuzzifier,
product-inference rule, and center average defuzzifier method.
M
c c c ,.., ,
2 1
( ) de , e u
f
m n
1 i
i n
1 j
j m
n m
1 i
i n
1 j
j m
m n
m n
1 i
i n
1 j
j m
n m
1 i
i n
1 j
j m
B A
1 i
i n
1 j
j m
B A n m
f
d c
d
d c

de e
de e c
de e u
m n
m n
, ,
,
, , ,
*
*
) ( * ) (
)] ( * ) ( [
) , (

+
=
+
=
+
=
+
=
+
=
+
=
+
=
+
=
+
=
+
=
= = A

1. Use the gradient descent method to derive the
adaptive control law, and define the instantaneous
cost function
the parameters of will be adjusted
with
n , m
c
2. The discrete model of PMSM is as follows
2
r m
2
1 k 1 k
2
1
1 k e
2
1
1 k J )] ( ) ( [ ) ( ) ( + + = + = + e e
) (
) (
) (
) (
) (
, ,
,
k c
1 k J
k c
1 k J
1 k c
n m n m
n m
c
+ c
=
c
+ c
+ o A
1
1
1
1

|
|
.
|

\
|
=
z e
z ) e (
B
K
) k ( i
) k (
m m
m m
J / T B
J / T B
m
t
*
q
r
e
3. The current command, , and the output of fuzzy
controller, can be obtained by the following expression
4. Therefore, the expression between and is
*
q
i
f
u
with
and
f
u
r
e
) k ( u ) K K ( ) k ( u ) k ( i
f iw pw i
*
q
+ + = 1
) ( ) ( ) ( ) ( ) ( 1 k u K K 2 k u 1 k k
f iw pw i r r
+ + + = + + e u e
) / exp(
m m
J T B = u
m t
B 1 K / ) ( u + =
5. using the chain rule,
6. Therefore, the parameters of fuzzy controller can be
) (
) (
) (
) (
) (
) (
) (
, ,
k c
k u
k u
1 k
1 k e
k c
1 k J
n m
f
f
r
n m
c
c
c
+ c
+ =
c
+ c e
m , n iw pw
m , n iw pw n , m
d ) k ( e ) ( Sign ) K K (
d ) k ( e ) K K ( ) k ( c
+ o
+ o A
+ ~
+ =
with m = j, j+1 and n = i,i+1
Reference model (RM)
2
n n
2
2
n
r
m
s 2 s s
s
e e
e
e
e
+ +
=
) (
) (
*
1. Typical second order system is used as RM
) 2 k ( a ) 1 k ( a
) k ( a ) 2 k ( b ) 1 k ( b ) k (
*
r 2
*
r 1
*
r 0 m 2 m 1 m
+ +
+ =
e e
e e e e
2. Using the bilinear transformation, the difference
equation of second order system can be
obtained
control IC for PMSM drive
r
e
r
e
r
e
r
e
r
e
r
e
SVPWM
PI
PI
rx
v
rx
v
ry
v
ry
v
rz
v
rz
v
a
i
a
i
w
i
w
i
c
i
c
i
*
q
i
*
q
i
*
d
i
*
d
i
+

o
v
o
v
|
v
|
v
d
v
d
v
q
v
q
v
Z
3-Phase
inverter
PWM1
PWM2
PWM3
PWM4
PWM5
PWM6
Current
detector
u
i
u
i
U
V
W
q
i
q
i
d
i
d
i
+
Encoder
detection &
Transform.
Circuit
Rectifier
+
ac source
A/D
b
i
b
i
1
Modified
Clarke
1
Park
1
Park
Park Clarke
A
B
| o,| o,
| o,| o,
c b a , , c b a , ,
c b a , , c b a , ,
| o,| o,
q d,q d,
| o,| o,
q d,q d,
+
+ +
Z Z B
B A A
, ,
, ,
+
+ +
Z Z B
B A A
, ,
, ,
Sin&Cos
=0
LPF
A/D LPF

i
FPGA-based adaptive speed control I C
Sampling frequency of current loop: 16kHz
PMW: 4~8MHz
Sampling frequency of Speed loop:2kHz
e
u
PMSM
Encoder
Comparator
r
e
Inference
Mechanism
*
r
e
Reference
Model
1
1

Z
e
de 1
iw
Z 1
K

FI DFI
Knowledge
Base
m
e
+
+
_
_
e
Mechanism
r
e
f
u
1
1

Z
p
u
pw
K
+
+
p
u
i
u
m
e
Speed loop designed by AFC
Current loop using vector controller