Interior PM Controller
Torque-based, field-oriented controller for an internal permanent magnet synchronous motor
Libraries:
Powertrain Blockset /
Propulsion /
Electric Motor Controllers
Description
The Interior PM Controller block implements a torque-based, field-oriented controller for an internal 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 Interior 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 that use 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 Interior PM Controller block.
The state filter is a low-pass filter that generates the acceleration command based on the speed command. On the Speed Controller tab:
To make the speed-command lag time negligible, specify a Bandwidth of the state filter parameter.
To calculate a Speed regulation time constant, Ksf gain based on the state filter bandwidth, select Calculate Speed Regulator Gains.
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. The feedback torque calculation also requires gains for speed regulator.
On the Speed Controller tab, select Calculate Speed Regulator Gains to calculate:
Proportional gain, ba
Angular gain, Ksa
Rotational gain, Kisa
For the gain calculations, the block uses the inertia from the Physical inertia, viscous damping, static friction parameter value on the Motor Parameters tab.
The gains for the state feedback are calculated using these equations.
Calculation | Equations |
---|---|
Discrete forms of characteristic equation | |
Speed regulator proportional gain | |
Speed regulator integral gain | |
Speed regulator double integral gain |
The equations use these variables.
P | Motor pole pairs |
ba | Speed regulator proportional gain |
Ksa | Speed regulator integral gain |
Kisa | Speed regulator double integral gain |
Jp | Motor inertia |
Tsm | Motion controller sample time |
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.
Selecting Calculate Speed Regulator Gains on the Speed Controller tab updates the inertia, viscous damping, and static friction with the Physical inertia, viscous damping, static friction parameter values on the Motor Parameters tab.
The feedforward torque command uses this equation.
where:
Jp | Motor inertia |
Tcmd_ff | Torque command feedforward |
Fs | Static friction torque constant |
Fv | Viscous friction torque constant |
Fs | Static friction torque constant |
ωm | Rotor speed |
Torque Determination
The block uses a maximum torque per ampere (MTPA) trajectory to calculate the base speed and the current commands. The available bus voltage determines the base speed. The direct (d) and quadrature (q) permanent magnet (PM) determines the induced voltage.
Calculation | Equations |
---|---|
Electrical base speed transition into field weakening | |
d-axis voltage | |
q-axis voltage | |
Maximum phase current | |
Maximum line to neutral voltage | |
d-axis phase current MTPA table | |
q-axis phase current MTPA table | |
Torque MTPA breakpoints | |
Field weakening, using the speed-based voltage limits | |
Current command |
If Else If Else End End |
The equations use these variables.
imax | Maximum phase current |
id | d-axis current |
iq | q-axis current |
id_max | Maximum d-axis phase current |
iq_max | Maximum q-axis phase current |
id_mtpa | d-axis phase current MTPA table |
iq_mtpa | q-axis phase current MTPA table |
Im | Estimated maximum current |
idfw | d-axis field weakening current |
iqfw | q-axis field weakening current |
ωe | Rotor electrical speed |
λpm | Permanent magnet flux linkage |
vd | d-axis voltage |
vq | q-axis voltage |
vmax | Maximum line to neutral voltage |
vbus | DC bus voltage |
Ld | d-axis winding inductance |
Lq | q-axis winding inductance |
P | Motor pole pairs |
Tfw | Field weakening torque |
Tmtpa | Torque MTPA breakpoints |
Current Regulators
The block regulates the current with an anti-windup feature. Classic proportional-integrator (PI) current regulators do not consider the d-axis and q-axis coupling or the back-electromagnetic force (EMF) coupling. As a result, transient performance deteriorates. To account for the coupling, the block implements the complex vector current regulator (CVCR) in the scalar format of the rotor reference frame. The CVCR decouples:
d-axis and q-axis current cross-coupling
Back-EMF cross-coupling
The current frequency response is a first-order system, with a bandwidth of EVcurrent.
The block implements these equations.
Calculation | Equations |
---|---|
Motor voltage, in the rotor reference frame | |
Current regulator gains | |
Transfer functions |
The equations use these variables.
EVcurrent | Current regulator bandwidth |
id | d-axis current |
iq | q-axis current |
Kp_d | Current regulator d-axis gain |
Kp_q | Current regulator q-axis gain |
Ld | d-axis winding inductance |
Lq | q-axis winding inductance |
Rs | Stator phase winding resistance |
ωm | Rotor speed |
vd | d-axis voltage |
vq | q-axis voltage |
λpm | Permanent magnet flux linkage |
P | Motor pole pairs |
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 | Motor 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 | q-axis winding inductance |
Ld | d-axis winding inductance |
iq | q-axis current |
id | d-axis current |
λ | Permanent magnet flux linkage |
P | Motor 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] Lorenz, Robert D., Thomas Lipo, and Donald W. Novotny. “Motion control with induction motors.” Proceedings of the IEEE®, Vol. 82, Issue 8, August 1994, pp. 1215–1240.
[2] Morimoto, Shigeo, Masayuka Sanada, and Yoji Takeda. “Wide-speed operation of interior permanent magnet synchronous motors with high-performance current regulator.” IEEE Transactions on Industry Applications, Vol. 30, Issue 4, July/August 1994, pp. 920–926.
[3] Li, Muyang. “Flux-Weakening Control for Permanent-Magnet Synchronous Motors Based on Z-Source Inverters.” Master’s Thesis, Marquette University, e-Publications@Marquette, Fall 2014.
[4] Briz, Fernando, Michael W. Degner, and Robert D. Lorenz. "Analysis and design of current regulators using complex vectors." IEEE Transactions on Industry Applications, Vol. 36, Issue 3, May/June 2000, pp. 817–825.
[5] Briz, Fernando, et al. "Current and flux regulation in field-weakening operation [of induction motors]."IEEE Transactions on Industry Applications, Vol. 37, Issue 1, Jan/Feb 2001, pp. 42–50.
Extended Capabilities
Version History
Introduced in R2017a