TExcelTAD
Home › Power Electronics & Motor Drives › Space-Vector PWM and the Modulation Index

Space-Vector PWM and the Modulation Index

Sine PWM treats a three-phase inverter as three separate single-phase legs. But the motor does not care about the three pole voltages separately. It responds to one quantity, the space vector of its phase voltages, which rotates in a plane at the electrical speed. Space-vector PWM (SVPWM) works in that plane directly. A two-level inverter has only eight switch states, so it can produce only eight vectors. SVPWM switches between the two vectors nearest to the reference and a zero vector, in exactly the right proportions, to make the average vector over each switching period equal the reference. The result needs 15.5 % less bus voltage than sine PWM for the same motor voltage, has slightly lower current ripple, and fits naturally into the field-oriented control of Clarke and Park Transforms, whose output is a voltage vector.

Eight states, six vectors

V1 (100)V2 (110) V3 (010)V4 (011) V5 (001)V6 (101) V0, V7 V* (T1/Ts) V1(T2/Ts) V2 theta sector 1 |Vk| = 2Vdc/3; dashed circle: linear limit Vdc/sqrt(3)

Write a switch state as three bits (sasbsc)(s_a s_b s_c): 11 means the upper switch of that leg is on. The space vector of the pole voltages, with the amplitude-invariant Clarke transform, is:

v⃗=23(vaN+vbN ej2π/3+vcN ej4π/3)\vec v = \frac{2}{3}\left(v_{aN} + v_{bN}\,e^{j2\pi/3} + v_{cN}\,e^{j4\pi/3}\right)

The six active states give vectors of length 23Vdc\frac{2}{3}V_{dc} at 0∘,60∘,…,300∘0^\circ, 60^\circ, \dots, 300^\circ, the corners of a hexagon. The states 000000 and 111111 give the zero vector: all phases tied to the same rail. Common-mode components such as the pole DC offset drop out of v⃗\vec v, because 1+ej2π/3+ej4π/3=01 + e^{j2\pi/3} + e^{j4\pi/3} = 0.

Dwell times

A reference V⃗∗=V∗ejθ\vec V^* = V^* e^{j\theta} in sector 1 (between V1V_1 and V2V_2, 0≤θ<60∘0 \le \theta < 60^\circ) is made by applying V1V_1 for T1T_1, V2V_2 for T2T_2 and a zero vector for the rest of the period TsT_s. Matching the average to the reference gives:

T1=Ts3 V∗Vdcsin⁡(60∘−θ),T2=Ts3 V∗Vdcsin⁡θ,T0=Ts−T1−T2T_1 = T_s \frac{\sqrt 3\, V^*}{V_{dc}} \sin(60^\circ - \theta), \qquad T_2 = T_s \frac{\sqrt 3\, V^*}{V_{dc}} \sin\theta, \qquad T_0 = T_s - T_1 - T_2

Other sectors use the same formulas with θ\theta measured from the sector's first vector. The usual symmetric sequence, 000→100→110→111→110→100→000000 \to 100 \to 110 \to 111 \to 110 \to 100 \to 000, splits T0T_0 equally between the two zero states. Each leg then switches once on and once off per period, centred, exactly like a sine-triangle modulator with a modified reference.

Linear limit. T0≥0T_0 \ge 0 for every angle only while the reference circle fits inside the hexagon, whose inscribed radius is Vdc/3V_{dc}/\sqrt 3. Defining the modulation index as for sine PWM, m=V∗/(Vdc/2)m = V^*/(V_{dc}/2):

mmax,SVPWM=23=1.155,VLL1,rms,max=Vdc2=0.707 Vdcm_\text{max,SVPWM} = \frac{2}{\sqrt 3} = 1.155, \qquad V_{LL1,\text{rms,max}} = \frac{V_{dc}}{\sqrt 2} = 0.707\,V_{dc}

This is the same limit as third-harmonic injection. In fact, SVPWM with equal zero times is identical to sine PWM with the common-mode signal −12(max⁡+min⁡)-\frac{1}{2}(\max + \min) of the three references added (the "min-max" injection), which gives a saddle-shaped pole reference. The code checks this to machine precision. Beyond the hexagon's inscribed circle (overmodulation) the vector is clipped to the hexagon, and at the limit the inverter reaches six-step. Some controllers also use a single zero state per period (discontinuous PWM), clamping one leg for 60∘60^\circ at a time: one third fewer switching events, at the cost of more ripple.

