Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This block implements a doubly-fed induction machine (DFIM)

Image Removed

The DFIM block implements a three-phase induction machine (asynchronous machine) with an accessible wound rotor model with resolvers and encoders. The machine can operate in both motoring mode, when the mechanical torque is positive, and generating mode when the mechanical torque is negative.

Model Formulation

Q-d Transformation

The 3-phase to q-d transformation and the inverse used for the model are:

...

alignmentleft

...

This block implements a doubly-fed induction machine (DFIM)

...

The DFIM block implements a three-phase induction machine (asynchronous machine) with an accessible wound rotor model with resolvers and encoders. The machine can operate in both motoring mode, when the mechanical torque is positive, and generating mode when the mechanical torque is negative.

Model Formulation

Q-d Transformation

The 3-phase to q-d transformation and the inverse used for the model are:

Mathblock
alignmentleft
\begin{aligned}
&\left[\begin{array}{l}
{V_{q}} \\
{V_{d}} \\
{V_{0}}
\end{array}\right]=\frac{2}{3}\left[\begin{array}{ccc}
{\cos (\theta)} & {\cos \left(\theta-\frac{2 \pi}{3}\right)} & {\cos \left(\theta+\frac{2 \pi}{3}\right)} \\
{\sin (\theta)} & {\sin \left(\theta-\frac{2 \pi}{3}\right)} & {\sin \left(\theta+\frac{2 \pi}{3}\right)} \\
{\frac{1}{2}} & {\frac{1}{2}} & {\frac{1}{2}}
\end{array}\right]=\frac{2}{3}\left[\begin{array}{cccl}
{V_{\cos (\theta)} & {\cos \left(\theta-\frac{2 \pi}{3}\right)} & {\cos \left(\theta+\frac{2 \pi}{3}\right)a}} \\
{V_{b}} \\
{V_{c}}
\end{array}\right]\\
&\left[\begin{array}{c}
{V_{a}} \\
{V_{\sin (\theta)} & {\sin \b}} \\
{V_{c}}
\end{array}\right]=\left[\begin{array}{ccc}
{\cos (\theta)} & {\sin (\theta)} & {1} \\
{\cos \left(\theta-\frac{2 \pi}{3}\right)} & {\sin \left(\theta+-\frac{2 \pi}{3}\right)} & {1} \\
{\frac{1}{2}cos \left(\theta+\frac{2 \pi}{3}\right)} & {\sin \left(\theta+\frac{12 \pi}{23}\right)} & {\frac{1}{2}}
\end{array}\right]\left[\begin{array}{l}
{V_{aq}} \\
{V_{bd}} \\
{V_{c0}}
\end{array}\right]\\
&\left[\begin{array}{c}
{V_{a}} \\
{V_{b}} \\
{V_{c}}
\end{array}\right]=\left[\begin{array}{ccc}
{\cos (\theta)} & {\sin (\theta)} & {1} \\
{\cos \left(\theta-\frac{2 \pi}{3}\right)} & {\sin \left(\theta-\frac{2 \pi}{3}\right)} & {1} \\
{\cos \left(\theta+\frac{2 \pi}{3}\right)} & {\sin \left(\theta+\frac{2 \pi}{3}\right)} & {1}
\end{array}\right]end{aligned}

The induction machine model uses the rotor as a reference, thus the angle of theta_r.

Induction Machine Electrical Model

Induction machine models in state-space framework are based on magnetic fluxes. The state variables and winding currents (as the outputs) can be represented as follows:

Mathblock
alignmentleft
\begin{aligned}
\psi(n+1) &=A_{d}(n) \psi(n)+B_{d}(n) u(n) \\
I(n+1) &=C(n+1) \psi(n+1)
\end{aligned}

where the coefficient matrices are as follows:

Mathblock
alignmentleft
\begin{aligned}
A_{d}=T_{s}\left(-R L^{-1}-\Omega\right)+e y e \\
B_{d}=T s \times e y e \\
c=L^{-1}
\end{aligned}

