Flux-Based PM Controller
Controller for a flux-based permanent magnet synchronous motor
Libraries:
Powertrain Blockset /
Propulsion /
Electric Motor Controllers
Description
The Flux Based PM Controller block implements a flux-based, field-oriented controller for an interior permanent magnet synchronous motor (PMSM) with an optional outer-loop speed controller. The internal torque control implements strategies for achieving maximum torque per ampere (MTPA) and weakening the magnetic flux. You can specify either the speed or torque control type.
The Flux Based PM Controller implements equations for speed control, torque determination, regulators, transforms, and motors.
The figure illustrates the information flow in the block.
The block implements equations using these variables.
ω | Rotor speed |
ω* | Rotor speed command |
T* | Torque command |
id i*d | d-axis current d-axis current command |
iq i*q | q-axis current q-axis current command |
vd, v*d | d-axis voltage d-axis voltage command |
vq v*q | q-axis voltage q-axis voltage command |
va, vb, vc | Stator phase a, b, c voltages |
ia, ib, ic | Stator phase a, b, c currents |
Speed Controller
To implement the speed controller, select the Control Type
parameter Speed Control
. If you select the
Control Type parameter Torque
Control
, the block does not implement the speed controller.
The speed controller determines the torque command by implementing a state filter, and calculating the feedforward and feedback commands. If you do not implement the speed controller, input a torque command to the Flux Based PM Controller block.
The state filter is a low-pass filter that generates the acceleration command based on the speed command. The discrete form of characteristic equation is given by:
The filter calculates the gain using this equation.
The equations use these variables.
EVsf | Bandwidth of the speed command filter |
Tsm | Motion controller sample time |
Ksf | Speed regulator time constant |
To generate the state feedback torque, the block uses the filtered speed error signal from the state filter. To filter the speed, the block uses a proportional integral (PI) controller.
The equations use these variables.
ωm | Rotor speed |
ω*m | Rotor speed command |
Tcmd | Torque command |
Kpω | Speed regulator proportional gain |
Kiω | Speed regulator integral gain |
Tsm | Speed regulator sample rate |
To generate the state feedforward torque, the block uses the filtered speed and acceleration from the state filter. Also, the feedforward torque calculation uses the inertia, viscous damping, and static friction. To achieve zero tracking error, the torque command is the sum of the feedforward and feedback torque commands.
The feedforward torque command uses this equation.
where:
Jp | Rotor inertia |
Tcmd_ff | Torque command feedforward |
Fs | Static friction torque constant |
Fv | Viscous friction torque constant |
Fs | Static friction torque constant |
ωm | Rotor speed |
The block uses lookup tables to determine the d-axis and q-axis current commands. The lookup tables are functions of mechanical speed and torque. To determine the lookup tables, you can use an external finite element analysis (FEA) models or dynamometer test results.
The equations use these variables.
ωm | Rotor speed |
Tref | Torque command |
idref, iqref | d- and q-axis reference current, respectively |
The block uses these equations to calculate the voltage in the motor reference frame.
The equations use these variables.
ωm | Rotor mechanical speed |
ωe | Rotor electrical speed |
Rs, Rr | Resistance of the stator and rotor windings, respectively |
iq, id | q- and d-axis current, respectively |
vq, vd | q- and d-axis voltage, respectively |
Ψq, Ψd | q- and d-axis magnet flux, respectively |
Tst | Current regulator sample rate |
Kid , Kiq | d- and q- axis integral gain, respectively |
Kpd , Kpq | d- and q- axis proportional gain, respectively |
Transforms
To calculate the voltages and currents in balanced three-phase (a, b) quantities, quadrature two-phase (α, β) quantities, and rotating (d, q) reference frames, the block uses the Clarke and Park Transforms.
In the transform equations.
Transform | Description | Equations |
---|---|---|
Clarke | Converts balanced three-phase quantities (a, b) into balanced two-phase quadrature quantities (α, β). | |
Park | Converts balanced two-phase orthogonal stationary quantities (α, β) into an orthogonal rotating reference frame (d, q). | |
Inverse Clarke | Converts balanced two-phase quadrature quantities (α, β) into balanced three-phase quantities (a, b). | |
Inverse Park | Converts an orthogonal rotating reference frame (d, q) into balanced two-phase orthogonal stationary quantities (α, β). |
The transforms use these variables.
ωm | Rotor speed |
P | Rotor pole pairs |
ωe | Rotor electrical speed |
Θe | Rotor electrical angle |
x | Phase current or voltage |
Motor
The block uses the phase currents and phase voltages to estimate the DC bus current. Positive current indicates battery discharge. Negative current indicates battery charge.
The block uses these equations.
Load power | |
Source power | |
DC bus current | |
Estimated rotor torque | |
Power loss for single efficiency source to load | |
Power loss for single efficiency load to source | |
Power loss for tabulated efficiency |
The equations use these variables.
va, vb, vc | Stator phase a, b, c voltages |
vbus | Estimated DC bus voltage |
ia, ib, ic | Stator phase a, b, c currents |
ibus | Estimated DC bus current |
Eff | Overall inverter efficiency |
ωm | Rotor mechanical speed |
Lq, Ld | q- and d-axis winding inductance, respectively |
Ψq, Ψd | q- and d-axis magnet flux, respectively |
iq, id | q- and d-axis current, respectively |
λ | Permanent magnet flux linkage |
P | Rotor pole pairs |
Electrical Losses
To specify the electrical losses, on the Electrical Losses tab, for Parameterize losses by, select one of these options.
Setting | Block Implementation |
---|---|
Single efficiency measurement | Electrical loss calculated using a constant value for inverter efficiency. |
Tabulated loss data | Electrical loss calculated as a function of motor speeds and load torques. |
Tabulated efficiency data | Electrical loss calculated using inverter efficiency that is a function of motor speeds and load torques.
|
For best practice, use Tabulated loss data
instead of Tabulated efficiency data
:
Efficiency becomes ill defined for zero speed or zero torque.
You can account for fixed losses that are still present for zero speed or torque.
Ports
Input
Output
Parameters
References
[1] Hu, Dakai, Yazan Alsmadi, and Longya Xu. “High-Fidelity Nonlinear IPM Modeling Based on Measured Stator Winding Flux Linkage.” IEEE® Transactions on Industry Applications 51, no. 4 (July/August 2015).
[2] Chen, Xiao, Jiabin Wang, Bhaskar Sen, Panagiotis Lasari, and Tianfu Sun. “A High-Fidelity and Computationally Efficient Model for Interior Permanent-Magnet Machines Considering the Magnetic Saturation, Spatial Harmonics, and Iron Loss Effect.” IEEE Transactions on Industrial Electronics 62, no. 7 (July 2015).
[3] Ottosson, J., and M. Alakula. “A Compact Field Awakening Controller Implementation.” International Symposium on Power Electronics, Electrical Drives, Automation and Motion, July 2006.
Extended Capabilities
Version History
Introduced in R2017b