Worked example

Given: Vdc=48 VV_{dc} = 48\ \text{V}, fsw=20 kHzf_{sw} = 20\ \text{kHz} (Ts=50 μsT_s = 50\ \mu\text{s}), reference V∗=24 VV^* = 24\ \text{V} at θ=20∘\theta = 20^\circ.

Find: the sector, T1T_1, T2T_2, T0T_0, the three leg duty cycles, and the largest reference SVPWM can make without overmodulating.

Solve:

3 V∗Vdc=3⋅24 V48 V=0.866T1=50 μs⋅0.866⋅sin⁡40∘=27.83 μs,T2=50 μs⋅0.866⋅sin⁡20∘=14.81 μsT0=50−27.83−14.81=7.36 μsda=T1+T2+T0/2Ts=0.9264,db=T2+T0/2Ts=0.3698,dc=T0/2Ts=0.0736Vmax∗=48 V3=27.71 V\begin{aligned} \frac{\sqrt 3\, V^*}{V_{dc}} &= \frac{\sqrt 3 \cdot 24\ \text{V}}{48\ \text{V}} = 0.866 \\ T_1 &= 50\ \mu\text{s} \cdot 0.866 \cdot \sin 40^\circ = 27.83\ \mu\text{s}, \qquad T_2 = 50\ \mu\text{s} \cdot 0.866 \cdot \sin 20^\circ = 14.81\ \mu\text{s} \\ T_0 &= 50 - 27.83 - 14.81 = 7.36\ \mu\text{s} \\ d_a &= \frac{T_1 + T_2 + T_0/2}{T_s} = 0.9264, \quad d_b = \frac{T_2 + T_0/2}{T_s} = 0.3698, \quad d_c = \frac{T_0/2}{T_s} = 0.0736 \\ V^*_\text{max} &= \frac{48\ \text{V}}{\sqrt 3} = 27.71\ \text{V} \end{aligned}

Check: with sine PWM the same bus allows only Vdc/2=24 VV_{dc}/2 = 24\ \text{V}, so this reference sits exactly at the sine-PWM limit and still has T0>0T_0 > 0 to spare. The averaged pole voltages (44.47,17.75,3.53) V(44.47, 17.75, 3.53)\ \text{V} have the space vector 24 V∠20∘24\ \text{V}\angle 20^\circ, as the code confirms.

python · try it yourself
import numpy as np

Vdc, Ts = 48.0, 50e-6                               # 48 V bus, 20 kHz

def clarke(va, vb, vc):                             # amplitude-invariant alpha, beta
    return (2/3) * (va - 0.5*vb - 0.5*vc), (2/3) * (np.sqrt(3)/2) * (vb - vc)

states = ["100", "110", "010", "011", "001", "101"]
for s in states:
    a, b = clarke(*[Vdc * int(c) for c in s])
    print(f"V{s}: {np.hypot(a, b):5.2f} V at {np.degrees(np.arctan2(b, a)) % 360:5.1f} deg")

