> 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/functions/power_pmsynchronousmachineparams.md).

# power\_PMSynchronousMachineParams

## Description

The **power\_PMSynchronousMachineParams** function converts manufacturer specifications to mask parameters of Permanent Magnet Synchronous Machine block.

## Syntax

{% code lineNumbers="true" %}

```
power_PMSynchronousMachineParams
params = power_PMSynchronousMachineParams(spec)
```

{% endcode %}

power\_AsynchronousMachineParams opens a graphical user interface to compute the mask parameters required by the double-cage asynchronous machine block based on standard manufacturer specifications.

**params = power\_AsynchronousMachineParams(spec)** computes the machine parameters from the input structure spec, which contains the manufacturer data. The solution is returned in the output structure params.

**params = power\_AsynchronousMachineParams(spec, options)** lets you specify more options (display details, draw graphs, parameter units, and graph units) in the input structure options.

**\[params, spec2] = power\_AsynchronousMachineParams(spec, options)** returns the input manufacturer data along with some additional derived data (synchronous speed, number of pole pairs, nominal slip, starting torque, and so on) in the structure spec2.

**\[params, spec2, errors] = power\_AsynchronousMachineParams(spec, options)** returns the relative errors between the input manufacturer data and the equivalent data obtained with the computed parameters in the structure errors.

This table shows the electrical and mechanical parameters of the Permanent Magnet Synchronous Machine block along with their units.

| **Parameter**                                                                                   | **Unit**         |
| ----------------------------------------------------------------------------------------------- | ---------------- |
| **Stator phase resistance, Rs**                                                                 | ohm              |
| <p><strong>Stator phase inductance, Ls</strong><br>(trapezoidal back EMF waveform model)</p>    | H                |
| <p><strong>Armature inductance, L</strong><br>(sinusoidal back EMF round rotor type)</p>        | H                |
| <p><strong>Inductances, \[Ld, Lq]</strong><br>(sinusoidal back EMF salient-pole rotor type)</p> | H                |
| **Flux linkage established by magnets**                                                         | V.s              |
| <p><strong>Voltage constant, ke</strong><br>(peak line-to-line voltage per 1000 rpm)</p>        | Vpeak/krpm       |
| <p><strong>Torque constant, kt</strong><br>(torque per ampere constant)</p>                     | N.m/Apeak        |
| <p><strong>Inertia, J</strong><br>(combined machine and load inertia)</p>                       | kg.m<sup>2</sup> |
| <p><strong>Viscous damping, F</strong><br>(combined machine and load viscous damping)</p>       | N.m.s            |

Manufacturers provide machine parameters in several units, usually different from the units required by the Permanent Magnet Synchronous Machine block. This table provides the parameters and units commonly found in manufacturer specifications.

| **Manufacturer Specification**                                      | **Units**                                                                                                                                                  |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Line-to-line resistance, R**                                      | ohm (line-line)                                                                                                                                            |
| **Line-to-line inductance, Lab**                                    | mH (line-line)                                                                                                                                             |
| ***d*****- and&#x20;*****q*****-axis phase inductances, Ld and Lq** | mH                                                                                                                                                         |
| **Voltage Constant ke**                                             | <p>Vpeak/krpm<br>Vrms/krpm<br>Vpeak/rad/s<br>Vrms/rad/s</p>                                                                                                |
| **Torque Constant kt**                                              | <p>N.m/Apeak<br>N.m/Arms<br>N.cm/Apeak<br>oz.in/Arms<br>lb.in/Apeak<br>lb.ft/Arms</p>                                                                      |
| **Inertia J**                                                       | <p>kg.m<sup>2</sup><br>kg.cm<sup>2</sup><br>g.cm<sup>2</sup><br>lb.in<sup>2</sup><br>kg.cm.s<sup>2</sup><br>lb.in.s<sup>2</sup><br>oz.in.s<sup>2</sup></p> |
| **Viscous damping F**                                               | <p>N.m.s<br>N.m/rpm<br>oz.in/rpm<br>oz.in/krpm</p>                                                                                                         |

The power\_PMSynchronousMachineParams function converts the given manufacturer parameters and units to the parameters required by the Permanent Magnet Synchronous Machine block. The function computes the machine parameters using:

* Stator phase resistance

$$
R\_s = \frac{R}{2}
$$

