> 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/ehs/3.7/model-in-schematic-editor/library-blocks-reference/machines-blocks/round-rotor-synchronous-machine.md).

# Round Rotor Synchronous Machine

## Description

<figure><img src="https://521571437-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fo99Izmvvw5eHT4ldzI4g%2Fuploads%2Fgit-blob-f10a907b8d239bd2f19e20c12751849183fd4dd6%2FSE_RRSM.png?alt=media" alt="" width="82"><figcaption></figcaption></figure>

The **Round Rotor Synchronous Machine (RRSM)** block models a three‑phase synchronous machine, with or without a neutral connection, using a round‑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 %}

### Electrical model

The Synchronous Machine models in state space framework are based on magnetic fluxes as the state variables and winding currents as the outputs, and can be represented as follows:

$$
\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:

$$
A\_{d}=T\_{s}\left(-R L^{-1}-\Omega\right)+ I \\\[8pt]
B\_{d}=T s \times I\\\[8pt]
\boldsymbol{c}=\boldsymbol{L}^{-1}
$$

with $$I$$ being the Identity matrix, a square matrix with ones on the main diagonal and zeros elsewhere,

and:

$$
u =
\begin{bmatrix}
V\_{sq} & V\_{sd} & V\_{0} & V\_{f}^{\prime} & V\_{kd}^{\prime} & V\_{kq1}^{\prime} & V\_{kq2}^{\prime}
\end{bmatrix}^{t}
\\\[8pt]

I =
\begin{bmatrix}
I\_{sq} & I\_{sd} & I\_{0} & I\_{f}^{\prime} & I\_{kd}^{\prime} & I\_{kq1}^{\prime} & I\_{kq2}^{\prime}
\end{bmatrix}^{t}
\\\[8pt]

\psi =
\begin{bmatrix}
\psi\_{sq} & \psi\_{sd} & \psi\_{0} & \psi\_{f}^{\prime} & \psi\_{kd}^{\prime} & \psi\_{kq1}^{\prime} & \psi\_{kq2}^{\prime}
\end{bmatrix}^{t}
\\\[8pt]

R =
\begin{bmatrix}
R\_{s} & R\_{s} & R\_{0} & R\_{f}^{\prime} & R\_{kd}^{\prime} & R\_{kq1}^{\prime} & R\_{kq2}^{\prime}
\end{bmatrix}^{t}
\\\[8pt]
$$

$$
L =
\begin{bmatrix}
L\_q & 0 & 0 & 0 & 0 & L\_{mq} & L\_{mq} \\
0 & L\_d & 0 & L\_{md} & L\_{md} & 0 & 0 \\
0 & 0 & L\_0 & 0 & 0 & 0 & 0 \\
0 & L\_{md} & 0 & L\_f' & L\_{md} & 0 & 0 \\
0 & L\_{md} & 0 & L\_{md} & L\_{kd}' & 0 & 0 \\
L\_{mq} & 0 & 0 & 0 & 0 & L\_{kq1}' & L\_{mq} \\
L\_{mq} & 0 & 0 & 0 & 0 & L\_{mq} & L\_{kq2}'
\end{bmatrix}
\\\[8pt]\\

\Omega =
\begin{bmatrix}
0 &\omega &0 &0 &0 &0 &0 \\
-\omega &0 &0 &0 &0 &0 &0 \\
0 &0 &0 &0 &0 &0 &0 \\
0 &0 &0 &0 &0 &0 &0 \\
0 &0 &0 &0 &0 &\omega -\omega\_r &0 \\
0 &0 &0 &0 &-(\omega-\omega\_r) &0 &\omega -\omega\_r \\
0 &0 &0 &0 &0 &-(\omega-\omega\_r) & 0 \\
\end{bmatrix}
\\\[8pt]
$$

In this model, all rotor parameters and variables are referred to the stator side and are denoted with a prime (′). The synchronous machine is modeled in the rotor reference frame, so $$ω=ω\_r$$.\
The electrical torque is calculated as follows:

$$
T\_e = \frac{3}{2} pp \left( \psi\_diq - \psi\_qid \right) \\\[8pt]
$$

