---
title: The dq0 transformation
heading: Space vectors, Clarke's transformation to two stationary axes, Park's transformation onto axes that turn with the rotor, why sinusoidal three-phase quantities become constants, power and torque in dq variables, and the dq voltage equations with their speed-voltage terms
eyebrow: S12 · Lesson 39 · The dq0 transformation
xp: 50
---

::: hook
The steady-state circuits of the last twenty lessons assume sinusoids at one frequency. Transients, faults and inverter control don't oblige. In the stator's own coordinates a machine's inductances vary with rotor angle, so its differential equations have time-varying coefficients. Park's 1929 transformation removes that: express the three phase quantities on two axes that turn with the rotor, one along its poles and one between them, and the inductances become constants, balanced sinusoids become steady DC values, and the machine's dynamics become a handful of ordinary differential equations.
:::

::: play
- The stator current as a single **space vector** of length I (three balanced phase currents at the instant ωt), and a d–q frame turned to the rotor angle θ.
- The d and q components are the vector's projections on the rotor's axes: $i_d = I\cos(\omega t - \theta)$ and $i_q = I\sin(\omega t - \theta)$.
- Advance time and the rotor together (as in steady state) and the projections don't change: in the rotor's frame, AC quantities are DC.
:::

```sim plot
view: complex
range: 12
axes: phase a axis, 90° electrical
slider: t = 0..360 step 1 = 60 °
slider: h = 0..360 step 1 = 30 °
slider: I = 2..10 step 0.5 = 10 A
arrow: I*exp(j*t*pi/180) | color: ch4 | label: current vector
arrow: I*cos((t - h)*pi/180)*exp(j*h*pi/180) | label: i_d
arrow: I*sin((t - h)*pi/180)*exp(j*(h + 90)*pi/180) | from: I*cos((t - h)*pi/180)*exp(j*h*pi/180) | color: ch2 | label: i_q
arrow: 11*exp(j*h*pi/180) | dashed | color: ch3 | label: d axis
readout: i_d, A = I*cos((t - h)*pi/180) | digits: 3
readout: i_q, A = I*sin((t - h)*pi/180) | digits: 3
readout: phase a current, A = I*cos(t*pi/180) | digits: 3
```

::: predict
## Balanced currents of 10 A peak flow, and the rotor's d axis sits 30° behind the current's space vector. What are $i_d$ and $i_q$?

- [ ] 10 A and 0
- [x] 8.66 A and 5 A
- [ ] 5 A and 8.66 A
- [ ] They oscillate at line frequency

::: reveal
The space vector has length 10 A and is 30° ahead of the d axis, so its projections are $10\cos 30°$ = 8.66 A along d and $10\sin 30°$ = 5 A along q. If the rotor turns in step with the currents, as it does in a synchronous machine, these stay constant.
:::
:::

::: nameit
## The space vector

Three phase quantities with axes 0°, 120° and 240° combine into one rotating vector (amplitude-invariant form):

$$\vec{i} = \tfrac{2}{3}\left(i_a + i_be^{j120°} + i_ce^{j240°}\right)$$

For balanced currents of peak I it has constant length I and turns at ω. **Clarke's** transformation takes its real and imaginary parts, $i_\alpha$ and $i_\beta$, on fixed axes.

## Park's transformation

On axes turned to the rotor's electrical angle θ:

$$\begin{bmatrix} i_d \\ i_q \\ i_0 \end{bmatrix} = \frac{2}{3}\begin{bmatrix} \cos\theta & \cos(\theta - 120°) & \cos(\theta + 120°) \\ -\sin\theta & -\sin(\theta - 120°) & -\sin(\theta + 120°) \\ \frac{1}{2} & \frac{1}{2} & \frac{1}{2} \end{bmatrix}\begin{bmatrix} i_a \\ i_b \\ i_c \end{bmatrix}$$

The zero-sequence component $i_0 = (i_a + i_b + i_c)/3$ is zero in a balanced or ungrounded system.

## Power and torque

With the amplitude-invariant scaling, power picks up a factor 3/2:

$$P = \tfrac{3}{2}(v_di_d + v_qi_q) + 3v_0i_0, \qquad T = \tfrac{3}{2}\tfrac{P}{2}(\lambda_di_q - \lambda_qi_d)$$

## Voltage equations

In the rotating frame, with electrical speed $\omega = d\theta/dt$ and flux linkages $\lambda_d$, $\lambda_q$:

$$v_d = Ri_d + \frac{d\lambda_d}{dt} - \omega\lambda_q, \qquad v_q = Ri_q + \frac{d\lambda_q}{dt} + \omega\lambda_d$$

The $\omega\lambda$ terms are **speed voltages**, the rotating-frame view of the back-EMF. For a permanent-magnet machine, $\lambda_d = L_di_d + \lambda_m$ and $\lambda_q = L_qi_q$, with constant $L_d$ and $L_q$.
:::

