Sunteți pe pagina 1din 6

An FPGA-Based Rapid Prototyping Platform For Variable-Speed Drives

Francesco Ricci Hoang Le-Huy


Dept. of Electrical and Computer Engineering Dept. of Electrical and Computer Engineering
UniversitC Laval Universitk Laval
Quebec, Canada Quebec, Canada
fricci@gel. ulaval.ca lehuy@gel. ulaval.ca

Abstract - This paper presents a novel approach to the design and steps. An application example using a DTC induction motor
implementation of controllers for variable-speed drives using drive is presented and discussed.
Simulink and FPGA software. A rapid prototyping ]platform
based on FPGA is proposed and described. The design procedure 11. APPROACHES FOR PROTOTYPING
using this platform is presented to illustrate the important steps.
VARIABLE-SPEED DRIVES
An application example using a DTC induction motor drive is
presented and discussed. A prototyping system is required at every stage of the devel-
opment cycle for a VSD since it provides the designer an envi-
1. INTRODUCTION ronment and necessary tools to edit, compile, test, and debug
the control code under operating conditions similar to that of
Variable-speed drives (VSD) are complex systems com- the actual VSD. The complexity of a prototyping system
posed of components of different nature: power converter,
depends largely on that of the controller chip used.
electrical machine, and control system. Design and prototyping Fig. 1 shows a general configuration of a typical VSD proto-
of such systems require complex operations which are usually
typing system which consists of two main sections: the power
time consuming. A common method to reduce the prolotyping
system (power converter and motor) and the control system.
time for VSD is to use a rapid prototyping system baried on a An interface, including acquisition system and power switch
DSP board. drivers, is required to connect the control system to the power
The conventional approach to design VSD controllers con-
system. A PC is usually used as development platform for sim-
sists in two main phases: simulation and implementation. ulation and code generation.
These two phases are usually carried out sequentially on two
different platforms. First, simulation is performed using a sys- A typical design process of a VSD control system consists
tem simulator (such as MATLABKimulink) to perfect the of several steps as illustrated in the flow diagram shown in Fig.
design. The system can be then implemented on DSP tiy using 2.
C code generated from the model. The design process can be divided into two successive
If Field Programmable Gate Arrays (FPGA) are used instead phases: simulation and implementation. During the simulation
of DSP for controller implementation, it becomes possible to phase, the VSD is modeled and simulated with the best accu-
shorten the design and prototyping time by using hardware racy possible to represent the operation of the drive under dif-
models in the simulation phase. Once debugged and optimized, ferent operating conditions. The performance of the controller
the simulated controller model can be converted directly into is evaluated and some design iterations are required to opti-
implementable code for the FPGA. One debugging step can be
thus avoided. Sensors
Xilinx (an FPGA producer) designed a s o h a r e package
Power
that enables the simulation of FPGA functions in Sirnulink Load
Converter Motor
environment. The product is a Simulink Blockset, named Sys-
tem Generator, that can be used for both simulation and. imple-
mentation of FPGA. Therefore, the control algorithm needs to
be built only once. With this tool, the implemented algorithm
in the FPGA will act exactly like in the simulation without
Controller
compatibility problems.
Another important advantage of FPGAs is their capability of --
PC

LE
parallel operation that can greatly increase the execution speed
of the control algorithm.
This paper presents a novel approach to the design and
implementation of controllers for variable-speed drives using
Simulink and FPGA soilware. A rapid prototyping platform I’
based on FPGA is proposed and described. The design proce-
dure using this platform is presented to illustrate the important Fig. I Configuration of a typical VSD prololyping System

1 I56
Another advantage of the proposed approach concerns the
System requirements execution speed of the implemented controller. Since all opera-
tions in FPGAs are in parallel in hardware, the control algo-
rithm can be executed very fast and a high sampling rate can he
used for the controller. As a result, the complexity of the con-
SIMULATION Simulation trol algorithm is no longer a limiting factor for its implementa-
tion.

Ill. DESCRIPTION OF THE PROPOSED RAPID


PROTOTYPING PLATFORM

