The PMSM BLDC model implements three motor types which provide parametrization for different machine types (Permanent Magnet Synchronous Machine and Brushless DC Motor) and allow for different levels of model fidelity (Constant or Variable parametrization) : PMSM Constant Ld/Lq, PMSM Variable Ld/Lq, and BLDC Constant Ls. The PMSM Constant Ld/Lq and BLDC Constant Ls motor modes simulate a machine with constant inductance and magnetic flux parameters. The PMSM Variable Ld/Lq motor type simulates a PMSM whose inductance and magnetic flux parameters are variable based on the operating state of the simulation (in this case, based on I_{d} and I_{q}), which allows for greater model fidelity.
Configuration Page
In the System Explorer window configuration tree, expand the Power Electronics AddOn custom device and select Circuit Model >> PMSM BLDC to display this page. Use this page to configure the PMSM BLDC machine model.
This page includes the following components:
Machine Model Settings  
Name  Specifies the name of the machine model. 
Description  Specifies a description for the machine model. 
Motor Configuration  
Motor Type  Choose from one of the following types. The motor configuration parameters automatically populate depending on the selected Motor Type. 
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.  
Group  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:

Element  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  Symbol  Type  Units  Default Value  Description  

Current Phase A  I_{a}  Output  Ampere  0 A  Phase A current measured at the stator  
Current Phase B  I_{b}  Output  Ampere  0 A  Phase B current measured at the stator  
Current Phase C  I_{c}  Output  Ampere  0 A  Phase C current measured at the stator  
Average Voltage A  V_{a,avg}  Output  Volts  0 V  Averaged Phase A voltage measured at the stator. The voltage is processed through a lowpass filter with a cutoff frequency of 159 Hz
 
Average Voltage B  V_{b,avg}  Output  Volts  0 V  Averaged Phase B voltage measured at the stator. The voltage is processed through a lowpass filter with a cutoff frequency of 159Hz.  
Average Voltage C  V_{c,avg}  Output  Volts  0 V  Averaged Phase C voltage measured at the stator. The voltage is processed through a lowpass filter with a cutoff frequency of 159Hz  
ThreePhase Active Power  P  Output  Watts  0 W  Threephase instantaneous active electrical power in Watts See Power Equations for more information on how this is calculated.  
Three Phase Reactive Power  Q  Output  Voltampere reactive  0 var  Threephase instantaneous reactive electrical power in vars See Power Equations for more information on how this is calculated.  
Direct Stator Current  I_{d}  Output  Ampere  0 A  Directaxis stator current in the reference frame aligned with the rotor For a description of the DQtransform used to compute this value, see DQ Transform  
Quadratic Stator Current  I_{q}  Output  Ampere  0 A  Quadratureaxis stator current in the reference frame aligned with the rotor For a description of the DQtransform used to compute this value, see DQ Transform  
BackEMF Phase A  V_{bemf,a}  Output  Volts  0 V  Phase A to neutral voltage induced by the electromotive force  
BackEMF Phase B  V_{bemf,b}  Output  Volts  0 V  Phase B to neutral voltage induced by the electromotive force  
BackEMF Phase C  V_{bemf,c}  Output  Volts  0 V  Phase C to neutral voltage induced by the electromotive force  
Permanent Magnet Flux Linkage  ψ_{M}  Output  Weber  0 Wb  Latestvalue measurement of the Permanent Magnet Flux Linkage used at the input of the electrical model In Constant mode, this will return the constant value input by the user in the Motor Configuration settings In Variable mode, this will be the value that is lookedup in the 2D Flux Linkage table.  
Direct Inductance  L_{d}  Output  Henry  0 H  Directaxis inductance. This value is fed back from the input of the electrical model and describes only the latest value. In Constant mode, this will return the constant value input by the user in the Motor Configuration settings In Variable mode, this will be the value that is lookedup in the 2D L_{d }table.  
Quadrature Inductance  L_{q}  Output  Henry  0 H  Quadratureaxis inductance. This value is fed back from the input of the electrical model and describes only the latest value. In Constant mode, this will return the constant value input by the user in the Motor Configuration settings In Variable mode, this will be the value that is lookedup in the 2D L_{q }table.  
Direct Stator Voltage  V_{d}  Output  Volts  0 V  Directaxis stator voltage in the reference frame aligned with the rotor For a description of the DQtransform used to compute this value, see Standard DQ Motor Characteristicssee DQ Transform  
Quadrature Stator Voltage  V_{q}  Output  Volts  0 V  Directaxis stator voltage in the reference frame aligned with the rotor For a description of the DQtransform used to compute this value, see Standard DQ Motor Characteristicssee DQ 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 defluxing 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 abcframe and in the DQ frame.
Figure 1. Electrical Model for PMSM
Figure 2. Electrical Model for PMSM in the DQ frame
Excerpt  