## Parameters

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

<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>Stator resistances R</strong><sub><strong>S</strong></sub></td><td>Resistances of the stator windings for phases a, b, and c (Ω).</td><td>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>No</td><td>N/A</td></tr><tr><td><strong>Magnetizing qd inductances L</strong><sub><strong>m</strong></sub></td><td>Stator-rotor mutual (magnetizing) inductance in qd frame (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Field resistance R</strong><sub><strong>f'</strong></sub></td><td>Equivalent field winding resistance referred to the stator (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Field leakage inductance L</strong><sub><strong>lr'</strong></sub></td><td>Equivalent field winding leakage inductance referred to the stator (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kd resistance R</strong><sub><strong>kd'</strong></sub></td><td>Equivalent damper 1 winding resistance referred to the stator (Ω)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kd leakage inductance L</strong><sub><strong>lkd'</strong></sub></td><td>Equivalent damper 1 winding leakage inductance referred to the stator (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kq1 resistance R</strong><sub><strong>kq1'</strong></sub></td><td>Equivalent damper 2 winding resistance referred to the stator (Ω)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kq1 leakage inductance L</strong><sub><strong>lkq1'</strong></sub></td><td>Equivalent damper 2 winding leakage inductance referred to the stator (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kq2 resistance R</strong><sub><strong>kq2'</strong></sub></td><td>Equivalent damper 3 winding resistance referred to the stator (Ω)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Damper kq2 leakage inductance L</strong><sub><strong>lkq2'</strong></sub></td><td>Equivalent damper 3 winding leakage inductance referred to the stator (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Stator to field turn ratio N</strong><sub><strong>sf</strong></sub></td><td>Stator to field turn ratio</td><td>No</td><td>N/A</td></tr><tr><td><strong>Open stator winding Seq0</strong></td><td>Enable zero sequence parameters and connect the neutral output wire</td><td>No</td><td>N/A</td></tr><tr><td><strong>Zero-sequence resistance R</strong><sub><strong>s0'</strong></sub></td><td>if zero sequence is enabled, Zero-sequence resistance value (Ω)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Zero-sequence inductance L</strong><sub><strong>s0'</strong></sub></td><td>if zero sequence is enabled, Zero-sequence inductance value (H)</td><td>No</td><td>N/A</td></tr><tr><td><strong>Number of pole pairs pp</strong></td><td>Number of pole pairs.</td><td>No</td><td>N/A</td></tr><tr><td><strong>Stator currents i</strong><sub><strong>s</strong></sub></td><td>Stator currents measured at phases a, b and c (A)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator qd currents i</strong><sub><strong>sqd</strong></sub></td><td>Stator currents in qd frame (A)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Field current i</strong><sub><strong>f</strong></sub></td><td>Field winding current referred to the stator (A)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator qd voltages V</strong><sub><strong>sqd</strong></sub></td><td>Stator voltages in qd frame (V)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Stator qd fluxes Φ</strong><sub><strong>sqd</strong></sub></td><td>Stator fluxes in qd frame (Wb)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Field flux Φ</strong><sub><strong>f</strong></sub></td><td>Field winding magnetic flux referred to the stator (Wb)</td><td>No</td><td>To model<br>To SFP<br>To Waveform</td></tr><tr><td><strong>Damper kd flux Φ</strong><sub><strong>kd</strong></sub></td><td>Damper 1 winding magnetic flux referred to the stator (Wb)</td><td>No</td><td>To model<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>No</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>No</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 %}

## Conserving ports

| Port                         | Description                                                                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Stator terminals**         | Three stator winding terminals A, B and C. Terminals can be identified by clicking them to view their port identifiers in the UI. |
| **Neutral line**             | Terminal for the neutral line N                                                                                                   |
| **Field winding voltage Vf** | Two terminals of the field winding voltage inputs Vf+ and Vf-                                                                     |


---

# 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/ehs/3.7/model-in-schematic-editor/library-blocks-reference/machines-blocks/round-rotor-synchronous-machine.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.