and

Mathblock
alignmentleft
$\boldsymbol{u}=\left[\begin{array}{lllll}
{V_{s q}} \\& {V_{s d}} \\& {V_{r q}^{\prime}} & {V_{0{r d}^{\prime}}
\end{array}\right]^{t}$
Mathblock
alignmentleft
\[
\endboldsymbol{aligned}

The induction machine model uses the rotor as a reference, thus the angle of theta_r.

Induction Machine Electrical Model

Induction machine models in state-space framework are based on magnetic fluxes. The state variables and winding currents (as the outputs) can be represented as follows:

Mathblock
alignmentleft
\begin{aligned}
\psi(n+1) &=A_{d}(n) \psi(n)+B_{d}(n) u(n) \\
I(n+1) &=C(n+1) \psi(n+1)
\end{aligned}

where the coefficient matrices are as follows:

I}=\left[\begin{array}{llll}
{I_{s q}} & {I_{s d}} & {I_{r q}^{\prime}} & {I_{r d}^{\prime}}
\end{array}\right]^{t}
\]
Mathblock
alignmentleft
$\boldsymbol{\psi}=\left[\begin{alignedarray}
A_{dllll}=T_{s}\left(-R L^{-1}-\Omega\right)+e y e \\
B_{d}=T s \times e y e \\
c=L^{-1}
\end{aligned}

...

\psi_{s q}} & {\psi_{s d}} & {\psi_{r q}^{\prime}} & {\psi_{r d}^{\prime}}\end{array}\right]^{t}$
Mathblock
alignmentleft
$\boldsymbol{uR}=\left[\begin{array}{llll}{VR_{s q}} & {VR_{s d}} & {VR_{r q}^{\prime}} & {VR_{r d}^{\prime}}\end{array}\right]^{t}$
Mathblock
alignmentleft
\[
\boldsymbol{I}L=\left[\begin{array}{llllcccc}
{IL_{s q}}} & {0} & {IL_{s dm}} & {I_{r q}^{\prime}0} \\
{0} & {L_{s}} & {0} & {L_{m}} \\
{L_{m}} & {0} & {IL_{r d}^{\prime}} & \end{array0} \\right]^{t}
{0} & {L_{m}} & {0} & {L_{r}^{\prime}}
\end{array}\right]
\]
Mathblock
alignmentleft
$\boldsymbol{\psiOmega}=\left[\begin{array}{llllcccc}{\psi_{s q}0} & {\psi_{s d}}omega} & {0} & {\psi_{r q}^{\prime}0} \\ {-\omega} & {0} & {0} & {0} \\ {0} & {0} & {\psi0} & {\omega-\omega_{r}} d}^{\prime}}\end {array}\right]^{t}$
Mathblock
alignmentleft
$\boldsymbol{R}=\left[\begin{array}{llll}{R_{s}} & {R_{s}0} & {0} & {R-\left(\omega-\omega_{r}^{\prime}right)} & {R_{r}^{\prime}}\end{0}\end{array}\right]^{t}$
Mathblock
alignmentleft
\[
L=\left[\begin{array}{cccc}
{L_{s}} & {0} & {L_{m}} & {0} \\
{0} & {L_{s}} & {0} & {L_{m}} \\
{L_{m}} & {0} & {L_{r}^{\prime}} & {0} \\
{0} & {L_{m}} & {0} & {L_{r}^{\prime}}
\end{array}\right]
\]
Mathblock
alignmentleft
$\boldsymbol{\Omega}=\left[\begin{array}{cccc}{0} & {\omega} & {0} & {0} \\ {-\omega} & {0} & {0} & {0} \\ {0} & {0} & {0} & {\omega-\omega_{r}} \\ {0} & {0} & {-\left(\omega-\omega_{r}\right)} & {0}\end{array}\right]$

The Induction Machine is modeled in rotor reference frame so ω=ωr.

