# PMSM

Permanent magnet synchronous motor with sinusoidal flux distribution

• Library:
• Simscape / Electrical / Electromechanical / Permanent Magnet

## Description

The PMSM block models a permanent magnet synchronous motor with a three-phase wye-wound stator. The figure shows the equivalent electrical circuit for the stator windings.

You can choose different built-in parameterizations for this block. For more information, see the Predefined Parameterization section.

### Motor Construction

This figure shows the motor construction with a single pole-pair on the rotor.

Permanent magnets generate a rotor magnetic field that creates a sinusoidal rate of change of flux with rotor angle.

For the axes convention in the preceding figure, the a-phase and permanent magnet fluxes are aligned when rotor mechanical angle, θr, is zero. The block supports a second rotor axis definition in which rotor mechanical angle is defined as the angle between the a-phase magnetic axis and the rotor q-axis.

### Equations

Voltages across the stator windings are defined by:

`$\left[\begin{array}{c}{v}_{a}\\ {v}_{b}\\ {v}_{c}\end{array}\right]=\left[\begin{array}{ccc}{R}_{s}& 0& 0\\ 0& {R}_{s}& 0\\ 0& 0& {R}_{s}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ {i}_{b}\\ {i}_{c}\end{array}\right]+\left[\begin{array}{c}\frac{d{\psi }_{a}}{dt}\\ \frac{d{\psi }_{b}}{dt}\\ \frac{d{\psi }_{c}}{dt}\end{array}\right],$`

where:

• va, vb, and vc are the individual phase voltages across the stator windings.

• Rs is the equivalent resistance of each stator winding.

• ia, ib, and ic are the currents flowing in the stator windings.

• $\frac{d{\psi }_{a}}{dt},$$\frac{d{\psi }_{b}}{dt},$ and $\frac{d{\psi }_{c}}{dt}$ are the rates of change of magnetic flux in each stator winding.

The permanent magnet and the three windings contribute to the total flux linking each winding. The total flux is defined by:

`$\left[\begin{array}{c}{\psi }_{a}\\ {\psi }_{b}\\ {\psi }_{c}\end{array}\right]=\left[\begin{array}{ccc}{L}_{aa}& {L}_{ab}& {L}_{ac}\\ {L}_{ba}& {L}_{bb}& {L}_{bc}\\ {L}_{ca}& {L}_{cb}& {L}_{cc}\end{array}\right]\left[\begin{array}{c}{i}_{a}\\ {i}_{b}\\ {i}_{c}\end{array}\right]+\left[\begin{array}{c}{\psi }_{am}\\ {\psi }_{bm}\\ {\psi }_{cm}\end{array}\right],$`

where:

• ψa, ψb, and ψc are the total fluxes linking each stator winding.

• Laa, Lbb, and Lcc are the self-inductances of the stator windings.

• Lab, Lac, Lba, and so on, are the mutual inductances of the stator windings.

• ψam, ψbm, and ψcm are the permanent magnet fluxes linking the stator windings.

The inductances in the stator windings are functions of rotor electrical angle, defined by:

`${\theta }_{e}=N{\theta }_{r}+rotor\text{\hspace{0.17em}}offset$`

`${L}_{aa}={L}_{s}+{L}_{m}\text{cos}\left(2{\theta }_{e}\right),$`

`${L}_{bb}={L}_{s}+{L}_{m}\text{cos}\left(2\left({\theta }_{e}-2\pi /3\right)\right),$`

`${L}_{cc}={L}_{s}+{L}_{m}\text{cos}\left(2\left({\theta }_{e}+2\pi /3\right)\right),$`

`${L}_{ab}={L}_{ba}=-{M}_{s}-{L}_{m}\mathrm{cos}\left(2\left({\theta }_{e}+\pi /6\right)\right),$`

`${L}_{bc}={L}_{cb}=-{M}_{s}-{L}_{m}\mathrm{cos}\left(2\left({\theta }_{e}+\pi /6-2\pi /3\right)\right),$`

and

`${L}_{ca}={L}_{ac}=-{M}_{s}-{L}_{m}\mathrm{cos}\left(2\left({\theta }_{e}+\pi /6+2\pi /3\right)\right),$`