General EquationThe equation of the PMSM model can be expressed as follows:
where L_{abc} is the timevarying inductance matrix (global inductance for Constant Ld/Lq and Variable Ld/Lq models), I_{abc} is the stator current inside the winding, R_{abc} are the stator resistances and V_{abc} is the voltage across the stator windings. ψ_{abc }defines the magnet flux linked into the stator windings.
In normal conditions, the ideal sinusoidal stator voltages of the PMSM, backEMFs, and inductances all have sinusoidal shapes. In the case of the BLDC, the backEMFs are considered to be trapezoidal. One can transform the equation using the Park transformation with a referential locked on the rotor position θ using
The DQ Transform (also called ParkClarke 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 powerinvariant 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 EquationWith this transform (and only this transform) the machine torque can be expressed by
One may notice the absence of the 3/2 factor in
This is easy to see for the BackEMF voltage V_{bemf} that directly follows the Qaxis (because the magnet flux is on the Daxis by definition). In Figure 3, I leads and the Qaxis by an angle called β (beta). The modulus of the vector I is called I_{amp}. In the figure below, θ is the rotor angle, aligned with the Daxis. Figure 3. Park Transform with angle definitions for θ and β
Anchor 

LaTeX Math Block  

 
P = V_a I_a + V_b I_b + V_c I_c = V_d I_d + V_q I_q\\ Q = \frac {1} {\sqrt 3} [(V_b  V_c) I_a + (V_c  V_a) I_b + (V_a  V_b) I_c ] = V_q I_d  V_d I_q 
where V_{a}, V_{b}, and V_{c }are the instantaneous stator voltages
The active and reactive power are processed through lowpass 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:
LaTeX Math Block  

 
f_{c} = \frac{1}{\SI{1e4} \times Ts \times 2\pi} = \frac{1}{\SI{1e4} \times \SI{120e9} \times 2\pi} = 133Hz 
Anchor  


When set to the PMSM Constant Ld/Lq motor type, the machine model uses constant values for Direct Inductance, Quadrature Inductance, Magnetic Flux, Phase [A, B, C] Resistance, and Pole Pairs.
Configuration Parameters
The following parameters are available:
Motor Configuration  
Symbol  Units  Default Value  Description  

Direct Inductance  L_{d}  Henry  0.002984 H  Directaxis inductance of the machine 
Quadrature Inductance  L_{q}  Henry  0.004576 H  Quadratureaxis inductance of the machine 
Permanent Magnetic Flux  ψ_{M}  Weber  0.25366 Wb  Peak permanent magnet flux linkage 
Phase A Resistance  R_{a}  Ohm  0.12 Ω  Phase A Resistance of the machine 
Phase B Resistance  R_{b}  Ohm  0.12 Ω  Phase B Resistance of the machine 
Phase C Resistance  R_{c}  Ohm  0.12 Ω  Phase C Resistance of the machine 
Pole Pairs  pp  3  Number of pole pairs  
Direct Quadrature Transform Angle Offset  Aligned 
 
Solver Timestep  T_{s}  Second  1.2E7 s  The timestep at which the machine model executes Every T_{s}, new outputs are computed by the FPGA machine model. By default, this is set to the minimum achievable timestep. 
Torque Equation
The machine torque for the PMSM Constant Ld/Lq motor type can be expressed by
LaTeX Math Block Reference  


LaTeX Math Block  

 
T_{e}=p p\left[\psi_{M} \; \sqrt{\frac{3}{2}} \; i_{q}+\left(L_{d}L_{q}\right) i_{d} i_{q}\right] 
Anchor  


When set to the PMSM Variable Ld/Lq motor type, the inductance and magnetic flux parameters are variable based on the operating state of the simulation, as defined in the JSON configuration file.
Configuration Parameters
The following parameters are available:
Motor Configuration  
Symbol  Units  Default Value  Description  

Model File  Specifies the path to the JSON Motor Model file on disk. Refer to Motor Model File [JSON] for details regarding the file format.  
Solver Timestep  T_{s}  Second  1.2E7 s  The timestep at which the machine model executes Every T_{s}, new outputs are computed by the FPGA machine model. By default, this is set to the minimum achievable timestep. 
Torque Equation
The machine torque for the PMSM Variable Ld/Lq motor type can be expressed by
LaTeX Math Block Reference  


LaTeX Math Block  

 
T_{e}=p p\left[\psi_{M} \; \sqrt{\frac{3}{2}} \; i_{q}+\left(L_{d}L_{q}\right) i_{d} i_{q}\right] 
Anchor  


When set to the BLDC Constant L_{S} motor type, the machine model uses constant values for Stator Inductance, Magnetic Flux, Phase [A, B, C] Resistance, and Pole Pairs. The main difference between the PMSM and the BLDC motor types lies in the shape of the back EMF voltage, which is trapezoidal in the case of the BLDC.
Configuration Parameters
The following parameters are available:
Motor Configuration  
Symbol  Units  Default Value  Description  

Stator Inductance  L_{s}  Henry  0.002984 H  Stator inductance of the machine 
Back EMF Flat Area  H  Degrees  0  Describes the length of the flat area in degrees of the trapezoidal backEMF wave Please see Trapezoidal BackEMF Characteristics for a description of the wave. 
Permanent Magnetic Flux  ψ_{M}  Weber  0.25366 Wb  Peak permanent magnet flux linkage 
Phase A Resistance  R_{a}  Ohm  0.12 Ω  Phase A Resistance of the machine 
Phase B Resistance  R_{b}  Ohm  0.12 Ω  Phase B Resistance of the machine 
Phase C Resistance  R_{c}  Ohm  0.12 Ω  Phase C Resistance of the machine 
Pole Pairs  pp  3  Number of pole pairs  
Direct Quadrature Transform Angle Offset  Aligned 
 
Solver Timestep  T_{s}  Second  1.2E7 s  The timestep at which the machine model executes Every T_{s}, new outputs are computed by the FPGA machine model. By default, this is set to the minimum achievable timestep. 
Torque Equation
LaTeX Math Block  

 
T_{e}=p p\left[ I_{a b c}\cdot\frac{\partial \psi_{abc}}{\partial \theta_r}\right] 
AnchorBLDCgraph BLDCgraph
Trapezoidal BackEMF Characteristics
BLDCgraph  
BLDCgraph 
The BLDC has a trapezoidal back EMF shape that is parametrized with λ_{m} the permanent flux linkage and H the back EMF flat area in degrees.
The electromotive force is constructed from a cosine table as described in the following equation:
LaTeX Math Block  

 
\Large\frac{\partial \psi_{a}}{\partial \theta_r \psi_M}\normalsize= max(min(\Large\frac{cos(\theta_r)}{cos(\frac{H}{2})}\normalsize,1),1) 