Professional Documents
Culture Documents
Chen 2009
Chen 2009
Chen 2009
on FPGA Boards
Hao Chen, Song Sun, Dionysios C. Aliprantis, and Joseph Zambreno
Department of Electrical and Computer Engineering Iowa State University, Ames, IA 50011 USA
I. I NTRODUCTION
A field-programmable gate array (FPGA) is a reconfig-
High-Speed Link
urable digital logic platform, which allows for the parallel
execution of millions of bit-level operations in a spatially Host Workstation FPGA Boards
free acceleration (where TL = 0) followed by a step load k2 = f (tn−1 + 0.5h, xn−1 + 0.5hk1 ) (11)
change (where TL is stepped to its rated value). The machine is k3 = f (tn−1 + 0.5h, xn−1 + 0.5hk2 ) (12)
excited by a balanced sinusoidal three-phase voltage set, which
k4 = f (tn−1 + h, xn−1 + hk3 ) . (13)
is expressed in qd-axes variables as
2
From (1)–(6), the system of ODEs can be expressed in the form
− 31 − 31
Vs cos(ωe t) px = f (t, x) by
s
vqs 3
s
vds 1 1 2π
= 0 − √3 √3 Vs cos(ωe t − 3 ) s
pi = Ai + Bvqds (14)
v0s Vs cos(ωe t + 2π3 )
1 1 1
(7) pωr = 0.375P 2 Lm s ′s
(iqs idr − isds i′s P
(15)
qr ) − 2J TL
2 2 2
J
Vs cos(ωe t)
= −Vs sin(ωe t) . where
T
0 i = isqs isds i′s ,
qr i′s
dr
Note that the zero-axis voltage is zero, and can be neglected in s
vqds
s
= vqs vds s
T
,
this case.
L2
Rs Lm R′r Lm
− σL − σLsmL′ ωr σLs L′r − σL ωr
III. FPGA I MPLEMENTATION L2 s r s
Lm R′r
m ω Rs Lm
r − σL σLs ωr
A = σLLs LRr σLs L′r
,
′
s
A. Simulation Architecture Lm R′ 1
σL′r ωr − σLr′ σ ωr
m s′
σLs Lr r
The transient response of the electric machine is obtained by Lm
− σL ′ ωr
Lm Rs
− σ1 ωr
R′
− σLr′
σLs L′r
the RK4 numerical integration algorithm [10]. This is a fixed- r r
1
step explicit integration algorithm, which is based on simple
σLs 0
numerical calculations (additions and multiplications), and is 0 1
σLs
B = − Lm ,
thus straightforward to implement on the FPGA. The RK4 σLs L′r 0
method for the initial value problem (px = f (t, x), x(t0 ) = x0 )
0 − σLLsmL′
is described by: r
1524
module is responsible for the generation of vqs s
and vds
s
. The iteration
s
v qds (tn1 )
x n1
‘ODE Function’ and ‘Vector Update’ modules constitute the n-1
1525
s
v qds DONE_M = 0 DONE_E = 0
START = 0
START_G
`
f START_G = 0 START_G = 1
START i (8 Clock Cycles) START_E = 0 START_E = 1
CLK
f5
DONE_E = 1
T START_E
i ª¬i
s s
i ics
ic º¼
s
i qs ds qr dr i 5th Equation
ST3
TL (6 Clock Cycles) DONE_E
legend: ST4 START_M = 0
state START_G = 0
DONE = 0
state transition START_E = 0
signals condition DONE_G = 1
signals
DONE = 1
Fig. 5. ODE function module DONE_G = 0
DONE_G
1526
TABLE II
MPMC I NDUCTION M ACHINE AND V OLTAGE S OURCE PARAMETERS
MPMCModuleInterface
DDR2 SDRAM
DDR2SDRAM SPLB
Rs 0.087 Ω P 4
Rr′ 0.228 Ω J 1.662 Kg·m2
plb_machine MicroBlaze
Ls 35.5 mH ωe 2π60 rad/s
35.5 mH 460 2/3 V
p
SPLB DPLB DPLB L′r Vs
Lm 34.7 mH Prated 50 HP
mb_plb
XilinxVirtexͲ5XC5VLX110T from the memory at the end of each simulation using the Xilinx
Microprocessor Debugger.
BusMaster BusSlave The exact same machine model was also implemented in
Matlab/Simulink. The verification of the results coming from
MPMC:MultiͲPortMemoryController
the FPGA implementation was performed versus a Simulink
SPLB:SlaveProcessorLocalBus
simulation using the ODE23tb solver with a maximum time
DPLB:DataProcessorLocalBus step of 10−5 s. Fig. 9 shows the transient response of all
five state variables and the electromagnetic torque during free
Fig. 8. Implementation architecture
acceleration followed by a step load change (at t = 1 s) from
both FPGA board and Simulink. The results from the FPGA
are superimposed on the Simulink waveforms, but they are so
Besides FPGA logic blocks, this device has the embedded
close that differences cannot be distinguished.
MicroBlaze soft processor whose software is written in C. The
Xilinx EDK was used to co-design the software and hardware of To compare simulation speed, we ran the simulation using
the device. The architecture of this embedded system is shown the ODE45 and ODE23 integration algorithms of Simulink
in Fig. 8. The machine model was implemented in the FPGA with maximum step size of 10−4 s (typically the two “sim-
hardware denoted by ‘plb machine.’ The software exchanges plest” available solvers), because they are implementations of
data with ‘plb machine’ through the CoreConnect Processor the explicit Runge–Kutta algorithm, albeit of a variable-step
Local Bus (PLB) denoted by ‘mb plb.’ The MicroBlaze is nature. The simulation speed was further increased by using
the ‘master’ device on the ‘mb plb,’ while other devices are the ‘Accelerator’ mode of Simulink, which replaces normal
considered ‘slaves.’ The MicroBlaze generates the clock signal, interpreted code with compiled code. The simulation times on
and is responsible for coordinating data exchanges between the an Intel Core2 Duo 2.2 GHz computer were 2.7 s for ODE45,
FPGA hardware and software. and 2.0 s for ODE23. The FPGA simulation time was 36.6 ms,
which represents a speed-up of two orders of magnitude. The
When the system starts up, the MicroBlaze sends an ini-
simulation time will be further decreased if the clock frequency
tialization signal and initial state values to the ‘plb machine.’
can be set to a higher value, if the simulation time step h is
Then it launches the simulation, and begins controlling the
increased, or if a lower order integration algorithm (e.g., the
execution of iterations, sending/updating the input data (i.e.,
trapezoidal algorithm) is used.
TL ) to the ‘plb machine’ at the beginning of each time step
calculation. The simulation output data (i.e., xn and Te ) are
stored in the registers of ‘plb machine’ as soon as each iteration V. C ONCLUSION
is completed. While the next iteration proceeds in the FPGA,
the MicroBlaze reads the data from the registers, and writes This paper presented the FPGA implementation of an induc-
it on the DDR2 memory embedded on the development board tion machine dynamic simulation, using the RK4 numerical
through ‘mb plb.’ In other words, the execution of iteration integration algorithm. The entire machine model has been
n + 1 in ‘plb machine’ takes place in parallel with the action developed using VHDL, synthesized, and implemented on an
of sending the data of iteration n to memory. FPGA board. An optimal VHDL design should be sought
for the purpose of economizing FPGA hardware resources,
IV. S IMULATION R ESULTS especially when the model has high complexity. A compari-
son between the simulation results from FPGA and Simulink
The parameters of the induction machine and voltage source demonstrates the validity of this implementation. Simulation
used for simulation are shown in Table II. Based on the options speed gains of two orders of magnitude demonstrate the perfor-
provided by the Xilinx EDK, the Processor-Bus clock frequency mance advantage of FPGAs compared to PC-based simulations.
was set to 66.67 MHz, a value less than the maximum clock FPGAs represent an interesting possibility for simulating more
frequency (89.735 MHz) in the post-place and route report of complex electrical power and power electronics-based systems
the Xilinx ISE. The simulation time-step h was 10−4 s. In because of their flexibility, high processing rates and possibility
this simple implementation, the simulation data were retrieved to parallelize numerical integration computations.
1527
Simulink FPGA
500
i sqs (A)
0
−500
500
i sds (A)
0
−500
500
qr (A)
0
i ′s
−500
500
dr (A)
0
i′s
−500
200
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
2000
Te (N·m)
−2000
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s)
R EFERENCES for the real time digital simulator,” in Int. Conf. Power Syst. Transients,
Montreal, Canada, Jun. 2005.
[8] C. Dufour, J. Bélanger, S. Abourida, and V. Lapointe, “FPGA-based real-
[1] M. Martar, M. Adbel-Rahman, and A.-M. Soliman, “FPGA-based real- time simulation of finite-element analysis permanent magnet synchronous
time digital simulation,” in Int. Conf. Power Syst. Transients, Montreal, machine drives,” in IEEE Power Electron. Spec. Conf., Jun. 2007, pp.
Canada, Jun. 2005. 909–915.
[2] P. Le-Huy, S. Guérette, L. A. Dessaint, and H. Le-Huy, “Real-time [9] P. C. Krause, O. Wasynczuk, and S. D. Sudhoff, Analysis of Electric
simulation of power electronics in power systems using an FPGA,” in Machinery and Drive Systems, 2nd ed. IEEE Press, 2002.
Canadian Conf. Electr. Comp. Eng., May 2006, pp. 873–877. [10] W. Gautschi, Numerical Analysis: An Introduction. Boston: Birkhäuser,
[3] ——, “Dual-step real-time simulation of power electronic converters 1997.
using an FPGA,” in IEEE Int. Symp. Ind. Electron., Montreal, Canada, [11] ModelSim User’s Manual Software Version 6.4a, Mentor Graphics Cor-
Jul. 2006, pp. 1548–1553. poration, Wilsonville, Oregon.
[4] J. C. G. Pimentel and H. Le-Huy, “Hardware emulation for real-time [12] P. P. Chu, RTL Hardware Design Using VHDL: Coding for Efficiency,
power system simulation,” in IEEE Int. Symp. Ind. Electron., Montreal, Portability, and Scalability. Hoboken, New Jersey: Wiley-Interscience,
Canada, Jul. 2006, pp. 1560–1565. 2006.
[5] J. C. G. Pimentel, “Implementation of simulation algorithms in FPGA [13] J. Cavanagh, Verilog HDL: Digital Design and Modeling. Boca Raton,
for real time simulation of electrical networks with power electronics Florida: CRC Press, 2007.
devices,” in IEEE Int. Conf. Reconfig. Comp. & FPGA’s, Sep. 2006, pp. [14] V. A. Pedroni, Circuit Design with VHDL. Cambridge, Massachusetts:
1–8. MIT Press, 2004.
[6] G. G. Parma and V. Dinavahi, “Real-time digital hardware simulation of [15] Xilinx Virtex-5 FPGA Data Sheet. [Online]. Available: http://www.
power electronics and drives,” IEEE Trans. Power Del., vol. 22, no. 2, xilinx.com/onlinestore/silicon/online store v5.htm
pp. 1235–1246, Apr. 2007. [16] XUPV5-LX110T User Manual. [Online]. Available: http://www.xilinx.
[7] T. Maguire and J. Giesbrecht, “Small time-step (< 2µSec) VSC model com/univ/xupv5-lx110T-manual.htm
1528