where:

• θr is the rotor mechanical angle.

• θe is the rotor electrical angle.

• rotor offset is `0` if you define the rotor electrical angle with respect to the d-axis, or `-pi/2` if you define the rotor electrical angle with respect to the q-axis.

• Ls is the stator self-inductance per phase. This value is the average self-inductance of each of the stator windings.

• Lm is the stator inductance fluctuation. This value is the fluctuation in self-inductance and mutual inductance with changing rotor angle.

• Ms is the stator mutual inductance. This value is the average mutual inductance between the stator windings.

The permanent magnet flux linking winding a is a maximum when θe = 0° and zero when θe = 90°. Therefore, the linked motor flux is defined by:

`$\left[\begin{array}{c}{\psi }_{am}\\ {\psi }_{bm}\\ {\psi }_{cm}\end{array}\right]=\left[\begin{array}{c}{\psi }_{m}\mathrm{cos}{\theta }_{e}\\ {\psi }_{m}\mathrm{cos}\left({\theta }_{e}-2\pi /3\right)\\ {\psi }_{m}\mathrm{cos}\left({\theta }_{e}+2\pi /3\right)\end{array}\right]$`

where ψm is the permanent magnet flux linkage.

### Simplified Electrical Equations

Applying Park’s transformation to the block electrical equations produces an expression for torque that is independent of the rotor angle.

Park’s transformation is defined by:

`$P=2/3\left[\begin{array}{ccc}\mathrm{cos}{\theta }_{e}& \mathrm{cos}\left({\theta }_{e}-2\pi /3\right)& \mathrm{cos}\left({\theta }_{e}+2\pi /3\right)\\ -\mathrm{sin}{\theta }_{e}& -\mathrm{sin}\left({\theta }_{e}-2\pi /3\right)& -\mathrm{sin}\left({\theta }_{e}+2\pi /3\right)\\ 0.5& 0.5& 0.5\end{array}\right]$`

where θe is the electrical angle defined as r. N is the number of pole pairs.

Using Park's transformation on the stator winding voltages and currents transforms them to the dq0 frame, which is independent of the rotor angle:

`$\left[\begin{array}{c}{v}_{d}\\ {v}_{q}\\ {v}_{0}\end{array}\right]=P\left[\begin{array}{c}{v}_{a}\\ {v}_{b}\\ {v}_{c}\end{array}\right]$`

and

`$\left[\begin{array}{c}{i}_{d}\\ {i}_{q}\\ {i}_{0}\end{array}\right]=P\left[\begin{array}{c}{i}_{a}\\ {i}_{b}\\ {i}_{c}\end{array}\right].$`

Applying Park’s transformation to the first two electrical equations produces the following equations that define the block behavior:

`${v}_{d}={R}_{s}{i}_{d}+{L}_{d}\frac{d{i}_{d}}{dt}-N\omega {i}_{q}{L}_{q},$`

`${v}_{q}={R}_{s}{i}_{q}+{L}_{q}\frac{d{i}_{q}}{dt}+N\omega \left({i}_{d}{L}_{d}+{\psi }_{m}\right),$`

`${v}_{0}={R}_{s}{i}_{0}+{L}_{0}\frac{d{i}_{0}}{dt},$`

and

`$T=\frac{3}{2}N\left({i}_{q}\left({i}_{d}{L}_{d}+{\psi }_{m}\right)-{i}_{d}{i}_{q}{L}_{q}\right),$`

where:

• Ld = Ls + Ms + 3/2 Lm. Ld is the stator d-axis inductance.

• Lq = Ls + Ms − 3/2 Lm. Lq is the stator q-axis inductance.

• L0 = Ls – 2Ms. L0 is the stator zero-sequence inductance.

• ω is the rotor mechanical rotational speed.

• N is the number of rotor permanent magnet pole pairs.

• T is the rotor torque. Torque flows from the motor case (block physical port C) to the motor rotor (block physical port R).

The PMSM block uses the original, non-orthogonal implementation of the Park transform. If you try to apply the alternative implementation, you get different results for the dq0 voltage and currents.

