# Three-phase synchronous machine with wound rotor

Description of the Synchronous Machine with Wound Rotor component in Schematic Editor

The Schematic Editor component from the Machine section shown in Table 1, models the dynamics of a three-phase synchronous machine with a wound rotor in real-time. The model applies for machines with either salient or cylindrical rotors.

Table 1. Synchronous Machine with Wound Rotor component in HIL Toolbox
Component Component dialog window Component parameters
• Property tabs:
• Electrical
• Mechanical
• Feedback
• Snubber
• Output

In the above block, terminals A, B, and C are stator winding terminals consisting of three identical, sinusoidally distributed phase windings, displaced by 120 degrees. The stator winding arrangement (connection) can be selected by the block parameter star_delta. On the other side, terminals R1 and R2 represent field winding terminals for supplying the dc current. Both damper windings on the rotor are short-circuited without output terminals.

## Electrical sub-system model

The electrical part of the machine is represented by a sixth-order state-space model in a synchronously rotating dq reference frame, invariant to the electrical variable amplitudes, described in [3]. The dq reference frame is attached to the rotor, and a d-axis is aligned with the field winding axis. All electrical variables and parameters of the rotor circuit in following equations representing the electrical sub-system model refer to the stator-side.

$\frac{d}{dt}\left[\begin{array}{c}\begin{array}{c}{\lambda }_{ds}\\ {\lambda }_{qs}\\ \begin{array}{c}{\lambda }_{kd}\\ {\lambda }_{kq}\end{array}\end{array}\\ {\lambda }_{fd}\\ {\lambda }_{kq2}\end{array}\right]=\left[\begin{array}{cccccc}{-R}_{s}\frac{{L}_{Lfd}{L}_{Lkd}+{L}_{Lfd}{L}_{md}+{L}_{Lkd}{L}_{md}}{{D}_{d}}& {\omega }_{r}& {R}_{s}\frac{{L}_{Lfd}{L}_{md}}{{D}_{d}}& 0& {R}_{s}\frac{{L}_{Lkd}{L}_{md}}{{D}_{d}}& 0\\ -{\omega }_{r}& -{R}_{s}\frac{{L}_{lkq}{L}_{lkq2}+{L}_{mq}{L}_{lkq}+{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& {R}_{s}\frac{{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& {R}_{s}\frac{{L}_{lkq}{L}_{mq}}{{D}_{q}}\\ {R}_{kd}\frac{{L}_{Lfd}{L}_{md}}{{D}_{d}}& 0& {-R}_{kd}\frac{{L}_{Lfd}{L}_{ls}+{L}_{Lfd}{L}_{md}+{L}_{ls}{L}_{md}}{{D}_{d}}& 0& {R}_{kd}\frac{{L}_{lls}{L}_{md}}{{D}_{d}}& 0\\ 0& {R}_{kq}\frac{{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& -{R}_{kq}\frac{{L}_{lkq2}{L}_{ls}+{L}_{mq}{L}_{lkq2}+{L}_{ls}{L}_{mq}}{{D}_{d}}& 0& {R}_{kq}\frac{{L}_{ls}{L}_{mq}}{{D}_{q}}\\ {R}_{f}\frac{{L}_{Lkd}{L}_{md}}{{D}_{d}}& 0& {R}_{f}\frac{{L}_{ls}{L}_{md}}{{D}_{d}}& 0& {-R}_{f}\frac{{L}_{Lkd}{L}_{ls}+{L}_{Lkd}{L}_{md}+{L}_{ls}{L}_{md}}{{D}_{d}}& 0\\ 0& {R}_{kq2}\frac{{L}_{mq}{L}_{lkq}}{{D}_{q}}& 0& {R}_{kq2}\frac{{L}_{ls}{L}_{mq}}{{D}_{q}}& 0& {-R}_{kq2}\frac{{L}_{ls}{L}_{lkq}+{L}_{mq}{L}_{lkq}+{L}_{ls}{L}_{mq}}{{D}_{q}}\end{array}\right]\left[\begin{array}{c}\begin{array}{c}{\lambda }_{ds}\\ {\lambda }_{qs}\\ \begin{array}{c}{\lambda }_{kd}\\ {\lambda }_{kq}\end{array}\end{array}\\ {\lambda }_{fd}\\ {\lambda }_{kq2}\end{array}\right]$ $+\left[\begin{array}{ccc}1& 0& 0\\ 0& 1& 0\\ 0& 0& 0\\ 0& 0& 0\\ 0& 0& 1\\ 0& 0& 0\end{array}\right]\left[\begin{array}{c}{\nu }_{ds}\\ {\nu }_{qs}\\ {\nu }_{fd}\end{array}\right]$

$\left[\begin{array}{c}\begin{array}{c}{i}_{ds}\\ {i}_{qs}\\ \begin{array}{c}{i}_{kd}\\ {i}_{kq}\end{array}\end{array}\\ {i}_{fd}\\ {i}_{kq2}\end{array}\right]=\left[\begin{array}{cccccc}\frac{{L}_{Lfd}{L}_{Lkd}+{L}_{Lfd}{L}_{md}+{L}_{Lkd}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{Lfd}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{Lkd}{L}_{md}}{{D}_{d}}& 0\\ 0& \frac{{L}_{lkq}{L}_{lkq2}+{L}_{mq}{L}_{lkq}+{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& \frac{{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& \frac{{L}_{lkq}{L}_{mq}}{{D}_{q}}\\ \frac{{L}_{Lfd}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{Lfd}{L}_{ls}+{L}_{Lfd}{L}_{md}+{L}_{ls}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{lls}{L}_{md}}{{D}_{d}}& 0\\ 0& \frac{{L}_{lkq2}{L}_{mq}}{{D}_{q}}& 0& \frac{{L}_{lkq2}{L}_{ls}+{L}_{mq}{L}_{lkq2}+{L}_{ls}{L}_{mq}}{{D}_{d}}& 0& \frac{{L}_{ls}{L}_{mq}}{{D}_{q}}\\ \frac{{L}_{Lkd}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{ls}{L}_{md}}{{D}_{d}}& 0& \frac{{L}_{Lkd}{L}_{ls}+{L}_{Lkd}{L}_{md}+{L}_{ls}{L}_{md}}{{D}_{d}}& 0\\ 0& \frac{{L}_{mq}{L}_{lkq}}{{D}_{q}}& 0& \frac{{L}_{ls}{L}_{mq}}{{D}_{q}}& 0& \frac{{L}_{ls}{L}_{lkq}+{L}_{mq}{L}_{lkq}+{L}_{ls}{L}_{mq}}{{D}_{q}}\end{array}\right]\left[\begin{array}{c}\begin{array}{c}{\lambda }_{ds}\\ {\lambda }_{qs}\\ \begin{array}{c}{\lambda }_{kd}\\ {\lambda }_{kq}\end{array}\end{array}\\ {\lambda }_{fd}\\ {\lambda }_{kq2}\end{array}\right]$

${D}_{d}={L}_{Lfd}{L}_{Lkd}{L}_{ls}+{L}_{Lfd}{L}_{Lkd}{L}_{md}+{L}_{Lfd}{L}_{ls}{L}_{md}+{L}_{Lkd}{L}_{ls}{L}_{md}$

${D}_{q}={L}_{lkq}{{L}_{lkq2}L}_{ls}+{L}_{lkq}{L}_{lkq2}{L}_{mq}+{L}_{lkq}{L}_{mq}{L}_{ls}+{L}_{lkq2}{L}_{ls}{L}_{mq}$

${L}_{Lkd}={L}_{lkd}+{L}_{C}$

${L}_{Lfd}={L}_{lfd}+{L}_{C}$
Note: If field input is defined as current, the field winding equation is removed from mathematical model. Instead, the field input current is used as the model's input. There is no support for 2 q-axis damper windings with current input as of yet.
Table 2. Synchronous Machine with Wound Rotor electrical subsystem model variables and parameters
Symbol Description
${\lambda }_{ds}$ direct axis component of stator flux
${\lambda }_{qs}$ quadrature axis component of stator flux
${\lambda }_{kd}$ direct axis component of damper winding flux; value refers to the stator
${\lambda }_{kq}$ quadrature axis component of damper winding flux; value refers to the stator
${\lambda }_{fd}$ field winding flux; value refers to the stator-side
${\lambda }_{kq2}$ second quadrature axis component of damper winding flux; value refers to the stator-side (if enabled)
${i}_{ds}$ direct axis component of stator current
${i}_{qs}$ quadrature axis component of stator current
${i}_{kd}$ direct axis component of damper winding current; value refers to the stator-side
${i}_{kq}$ quadrature axis component of the damper winding current value; refers to the stator-side
${i}_{fd}$ field winding current; value refers to the stator-side
${i}_{kq2}$ second quadrature axis component of the damper winding current; value refers to the stator-side (if enabled)
${v}_{ds}$ direct axis component of stator voltage
${v}_{qs}$ quadrature axis component of stator voltage
${v}_{fd}$ field winding voltage; value refers to the stator-side
${R}_{s}$ stator phase resistance
${R}_{kd}$ d-axis damper winding resistance; value refers to the stator-side
${R}_{kq}$ q-axis damper winding resistance; value refers to the stator-side
${R}_{kq2}$ second q-axis damper winding resistance; value refers to the stator-side
${R}_{fd}$ field winding resistance; value refers to the stator-side
${L}_{ls}$ stator phase leakage inductance
${L}_{md}$ magnetizing inductance in d-axis
${L}_{mq}$ magnetizing inductance in q-axis
${L}_{lkd}$ damper phase winding leakage inductance in d-axis; value refers to the stator-side
${L}_{lkq}$ damper phase winding leakage inductance in q-axis; value refers to the stator-side
${L}_{lkq2}$ second damper phase winding leakage inductance in q-axis; value refers to the stator-side
${L}_{lfd}$ field winding leakage inductance in q-axis; value refers to the stator-side
${\omega }_{r}^{}$ rotor electrical speed
${L}_{C}$ Canay leakage inductance; value refers to the stator-side

At the rotor field winding terminals (R1 and R2), electrical variables (voltage and current) are real rotor values, and do not refer to the stator. Also, the machine model provides real values for damper winding currents (in addition to those values that are referred to the stator). The machine block includes “turns ratio” parameters Ns_div_Nfd, Ns_div_Nkd, and Ns_div_Nkq. Parameter Ns_div_Nfd is used for transforming field winding variables between the rotor and the stator, and parametersNs_div_Nkd and Ns_div_Nkq are used for transforming damper winding variables between the d- and q-axis and the stator, respectively.

To illustrate this, if the user applies voltage, vfd, at field winding terminals, it is transformed to the stator value, vfds (used in the previously given model equations) with the following equation:

${V}_{fds}=\frac{{N}_{s}}{{N}_{fd}}\bullet {V}_{fd}$

Similarly, in the model described by previous equations, calculated rotor currents: field winding current ifds, and damper winding currents ikds and ikqs, are referred back to the real rotor windings values ifd, ikd, and ikq, through the following equations:

Rotor circuit electrical parameters (resistances and inductances) used in the electrical sub-system model equations are taken from the values entered in the Electrical Tab (Figure 1). Rotor circuit parameters should be entered in this menu only after transforming them to the stator side.

Canay inductance represents the shared leakage inductance of field winding and d-axis damper winding. For example: adding up Canay inductance ${L}_{C}$ and field winding uncoupled leakage inductance ${L}_{lkd}$ would give a full leakage inductance of a field winding.

## Mechanical sub-system model

The mechanical part of the machine is represented by a second order state-space model:

$\stackrel{̇}{{\omega }_{m}}=\frac{1}{{J}_{m}}\left({T}_{e}-{T}_{L}\right)$

$\stackrel{̇}{{\theta }_{m}}={\omega }_{m}$

${T}_{e}=\frac{3}{2}p\left({\lambda }_{ds}{i}_{qs}-{\lambda }_{qs}{i}_{ds}\right)$

Table 3. Synchronous Machine with Wound Rotor mechanical subsystem model variables and parameters
Symbol Description
${\omega }_{m}^{}$ rotor mechanical speed
${\theta }_{m}$ rotor mechanical angle (between as and ar axis)
${T}_{e}$ machine developed electromagnetic torque
${T}_{L}$ shaft mechanical load torque
${J}_{m}$ combined rotor and load moment of inertia
${p}_{}$ machine number of pole pairs

## Block dialogue box and parameters

The Synchronous Machine with Wound Rotor component Dialogue box consists of seven tabs for specifying the machine model parameters.

## Tab: "Electrical"

In the Electrical tab, you can specify all electrical parameters of the model. Its layout is shown here:

Synchronous Machine with Wound Rotor electrical parameters:

Symbol Description
Specifies the machine model type
Switches the number of damper windings in the machine model, causing the state space model to be either of a sixth-order or a fifth-order by removing all variables and parameters associated with a second winding.
Machine mechanical rated speed [rpm]. Used in nonlinear model for magnetizing curve defined as no load curve.
$Rs$ stator phase resistance [Ω]
$Lls$ stator phase leakage inductance [H]
$Lmd$ magnetizing inductance in d-axis [H]
$Lmq$ magnetizing inductance in q-axis [H]
Specifies the way the magnetizing curve is defined. Either as no load curve or as flux vs current.
No load stator line-to-line RMS voltage [V]
Magnetizing current component in direct-axis [A]
Magnetizing current component in quadrature-axis [A]
Magnetizing flux component in direct-axis [Wb] defined as a function of Imd and Imq
Magnetizing flux component in quadrature-axis [Wb] defined as a function of Imd and Imq
$Rf$ field winding resistance [Ω]; value refers to the stator-side
$Llfd$ field winding leakage inductance in q-axis [H]; value refers to the stator-side
$Rkd$ d-axis damper winding resistance [Ω]; value refers to the stator-side
$Rkq$ q-axis damper winding resistance [Ω]; value refers to the stator-side
$Rkq2$ second q-axis damper winding resistance [Ω]; value refers to the stator-side
$Llkd$ damper phase winding leakage inductance in d-axis [H]; value refers to the stator-side
$Llkq$ damper phase winding leakage inductance in q-axis [H]; value refers to the stator-side
$Llkq2$ second damper phase winding leakage inductance in q-axis [H]; value refers to the stator-side
$Ns/Nfd$ turns ratio between stator phase winding and field winding; used for transforming field winding variables to the stator-side
$Ns/Nkd$ turns ratio between stator phase winding and d-axis damper winding; used for transforming damper winding variables to the stator-side
$Ns/Nkq$ turns ratio between stator phase winding and q-axis damper winding; used for transforming damper winding variables to the stator-side
${L}_{C}$ Canay leakage inductance in d-axis [H]; value refers to the stator-side

The Synchronous Machine with Wound Rotor component can include magnetic saturation effects. In that case, fluxes are defined as functions of magnetizing currents ${i}_{mds}$ and ${i}_{nqs}$ . These functions are represented in the form of lookup tables. The lookup tables use linear interpolation and linear extrapolation.

Saturation can be parametrized in the following ways:
2. flux vs current
In the first case when the magnetizing curve is defined as no load curve, variables must be defined as Python lists. In the second case, when the magnetizing curve is defined as flux vs current, the magnetizing current components imd_vector and imq_vector must be defined as Python lists, while the magnetizing flux components psimd_table and psimq_table should be defined as nested Python lists. The number of inner lists must be equal to the number of elements in imd_vector and the number of elements in each inner list must be equal to the number of elements in the imq_vector. Examples of parametrization using the Model Initialization script are given below.

## Tab: "Mechanical"

In the Mechanical tab, you can specify all mechanical parameters of the model. Its layout is shown here:

Synchronous Machine with Wound Rotor mechanical parameters:

symbol description
${pms}_{}$ machine number of pole pairs
${Star/delta}_{}$ stator winding connection (star or delta)
${J}_{m}$ combined rotor and load moment of inertia [kgm2]
machine viscous friction coefficient [Nms]
limiting mechanical angle between 0 and $2\pi$

In the Load tab, you can specify the external load settings. Its layout is shown here:

Table 4. Synchronous Machine with Wound Rotor mechanical parameters
Symbol Description
external load type: torque or speed
assigned offset value to the input signal representing external torque command
assigned gain value to the input signal representing external torque command

External load enables you to use an analog input signal from a HIL analog channel with the address ai_pin_addr as an external torque/speed load. It also lets you assign an offset to the input signal and gain (Nm/V) according to the formula:

${T}_{L}=gain\bullet \left(AI\left(ai_pin_addr\right)+offset\right)$

## Tab: "Feedback"

In the Feedback tab, you can specify all parameters relevant to the machine model feedback signals. Its layout is shown here:

Synchronous Machine with Wound Rotor feedback properties:

Symbol Desription
incremental encoder number of pulses per revolution
resolver number of pole pairs
resolver carrier signal source selection (internal or external)
resolver carrier signal frequency (internal carrier)
resolver carrier input channel offset
resolver carrier input channel gain
Note: The Block tab does not specify model output variables like machine voltages, currents, and fluxes.
Note: While the machine speed is positive, the encoder channel B signal leads the encoder channel A signal.

In the Advanced tab, you can specify some advanced features for the machine model. Its layout is shown here:

Theta_ab specifies the position of the stationary αβ reference frame with regards to the stator phase a axis. In this way, you can monitor the machine model output variables (currents, voltages, and fluxes) in a familiar stationary reference frame. Also, this defines the initial position of the dq reference frame, since the d-axis of the dq reference frame is displaced by the initial rotor position ${\theta }_{r0}$ with regards to the α-axis of a stationary reference frame.

There are usually two machine modeling approaches: the first is where the alpha axis of the stationary reference frame lags by 90 degrees in regard to the stator phase a-axis (used by default, and indicated in a) Figure 6), and the second one, where the alpha axis is aligned with the stator phase a-axis (indicated in b in Figure 6). Both approaches are usable for the Synchronous Machine with Wound Rotor component.

Field inputspecifies the physical quantity which will be applied to the field winding:
1. voltage
2. current

In either case, the physical quantity refers to the rotor-side.

In order for the input field current to be referred to the stator parameter, Ns_div_Nfd in the Electrical Tab should be set to $\frac{3}{2}$ .

For linear machine models, you can choose whether to apply voltage or current to the field winding. Nonlinear machine models only allows voltage as a field input.

## Tab: "Output"

This block tab enables a single, vectorized signal output from the machine. The output vector contains selected machine mechanical and/or electrical variables in the same order as listed in this tab. Its layout is shown here:
Table 5. Synchronous machine with wound rotor output parameters
symbol description
signal processing output execution rate
machine electrical torque
machine mechanical angular speed
machine mechanical angle
alpha component of stator current
beta component of stator current
direct axis component of stator current
quadrature axis component of stator current
alpha component of stator flux
beta component of stator flux
direct axis component of stator flux
quadrature axis component of stator flux

## Model outputs

Table 6. You can select the following variables in HIL Analog Outputs for the Synchronous Machine with Wound Rotor component:
Symbol Analog output variable name Description
${\lambda }_{\alpha s}$ psi_als alpha component of stator flux
${\lambda }_{\beta s}$ psi_bes beta component of stator flux
${\lambda }_{ds}$ psi_ds direct axis component of stator flux
${\lambda }_{qs}$ psi_qs quadrature axis component of stator flux
${i}_{\alpha s}$ i_als alpha component of stator current
${i}_{\beta s}$ i_bes beta component of stator current
${i}_{ds}$ i_ds direct axis component of stator flux
${i}_{qs}$ i_qs quadrature axis component of stator current
${i}_{as}$ i_as line (terminal) current a
${i}_{bs}$ i_bs line (terminal) current b
${i}_{cs}$ i_cs line (terminal) current c
${i}_{fd}$ i_fd field winding current
${i}_{k\alpha }$ i_kal d-axis damper winding current
${i}_{k\beta }$ i_kbe q-axis damper winding current
${i}_{asf}$ i_asf stator phase a current
${i}_{bsf}$ i_bsf stator phase b current
${i}_{csf}$ i_csf stator phase c current
${v}_{abs}$ v_abs stator line voltage between terminals A and B
${v}_{bcs}$ v_bcs stator line voltage between terminals B and C
${v}_{cas}$ v_cas stator line voltage between terminals C and A
${v}_{fd}$ v_fd field winding voltage (between terminals R1 and R2). Available for voltage as a field input.
${v}_{asf}$ v_asf stator phase a voltage
${v}_{bsf}$ v_bsf stator phase b voltage
${v}_{csf}$ v_csf stator phase c voltage
${T}_{e}$ machine electrical torque machine electrical torque
${T}_{L}$ machine load torque machine load torque
${\omega }_{m}$ machine mechanical speed machine mechanical angular speed
${\theta }_{m}$ machine mechanical angle machine mechanical angle
machine sine encoder A sinusoidal encoder channel A output
machine sine encoder B sinusoidal encoder channel B output
machine resolver A resolver channel A output
machine resolver B resolver channel B output