Skip to content

Interactive explainer

The Park transformation, αβ to dq0

From the stator, a turning machine's currents are three sine waves. Stand on the rotor instead and they are two steady numbers, dd along the rotor's flux and qq a quarter turn ahead. Press play, then ride the rotor, and watch the stator's vector stand still.

From the courses Control of Electrical Machines and Power Electronics (UPC Barcelona), Analysis and Control of Modern Power Electronics Dominated Power Systems (UPC Barcelona) and Electrical Machine Modelling (FTN Novi Sad).

abcNSθdqδ

The pull on the rotor is q, the current across its flux: iq = |i| sin δ = 0.50. Most at δ = 90°, none at 0°.

40°
1.00
+30°

Against time

abcdq00°90°180°270°360°
The values at this moment
a = 0.77b = 0.17c = -0.94
d = 0.87q = 0.500 = 0.00
ωt = 40°θ = 10°δ = 30°

d and q are flat: d = 0.87, q = 0.50.

θ to the d axis, this page's: d = ⅔[a cos θ + b cos(θ − 120°) + c cos(θ + 120°)], q = −⅔[a sin θ + b sin(θ − 120°) + c sin(θ + 120°)].

MathWorks' default matrix, given this same θ, makes d′ = −q = -0.50 and q′ = d = 0.87.

θ is measured to
What the phases carry
0.00
0.00
0.00
0.00
Scaling
A two-pole machine: the stator's phase axes a, b and c, the rotor with d on its magnet's flux and q a quarter turn ahead, and the stator current's space vector with its feet on d and q; beside it, the phases and d, q and 0 against time. Stand on the stator or ride the rotor, set the rotor's speed and how far the vector is ahead of it, and choose which axis θ is measured to.

What it is

The Park transformation takes the vector of the Clarke transformation, α\alpha and β\beta, and writes it in axes that turn: dd (direct) at the angle θ\theta and qq (quadrature) 90∘90^\circ ahead of it. On this page dd lies on phase aa's axis when θ=0\theta = 0 and qq leads dd:

[vdvq]=[cos⁡θsin⁡θ−sin⁡θcos⁡θ][vαvβ],vd+j vq=(vα+j vβ) e−jθ\begin{bmatrix} v_d \\ v_q \end{bmatrix} = \begin{bmatrix} \cos\theta & \sin\theta \\ -\sin\theta & \cos\theta \end{bmatrix}\begin{bmatrix} v_\alpha \\ v_\beta \end{bmatrix}, \qquad v_d + j\,v_q = (v_\alpha + j\,v_\beta)\,e^{-j\theta}
(1)

Where the names come from

The axes were named for a machine. The direct axis lies along the rotor's own field, on the middle of a pole, so a current along it pushes straight on that field and changes its strength. The quadrature axis is a quarter turn of the field ahead, between the poles, so a current along it pulls the field sideways: that current makes the torque. In the figure above, the pull read under the machine is iq=∣i∣sin⁡δi_q = |i|\sin\delta, the most at δ=90∘\delta = 90^\circ and none at 0∘0^\circ. In a machine with pp pole pairs a quarter turn of the field is 90/p90/p degrees of the shaft, so θ\theta is an electrical angle, pp times the shaft's.

The zero sequence passes through unchanged, v0v_0 as Clarke gives it. Clarke here is amplitude-invariant with phase aa a cosine, va=Vcos⁡ωtv_a = V\cos\omega t. Put the two together and abc goes straight to dq0 in one matrix, the form most textbooks print:

[vdvqv0]=23[cos⁡θcos⁡(θ−120∘)cos⁡(θ+120∘)−sin⁡θ−sin⁡(θ−120∘)−sin⁡(θ+120∘)121212][vavbvc]\begin{bmatrix} v_d \\ v_q \\ v_0 \end{bmatrix} = \frac{2}{3}\begin{bmatrix} \cos\theta & \cos(\theta - 120^\circ) & \cos(\theta + 120^\circ) \\ -\sin\theta & -\sin(\theta - 120^\circ) & -\sin(\theta + 120^\circ) \\ \tfrac12 & \tfrac12 & \tfrac12 \end{bmatrix}\begin{bmatrix} v_a \\ v_b \\ v_c \end{bmatrix}
(2)

The way back turns the other way, vα+j vβ=(vd+j vq) ejθv_\alpha + j\,v_\beta = (v_d + j\,v_q)\,e^{j\theta}, and then the inverse Clarke. In one matrix, the inverse Park transformation has no factor in front, and its columns are the cosines, minus the sines and ones:

[vavbvc]=[cos⁡θ−sin⁡θ1cos⁡(θ−120∘)−sin⁡(θ−120∘)1cos⁡(θ+120∘)−sin⁡(θ+120∘)1][vdvqv0]\begin{bmatrix} v_a \\ v_b \\ v_c \end{bmatrix} = \begin{bmatrix} \cos\theta & -\sin\theta & 1 \\ \cos(\theta - 120^\circ) & -\sin(\theta - 120^\circ) & 1 \\ \cos(\theta + 120^\circ) & -\sin(\theta + 120^\circ) & 1 \end{bmatrix}\begin{bmatrix} v_d \\ v_q \\ v_0 \end{bmatrix}
(3)

