> 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/smart-power-simulation-software-sps/blocks-functions-tools/machines/blocks/permanent-magnet-synchronous-machine.md).

# Permanent Magnet Synchronous Machine

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-16931ab00d47fe6962ec93e98c7c4b6a4b96b830%2FPMSM_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Permanent Magnet Synchronous Machine** block, located in the **OPAL-RT SPS Software/Electrical Machines** library, implements a three-phase or a five-phase permanent magnet synchronous machine. The stator windings are connected in wye to an internal neutral point..

The three-phase machine can have a sinusoidal or trapezoidal back EMF waveform. The rotor can be round or salient-pole for the sinusoidal machine. The rotor is round when the machine is trapezoidal. Preset models are available for the sinusoidal back EMF machine.

The five-phase machine has a sinusoidal back EMF waveform and round rotor.

The Permanent Magnet Synchronous Machine block operates in either generator or motor mode. The mode of operation is dictated by the sign of the mechanical torque (positive for motor mode, negative for generator mode). The electrical and mechanical parts of the machine are each represented by a second-order state-space model.

The sinusoidal model assumes that the flux established by the permanent magnets in the stator is sinusoidal, which implies that the electromotive forces are sinusoidal.

The trapezoidal model assumes that the winding distribution and flux established by the permanent magnets produce three trapezoidal back EMF waveforms.

### Three-Phase Sinusoidal Model Electrical System

These equations are expressed in the rotor reference frame (qd frame). All quantities in the rotor reference frame are referred to the stator.

$$
\begin{aligned}
\dot{d}*{iq} &= L\_q , \dot{i}*{v\_q} - R\_L , i\_{v\_q} \\\[8pt]
\dot{v}*{iq} &= L\_d , \dot{i}*{v\_d} - R\_L , i\_{v\_d} \\\[8pt]
v\_p &= \lambda\_p , \dot{\omega}\_m
\end{aligned}
$$

<table data-header-hidden><thead><tr><th width="249"></th><th></th></tr></thead><tbody><tr><td><strong>L</strong><sub><strong>q</strong></sub><strong>, L</strong><sub><strong>d</strong></sub></td><td><em>q</em>-axis and <em>d</em>-axis inductances</td></tr><tr><td><strong>R</strong></td><td>Resistance of the stator windings</td></tr><tr><td><strong>i</strong><sub><strong>q</strong></sub><strong>, i</strong><sub><strong>d</strong></sub></td><td><em>q</em>-axis and <em>d</em>-axis currents</td></tr><tr><td><strong>v</strong><sub><strong>q</strong></sub><strong>, v</strong><sub><strong>d</strong></sub></td><td><em>q</em>-axis and <em>d</em>-axis voltages</td></tr><tr><td><strong>ω</strong><sub><strong>m</strong></sub></td><td>Angular velocity of the rotor</td></tr><tr><td><strong>λ</strong></td><td>Amplitude of the flux induced by the permanent magnets of the rotor in the stator phases</td></tr><tr><td><strong>p</strong></td><td>Number of pole pairs</td></tr><tr><td><strong>T</strong><sub><strong>e</strong></sub></td><td>Electromagnetic torque</td></tr></tbody></table>

The *L*<sub>*q*</sub> and *L*<sub>*d*</sub> inductances represent the relation between the phase inductance and the rotor position due to the saliency of the rotor. For example, the inductance measured between phase A and B (when phase C is left open) is given by:

$$
L\_{ab} = L\_d + L\_q + (L\_q - L\_d)\cos!\left(2\theta\_e + \frac{\pi}{3}\right)
$$

where Θ<sub>e</sub> represents the electrical angle.

The next figure shows the variation of the phase-to-phase inductance in function of the electrical angle of the rotor.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-21389fd0f3b239f1fe9f1fa9b08597942fbdd9ac%2FPMSM_Lab_curve.png?alt=media" alt=""><figcaption></figcaption></figure>

* For a round rotor, there is no variation in the phase inductance:

$$
L\_d=  L\_q =\frac{L\_{ab}}{2}
$$

* For a salient round rotor, the dq inductances are given by:

$$
L\_d= \frac{max(L\_{ab})}{2}\\\[8pt]
L\_q= \frac{min(L\_{ab})}{2}
$$

### Five-Phase Sinusoidal Model Electrical System

These equations are expressed in the rotor reference frame using an extended Park transformation (q1d1 and q2d2 frame). All quantities in the rotor reference frame are referred to the stator.

$$
\frac{d i\_{d1}}{dt}
\= \frac{1}{L} v\_{d1}

* \frac{R}{L} i\_{d1}

- \frac{L\_q}{L} p,\omega\_m, i\_{q1}
  \\\[8pt]
  \frac{d i\_{q1}}{dt}
  \= \frac{1}{L} v\_{q1}

* \frac{R}{L} i\_{q1}
* \frac{L\_d}{L} p,\omega\_m, i\_{d1}
* \frac{\lambda\_p \omega\_m}{L}
  \\\[8pt]
  \frac{d i\_{d2}}{dt}
  \= \frac{1}{L} v\_{d2}
* \frac{R}{L} i\_{d2}
  \\\[8pt]
  \frac{d i\_{q2}}{dt}
  \= \frac{1}{L} v\_{q2}
* \frac{R}{L} i\_{q2}
  \\\[12pt]
  T\_e = 2.5, p, \lambda\_p, i\_{q1}
  $$

<table data-header-hidden><thead><tr><th width="245"></th><th></th></tr></thead><tbody><tr><td><strong>L</strong></td><td>Armature inductance</td></tr><tr><td><strong>R</strong></td><td>Resistance of the stator windings</td></tr><tr><td><strong>i</strong><sub><strong>q1</strong></sub><strong>, i</strong><sub><strong>d1</strong></sub></td><td><em>q1</em>-axis and <em>d1</em>-axis currents</td></tr><tr><td><strong>v</strong><sub><strong>q1</strong></sub><strong>, v</strong><sub><strong>d1</strong></sub></td><td><em>q1</em>-axis and <em>d1</em>-axis voltages</td></tr><tr><td><strong>i</strong><sub><strong>q2</strong></sub><strong>, i</strong><sub><strong>d2</strong></sub></td><td><em>q2</em>-axis and <em>d2</em>-axis currents</td></tr><tr><td><strong>v</strong><sub><strong>q2</strong></sub><strong>, v</strong><sub><strong>d2</strong></sub></td><td><em>q2</em>-axis and <em>d2</em>-axis voltages</td></tr><tr><td><strong>ω</strong><sub><strong>m</strong></sub></td><td>Angular velocity of the rotor</td></tr><tr><td><strong>λ</strong></td><td>Amplitude of the flux induced by the permanent magnets of the rotor in the stator phases</td></tr><tr><td><strong>p</strong></td><td>Number of pole pairs</td></tr><tr><td><strong>T</strong><sub><strong>e</strong></sub></td><td>Electromagnetic torque</td></tr></tbody></table>

### Three-Phase Trapezoidal Model Electrical System

These equations are expressed in the phase reference frame (abc frame). Note that the phase inductance *L*<sub>*s*</sub> is assumed to be constant and does not vary with the rotor position.

