Control Systems

The Clarke and Park Transforms: Freezing a Spinning Motor's Math

Inside a servo drive controlling a permanent-magnet motor at 6,000 rpm, three phase currents are each a 400 Hz sinusoid, sliding 120° apart and never sitting still. Trying to regulate torque by chasing those three moving targets with three PI loops is a nightmare — the reference is a moving sine, the plant coupling is time-varying, and the bandwidth you'd need is punishing. The Clarke and Park transforms solve this with a coordinate trick worthy of a magician: they collapse three AC quantities into two, then spin the reference frame at exactly the rotor's electrical speed so that, from the controller's point of view, the sinusoids stop dead and become two DC numbers.

Those two DC values — i_d (flux-producing) and i_q (torque-producing) — are what field-oriented control actually regulates. Get the transform math right and a $2 microcontroller can hold torque flat to within a percent across the whole speed range; get the rotor-angle reference wrong by 15° and the same motor loses efficiency, draws excess current, and can run away.

  • Core idea3-phase AC → 2 DC axes (d, q)
  • Clarke (abc→αβ)iα = i_a, iβ = (i_a + 2i_b)/√3
  • Park (αβ→dq)rotate by rotor angle θ
  • Power-invariant gain√(2/3) scaling
  • Torque outputT = (3/2)·p·λ_pm·i_q
  • Used inFOC, PMSM/IM drives, grid inverters

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

Three phases are two too many — the Clarke transform

A balanced three-phase machine is driven by currents i_a, i_b, i_c that always satisfy i_a + i_b + i_c = 0 (there is no neutral return in a star-connected motor). That constraint means the three currents carry only two independent pieces of information. Edith Clarke's 1938 transform makes this explicit by projecting the three phase axes — physically 120° apart in the stator — onto a fixed two-axis orthogonal frame she called α (aligned with phase a) and β (90° ahead).

In the common amplitude-invariant form (gain = 2/3), the forward Clarke transform is:

  • iα = i_a
  • iβ = (i_a + 2·i_b)/√3 (equivalently iβ = (i_b − i_c)/√3)

The 2/3 gain preserves the peak amplitude: a phase current with peak Î = 10 A produces a space vector of magnitude 10 A in the αβ plane. That's the convention almost every motor-control firmware library uses (TI's InstaSPIN, ST's MC-SDK, the C2000 IQmath routines) because it maps cleanly to the physical current a hardware sensor reads.

The alternative power-invariant form uses gain √(2/3) ≈ 0.8165. It scales αβ so that instantaneous power computes directly as P = v_α·i_α + v_β·i_β with no 3/2 factor, which is convenient in analysis and grid applications but inflates the vector magnitude by √(3/2) ≈ 1.225 relative to the phase peak. Pick one convention and stay in it — mixing a power-invariant Clarke with an amplitude-invariant torque equation is a classic firmware bug that produces a systematic 22.5% torque-constant error.

Park's trick: spin the frame until the sinusoids stop

The Clarke output is still AC. At 3,000 rpm on a 4-pole-pair (8-pole) machine the electrical frequency is f_e = p·N/60 = 4·3000/60 = 200 Hz, so i_α and i_β are 200 Hz sinusoids sitting 90° apart. Robert Park's 1929 insight (developed for synchronous-machine analysis and later described by the AIEE as the most influential power-engineering paper of its era) was to rotate the reference frame at exactly the electrical angular velocity ω_e, locking it to the rotor flux. In that spinning frame the vector that was whirling around becomes stationary — two DC numbers.

The Park transform is a plain 2×2 rotation by the measured/estimated rotor electrical angle θ_e:

  • i_d = i_α·cos θ_e + i_β·sin θ_e
  • i_q = −i_α·sin θ_e + i_β·cos θ_e

By convention the d-axis (direct) is aligned with the rotor's permanent-magnet flux and the q-axis (quadrature) leads it by 90° electrical. This alignment is the entire point: current on the q-axis crosses the rotor field at 90° and produces torque (like a well-timed push on a merry-go-round), while current on the d-axis is parallel to the field and produces no torque — it only strengthens or weakens the flux. The full chain abc → αβ → dq is sometimes fused into one 3-input, 2-output matrix and called the dq0 transform, where the extra 0-sequence component captures any imbalance (zero in a healthy star-connected motor).

Why the two DC axes matter: decoupled torque control

Once you're in the dq frame the electromagnetic torque of a surface-mount PMSM reduces to a strikingly clean expression:

  • T_e = (3/2)·p·λ_pm·i_q

