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, along the rotor's flux and 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).
The pull on the rotor is q, the current across its flux: iq = |i| sin δ = 0.50. Most at δ = 90°, none at 0°.
Against time
| a = 0.77 | b = 0.17 | c = -0.94 |
| d = 0.87 | q = 0.50 | 0 = 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.
What the phases carry
What it is
The Park transformation takes the vector of the Clarke transformation, and , and writes it in axes that turn: (direct) at the angle and (quadrature) ahead of it. On this page lies on phase 's axis when and leads :
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 , the most at and none at . In a machine with pole pairs a quarter turn of the field is degrees of the shaft, so is an electrical angle, times the shaft's.
The zero sequence passes through unchanged, as Clarke gives it. Clarke here is amplitude-invariant with phase a cosine, . Put the two together and abc goes straight to dq0 in one matrix, the form most textbooks print:
The way back turns the other way, , 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:
Each phase gets back its share of along its own axis, its share of , and the whole zero sequence. Multiply (2) by (3) in either order and you get the identity, whatever is.
Why d and q are flat
A balanced set's vector is , a constant length turning at . Turn the frame at the same speed, , and (1) gives : 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, , then and : that is what a phase-locked loop is for.
In general . With the frame stands still and and are just and : Clarke is Park standing still. With it is the synchronous frame. Anything else leaves the vector turning in the frame at , which a frame nearly right shows as a slow ripple, one turn every periods.
The other conventions
Every source agrees that is a quarter turn ahead of (all but one row below). What they disagree on is the axis is measured to. Measured to , as here, a cosine set gives its whole amplitude on . Measured to , as in Krause's machine textbook and so in MathWorks' default block, the same set lands on . For the same rotor the two give the same and ; the trouble starts when a matrix from one source meets an angle from another.
| Who writes it | d row, q row (on α, β) | θ is the angle of | A cosine set gives | From 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” | ; | ; ahead | , | the same |
| MathWorks' Park Transform block by default (Q-axis), which credits Krause; the qd0 of my UPC course | ; | ; behind | , | this page's at ; at the same , , |
| The same matrix with the phases written as sines, : the older SimPowerSystems block; Blair's “MATLAB” | ; | a sine set: , | a sine set is a cosine set late, which undoes the row above | |
| behind : Blair's “Wikipedia” option | ; | ; behind | , | |
| Power-invariant: the first form in Wikipedia's article; one of the two variants in my FTN course | as its row, times | as its row | in place of | , no |
The map between the two main forms is one equation. Write for this page's matrix (2) and for the one with to the axis:
Both exist for a reason. A machine engineer puts on the rotor's flux, and the voltage that flux induces in the stator is a quarter turn ahead of it, on : with measured to , the stator's cosine voltage comes out as . A converter engineer locks to the grid's voltage with a PLL, and finds it on . Example B below works one case both ways. Flip the switch "θ is measured to" on the figure above: nothing in the machine moves, and reads more.
Unbalance and harmonics in dq
Each part of the αβ vector turns at its own speed, , forward for and backward for . Seen from a frame turning at it turns at , so in the synchronous frame:
| What the phases carry | Sequence | In αβ, turning at | In dq, synchronous frame |
|---|---|---|---|
| The fundamental | positive | flat | |
| An unbalance | negative | a ripple at , turning backward | |
| The 5th harmonic | negative | a ripple at , backward | |
| The 7th harmonic | positive | a ripple at , forward | |
| The 11th harmonic | negative | a ripple at , backward | |
| The 13th harmonic | positive | a ripple at , forward | |
| The 3rd harmonic | zero | not in αβ | only in |
So a six-pulse rectifier's 5th and 7th both land at in dq, and its 11th and 13th at , which is why a converter controller fighting them uses resonant terms at and in the synchronous frame. An unbalance at 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 , the 5th is flat and everything else ripples, which is how a compensator measures one harmonic at a time.
Power in dq
With the amplitude-invariant form, instantaneous active and reactive power are
the same numbers as and at every instant. Lock the frame to the grid's voltage, so , and the two powers part: and . A converter asked for and sets and . A current that lags the voltage has a negative and a positive . In a permanent-magnet machine, with on the magnet, the torque is , and a salient rotor adds .
The cross-coupling, and the feed-forward that cancels it
Turning frames cost something. Write a current as and differentiate: . The extra is the frame's own turning. For an inductor with resistance between a converter's voltage and the grid's , it gives
Each axis feels the other through : a step in pushes on the equation. A current controller cancels both terms and the grid's voltage before they reach the inductor. With and the outputs of two PI controllers,
and what is left on each axis is . A PI with and cancels that pole, so each current follows its reference as a first-order lag with time constant , 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.
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 gives and power carries the of (5). The reason is in the matrix: for (2), , so it isn't orthogonal, and in abc becomes on and and on . Power-invariant, with in front of (2) and in its last row, the matrix is orthogonal, its inverse is its transpose, and .
Where it comes from
Clarke, then a turn about the zero axis
Clarke takes the point into axes , and ; and lie in the plane and runs along , square to it. Park then turns and by inside that plane and leaves where it is. The turn is about the zero axis, so the one-matrix form (2) is the turn times Clarke:
Multiply it out and the first row is , by . The figure below is the Clarke page's abc space with the frame drawn in it.
The same matrix read as projections
Draw the three phase axes in the plane, apart, and the axis at from phase 's. The angle from to phase 's axis is and to phase 's . So each entry of the row of (2) is the cosine of the angle between the axis and one phase's axis, times : is the three phases projected onto and added. The row does the same for an axis further on, and 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:
and the machine's equations are a set whose coefficients change at every instant. Turn them into dq with (2) and its inverse (3), , and every cancels: what is left is three constants, , and . 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 and don't, because the frame carries it round: of a vector written as brings . In a machine it is the speed voltage, , which is how the magnet's flux on induces a voltage on ; in a filter it is the coupling of (6), which the feed-forward (7) cancels.
Try this
- 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 and 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 to the right, the stator's a, b and c turn backward, and the vector stands still at .
- Move , the vector ahead of the rotor, to 90°, then to 0°. At 90° all of it is on , , , and the pull on the rotor is at its most. At 0° all of it is on and there is no pull: a current along the field doesn't turn it.
- 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 , once every ten periods. Over the one period drawn, and slope; the figure under Why d and q are flat shows the whole slow sine.
- 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 and keep their values: the arc runs to the axis and reads more, and the matrix under the figure is the other convention's. The unbalance draws a loop round the steady point at , twice a period; the 3rd harmonic would leave and alone and show only in .
Worked examples
The same 400 V network as on the Clarke page: a phase peak of V, and at Clarke gives V and V. A frame that turns with the vector is at , so
and so at every other instant: the whole voltage is on . Now let the frame lag by , , so here:
Still flat, but is no longer zero: 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 ; in the frame, at , so
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 ahead of the grid's. The phase peak is V. With the frame ahead of the vector, this page's form (1) gives
The course's own matrix measures to (the second row of the table). On the same numbers and the same it gives V and V: equation (4), and , 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 kV peak, , is asked for MW and Mvar. From (5):
Its filter is mH with , and the loop is asked for ms: and . At 50 Hz, , so 100 A on one axis puts 15.71 V on the other. With the feed-forward (7), a 100 A step in gives , within 1 A of its reference after 46 ms, and never leaves 0. Without it, swings to A at 22.7 ms, overshoots to 110.6 A, and 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
A motor with 4 pole pairs and a magnet flux of Wb, run with and A:
At 1,500 rpm the shaft turns at 157.1 rad/s and the frame at 4 times that, rad/s (100 Hz). The magnet, on , induces V on , and the electrical power is 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: and ripple at and the torque with them.
Mistakes people make
The mistake
Taking , the vector's own angle.
Why it's wrong
Then is zero and is the vector's length at every instant, whatever the phases carry: an unbalance or a harmonic disappears into , and nothing is left for a controller to act on.
The right one
Take from outside the signal: a rotor's encoder, or a phase-locked loop that turns the frame at the grid's own steady speed.
The mistake
Feeding MathWorks' default Park block, or a textbook's qd0, with of a cosine set and expecting .
Why it's wrong
That matrix measures to the axis, so a cosine set gives and .
The right one
Set the block to its D-axis option, or feed it ; or keep it, and read where this page reads .
The mistake
Writing the phases as sines, , and using a matrix made for cosines.
Why it's wrong
A sine set is a cosine set late, so this page's matrix gives and where was meant.
The right one
Match the phases to the matrix: cosines with (2), or sines with the -axis form, whose rows are and .
The mistake
with the amplitude-invariant form.
Why it's wrong
That form shrinks power: is on and , so the sum is two thirds of the true power.
The right one
with the form; no with the power-invariant one. The belongs to the scaling, not to Park.
The mistake
, with the sign of a source that puts the voltage on .
Why it's wrong
With the voltage on and ahead of , a lagging current has a negative ; the reactive power it draws is positive only with the minus sign.
The right one
with the voltage on ; in a source that puts it on . Check with a current 30° behind the voltage: must come out positive.
The mistake
Using the shaft's angle for in a machine with more than one pole pair.
Why it's wrong
The field turns times for each turn of the shaft, so a frame at the shaft's angle falls behind and and ripple at times the shaft's speed.
The right one
, the electrical angle, offset so that 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]
6The 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, and , plus the zero sequence; a balanced set is still a pair of sine waves there. Park turns those two axes by , so a frame that turns with the vector sees two constants. Clarke is Park with .
Is dq0 the same as the Park transformation?
Yes: dq0 names the result, , and the zero sequence, and the Park transformation is the matrix that makes it. Some sources write qd0, which often also means is measured to the 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 strengthens or weakens the field; a current on pulls on it and makes the torque.
What are the d and q axes in a PMSM, and why is held at zero?
In a permanent-magnet synchronous motor is on the magnet's north pole and a quarter turn ahead, in electrical degrees. Torque is when the rotor is round, so alone makes it; any only adds current and heat. Above base speed, or with a salient rotor, a negative is used on purpose: it weakens the field, or adds the reluctance torque .
What is the inverse Park transformation?
The turn back by : , then the inverse Clarke. In one matrix it is (3) above, columns , 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 in front, the common form, it keeps amplitudes and power needs a . With in front and in the zero row it is orthogonal and keeps power, .
Why does my Simulink block give d = 0 and q = V?
MathWorks' Park Transform block measures to the axis by default, as Krause's textbook does. Fed with the angle of a cosine set it puts the whole amplitude on . Choose its D-axis alignment, or subtract from the angle you feed it, and you get , 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 . Taking it from the same vector you transform makes 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 on the rotor's magnet, so sets the torque and the field, both flat at a steady speed. A grid-connected inverter puts on the grid voltage with a phase-locked loop, so sets the active power and the reactive power, and with . 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 and 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 terms worked symbolically with measured to (the table).
In Serbian, Electrical Machine Modelling builds the machine's model in and in the folder Lectures, "1 - Slajdovi sa predavanja.pdf", pages 94 to 111: Park's transformation as Clarke's joined with a rotation, and 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 axis behave like that motor's armature, its torque set by one current.
- Control of Electrical Machines and Power Electronics
Course materials, UPC Barcelona
- Analysis and Control of Modern Power Electronics Dominated Power Systems
Course materials, UPC Barcelona
- Electrical Machine Modelling
Course materials, FTN Novi Sad
Connects to
- Clarke transformation
comes first: it turns the three phases into the αβ vector that Park turns
- SRF-PLL
finds the angle θ that makes q zero, and so locks the frame to the grid
- Symmetrical components
splits the positive and negative sequences that ripple at 2ω in dq
- Three-phase controlled rectifier
draws the 5th and 7th harmonics that both become a 6ω ripple in dq
Further reading
- Direct-quadrature-zero transformationen.wikipedia.org
The derivation as turns of the abc axes, with the power-invariant form first and Park's own beside it.
- A Geometric Interpretation of Reference Frames and Transformations: dq0, Clarke, and Parkhdl.handle.net
O'Rourke, Qasim, Overlin and Kirtley's paper: Park as Clarke followed by a turn about the zero axis, and the locus a three-phase quantity draws in abc space.
- Animation B: Tesla's Rotating Magnetic Fieldengineering.purdue.edu
Purdue's animation for Krause's textbook: pick a reference frame's speed and watch the field from its q axis.
- Park Transform blockmathworks.com
MathWorks' block, with its Q-axis and D-axis alignments side by side, each with its matrix.
- Visualisation of dq0 transformstevenblair.github.io
S. Blair's tool: any sequence or harmonic, seen in abc and dq0, with three matrices to choose from.
- Space Vectors and Clarke-Park Transformationsgeogebra.org
A 3-D GeoGebra applet: set the frame's speed and angle; at speed 0 it is Clarke.
- Vector current control (TN106)imperix.com
imperix's note on the dq current loop of an L filter: the coupling terms, the feed-forward and steps measured on hardware.
- Field-oriented control of a PMSM (TN111)imperix.com
imperix's note on a permanent-magnet machine in dq: the axes on the rotor and the torque from i_q.
- PMSM control simulationsosw.poznan.pl
T. Fitzermann's whole drive in the browser, PI loops on i_d and i_q, for the step after this page.
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