Documente Academic
Documente Profesional
Documente Cultură
net/publication/224625418
CITATIONS READS
19 58
5 authors, including:
Makoto Fujishima
DMGMORISEIKI
44 PUBLICATIONS 698 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Yadong Liu on 10 December 2017.
IECON 2005
The Thirty-First Annual Conference
of the IEEE Industrial Electronics Society
Sponsored by
IEEE Industrial Electronics Society
Hosted by
North Carolina State University
Edited by
Leopoldo G. Franquelo
Alexander Malinowski
Mo-Yuen Chow
Herbert L. Hess
Copyright © 2005 by The Institute of Electrical and Electronics Engineers, Inc.
All Rights Reserved
Copyright and Reprint Permissions: Abstracting is permitted with credit to the source. Libraries are
permitted to photocopy beyond the limit of U.S. copyright law for private use of patrons those articles in
this volume that carry a code at the bottom of the first page, provided the per-copy fee indicated in the
code is paid through Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923. For other
copying, reprint or republications permission, write to IEEE Copyrights Manager, IEEE Operations
Center, 445 Hoes Lane, P.O. Box 1331, Piscataway, New Jersey USA 08854-1331. All rights reserved.
Copyright ©2005 by the Institute of Electrical and Electronic Engineers.
The papers in this book comprise the proceedings of the meeting mentioned on the cover and title page.
They reflect the authors’ opinions and, in the interests of timely dissemination, are published as
submitted and without change. Their inclusion in this publication does not necessarily constitute
endorsement by the editors or the Institute of Electrical and Electronics Engineers, Inc.
ISBN: 0-7803-9252-3
ISSN: 1553-572X
Abstract—This paper presents the modeling and cosimulation hardware/software codesign, the cosimulation between
method of a FPGA based Permanent Magnet Synchronous function model and VHDL model is implemented by
Machine (PMSM) control system; the current control loop of integrating two models into one cosimulation model. The
PMSM control system is Space Vector Pulse Width Modulation
hardware timing and the function simulation can be tested and
(SVPWM); a new FPGA based Top-Down design method is
proposed. According to the design method, the function model is verified at the same time. By using such a method, the design
built in Matlab environment, and the behavioral model (VHDL efficiency can be improved greatly.
model) is programmed in the synthesis software platform. In
order to realize the hardware/software codesign, the II. SVPWM CONTROL OF PMSM
cosimulation between function model and VHDL model is
implemented by integrating two models into one cosimulation A. SVPWM Control
model. By the cosimulation, the hardware timing and the
function simulation can be tested and verified at the same time.
In this paper, the case study shows that the design efficiency can In order to control PMSM efficiently, the Field Oriented
be improved greatly by using this cosimulation method. Control (FOC) is often applied. FOC is an excellent control
algorithm that is used to control space vectors of magnetic flux,
I. INTRODUCTION current and voltage. Actually, FOC relies on the SVPWM
control strategy. By using SVPWM, it is possible to set up the
Today, Digital Signal Processor(DSP) and microcontroller coordinate system to decompose the vectors into a magnetic
have been widely used for PMSM control system. But global field-generating axis and a torque-generating axis. So by using
competition has brought immense pressure to the product SVPWM, the PMSM control is almost the same as the DC
development of PMSM control system. For the PMSM control motor control, the magnetic flux and torque can be controlled
system design, the DSP/MCU based hardware design is very separately.
time-consuming. So if the hardware of PMSM control system Generally, in the PMSM control system, the SVPWM
can be re-configurable, it will help to reduce the new PMSM module generates the vector control signals, and then these
control system development time and cost. FPGA, as a new PWM signals are sent to the inverter in order to drive the
re-configurable hardware platform, has been used for AC motor. The basic diagram of SVPWM control for PMSM can
motor control system [1-2][6-7]. VHDL is usually used for be described as Fig. 1. The power switches of the inverter,
developing the FPGA based motor control system [3-5]. shown as Fig. 2, consist of 6 IGBT switches (S1, S2, …, and
In this paper, a new design method of PMSM control system S6).
based on FPGA is proposed. The PMSM control system is
programmed by using VHDL and is implemented in the FPGA B. Space Vector Definition and d-q Transformation
platform. The FPGA platform realizes the Field Oriented
Control (FOC) algorithm for PMSM, including SVPWM The model used for vector control design can be realized by
control for current loop, velocity control loop, position control using space vector theory. The three phase motor quantities,
loop and all necessary re-configurable I/Os for data such as voltages, current, magnetic flux, etc. are expressed in
communication and feedback sensing system. According to terms of complex space vectors. Such a model is valid for any
the proposed Top-Down design method, the cosimulation of instantaneous variation of voltage and current and adequately
function model and VHDL model is the most important step. describes the performance of the PMSM under both steady
The function model is built in Matlab environment, and the state and transient operation. The complex space vectors can
behavioral model (VHDL model) is programmed in the be described using only two orthogonal axes, which are direct
synthesis software platform. In order to realize the axis and quadrature axis respectively. So the three-phase
1539
Vbase is the amplitude of the fundamental component. As However, Equation (8) is dependent on the sector where
Fig. 4 illustrates, there are eight basic switching configurations V out is. In order to calculate the switching time, the sector
of the three-phase PWM inverter. Their corresponding voltage needs to be determined first, then the adjacent vectors V n and
vectors are depicted in Fig. 4, expressed as:
V n+1 can be chosen.
2 (n − 1)
V n = Vdc ∗ exp j π (5) To determine the sector, we can calculate the projections
3 3
Va , Vb and Vc of Vαref and Vβref in the (a, b, c) plane by
Where Vdc is the DC-link voltage, and n =1, 2, 3…, 6 and
using inverse Clark transformation:
V 0 =V 7 = 0 .
Va = Vβref
β -axis 1 (9)
( − 1/ 3,1/ 3 ) ( 1/ 3,1/ 3 ) Vb = ( 3Vαref − Vβref )
2
S1 1
V2 (110) Vc = 2 (− 3Vαref − Vβref )
V3 (010 ) S0
S2 Vout Then based on Equation (9), we can calculate
N = sign(Va ) + 2 * sign(Vb ) + 4 * sign(Vc ) . Map N to the
(-2/3, 0) V0 (111) actual sector of the output voltage reference by referring to the
V4 (011) V1(100) (2/3, 0) following relationship:
V7 (000 )
α -axis N 1 2 3 4 5 6
S3 S5 Sector 1 5 0 3 2 4
V5 ( 001) V6 (101) After getting the sector of output voltage reference and
S4 calculating the switching time of vectors V n and V n+1 , the
( − 1/ 3,−1/ 3 ) ( 1/ 3,−1/ 3 ) vector switching time pattern for the power switches of
inverter can be described as Fig. 5.
Fig. 4. SVPWM description
T pwm
In order to generate the SVPWM switching signals, two
T0 / 4 T1 / 2 T2 / 2 T0 / 2 T2 / 2 T1 / 2 T0 / 4
adjacent vectors and a zero vector ( V 7 or V 0 ), can be chosen
to express the control reference vector V out :
Vout = VnT1 + Vn +1T2 + Vnull T0 (6) V7 (000 ) Vn Vn +1 V0 (111) Vn +1 Vn V7 (000 )
1540
Universal Bridge
g 1.5 Tm
is_abc
+
A A
m m wm
DC B B
-
thetam
C C
Permanent Magnet M achines
Synchronous Machine1 M easurem ent
0
Dem ux1
d-q Iabc
A
U alpha
PID PID
alpha-beta m Pulses a
U beta B
Sine Wave PID Controller1 PID Saturation angle
b
Controller Discrete SV PWM C
Park reverse Generator c 2
Gain a
transform T hree-Phase m
b dq
V-I M easurem ent
angle
d-q
transform
m
1541
Actually, VHDL is different from the object-oriented ModelSim® provides a fast bidirectional connection between
programming language, such as C/C++. Because VHDL is MATLAB and Simulink and Mentor Graphics' HDL simulator,
mainly used for describing digital signals, it cannot be used for ModelSim. It enables direct cosimulation and we can
power and analog signals. However, the main function model efficiently verify and cosimulate RTL-level models from
of SVPWM is digital. So when we construct the PMSM motor within MATLAB/Simulink. Link for ModelSim provides the
control systems, VHDL can be used to develop the model. support to develop the software test benches in
MATLAB/Simulink for HDL entities, including HDL models
C. Floating-Point Algorithm in larger-scale system models developed and simulated in
Simulink, generating test vectors to test, debug, and verify the
The basic functions have been described in Section II, HDL model against its original functional model of MATLAB
because the input and output of control system will be or Simulink. In addition, it can provide behavioral modeling
implemented by digital signals, the variables of control system capabilities for HDL simulation in MATLAB and Simulink
are signal type or integer type. However, both PI control and verify HDL implementations in MATLAB environment.
algorithm and SVPWM control require floating-point As discussed in Section IV, the VHDL model has been
arithmetic. So the VHDL modules need to implement the established, and the functional model has also been
floating-point algorithm. In order to realize the floating- point constructed based on Matlab and Simulink. Now the VHDL
algorithm, we will use fixed-point algorithm and modules can be inserted into the functional model and replace
Normalization method to realize the floating- point the corresponding module in functional model. For example,
algorithm. . PI controller module of VHDL can be inserted into the PMSM
[-1, 1] can be mapped to 16-bit signed fixed-point data. The function model and replace the PI controller block of Simulink.
first bit of the 16-bit data is the sign bit. So the maximum and Fig. 8 shows this cosimulation model of connection between
minimum possible values for the coefficients can be VHDL model and Simulink model of PMSM, in which PI
determined by calculating the following equations: controller, d-q reverse transformation and SVPWM signal
Maximum value= 2N −1 − 1 ( N = 16 , it equals to 32767) generation modules are added into the Simulink model.
When connecting VHDL module to Simulink model, the
Minimum value= − 2 N −1 ( N = 16 , it equals to -32768)
Link for Modelsim block needs to be created. We need to
The actual Normalization format can be 1.F (F=N-1). The
define the Input/Output port and Clock signal according to the
first bit indicates the sign bit and F is the fractional bit
VHDL module. At the same time, we need to clarify the data
By applying this floating-point algorithm for VHDL
type of the port connecting VHDL model to Simulink model.
modeling, PI controller, SVPWM and other floating-point
For example, the ports IQ and IQ_REF are input ports of
related to calculation can be implemented.
VHDL module of PI controller, and their signal type is
std_logic_vector, so a data type conversion block needs to be
D. Reusable IP Core
added to match the signals. Shown as Fig. 8, the PI controller
and SVPWM modules are connected with Simulink model of
When developing VHDL modules for PMSM control
PMSM control system. In this example, the frequency of
system, some functions are available, such as PCI module,
SVPWM generation model is 20KHz; the DC voltage is 300V;
SINE/COSINE calculation module. Because many companies
the load equals to 1.5NM. This example uses a PMSM with 2
have already developed these VHDL modules, so called
pairs of poles, 1.7NM, 300VDC. The velocity reference is
Intellectual Property (IP), it will improve the design efficiency
ω ref = 100 sin(100πt ) rad/s. Fig. 9 illustrates the experiment
and help to save the design time. Intellectual Property (IP) is a
functional design block in a form of synthesizable RTL VHDL results of the three PMSM phase current. This example
code, or a specific netlist. In most cases, the IP core can be explains that the cosimulation between VHDL model and
used for silicon design many times, in many different simulink model can testify the VHDL modules efficiently.
applications, and consequently offers a fast, low risk
alternative to developing the module. VI. CONCLUSION
According to the description of PMSM control system in
Section II, when implementing some calculations of PMSM In this paper, a new FPGA based PMSM control system is
control, SINE/COSINE and floating-point divider function are proposed, and the Top-Down design method based on FPGA
needed. Xilinx also provides these IP cores for specific is presented. The PMSM control system is programmed in
application. So we can apply the SINE/COSINE and VHDL, and then is implemented in the FPGA system. During
floating-point divider IP core to VHDL modeling directly. the design, the cosimulation between function model and
VHDL model has been implemented. The cosimulation
V. COSIMULATION BETWEEN FUNCTION AND VHDL MODEL between function model and VHDL model realizes the timing
and control simulation by using Link-for-Modelsim® of
In order to perform the cosimulation between function and Matlab. The hardware/software codesign of PMSM control
VHDL model, Link for Modelsim® of Matlab is used. Link for system can be realized by this means.
1542
Uni versal Bri dge
g
1.5 Tm
+ is_abc
A A
DC m m wm
B
B
thetam
- C
C
M achi nes
PMSM
M easurem ent
i nt16 vel oci ty_REF
Iabc Dem ux1
A
Si ne Wave currentcom m and int16 IQ_REF
Conv1 a
vel oci ty B
vq doubl e
b
IQ
vel oci ty PI M odul e1 Saturati on C
c
ia
PI VHDL M odule T hree-Phase id double
m
V-I M easurem ent
Conv11
ib
0 int16 vd
iq
va ual pha
Conv5 2 T HET A
i nt16 vq
QOUT double In1 Out1 Gain dq.vhd
Conv3
vb ubeta Conv6
T HET A
Subsystem
dq_reverse.vhd SVPWM Generator
Conv4 Subsystem 1
i nt16
5
Isabc(A)
-5
-10
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
T(s)
1543