where p is the number of pole pairs and λ_pm is the rotor magnet flux linkage (Wb). Torque is proportional to i_q alone. That is the holy grail: a single DC number sets the torque, exactly like the armature current in an old brushed DC motor — which is why FOC is often called making an AC motor 'behave like a DC motor.' For an interior-PMSM with saliency (L_d ≠ L_q) a reluctance term appears: T_e = (3/2)·p·[λ_pm·i_q + (L_d − L_q)·i_d·i_q], which is exploited by MTPA (maximum-torque-per-amp) strategies that inject negative i_d.

The control architecture that falls out is elegant:

  • Measure two phase currents (the third from i_a+i_b+i_c=0), run Clarke and Park to get i_d, i_q.
  • Two PI controllers regulate i_d → 0 (or a field-weakening value) and i_q → torque command. Because the references are DC, a modest 1–2 kHz current-loop bandwidth with zero steady-state error is trivial — no chasing moving sinusoids.
  • Add cross-coupling decoupling feedforward: v_d includes −ω_e·L_q·i_q and v_q includes +ω_e·(L_d·i_d + λ_pm), cancelling the back-EMF and speed-dependent coupling.
  • Run the inverse Park (rotate v_d, v_q back by θ_e) then space vector modulation to generate the inverter gate signals.

The rotor angle is everything — sizing and sourcing θ_e

The Park transform lives or dies on the accuracy of the rotor electrical angle θ_e. A 10° electrical angle error costs cos(10°) ≈ 1.5% of available torque and dumps the rest into a wasteful, heating d-axis current; a 90° error and the motor produces zero useful torque while drawing full current. So the angle source is a first-order design decision:

  • Incremental encoder — e.g. a 2,500 line/rev unit gives 10,000 counts/rev after quadrature = 0.036° mechanical resolution; multiply by pole pairs for electrical. Needs an index or alignment routine to find absolute angle at startup.
  • Resolver — the aerospace/EV workhorse, robust to 150 °C and vibration; a resolver-to-digital converter (e.g. AD2S1210) outputs 12–16 bit angle, ~0.005° resolution, with tracking bandwidth in the kHz.
  • Sensorless observers — a sliding-mode or Luenberger flux observer, or a PLL riding on the back-EMF, estimates θ_e from the measured currents and the voltage model. Excellent above ~5–10% of rated speed; below that the back-EMF vanishes and high-frequency signal injection (exploiting L_d ≠ L_q saliency) takes over.

Timing is a hidden trap. At 200 Hz electrical, the vector advances 360°·200·T_s per control period. Sampling currents and applying the resulting voltage one PWM period later — say T_s = 100 µs (10 kHz loop) — the rotor has already rotated 200·360·100e-6 = 7.2° electrical. Good firmware compensates by predicting θ_e forward by 1.5 sample periods to align the transform with the instant the voltage is actually applied.

Numbers on real hardware

Consider an EV traction inverter driving an 8-pole (p = 4) interior-PMSM, 150 kW peak, 400 V DC bus, base speed 4,500 rpm. At base speed f_e = 4·4500/60 = 300 Hz. The control loop runs at 10 kHz on a 200 MHz automotive MCU (TI TMS320F28379D or Infineon AURIX); the entire Clarke, Park, two PI loops, inverse Park and SVM chain must finish in well under 100 µs. On a C2000 with the trig lookup and IQ-math, that pipeline is on the order of a few microseconds — small next to the 100 µs budget, leaving room for the observer.

  • Phase current peak at 300 A_rms ≈ 424 A; the current sensors (Hall or shunt+isolated amp) must resolve to ~1 A to keep i_d, i_q ripple low.
  • In field weakening above base speed, the controller commands negative i_d (often −100 to −200 A) to buck the magnet flux and keep the q-axis voltage below the DC-bus ceiling of ~V_dc/√3 ≈ 231 V per phase peak. This is only possible because the dq frame separates flux (d) from torque (q).

At the small end, the same math runs on a $1 STM32G4 spinning a 3,000 rpm drone motor at a 20–40 kHz loop, or a hobby FOC board (VESC, ODrive, SimpleFOC). The transform equations are identical from a 3.7 V drone ESC to a megawatt wind-turbine grid inverter — only the scaling, the angle source, and the modulation index change.

Failure modes, limits, and best practice

