> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/efpgasim-library/simulink-sps-workflow/machines/generic-machines/induction-machine-model.md).

# Induction Machine Model

## Introduction <a href="#introduction" id="introduction"></a>

This document presents the formulation implemented on FPGA for **squirrel-cage**, **double squirrel-cage**, and **doubly-fed (wound rotor) three-phase induction machine** (asynchronous machine) with mechanical model. The three-phase to q-d-0 park transform has the 3/2 factor in rotor reference frame. The machine can operate in both motor mode, when the mechanical torque is positive, and generating mode, when the mechanical torque is negative. When the option of Open Stator Winding is unchecked, 0-axis is not computed for the squirrel-cage machine.

## State space representation <a href="#state-space-representation" id="state-space-representation"></a>

The modeling of the Generic Machines is based on state space equations. The forward Euler discretization of the state space model can be presented as follows:

$$
x(n+1) = x(n) + T\_s \left( A(n)x(n) + B(n)u(n) \right)  \\\[8pt] y(n+1) = C(n+1)x(n+1)
$$

The state space equation can be simplified into:

$$
x(n+1) = A\_d(n)x(n) + B\_d(n)u(n) \\\[8pt]
y(n+1) = C(n+1)x(n+1)
$$

where

$$
A\_d(n) = T\_sA(n) + eye \\\[8pt]
B\_d(n) = T\_sB(n)
$$

## Q-d transformation

The 3-phase to q-d transformation and the inverse used for the model are:

$$
\begin{bmatrix} V\_q \ V\_d \ V\_0 \end{bmatrix} = \frac{2}{3} \begin{bmatrix} \cos(\theta) & \cos!\left(\theta-\frac{2\pi}{3}\right) & \cos!\left(\theta+\frac{2\pi}{3}\right) \ \sin(\theta) & \sin!\left(\theta-\frac{2\pi}{3}\right) & \sin!\left(\theta+\frac{2\pi}{3}\right) \ \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \end{bmatrix} \begin{bmatrix} V\_a \ V\_b \ V\_c \end{bmatrix} \\\[14pt]
\begin{bmatrix} V\_a \ V\_b \ V\_c \end{bmatrix} = \begin{bmatrix} \cos(\theta) & \sin(\theta) & 1 \ \cos!\left(\theta-\frac{2\pi}{3}\right) & \sin!\left(\theta-\frac{2\pi}{3}\right) & 1 \ \cos!\left(\theta+\frac{2\pi}{3}\right) & \sin!\left(\theta+\frac{2\pi}{3}\right) & 1 \end{bmatrix} \begin{bmatrix} V\_q \ V\_d \ V\_0 \end{bmatrix}
$$

θ required for the q-d transformation depends on the chosen reference frame as follows:

* Rotor reference frame: θ=θr,
* Stationary reference frame: θ=0
* Synchronous reference frame: θ=θe.

Since the Induction Machine is modeled in rotor reference frame, the θ required for the q-d transformation is the rotor electrical angle.

## Electrical model <a href="#induction-machine-electrical-model" id="induction-machine-electrical-model"></a>

Electric machine models in state space framework based on magnetic fluxes as the state variables and winding currents as the outputs can be represented as follows:

$$
\psi(n+1)=A\_d(n) \psi(n) + B\_d(n)u(n) \\\[8pt]
I(n+1)=C(n+1)\psi(n+1)
$$

where the coefficient matrices are the same for all electric machine types as follows:

$$
A\_d=T\_s(-RL^{-1}-\Omega)+eye \\\[8pt]
B\_d=T\_s \cdot eye ||\[8pt]
C=L^{-1}
$$

Depending on the rotor type, the state variables, outputs, and the size of the state space equation might be different as presented below:

### Squirrel-Cage and Doubly-fed (Wound) <a href="#squirrel-cage-and-doubly-fed-wound" id="squirrel-cage-and-doubly-fed-wound"></a>

$$
u=\begin{bmatrix}V\_{sq} & V\_{sd} & V\_{s0} & V'*{rq} & V'*{rd} & V'*{r0}  \end{bmatrix}^t \\\[8pt]
I=\begin{bmatrix}I*{sq} & I\_{sd} & I\_{s0} & I'*{rq} & I'*{rd} & I'*{r0}  \end{bmatrix}^t  \\\[8pt]
\psi=\begin{bmatrix}\psi*{sq} & \psi\_{sd} &\psi\_{s0} & \psi'*{rq} & \psi'*{rd} & \psi'*{r0}  \end{bmatrix}^t  \\\[8pt]
R=\begin{bmatrix}R*{sq} & R\_{sd} & R\_{s0} & R'*{rq} & R'*{rd} & R'\_{r0}  \end{bmatrix}^t
$$

$$
L = \begin{bmatrix} L\_s & 0 & 0 & L\_m & 0 & 0 \ 0 & L\_s & 0 & 0 & L\_m & 0 \ 0 & 0 & L\_{s0} & 0 & 0 & 0 \ L\_m & 0 & 0 & L'\_r & 0 & 0 \ 0 & L\_m & 0 & 0 & L'*r & 0 \ 0 & 0 & 0 & 0 & 0 & L'*{r0} \end{bmatrix}
$$

$$
\Omega=\begin{bmatrix} 0 & \omega & 0 & 0 & 0 & 0 \ -\omega & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & (\omega-\omega\_r) & 0 \ 0 & 0 & 0 & -(\omega-\omega\_r) & 0 & 0 \ 0 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}
$$