::: example
## At one instant $i_a$ = 10 A, $i_b = i_c$ = −5 A, and the rotor's d axis lies along phase a (θ = 0). Find the dq0 currents.

::: solution
1. **d-axis current.** With θ = 0,
   $$\begin{aligned} i_d &= \tfrac{2}{3}(10 + (-5)(-0.5) \\ &\quad + (-5)(-0.5)) \\ &= 10\ \text{A} \end{aligned}$$
2. **q-axis current.**
   $$\begin{aligned} i_q &= -\tfrac{2}{3}(0 + (-5)\sin(-120°) \\ &\quad + (-5)\sin 120°) \\ &= 0 \end{aligned}$$
3. **Zero-sequence current.** $i_0$ = 0.
4. **Check.** The current vector points straight along d, as it should when phase a is at its peak and the other two at half that, negative.

**Answer:** $i_d$ = 10 A, $i_q$ = 0 and $i_0$ = 0.
:::
:::

::: example
## A permanent-magnet machine with 8 poles and $\lambda_m$ = 0.1 Wb carries $i_q$ = 20 A, $i_d$ = 0. Find its torque, and its steady $v_q$ at 2000 rad/s electrical with R = 0.05 Ω.

::: solution
1. **Torque.** With $i_d$ = 0,
   $$\begin{aligned} T &= \tfrac{3}{2} \times 4 \times 0.1 \times 20 \\ &= 12\ \text{N·m} \end{aligned}$$
2. **q-axis voltage.** In steady state,
   $$\begin{aligned} v_q &= Ri_q + \omega\lambda_d \\ &= 0.05 \times 20 + 2000 \times 0.1 \\ &= 201\ \text{V} \end{aligned}$$
   almost all speed voltage.
3. **d-axis voltage.** $v_d = -\omega L_qi_q$, which depends on $L_q$.

**Answer:** the torque is 12 N·m, and $v_q$ = 201 V.
:::
:::

::: example
## A controller commands $i_d$ = 0 and $i_q$ = 20 A with the rotor at θ = 30°. What phase currents result?

::: solution
1. **Inverse transformation.** It's $i_a = i_d\cos\theta - i_q\sin\theta$, and the same with θ − 120° and θ + 120° for phases b and c.
2. **Phase currents.**
   $$\begin{aligned} i_a &= -20\sin 30° \\ &= -10\ \text{A} \\ i_b &= -20\sin(-90°) \\ &= 20\ \text{A} \\ i_c &= -20\sin 150° \\ &= -10\ \text{A} \end{aligned}$$
   which sum to zero.
3. **As the rotor turns.** These three sinusoids follow it, always placing the current 90° ahead of the magnet's flux, where it makes the most torque per ampere.

**Answer:** $i_a$ = −10 A, $i_b$ = 20 A and $i_c$ = −10 A.
:::
:::

::: check
given: I = 5 | 10 | 40; p = 10 | 30 | 60
answer: I*cos(p*pi/180)
unit: A
tolerance: 0.5%

## Balanced currents of {I} A peak have their space vector {p}° ahead of the rotor's d axis. What's $i_d$?

::: right
Right. $I\cos\phi$ = {answer} A.
:::

::: misses
- [I*sin(p*pi/180)] That's $i_q$.
- [any] Not yet. Project onto the d axis.
:::
:::

::: check
given: I = 5 | 10 | 40; p = 10 | 30 | 60
answer: I*sin(p*pi/180)
unit: A
tolerance: 0.5%

## For the same currents ({I} A peak, {p}° ahead of d), what's $i_q$?

::: right
Right. $I\sin\phi$ = {answer} A.
:::

::: misses
- [I*cos(p*pi/180)] That's $i_d$.
- [any] Not yet. Project onto the q axis, 90° ahead of d.
:::
:::

::: check
given: v = 50 | 200; u = 20 | 150; a = 5 | 30; b = 10 | 40
answer: 1.5*(v*a + u*b)
unit: W
tolerance: 0.5%

## A machine has $v_d$ = {v} V, $v_q$ = {u} V, $i_d$ = {a} A and $i_q$ = {b} A (amplitude-invariant). What power flows?

::: right
Right. $\frac{3}{2}(v_di_d + v_qi_q)$ = {answer} W.
:::

::: misses
- [v*a + u*b] With the amplitude-invariant scaling, power needs a factor 3/2.
- [any] Not yet. Three phases' worth of $v_di_d + v_qi_q$.
:::
:::

::: check
given: a = 3 | 8 | 12; b = -2 | 1.5 | 4; c = -6.5 | -0.5
answer: (a + b + c)/3
unit: A
tolerance: 0.5%

## The phase currents at one instant are {a}, {b} and {c} A. What's the zero-sequence current?

