Professional Documents
Culture Documents
k,(((
.
some aspects of real motor drives, such as saturation and B. Inverter model
inductance variations caused by stator slots. FEA-based models The inverter model includes controlled switches with
handle this limitation well [2][7]. The simulator latency also forward voltage drop, conduction losses and anti-parallel
adds a delay in the control loop, which may change its diodes. These diodes turn on only during dead time with a
response. logic that depends on the load current (ex: if the current flows
Finally, most motor drives include high-bandwidth on-board into the load, then the lower diode turns on). Since the signal
protection that cannot be simulated on conventional RCP resolution of the IGBT gate is 10 nanoseconds on the FPGA
systems. For example, a real motor drive may include DC-link itself, no interpolation mechanism is used, unlike in the CPU
current motoring for short-circuit detection. If this condition is implementation of HIL motor drive[4]. The model does not
detected, IGBT pulses are disabled. Despite a sampling time account for switching losses[6].
below 10 microseconds, a high-performance classical CPU- The proposed inverter model can also work in fully rectifying
based HIL simulation [4] is still too slow to simulate these mode with no IGBT pulses. Depending on the motor speed and
effects. FPGA-based HIL simulation offers a solution to this the DC-link voltage, the drive can work in a mode where the
challenge. motor Back-EMF voltage makes the inverter act as a diode
A previous paper[2] describes a FEA-based PMSM model rectifier. This is an improvement over the inverter model
implementation on an FPGA in which the inductance proposed in [1].
calculation were computed on an associated CPU of the real-
time simulator. Tests showed that the slower update rate of the C. D-Q-Based PMSM model [1]
CPU (near 50 μs) had the effect of limiting the accuracy of the Fig. 1 describes the two-axis (d-q) PMSM and IGBT inverter
model for stator frequencies above 400 Hz. In this paper, we models that were designed in XSG and executed on the RT-
will evaluate a similar FEA-based PMSM model in which the LAB real-time simulator. With this model, all calculations are
inductance values will be stored on the FPGA firmware. We made in the FPGA itself: the model uses FPGA-stored inverse
expect this will enable the model to achieve greater accuracy at inductance and nominal-speed Back-EMF tables. During the
higher speeds than the previous model. calculations, the real Back-EMF is found by multiplication of
the nominal value by the actual speed. The gate signals of the
II. RT-LAB EDRIVESIM SIMULATOR MODELS IGBT inverter can come from external I/O, from a controller
model running on one CPU of the simulator, or from an
The various eDRIVEsim models used to create the HIL internal PWM source. This internal PWM generation feature is
simulation of the PMSM motor drive are described here. Each useful for model self-verification and to validate the model
of the motor models use the same phase-domain solver against reference models without the use of an externally
described in A). This solver has the natural advantage of connected controller.
enabling the simulation of open-phase conditions by directly
acting on the stator resistance vector.
L(θ)=T(θ)*Ldq0*T-1(θ)
IGBT inverter
Inductance
A. General PMSM machine equations θrotor
PMSM
The general PMSM equation in the phase domain is: N
dψ abc FPGA
[ L]−1 ∫ (Vabc − − RI abc )dt = I abc (1) (Op5130)
S
dt vbackEMF θrotor
where iabc BackEMF=f(θ,ω)
[L] is the inductance matrix, 6 (sinusoidal)
Iabc is the stator current inside the windings, Digital Input (10 ns) Analog Output Digital Out
I/Os
ψabc is the magnet flux linked into the stator windings, (IGBT gates) (Iabc, resolver) (quad encoder)
R is the stator resistance and
Vabc is the voltage across the stator windings. Controller under test
Both the d-q and JMAG-type models’ currents are solved Fig. 1 D-Q-based PMSM drive implemented on the FPGA
using equation (1). The only difference is that [L] and ψ are
sinusoidal in the d-q model, while [L] and ψ are FEA- D. Finite-Element-Analysis-Based PMSM model [2]
computed in the JMAG case. Also, most operations are made In the FEA-based PMSM model, the electric equations of the
using 18-bit numbers with the notable exception of the flux PMSM and its IGBT inverter are still computed on the FPGA
integrators, which have 48 bits because of the 20-nanosecond computational engine using the same phase-domain solver as
integration step used. the d-q model. Notably, this includes the 1-D nominal speed
Back-EMF table, derived from JMAG-RT, developed by JRI
k,(((
.
Solutions Ltd. The 2-D inductance inverse matrixes L-1(θ,Iabc) E. FEA-PMSM model with inductance storage on the FPGA
as well as the electrical torque are computed on the CPU and In this FEA-based PMSM model, the inductance data is
transmitted on the FPGA where interpolation methods are used stored on the FPGA and all electric equations of the PMSM
to up-sample the inductance at 10 nanosecond rate. This and its IGBT inverter are still computed on the FPGA
scheme is depicted in Fig. 3 computational engine using the same phase-domain solver as
the other FPGA model. The 2-D inductance inverse matrixes
L-1(θ,Iabc) are first extracted using an off-line simulation
routine and then stored in FPGA RAM. The FEA electrical
torque is still computed on the CPU. This scheme is depicted in
Fig. 4
L-1=f(θ,Ιabc)
(JMAG pre-computed)
FPGA
(Op5130) iabc L-1 (θ,iabc) θrotor
k,(((
.
simulated without an algebraic loop because of the integral
term on ω in the right side of the equation. The method is
interesting because it does not require additional look-up tables
and avoids speed division to compute the torque.
k,(((
.
C. Controller Parameters
The motor controller is a classical vector controller using the
Park d-q transform to control motor currents and torque. An
outer speed control loop completes the controller. This enables
the torque control of the motor by acting on the Iq current
component. For this experiment, no flux weakening is applied
and the Id current command is therefore set to zero. PWM Fig. 6 Synchro/Resolver-to-Digital response to a 50 Hz to 10 Hz step
generation can be made in either sinus or space-vector at the resolver input signal.
modulation with user variable carrier frequency and dead time.
In our tests, the PWM frequency is 5 kHz and dead time is 5 E. Current control mode tests
microseconds. All models are made with Simulink. One great advantage of a virtual motor drive test bench over
The controller parameters used in these tests are enumerated a real one is ease of the hardware set-up. This becomes even
in Table 2. The reference Id value is set to 0 in all tests as no clearer when one tries to test motor current control loops. In
flux weakening is made. The Vdq limits are really the entry to this case, with a real bench, one really needs two motor drives:
the dq-abc transform that produce the modulation indexes for the PMSM drive itself and a second motor drive to control the
all phases and are therefore limited to ±1. All PI controllers shaft speed. With a virtual bench, one simply has to set the
have anti-windup mechanisms. shaft speed state-variable to the desired speed.
TABLE 2. CONTROLLER PARAMETERS
Quantity Value
Current controller Ki Kp/Ki gains 22.7 0.0017
Vdq limits (from current controller) ±1 pu
Speed controller Ki Kp/Ki gains 3.5 0.026
(except section E)
Iq limits (from speed controller) ±9.5 A
PWM frequency 5 kHz
Dead time 5 μs
Sample time 50 μs
k,(((
.
k,(((