Pour la documentation en FRANÇAIS, utilisez l’outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The PMSM SH model defines the Inductance Matrices Ld and Lq within a three-dimensional table stored in an RTT motor model file.  Because the tables are three-dimensional rather than two-dimensional, the PMSM SH model can provide higher fidelity than the PMSM BLDC model.  Please see Permanent Magnet Synchronous Machine Models Comparison for a comparison of the PMSM SH and PMSM BLDC models.

Configuration Page

In the System Explorer window configuration tree, expand the Power Electronics Add-On custom device and select Circuit Model >> PMSM SH to display this page.  Use this page to configure the PMSM SH machine model. 

This page includes the following components:

Machine Model Settings
NameSpecifies the name of the machine model.
DescriptionSpecifies a description for the machine model.
Motor Configuration
Model File

Specifies the path to the 3D Motor Model file on disk. Refer to JMAG-RT RTT File Generation Recommendations for details regarding the file format. The following standards are supported:

    • ANSYS (.txt)
    • JMAG (.rtt)
EnableEnables the motor to execute. By default, the first PMSM SH instance is enabled, however, it is recommended to disable unused motors for an optimal timestep.
Solver Timestep (s)

The timestep at which the machine model executes

Every Ts, new outputs are computed by the FPGA machine model. By default, this is set to the minimum achievable timestep.

Input Mapping Configuration
Use the Input Mapping Configuration to route signals to the Voltage Phase A, Voltage Phase B, and Voltage Phase C inputs of the machine model.  Available routing options may vary depending on the selected Hardware Configuration.


Specifies the group that will be routed to the input voltages of the machine. The available routing options are defined by the selected Hardware Configuration, however it is typical to see the following options by default:

  • Measurements - eHS circuit model measurements


Specifies the index of the measurement in the group that has been selected as the input voltage of the machine.

Section Channels

This section includes the following custom device channels:

Channel Name




Default Value


Current Phase A

IaOutputAmpere0 APhase A current measured at the stator

Current Phase B

IbOutputAmpere0 APhase B current measured at the stator

Current Phase C

IcOutputAmpere0 APhase C current measured at the stator
Average Voltage Phase AVa,avgOutputVolts0 V

Averaged Phase A voltage measured at the stator. The voltage is processed through a low-pass filter with a cutoff frequency of 159 Hz

Average Voltage Phase BVb,avgOutputVolts0 VAveraged Phase B voltage measured at the stator. The voltage is processed through a low-pass filter with a cutoff frequency of 159 Hz
Average Voltage Phase CVc,avgOutputVolts0 VAveraged Phase C voltage measured at the stator. The voltage is processed through a low-pass filter with a cutoff frequency of 159 Hz
Three Phase Active PowerPOutputWatts0 W

Three-phase instantaneous active electrical power in Watts

See Power Equations for more information on how this is calculated.

Three Phase Reactive PowerQOutputVolt-ampere reactive0 var

Three-phase instantaneous reactive electrical power in vars

See Power Equations for more information on how this is calculated.

Direct Stator CurrentIdOutputAmpere0 A

Direct-axis stator current in the reference frame aligned with the rotor

For a description of the DQ-transform used to compute this value, see D-Q Transform

Quadratic Stator CurrentIqOutputAmpere0 A

Quadrature-axis stator current in the reference frame aligned with the rotor

For a description of the DQ-transform used to compute this value, see D-Q Transform

Model Description

Permanent Magnet Synchronous Machines are common electrical machines in the the automotive and transportation industry. The PMSM is usually chosen because of its excellent power density (produced power over size or weight) or its capability to reach higher speed than others motor types. However, controlling a PMSM is usually more challenging when compared to other machine types. Since it is a synchronous machine, the controller must be aware of the rotor position at all times in order to properly control the torque. In addition, there is a chance of de-fluxing the magnet if the control is not stable, which would lead to a modification of the machine properties. 

The following figures illustrate the equivalent circuits of the PMSM motor model in the abc-frame and in the D-Q frame.


Figure 1.  Electrical Model for PMSM

Figure 2.  Electrical Model for PMSM in the D-Q frame

where Labc are the phase inductances, Rabc are the stator resistances, Vabc are the instantaneous voltages across the stator windings, Vbemf,abc are the phase to neutral voltages induced by the electromotive forces, Vdq are the direct-axis and quadrature-axis stator voltages in the reference frame aligned with the rotor, Ldq are the direct-axis and quadrature-axis inductances of the machine, ωe  is the electrical speed of the machine, and ψM is the permanent magnet flux linkage

General Equation

The equation of the PMSM model can be expressed as follows:


where Labc is the time-varying inductance matrix (global inductance for Constant Ld/Lq and Variable Ld/Lq models), Iabc is the stator current inside the winding, Rabc are the stator resistances and Vabc is the voltage across the stator windings. ψabc defines the magnet flux linked into the stator windings.

Electrical Angle

The electrical angle is expressed as follows:


DQ Transform

In normal conditions, the ideal stator voltages of the PMSM, back-EMFs, and inductances all have sinusoidal shapes. In the case of the BLDC, the back-EMFs are considered to be trapezoidal. One can transform the equation using the Park transformation with a referential locked on the rotor position θr using (3) and (5).


The DQ Transform (also called Park-Clarke transform) reduces sinusoidal varying quantities of inductances, flux, current, and voltage to constant values in the DQ frame thus greatly facilitating the analysis and control of the device under study.

It is important to note that there are many different types of DQ transforms and this often leads to confusion when interpreting the motor states inside the DQ frame. The one used here (which is typically standard in Japan) presents the advantage of being orthonormal (notice the sqrt(3/2) factor). This particular DQ orthonormal transform is power-invariant which means that the power computed in the DQ frame by performing a dot product of currents and voltages will be numerically equal to the one computed in the phase domain, namely:


Torque Equation

With this transform (and only this transform), the machine torque can be expressed by (7), where pp is the number of pole pairs and  is the partial derivative of the instantaneous permanent magnet flux.


In the case of the PMSM Constant Ld/Lq and PMSM Variable Ld/Lq motor types, the back EMF shape is sinusoidal and the torque can be further simplified into (8).  Note that (8) does not apply to the BLDC Constant Ls motor type, whose back EMF shape is trapezoidal.


One may notice the absence of the 3/2 factor in (7) and (8), which is usually present in the PMSM torque equation when using non-orthonormal transforms. This is, again, because this model uses the orthonormal DQ transform. Figure 3 explains the principle of the Park transform. Considering fixed ABC referential with all quantities ( Vbemf, motor current I) rotating at the electric frequency ω, if we observe these quantities in a DQ frame turning at the same speed we can see that the motor quantities will be constant.

This is easy to see for the Back-EMF voltage Vbemf  that directly follows the Q-axis (because the magnet flux is on the D-axis by definition). In Figure 3, I leads  and the Q-axis by an angle called β (beta). The modulus of the vector I is called Iamp. In the figure below, θ is the rotor angle, aligned with the D-axis.

Figure 3. Park Transform with angle definitions for θ and β

Power Equations

The  instantaneous active and reactive power, P and Q are calculated as follows:


where Va, Vb, and Vc are the instantaneous stator voltages

The active and reactive power are processed through low-pass filters dependent on the timestep of the machine and are calculated as follows. When Ts is set to the minimum of 120ns, the cutoff frequencies are 133Hz:


  • No labels