def svpwm(Vref, theta):
    """sector, dwell times and leg duty cycles for a reference vector Vref at angle theta (rad)"""
    sector = int(theta // (np.pi/3)) % 6
    th = theta - sector * np.pi/3                   # angle inside the sector
    k = np.sqrt(3) * Vref / Vdc
    T1, T2 = Ts * k * np.sin(np.pi/3 - th), Ts * k * np.sin(th)
    T0 = Ts - T1 - T2
    first, second = states[sector], states[(sector + 1) % 6]
    duty = [(T1 * int(first[i]) + T2 * int(second[i]) + T0 / 2) / Ts for i in range(3)]
    return sector + 1, T1, T2, T0, duty

sec, T1, T2, T0, d = svpwm(24.0, np.radians(20))
print(f"\n|V*| = 24 V at 20 deg: sector {sec}, T1 = {T1*1e6:.2f} us, T2 = {T2*1e6:.2f} us, T0 = {T0*1e6:.2f} us")
print("leg duties:", " ".join(f"{x:.4f}" for x in d))
a, b = clarke(*[Vdc * x for x in d])                # average pole voltages over the period
print(f"averaged vector: {np.hypot(a, b):.2f} V at {np.degrees(np.arctan2(b, a)):.2f} deg")

# SVPWM equals sine PWM plus the min-max common-mode signal
err = 0.0
for th in np.linspace(0, 2*np.pi, 721, endpoint=False):
    *_, d = svpwm(24.0, th)
    v = [24.0 * np.cos(th - 2*np.pi*k/3) for k in range(3)]
    vcm = -(max(v) + min(v)) / 2
    d2 = [0.5 + (x + vcm) / Vdc for x in v]
    err = max(err, max(abs(p - q) for p, q in zip(d, d2)))
print(f"max |SVPWM duty - min-max duty| over a turn = {err:.1e}")
print(f"linear limit |V*| = Vdc/sqrt(3) = {Vdc/np.sqrt(3):.2f} V (sine PWM: Vdc/2 = {Vdc/2:.1f} V), "
      f"gain {2/np.sqrt(3):.4f}")
sec, T1, T2, T0, d = svpwm(30.0, np.radians(30))
print(f"|V*| = 30 V at 30 deg: T0 = {T0*1e6:.2f} us -> overmodulation")
V100: 32.00 V at   0.0 deg
V110: 32.00 V at  60.0 deg
V010: 32.00 V at 120.0 deg
V011: 32.00 V at 180.0 deg
V001: 32.00 V at 240.0 deg
V101: 32.00 V at 300.0 deg

|V*| = 24 V at 20 deg: sector 1, T1 = 27.83 us, T2 = 14.81 us, T0 = 7.36 us
leg duties: 0.9264 0.3698 0.0736
averaged vector: 24.00 V at 20.00 deg
max |SVPWM duty - min-max duty| over a turn = 4.4e-16
linear limit |V*| = Vdc/sqrt(3) = 27.71 V (sine PWM: Vdc/2 = 24.0 V), gain 1.1547
|V*| = 30 V at 30 deg: T0 = -4.13 us -> overmodulation

At 30 V30\ \text{V} and 30∘30^\circ (the middle of a sector, where the hexagon is closest to the centre) the zero time comes out negative: the reference lies outside the hexagon's inscribed circle, so the controller must clip it.

Interactive: the saddle-shaped pole voltage

Averaged over each switching period, a leg's pole voltage is smooth: what you would see through a low-pass filter on the scope. With SVPWM it is the sine reference plus the min-max signal. That signal is a triangle-like wave at three times the fundamental, with a peak of a quarter of the reference amplitude. Its largest Fourier term is a third harmonic of 4.96 V4.96\ \text{V} for a 24 V24\ \text{V} reference. The lab adds just that term (node a) to the sine-PWM pole voltage, 24+24sin⁡ωt24 + 24\sin\omega t at 50 Hz50\ \text{Hz} (node f); the netlist has no switches, so these are the period-averaged voltages, not the PWM itself.

02040010203040t (ms)VV(a)V(f)at t = 3.000 msV(f)43.4 VV(a)44.9 VI(V1)-44.9 mAI(V3)-44.9 mAI(R1)44.9 mA

The sine reaches the full 48 V48\ \text{V} bus at t=5 mst = 5\ \text{ms}: no headroom left. With the third harmonic, the same instant reads 43.04 V43.04\ \text{V}, and the flattened peaks at t=3 mst = 3\ \text{ms} reach only 44.95 V44.95\ \text{V}. That spare 3 V3\ \text{V} is what lets the fundamental grow: with the full min-max signal, the reference can rise to 27.7 V27.7\ \text{V}, 15.5 % more, before the flattened peaks touch the bus. Set the slider to 0 to get pure sine PWM back.

Guided lab: seeing SVPWM on a low-voltage motor board

Hand calculation. For your board's bus voltage and PWM frequency: Vmax∗=Vdc/3V^*_\text{max} = V_{dc}/\sqrt 3, the dwell times at one reference, and the duty cycles. Most motor-control firmware reports the three duties directly.

Simulation. Change the reference in the Python cell and find the angle where T0T_0 first reaches zero as V∗V^* grows (sector centres, 30∘30^\circ).

What you would measure. A three-phase motor evaluation board rated for 24 V or less, from a current-limited supply, running its open-loop or FOC example with SVPWM into a small gimbal or drone motor held in a clamp. Put a simple RC low-pass (10 kΩ10\ \text{k}\Omega and 100 nF100\ \text{nF}, corner 160 Hz160\ \text{Hz}) from one phase output to the negative rail and scope it: at a slow electrical frequency (tens of hertz) you see the saddle shape, with a mean of Vdc/2V_{dc}/2 and flattened peaks. Its amplitude follows V∗V^* within a few percent; the RC filter itself attenuates a little and lags.

Hazards and safe setup. At most 24 V24\ \text{V}, current-limited. The motor spins: clamp it and keep hands clear. The phase outputs switch the full bus in nanoseconds, so keep the RC filter's ground at the board's power ground and use a differential probe for anything else.

Pitfalls

  • Mixing Clarke scalings. The amplitude-invariant form (factor 23\frac{2}{3}) keeps vector lengths equal to phase peaks; the power-invariant form (2/3\sqrt{2/3}) does not. Pick one and keep it.
  • Forgetting that SVPWM and min-max injection are the same. Implement whichever is simpler on your controller; carrier-based is usually cheaper.
  • Ignoring overmodulation. A controller that asks for more than Vdc/3V_{dc}/\sqrt 3 gets distortion unless it limits the vector (and its integrators, see Anti-Windup).
  • Assuming the motor gets the full bus. Dead time and switch drops eat a few percent (Inverter Harmonics and Dead Time).

Practice

  1. A 400 V400\ \text{V} bus: maximum linear line-to-line rms with SVPWM and with sine PWM? (Calculation only.)
  2. Find T1T_1, T2T_2, T0T_0 for Vdc=24 VV_{dc} = 24\ \text{V}, Ts=100 μsT_s = 100\ \mu\text{s}, V∗=10 VV^* = 10\ \text{V} at θ=45∘\theta = 45^\circ (sector 1).
  3. Which switch states make up sector 4 (between 180∘180^\circ and 240∘240^\circ)?
Answer
  1. SVPWM 400/2=283 V400/\sqrt 2 = 283\ \text{V}; sine PWM 0.612⋅400=245 V0.612 \cdot 400 = 245\ \text{V}.
  2. 3⋅10/24=0.7217\sqrt 3 \cdot 10/24 = 0.7217; T1=100⋅0.7217⋅sin⁡15∘=18.68 μsT_1 = 100 \cdot 0.7217 \cdot \sin 15^\circ = 18.68\ \mu\text{s}, T2=100⋅0.7217⋅sin⁡45∘=51.03 μsT_2 = 100 \cdot 0.7217 \cdot \sin 45^\circ = 51.03\ \mu\text{s}, T0=30.29 μsT_0 = 30.29\ \mu\text{s}.
  3. V4=011V_4 = 011 and V5=001V_5 = 001, plus the zero states 000000 and 111111.

Test yourself

How long is each active space vector of a two-level inverter (amplitude-invariant Clarke)?

  1. Vdc/2V_{dc}/2
  2. Vdc/3V_{dc}/\sqrt3
  3. 2Vdc/32V_{dc}/3
  4. VdcV_{dc}

The largest reference vector SVPWM can make without overmodulation is…

  1. Vdc/2V_{dc}/2
  2. Vdc/3V_{dc}/\sqrt3, the radius of the circle inscribed in the hexagon
  3. 2Vdc/32V_{dc}/3
  4. VdcV_{dc}

Symmetric SVPWM with equal zero-vector times is equivalent to…

  1. six-step operation
  2. sine PWM plus the common-mode signal −12(max⁡+min⁡)-\frac{1}{2}(\max + \min) of the three references
  3. bipolar single-phase PWM
  4. discontinuous PWM

Why do zero vectors not change the motor's voltage vector?

  1. They are applied for zero time
  2. In states 000 and 111 all three phases sit at the same rail, so the line-to-line voltages are zero
  3. They reverse the current
  4. They are only used at start-up