The transforms themselves are exact linear algebra — they don't 'fail.' What fails is the surrounding assumptions:

  • Convention mismatch. Amplitude-invariant Clarke (2/3) with a torque equation derived for power-invariant scaling gives a fixed √(3/2) ≈ 1.225 gain error. Symptom: measured torque constant off by ~22% versus datasheet. Fix: derive the whole chain in one convention.
  • Angle sign / offset error. A swapped encoder direction or a magnet-alignment offset makes θ_e count backward or lead by a fixed angle. Symptom: motor draws current but produces little torque, or spins the wrong way, or oscillates. Always run a d-axis alignment (inject i_d, let rotor snap to θ = 0) at commissioning.
  • Sensor imbalance / DC offset. A gain mismatch between the two current channels injects a 2·f_e ripple into i_d, i_q; a channel offset injects a 1·f_e ripple. These beat against the PI loops and cause audible whine and torque ripple. Calibrate offsets at zero current every power-up.
  • Low-speed sensorless dropout. Back-EMF observers lose the angle near standstill because the estimated flux signal vanishes into noise; below ~5% speed you must switch to HF injection or accept open-loop I/f startup.
  • Angle latency at high f_e. Without the 1.5-sample angle-advance compensation, the dq frame lags the rotor, cross-couples d and q, degrades current-loop phase margin, and can destabilize the loop at high speed.

Best practice: pick the amplitude-invariant convention to match hardware sensors, verify i_a+i_b+i_c ≈ 0 as a live health check, hold i_d = 0 below base speed on surface-PMSMs, and always compensate transport delay in θ_e. Do that, and three whirling 300 Hz sinusoids collapse into two rock-steady DC numbers you can control with a textbook PI loop.

Amplitude-invariant vs. power-invariant Clarke transform, and what each reference frame looks like to the controller
Propertyabc (stationary phases)αβ (Clarke)dq (Park)
Number of variables3 (redundant, sum=0)2 orthogonal2 orthogonal
Time behavior at speedSinusoidal (f_e = p·N/60)Sinusoidal, 90° apartDC (constant in steady state)
FrameStationaryStationaryRotating at ω_e
Amplitude-invariant gain (2/3)peak = Î|αβ| = peak Îd,q = phase peak
Power-invariant gain (√(2/3))peak = Î|αβ| = η√(3/2)power computes directly as v_d·i_d+v_q·i_q

Frequently asked questions

Why not just control the three phase currents directly?

The phase currents are sinusoids that move with the rotor (200–400+ Hz at speed), so a PI controller would have to track a moving reference and would leave steady-state error at every operating point. The plant coupling is also time-varying. In the dq frame the references are DC constants, so a simple PI loop gives zero steady-state error and torque is set by one number (i_q).

What's the difference between the Clarke and Park transforms?

Clarke (abc→αβ) is a stationary projection: it collapses three redundant phase currents into two orthogonal components in a fixed frame — no angle needed. Park (αβ→dq) then rotates that frame by the rotor angle θ_e so the still-sinusoidal αβ vector becomes stationary DC. Clarke removes redundancy; Park removes the time-variation.

Should I use the amplitude-invariant (2/3) or power-invariant (√(2/3)) form?

Use amplitude-invariant (2/3) for motor control — it makes the dq magnitudes equal the phase-current peak, matching what your current sensors read, and it's the convention in TI, ST, and most FOC libraries. Power-invariant (√(2/3)) is cleaner for power/grid analysis because P = v_d·i_d + v_q·i_q directly. The fatal error is mixing conventions, which gives a √(3/2) ≈ 1.22× gain mistake.

How accurate does the rotor angle θ_e have to be?

Very. Torque scales with cos of the angle error, so 10° electrical costs ~1.5% torque and heats the motor with wasted d-axis current, while 90° gives zero useful torque at full current. A resolver (~0.005°) or a good encoder plus 1.5-sample latency compensation is standard; sensorless observers work well above ~5–10% speed but need HF injection near standstill.

What does the '0' in the dq0 transform represent?

It's the zero-sequence component — the average of the three phase quantities, (i_a+i_b+i_c)/3 scaled. In a balanced star-connected motor with no neutral, i_a+i_b+i_c = 0, so the zero component is zero and is usually dropped. It matters for unbalanced systems, four-wire grids, or fault diagnostics.

Do these transforms add computational load or latency?

Very little. The whole abc→αβ→dq chain plus inverse Park is a handful of multiply-adds and two trig evaluations (usually a lookup table). On a C2000 or STM32G4 it runs in a few microseconds against a 50–100 µs loop budget. The real latency concern is the one-PWM-period delay between sampling current and applying voltage, which you compensate by advancing θ_e, not the transform arithmetic itself.