In the model, all the rotor parameters and variables are seen from the stator distinguished by a prime sign. The stator to rotor turn ratio (Nsr) is applied as follows to transfer input three-phase rotor voltage to the stator side, and transfer back the output three-phase rotor current measurements to the rotor side:  

Mathblock
alignmentleft
V_{r_{a b c}}^{\prime}=N_{s r} V_{r_{a b c}}
Mathblock
alignmentleft
i_{r_{a b c}}=N_{s r} i_{r a b c}^{\prime}

The electrical torque is calculated as follows:

Mathblock
alignmentleft
T_{e}=\frac{3}{2} p p\left(\psi_{d} i_{q}-\psi_{q} i_{d}\right)

Mechanical Model

The equation of the mechanical model in torque mode is expressed as follows:

Mathblock
alignmentleft
\omega_{m}(t)=a \omega_{m}\left(t-T_{s}\right)+b\left(T_{e}-T_{m}\right)
Mathblock
alignmentleft
a=\left(1-T_{s}\right) \frac{F_{v}}{J}
Mathblock
alignmentleft
b=60 \frac{T_{s}}{2 \pi J}

where ωm is the rotor speed, Te is the electromagnetic torque, Tm is the torque command, Fv is the viscous friction coefficient, J is the inertia and Ts the time step. There is a dead-zone implementation with the static friction torque, if the electromagnetic doesn't exceed the static friction torque, the speed remains zero.

In speed mode, the rotor speed is directly set to the speed command ωrc.

Resolver Encoder Model

The equations of the resolver encoder can be expressed as follows:

Mathblock
alignmentleft
\theta_{\text {res}}=\left(\theta_{\text {mec}}+\theta_{\text {offset}}\right) \times R_{p p}
Mathblock
alignmentleft
\text {cosine}=\text {Excitation } \times\left(\cos \left(\theta_{\text {res}}\right) * R_{k_{c s}}+\sin \left(\theta_{\text {res}}\right) * R_{K_{s s}}\right)
Mathblock
alignmentleft
\text { sine }=\text { Excitation } \times\left(\cos \left(\theta_{\text {res}}\right)+R_{k_{c c}}+\sin \left(\theta_{\text {res}}\right)+R_{k_{s c}}\right)

where θres is the resolver angle, θmec is the mechanical angle of the machine, θoffset is the angle offset, Rpp is the Number of pole pairs of the resolver and Rk are the resolver sine cosine gains.

Parameters and Measurements

The DFIM's parameters and measurements are separated in 4 different tabs, Electrical, Mechanical, Resolver and Encoder.

Electrical Parameters and Measurements

...

Vrdq

...

Image Removed

Mechanical Parameters and Measurements

...

Image Removed

...

The Induction Machine is modeled in rotor reference frame so ω=ωr.

In the model, all the rotor parameters and variables are seen from the stator distinguished by a prime sign. The stator to rotor turn ratio (Nsr) is applied as follows to transfer input three-phase rotor voltage to the stator side, and transfer back the output three-phase rotor current measurements to the rotor side:  

Mathblock
alignmentleft
V_{r_{a b c}}^{\prime}=N_{s r} V_{r_{a b c}}
Mathblock
alignmentleft
i_{r_{a b c}}=N_{s r} i_{r a b c}^{\prime}

The electrical torque is calculated as follows:

Mathblock
alignmentleft
T_{e}=\frac{3}{2} p p\left(\psi_{d} i_{q}-\psi_{q} i_{d}\right)
Include Page
INT:Mechanical model
INT:Mechanical model

Parameters and Measurements

The DFIM's parameters and measurements are separated in 4 different tabs, Electrical, Mechanical, Resolver and Encoder.

Electrical Parameters and Measurements

Symbol

Name

Description

Unit

Type

Rs

Stator resistance

Stator winding resistance of phase a, b, and c

Ω

Edit-input

Lls

Stator leakage inductance

Stator winding leakage inductance of phase a, b, and c

H

Edit-input

Rr'

Rotor resistance