You can parameterize the motor using the back EMF or torque constants which are more commonly given on motor datasheets by using the Permanent magnet flux linkage option.

The back EMF constant is defined as the peak voltage induced by the permanent magnet in each of the phases per unit rotational speed. It is related to peak permanent magnet flux linkage by:

`${k}_{e}=N{\psi }_{m}.$`

From this definition, it follows that the back EMF eph for one phase is given by:

`${e}_{ph}={k}_{e}\omega .$`

The torque constant is defined as the peak torque induced by each of the phases per unit current. It is numerically identical in value to the back EMF constant when both are expressed in SI units:

`${k}_{t}=N{\psi }_{m}.$`

When Ld=Lq, and when the currents in all three phases are balanced, it follows that the combined torque T is given by:

`$T=\frac{3}{2}{k}_{t}{i}_{q}=\frac{3}{2}{k}_{t}{I}_{pk},$`

where Ipk is the peak current in any of the three windings.

The factor 3/2 follows from this being the steady-state sum of the torques from all phases. Therefore the torque constant kt could also be defined as:

`${k}_{t}=\frac{2}{3}\left(\frac{T}{{I}_{pk}}\right),$`

where T is the measured total torque when testing with a balanced three-phase current with peak line voltage Ipk. Writing in terms of RMS line current:

`${k}_{t}=\frac{\sqrt{2}}{3}\frac{T}{{i}_{line,rms}}.$`

### Calculating Iron Losses

Iron losses are divided into two terms, one representing the main magnetizing path, and the other representing the cross-tooth tip path that becomes active during field weakened operation. The iron losses model, which is based on the work of Mellor [3].

The term representing the main magnetizing path depends on the induced RMS line-to-neutral stator voltage, ${V}_{{m}_{rms}}^{}$:

`${P}_{OC}\left({V}_{{m}_{rms}}^{}\right)=\frac{{a}_{h}}{k}{V}_{{m}_{rms}}^{}+\frac{{a}_{j}}{{k}^{2}}{V}_{{m}_{rms}}^{2}+\frac{{a}_{ex}}{{k}^{1.5}}{V}_{{m}_{rms}}^{1.5}$`

This is the dominant term during no-load operation. k is the back emf constant relating RMS volts per Hz. It is defined as $k={V}_{{m}_{rms}}^{}/f$, where f is the electrical frequency. The first term on the right-hand side is the magnetic hysteresis loss, the second is the eddy current loss and the third is the excess loss. The three coefficients appearing on the numerators are derived from the values that you provide for the open-circuit hysteresis, eddy, and excess losses.

The term representing the cross-tooth tip path becomes important when a demagnetizing field is set up and can be determined from a finite element analysis short-circuit test. It depends on the RMS emf associated with the cross-tooth tip flux, ${V}_{{d}_{rms}}^{*}$:

`${P}_{SC}\left({V}_{{d}_{rms}}^{*}\right)=\frac{{b}_{h}}{k}{V}_{{d}_{rms}}^{*}+\frac{{b}_{j}}{{k}^{2}}{V}_{{d}_{rms}}^{*2}+\frac{{b}_{ex}}{{k}^{1.5}}{V}_{{d}_{rms}}^{*1.5}$`

The three numerator terms are derived from the values you provide for the short-circuit hysteresis, eddy, and excess losses.

### Predefined Parameterization

There are multiple available built-in parameterizations for the PMSM block.

This pre-parameterization data allows you to set up the block to represent components by specific suppliers. The parameterizations of these permanent magnet synchronous motors match the manufacturer data sheets. To load a predefined parameterization, click on the Select a predefined parameterization hyperlink in the PMSM block mask and select the part you want to use from the list of available components.

Note

Predefined parameterizations of Simscape components use available data sources for supplying parameter values. Engineering judgement and simplifying assumptions are used to fill in for missing data. As a result, deviations between simulated and actual physical behavior should be expected. To ensure requisite accuracy, you should validate simulated behavior against experimental data and refine component models as necessary.

### Thermal Ports