### Double Squirrel-Cage

$$
u=\begin{bmatrix}V\_{sq} & V\_{sd} & 0 & 0 & 0 & 0  \end{bmatrix}^t \\\[8pt]
I=\begin{bmatrix}I\_{sq} & I\_{sd} & I\_{c1q} & I'*{c1d} & I'*{c2q} & I'*{c2d}  \end{bmatrix}^t  \\\[8pt]
\psi=\begin{bmatrix}\psi*{sq} & \psi\_{sd} &\psi\_{c1q} & \psi'*{c1d} & \psi'*{c2q} & \psi'*{c2d}  \end{bmatrix}^t  \\\[8pt]
R=\begin{bmatrix}R*{s} & R\_{s} & R\_{c1} & R'*{c1} & R'*{c2} & R'\_{c2}  \end{bmatrix}^t
$$

$$
L = \begin{bmatrix} L\_s & 0 & 0 & L\_m & 0 & L\_m & 0 \ 0 & L\_s & 0 & 0 & L\_m & 0 & L\_m \ L\_m & 0 & 0 & L'*{c1} & 0 & L\_m& 0 \ 0 & L\_m & 0 & 0 & L'*{c1} & 0 & L\_m\  L\_m & 0 & 0 \&L\_m & 0 & L'*{c2} & 0\ 0& L\_m& 0 & 0 & L\_m & 0 & L'*{c2} \end{bmatrix}
$$

$$
\Omega = \begin{bmatrix} 0 & \omega & 0 & 0 & 0 & 0 & 0 \ -\omega & 0 & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & (\omega - \omega\_r) & 0 & 0 \ 0 & 0 & -(\omega - \omega\_r) & 0 & 0 & 0 & 0 \ 0 & 0 & 0 & 0 & 0 & 0 & (\omega - \omega\_r) \ 0 & 0 & 0 & 0 & 0 & -(\omega - \omega\_r) & 0 \end{bmatrix}
$$

The Induction Machine is modeled in rotor reference frame so ω=ωr.The electrical torque can be calculated as follows:

$$
T\_e=\frac{3}{2}pp(\psi\_di\_q-\psi\_qi\_d)
$$

## Mechanical model <a href="#mechanical-model" id="mechanical-model"></a>

The mechanical model is the same for all machine types to calculate the rotor mechanical speed (ωm) as follows:

$$
T\_e - T\_m = J\dot{\omega}\_m + F\_v \omega\_m + F\_s
$$

## Nomenclature <a href="#nomenclature" id="nomenclature"></a>

**x**: state variables vector

**y**: outputs vector

**u**: inputs vector

**A**,**B**,**C**: state space coefficient matrices

Ts: simulation time step

n: time step number

Va: stator phase a voltage

Vb: stator phase b voltage

Vc: stator phase c voltage

Vsq: stator q-axis voltage

Vsd: stator d-axis voltage

Vs0: stator 0-axis voltage

V'rq: rotor q-axis voltage (referred to the stator)

V'rd: rotor d-axis voltage (referred to the stator)

**I**: current vector

Isq: stator q-axis current

Isd: stator d-axis current

Is0: stator 0-axis current

I'rq: rotor q-axis current (referred to the stator)

I'rd: rotor d-axis current (referred to the stator)

I'c1q: cage 1 q-axis current (referred to the stator)

I'c1d: cage 1 d-axis current (referred to the stator)

I'c2q: cage 2 q-axis current (referred to the stator)

I'c2d: cage 2 d-axis current (referred to the stator)

**Ψ**: magnetic flux vector

ψsq: stator q-axis flux

ψsd: stator d-axis flux

ψs0: stator 0-axis flux

ψ'rq: rotor q-axis flux (referred to the stator)

ψ'rd: rotor d-axis flux (referred to the stator)

ψ'c1q: cage 1 q-axis flux (referred to the stator)

ψ'c1d: cage 1 d-axis flux (referred to the stator)

ψ'c2q: cage 2 q-axis flux (referred to the stator)

ψ'c2d: cage 2 d-axis flux (referred to the stator)

**R**: resistance matrix

Rs: stator winding resistance

R0: 0-axis stator winding resistance

R'r: rotor winding resistance (referred to the stator)

R'c1: cage 1 resistance (referred to the stator)

R'c2: cage 2 resistance (referred to the stator)

**L**: inductance matrix

Ls: stator self inductance (mutual (Lm) +leakage (Lls) )

L0: 0-axis stator inductance

L'r: rotor self inductance (referred to the stator) (mutual (Lm) +leakage (Llr) )

L'c1: cage 1 self inductance (referred to the stator) (mutual (Lm) +leakage (Llc1) )

L'c2: cage 2 self inductance (referred to the stator) (mutual (Lm) +leakage (Llc2) )

Lm: mutual inductance

**Ω**: speed matrix

ω, θ: rotation speed, and position of the reference frame

ωe, θe: rotation speed, and position of the synchronous frame

ωr, θr: rotation speed, and position of the rotor (electrical) frame

ωm, θm: rotation speed, and position of the rotor (mechanical) frame

Te: electromagnetic torque

Tm: mechanical torque

pp: number of pole pairs

J: rotor inertia

Fv: viscous friction coefficient

Fs: static friction torque


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/rt-lab/simulink-blocks-reference/efpgasim-library/simulink-sps-workflow/machines/generic-machines/induction-machine-model.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
