Bài Báo Fpga
Bài Báo Fpga
Abstract—This work realizes the speed control for permanent II. CONTROL SYSTEM DESIGN OF PMSM DRIVES
magnet synchronous motor (PMSM) drives under the condition
of without position sensor. Rotor flux angle and rotor speed are A. Mathematical Model of PMSM
obtained by using the algorithm of sliding mode observer. And The typical mathematical model of a PMSM is described,
the fuzzy controller is adopted for controlling the speed of
in two-axis d-q synchronous rotating reference frame, as
PMSM in order to increase the robust performance. In this
paper, we provide an approach from modeling, system design, follows
co-simulation in Modelsim/Simulink to experiment in FPGA di d r Lq 1 (1)
= − s id + ω e iq + vd
which can be used to design and validate our proposed control dt Ld Ld Ld
system. Finally, both simulation and experiment results are
confirmed the effectiveness and correctness of the proposed diq L r K 1 (2)
= −ω e d id − s iq − ω e E + vq
FPGA-based fuzzy speed controller for PMSM which is without dt Lq Lq Lq Lq
position sensor.
where vd, vq are the d and q axis voltages; id, iq, are the d and q
Keywords: Simulink/Modelsim co-simulation, fuzzy controller,
FPGA, PMSM.
axis currents, rs is the phase winding resistance; Ld, Lq are the d
and q axis inductance; ω e is the rotating speed of magnet
I. INTRODUCTION flux; K E is the permanent magnet flux linkage.
FPGA board DC
Power
Speed loop Current Current loop
ω r* Fuzzy
iq* controller
vq Park-1
modify
Clark-1vref 1
Controller PI
vα PWM1
+ +
— —
d,q α, β vref 2 PWM2
PWM3
SVPWM Inverter
id* = 0 vd vβ PWM4
α, β a,b,c vref 3 PWM5
ωˆr + PI PWM6
iq iα ia iu
d,q α, β
ib A/D
iv
id iβ ic convert
α, β a,b,c
Park Clark
)
θe iα θe
A
B
QEP
Sliding mode iβ Z PMSM
observer vα Encoder
vβ ωr
1-Z-1
In Fig. 2, the tracking error and the error change are defined differential operator. From (10), the EMF developed is
by: calculated as
)
e(n) = ω r* (n ) − ω r ( n) (5) eα − sin θ e (11)
e = ∆ ωe K E
de(n) = e(n) − e(n − 1) (6) e
β cos θ e
The membership function has shape of symmetrical triangle and the SMO is designed by
and 49 controlling rules have form: d iˆα −rs / L 0 iˆα 1 vα − zα
= +
(12)
dt iˆβ 0 − rs / L iˆβ L vβ − zβ
If e was Am and de was Bn then uf was Cm,n (7)
Crisp value in the output of FC:
i +1 j +1 the discrete equation of (12) is:
∑∑c m ,n [ µ An (e)* µ Bn ( de)] i +1 j +1 iˆα (n + 1) σ 0 iˆα (n) vα (n) − eˆα (n) (13)
u f (e, de) =
n =i m = j
≈ ∑ ∑ cm ,n d n , m (8) ˆ = ˆ +ψ
i +1 j +1 iβ (n + 1) 0 σ iβ (n) vβ (n) − eˆβ ( n)
∑ ∑ [µ
n =i m = j
An (e) * µ Bn (de)] n =i m = j
we use [eˆα ê β ]T instead of [ zα z β ]T as the feedback value in
where cm,n dn,m is adjusting parameters for FC. The output of SMO; σ Ts , r and [iˆα iˆβ ]T is the estimated current on
≈ ψ ≈ 1 − Ts s
fuzzy supplies for digital PI controller (9): L L
iq* (n) = u p (n) + ui (n) fixed coordinate.
(9)
= ui (n − 1) + K p u f ( n) + Ki u f (n − 1) zα î − i (14)
Z = ∆ k * sign( α α )
u p (t ) zβ îβ − iβ
Kp where the current error is defined by
e 8 i* ( t)
de FI
Inference
DFI
Ki 8 q ~ ~ T ˆ
[ ] [ T
]
ecur ∆ iα iβ = iα − iα iˆβ − iβ . If k is large enough, the
Mechanism 1 − Z −1
uf ui ( t ) inequality in (21) can be satisfied and the SMO can enter into
1− Z −1
sliding mode condition.
Knowledge T
ecur e&cur <0 (15)
Base
Fig. 2. Structure of fuzzy sensorless speed controller Therefore, it generates the results of ecur = e&cur = 0 . The
C. Sliding Mode Observer back-EMF will be:
SMO block in Fig.1 constructed by a sliding mode zα eα − sin θ e (16)
z = e = ωe K E
observer, a bang-bang controller, two low-pass filters, and a
β β cos θ e
rotor FA computation was shown in Fig. 3. The equation of To alleviate the high frequency in bang-bang control, two
PMSM on the α − β [7]: low-pass filters (LPF) are applied to create smoother
vα rs + sL 0 iα − sin θ e back-EMF signal:
(10) ) ) )
v = i + ωe K E eα 2π f 0 zα eα filtered 2π f 0 eα
β 0 rs + sL β cos θ e e) = ) = )
(17)
where [vα vβ ]T and [iα iβ ]T are voltage on fixed coordinate β s + 2π f 0 zβ and eβ filtered s + 2π f 0 eβ
The rotor FA ( θˆe ) can be computed by:
and current on fixed coordinate, respectively; L is the
inductance of the d-axis or q axis; θ e is rotor FA; s is the
iα ) )
zα eα eα filtered
i e)
vα β z e)
v β β β filtered )
- )
β Sliding + Bang- Low- Low- θe + θout
Flux angle
mode bang pass pass
computation
+ observer controller filter filter )
- ) +
iα θcompensate
) )
Low- ωout
iβ
Speed
estimation pass
filter
ψ zβ ( n ) = k
ψ iβ ( n) Y 2πf 0
vα ( n ) - ~ k eˆβ ( n )
vβ ( n ) iβ ( n ) zβ ( n)
+ x + x + + ≥ x + x +
- σ - σ ~ z β (n) -
iβ ( n ) N
eˆα (n) î ( n ) zβ ( n ) = − k eˆβ (n) eˆβ (n)
α êβ ( n ) î β ( n )
x + x Y zα ( n ) = k 2πf 0
~ k
iα ( n) iβ ( n ) zα ( n ) eˆα (n)
- ~ ≥ x + x +
iα ( n ) zα ( n ) -
+
N zα ( n ) = −k eˆα (n) eˆα (n)
s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14
Estimate the current values and compute current errors Bang-bang control First LPF
Second LPF Computation of the rotor position Computation of rotor speed LPF &rotor FA out
Fig. 4 Hardware design of SMO algorithm
simulation to experiment system. Except the aforementioned faster than previous paper. In Fig.7(b) and Fig.9(b), the
controller’s VHDL codes, in implementation, the VHDL code current in d-axis (id) is approach to zero, it show that a good
for ADC and QEP interface circuits must be integrated for decoupling effect after using vector current control in Fig.1.
reading three-phase motor current and actual rotor FA, )
e
400
)
re 300 θ
respectively. The actual rotor FA is read by encoder is just g
e
D
(
used for comparing with estimated rotor FA. The main A200
F
r
devices are a PMSM, a DE2 board with Altera CycloneII to100
o
R θ
FPGA, a motor driver, and a power supplier. The parameters 0
(a) Time (s) 0.1
0 0.02 0.04 0.06 0.08
of PMSM and FPGA resources are listed in table 1 and table )
400
e )
2, respectively. The motor speed command was designed with e
r
g 300
θ
e
step response. The results for real rotor FA, estimated rotor (D
A200
F
FA, actual rotor speed, estimated rotor speed, and current r
to 100
o
control were shown in Fig. 6~9. R
0
θ
0 0.02 0.04 (b) 0.06 0.08 Time (s) 0.1
400
)
e )
e
r 300
g θ
e
D
(
A200
F
r
o
t 100
o θ
R
0
0 0.02 0.04 (c) 0.06 0.08 Time (s) 0.1
)
Fig. 6. Actual rotor FA ( θ e ) and estimated rotor FA ( θ e ) under PMSM
speed running at (a)500rmp, (b)1000rpm and (c)1500rpm in case simulation
)1500 Actual rotor Speed
m
rp speed command
(
d1000
e
e
p
s
r 500 Estimated
to
o rotor speed
R
Fig. 5 Experimental system 0
0 0.1 0.2 0.3 0.4 (a) 0.5 0.6 0.7 0.8 0.9
Time (s)
) 1
IV. COSIMULATION AND EXPERIMENT RESULTS (A
l
o Iq
tr 0.5
n
In the simulation and experiment of the rotor FA estimation o
c
t
n 0
in sensor speed control is considered and the running speeds e
rr
u
C Id
of PMSM with 500rpm, 1000rpm, and 1500rpm are tested. -0.5
0 0.1 0.2 0.3 0.4 (b) 0.5 0.6 0.7 0.8 0.9
Time (s)
The simulation and experiment results for the actual rotor FA,
Fig. 7. (a) Speed command, actual rotor speed, and estimated rotor speed
the estimated rotor FA are shown in Fig. 6 and Fig. 8, response (b) current response in case simulation
respectively. It presents that the estimated rotor flux position )
e
e θ
)
r 300
can follows the actual rotor flux position very well. The delay g
e
D
(
time in experiment (Fig.8) is about 200µs while PMSM A200
F
r
o
running speed at 500 rpm and about 100µs at 1500 rpm but in t 100
o
R
θ
2000
Speed
[5] Y. S. Kung and N. V. Quynh, "Simulink/ModelSim co-simulation of
)
M
P1500
command sensorless PMSM speed controller," in Industrial Electronics and
(R Applications (ISIEA), 2011 IEEE Symposium on, 2011, pp. 24-29.
d Estimated
e [6] Y. S. Kung and M. H. Tsai, "FPGA-Based Speed Control IC for PMSM
e1000 rotor speed
p
S Actual rotor Drive With Adaptive Fuzzy Control," Power Electronics, IEEE
500 speed Transactions on, vol. 22, pp. 2476-2486, 2007
0
[7] J. Zambada, Sensorless Field Oriented Control of PMSM Motors.
0 1 2 3 4 5 Time (s) 6
Microchip Technology Inc, datasheet, 2007
0.4
)
(A 0.3
l
o
rt 0.2 Iq
n
o
c
t 0.1
n
re
r 0
u
C -0.1 Id
-0.2
0 1 2 3 4 5 Time (s) 6
Fig. 9. (a) Speed command, actual rotor speed, and estimated rotor speed
response (b) current response in case of FPGA experiment
Simulation Experiment
Parameters Value Parameters Value
Stator resistor 1.3Ω Cont. torque 0.64 Nm
Stator inductance 6.3mH Input 3ΦAC 92V, 1.6A
Pole pairs 4 Rated output 0.2 kW
Inertia Jm=108*10-6 kgm2 Rated freq. 200 Hz
Rated
Friction factor F=0.0013 Nms 3000r/min
revolution
Simulation Experiment
Parameters Logic RAM Logic RAM
elements bits elements bits
Speed controller 2,887 0 2,887 0
Current controller 1,828 98,304 1,828 98,304
SMO 1,969 49,152 1,969 49,152
CPU 0 0 4,226 75,264
ADC 0 0 146 0
QEP 0 0 66 0
V. CONCLUSION
This study has been presented a fuzzy sensorless speed
control for PMSM drive and successfully demonstrated its
performance through Simulink/ModelSim cosimulation and
experiment on FPGA board.
REFERENCES
[1] S. Bolognani, L. Tubiana, and M. Zigliotto "Extended Kalman filter
tuning in sensorless PMSM drives," Industry Applications, IEEE
Transactions on, vol. 39, pp. 1741-1747, 2003.
[2] H. H. Chou, Y. S. Kung, N. V. Quynh, and S. Cheng, "Optimized
FPGA design, verification and implementation of a neuro-fuzzy
controller for PMSM drives," Mathematics and Computers in
Simulation.
[3] M. Jain, M. Singh, A. Chandra, and S. S. Williamson, "Sensorless
control of permanent magnet synchronous motor using ANFIS based
MRAS," in Electric Machines & Drives Conference (IEMDC), 2011
IEEE International, 2011, pp. 599-606.
[4] Z. Zhaoyong, L. Tiecai, T. Takahashi, and E. Ho, "FPGA realization of
a high-performance servo controller for PMSM," in Applied Power
Electronics Conference and Exposition, 2004. APEC '04. Nineteenth
Annual IEEE, 2004, pp. 1604-1609 Vol.3.