> 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/rt-lab/simulink-blocks-reference/artemis-library/ssn-permanent-magnet-synchronous-machine.md).

# SSN Permanent Magnet Synchronous Machine

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-4099c505f3ee062ab540afb75b285bcde2c83658%2FArtemis_PMSM_block.png?alt=media" alt="" width="151"><figcaption></figcaption></figure>

The **SSN PMSM** block, located in the **ARTEMiS/SSN/SSN rotating Machines** library, implements a three-phase permanent magnet synchronous machine in a rotor-aligned d–q reference frame for use with the SSN solver. The stator windings are wye-connected to an internal neutral point. The electrical model is second-order only. The mechanical part must be modeled externally to provide the rotor speed.

{% hint style="danger" %}
This block requires a valid RT-LAB license on the simulator with the feature ARTEMiS enabled. Refer to[ ARTEMiS Requirements](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/power-systems-with-artemis/artemis-requirements.md) for details.
{% endhint %}

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-7bcb3efadc832a120a574a8d11fc2e32ade624fc%2FArtemis_PMSM_mask.png?alt=media" alt="" width="275"><figcaption></figcaption></figure>

<table><thead><tr><th width="240.4000244140625">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Stator resistance</strong></td><td>Resistance (Ohms)</td></tr><tr><td><strong>Ld d-axis inductance</strong></td><td>Inductance (H)</td></tr><tr><td><strong>Lq q-axis inductance</strong></td><td>Inductance (H)</td></tr><tr><td><strong>Magnet flux</strong></td><td>Peak magnet flux seen by the stator winding (Wb).</td></tr><tr><td><strong>Number of pairs of poles</strong></td><td>Number of pole pairs.</td></tr><tr><td><strong>Sample Time</strong></td><td>Sample time of the model in seconds (s).</td></tr></tbody></table>

## Conserving ports

| Port        | Description                     |
| ----------- | ------------------------------- |
| **a, b, c** | Stator phase connection points. |

## Inputs

| Name       | Description                                                                                                                      |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **w\_mec** | Mechanical speed of the machine in rad/s. Typically provided by an external mechanical model that includes torques and inertias. |

## Outputs

<table><thead><tr><th width="240.4000244140625">output</th><th>Description</th></tr></thead><tbody><tr><td><strong>meas</strong></td><td><p>Measurements available:</p><ul><li>flux: phid, phiq (Wb): fluxes of the machine used as internal states</li><li>Iabc (A): ABC terminal currents</li><li>Electrical torque (N.m): electric torque of the machine</li><li>Mechanical angle (rad): rotor angle in radians</li></ul></td></tr></tbody></table>


---

# 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/rt-lab/simulink-blocks-reference/artemis-library/ssn-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.