*
A block diagram of the proposed rapid prototyping platform
for VSD is shown in Fig. 3.
The power section consists of an induction motor driving a
DC motor which is used as mechanical load. The induction
IMPLEMENTATION Performanceevaluation motor is fed by a three-phase IGBT inverter.
The control system for the VSD is implemented in a FPGA
on the master hoard which is a XSV300 board (from XESS).
The communication between this board and the PC is achieved
by a standard parallel link.
A second FPGA board (XSV40 from XESS) is used as an
interface between the control section (Master board) and the
Fig. 2 Typical design steps for a VSD control system.
power section. The functions of this FPGA are to generate the
mize its performance. The following phase is the implementa- gate drive signals for the inverter IGBTs and to control the A-
tion of the simulated controller on actual hardware to verify its to-D converter (THS1207 from Texas Instruments). The con-
real-time performance. figuration of this FPGA is programmed once and remains fixed
In a conventional design approach, simulation and imple- unless modifications of IiO signals are necessary.
mentation phases are performed on two different platforms. The motor currents (I, and Ib) are detected by two Hall-
Simulation is usually done on workstation or PC using C pro- effect LEM current sensors. The motor voltages are reconsti-
grams or a system simulator (for example Simulink, Saber, tuted from the DC link voltage (measured by a Hall-effect
etc.). For the implementation phase, the controller C program LEM voltage sensor) and the inverter switching signal.
(which is directly written for the simulation and modified for The communication between the master and slave boards is

,
the implementation or automatically generated by a specialized done through a high-speed bidirectional optical link (33 Mhitsi
tool such as the Real-Time Workshop of Simulink) is modified s) that ensures the required galvanic isolation between the con-
to suit the hardware. The compiled code is then downloaded to trol system and the power converter. Two Agilent optical pro-
the hardware (DSP or microcontroller board) for execution and totyping kits (HFBR-0536) and 10 meters of plastic optic fiber
debugging. Some iterations between the simulation and imple- were used.

,
mentation phases are required to fine tune the controller.
This approach tends to he somewhat lengthy due to the code
modification and adaptation required to move from the simula- Load
sensor
tion platform to the implementation platform. Induction
DC link Three-phase DC Motor
It is possible to accelerate the design process by using a
Inverter
Motor
unique platform for both simulation and implementation. This ~ lGBT ~

paper proposes a novel approach to the design of controllers Commands Measures


for VSD in which both simulation and implementation are
based on Field-Programmable Gate Array (FPGA). In the sim-
ulation phase, the VSD controller is represented by hardware
models of the actual elements which will be implemented on
FPGA. In fact, the simulation model represents in every detail
the controller to he implemented in FPGA. When the debug- Bidirecfional
ging has been completed, the simulated controller can be con- optical link
verted directly into hardware without further debugging or Parallel
adaptation. This is the reason of the reduced design time that Master
this approach can provide as compared to conventional board (XV300)
approach where debugging is needed in both simulation and
implementation phases.
Fig. 3 Proposed FPGA-based rapid prototyping platform far VSD,

1157
The software installed on the PC includes MATLPtBiSim-
ulink, Power System Blockset, Xilinx System Generat,Dr, Syn-
plicity, and Foundation. These programs are required though
the design process and briefly described below. Power circuit design
(Power System 81ockset)
* MATLAB/Simulink: Software tool for the modeling and
simulation of control algorithms
+
FPGA conlloller design
* Power System Blockset: Specialized Simulink blocks for (Xilinx System Generator)

-
the modeling and simulation of power systems
Xilinx System Generator: Library of Xilinx functional
blocks (in Sirnulink environment) representing various circuits
SIMULATION < t
Compiele VSD sirnulation
(Simulink)
in FPGAs. Xilinx SG is also an automatic VHDL code genera-
tor.
* Active-HDL: This software is required to connect the
developed algorithm to other parts of FPGA code (it is not , \

required if a standard interface is used) VHDL code lor


* Synplify: A VHDL synthesis software that converts cmmunicaVon Autmaticccde generatinn
(doneonce) (Xilinx Syslem Generator)
VHDL code into actual circuits. z I
P t i
* Foundation: A FPGA implementation software that gener-
ates the FPGA configuration file from the synthesized circuit. z Complete FPGA
Simulation (i needed)
Code fusion

