> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/pe-add-on-opal-rt/model-in-schematic-editor/library-blocks-reference/machines-blocks/doubly-fed-induction-machine-with-saturation.md).

# Doubly-Fed Induction Machine with Saturation

## Description

<figure><img src="https://1300141755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCyfrFRdgX5VC5iwM13Zm%2Fuploads%2Fe2IYDoXHqpm3GuCI2AbY%2Fimage.png?alt=media&amp;token=1de3904c-fe48-4814-8e3a-7644786fab4d" alt="" width="148"><figcaption></figcaption></figure>

The **Doubly-Fed Induction Machine with Saturation (DFIM)** block models a three‑phase induction machine (asynchronous machine) with an accessible wound‑rotor design and optional resolver and encoder interfaces. The machine can operate in motoring mode when the mechanical torque is positive, and in generating mode when the mechanical torque is negative.

{% hint style="info" %}
This block is only available in the eHS library.
{% endhint %}

The 1D‑LUT (Saturation Curve) block applies linear interpolation to enhance the accuracy of the saturation representation.

## Motor modelling equations <a href="#id-1.-motor-modelling-equations" id="id-1.-motor-modelling-equations"></a>

The stator and rotor voltage equations of an induction motor in the stationary (stator reference frame) reference frame can be described by the equations (1)-(4).

<p align="center"><span class="math">V_{sd}=R_{s}i_{sd}+\frac{d\psi_{sd}}{dt}\qquad\qquad\quad(1)\\[8pt] V_{sq}=R_{s}i_{sq}+\frac{d\psi_{sq}}{dt}\qquad\qquad\quad(2)\\[8pt] V_{rd}'=R_{s}'i_{rd'}+\frac{d\psi_{rd}'}{dt}+\omega_{r}\psi_{rq}'\quad(3) \\[8pt] V_{rq}'=R_{s}'i_{rq'}+\frac{d\psi_{rq}'}{dt}-\omega_{r}\psi_{rd}'\quad(4)\\[8pt]</span></p>

Equations (1)-(4) can be represented in matrix form:

$$
\begin{aligned}
\begin{bmatrix}
V\_{sd}\\
V\_{sq}\\
V'*{rd}\\
V'*{rq}
\end{bmatrix}
=============

\begin{bmatrix}
R\_s & 0 & 0 & 0\\
0 & R\_s & 0 & 0\\
0 & 0 & R\_r' & 0\\
0 & 0 & 0 & R\_r'
\end{bmatrix}
\begin{bmatrix}
i\_{sd}\\
i\_{sq}\\
i'*{rd}\\
i'*{rq}
\end{bmatrix}

* \frac{d}{dt}
  \begin{bmatrix}
  \psi\_{sd}\\
  \psi\_{sq}\\
  \psi'*{rd}\\
  \psi'*{rq}
  \end{bmatrix}
*

\begin{bmatrix}
0 & 0 & 0 & 0\\
0 & 0 & 0 & 0\\
0 & 0 & 0 & \omega\_r\\
0 & 0 & -\omega\_r & 0
\end{bmatrix}
\begin{bmatrix}
\psi\_{sd}\\
\psi\_{sq}\\
\psi'*{rd}\\
\psi'*{rq}
\end{bmatrix}
\end{aligned}
\\\[8pt]
$$

The stator and rotor flux linkages can be expressed as equation

$$
\begin{aligned}
\begin{bmatrix}
\psi\_{sd}\\
\psi\_{sq}\\
\psi'*{rd}\\
\psi'*{rq}
\end{bmatrix}
=============

\begin{bmatrix}
L\_s & 0 & L\_m & 0\\
0 & L\_s & 0 & L\_m\\
L\_m & 0 & L\_r' & 0\\
0 & L\_m & 0 & L\_r'
\end{bmatrix}
\begin{bmatrix}
i\_{sd}\\
i\_{sq}\\
i'*{rd}\\
i'*{rq}
\end{bmatrix}
\end{aligned}
\qquad (6)
\\\[8pt]
$$

## Magnetizing flux linkage equations

The magnetizing flux linkages ψm are computed from the stator and rotor flux linkages using the following equations.

$$
\psi\_{mq}=\psi\_{sq} \frac{L\_{aq}}{L\_{ls}}+ \psi\_{rq}' \frac{L\_{aq}}{L\_{lr}'}   \qquad (7)
\\
\psi\_{md}=\psi\_{sd} \frac{L\_{ad}}{L\_{ls}}+ \psi\_{rd}' \frac{L\_{ad}}{L\_{lr}'}   \qquad (8)
$$

