A10 · Lesson 4 · Power and harmonics
Parseval's theorem, distortion and the Gibbs overshoot
An audio amplifier's datasheet quotes its total harmonic distortion: how much power ends up in harmonics that weren't in the input. A power-quality meter on a factory floor measures the same thing for the mains current. Both rest on one fact: a signal's power is the sum of the powers of its harmonics, as if each one were heating the load on its own. That's Parseval's theorem, and with it you can find the RMS of a square wave, the distortion of a clipped sine, and how many harmonics a filter must pass to keep a signal's shape.
- The curve adds up the square wave's harmonics through number . The flat line is the square wave itself.
- The readout gives the fraction of the square wave's power captured so far.
- Even with many harmonics the sum overshoots near each jump by about 9%. Does adding harmonics shrink the overshoot, or just squeeze it closer to the jump?
Predict
The fundamental alone carries what fraction of a square wave's power?
81%. The square wave has power 1 (it's always ). Its fundamental has amplitude and power . The other 19% is spread over the odd harmonics, falling as .
Name it
Parseval's theorem
For a periodic signal with complex coefficients ,
where is the amplitude of harmonic . Mean-square power is the sum of the harmonics' powers, because the cross terms between different harmonics average to zero. The RMS value is its square root.
Total harmonic distortion
the RMS of everything except the fundamental, relative to the fundamental.
| Waveform | THD |
|---|---|
| sine | 0 |
| triangle | |
| square |
The Gibbs phenomenon
Wherever a signal jumps, a truncated Fourier series overshoots by about 9% of the jump, however many harmonics you keep. The overshoot narrows toward the jump but doesn't shrink. It's why filtering a square wave sharply makes ringing on its edges, and why S7 shapes filters to roll off gently.
Worked example
Use Parseval's theorem to find .
Show the solution
- The power in time. The square wave has power 1.
- The power in its harmonics. They have amplitudes for odd , so by Parseval's theorem
- Solve for the sum. A fact about numbers, found by measuring a signal's power two ways.
Answer the sum is .
Worked example
What is the THD of a square wave?
Show the solution
- Split the power. The fundamental's power is of the total 1, leaving in the harmonics.
- Take the ratio.
Answer the THD of a square wave is 0.483, or 48.3%.
Worked example
A 5 V pulse train with 20% duty. What is its RMS value, and how much of its power is DC?
Show the solution
- The mean square.
- The RMS value.
- The DC part. The DC level is 1 V, contributing V² of the 5.
- The harmonics. The other 4 V², 80%, is spread over the harmonics. By Parseval's theorem the sum of their squared amplitudes over two must equal exactly 4.
Answer the RMS value is 2.24 V, and DC carries 1 V² of the 5 V²; the other 80% is in the harmonics.
Check
What percent of a square wave's power is in its harmonics 1 through 5?
Check
A signal is . What is its RMS value?
Check
An amplifier's output has a fundamental of 10 V and harmonics of 1 V and 0.3 V. What is its THD, in percent?
Check
What percent of the power of a square wave switching between V is in its fundamental?
Check
A truncated Fourier series of a signal that jumps by 8 V overshoots near the jump. By about how many volts?
Check
Write thd(x) for an array x holding exactly one period of a signal: take np.fft.rfft(x), use bin 1 as the fundamental and bins 2 and up as the harmonics, and return the THD as a fraction.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A pulse train of 3 V with duty 0.1.
(a)
What is its RMS value?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
(b)
How much of its mean square is in the harmonics (everything but DC)?
Check
A signal is .
Step 1
What is its mean square?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is its THD, the RMS of the harmonic over the RMS of the fundamental?
Explain why
Why does the power of a signal equal the sum of the powers of its harmonics?
Square the Fourier series and average over a period. The square contains every product of two harmonics. Products of the same harmonic average to half its amplitude squared, its power. Products of two different harmonics average to zero, because sinusoids at different whole-number multiples of the fundamental are orthogonal over a period. So only the individual powers survive, and the total is their sum, as if each harmonic heated the load separately.
Practice
Keep practicing
9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.