Each phase gets back its share of dd along its own axis, its share of qq, and the whole zero sequence. Multiply (2) by (3) in either order and you get the identity, whatever θ\theta is.

Why d and q are flat

A balanced set's vector is vα+j vβ=Vej(ωt+φ)v_\alpha + j\,v_\beta = V e^{j(\omega t + \varphi)}, a constant length turning at ω\omega. Turn the frame at the same speed, θ=ωt+θ0\theta = \omega t + \theta_0, and (1) gives vd+j vq=Vej(φ−θ0)v_d + j\,v_q = V e^{j(\varphi - \theta_0)}: no time in it at all. Two sine waves at 50 Hz have become two numbers, which a PI controller can hold with no error, as it can't hold a sine wave. If the frame's angle matches the vector's, θ0=φ\theta_0 = \varphi, then vd=Vv_d = V and vq=0v_q = 0: that is what a phase-locked loop is for.

In general θ=k ωt+θ0\theta = k\,\omega t + \theta_0. With k=0k = 0 the frame stands still and dd and qq are just α\alpha and β\beta: Clarke is Park standing still. With k=1k = 1 it is the synchronous frame. Anything else leaves the vector turning in the frame at (1−k) ω(1 - k)\,\omega, which a frame nearly right shows as a slow ripple, one turn every 1/∣1−k∣1/|1 - k| periods.

Ten periods of a 50 Hz grid: the phases, then α and β, then d and q in a frame turning at the speed you set. At 0 the last row is the second; at 1 it is two flat lines; at 0.90 the vector turns once in the frame every 200 ms.

The other conventions

Every source agrees that qq is a quarter turn ahead of dd (all but one row below). What they disagree on is the axis θ\theta is measured to. Measured to dd, as here, a cosine set gives its whole amplitude on dd. Measured to qq, as in Krause's machine textbook and so in MathWorks' default block, the same set lands on qq. For the same rotor the two give the same dd and qq; the trouble starts when a matrix from one source meets an angle from another.

Amplitude-invariant (23\tfrac23 in front of the one-matrix form) unless the row says otherwise. A cosine set is va=Vcos⁡ωtv_a = V\cos\omega t with θ=ωt\theta = \omega t.
Who writes itd row, q row (on α, β)θ is the angle ofA cosine set givesFrom this page's
This page; TI's application note on the C2xx; Microchip's Park page; MathWorks' block set to D-axis; S. Blair's dq0 tool, “classic”cos⁡,sin⁡\cos, \sin; −sin⁡,cos⁡-\sin, \cosdd; qq 90∘90^\circ aheadd=Vd = V, q=0q = 0the same
MathWorks' Park Transform block by default (Q-axis), which credits Krause; the qd0 of my UPC coursesin⁡,−cos⁡\sin, -\cos; cos⁡,sin⁡\cos, \sinqq; dd 90∘90^\circ behindd=0d = 0, q=Vq = Vthis page's at θ−90∘\theta - 90^\circ; at the same θ\theta, d′=−qd' = -q, q′=dq' = d
The same matrix with the phases written as sines, va=Vsin⁡ωtv_a = V\sin\omega t: the older SimPowerSystems block; Blair's “MATLAB”sin⁡,−cos⁡\sin, -\cos; cos⁡,sin⁡\cos, \sinqqa sine set: d=Vd = V, q=0q = 0a sine set is a cosine set 90∘90^\circ late, which undoes the row above
qq behind dd: Blair's “Wikipedia” optioncos⁡,sin⁡\cos, \sin; sin⁡,−cos⁡\sin, -\cosdd; qq 90∘90^\circ behindd=Vd = V, q=0q = 0q′=−qq' = -q
Power-invariant: the first form in Wikipedia's article; one of the two variants in my FTN courseas its row, times 3/2\sqrt{3/2}as its row3/2 V\sqrt{3/2}\,V in place of VVp=vdid+vqiq+v0i0p = v_d i_d + v_q i_q + v_0 i_0, no 3/23/2

The map between the two main forms is one equation. Write TdT_d for this page's matrix (2) and TqT_q for the one with θ\theta to the qq axis:

Tq(θ)=Td(θ−90∘),so at the same θ:d′=−q,q′=dT_q(\theta) = T_d(\theta - 90^\circ), \qquad \text{so at the same } \theta:\quad d' = -q, \quad q' = d
(4)

Both exist for a reason. A machine engineer puts dd on the rotor's flux, and the voltage that flux induces in the stator is a quarter turn ahead of it, on qq: with θ\theta measured to qq, the stator's cosine voltage comes out as vq=Vv_q = V. A converter engineer locks dd to the grid's voltage with a PLL, and finds it on dd. Example B below works one case both ways. Flip the switch "θ is measured to" on the figure above: nothing in the machine moves, and θ\theta reads 90∘90^\circ more.