* Stator phase inductance

$$
L\_s = \frac{L\_{ab}}{2}
$$

* Armature inductance

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

* Voltage constant

$$
\frac{1,V\_{\text{peak}}}{\text{krpm}}
\= \frac{3}{100\cdot\pi},V\_{\text{peak}},(\text{rad/s})
\= \frac{1}{\sqrt{2}},V\_{\text{rms}},\frac{\sqrt{2}}{\text{krpm}}
\= \frac{3}{100\cdot\pi},\sqrt{2},V\_{\text{rms}},(\text{rad/s})
$$

* Torque constant

$$
\frac{1,N\cdot m}{A\_{\text{peak}}}
\= \frac{1}{\sqrt{2}},\frac{N\cdot m}{A\_{\text{rms}}}
\= 100.13,\frac{\text{oz}\cdot\text{in}}{A\_{\text{rms}}}
\= 8.85,\frac{\text{lb}\cdot\text{in}}{A\_{\text{peak}}}
\= 0.52,\frac{\text{lb}\cdot\text{ft}}{A\_{\text{rms}}}
$$

* Inertia

$$
1,kg\cdot m^2
\= 3417.17,\text{lb}\cdot\text{in}^2
\= 10.197,kg\cdot cm\cdot s^2
\= 141.612,\text{oz}\cdot\text{in}\cdot s^2
$$

* Viscous damping

$$
1,N\cdot m\cdot s
\= 0.1047,\frac{N\cdot m}{\text{krpm}}
\= 14.829,\frac{\text{oz}\cdot\text{in}}{\text{rprm}}
\= 14.829\times 10^3,\frac{\text{oz}\cdot\text{in}}{\text{krpm}}
$$

## Input Arguments

### spec — Manufacturer data structure

The manufacturer data is specified in a structure with the following fields:

<table data-header-hidden><thead><tr><th width="200.13330078125">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>backEMF</strong></td><td>Specifies the shape of back EMF waveform {'sinusoidal','trapezoidal'}</td></tr><tr><td><strong>rotorType</strong></td><td>Specifies the type of rotor {'round','salient'}</td></tr><tr><td><strong>R</strong></td><td>Line-to-line resistance (ohm)</td></tr><tr><td><strong>Lab</strong></td><td>Line-to-line inductance (mH). Specify this field only for a round, rotor machine.</td></tr><tr><td><strong>Ld</strong></td><td>d-axis phase inductance (mH). Specify this field only for a salient-pole rotor machine.</td></tr><tr><td><strong>Lq</strong></td><td>q-axis phase inductance (mH). Specify this field only for a salient-pole rotor machine.</td></tr><tr><td><strong>suppliedConstant</strong></td><td>Specifies the type of constant provided to the function {'voltage','torque'}</td></tr><tr><td><strong>k</strong></td><td>Value of the voltage or torque constant</td></tr><tr><td><strong>kUnitsNum</strong></td><td>Units of constant numerator {'Vpeak','Vrms','N.m','N.cm', 'oz.in','lb.in','lb.ft'}</td></tr><tr><td><strong>kUnitsDenom</strong></td><td>Units of constant denominator {'krpm','rad/s','Apeak','Arms'}</td></tr><tr><td><strong>J</strong></td><td>Moment of inertia</td></tr><tr><td><strong>inertiaUnits</strong></td><td>Units for moment of inertia {'kg.m^2', 'kg.cm^2','g.cm^2','lb.in.s^2','oz.in.s^2'}</td></tr><tr><td><strong>F</strong></td><td>Viscous damping</td></tr><tr><td><strong>frictionUnits</strong></td><td>Units for viscous damping {'N.m.s', 'N.m/rpm','oz.in/rpm','oz.in/krpm'}</td></tr><tr><td><strong>p</strong></td><td>Number of pole pairs</td></tr></tbody></table>

## Output Arguments

### params — Return the Permanent Magnet Synchronous Machine block parameters