+
z (Active-HDL)
* Visual C++: Programming software required for the devel- W (
opment of the communication program between the PC and the I
FPGA hoard. Y
a
Synlhesis and
implementation
3 (Xilinx tools)
IV. VSD CONTROLLER DESIGN PROCEDURE USING I I
THE PROPOSED PROTOTYPING PLATFORhl
download in FPGA
The steps in the design procedure for VSD controllers using
the proposed prototyping platform are illustrated in the flow
diagram in Fig. 4. Fig. 4 Design steps of a VSD controller using the proposed
In the first step, the power system model (including the rapid prololyping platform.
power converter and electric motor) is built using the Power the complete FPGA code can be run so as to validate the modi-
System Blockset (PSB). The controller model is then built fications.
(also in Simulink environment) using Xilinx System Generator Synthesis and implementation of the controller are the fol-
(SG)blocks that represent various functions implementable in lowing steps. In the synthesis software (Synplify), the program
the FPGA. Some conventions must he used in the signals nam- files to be compiled (the controller and the communications
ing and dimensions so that the algorithm will fit with the code) and the FPGA used are specified. Then, the synthesis is
remainder of the FPGA code. SG blocks are like standard Sim- done with a single click. Implementation is then done using
d i n k blocks except that they can operate only in discrete-time Xilinx Foundation software that executes a script. These opera-
and fixed-point format. The user has a wide choice of standard tions create a configuration file for the FPGA.
and pre-built functions and can also create herhis own func-
tions for particular applications. The last thing to do is write an interface between the user
Specials blocks that represent the A-to-D converters are and the FPGA in C language. A standard interface can be used
connected between the power circuit and the controller. In this but a custom one can also be built. The FPGA uses registers to
way; the controller is simulated in the exact conditions: of the store control algorithm’s measures, command and settings so
prototyping hoard. that only two simple communication functions (pre-built) are
The complete VSD model, including the power circuit and needed.
the controller, can be then simulated in the same Simulink dia- In the case where control algorithm is to he modified, a new
gram for debugging purpose. iteration through these steps has to be done. Since many of the
previous steps have to be done only once, the new iteration will
When the controller performs as expected in simulation, a
VHDL representation of the controller can be generated using take less time.
a special block of the SG. Next, this VHDL representation has
V. APPLICATION EXAMPLE - A DTC CONTROLLER
to be connected to the remainder of the FPGA code like the
communication modules. With the use of a standard interface, A DTC controller for an induction motor drive has been
the designer can jump directly to the synthesis step. If more designed using the proposed prototyping platform in order to
flexibility is desired, a VHDL software (Active-HDL for evaluate the performance of the approach. Fig. 5 shows a Sim-
example) can be used to create external code needed by the ulink diagram that represents the drive system. The power sec-
algorithm, or to modify the standard interface. A simula.tion of tion on the top is built with PSB blocks. The controller is built

I158
f
I I

Fig. 5 Simulink diagram representing the DTC induction motor drive

with Xilinx SG blocks. The four channels of the A-to-D con- on the FPGA. For sine or cosine functions, it is simpler to
verter are represented by four special blocks on the right. implement using lookup tables in FPGAs.
Fig. 6 shows the diagram of the DTC controller built Fig. 7 shows details of one of the controller sections, the
entirely with SG blocks. Each function on the original control rotor flux estimator. It is composed of constant multipliers,
algorithm has been rewritten to he suited for FPGA. This pro- adders and integrators.
cedure is usually straightforward because SG functions are rep- The DTC induction motor drive model (using PSB and SG
licas of Simulink functions. However, in order to exploit the blocks) was first simulated. Fig. 8 shows the results (stator flux
full advantage of FPGAs, some functions in the control algo- and motor torque) obtained with Xilinx SG model compared to
rithm have to be modified. For example, the operation arctan is that obtained with standard Simulink discrete-time model. A
traditionally used in DSP implementation to determine the slight difference was noted which is due to one time-step delay
rotor flux vector position. In an FPGA, this operation would in the ADC and also due to the fixed-point format (12 bits)
require a lot of silicon space so it was replaced by several com- used in the FPGA. This difference is considered negligible and
parisons which can he implemented using much less resources does not affect the controller performance.

Fig. 6 Diagram ofthe DTCcontraller(built with Xilinx SG blocks)

1159
Speed response
1150

- 1100

-p
E
P
1050
maL

1000

950
" ~ " , " , ' ~ " ~ R ~
O

0
o N I O "
- -
m ) V ) -

