Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 36 ยท Fourier Series

Parseval's Theorem and the Power Spectrum

Learn that the average power of a periodic signal equals the sum of squared Fourier coefficients, compute power per harmonic, and measure distortion and bandwidth in Python.

Energy is conserved when you change description. This is Parseval's theorem: the power of a periodic signal measured in time equals the power measured by its Fourier coefficients. Because each harmonic carries its own share, you can ask practical questions such as "how much of the power lies below 1 kHz?" or "how distorted is this sine?" This lesson derives the result, shows how to apply it, and ends the Fourier series chapter with measurements you can run.

Parseval for the exponential series

For a periodic x(t) with coefficients c_k:

P = (1/T0) integral over one period of |x(t)|^2 dt = sum over all k of |c_k|^2.

Why? Square the series, integrate over a period, and use orthogonality: all the cross terms between different harmonics integrate to zero, so only the terms |c_k|^2 survive. It is a Pythagorean theorem for functions, with the exponentials e^(j k w0 t) as perpendicular axes.

For real signals the negative and positive harmonics mirror each other, so in trigonometric terms

P = a0^2 + (1/2) sum over k >= 1 of (a_k^2 + b_k^2).

Each harmonic k >= 1 carries power c_k^2 / 2 where c_k is the sinusoid's amplitude; the DC term carries a0^2.

Python Parseval check on a square wave

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The fundamental alone carries 8 / pi^2, about 81 percent of the power of the square wave, and the first three odd harmonics bring the total close to 93 percent.

The power spectrum

Plot |c_k|^2 against frequency k f0: the power spectrum (or power spectral line plot). It shows where the power sits. It has no phase information, so many different signals share the same power spectrum, but it is what instruments such as spectrum analyzers display.

Python A text power spectrum

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check by hand: DC power is 1^2 = 1, the 4th harmonic 3^2 / 2 = 4.5, the 10th 1.5^2 / 2 = 1.125, total 6.625.

Total harmonic distortion

An ideal amplifier would reproduce a pure sine at frequency f0. A real one adds harmonics. The total harmonic distortion is

THD = sqrt( sum over k >= 2 of P_k ) / sqrt( P_1 )

the RMS of the harmonics divided by the RMS of the fundamental, often quoted in percent. We can compute it from the power spectrum of a clipped sine.

Python THD of a clipped sine

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Harder clipping gives more harmonic power and a larger THD; an unclipped sine has essentially zero.

Bandwidth by power

A practical definition of the bandwidth of a periodic signal is the range of harmonics holding, say, 95 or 99 percent of its power. For a square wave the answer depends on the rise time you can tolerate; the 1/k decay means the rule of thumb "keep the first 10 harmonics" gives a clearly square result.

Python Harmonics needed for 99% of the power

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Parseval in other settings

The same idea returns in the Fourier transform (energy in time equals energy over frequency) and in the DFT (sum |x[n]|^2 = (1/N) sum |X[k]|^2). Conservation of energy under the transform is one of the reasons why frequency-domain analysis is trustworthy.

flowchart LR
    T["time domain<br/>(1/T0) integral of |x|^2"] <-->|"equal"| F["frequency domain<br/>sum of |c_k|^2"]

Two ways to measure the same power; pick whichever is easier.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Parseval's theorem for Fourier series says the average power of a periodic signal equals:

    Orthogonality kills cross terms, so power adds harmonic by harmonic.
  2. 2. A signal is 2 + 4 cos(w0 t). What is its average power?

    DC power 2^2 = 4 plus harmonic power 4^2 / 2 = 8 gives 12.
  3. 3. What does total harmonic distortion measure?

    THD compares the RMS of all unwanted harmonics with the RMS of the fundamental.
  4. 4. What fraction of an odd square wave's power is in its fundamental?

    The fundamental power is 8 / pi^2, approximately 0.81, out of a total of 1.

Summary

  • Parseval: (1/T0) integral |x|^2 dt = sum of |c_k|^2; power adds harmonic by harmonic.
  • The power spectrum |c_k|^2 shows where the power sits (but forgets phase).
  • Real signals: DC power a0^2, each harmonic (a_k^2 + b_k^2)/2.
  • THD and power bandwidth are practical measurements built on the same idea.
  • Next chapter: from periodic signals to arbitrary ones with the Fourier transform.

Next: The Continuous-Time Fourier Transform