The block has four optional thermal ports, one for each of the three windings and one for the rotor. These ports are hidden by default. To expose the thermal ports, right-click the block in your model, select Simscape > Block choices, and then select the desired block variant with thermal ports: Composite three-phase ports | Show thermal port or Expanded three-phase ports | Show thermal port. This action displays the thermal ports on the block icon, and exposes the Temperature Dependence and Thermal Port parameters. These parameters are described further on this reference page.

Use the thermal ports to simulate the effects of copper resistance and iron losses that convert electrical power to heat. For more information on using thermal ports in actuator blocks, see Simulating Thermal Effects in Rotational and Translational Actuators.

### Variables

Use the Variables settings to specify the priority and initial target values for the block variables before simulation. For more information, see Set Priority and Initial Target for Block Variables.

## Ports

### Conserving

expand all

Electrical conserving port associated with the neutral phase.

#### Dependencies

To enable this port, set Winding Type to `Wye-wound` and Zero sequence to `Include`.

Mechanical rotational conserving port associated with the motor rotor.

Mechanical rotational conserving port associated with the motor case.

Thermal conserving port associated with winding A. For more information, see Thermal Ports.

Thermal conserving port associated with winding B. For more information, see Thermal Ports.

Thermal conserving port associated with winding C. For more information, see Thermal Ports.

Thermal conserving port associated with the rotor. For more information, see Thermal Ports.

## Parameters

expand all

### Main

Select the configuration for the windings:

• `Wye-wound` — The windings are wye-wound.

• `Delta-wound` — The windings are delta-wound. The a-phase is connected between ports a and b, the b-phase between ports b and c and the c-phase between ports c and a.

Select the modeling fidelity:

• `Constant Ld, Lq and PM`Ld, Lq and PM values are constant and defined by their respective parameters.

• `Tabulated Ld, Lq and PM`Ld, Lq and PM values are computed online from DQ currents look-up tables as follows:

`${L}_{d}={f}_{1}\left({i}_{d},{i}_{q}\right)$`

`${L}_{d}={f}_{2}\left({i}_{d},{i}_{q}\right)$`

`${\lambda }_{PM}={f}_{2}\left({i}_{d},{i}_{q}\right)$`

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0```.

Number of permanent magnet pole pairs on the rotor.

Choose `Specify flux linkage`, `Specify torque constant`, or `Specify back EMF constant`.

Peak permanent magnet flux linkage with any of the stator windings.

#### Dependencies

To enable this parameter, set Permanent magnet flux linkage parameterization to ```Specify flux linkage``` and Modeling fidelity to `Constant Ld, Lq and PM`.

Torque constant with any of the stator windings.

#### Dependencies

To enable this parameter, set Permanent magnet flux linkage parameterization to ```Specify torque constant``` and Modeling fidelity to ```Constant Ld, Lq and PM```.

Back EMF constant with any of the stator windings.

#### Dependencies

To enable this parameter, set Permanent magnet flux linkage parameterization to ```Specify back EMF constant``` and Modeling fidelity to ```Constant Ld, Lq and PM```.

Choose `Specify Ld, Lq, and L0` or `Specify Ls, Lm, and Ms`.

D-axis inductance.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Constant Ld, Lq and PM`.

Q-axis inductance.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Constant Ld, Lq and PM`.

Direct-axis current vector, iD.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Tabulated Ld, Lq and PM`.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Tabulated Ld, Lq and PM`.

Ld matrix.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Tabulated Ld, Lq and PM`.

Lq matrix.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ld, Lq, and L0``` and Modeling fidelity to `Tabulated Ld, Lq and PM`.

#### Dependencies

To enable this parameter, set:

• Stator parameterization to `Specify Ld, Lq, and L0`

• Modeling fidelity to ```Tabulated Ld, Lq and PM```

• Permanent magnet flux linkage parameterization to ```Specify flux linkage```

Torque constant matrix.

#### Dependencies

To enable this parameter, set:

• Stator parameterization to `Specify Ld, Lq, and L0`

• Modeling fidelity to ```Tabulated Ld, Lq and PM```

• Permanent magnet flux linkage parameterization to ```Specify torque constant```

Back EMF constant matrix.

#### Dependencies

To enable this parameter, set:

• Stator parameterization to `Specify Ld, Lq, and L0`

• Modeling fidelity to ```Tabulated Ld, Lq and PM```

• Permanent magnet flux linkage parameterization to ```Specify back EMF constant```

Zero-sequence inductance.

#### Dependencies

To enable this parameter either:

• Set Winding Type to `Wye-wound`, Zero sequence to `Include`, and Stator parameterization to `Specify Ld, Lq, and L0`.

• Set Winding Type to `Delta-wound` and Stator parameterization to `Specify Ld, Lq, and L0`.

Average self-inductance of each of the three stator windings.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ls, Lm, and Ms```.