Unbalance and harmonics in dq

Each part of the αβ vector turns at its own speed, mωm\omega, forward for m>0m > 0 and backward for m<0m < 0. Seen from a frame turning at kωk\omega it turns at (m−k) ω(m - k)\,\omega, so in the synchronous frame:

A balanced non-linear load's harmonic nn is positive sequence for n=7,13,19,…n = 7, 13, 19, \ldots, negative for n=5,11,17,…n = 5, 11, 17, \ldots and zero for n=3,9,…n = 3, 9, \ldots
What the phases carrySequenceIn αβ, turning atIn dq, synchronous frame
The fundamentalpositive+ω+\omegaflat
An unbalancenegative−ω-\omegaa ripple at 2ω2\omega, turning backward
The 5th harmonicnegative−5ω-5\omegaa ripple at 6ω6\omega, backward
The 7th harmonicpositive+7ω+7\omegaa ripple at 6ω6\omega, forward
The 11th harmonicnegative−11ω-11\omegaa ripple at 12ω12\omega, backward
The 13th harmonicpositive+13ω+13\omegaa ripple at 12ω12\omega, forward
The 3rd harmoniczeronot in αβonly in v0v_0

So a six-pulse rectifier's 5th and 7th both land at 6ω6\omega in dq, and its 11th and 13th at 12ω12\omega, which is why a converter controller fighting them uses resonant terms at 6ω6\omega and 12ω12\omega in the synchronous frame. An unbalance at 2ω2\omega is what a plain synchronous-frame PLL can't filter well. Turn it round and a harmonic is found the same way: in a frame turning with the 5th, at −5ω-5\omega, the 5th is flat and everything else ripples, which is how a compensator measures one harmonic at a time.

A fundamental of 1 and one part of 0.2. From the synchronous frame the fundamental is the still point and the part draws a circle round it, at the speed and in the direction the table gives; from the part's own frame the part is still and the fundamental circles it.

Power in dq

With the amplitude-invariant form, instantaneous active and reactive power are

p=32 (vdid+vqiq)+3 v0i0,q=32 (vqid−vdiq)p = \tfrac32\,(v_d i_d + v_q i_q) + 3\,v_0 i_0, \qquad q = \tfrac32\,(v_q i_d - v_d i_q)
(5)

the same numbers as vaia+vbib+vcicv_a i_a + v_b i_b + v_c i_c and [(vb−vc)ia+(vc−va)ib+(va−vb)ic]/3[(v_b - v_c)i_a + (v_c - v_a)i_b + (v_a - v_b)i_c]/\sqrt3 at every instant. Lock the frame to the grid's voltage, so vq=0v_q = 0, and the two powers part: P=32vdidP = \tfrac32 v_d i_d and Q=−32vdiqQ = -\tfrac32 v_d i_q. A converter asked for P∗P^* and Q∗Q^* sets id∗=2P∗/(3vd)i_d^* = 2P^*/(3v_d) and iq∗=−2Q∗/(3vd)i_q^* = -2Q^*/(3v_d). A current that lags the voltage has a negative iqi_q and a positive QQ. In a permanent-magnet machine, with dd on the magnet, the torque is 32 p ψmiq\tfrac32\,p\,\psi_m i_q, and a salient rotor adds 32 p (Ld−Lq) idiq\tfrac32\,p\,(L_d - L_q)\,i_d i_q.

The voltage on d, of length 1, and a current you set by its d and q parts. The current on d moves only P; the current on q moves only Q.

The cross-coupling, and the feed-forward that cancels it

Turning frames cost something. Write a current as iα+j iβ=(id+j iq) ejθi_\alpha + j\,i_\beta = (i_d + j\,i_q)\,e^{j\theta} and differentiate: ddt(iα+j iβ)=(ddt(id+j iq)+jω (id+j iq)) ejθ\tfrac{d}{dt}(i_\alpha + j\,i_\beta) = \big(\tfrac{d}{dt}(i_d + j\,i_q) + j\omega\,(i_d + j\,i_q)\big)\,e^{j\theta}. The extra jωj\omega is the frame's own turning. For an inductor LL with resistance RR between a converter's voltage vtv_t and the grid's vgv_g, it gives

vtd−vgd=Ldiddt+R id−ωL iqvtq−vgq=Ldiqdt+R iq+ωL id\begin{aligned} v_{td} - v_{gd} &= L\frac{di_d}{dt} + R\,i_d - \omega L\,i_q \\ v_{tq} - v_{gq} &= L\frac{di_q}{dt} + R\,i_q + \omega L\,i_d \end{aligned}
(6)

Each axis feels the other through ωL\omega L: a step in idi_d pushes on the qq equation. A current controller cancels both terms and the grid's voltage before they reach the inductor. With udu_d and uqu_q the outputs of two PI controllers,

