Internal torquebased, fieldoriented controller for an induction motor with an optional outerloop speed controller
Powertrain Blockset / Propulsion / Electric Motor Controllers
The IM Controller block implements an internal torquebased, fieldoriented controller for an induction motor (IM) with an optional outerloop speed controller. The torque control implements a strategy to control the motor flux. You can specify either speed or torque control.
The IM 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 
i_{d} i*_{d}  daxis current daxis current command 
i_{q} i*_{q}  qaxis current qaxis current command 
v_{d}, v*_{d}  daxis voltage daxis voltage command 
v_{q} v*_{q}  qaxis voltage qaxis voltage command 
v_{a}, v_{b}, v_{c}  Stator phase a, b, c voltages 
i_{a}, i_{b}, i_{c}  Stator phase a, b, c currents 
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 IM Controller block.
The state filter is a lowpass filter that generates the acceleration command based on the speed command. On the Speed Controller tab:
To make the speedcommand lag time negligible, specify a Bandwidth of the state filter parameter.
To calculate a Speed time constant, Ksf gain based on the state filter bandwidth, select Calculate Speed Regulator Gains.
The discrete form of characteristic equation is given by:
$z+{K}_{sf}{T}_{sm}1$
The filter calculates the gain using this equation.
${K}_{sf}=\frac{1\mathrm{exp}\left({T}_{sm}2\pi E{V}_{sf}\right)}{{T}_{sm}}$
The equation uses these variables.
EV_{sf}  Bandwidth of the speed command filter 
T_{sm}  Motion controller sample time 
K_{sf}  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 compute:
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 Parameter tab.
The gains for the state feedback are calculated using these equations.
Calculation  Equations 

Discrete forms of characteristic equation  ${z}^{3}+\frac{\left(3{J}_{p}+{T}_{s}{b}_{a}+{T}_{s}^{2}{K}_{sa}+{T}_{s}^{3}{K}_{isa}\right)}{{J}_{p}}{z}^{2}+\frac{\left(3{J}_{p}2{T}_{s}{b}_{a}{T}_{s}^{2}{K}_{sa}\right)}{{J}_{p}}z+\frac{{J}_{p}+{T}_{s}{b}_{a}}{{J}_{p}}$ $$(z{p}_{1})(z{p}_{2})(z{p}_{3})={z}^{3}+({p}_{1}+{p}_{2}+{p}_{3}){z}^{2}+({p}_{1}{p}_{2}+{p}_{2}{p}_{3}+{p}_{1}3){z}^{2}{p}_{1}{p}_{2}{p}_{3}$$ 
Speed regulator proportional gain  ${b}_{a}=\frac{{J}_{p}{J}_{p}{p}_{1}{p}_{2}{p}_{3}}{{T}_{sm}}$ 
Speed regulator integral gain  ${K}_{sa}=\frac{{J}_{p}\left({p}_{1}{p}_{2}+{p}_{2}{p}_{3}+{p}_{3}{p}_{1}\right)3{J}_{p}+2{b}_{a}{T}_{sm}}{{T}_{sm}^{2}}$ 
Speed regulator double integral gain  ${K}_{isa}=\frac{{J}_{p}\left({p}_{1}+{p}_{2}+{p}_{3}\right)+3{J}_{p}{b}_{a}{T}_{sm}{K}_{sa}{T}_{sm}^{2}}{{T}_{sm}^{3}}$ 
The equations use these variables.
P  Motor pole pairs 
b_{a}  Speed regulator proportional gain 
K_{sa}  Speed regulator integral gain 
K_{isa}  Speed regulator double integral gain 
J_{p}  Motor inertia 
T_{sm}  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 Parameter tab.
The feedforward torque command uses this equation.
$${T}_{cmd\_ff}={J}_{p}{\dot{\omega}}_{m}+{F}_{v}{\omega}_{m}+{F}_{s}\frac{{\omega}_{m}}{\left{\omega}_{m}\right}$$
The equation uses these variables.
J_{p}  Motor inertia 
T_{cmd_ff}  Torque command feedforward 
F_{s}  Static friction torque constant 
F_{v}  Viscous friction torque constant 
F_{s}  Static friction torque constant 
ω_{m}  Rotor mechanical speed 
The block uses a quadrature current to determine the base speed and the current commands. The motor ratings determine the rated electrical speed.
Calculation  Equations 