::: right
Right. $(i_a + i_b + i_c)/3$ = {answer} A.
:::

::: misses
- [a + b + c] Divide by three.
- [any] Not yet. The average of the three.
:::
:::

::: check
given: P = 4 | 8 | 10; l = 0.05 | 0.1 | 0.2; q = 5 | 20 | 50
answer: 1.5*P/2*l*q
unit: N·m
tolerance: 0.5%

## A {P}-pole surface PM machine with $\lambda_m$ = {l} Wb carries $i_q$ = {q} A and $i_d$ = 0. What torque?

::: right
Right. $\frac{3}{2}\frac{P}{2}\lambda_mi_q$ = {answer} N·m.
:::

::: misses
- [P/2*l*q] Include the factor 3/2 from the transformation.
- [any] Not yet. $T = \frac{3}{2}\frac{P}{2}(\lambda_di_q - \lambda_qi_d)$.
:::
:::

::: check
given: R = 0.02 | 0.1; q = 10 | 40; w = 500 | 2000; l = 0.05 | 0.15
answer: R*q + w*l
unit: V
tolerance: 0.5%

## A PM machine (R = {R} Ω, $\lambda_m$ = {l} Wb) runs steadily at {w} rad/s electrical with $i_q$ = {q} A and $i_d$ = 0. What's $v_q$?

::: right
Right. $Ri_q + \omega\lambda_m$ = {answer} V.
:::

::: misses
- [any] Not yet. In steady state, $v_q = Ri_q + \omega\lambda_d$.
:::
:::

::: check
kind: parts
given: a = 3 | 8 | -6; b = -9 | 2 | 5

## At one instant $i_a$ = {a} A and $i_b$ = {b} A in a three-wire system.

::: part
answer: a
unit: A
tolerance: 0.5%

### What is $i_\alpha$?

::: misses
- [any] Along phase a's axis.
:::
:::

::: part
answer: (a + 2*b)/sqrt(3)
unit: A
tolerance: 0.5%

### What is $i_\beta$?

::: misses
- [any] $(i_b - i_c)/\sqrt3$ with $i_c = -i_a - i_b$.
:::
:::

::: part
answer: sqrt(a^2 + ((a + 2*b)/sqrt(3))^2)
unit: A
tolerance: 0.5%

### How long is the current space vector?

::: misses
- [any] $\sqrt{i_\alpha^2 + i_\beta^2}$.
:::
:::
:::

::: check
kind: derivation
vars: P = 2..16, m = 0.01..0.5, q = 0.1..200, d = -100..0, x = 0.0001..0.01, y = 0.0001..0.02

## A PM machine with P poles and magnet flux linkage m carries $i_q$ = q and $i_d$ = d, with $L_d$ = x and $L_q$ = y.

::: step
answer: 1.5*P/2*m*q

### What is its magnet torque?
:::

::: step
answer: 1.5*P/2*(x - y)*d*q

### What is its reluctance torque?
:::

::: right
Right. With $L_q > L_d$, negative $i_d$ makes the reluctance torque add to the magnet's.
:::
:::

::: explain
## Why do a synchronous machine's inductances become constant in the dq frame?

::: model
In the stator's own coordinates, a salient rotor's position changes how easily each phase's flux crosses the gap, so every self and mutual inductance between the phases varies with rotor angle, at twice the electrical angle. The d and q axes are fixed to the rotor's geometry: d along the poles, q between them. Seen from axes that turn with the rotor, the magnetic paths never change: flux along d always meets the pole faces and flux along q always meets the interpolar gaps. So the inductances along those axes, $L_d$ and $L_q$, are constants, and the coupling between the axes appears only through the speed-voltage terms $\omega\lambda$, which are exactly what a rotating frame adds.
:::
:::

::: practice

::: check
given: I = 2 | 60; p = 15 | 75
answer: I*cos(p*pi/180)
unit: A
tolerance: 0.5%

## $i_d$: {I} A, {p}° ahead of d?

::: misses
- [any] $I\cos\phi$.
:::
:::

::: check
given: v = 20 | 300; u = 10 | 250; a = 1 | 50; b = 2 | 60
answer: 1.5*(v*a + u*b)
unit: W
tolerance: 0.5%

## Power: $v_d$ = {v}, $v_q$ = {u} V, $i_d$ = {a}, $i_q$ = {b} A?

::: misses
- [any] $1.5(v_di_d + v_qi_q)$.
:::
:::

::: check
given: P = 2 | 12; l = 0.02 | 0.3; q = 2 | 80
answer: 1.5*P/2*l*q
unit: N·m
tolerance: 0.5%

## Torque: {P} poles, $\lambda_m$ = {l} Wb, $i_q$ = {q} A?

::: misses
- [any] $\frac{3}{2}\frac{P}{2}\lambda_mi_q$.
:::
:::
:::