vtd=ud+vgd−ωL iq,vtq=uq+vgq+ωL idv_{td} = u_d + v_{gd} - \omega L\,i_q, \qquad v_{tq} = u_q + v_{gq} + \omega L\,i_d
(7)

and what is left on each axis is 1/(Ls+R)1/(Ls + R). A PI with Kp=L/τK_p = L/\tau and Ki=R/τK_i = R/\tau cancels that pole, so each current follows its reference as a first-order lag with time constant τ\tau, and the two axes are two separate loops. Leave the feed-forward out and the loops still settle, but slower and with each one kicking the other.

A 100 A step in the d current's reference, with the q current's held at 0, in an L filter of 0.5 mH and 0.1 Ω at 50 Hz and τ = 10 ms. Switch the feed-forward off and raise ωL/R to see the q current pushed further.

Amplitude-invariant and power-invariant

Park is a rotation, so it keeps lengths: the scaling is Clarke's. Amplitude-invariant, a balanced set of amplitude VV gives ∣vdq∣=V|v_{dq}| = V and power carries the 32\tfrac32 of (5). The reason is in the matrix: for (2), T TT=diag(23,23,13)T\,T^{\mathsf T} = \mathrm{diag}(\tfrac23, \tfrac23, \tfrac13), so it isn't orthogonal, and p=vTip = v^{\mathsf T} i in abc becomes 32\tfrac32 on dd and qq and 33 on 00. Power-invariant, with 2/3\sqrt{2/3} in front of (2) and 1/21/\sqrt2 in its last row, the matrix is orthogonal, its inverse is its transpose, ∣vdq∣=3/2 V|v_{dq}| = \sqrt{3/2}\,V and p=vdid+vqiq+v0i0p = v_d i_d + v_q i_q + v_0 i_0.

Where it comes from

Clarke, then a turn about the zero axis

Clarke takes the point (a,b,c)(a, b, c) into axes α\alpha, β\beta and 00; α\alpha and β\beta lie in the plane a+b+c=0a + b + c = 0 and 00 runs along (1,1,1)(1, 1, 1), square to it. Park then turns α\alpha and β\beta by θ\theta inside that plane and leaves 00 where it is. The turn is about the zero axis, so the one-matrix form (2) is the turn times Clarke:

[vdvqv0]=[cos⁡θsin⁡θ0−sin⁡θcos⁡θ0001]⏟the turn23[1−12−12032−32121212]⏟Clarke[vavbvc]\begin{bmatrix} v_d \\ v_q \\ v_0 \end{bmatrix} = \underbrace{\begin{bmatrix} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{bmatrix}}_{\text{the turn}} \underbrace{\frac23\begin{bmatrix} 1 & -\tfrac12 & -\tfrac12 \\ 0 & \tfrac{\sqrt3}{2} & -\tfrac{\sqrt3}{2} \\ \tfrac12 & \tfrac12 & \tfrac12 \end{bmatrix}}_{\text{Clarke}} \begin{bmatrix} v_a \\ v_b \\ v_c \end{bmatrix}
(8)

Multiply it out and the first row is 23[cos⁡θ, cos⁡(θ−120∘), cos⁡(θ+120∘)]\tfrac23[\cos\theta,\ \cos(\theta - 120^\circ),\ \cos(\theta + 120^\circ)], by cos⁡θ⋅(−12)+sin⁡θ⋅32=cos⁡(θ−120∘)\cos\theta\cdot(-\tfrac12) + \sin\theta\cdot\tfrac{\sqrt3}{2} = \cos(\theta - 120^\circ). The figure below is the Clarke page's abc space with the frame drawn in it.

The cube of ±1 in abc space, the plane a + b + c = 0, and in it d and q, which the angle θ turns about the zero axis without ever leaving the plane. The point is a balanced set at ωt = 40°. Look down the diagonal and the frame turns like the hands of a clock.

The same matrix read as projections

Draw the three phase axes in the plane, 120∘120^\circ apart, and the dd axis at θ\theta from phase aa's. The angle from dd to phase bb's axis is θ−120∘\theta - 120^\circ and to phase cc's θ+120∘\theta + 120^\circ. So each entry of the dd row of (2) is the cosine of the angle between the dd axis and one phase's axis, times 23\tfrac23: vdv_d is the three phases projected onto dd and added. The qq row does the same for an axis 90∘90^\circ further on, and cos⁡(θ+90∘−φ)=−sin⁡(θ−φ)\cos(\theta + 90^\circ - \varphi) = -\sin(\theta - \varphi) is where its minus signs come from. Read this way the matrix needs no Clarke in between: it is three projections onto each of two turning axes.

What Park made it for

In 1929 Park was after a synchronous machine whose rotor isn't round. Its stator windings see a gap that is narrow over a pole and wide between poles, so each winding's inductance swings with twice the rotor's angle:

Laa=Lls+LA+LBcos⁡2θ,Lab=−12LA+LBcos⁡(2θ−120∘),…L_{aa} = L_{ls} + L_A + L_B\cos 2\theta, \qquad L_{ab} = -\tfrac12 L_A + L_B\cos(2\theta - 120^\circ), \quad \ldots
(9)