Equivalent rotor winding resistance referred to the stator of phase a, b, and c

Ω

Edit-input

Llr'

Rotor leakage inductance 

Equivalent rotor winding leakage inductance referred to the stator of phase a, b, and c

H

Edit-input

Lm

Mutual inductance

Stator-rotor mutual (magnetizing) inductance of phase a, b, and c

H

Edit-input

pp

Number of pole pairs

Number of pole pairs

N/A

Edit-input

is

Stator phase currents

Stator currents measured at phases a, b and c

A

Measurement

isdq

Stator dq currents

Stator currents in dq frame

A

Measurement

Φsdq

Stator dq fluxes

Stator fluxes in dq frame

Wb

Measurement

Vsdq

Stator dq voltages

Stator voltages in dq frame

V

Measurement

ir'

Rotor phase currents

Rotor equivalent phase a, b, and c currents, referred to the stator

A

Measurement

irdq

Rotor dq currents

Rotor currents in dq frame, referred to the stator

A

Measurement

Φrdq'

Rotor dq fluxes

Rotor fluxes in dq frame, referred to the stator

Wb

Measurement

Vrdq

Rotor dq voltages

Rotor voltages in dq frame, referred to the stator

V

Measurement

Rsn

Snubber resistance

Resistances of the snubber on phase A, B and C

Ω

Input

Csn

Snubber capacitance

Capacitance of the snubber on phase A, B and C

F

Input

...

Mechanical Parameters and Measurements

Symbol

Name

Description

Unit

Type

RenEnable resolverWhether or not to enable the resolverN/AInputRscResolver feedback signalsThe two two-phase windings producing a sine and cosine feedback current proportional to the sine and cosine of the angle of the motorN/AMeasurementRppNumber of resolver pole pairsNumber of pole pairs of the resolverN/AInputRdirDirection of the sensor rotationDirection in which the sensor is turning, either clockwise or counterclockwiseN/AInputRθAngle offset Δθ ( Sensor-  Rotor )Angle offset between the resolver and the rotor position from 0 to 360 degrees°InputRkResolver sine cosine gainsThe sine/cosine modulation output sine/cosine component amplitude. Default value are 1, 0, 0 and 1N/AInputEtypeExcitation source typeThe source from which the excitation of the resolver is generated. Can either be AC, which is generated inside the FPGA with the specified frequency, DC, which is generated with a 90° from the rotor and External, which is generated from outside the modelN/AInputEfExcitation frequencyFrequency of the excitation when in AC modeHzInputEsrcExcitation sourceSource of the external excitation source when in External modeN/AInputEtsExcitation time shiftThis parameter is used to compensate the time offset between the carrier generation's input in the system and modulated signals' outputsInput

Image Removed

OPAL-RT's resolver models are based off of the following sets of equations:

Mathblock
anchorSineOutput
alignmentcenter
Sine \; Output = [Sin.Sin*sin(pp(\theta_m - \theta_{Offset})) + Sin.Cos * cos(pp * \theta_m - \theta_{Offset}))] * Excitation
Mathblock
anchorCosineOutput
alignmentcenter
Cosine \; Output = [Cos.Sin*sin(pp(\theta_m - \theta_{Offset})) + Cos.Cos * cos(pp * \theta_m - \theta_{Offset}))] * Excitation

Where Sin.Sin, Sin.Cos, Cos.Sin, and Cos.Cos represent gains that are applied to simulate a non-ideal resolver.  To simulate an ideal resolver, set the Sin.Sin and Cos.Cos gains to 1, set the Sin.Cos and Cos.Sin gains to 0, set the pp to 1, and set the θOffset to 0.  This results in the following equations:

Mathblock
anchorsimpleSineOutput
alignmentcenter
Sine \; Output = sin(\theta_m) * Excitation

...

anchorsimpleCosineOutput
alignmentcenter

...

J

Rotor inertia

Moment of inertia of the rotor

kg*m2

Input

Fv

Viscous friction coefficient