Current commands  $${i}_{qref}=\frac{{T}_{cmd}}{{i}_{sq\_0}\cdot P\cdot \left(\frac{{L}^{2}{}_{m}}{{L}_{r}}\right)}$$ If $$\left{\omega}_{e}\right\le {\omega}_{rated}$$ ${i}_{dref}={i}_{sd\_0}$ Else $${i}_{dref}=\frac{{i}_{sd\_0}}{\left{\omega}_{e}\right}$$ End 
Inductance  $$\begin{array}{l}{L}_{r}={L}_{lr}+{L}_{m}\\ {L}_{s}={L}_{ls}+{L}_{m}\end{array}$$ 
The equations use these variables.
i_{dref}  daxis reference current 
i_{qref}  qaxis reference current 
i_{sd_0}  daxis rated current 
i_{sq_0}  qaxis rated current 
ω_{e}  Rotor electrical speed 
ω_{rated}  Rated electrical speed 
L_{lr}  Rotor leaking inductance 
L_{r}  Rotor winding inductance 
L_{ls}  Stator leaking inductance 
L_{s}  Stator winding inductance 
L_{m}  Motor magnetizing inductance 
P  Motor pole pairs 
T_{cmd}  Commanded motor maximum torque 
The block regulates the current with an antiwindup feature. Classic proportionalintegrator (PI) current regulators do not consider the daxis and qaxis coupling or the backelectromagnetic 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:
daxis and qaxis current crosscoupling
BackEMF crosscoupling
The current frequency response is a firstorder system, with a bandwidth of EV_{current}.
The block implements these equations.
Calculation  Equations 

Motor voltage, in the stator reference frame  $$\begin{array}{l}\sigma =1\frac{{L}^{2}{}_{m}}{{L}_{s}{L}_{r}}\\ {v}_{sd}={R}_{s}{i}_{sd}+\sigma {L}_{s}\frac{d{i}_{sd}}{dt}+\frac{{L}_{m}}{{L}_{r}}\frac{d{\lambda}_{rd}}{dt}P{\omega}_{m}\sigma {L}_{s}{i}_{sq}\\ {v}_{sq}={R}_{s}{i}_{sq}+\sigma {L}_{s}\frac{d{i}_{sq}}{dt}+{\omega}_{d}\frac{{L}_{m}}{{L}_{r}}\frac{d{\lambda}_{rd}}{dt}+P{\omega}_{m}\sigma {L}_{s}{i}_{sd}\end{array}$$ 
Current regulator gains  $\begin{array}{l}{\omega}_{b}=2\pi E{V}_{current}\\ {K}_{p}=\sigma {L}_{d}{\omega}_{b}\\ {K}_{i}={R}_{s}{\omega}_{b}\end{array}$ 
Transfer functions  $\begin{array}{l}\frac{{i}_{d}}{{i}_{dref}}=\frac{{\omega}_{b}}{s+{\omega}_{b}}\\ \frac{{i}_{q}}{{i}_{qref}}=\frac{{\omega}_{b}}{s+{\omega}_{b}}\end{array}$ 
The equations use these variables.
EV_{current}  Current regulator bandwidth 
i_{d}  daxis current 
i_{q}  qaxis current 
i_{sq}  Stator qaxis current 
i_{sd}  Stator daxis current 
v_{sd}  Stator daxis voltage 
v_{sq}  Stator qaxis voltage 
K_{p}  Current regulator daxis gain 
K_{i}  Current regulator integrator gain 
L_{s}  Stator winding inductance 
L_{m}  Motor magnetizing inductance 
L_{r}  Rotor winding inductance 
R_{s}  Stator phase winding resistance 
λ_{rd}  Rotor daxis magnetic flux 
σ  Leakage factor 
p  Motor pole pairs 
To calculate the voltages and currents in balanced threephase (a, b) quantities, quadrature twophase (α, β) quantities, and rotating (d, q) reference frames, the block uses the Clarke and Park Transforms.
In the transform equations.
$\begin{array}{l}{\omega}_{e}=P{\omega}_{m}\\ \frac{d{\theta}_{e}}{dt}={\omega}_{e}\end{array}$
Transform  Description  Equations 