and the machine's equations are a set whose coefficients change at every instant. Turn them into dq with (2) and its inverse (3), T Labc(θ) T−1T\,L_{abc}(\theta)\,T^{-1}, and every θ\theta cancels: what is left is three constants, Ld=Lls+32(LA+LB)L_d = L_{ls} + \tfrac32(L_A + L_B), Lq=Lls+32(LA−LB)L_q = L_{ls} + \tfrac32(L_A - L_B) and L0=LlsL_0 = L_{ls}. Two windings that sit on the rotor, one along its poles and one between them, behave as the three real ones do. That is the whole idea: choose the frame in which the machine stands still, and its equations stop depending on where it is.

The price of a turning frame

The constants come with one new term. A flux written in the turning frame changes even when ψd\psi_d and ψq\psi_q don't, because the frame carries it round: ddt\tfrac{d}{dt} of a vector written as (ψd+j ψq)ejθ(\psi_d + j\,\psi_q)e^{j\theta} brings jω(ψd+j ψq)j\omega(\psi_d + j\,\psi_q). In a machine it is the speed voltage, ωψ\omega\psi, which is how the magnet's flux on dd induces a voltage on qq; in a filter it is the ωL\omega L coupling of (6), which the feed-forward (7) cancels.

Try this

  1. Leave the phases clean and the rotor turning with the vector, press play from Stand on the stator, then press Ride the rotor. From the stator the rotor and the vector turn together, and dd and qq are two flat lines while the phases are three sine waves. Then the picture turns round you in a second: the rotor stands still with dd to the right, the stator's a, b and c turn backward, and the vector stands still at δ\delta.
  2. Move δ\delta, the vector ahead of the rotor, to 90°, then to 0°. At 90° all of it is on qq, d=0d = 0, q=1q = 1, and the pull on the rotor is at its most. At 0° all of it is on dd and there is no pull: a current along the field doesn't turn it.
  3. Set the rotor speed to 0.90. The rotor falls behind a little every turn, so in the machine the vector creeps round it at 0.1ω0.1\omega, once every ten periods. Over the one period drawn, dd and qq slope; the figure under Why d and q are flat shows the whole slow sine.
  4. Back at speed 1, switch θ is measured to from d to q; then open What the phases carry and add an unbalance. The switch moves nothing in the machine and dd and qq keep their values: the arc θ\theta runs to the qq axis and reads 90∘90^\circ more, and the matrix under the figure is the other convention's. The unbalance draws a loop round the steady point at 2ω2\omega, twice a period; the 3rd harmonic would leave dd and qq alone and show only in 00.

Worked examples

The same 400 V network as on the Clarke page: a phase peak of V=325V = 325 V, and at ωt=30∘\omega t = 30^\circ Clarke gives vα=281.46v_\alpha = 281.46 V and vβ=162.50v_\beta = 162.50 V. A frame that turns with the vector is at θ=30∘\theta = 30^\circ, so

vd=281.46cos⁡30∘+162.50sin⁡30∘=325.00 Vvq=−281.46sin⁡30∘+162.50cos⁡30∘=0.00 V\begin{aligned} v_d &= 281.46\cos 30^\circ + 162.50\sin 30^\circ = 325.00\ \text{V} \\ v_q &= -281.46\sin 30^\circ + 162.50\cos 30^\circ = 0.00\ \text{V} \end{aligned}

and so at every other instant: the whole voltage is on dd. Now let the frame lag by 20∘20^\circ, θ=ωt−20∘\theta = \omega t - 20^\circ, so θ=10∘\theta = 10^\circ here:

vd=281.46cos⁡10∘+162.50sin⁡10∘=305.40 V=325cos⁡20∘vq=−281.46sin⁡10∘+162.50cos⁡10∘=111.16 V=325sin⁡20∘\begin{aligned} v_d &= 281.46\cos 10^\circ + 162.50\sin 10^\circ = 305.40\ \text{V} = 325\cos 20^\circ \\ v_q &= -281.46\sin 10^\circ + 162.50\cos 10^\circ = 111.16\ \text{V} = 325\sin 20^\circ \end{aligned}

Still flat, but qq is no longer zero: arctan⁡(vq/vd)=20∘\arctan(v_q/v_d) = 20^\circ is exactly how far the frame is behind. Last, give the phases a 5th harmonic of 5 %, 16.25 V peak. In αβ it turns backward at 5ω5\omega; in the frame, at −6ω-6\omega, so

vd=325+16.25cos⁡6ωt V,vq=−16.25sin⁡6ωt Vv_d = 325 + 16.25\cos 6\omega t\ \text{V}, \qquad v_q = -16.25\sin 6\omega t\ \text{V}

a ripple of ±5 % at 300 Hz on a 50 Hz grid, around the same flat values.

One grid, both conventions