$$
\frac{d i\_a}{dt}
\= \frac{1}{3 L\_s}
\left(
2 v\_{a0} + v\_{bc}

* 3 R\_s i\_a

- \lambda\_p \omega\_m (-2 \Phi\_a' + \Phi\_b' + \Phi\_c')
  \right)
  \\\[8pt]
  \frac{d i\_b}{dt}
  \= \frac{1}{3 L\_s}
  \left(

* v\_{ab} + v\_{bc}
* 3 R\_s i\_b

- \lambda\_p \omega\_m (\Phi\_a' - 2 \Phi\_b' + \Phi\_c')
  \right)
  \\\[8pt]
  \frac{d i\_c}{dt}
  \= -\left(
  \frac{d i\_a}{dt}
- \frac{d i\_b}{dt}
  \right)
  \\\[8pt]
  T\_e = p \lambda
  \left(
  \Phi\_a' i\_a
- \Phi\_b' i\_b
- \Phi\_c' i\_c
  \right)
  $$

<table data-header-hidden><thead><tr><th width="131.5999755859375"></th><th></th></tr></thead><tbody><tr><td><strong>L</strong><sub><strong>s</strong></sub></td><td>Inductance of the stator windings</td></tr><tr><td><strong>R</strong></td><td>Resistance of the stator windings</td></tr><tr><td><strong>i</strong><sub><strong>a</strong></sub><strong>, i</strong><sub><strong>b</strong></sub><strong>, i</strong><sub><strong>c</strong></sub></td><td>a, b and c phase currents</td></tr><tr><td><strong>Φ</strong><sub><strong>a</strong></sub><strong>', Φ</strong><sub><strong>b</strong></sub><strong>', Φ</strong><sub><strong>c</strong></sub><strong>'</strong></td><td>a, b and c phase electromotive forces, in per-unit value to the amplitude of the flux λ</td></tr><tr><td><strong>v</strong><sub><strong>ab</strong></sub><strong>, v</strong><sub><strong>bc</strong></sub></td><td>ab and bc phase to phase voltages</td></tr><tr><td><strong>ω</strong><sub><strong>m</strong></sub></td><td>Angular velocity of the rotor</td></tr><tr><td><strong>λ</strong></td><td>Amplitude of the flux induced by the permanent magnets of the rotor in the stator phases</td></tr><tr><td><strong>p</strong></td><td>Number of pole pairs</td></tr><tr><td><strong>T</strong><sub><strong>e</strong></sub></td><td>Electromagnetic torque</td></tr></tbody></table>

The electromotive force Φ’ is represented by:

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-d92d3b1f0df9cf0c78668e3100f582ca5d61892d%2FPMSM_electromotive_curves.png?alt=media" alt=""><figcaption></figcaption></figure>

### Mechanical System

$$
\frac{d\omega\_m}{dt}
\= \frac{1}{J} \left( T\_e - T\_f - F,\omega\_m - T\_m \right)
\\\[8pt]
\frac{d\theta}{dt} = \omega\_m
$$

<table data-header-hidden><thead><tr><th width="139.59991455078125"></th><th></th></tr></thead><tbody><tr><td><em><strong>J</strong></em></td><td>Combined inertia of rotor and load</td></tr><tr><td><em><strong>F</strong></em></td><td>Combined viscous friction of rotor and load</td></tr><tr><td><em><strong>θ</strong></em></td><td>Rotor angular position</td></tr><tr><td><em><strong>T</strong></em><sub><em><strong>m</strong></em></sub></td><td>Shaft mechanical torque</td></tr><tr><td><em><strong>T</strong></em><sub><em><strong>f</strong></em></sub></td><td>Shaft static friction torque</td></tr><tr><td><strong>ω</strong><sub><strong>m</strong></sub></td><td>Angular velocity of the rotor (mechanical speed)</td></tr></tbody></table>

## Limitations and Assumptions

When you use Permanent Magnet Synchronous Machine blocks in discrete systems, you might have to use a small parasitic resistive load, connected at the machine terminals, to avoid numerical oscillations. Large sample times require larger loads. The minimum resistive load is proportional to the sample time. Remember that with a 25 μs time step on a 60 Hz system, the minimum load is approximately 2.5% of the machine nominal power. For example, a 200 MVA permanent magnet synchronous machine in a power system discretized with a 50 μs sample time requires approximately 5% of resistive load, or 10 MW. If the sample time is reduced to 20 μs, a resistive load of 4 MW is sufficient.

The Permanent Magnet Synchronous Machine block assumes a linear magnetic circuit with no saturation of the stator and rotor iron. This assumption can be made because of the large air gap usually found in permanent magnet synchronous machines.

## Ports

### Input

<table data-header-hidden><thead><tr><th width="215.20001220703125"></th><th></th></tr></thead><tbody><tr><td><strong>Tm</strong> — Mechanical torque<br>Scalar</td><td><p>Mechanical torque at the machine shaft. This input port is normally positive because the Permanent Magnet Synchronous Machine block is usually used as a motor. If you choose to use the block in generator mode, you can apply a negative torque input.</p><p><strong>Dependencies</strong> To enable this port, set <strong>Mechanical input</strong> to Torque Tm.</p></td></tr><tr><td><strong>w</strong> — Machine speed<br>Scalar</td><td><p>Machine speed, in rad/s.</p><p><strong>Dependencies</strong> To enable this port, set <strong>Mechanical input</strong> to Speed w.</p></td></tr></tbody></table>

### Output

<table data-header-hidden><thead><tr><th width="215"></th><th></th></tr></thead><tbody><tr><td><strong>m</strong> — Machine internal measurements<br>13-element vector | 16-element vector</td><td>Vector containing measurement signals. The block returns a 13-element vector when <strong>Number of phases</strong> is set to <code>3</code>, and a 16-element vector when <strong>Number of phases</strong> is set to <code>5</code>.</td></tr></tbody></table>

The available signals depend on the model you selected. You can demultiplex these signals by using the Bus Selector block provided in the Simulink<sup>®</sup> library. The signals include:

<table data-header-hidden><thead><tr><th width="134"></th><th width="331"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Definition</strong></td><td><strong>Model</strong></td></tr><tr><td>ias</td><td>Stator current is_a (A)</td><td>All</td></tr><tr><td>ibs</td><td>Stator current is_b (A)</td><td>All</td></tr><tr><td>ics</td><td>Stator current is_c (A)</td><td>All</td></tr><tr><td>ids</td><td>Stator current is_d (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>ies</td><td>Stator current is_e (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>iqs</td><td>Stator current is_q (A)</td><td>Three-Phase Sinusoidal</td></tr><tr><td>ids</td><td>Stator current is_d (A)</td><td>Three-Phase Sinusoidal</td></tr><tr><td>iqs1</td><td>Stator current is_q1 (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>ids1</td><td>Stator current is_d1 (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>iqs2</td><td>Stator current is_q2 (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>ids2</td><td>Stator current is_d2 (A)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>vqs</td><td>Stator voltage Vs_q (V)</td><td>Three-Phase Sinusoidal</td></tr><tr><td>vds</td><td>Stator voltage Vs_d (V)</td><td>Three-Phase Sinusoidal</td></tr><tr><td>vqs1</td><td>Stator voltage Vs_q1 (V)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>vds1</td><td>Stator voltage Vs_d1 (V)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>vqs2</td><td>Stator voltage Vs_q2 (V)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>vds2</td><td>Stator voltage Vs_d2 (V)</td><td>Five-Phase Sinusoidal</td></tr><tr><td>ea</td><td>Phase back EMF e_a (V)</td><td>Three-Phase Trapezoidal</td></tr><tr><td>eb</td><td>Phase back EMF e_b (V)</td><td>Three-Phase Trapezoidal</td></tr><tr><td>ec</td><td>Phase back EMF e_c (V)</td><td>Three-Phase Trapezoidal</td></tr><tr><td>ha</td><td>Hall effect signal h_a; logical (0 or 1)</td><td>Three-Phase, Sinusoidal and Trapezoidal</td></tr><tr><td>hb</td><td>Hall effect signal h_b; logical (0 or 1)</td><td>Three-Phase, Sinusoidal and Trapezoidal</td></tr><tr><td>hc</td><td>Hall effect signal h_c<sup>*</sup>; logical (0 or 1)</td><td>Three-Phase, Sinusoidal and Trapezoidal</td></tr><tr><td>w</td><td>Rotor speed wm (rad/s)</td><td>All</td></tr><tr><td>theta</td><td>Rotor angle thetam (rad)</td><td>All</td></tr><tr><td>Te</td><td>Electromagnetic torque Te (Nm)</td><td>All</td></tr></tbody></table>

The Hall effect signal provides a logical indication of the back EMF positioning. This signal is very useful to directly control the power switches. There is a change of state at each zero crossing of the phase-to-phase voltage. These signals must be decoded before being applied to the switches.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-45ce9d3c9933d61bc8619ba8715ba1e1dc5706cf%2FPMSM_halleffect_curves.png?alt=media" alt=""><figcaption></figcaption></figure>

### Conserving

<table data-header-hidden><thead><tr><th width="251.5999755859375"></th><th></th></tr></thead><tbody><tr><td><strong>S</strong> — Machine rotational shaft<br>Mechanical rotational</td><td><p>Mechanical rotational port, that represents the rotational shaft of the machine.</p><p><strong>Dependencies</strong> To enable this port, set <strong>Mechanical input</strong> to Mechanical rotational port.</p></td></tr><tr><td><strong>A</strong> — Phase A electric terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the electrical terminal of phase A.</td></tr><tr><td><strong>B</strong> — Phase B electric terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the electrical terminal of phase B.</td></tr><tr><td><strong>C</strong> — Phase C electric terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with the electrical terminal of phase C.</td></tr></tbody></table>

## Parameters

### Configuration

<table data-header-hidden><thead><tr><th width="254"></th><th></th></tr></thead><tbody><tr><td><strong>Number of phases</strong> — Number of phases for machine model<br>3 (default) | 5</td><td>Select between a three-phase machine model or a five-phase machine model.</td></tr><tr><td><strong>Back EMF waveform</strong> — Electromotive force<br>Sinusoidal (default) | Trapezoidal</td><td><p>Select between Sinusoidal and Trapezoidal electromotive force.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3.</p></td></tr><tr><td><strong>Rotor type</strong> — Rotor type<br>Round (default) | Salient-pole</td><td><p>Select between Salient-pole and Round rotors.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3 and set <strong>Back EMF waveform</strong> to Sinusoidal.</p></td></tr><tr><td><strong>Mechanical input</strong> — Type of input<br>Torque Tm (default) | Speed w | Mechanical rotational port</td><td><p>Select whether input is supplied by torque applied to the shaft, rotor speed, or a machine shaft represented by a Simscape™ rotational mechanical port. Select Torque Tm to specify a torque input in N.m and expose the Tm port. The machine speed is determined by the machine Inertia J and by the difference between the applied mechanical torque Tm and the internal electromagnetic torque Te. The sign convention for the mechanical torque is when the speed is positive. A positive torque signal indicates motor mode and a negative signal indicates generator mode. Select Speed w to specify a speed input in rad/s and expose the w port. The machine speed is imposed and the mechanical part of the model (Inertia J) is ignored. Using the speed as the mechanical input allows modeling a mechanical coupling between two machines. The next figure indicates how to model a stiff shaft interconnection in a motor-generator set when friction torque is ignored in machine 2. The speed output of machine 1 (the motor) is connected to the speed input of machine 2 (the generator), while the machine 2 electromagnetic torque output, Te, is applied to the mechanical torque input of machine 1, Tm. The Kw factor takes into account the speed units of both machines (pu or rad/s) and the gear box ratio w2/w1. The KT factor takes into account the torque units of both machines (pu or N.m) and machine ratings. Also, because the inertia J2 is ignored in machine 2, J2 is added to the machine 1 inertia, J1.</p><p><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-c8f5a5c375d8009e21496842e66cb6a4261af1de%2FPMSM_mechanical_input_model.png?alt=media" alt="" data-size="original"></p><p>Select <strong>Mechanical rotational port</strong> to expose a Simscape mechanical rotational port that allows you to connect the machine shaft to other Simscape blocks with mechanical rotational ports. The next figure indicates how to connect an Ideal Torque Source block from the Simscape library to the machine shaft to represent the machine in motor mode or in generator mode.<br><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-809a07d07e36aea4a821a4b60d9e65712648aaa3%2FPMSM_connexion_ideal_torque_source.png?alt=media" alt=""></p></td></tr><tr><td><strong>Preset model</strong> — Electrical and mechanical parameters<br>No (default) | 01: 0.8 Nm 300 Vdc 3000 RPM - 0.8 Nm | 02: 1.7 Nm 300 Vdc 3750 RPM - 1.7 Nm | ...</td><td><p>Predetermined electrical and mechanical parameters for various permanent magnet synchronous motor ratings of torque (N.m), DC bus voltage (V), rated speed (rpm), and continuous stall torque (N.m). Select one of the preset models to load the corresponding electrical and mechanical parameters in the entries of the dialog box. Select No (default) if you do not want to use a preset model, or if you want to modify some of the parameters of a preset model. The available preset models are:</p><ul><li>No</li><li>01: 0.8 Nm 300 Vdc 3000 RPM - 0.8 Nm</li><li>02: 1.7 Nm 300 Vdc 3750 RPM - 1.7 Nm</li><li>03: 2.8 Nm 300 Vdc 4250 RPM - 3.2 Nm</li><li>04: 6 Nm 300 Vdc 4500 RPM - 6 Nm</li><li>05: 8 Nm 300 Vdc 2000 RPM - 10 Nm</li><li>06: 10 Nm 300 Vdc 2300 RPM - 14.2 Nm</li><li>07: 20 Nm 300 Vdc 2200 RPM - 33.9 Nm</li><li>08: 24 Nm 300 Vdc 2300 RPM - 41.4 Nm</li><li>09: 7.14 Nm 560 Vdc 5000 RPM - 8.3 Nm</li><li>10: 7.71 Nm 560 Vdc 5000 RPM - 10.2 Nm</li><li>11: 26.13 Nm 560 Vdc 3000 RPM - 27.3 Nm</li><li>12: 35.17 Nm 560 Vdc 3000 RPM - 37.4 Nm</li><li>13: 42.09 Nm 560 Vdc 3000 RPM - 45.6 Nm</li><li>14: 67.27 Nm 560 Vdc 1700 RPM - 70.2 Nm</li><li>15: 87.75 Nm 560 Vdc 3000 RPM - 97.96 Nm</li><li>16: 111 Nm 560 Vdc 3000 RPM - 126 Nm</li></ul><p>When you select a preset model, the electrical and mechanical parameters in the <strong>Parameters</strong> tab of the dialog box are disabled. To start from a given preset model and then modify machine parameters:</p><ul><li>Select the preset model for which you want to initialize the parameters.</li><li>Change <strong>Preset model</strong> to No. This does not change the machine parameters in the <strong>Parameters</strong> tab.</li><li>Modify the machine parameters, then click <strong>Apply</strong>.</li></ul><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 5, or set <strong>Number of phases</strong> to 3 and <strong>Back EMF waveform</strong> to Sinusoidal.</p></td></tr><tr><td><strong>Use signal names to identify bus labels</strong> — Identify with signal names or signal definition<br>off (default) | on</td><td>When selected, the measurement output uses the signal names to identify the bus labels. Select this option for applications that require bus signal labels to have only alphanumeric characters. When cleared, the measurement output uses the signal definition to identify the bus labels. The labels contain nonalphanumeric characters that are incompatible with some Simulink applications.</td></tr></tbody></table>

## Parameters

<table data-header-hidden><thead><tr><th width="303"></th><th></th></tr></thead><tbody><tr><td><strong>Stator phase resistance Rs (Ohm)</strong> — Stator phase resistance<br>0.0485 (default) | positive scalar</td><td>Stator phase resistance Rs (Ω).</td></tr><tr><td><strong>Stator phase inductance Ls (H)</strong> — Stator-phase-to-neutral inductance<br>8.5e-3 (default) | positive scalar</td><td><p>Stator-phase-to-neutral inductance Ls (H) of the trapezoidal model.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3 and <strong>Back EMF waveform</strong> to Trapezoidal.</p></td></tr><tr><td><strong>Inductances [ Ld(H) Lq(H) ]</strong> — Phase to neutral inductances<br>[8.5e-3,8.5e-3] (default) | two-element vector</td><td><p>Phase-to-neutral Ld (H) and Lq (H) inductances in the <em>d</em>-axis and <em>q</em>-axis of the sinusoidal model with a salient-pole rotor.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3, <strong>Back EMF waveform</strong> to Sinusoidal, and <strong>Rotor type</strong> to Salient-pole.</p></td></tr><tr><td><strong>Armature inductance (H)</strong> — Armature inductance of sinusoidal model<br>0.000395 (default) | positive scalar</td><td><p>Armature inductance of the sinusoidal model with a round rotor. Ld is equal to Lq.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3, <strong>Back EMF waveform</strong> to Sinusoidal, and <strong>Rotor type</strong> to Round.</p></td></tr><tr><td><strong>Specify</strong> — Machine constant<br>Flux linkage established by magnets (V.s) (default) | Voltage Constant (V_peak L-L / krpm) | Torque Constant (N.m / A_peak)</td><td>Machine constant for block parameterization. Once you select a constant, you can enter its value in the appropriate parameter field, while the other two parameters are disabled.</td></tr><tr><td><strong>Flux linkage</strong> — Constant flux<br>0.1194 (default) | positive scalar</td><td><p>Constant flux λ (Wb) per pole pairs induced in the stator windings by the magnets.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Specify</strong> to Flux linkage established by magnets (V.s).</p></td></tr><tr><td><strong>Voltage constant</strong> — Peak line-to-line voltage<br>86.6271 (default) | positive scalar</td><td><p>Peak line-to-line voltage per 1000 rpm. This voltage represents the peak open circuit voltage when the machine is driven as a generator at 1000 rpm.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Specify</strong> to Voltage Constant (V_peak L-L / krpm).</p></td></tr><tr><td><strong>Torque constant</strong> — Torque per ampere constant<br>0.7164 (default) | positive scalar</td><td><p>Torque per ampere constant. This constant assumes that the machine is driven by an inverter that provides a perfect synchronization between the current and the back EMF.</p><ul><li>Sinusoidal model: A sine wave current is assumed.</li><li>Trapezoidal model: A square ware current is assumed.</li></ul><p><strong>Dependencies</strong> To enable this parameter, set <strong>Specify</strong> to Torque Constant (N.m / A_peak).</p></td></tr><tr><td><strong>Back EMF flat area (degrees)</strong> — Width of flat top<br>120 (default) | positive scalar</td><td><p>Width of the flat top for a half period of the electromotive force Φ<sup>'</sup> (degrees) for a trapezoidal machine.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3 and <strong>Back EMF waveform</strong> to Trapezoidal.</p></td></tr><tr><td><strong>Inertia, viscous damping, pole pairs, static friction [ J(kg.m^2) F(N.m.s) p() Tf(N.m)]</strong> — Mechanical parameters<br>[0.0027 0.0004924 4 0] (default) | three-element vector | four-element vector</td><td><p>Combined machine and load inertia coefficient J (kg.m<sup>2</sup>), combined viscous friction coefficient F (N.m.s), pole pairs p, and shaft static friction <em>T</em><sub><em>f</em></sub> (N.m). If the fourth value of the vector (static friction) is not specified, the block considers this value to be 0.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Mechanical input</strong> to Torque Tm or Mechanical rotational port.</p></td></tr><tr><td><strong>Pole pairs p ()</strong> — Number of pole pairs<br>4 (default) | positive scalar</td><td><p>Number of pole pairs, p.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Mechanical input</strong> to Speed w.</p></td></tr><tr><td><strong>Initial conditions [ wm(rad/s) thetam(deg) ia,ib(A) ]</strong> — Initial conditions for three-phase machine<br>[0,0, 0,0] (default) | four-element vector</td><td><p>Mechanical speed (rad/s), mechanical angle Θ<sub>m</sub> (degrees), and instantaneous stator current (A) for a three-phase machine [w<sub>m</sub>, Θ<sub>m</sub>, i<sub>a</sub>, i<sub>b</sub>]. Because the stator is wye-connected and the neutral point is isolated, the current i<sub>c</sub> in the three-phase machine is given by i<sub>c</sub> = -i<sub>a</sub>-i<sub>b</sub>.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 3.</p></td></tr><tr><td><strong>Initial conditions [ wm(rad/s) thetam(deg) ia,ib,ic,id(A) ]</strong> — Initial conditions for five-phase machine<br>[0 0 0 0 0 0] (default) | six-element vector</td><td><p>Mechanical speed (rad/s), mechanical angle Θ<sub>m</sub> (degrees), and instantaneous stator current (A) for a five-phase machine [w<sub>m</sub>, Θ<sub>m</sub>, i<sub>a</sub>, i<sub>b</sub>, i<sub>c</sub>, i<sub>d</sub>]. Because the stator is wye-connected and the neutral point is isolated, the current i<sub>e</sub> in the five-phase machine is given by i<sub>e</sub> = -i<sub>a</sub> -i<sub>b</sub> -i<sub>c</sub> -i<sub>d</sub>.</p><p><strong>Dependencies</strong> To enable this parameter, set <strong>Number of phases</strong> to 5.</p></td></tr><tr><td><strong>Rotor flux position when theta = 0</strong> — Reference position of rotor flux<br>90 degrees behind phase A axis (modified Park) (default) | Aligned with phase A axis (original Park)</td><td><p>Reference position of the rotor flux relative to the phase A axis. Select 90 degrees behind phase A axis (modified Park) to choose the reference position of the rotor represented by:<img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-7a33a679d41fe67cfb699eb6290694941c6184ee%2FPMSM_rotor_flux_position.png?alt=media" alt=""></p><p>The modified Park transformation [<a href="https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/machines/blocks/permanent-magnet-synchronous-machine.md">4</a>] is more convenient for vector control because the maximum phase induction occurs at theta = 0. Select Aligned with phase A axis (original Park) to choose the reference position of the rotor represented by:</p></td></tr></tbody></table>

### Advanced

<table data-header-hidden><thead><tr><th width="284"></th><th></th></tr></thead><tbody><tr><td><strong>Discrete solver model</strong> — Integration method<br>Trapezoidal non iterative (default) | Trapezoidal robust | Backward Euler robust</td><td><p>Integration method used by the block. When you select the <strong>Automatically handle discrete solver and Advanced tab solver settings of blocks</strong> parameter in the powergui block, the discrete solver model is automatically set to Trapezoidal robust.</p><p>Trapezoidal non iterative requires you to add a non-negligible shunt load at the machine terminals to maintain simulation stability, and the simulation may fail to converge and stop when the number of machines increases in the model.</p><p>Trapezoidal robust and Backward Euler robust allow you to eliminate the need to use parasitic loads. To eliminate the topological errors of the machines connected to an inductive circuit (for example, a circuit breaker connected in series with the machine), the machine models a negligible internal load of 0.01% of nominal power.Trapezoidal robust is slightly more accurate than Backward Euler robust, especially when the model is simulated at larger sample times. Trapezoidal robust may produce slight damped numerical oscillations on machine voltage in no-load conditions, while Backward Euler robust prevents oscillations and maintains accuracy. For more information on what method to use in your application, see <a href="https://opal-rt.atlassian.net/wiki/spaces/PSPS/pages/1551302870/Simulating+Discretized+Electrical+Systems">Simulating Discretized Electrical Systems</a>.</p></td></tr><tr><td><strong>Sample time (-1 for inherited)</strong> — Sample time used by block<br>-1 (default) | scalar</td><td>Sample time used by the block. To inherit the sample time specified in the powergui block, set this parameter to -1 (default).</td></tr></tbody></table>

### Examples <a href="#examples" id="examples"></a>

The [Brushless DC Motor Fed by Six-Step Inverter](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/example-models/machines/brushless-dc-motor-fed-by-six-step-inverter.md) (power\_brushlessDCmotor) example illustrates the use of the Permanent Magnet Synchronous Machine block.

### References <a href="#references" id="references"></a>

\[1] Grenier, D., L.-A. Dessaint, O. Akhrif, Y. Bonnassieux, and B. LePioufle. “Experimental Nonlinear Torque Control of a Permanent Magnet Synchronous Motor Using Saliency.” *IEEE® Transactions on Industrial Electronics*, Vol. 44, No. 5, October 1997, pp. 680-687.

\[2] Toliyat, H.A. “Analysis and Simulation of Multi-Phase Variable Speed Induction Motor Drives Under Asymmetrical Connections.” *Applied Power Electronics Conference and Exposition*, Vol. 2, March 1996, pp. 586-592.

\[3] Beaudart, F., F. Labrique, E. Matagne, D. Telteux, and P. Alexandre. “Control under normal and fault tolerant operation of multiphase SMPM synchronous machines with mechanically and magnetically decoupled phases.” *International Conference on Power Engineering, Energy and Electrical Drives*, March 2009, pp. 461-466.

\[4] Krause, P.C., O. Wasynczuk, and S.D. Sudhoff. *Analysis of Electric Machinery and Drive Systems*. IEEE Press, 2002.


---

# 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/smart-power-simulation-software-sps/blocks-functions-tools/machines/blocks/permanent-magnet-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.
