# power_PMSynchronousMachineParams

Convert manufacturer specifications to mask parameters of Permanent Magnet Synchronous Machine block

## Syntax

`power_PMSynchronousMachineParamsparams = power_PMSynchronousMachineParams(spec)`

## Description

`power_PMSynchronousMachineParams` opens a graphical user interface to compute the parameters of the Permanent Magnet Synchronous Machine block from standard manufacturer specifications.

`params = power_PMSynchronousMachineParams(spec)` computes the block parameters from the input structure `spec` which contains the manufacturer specifications. The solution is returned in the output structure `params`.

The electrical and mechanical parameters of the Permanent Magnet Synchronous Machine block along with their units are in the following table.

Parameter Unit

Stator phase resistance `Rs`

ohm

Stator phase inductance `Ls`
(trapezoidal back EMF waveform model)

H

Armature inductance `L`
(sinusoidal back EMF round rotor type)

H

Inductances `[Ld, Lq]`
(sinusoidal back EMF salient-pole rotor type)

H

V.s

Voltage constant `ke`
(peak line to line voltage per 1000 rpm)

Vpeak/krpm

Torque constant `kt`
(torque per ampere constant)

N.m/Apeak

Inertia `J`

kg.m2

Viscous damping `F`
(combined machine and load viscous damping)

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 SpecificationUnits

Line-to-line resistance `R`

ohm (line-line)

Line-to-line inductance `Lab`

mH (line-line)

d- and q-axis phase inductances `Ld, Lq`

mH

`Voltage Constant ke`

Vpeak/krpm
Vrms/krpm

`Torque Constant kt`

N.m/Apeak
N.m/Arms
N.cm/Apeak
oz.in/Arms
lb.in/Apeak
lb.ft/Arms

`Inertia J`

kg.m2
kg.cm2
g.cm2
lb.in2
kg.cm.s2
lb.in.s2
oz.in.s2

`Viscous damping F`

N.m.s
N.m/rpm
oz.in/rpm
oz.in/krpm

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 with:

Stator phase resistance:

`${R}_{s}=\frac{R}{2}$`

Stator phase inductance:

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

Armature inductance:

`$L={L}_{ab}$`

Voltage Constant:

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

Torque Constant:

`$1\frac{N.m}{{A}_{peak}}=\sqrt{2}\frac{N.m}{{A}_{rms}}=200\frac{oz.in}{{A}_{rms}}=8.85\frac{lb.in}{{A}_{peak}}=1.043\frac{lb.ft}{{A}_{rms}}$`

Inertia:

Viscous damping:

`$1N.m.s=0.1047\frac{N.m}{rpm}=14.829\frac{oz.in}{rpm}=14.829×{10}^{3}\frac{oz.in}{krpm}$`

## Input Arguments

`spec`

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

Field

Description

backEMF

Specifies the shape of back EMF waveform `{'sinusoidal','trapezoidal'}`

rotorType

Specifies the type of rotor `{'round','salient'}`

`R`

Line-to-line resistance (ohm)

`Lab`

Line-to-line inductance (mH). Specify this field only for a round rotor machine.

`Ld`

D-axis phase inductance (mH). Specify this field only for a salient-pole rotor machine.

`Lq`

Q-axis phase inductance (mH). Specify this field only for a salient-pole rotor machine.

suppliedConstant

Specifies the type of constant `(k)` provided to the function `{'voltage','torque'}`

`k`

The value of the voltage or torque constant.

kUnitsNum

The units of the voltage or torque constant numerator ```{'Vpeak','Vrms','N.m','N.cm', 'oz.in','lb.in','lb.ft'}```

kUnitsDenom

The units of the voltage or torque constant denominator `{'krpm','rad/s','Apeak','Arms'}`

J

Moment of inertia

inertiaUnits

Units for moment of inertia `{'kg.m^2', 'kg.cm^2','g.cm^2','lb.in.s^2','oz.in.s^2'}`

`F`

Viscous damping

frictionUnits

Units for viscous damping `{'N.m.s', 'N.m/rpm','oz.in/rpm','oz.in/krpm'}`

`p`

Number of pole pairs

`params` contains additional options to the function in a structure with the following fields.

## Output Arguments

`params`

The Permanent Magnet Synchronous Machine block parameters are returned in a structure with these following fields

Field

Description

`lambda`

Flux induced by magnets (V.s)

`ke`

Voltage constant (Vpeak/krpm)

`kt`

Torque constant (N.m/Apeak)

`J`

Machine inertia (kg.m2)

`F`

Machine viscous damping (N.m.s)

`Rs`

Stator phase resistance (ohm)

`Ls`

Stator phase inductance (H). Computed for the round rotor machine

`Ld`

D-axis phase inductance (H). Computed for a sinusoidal back EMF with salient-pole rotor machine.

`Lq`

Q-axis phase inductance (H). Computed for a sinusoidal back EMF and salient-pole rotor machine.

`p`

Number of pole pairs

## Interface

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

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. Parameters that are unavailable 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 have obtained the block parameters, the button is not available.

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 4kW, permanent magnet synchronous machine (round rotor and sinusoidal back emf) with the following manufacturer specification:

Data

Values

`R`

0.36 ohm (line-line)

`Lab`

1.67 mH (line-line)

`kt`

60.70 oz.in/Apeak

`J`

5.5E-03 lb.in.sec^2

`B`

4.5 oz.in/krpm

`p`

4

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

```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)```

You get the following results:

``` 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```

`power_AsynchronousMachineParams`