# PMSM (DQ0)

Direct-quadrature-zero representation of permanent magnet synchronous machine

*Since R2024b*

**Libraries:**

Simscape /
Electrical /
Electromechanical /
Permanent Magnet

## Description

The PMSM (DQ0) block models the direct-quadrature-zero (dq0) frame representation of a permanent magnet synchronous motor (PMSM) with a three-phase stator. Use this block to model an interior permanent magnet synchronous machine (IPMSM), surface permanent magnet synchronous machine (SPMSM), transverse flux motor, axial flux (pancake) motor, or PMSM servomotor.

PMSMs have a permanent magnet rotor and a wound stator. You use these motors in traction
applications such as electric vehicles (EVs) and in actuation systems. In actuation systems,
PMSMs are also called *brushless servomotors*. You typically design a
PMSM to have a sinusoidal back electromotive force (EMF) profile. This design reduces
undesirable high-frequency mechanical and electrical current harmonics compared to motors like
the brushless DC (BLDC) motor that have a trapezoidal back EMF
profile.

Use this block to model the two main types of PMSM:

SPSM or surface permanent magnet (SPM) motor — The "S" signifies that the rotor magnets are surface mounted.

*Ld*and*Lq*are equal.IPSM or interior permanent magnet (IPM) motor — The "I" signifies that the rotor magnets are interior to the rotor.

*Ld*and*Lq*are not equal.

You can also categorize PMSMs based on the main flux paths. The main flux paths are commonly radial but can be axial, which causes higher torques for the same physical size of motor. You can use the PMSM (DQ0) block to model both categories of PMSM.

**Note**

Simscape™ Electrical™ includes several blocks that can model the same type of motor or actuator. You must choose a block that has sufficient modeling detail for the engineering design questions that you need to answer. However, do not use more detail than you need, because higher-fidelity models slow down simulation and are more complex to parameterize.

Blocks like the PMSM (DQ0) block model motors with fixed or parameter-dependent coefficients with a simple equivalent circuit. These models have an intermediate level of fidelity. Use this block to design controls or systems in actuation applications, such as robotics and mechatronics, and for efficiency predictions when saturation and harmonics only weakly impact losses. For more information about choosing the right block to model your motor at the right level of fidelity, see Choose Blocks to Model Motors or Actuators.

### Equations

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

This equation defines the Park’s transformation:

$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 and is equal
to

*Nθ*.

_{r}*N*is the number of pole pairs.

The block uses the Park's transformation on the stator winding voltages and currents to transform 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]$$

$\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]$

${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 ({i}_{d}{L}_{d}+{\psi}_{m})$

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

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

where:

*L*=_{d}*L*+_{s}*M*+ 3/2_{s}*L*._{m}*L*is the stator_{d}*d*-axis inductance.*L*=_{q}*L*+_{s}*M*− 3/2_{s}*L*._{m}*L*is the stator_{q}*q*-axis inductance.*L*=_{0}*L*– 2_{s}*M*._{s}*L*is the stator zero-sequence inductance._{0}*ω*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 port**C**, which represents the motor case, to port**R**, which represents the motor rotor.

The PMSM (DQ0) 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.

### Alternative Flux Linkage Parameterization

You can parameterize the motor by using the back EMF or torque constants by using the
**Permanent magnet flux linkage** parameter.

The back EMF constant is the peak voltage that the permanent magnet induces in the per-unit rotational speed of each of the phases. The relationship between the peak permanent magnet flux linkage and the back EMF is:

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

The back EMF, *e _{ph}*, for one phase is:

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

The torque constant is the peak torque that the per-unit current of each of the phases induces. The torque constant is numerically identical in value to the back EMF constant when both are expressed in SI units:

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

When
*L _{d}*=

*L*and the currents in all three phases are balanced, the combined torque

_{q}*T*is:

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

where *I _{pk}* 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 *k _{t}* is also
equal to:

$${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
*I _{pk}*. The RMS line current is:

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

### Calculating Iron Losses

Iron losses consist of two terms, one representing the main magnetizing path and the other representing the cross-tooth tip path that becomes active during the field-weakening operation. The iron losses model is based on [3].

The term that represents 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 term is dominant during the no-load operation. *k* is the back EMF
constant relating the RMS volts per Hz. This term is equal to $$k={V}_{{m}_{rms}}^{}/f$$, where *f* is the electrical frequency. The first term on
the right side is the magnetic hysteresis loss, the second is the eddy current loss, and the
third is the excess loss. The block derives the three coefficients on the numerators from
the values that you specify for the open-circuit hysteresis, eddy, and excess losses.

The term representing the cross-tooth tip path is relevant when a demagnetizing field is set up and can be determined from a finite element analysis short-circuit test. This term 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 block derives the three numerator terms from the values you specify for the short-circuit hysteresis, eddy, and excess losses.

### Model Thermal Effects

You can expose the thermal ports to model the effects of losses that convert power to
heat. To expose the thermal ports, set the **Modeling option** parameter to
one of these values:

`No thermal port`

— The block contains the electrical conserving ports associated with the stator dq0 quantities but does not contain thermal ports.`Show thermal port`

— The block contains the electrical conserving ports associated with the stator dq0 quantities and the thermal conserving ports for the stator and for the rotor.

For more information about using thermal ports in actuator blocks, see Simulating Thermal Effects in Rotational and Translational Actuators.

### Variables

To set the priority and initial target values for the block variables before simulation,
use the **Initial Targets** section in the block dialog box or Property
Inspector. For more information, see Set Priority and Initial Target for Block Variables.

Nominal values provide a way to specify the expected magnitude of a variable in a model.
Using system scaling based on nominal values increases the simulation robustness. You can
specify nominal values using different sources, including the **Nominal
Values** section in the block dialog box or Property Inspector. For more
information, see System Scaling by Nominal Values.

## Examples

## Ports

### Conserving

## Parameters

## References

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

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

[3] Mellor, Phil H., Rafal Wrobel, and
Derrick Holliday. *A Computationally Efficient Iron Loss Model for Brushless AC
Machines That Caters for Rated Flux and Field Weakened Operation.* In 2009 IEEE
International Electric Machines and Drives Conference, 490–94. Miami, FL: IEEE. https://doi.org/10.1109/IEMDC.2009.5075251.

## Extended Capabilities

## Version History

**Introduced in R2024b**