S11 · Lesson 32 · Harmonics lab
Measuring harmonics and THD from one period of samples, separating displacement from distortion in the power factor, the six-pulse bridge with commutation overlap, the twelve-pulse bridge's cancellation, and simulating a capacitor-input rectifier
A power analyzer on a rectifier's input samples the line voltage and current and reports P, S, power factor, THD and a bar chart of harmonics. Lessons 29 to 31 derived those quantities for idealized waveforms. In this lab you'll write the analyzer, check it against the lessons' examples, then point it at waveforms that have no tidy formula: a twelve-pulse rectifier's stepped current and a capacitor-input rectifier's narrow charging pulses.
- The curve is the distortion factor of a current made of rectangular pulses centered on the voltage peaks, against their total width per half cycle (lesson 29's first example): .
- A full 180° square wave reaches 0.900; pulses 60° wide give 0.780.
- Narrow pulses, like a capacitor-input rectifier's, push the factor below 0.5 even though the current is perfectly in phase with the voltage.
Predict
A 230 V, 50 Hz bridge rectifier charges 330 µF and feeds a 400 Ω load (about 250 W). What power factor does it present to the line?
The capacitor holds the output within 21 V of the 325 V peak, so the diodes conduct only from 69.3° to 91.4° of each half cycle: 22° wide pulses peaking at 12.7 A to deliver the load's 0.79 A average current. The line current is 2.59 A RMS for 248 W, so PF = 248/(230 × 2.59) = 0.417. Task 4 finds this by simulation; it's the reason regulations push anything above about 75 W toward PFC.
Name it
What the lab computes
- Harmonics from samples: for N samples covering exactly one period, the DFT gives each harmonic's RMS value (and the DC term ). THD is the RMS of harmonics 2 and up over the fundamental's.
- Power terms: , , PF = P/S; the displacement factor is the cosine of the angle between the voltage and current fundamentals, and the distortion factor .
- Six-pulse bridge with overlap: , with the overlap angle μ from
- Twelve-pulse bridge: the Y-fed bridge's line current is a 120° block; the Δ-fed bridge's, seen at the primary, is a stepped wave , built from the same block b. Their sum has no 5th or 7th harmonic.
- Capacitor-input rectifier: while the diodes conduct, the capacitor follows and the line supplies ; conduction stops when that would go negative, at , and the capacitor then discharges through R until the rising line catches it.
Check
Write harmonics(x): the RMS value of each harmonic h = 0, 1, …, N/2 − 1 of one period of N samples (h = 0 is the DC value), and thd(x).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write power_terms(v, i) for one period of samples: return (P, S, PF, displacement factor, distortion factor).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write six_pulse(VLL, alpha_deg, Ls, Id, f) returning (Vdc, overlap angle μ in degrees), and twelve_pulse_current(theta_deg): the primary line current of a twelve-pulse rectifier for = 1, the Y bridge's block plus the Δ bridge's stepped wave.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write cap_rectifier(Vrms, f, C, R): the steady state of an ideal bridge rectifier into C with load R, returning (power factor, peak-to-peak ripple in volts, conduction angle per half cycle in degrees). Any accurate method will do: an exact event solution or fine time steps.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why does a capacitor-input rectifier have a poor power factor even though its current is in phase with the voltage?
Power factor is real power divided by RMS voltage times RMS current, and it suffers from both phase shift and waveform shape. The capacitor holds the output near the line's peak, so the diodes conduct only for a short interval near each peak, and the whole half cycle's charge has to flow in that interval as a tall, narrow pulse. A narrow pulse has a much larger RMS value than a sinusoid carrying the same average power, and the excess lives in harmonics that deliver no power from a sinusoidal voltage. So the displacement factor is near one, but the distortion factor, and with it the power factor, is around 0.4 to 0.6.