<table data-header-hidden><thead><tr><th width="200.37774658203125">Field</th><th></th></tr></thead><tbody><tr><td><strong>Field</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>lambda</strong></td><td>Flux induced by magnets (V.s)</td></tr><tr><td><strong>ke</strong></td><td>Voltage constant (Vpeak/krpm)</td></tr><tr><td><strong>kt</strong></td><td>Torque constant (N.m/Apeak)</td></tr><tr><td><strong>J</strong></td><td>Machine inertia (kg.m2)</td></tr><tr><td><strong>F</strong></td><td>Machine viscous damping (N.m.s)</td></tr><tr><td><strong>Rs</strong></td><td>Stator phase resistance (ohm)</td></tr><tr><td><strong>Ls</strong></td><td>Stator phase inductance (H). Computed for the round rotor machine</td></tr><tr><td><strong>Ld</strong></td><td>D-axis phase inductance (H). Computed for a sinusoidal back EMF with salient-pole rotor machine</td></tr><tr><td><strong>Lq</strong></td><td>Q-axis phase inductance (H). Computed for a sinusoidal back EMF and salient-pole rotor machine</td></tr><tr><td><strong>p</strong></td><td>Number of pole pairs</td></tr></tbody></table>

## Interface

You can also obtain the mask parameters of the Permanent Magnet Synchronous Machine block through the user interface of the function.

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

**Specifications**

Enter the manufacturer specifications. Depending on the option that you select in the **Back EMF waveform**, **Rotor type**, and **Specify** parameters, some specifications are not available. Unavailable parameters are not taken into account in block parameter computation.

**Compute Block Parameters**

Compute the electrical parameters and display the solution in the **Block Parameters** section. When you obtain the block parameters, the button is unavailable.

When you enter new values in the **Specifications** section, the button is enabled to indicate that the displayed block parameters no longer correspond to the displayed specifications.

**Block Parameters**

Displays the parameters corresponding to the given manufacturer specifications. The first time that you open the interface, these fields are empty. You cannot edit these block parameters.

When the **Rotor type** is set to **Salient-pole**, the **Armature inductance** parameter is unavailable, indicating that its value is not computed using the **Compute Block Parameters** button.

When the Rotor type is set to Round, the **Inductances** parameter is unavailable, indicating that its value is not computed using the **Compute Block Parameters** button.

**Apply to Selected Block**

Open your model, select the machine you want to parametrize, then click the **Apply to selected block** button to load the displayed block parameters in the block. When the **Block Parameters** fields are empty, the button is unavailable. The button is enabled when a valid solution is displayed in the **Block Parameters** section.

The button has no effect on a selected block that is not a Permanent Magnet Synchronous Machine block.

**Help**

Opens the help page of the power\_PMSynchronousMachineParams function.

**Close**

Closes the interface.

## Examples

Consider a 4 kW, permanent magnet synchronous machine (round rotor and sinusoidal back emf) with this manufacturer specification.

<table><thead><tr><th width="199.77777099609375">Data</th><th>Values</th></tr></thead><tbody><tr><td>R</td><td>0.36 ohm (line-line)</td></tr><tr><td>Lab</td><td>1.67 mH (line-line)</td></tr><tr><td>kt</td><td>60.70 oz.in/Apeak</td></tr><tr><td>J</td><td>5.5E-03 lb.in.sec^2</td></tr><tr><td>B</td><td>4.5 oz.in/krpm</td></tr><tr><td>p</td><td>4</td></tr></tbody></table>

Vased on this specification, to obtain the required mask parameters for the Permanent Magnet Synchronous Machine block, in the Command Window, enter these commands:

{% code lineNumbers="true" %}

```
spec.backEMF = 'sinusoidal';
spec.rotorType = 'round' ;
spec.R = 0.36;
spec.Lab = 1.67;
spec.suppliedConstant = 'torque';
spec.k = 60.70;
spec.kUnitsNum = 'oz.in';
spec.kUnitsDenom = 'Apeak';
spec.J = 5.5e-3;
spec.inertiaUnits = 'lb.in.s^2' ;
spec.F = 4.5;
spec.frictionUnits = 'oz.in/krpm';
spec.p = 4;

params = power_PMSynchronousMachineParams(spec)
```

{% endcode %}

Result:

{% code lineNumbers="true" %}

```
params =

    lambda: 0.0714
    ke:     51.8307
    kt:     0.4286
    J:      6.2142e-004
    F:      3.0345e-004
    Rs:     0.1800
    Ls:     8.3500e-004
    Ld:     []
    Lq:     []
    p:      4
```

{% endcode %}

***


---

# 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/functions/power_pmsynchronousmachineparams.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.