In my master's coursework at UPC, a 400 V grid fed a Park block whose angle could be shifted π/6\pi/6 ahead of the grid's. The phase peak is 4002/3=326.60400\sqrt2/\sqrt3 = 326.60 V. With the frame 30∘30^\circ ahead of the vector, this page's form (1) gives

vd+j vq=326.60 e−j30∘⇒vd=282.84 V,vq=−163.30 Vv_d + j\,v_q = 326.60\,e^{-j30^\circ} \quad\Rightarrow\quad v_d = 282.84\ \text{V}, \quad v_q = -163.30\ \text{V}

The course's own matrix measures θ\theta to qq (the second row of the table). On the same numbers and the same θ\theta it gives vq=282.84v_q = 282.84 V and vd=163.30v_d = 163.30 V: equation (4), q′=dq' = d and d′=−qd' = -q, in numbers. Neither is wrong; a reader comparing the two scopes has to know which matrix drew each.

A grid converter's set-points and its current loop

A converter on a grid of vd=150v_d = 150 kV peak, vq=0v_q = 0, is asked for P∗=100P^* = 100 MW and Q∗=20Q^* = 20 Mvar. From (5):

id∗=2P∗3vd=444.4 A,iq∗=−2Q∗3vd=−88.9 A,∣i∣=453.2 A peaki_d^* = \frac{2P^*}{3v_d} = 444.4\ \text{A}, \qquad i_q^* = -\frac{2Q^*}{3v_d} = -88.9\ \text{A}, \qquad |i| = 453.2\ \text{A peak}

Its filter is L=0.5L = 0.5 mH with R=0.1 ΩR = 0.1\ \Omega, and the loop is asked for τ=10\tau = 10 ms: Kp=L/τ=0.050 ΩK_p = L/\tau = 0.050\ \Omega and Ki=R/τ=10.0 Ω/sK_i = R/\tau = 10.0\ \Omega/\text{s}. At 50 Hz, ωL=0.157 Ω\omega L = 0.157\ \Omega, so 100 A on one axis puts 15.71 V on the other. With the feed-forward (7), a 100 A step in id∗i_d^* gives id=100(1−e−t/τ)i_d = 100(1 - e^{-t/\tau}), within 1 A of its reference after 46 ms, and iqi_q never leaves 0. Without it, iqi_q swings to −36.1-36.1 A at 22.7 ms, idi_d overshoots to 110.6 A, and iqi_q is back within 1 A for good only after 150 ms. The cross-coupling figure above runs the same loop.

A permanent-magnet motor's torque from iqi_q

A motor with 4 pole pairs and a magnet flux of ψm=0.1\psi_m = 0.1 Wb, run with id=0i_d = 0 and iq=10i_q = 10 A:

T=32 p ψm iq=32⋅4⋅0.1⋅10=6.0 N⋅mT = \tfrac32\,p\,\psi_m\,i_q = \tfrac32 \cdot 4 \cdot 0.1 \cdot 10 = 6.0\ \text{N·m}

At 1,500 rpm the shaft turns at 157.1 rad/s and the frame at 4 times that, ω=628.3\omega = 628.3 rad/s (100 Hz). The magnet, on dd, induces ωψm=62.8\omega\psi_m = 62.8 V on qq, and the electrical power is 32⋅62.8⋅10=942\tfrac32 \cdot 62.8 \cdot 10 = 942 W, the same as torque times the shaft's speed, 6.0 × 157.1. Feed the controller the shaft's angle in place of the electrical one and the frame turns at a quarter of the field's speed: dd and qq ripple at 3ωshaft3\omega_{\text{shaft}} and the torque with them.

Mistakes people make

  1. The mistake

    Taking θ=atan2⁡(vβ,vα)\theta = \operatorname{atan2}(v_\beta, v_\alpha), the vector's own angle.

    Why it's wrong

    Then qq is zero and dd is the vector's length at every instant, whatever the phases carry: an unbalance or a harmonic disappears into dd, and nothing is left for a controller to act on.

    The right one

    Take θ\theta from outside the signal: a rotor's encoder, or a phase-locked loop that turns the frame at the grid's own steady speed.

  2. The mistake

    Feeding MathWorks' default Park block, or a textbook's qd0, with θ=ωt\theta = \omega t of a cosine set and expecting d=Vd = V.

    Why it's wrong

    That matrix measures θ\theta to the qq axis, so a cosine set gives d=0d = 0 and q=Vq = V.

    The right one

    Set the block to its D-axis option, or feed it θ−90∘\theta - 90^\circ; or keep it, and read qq where this page reads dd.

  3. The mistake

    Writing the phases as sines, va=Vsin⁡ωtv_a = V\sin\omega t, and using a matrix made for cosines.

    Why it's wrong

    A sine set is a cosine set 90∘90^\circ late, so this page's matrix gives d=0d = 0 and q=−Vq = -V where (V,0)(V, 0) was meant.

    The right one

    Match the phases to the matrix: cosines with (2), or sines with the qq-axis form, whose rows are sin⁡\sin and cos⁡\cos.

  4. The mistake

    P=vdid+vqiqP = v_d i_d + v_q i_q with the amplitude-invariant form.

    Why it's wrong

    That form shrinks power: T TTT\,T^{\mathsf T} is 23\tfrac23 on dd and qq, so the sum is two thirds of the true power.

    The right one

    P=32(vdid+vqiq)P = \tfrac32(v_d i_d + v_q i_q) with the 23\tfrac23 form; no 32\tfrac32 with the power-invariant one. The 32\tfrac32 belongs to the scaling, not to Park.

  5. The mistake

    Q=32vdiqQ = \tfrac32 v_d i_q, with the sign of a source that puts the voltage on qq.

    Why it's wrong

    With the voltage on dd and qq ahead of dd, a lagging current has a negative iqi_q; the reactive power it draws is positive only with the minus sign.

    The right one

    Q=−32vdiqQ = -\tfrac32 v_d i_q with the voltage on dd; Q=32vqidQ = \tfrac32 v_q i_d in a source that puts it on qq. Check with a current 30° behind the voltage: QQ must come out positive.

  6. The mistake

    Using the shaft's angle for θ\theta in a machine with more than one pole pair.

    Why it's wrong

    The field turns pp times for each turn of the shaft, so a frame at the shaft's angle falls behind and dd and qq ripple at (p−1)(p - 1) times the shaft's speed.

    The right one

    θ=p θshaft\theta = p\,\theta_{\text{shaft}}, the electrical angle, offset so that dd sits on a north pole.