Viscous friction

N*m*s/rad

Input

Fs

Static friction torque

Static friction

N*m

Input

ctrl

Mechanical control mode

Control mode of the mechanical model. Has two possible values: speed or torque. In speed mode, the mechanical model is bypassed and the speed command is sent directly. In torque mode, the torque command is used to measure the speed using the mechanical parameters of the machine.


Input

T

Torque command

Torque command sent to the mechanical model

N*m

Input

ωrc

Rotor speed command

Speed command sent to the mechanical model

rpm

Input

ωr

Rotor speed

Speed of the rotor

rpm

Measurement

Te

Electromagnetic torque

Torque measured at the rotor

N*m

Measurement

θ0

Initial rotor angle

Rotor position at time t = 0

°

Input

θ

Rotor angle

Rotor position from 0 to 360 degrees

°

Measurement

...

Resolver Parameters and Measurements

Symbol

Name

Description

Unit

Type

Ren

Enable resolver

Whether or not to enable the resolver

N/A

Input

Rsc

Resolver feedback signals

The two two-phase windings producing a sine and cosine feedback current proportional to the sine and cosine of the angle of the motor

N/A

Measurement

Rpp

Number of resolver pole pairs

Number of pole pairs of the resolver

N/A

Input

Rdir

Direction of the sensor rotation

Direction in which the sensor is turning, either clockwise or counterclockwise

N/A

Input

Rθ

Angle offset Δθ ( Sensor-  Rotor )

Angle offset between the resolver and the rotor position from 0 to 360 degrees

°

Input

Rk

Resolver sine cosine gains

The sine/cosine modulation output sine/cosine component amplitude. Default value are 1, 0, 0 and 1

N/A

Input

Etype

Excitation source type

The source from which the excitation of the resolver is generated. Can either be AC, which is generated inside the FPGA with the specified frequency, DC, which is generated with a 90° from the rotor and External, which is generated from outside the model

N/A

Input

Ef

Excitation frequency

Frequency of the excitation when in AC mode

Hz

Input

Esrc

Excitation source

Source of the external excitation source when in External mode

N/A

Input

Ets

Excitation time shift

This parameter is used to compensate the time offset between the carrier generation's input in the system and modulated signals' output

s

Input

...

Include Page
PINT:Resolver Model
PINT:Resolver Model
isMissingRequiredParameterstrue

Encoder Parameters and Measurements

ir

Symbol

Name

Description

Unit

Type

Encen

Enable encoder

Whether or not to enable the encoder

N/A

Input

QABZ

A B Z encoder signals

A B and Z signals of the encoder

N/A

Measurement

Qppr

Number of pulses per revolution

Number of pulses in one full revolution of the encoder

N/A

Input

Q

d

dir

Direction of the sensor rotation

Direction in which the sensor is turning, either clockwise or counterclockwise

N/A

Input

θoffset

Angle offset Δθ ( Sensor - Rotor )

Angle offset between the encoder and the rotor position from 0 to 360 degrees

°

Input

...

Visualization of Resolver Encoder Parameters effects

...

Resolver sine cosine gains affect the sine ( first axe ) and cosine ( second axe ) modulation output. Default values set to 1, 0, 0, 1 make it so the sine modulation has a sine form and the cosine modulation has a cosine form. If set to 0, 1, 1, 0, the sine modulation would have a cosine and the cosine modulation would have a sine form.Image Removed

...

Excitation frequency, in AC excitation source type, affects the frequency of the carrier signal. We can see the time step highlighted in red. ( Figure 3 is a zoomed in view of Figure 2 )Image Removed

...

Number of pulses per revolution (Qppr) defines how many times signals A and B pulse between two Z pulses ( one full rotation ).

Direction of the sensor rotation describes if A leads B ( Clockwise ) or if B leads A ( Counterclockwise )Image Removed

...

Electrical ports

  • This block has six electrical ports, the three terminals of the stator on the left side and three terminals of the rotor on the right side.