Clarke  Converts balanced threephase quantities (a, b) into balanced twophase quadrature quantities (α, β).  $\begin{array}{l}{x}_{\alpha}=\frac{2}{3}{x}_{a}\frac{1}{3}{x}_{b}\frac{1}{3}{x}_{c}\\ {x}_{\beta}=\frac{\sqrt{3}}{2}{x}_{b}\frac{\sqrt{3}}{2}{x}_{c}\end{array}$ 
Park  Converts balanced twophase orthogonal stationary quantities (α, β) into an orthogonal rotating reference frame (d, q).  $\begin{array}{l}{x}_{d}={x}_{\alpha}\mathrm{cos}{\theta}_{e}+{x}_{\beta}\mathrm{sin}{\theta}_{e}\\ {x}_{q}={x}_{\alpha}\mathrm{sin}{\theta}_{e}+{x}_{\beta}\mathrm{cos}{\theta}_{e}\end{array}$ 
Inverse Clarke  Converts balanced twophase quadrature quantities (α, β) into balanced threephase quantities (a, b).  $\begin{array}{l}{x}_{a}={x}_{a}\\ {x}_{b}=\frac{1}{2}{x}_{\alpha}+\frac{\sqrt{3}}{2}{x}_{\beta}\\ {x}_{c}=\frac{1}{2}{x}_{\alpha}\frac{\sqrt{3}}{2}{x}_{\beta}\end{array}$ 
Inverse Park  Converts an orthogonal rotating reference frame (d, q) into balanced twophase orthogonal stationary quantities (α, β).  $\begin{array}{l}{x}_{\alpha}={x}_{d}\mathrm{cos}{\theta}_{e}{x}_{q}\mathrm{sin}{\theta}_{e}\\ {x}_{\beta}={x}_{d}\mathrm{sin}{\theta}_{e}+{x}_{q}\mathrm{cos}{\theta}_{e}\end{array}$ 
The transforms use these variables.
ω_{m}  Rotor mechanical speed 
P  Motor pole pairs 
ω_{e}  Rotor electrical speed 
Θ_{e}  Rotor electrical angle 
x  Phase current or voltage 
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  $L{d}_{Pwr}={v}_{a}{i}_{a}+{v}_{b}{i}_{b}+{v}_{c}{i}_{c}$ 
Source power  $Sr{c}_{Pwr}=L{d}_{Pwr}+Pw{r}_{Loss}$ 
DC bus current  ${i}_{bus}=\frac{Sr{c}_{Pwr}}{{v}_{bus}}$ 
Estimated rotor torque  $MtrTr{q}_{est}=P{\lambda}_{rd}{i}_{sq}\frac{{L}_{m}}{{L}_{r}}$ 
Power loss for single efficiency source to load  $$Pw{r}_{Loss}=\frac{100Eff}{Eff}\cdot L{d}_{Pwr}$$ 
Power loss for single efficiency load to source  $$Pw{r}_{Loss}=\frac{100Eff}{100}\cdot \leftL{d}_{Pwr}\right$$ 
Power loss for tabulated efficiency  $Pw{r}_{Loss}=f({\omega}_{m},MtrTr{q}_{est})$ 
The equations use these variables.
v_{a}, v_{b}, v_{c} 
Stator phase a, b, c voltages 
v_{bus} 
Estimated DC bus voltage 
i_{a}, i_{b}, i_{c} 
Stator phase a, b, c currents 
i_{bus} 
Estimated DC bus current 
Eff 
Overall inverter efficiency 
ω_{m} 
Rotor mechanical speed 
L_{r} 
Rotor winding inductance 
L_{m} 
Motor magnetizing inductance 
λ_{rd} 
Rotor daxis magnetic flux 
i_{sq} 
qaxis current 
P 
Motor pole pairs 
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.
[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] Shigeo Morimoto, Masayuka Sanada, Yoji Takeda. “Widespeed operation of interior permanent magnet synchronous motors with highperformance current regulator.” IEEE Transactions on Industry Applications, Vol. 30, Issue 4, July/August 1994, pp. 920–926.
[3] Muyang Li. “FluxWeakening Control for PermanentMagnet Synchronous Motors Based on ZSource Inverters.” Master’s Thesis, Marquette University, ePublications@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 fieldweakening operation [of induction motors]."IEEE Transactions on Industry Applications, Vol. 37, Issue 1, Jan/Feb 2001, pp. 42–50.
FluxBased PM Controller  Induction Motor  Interior PM Controller  Surface Mount PM Controller