The same in Python

import numpy as np

def dq0(a, b, c, theta):                     # amplitude-invariant, d on phase a's axis at θ = 0
    s = np.radians(120)
    d = 2 / 3 * (a * np.cos(theta) + b * np.cos(theta - s) + c * np.cos(theta + s))
    q = -2 / 3 * (a * np.sin(theta) + b * np.sin(theta - s) + c * np.sin(theta + s))
    return d, q, (a + b + c) / 3

V, wt = 325.0, np.radians(30)
ph = np.radians([0, -120, 120])
a, b, c = V * np.cos(wt + ph)                              # phase a is a cosine
print(np.round(dq0(a, b, c, wt), 2) + 0)                   # the frame turns with the vector
print(np.round(dq0(a, b, c, wt - np.radians(20)), 2) + 0)  # the frame 20° behind
print(np.round(dq0(a, b, c, wt - np.radians(90)), 2) + 0)  # θ to q (MathWorks' default) is ours at θ − 90°

ia, ib, ic = 10 * np.cos(wt - np.radians(30) + ph)         # 10 A, 30° behind the voltage
(vd, vq, _), (id_, iq, _) = dq0(a, b, c, wt), dq0(ia, ib, ic, wt)
print(np.round([1.5 * (vd * id_ + vq * iq), a * ia + b * ib + c * ic, 1.5 * (vq * id_ - vd * iq)], 1) + 0)

t = np.linspace(0, 2 * np.pi, 3600, endpoint=False)
a, b, c = (np.cos(t + k) + 0.05 * np.cos(5 * (t + k)) for k in ph)
d, q, z = dq0(a, b, c, t)                                  # a 5 % 5th harmonic
print(np.round([d.min(), d.max(), q.min(), q.max()], 3) + 0)
print(np.argmax(np.abs(np.fft.rfft(d))[1:]) + 1)           # d's ripple, in multiples of ω

It prints:

[325.   0.   0.]
[305.4  111.16   0.  ]
[  0. 325.   0.]
[4221.9 4221.9 2437.5]
[ 0.95  1.05 -0.05  0.05]
6

The worked example's numbers; the same set read with θ measured to q, all of it on q; P from d and q equal to the three-phase sum, and a lagging current's Q positive; and a 5 % 5th harmonic as a ±0.05 ripple on d and q at six times the grid's frequency.

Questions people ask

What is the difference between the Clarke and the Park transformation?

Clarke turns three phases into two axes that stand still, α\alpha and β\beta, plus the zero sequence; a balanced set is still a pair of sine waves there. Park turns those two axes by θ\theta, so a frame that turns with the vector sees two constants. Clarke is Park with θ=0\theta = 0.

Is dq0 the same as the Park transformation?

Yes: dq0 names the result, dd, qq and the zero sequence, and the Park transformation is the matrix that makes it. Some sources write qd0, which often also means θ\theta is measured to the qq axis; see the table of conventions.

Why are the axes called direct and quadrature?

Because of the machine they were made for: the direct axis lies along the rotor's field, on a pole, and the quadrature axis a quarter turn of the field away, between the poles. A current on dd strengthens or weakens the field; a current on qq pulls on it and makes the torque.

What are the d and q axes in a PMSM, and why is idi_d held at zero?

In a permanent-magnet synchronous motor dd is on the magnet's north pole and qq a quarter turn ahead, in electrical degrees. Torque is 32p ψmiq\tfrac32 p\,\psi_m i_q when the rotor is round, so iqi_q alone makes it; any idi_d only adds current and heat. Above base speed, or with a salient rotor, a negative idi_d is used on purpose: it weakens the field, or adds the reluctance torque 32p (Ld−Lq) idiq\tfrac32 p\,(L_d - L_q)\,i_d i_q.