Time
C m

(6)

Fig. 7 Flux estimator Sirnulink diagram (using Xilinx blocks).


7 Torque r e s p o n s e 1
[: . .I
Flux:magnitude
. .............. . . . . . . . : I
~ :
................ . . . . .!... ........ ~ .7 9.00

,
............................. Simulinkkesult. .. i. .
J -
8.00

7 00
.... E
z
6.00
.l................ .............. 'I
+ 5.00
~ ,...... .............. .......

1
# J
.II ............................... .............. ............
4.00
,, . . . . . . . . . . . . . . . . . . . . . . . . . . ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
- .-
!
~

. .
0- .e, 0-m 0-a ._.

3'00

Fig. 9 Experimental slep response of the DTC controller implementedan


the FPGA prototyping board.
and voltage measurements. Nevertheless, the system was able
to provide a speed static error of less than 1% for speeds from
400 rpm to 1800 rpm.
Fig. 9 shows the experimental DTC controller response to a
step change in speed reference (from 1000 rpm to 1100 rpm).
: PSB result. . . . . . Both speed and torque responses are smooth and do not present
...............
.- I-
i

.- ._
.......... :.
om,, ..m U_
large oscillations. The small ripple appearing on the speed sig-
nal is due to the noisy signal provided by the speed sensor. The
Fig. 8 Comparison between Xilinn SG and Sirnulink Simulation results controller dynamics agree well with theoretical predictions.
The obtained speed control accuracy (1%) is acceptable for
industrial applications.
The designed controller was implemented on the FPGA pro-
totyping board to control a 2-kW induction motor fed by an VI. CONCLUSION
IGBT PWM inverter.
The currents and voltage are sampled with a time period of 4 A novel approach to prototyping VSD has been proposed
ps. The FPGA was able to execute one cycle of calculations in and described. The obtained results have demonstrated that
0.2 ps but the controller operated with a sampling period of 48 FPGAs are well suited for implementation of complex motor
ps because the power converter can only switch at 20 kHz. control and estimation algorithms due to their very high execu-
tion speed which is made possible by the inherent parallel
Thus the command to the inverter was sent out at a rate of 48
operation in FPGAs.
PS. Since the FPGA's structure is completely configurable, the
The DTC controller was functional since the first time hut
the drive performance was not as good as in the simulations. prototyping platform can be readily modified to suit new
The actual motor torque was lower than the simulation value. requirements (addition of measured variables, modification of
After some investigation, it was found that this problem was communication system, modification of control configuration,
caused by a less accurate flux estimation due to noisy current

I I60
etc.). The modifications are done at high level (Xilinx SG
blocks and VHDL language).
In the proposed protolyping approach, the design time could
be reduced because of the accuracy of the simulation attainable
with Sirnulink and Xilinx System Generator at every operation
details of the FPGA. Most of the time, only one step of debug-
ging is required because the design in Sirnulink represents an
exact model of the actual device.
In the prototyping platform built in OUT laboratory, the mea-
surement section did not perform as well as expected. This is
due to the quality of the analog circuits forming the front end.
With the current advances in microelectronics, the capacity
of FPGAs is continually increased permitting VSD designers
to fully exploit their possibilities in the implementation of
complex advanced control algorithms.

REFERENCES
[l] Power Electronics and Variable Frequency Drives, edited
by Bimal K. Bose, IEEE Press, New York, 1997.
[2] Power System Blocbet For Use with Sirnulink, User’s
Guide, The Mathworks Inc., 2000.
[3] Xilinx Blockset Reference Guide, Xilinx Inc., 2001
[4] Virtex Platform FPGA Handbook, Xilinx Inc., 2000.
[5] R. D. Turney, C. Dick, D. B. Parlour, and J. Hwang, Mod-
eling and Implemenfution of DSE FPGA Solutions, Xilinx
Inc., 2000.
[6] G. Buja, D. Casadei, G. Serra, “Direct stator flux and
torque control of an induction motor: theoretical analysis
and experimental results,” IEEE IECON’98.

I161

S-ar putea să vă placă și