where

*ψ*<sub>*mq*</sub>*&#x20;& ψ*<sub>*md*</sub> = q & d-axis magnetizing flux linkages,\
*L*<sub>*aq*</sub> = q-axis inductance, such that *L*<sub>*aq*</sub>*= (L*<sub>*m*</sub>*&#x20;L*<sub>*ls*</sub>*&#x20;L*<sub>*lr*</sub>*')/(L*<sub>*m*</sub>*&#x20;L*<sub>*ls*</sub>*&#x20;+ L*<sub>*m*</sub>*&#x20;L*<sub>*lr*</sub>' *+L*<sub>*ls*</sub>*&#x20;L*<sub>*lr*</sub>'*))*\
*L*<sub>*ad*</sub> = d-axis inductance, such that *L*<sub>*ad*</sub>*= (L*<sub>*m*</sub>*&#x20;L*<sub>*ls*</sub>*&#x20;L*<sub>*lr*</sub>‘*)/(L*<sub>*m*</sub>*&#x20;L*<sub>*ls*</sub>*&#x20;+ L*<sub>*m*</sub>*&#x20;L*<sub>*lr*</sub>‘ *+L*<sub>*ls*</sub>*&#x20;L*<sub>*lr*</sub>‘*)) ,*\
*L*<sub>*ls*</sub> = Stator leakage inductance,\
*L*<sub>*lr*</sub>’ = Rotor leakage inductance (referred to stator side),\
*L*<sub>*m*</sub> = Magnetizing inductance.

## Thermal modelling of stator and rotor resistances

<p align="center"><span class="math">R_{s} = R_{snom} \left(1+\alpha_{cond} ( \theta_{f}-\theta_{i} ) \right) \qquad(9) \\ R_{r}' = R_{rnom}' \left(1+\alpha_{cond} ( \theta_{f}-\theta_{i} ) \right) \qquad(10)</span></p>

where\
$$\theta\_f-\theta\_i=\Delta\_{\theta}$$ is the temperature difference from the initial temperature of the stator and rotor windings $$\theta\_i$$*,*\
*R*<sub>*snom*</sub> = stator resistance at initial temperature $$\theta\_i$$*,*\
*R*<sub>*rnom'*</sub> = rotor resistance at initial temperature $$\theta\_i$$*,*\
*R*<sub>*s*</sub> = stator resistance at temperature $$\theta\_f$$*,*\
*R‘*<sub>*r*</sub> = rotor resistance at temperature $$\theta\_f$$*,*\
*α*<sub>*cond*</sub> = temperature coefficient of resistance of the material.

### Reference frame transformation <a href="#reference-frame-transformation" id="reference-frame-transformation"></a>

The saturated induction machine model outputs electrical quantities, such as current and voltage, in three reference frames: the phase domain, the stationary frame, and the rotating frame.

#### **Phase domain**

This frame operates directly in the time domain, providing raw, phase-resolved electrical quantities.

#### **Stationary frame**

In this frame, the model uses the amplitude‑invariant, cosine‑based Clarke transformation to express electrical quantities in a stationary reference system.

$$
\begin{pmatrix}
\alpha \\
\beta
\end{pmatrix}
=============

\frac{2}{3}
\begin{pmatrix}
1 & -\tfrac12 & -\tfrac12 \\
0 & \tfrac{\sqrt{3}}{2} & -\tfrac{\sqrt{3}}{2}
\end{pmatrix}
\begin{pmatrix}
a \\
b \\
c
\end{pmatrix}
$$

$$
\begin{pmatrix}
a \\
b \\
c
\end{pmatrix}
=============

\begin{pmatrix}
1 & 0 \\
-\tfrac12 & \tfrac{\sqrt{3}}{2} \\
-\tfrac12 & -\tfrac{\sqrt{3}}{2}
\end{pmatrix}
\begin{pmatrix}
\alpha \\
\beta
\end{pmatrix}
$$

This transformation preserves the amplitude of the electrical variables to which it is applied. In a balanced system, this means that the α‑axis component is equal to the magnitude of phase A.

{% hint style="info" %}
The linear **SCIM** and **DFIM** models apply the **amplitude‑invariant sine‑based Park transformation**, resulting in a rotating reference frame that is positioned 90° behind the phase‑A axis at ωt = 0. For the **saturated induction machine** models, however, the rotating reference frame is aligned with the phase‑A axis at ωt = 0.
{% endhint %}

#### **Rotating frame**

For applications that require a rotating reference frame, the model supports calculations based on three selectable reference angles: rotor flux, magnetization flux, and stator flux.

The synchronous angle $$\theta\_e$$ is defined by the flux angle selected, shifted by a user-defined offset.

$$
\theta\_e = \arctan!\left( \frac{\phi\_{X\beta}}{\phi\_{X\alpha}} \right) + \theta\_{offset}
$$

Where $$X$$ is rotor, magnetizing, or stator. The transformations are expressed by the following matrix equations:

$$
\begin{pmatrix} d \ q \end{pmatrix}
\= \frac{2}{3}
\begin{pmatrix}
\cos(\theta\_e) & \cos!\left(\theta\_e - \frac{2\pi}{3}\right) & \cos!\left(\theta\_e + \frac{2\pi}{3}\right) \\
-\sin(\theta\_e) & -\sin!\left(\theta\_e - \frac{2\pi}{3}\right) & -\sin!\left(\theta\_e + \frac{2\pi}{3}\right)
\end{pmatrix}
\begin{pmatrix} a \ b \ c \end{pmatrix}
$$

$$
\begin{pmatrix} a \ b \ c \end{pmatrix}
=======================================

\begin{pmatrix}
\cos(\theta\_e) & -\sin(\theta\_e) \\
\cos!\left(\theta\_e - \frac{2\pi}{3}\right) & -\sin!\left(\theta\_e - \frac{2\pi}{3}\right) \\
\cos!\left(\theta\_e + \frac{2\pi}{3}\right) & -\sin!\left(\theta\_e + \frac{2\pi}{3}\right)
\end{pmatrix}
\begin{pmatrix} d \ q \end{pmatrix}
$$

Alternatively, the dq‑quantities can be obtained by rotating the stationary quantities:

$$
\begin{pmatrix} d \ q \end{pmatrix}
===================================

\begin{pmatrix}
\cos(\theta\_e) & \sin(\theta\_e) \\
-\sin(\theta\_e) & \cos(\theta\_e)
\end{pmatrix}
\begin{pmatrix} \alpha \ \beta \end{pmatrix} \\\[8pt]
\begin{pmatrix} \alpha \ \beta \end{pmatrix}
============================================

\begin{pmatrix}
\cos(\theta\_e) & -\sin(\theta\_e) \\
\sin(\theta\_e) & \cos(\theta\_e)
\end{pmatrix}
\begin{pmatrix} \alpha \ \beta \end{pmatrix}
$$

### Mechanical model

The equation of the mechanical model in torque mode can be expressed as follows

$$
\omega\_r\left\[k+1\right]=a \times \omega\_r\left\[k\right]+b \times \left(T\_{e}\left\[k\right]-T\_{l}\left\[k\right]-T\_{f,s}\left\[k\right]\right)
$$

with

$$
a=1-\frac{F\_vT\_S}{J} \\\[8pt]
b=\frac{30}{\pi}\frac{T\_S}{J} \\\[8pt]
$$

where $$\omega\_r$$ is the rotor speed in RPM, $$T\_e$$ is the electromagnetic torque in $$N.m$$, $$T\_i$$ is the torque command in $$N.m$$, $$F\_v$$ is the viscous friction coefficient in $$N.m.s/rad$$, $$J$$ is the rotor moment of inertia in $$kg.m^2$$, and $$T\_s$$ the time step in $$s$$. There is a dead-zone implementation with the static friction torque $$T\_{f,s}$$, if the net torque doesn't exceed the static friction torque threshold value $$F\_s$$, given in $$N.m$$, the speed remains zero.

In speed mode, the rotor speed is directly set to the speed command $$\omega\_{r,c}$$.

A resolver is a rotary transformer where the magnitude of the signal through the resolver windings varies sinusoidally as the shaft rotates.

## Single excitation resolver <a href="#single-excitation-resover" id="single-excitation-resover"></a>

The equations of the resolver can be expressed as follows:

$$
\theta\_{res}=\left(\theta\_{mec}+\theta\_{offset}\right) R\_{pp} \\\[8pt]
\text{cosine}=\text{Excitation} \times \left\[ R\_{cc} \cos \left( \theta\_{res} \right) + R\_{cs} \sin \left( \theta\_{res} \right) \right] \\\[8pt]
\text{sine}= \left(-1\right)^{R\_{dir}} \times \text{Excitation} \times \left\[ R\_{sc} \cos \left( \theta\_{res} \right) + R\_{ss} \sin \left( \theta\_{res} \right) \right]
$$

where $$\theta\_{res}$$ is the resolver angle, $$\theta\_{mec}$$ is the mechanical angle of the machine, $$\theta\_{offset}$$ is the angle offset, $$R\_{pp}$$ is the number of pole pairs of the resolver, $$R\_{cc}$$, $$R\_{sc}$$, $$R\_{cs}$$, and $$R\_{ss}$$ are the resolver sine cosine gains and $$R\_{dir}$$ is the direction of the sensor rotation (0 = clockwise, 1 = counterclockwise).

{% hint style="info" %}
$$R\_{dir}$$ does not have an effect to the resolver angle, but change the resolver sine sign to match the counterclockwise convention.
{% endhint %}

When the gains are set to its default values ( $$R\_{cc}=1$$, $$R\_{sc}=0$$, $$R\_{cs}=0$$, and $$R\_{ss}=1$$), the sensor rotation is clockwise, and the excitation is a sinusoidal wave ( $$\text{Excitation}=\sin 2 \pi f t$$, where $$f$$ is the excitation frequency), the outputs are given by the following expressions:

$$
\text{cosine}=\sin \left( 2 \pi f t \right) \times \cos \left( \theta\_{res} \right) \\\[8pt]
\text{sine}= \sin \left( 2 \pi f t \right) \times \sin \left( \theta\_{res} \right)
$$

It means the excitation signals are modulated by the sine and cosine of the rotor position angle.

## **Excitation source**

The excitation signal can be selected among one of the following options:

* DC: a continuous signal is used as excitation, so the outputs are $$\text{cosine}= \cos \left( \theta\_{res} \right)$$ and $$\text{sine}= \sin \left( \theta\_{res} \right)$$;
* AC: a constant-frequency sinusoidal, unitary amplitude waveform is used as excitation

  $$\text{Excitation}=\sin 2 \pi f t$$, so the outputs are those expressed in the previous section.
* External: a external signal, coming from one of the analog inputs, is used as excitation. This incoming signal may be rescaled by the Analog Input Differential Rescaling module (AIR).

## **Resolver gains**

The resolver gains can be used to simulate non-ideal conditions of the sensor, occurring due to manufacturing imperfections.

**Amplitude imbalance:** Output phases have unequal inductances. Assuming the coupling between the rotor excitation winding and the cosine winding as the reference:

$$
\begin{aligned}
\left\[\begin{matrix}R\_{cc} & R\_{cs}\R\_{sc} & R\_{ss}\end{matrix}\right]
\end{aligned}=\begin{aligned}
\left\[\begin{matrix}1 & 0\0 & \alpha\end{matrix}\right]
\end{aligned}
$$

where $$0< \alpha <1$$

**Imperfect quadrature:** Output phases are not in perfect spatial quadrature. Assuming the angle $$\theta\_{res}=0$$ when the rotor excitation winding is aligned with the cosine winding:

$$
\begin{aligned}
\left\[\begin{matrix}R\_{cc} & R\_{cs}\R\_{sc} & R\_{ss}\end{matrix}\right]
\end{aligned}=\begin{aligned}
\left\[\begin{matrix}1 & 0\ \cos \alpha & \sin \alpha\end{matrix}\right]
\end{aligned}
$$

where $$\alpha$$ is the angle between the cosine winding and the sine winding. When $$\alpha = 90°$$, the windings are in perfect quadrature, and the default gain values are recovered.

## **Faults**

One of the windings is not connected due to a fault. In this case, the corresponding gain is equal to zero.

<p align="center"><span class="math">\begin{aligned} \left[\begin{matrix}R_{cc} &#x26; R_{cs}\\R_{sc} &#x26; R_{ss}\end{matrix}\right] \end{aligned}=\begin{aligned} \left[\begin{matrix}1 &#x26; 0\\ 0 &#x26; 0\end{matrix}\right] \end{aligned} \text{ or }\begin{aligned} \left[\begin{matrix}R_{cc} &#x26; R_{cs}\\R_{sc} &#x26; R_{ss}\end{matrix}\right] \end{aligned}=\begin{aligned} \left[\begin{matrix}0 &#x26; 0\\ 0 &#x26; 1\end{matrix}\right] \end{aligned}</span></p>

## **Excitation time shift**

When the excitation signal comes from an external source (one of the analog input channels) the signal can be shifted by a given amount of time.

Number of resolver pole pairs affects the number of electrical turns per mechanical turns.

Resolver sine cosine gains affect the sine (first axis) and cosine (second axis) 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.

Number of pulses per revolution (**Q**<sub>**ppr**</sub>) 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)

## Parameters

{% tabs %}
{% tab title="Electrical" %}

<table><thead><tr><th width="180">Parameter</th><th width="310">Description</th><th width="100" align="center">Sets feature</th><th width="120">I/O &#x26; Monitoring</th></tr></thead><tbody><tr><td><strong>Stator resistances R</strong><sub><strong>Snom</strong></sub></td><td>Stator winding resistance of phase a, b, and c (Ω).</td><td align="center">Yes</td><td>From model</td></tr><tr><td><strong>Rotor resistance R</strong><sub><strong>rnom'</strong></sub></td><td>Equivalent rotor winding resistance referred to the stator of phase a, b, and c (Ω).</td><td align="center">Yes</td><td>From model</td></tr><tr><td><strong>Temperature difference Δ</strong><sub><strong>θ</strong></sub></td><td>Temperature difference w.r.t the initial temperature of stator and rotor windings (°C)</td><td align="center">Yes</td><td>From model</td></tr><tr><td><strong>Stator temperature coefficient of resistance </strong><em><strong>α</strong></em><sub><em><strong>condstator</strong></em></sub></td><td>Temperature coefficient of resistance of stator winding (°C<sup>-1</sup>)</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Rotor temperature coefficient of resistance </strong><em><strong>α</strong></em><sub><em><strong>condrotor</strong></em></sub></td><td>Temperature coefficient of resistance of rotor winding (°C<sup>-1</sup>)</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Stator leakage inductance L</strong><sub><strong>lS</strong></sub></td><td>Stator winding leakage inductance of phase a, b, and c (H).</td><td align="center">Yes</td><td>From model</td></tr><tr><td><strong>Rotor leakage inductance L</strong><sub><strong>lr'</strong></sub></td><td>Equivalent rotor winding leakage inductance referred to the stator of phase a, b, and c (H)</td><td align="center">Yes</td><td>From model</td></tr><tr><td><strong>Electrical saturation profile input E</strong><sub><strong>sat</strong></sub></td><td><p>Two options for the saturation profile</p><p><strong>Stator Voltage Line to Line vs. Stator Current</strong>: import the Stator voltage line to line table in V<sub>sll</sub></p><p><strong>Magnetizing Inductance vs. Magnetizing Flux</strong>: import the Magnetizing inductance table in L<sub>m</sub></p></td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Stator voltage line to line table V</strong><sub><strong>sll</strong></sub></td><td>No Load saturation curve parameters (V) file</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Magnetizing inductance table L</strong><sub><strong>m</strong></sub></td><td>Stator-rotor mutual (magnetizing) inductance of phase a, b, and c (H) file</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Cut-off frequency magnetizing inductance F</strong><sub><strong>cLm</strong></sub></td><td>Cut-off frequency associated with the frequency response of the magnetic coil, which acts as a filtering element (Hz).<br>The default value is 3 kHz.</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>N</strong><sub><strong>sr</strong></sub><strong> Turns ratio</strong></td><td>Stator-rotor turns ratio</td><td align="center">NO</td><td>N/A</td></tr><tr><td><strong>Number of pole pairs pp</strong></td><td>Number of pole pairs.</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Stator currents i</strong><sub><strong>S</strong></sub></td><td>Currents measured at phases a, b and c of the stator (A)</td><td align="center">No</td><td><p>To model<br>To AO</p><p>To SFP<br>To Waveform</p></td></tr><tr><td><strong>Rotor phase currents i</strong><sub><strong>r'</strong></sub></td><td>Rotor equivalent phase a, b, and c currents, referred to the stator (A)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator αβ currents i</strong><sub><strong>sαβ</strong></sub></td><td>Stator currents in αβ reference frame (A)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Rotor αβ currents i</strong><sub><strong>rαβ</strong></sub></td><td>Rotor currents in αβ reference frame, referred to the stator (A)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator dq currents i</strong><sub><strong>sdq</strong></sub></td><td>Stator currents in dq reference frame (A)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Rotor dq currents i</strong><sub><strong>rdq</strong></sub></td><td>Rotor currents in dq reference frame, referred to the stator (A)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Synchronous reference frame orientation Frame</strong><sub><strong>sel</strong></sub></td><td><p>Three options for the synchronous reference frame depending on the use case:</p><p><strong>Stator flux-oriented reference frame</strong> (default value);</p><p><strong>Rotor flux-oriented reference frame</strong>;</p><p><strong>Air gap flux-oriented reference frame</strong>.</p></td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Synchronous reference offset Frame</strong><sub><strong>offset</strong></sub></td><td>Offset angle for synchronous reference frame (degree)</td><td align="center">No</td><td>N/A</td></tr><tr><td><strong>Synchronous Angle θ</strong><sub><strong>est</strong></sub></td><td>Estimated synchronous angle displayed depending of the orientation (degree)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator αβ voltages V</strong><sub><strong>sαβ</strong></sub></td><td>Stator voltages in αβ reference frame (V)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator αβ fluxes Φ</strong><sub><strong>sαβ</strong></sub></td><td>Stator fluxes in αβ reference frame (Wb)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Rotor αβ fluxes Φ</strong><sub><strong>rαβ</strong></sub></td><td>Rotor fluxes in αβ reference frame, referred to the stator (Wb)</td><td align="center">No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Snubber resistance R</strong><sub><strong>Sn</strong></sub></td><td>Snubber resistances on phases a, b, and c (Ω).</td><td align="center">Yes</td><td>N/A</td></tr><tr><td><strong>Snubber capacitance C</strong><sub><strong>Sn</strong></sub></td><td>Snubber capacitances on phases a, b, and c (F).</td><td align="center">Yes</td><td>N/A</td></tr></tbody></table>
{% endtab %}

{% tab title="Mechanical" %}

<table><thead><tr><th width="180">Parameter</th><th width="310">Description</th><th width="100">Stets feature</th><th width="120">I/O &#x26; Monitoring</th></tr></thead><tbody><tr><td><strong>J Rotor inertia</strong></td><td>Rotor moment of inertia available only in Torque mode (kg·m<sup>2</sup>)</td><td>No</td><td>N/A</td></tr><tr><td><strong>F</strong><sub><strong>s</strong></sub><strong> Static friction torque</strong></td><td>Static friction torque (N·m)</td><td>No</td><td>N/A</td></tr><tr><td><strong>F</strong><sub><strong>v</strong></sub><strong> Viscous friction coefficient</strong></td><td>Viscous friction available only in Torque mode (N·m·s/rad)</td><td>No</td><td>N/A</td></tr><tr><td><strong>ctrl Mechanical control mode</strong></td><td><p>Options: Speed or Torque.</p><p>In <strong>Speed (0) mode</strong>, the mechanical model is bypassed and the speed command is applied directly.<br>In <strong>Torque (1) mode</strong>, the torque command drives the mechanical model to compute speed.</p></td><td>Yes</td><td>From model</td></tr><tr><td><strong>T Torque command</strong></td><td>Torque command to the mechanical model (N.m)</td><td>Yes</td><td>From model</td></tr><tr><td><strong>ω</strong><sub><strong>rc</strong></sub><strong> Rotor speed command</strong></td><td>Rotor speed command to the mechanical model (rpm)</td><td>Yes</td><td>From model</td></tr><tr><td><strong>ω</strong><sub><strong>r0</strong></sub><strong> Initial rotor speed command</strong></td><td>Initial rotor speed setpoint (rpm)</td><td>No</td><td>N/A</td></tr><tr><td><strong>ω</strong><sub><strong>r</strong></sub><strong> Rotor speed</strong></td><td>Mechanical rotor speed (rpm)</td><td>No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Electromagnetic torque T</strong><sub><strong>e</strong></sub></td><td>Torque measured at the rotor (N.m)</td><td>No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>θ</strong><sub><strong>0</strong></sub><strong> Initial rotor angle</strong></td><td>Rotor position at time t = 0 (°)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Rotor angle, θ</strong></td><td>Mechanical rotor angle (0–360°) (°)</td><td>No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr></tbody></table>
{% endtab %}

{% tab title="Resolver" %}

<table><thead><tr><th width="180">Parameter</th><th width="310">Description</th><th width="100">Sets feature</th><th width="120">I/O &#x26; Monitoring</th></tr></thead><tbody><tr><td><strong>Enable resolver Ren</strong></td><td><p><strong>Disable</strong> the resolver.</p><p><strong>Enable</strong> the resolver, the following parameters are displayed.</p></td><td>No</td><td>N/A</td></tr><tr><td><strong>Resolver feedback signals R</strong><sub><strong>sc</strong></sub></td><td>Resolver sine and cosine feedback signals proportional to the angle.</td><td>No</td><td>To model<br>To AO<br>To SFP<br>To Waveform</td></tr><tr><td><strong>R</strong><sub><strong>pp</strong></sub><strong> Number of resolver pole pairs</strong></td><td>Resolver pole-pair count.</td><td>No</td><td>N/A</td></tr><tr><td><strong>R</strong><sub><strong>dir</strong></sub><strong> Direction of the sensor rotation</strong></td><td>Options: Clockwise or counterclockwise.</td><td>No</td><td>N/A</td></tr><tr><td><strong>θ</strong><sub><strong>offset</strong></sub><strong> Angle offset Δθ (Sensor − Rotor)</strong></td><td>Angle offset between resolver and rotor position (°)</td><td>No</td><td>N/A</td></tr><tr><td><strong>R</strong><sub><strong>k</strong></sub><strong> Resolver sine/cosine gains</strong></td><td>The sine/cosine modulation output sine/cosine component amplitude. Default value are 1, 0, 0 and 1.</td><td>No</td><td>N/A</td></tr><tr><td><strong>E</strong><sub><strong>type</strong></sub><strong> Excitation source type</strong></td><td><p>Options AC, DC External<br><strong>AC</strong>: generated in FPGA at the specified frequency,</p><p><strong>DC:</strong> single excitation mode only<br><strong>External</strong> provided from outside the model.</p></td><td>No</td><td>N/A</td></tr><tr><td><strong>E</strong><sub><strong>src</strong></sub><strong> Excitation source</strong></td><td>External excitation source in External mode.</td><td>No</td><td>From AI</td></tr><tr><td><strong>E</strong><sub><strong>f</strong></sub><strong> Excitation frequency</strong></td><td>Frequency of the excitation when in AC mode (Hz)</td><td>No</td><td>N/A</td></tr><tr><td><strong>E</strong><sub><strong>ts</strong></sub><strong> Excitation time shift</strong></td><td>Compensates time offset between the carrier generation input and modulated signal output (s)</td><td>No</td><td>N/A</td></tr></tbody></table>
{% endtab %}

{% tab title="Encoder" %}

<table><thead><tr><th width="180">Parameter</th><th width="310">Description</th><th width="100">Sets feature</th><th>I/O &#x26; Monitoring</th></tr></thead><tbody><tr><td><strong>Enc</strong><sub><strong>en</strong></sub><strong> Enable encoder</strong></td><td><p><strong>Disable</strong> the encoder.</p><p><strong>Enable</strong> the encoder, the following parameters are displayed.</p></td><td>No</td><td>N/A</td></tr><tr><td><strong>A B Z encoder signals Q</strong><sub><strong>ABZ</strong></sub></td><td>Quadrature encoder A, B, and Z signals in Quadrature mode</td><td>No</td><td>To DO</td></tr><tr><td><strong>Q</strong><sub><strong>ppr</strong></sub><strong> Number of pulses per revolution</strong></td><td>Number of pulses in one full revolution of the encoder in Quadrature mode.</td><td>No</td><td>N/A</td></tr><tr><td><strong>Q</strong><sub><strong>dir</strong></sub><strong> Direction of the sensor rotation</strong></td><td>Direction in which the sensor is turning. Two options: A leads B or B leads A.</td><td>No</td><td>N/A</td></tr><tr><td><strong>θ</strong><sub><strong>offset</strong></sub><strong> Angle offset Δθ (Sensor − Rotor)</strong></td><td>Angle offset between the encoder and the rotor position from 0 to 360 degrees in Quadrature mode (°)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Q</strong><sub><strong>rat</strong></sub><strong> Encoder speed ratio</strong></td><td>Sensor-to-mechanical position ratio. Encoder angle = Qrat × machine mechanical angle in Quadrature mode.</td><td>No</td><td>N/A</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The I/O type and quantities depend on the selected firmware.
{% endhint %}

### Machine files parameters

<details>

<summary><strong>How to specify the electrical saturation profile parameters file</strong></summary>

</details>

## Conserving ports

| Port                 | Description                                     |
| -------------------- | ----------------------------------------------- |
| **Stator terminals** | Three terminals of the stator on the left side  |
| **Rotor terminals**  | Three terminals of the rotor on the right side. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/pe-add-on-opal-rt/model-in-schematic-editor/library-blocks-reference/machines-blocks/doubly-fed-induction-machine-with-saturation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