Fluctuation in self-inductance and mutual inductance of the stator windings with rotor angle.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ls, Lm, and Ms```.

Average mutual inductance between the stator windings.

#### Dependencies

To enable this parameter, set Stator parameterization to ```Specify Ls, Lm, and Ms```.

Resistance of each of the stator windings.

Option to include or exclude zero-sequence terms.

• `Include` — Include zero-sequence terms. To prioritize model fidelity, use this default setting. Using this option:

• `Exclude` — Exclude zero-sequence terms. To prioritize simulation speed for desktop simulation or real-time deployment, select this option.

#### Dependencies

This parameter is visible only when you set the Winding Type parameter to `Wye-wound`.

Reference point for the rotor angle measurement. The default value is ```Angle between the a-phase magnetic axis and the d-axis```. This definition is shown in the Motor Construction figure. When you select this value, the rotor and a-phase fluxes are aligned when the rotor angle is zero.

The other value you can choose for this parameter is ```Angle between the a-phase magnetic axis and the q-axis```. When you select this value, the a-phase current generates maximum torque when the rotor angle is zero.

### Iron Losses

Specify the iron losses computational model.

Row vector, of length 3, of the open-circuit iron losses due to hysteresis, Eddy, and excess losses, respectively, at the frequency specified by Electrical frequency at which losses determined.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

Row vector, of length 3, of the short-circuit iron losses due to hysteresis, Eddy, and excess losses, respectively, at the frequency specified by Electrical frequency at which losses determined.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

Electrical frequency at which the open-circuit and short-circuit iron losses were measured.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

The resulting short-circuit RMS phase current when measuring the short-circuit losses.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

### Mechanical

Inertia of the rotor attached to mechanical translational port R. The value can be zero.

Rotary damping.

### Temperature Dependence

These parameters appear only for blocks with exposed thermal ports. For more information, see Thermal Ports.

The temperature for which motor parameters are quoted.

Coefficient α in the equation relating resistance to temperature, as described in Thermal Model for Actuator Blocks. The default value is for copper.

The fractional rate of change of permanent magnet flux density with temperature. It is used to linearly reduce the torque and the induced back EMF as temperature rises.

### Thermal Port

These parameters appear only for blocks with exposed thermal ports. For more information, see Thermal Ports.

The thermal mass value for the A, B, and C windings. The thermal mass is the energy required to raise the temperature by one degree.

The thermal mass of the rotor, that is, the energy required to raise the temperature of the rotor by one degree.

The percentage of the main flux path iron losses associated with the magnetic path through the rotor. It determines how much of the iron loss heating is attributed to the rotor thermal port HR, and how much is attributed to the three winding thermal ports HA, HB, and HC.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

The percentage of the cross-tooth flux path iron losses associated with the magnetic path through the rotor. It determines how much of the iron loss heating is attributed to the rotor thermal port HR, and how much is attributed to the three winding thermal ports HA, HB, and HC.

#### Dependencies

To enable this parameter, set Iron-loss to `Empirical`.

## References

[1] Kundur, P. Power System Stability and Control. New York, NY: McGraw Hill, 1993.

[2] Anderson, P. M. Analysis of Faulted Power Systems. Hoboken, NJ: Wiley-IEEE Press, 1995.

[3] Mellor, P.H., R. Wrobel, and D. Holliday. “A computationally efficient iron loss model for brushless AC machines that caters for rated flux and field weakened operation.” IEEE Electric Machines and Drives Conference. May 2009.

## Extended Capabilities

### Blocks

Introduced in R2013b