What is the inverse Park transformation?

The turn back by θ\theta: vα+j vβ=(vd+j vq) ejθv_\alpha + j\,v_\beta = (v_d + j\,v_q)\,e^{j\theta}, then the inverse Clarke. In one matrix it is (3) above, columns cos⁡\cos, −sin⁡-\sin and 1 for each phase, with no factor in front.

Is the Park transformation power-invariant?

The turn is, since a rotation keeps lengths; the scaling decides the rest. With 23\tfrac23 in front, the common form, it keeps amplitudes and power needs a 32\tfrac32. With 2/3\sqrt{2/3} in front and 1/21/\sqrt2 in the zero row it is orthogonal and keeps power, p=vdid+vqiq+v0i0p = v_d i_d + v_q i_q + v_0 i_0.

MathWorks' Park Transform block measures θ\theta to the qq axis by default, as Krause's textbook does. Fed with the angle of a cosine set it puts the whole amplitude on qq. Choose its D-axis alignment, or subtract 90∘90^\circ from the angle you feed it, and you get d=Vd = V, q=0q = 0 as on this page.

Where does the angle θ come from?

From outside the signal being transformed. In a motor drive it is the rotor's electrical angle, from an encoder or resolver, or an observer that estimates it. In a grid converter it is a phase-locked loop, which turns the frame until vq=0v_q = 0. Taking it from the same vector you transform makes qq zero by definition and hides everything you wanted to see.

Where it's used

Everywhere a three-phase machine or converter is controlled with PI controllers. Field-oriented control of a permanent-magnet motor puts dd on the rotor's magnet, so iqi_q sets the torque and idi_d the field, both flat at a steady speed. A grid-connected inverter puts dd on the grid voltage with a phase-locked loop, so idi_d sets the active power and iqi_q the reactive power, P=32vdidP = \tfrac32 v_d i_d and Q=−32vdiqQ = -\tfrac32 v_d i_q with vq=0v_q = 0. Synchronous machine models (Park's own 1929 paper) are written in dq because the inductances that change with the rotor's angle become constants there. Active filters and harmonic compensators find a harmonic as a ripple at a known frequency in a frame turning at the right speed.

In steady state the same two axes are the two reactions of a salient-pole generator's phasor diagram: a solved problem from my FTN machines course, in Serbian, splits the current into IdI_d and IqI_q along the rotor's axes to find the EMF and the load angle. Park's 1929 paper took that two-reaction method from the steady state to every instant.

It belongs to three of my courses; their materials are linked below. In Analysis and Control of Modern Power Electronics Dominated Power Systems, the folder Activity 0 is my own report on controlling a voltage source converter with the Clarke and Park transformations, written in this page's convention; the folder Weeks 2 to 4 holds the class's Simulink models, from "Model1_Clarke_Park.slx", a 400 V grid with a switch between Park and Clarke (Clarke is Park standing still), to "Model3_CurrentLoop.slx", the current loop in dq, which asks you to disconnect its decoupling and watch; and the folder Course site holds "Parkdemo.mlx", the matrix, its inverse and the ωL\omega L terms worked symbolically with θ\theta measured to qq (the table).

In Serbian, Electrical Machine Modelling builds the machine's model in dd and qq in the folder Lectures, "1 - Slajdovi sa predavanja.pdf", pages 94 to 111: Park's transformation as Clarke's joined with a rotation, dd and qq as windings on the rotor that make the same field, and frames fixed to the rotor, to the stator or turning in step with the field, each with the voltages it adds. Control of Electrical Machines and Power Electronics controls a DC motor's speed and torque on a TI LaunchPad, and that is the point of all this: field-oriented control makes an AC machine's qq axis behave like that motor's armature, its torque set by one current.

Further reading

References

  • R. H. Park, “Two-Reaction Theory of Synchronous Machines, Generalized Method of Analysis, Part I”, Transactions of the AIEE, 48(3), 1929
  • P. C. Krause, O. Wasynczuk, S. D. Sudhoff, S. Pekarek, Analysis of Electric Machinery and Drive Systems, 3rd ed., Wiley-IEEE Press, 2013
  • R. Teodorescu, M. Liserre, P. Rodríguez, Grid Converters for Photovoltaic and Wind Power Systems, Wiley-IEEE Press, 2011
  • A. Yazdani, R. Iravani, Voltage-Sourced Converters in Power Systems, Wiley-IEEE Press, 2010
  • C. J. O'Rourke, M. M. Qasim, M. R. Overlin, J. L. Kirtley, “A Geometric Interpretation of Reference Frames and Transformations: dq0, Clarke, and Park”, IEEE Transactions on Energy Conversion, 34(4), 2070–2083, 2019
  • Texas Instruments, “Clarke & Park Transforms on the TMS320C2xx”, application report BPRA048, 1997