S1138 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S11 · Lesson 38 · Inverter lab

Generating sinusoidal PWM and measuring its spectrum, leg duty cycles for space-vector modulation, an LCL filter's exact attenuation and the damping trade-off, and a cascaded H-bridge's phase-shifted carriers

Lessons 33 to 37 claimed a lot about inverters: that sinusoidal PWM puts no low-order harmonics in the output, that space-vector modulation is the same as adding a common-mode offset, that an LCL filter attenuates as the square of frequency above its resonance, that phase-shifted cells push the ripple up by a factor of 2k. Each claim is easy to test numerically. In this lab you'll generate the switching waveforms sample by sample and measure them.

  • The curve is an LCL filter's grid current against the bridge voltage, relative to a single inductor of the same total, in decibels: L₁ = 2 mH, L₂ = 0.5 mH, C = 10 µF, with a damping resistor Rd in series with C on the slider.
  • With no damping the response spikes at 2.52 kHz; a few ohms flattens the spike.
  • Damping costs attenuation at high frequency: at 10 kHz, 23.4 dB with none, 19.0 dB with 2.1 Ω.

Predict

Adding a damping resistor equal to a third of the capacitor's reactance at resonance (2.1 Ω here) tames the LCL filter's peak. What does it cost at the 10 kHz switching frequency?

Name it

What the lab computes

  • Sinusoidal PWM: a leg is high when the reference msin⁡θ exceeds a triangle carrier at mf times the fundamental. Sampled finely over one period, the output's DFT shows the fundamental at m (in units of Vdc/2) up to m = 1, and harmonics only around multiples of mf.
  • Space-vector duties: for phase references vx=m3cos⁡(θ−k⋅120°) in units of Vdc, the leg duties dx=12+vx−max⁡v+min⁡v2 center the zero vectors exactly as lesson 35's dwell times do.
  • LCL filter: with ZC=Rd+1/sC and the grid as a short,
i2vi=1s(L1+L2)+s2L1L2/ZC

which for Rd = 0 is exactly |1−(f/fres)2| times smaller than one inductor's response.

  • Cascaded H-bridges: each cell compares +msin⁡θ and −msin⁡θ with its carrier (unipolar); cell j's carrier is shifted by j/(2k) of a carrier period.

Check

Write spwm(m, mf, N): N samples (at the midpoints of N equal steps) of one fundamental period of a half-bridge leg's output, ±1 (in units of Vdc/2), comparing msin⁡θ with a triangle carrier that is +1 at θ = 0 and has mf periods per fundamental period.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write svm_duties(m, theta_deg): the three leg duty cycles for space-vector modulation with centered zero vectors.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write lcl_ratio(L1, L2, C, Rd, f): the magnitude of i2/vi times ω(L1+L2), so that 1 means "the same as one inductor", and lcl_peak(L1, L2, C, Rd): the largest ratio over a log sweep from 100 Hz to 100 kHz.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write chb(k, mf, m, N): N samples (at step midpoints) of one fundamental period of a cascaded H-bridge phase with k cells, in units of one cell's DC voltage, using unipolar PWM against triangle carriers with mf periods per fundamental period, cell j's carrier shifted by j/(2k) of a carrier period.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why do phase-shifted carriers move a cascaded H-bridge's ripple to 2k times the carrier frequency?