TExcelTAD
Home › Fourier Analysis & Signals › Plancherel and Energy

Plancherel and Energy

The Fourier transform preserves energy: the total energy of a signal equals the total energy of its spectrum. This is Plancherel's theorem (Parseval's identity for transforms). It means ∣f^(s)∣2\lvert \hat{f}(s) \rvert^2 is an energy density over frequency, which is how bandwidth, filters and noise are measured.

The theorem

∫−∞∞∣f(t)∣2 dt=∫−∞∞∣f^(s)∣2 ds\int_{-\infty}^{\infty} \lvert f(t) \rvert^2\, dt = \int_{-\infty}^{\infty} \lvert \hat{f}(s) \rvert^2\, ds

More generally the transform preserves inner products, ∫fgˉ dt=∫f^ g^‾ ds\int f \bar{g}\,dt = \int \hat{f}\,\overline{\hat{g}}\,ds: it is a unitary operator, the continuous analogue of an orthogonal change of basis.

python · try it yourself
import numpy as np

dt = 0.001
t = np.arange(-30, 30, dt)
s = np.arange(-30, 30, 0.01)

def ft(f, freqs):
    return np.array([np.sum(f * np.exp(-2j * np.pi * fr * t)) * dt for fr in freqs])

f = np.where(t >= 0, np.exp(-2 * np.clip(t, 0, None)), 0.0)    # one-sided exponential, a = 2
E_time = np.sum(np.abs(f) ** 2) * dt
F = 1 / (2 + 2j * np.pi * s)                                    # its known transform
E_freq = np.sum(np.abs(F) ** 2) * 0.01
print(f"energy in time:      {E_time:.5f}   (exact 1/(2a) = 0.25)")
print(f"energy in frequency: {E_freq:.5f}")
energy in time:      0.25050   (exact 1/(2a) = 0.25)
energy in frequency: 0.24831

The frequency integral misses a little energy in the tails beyond ∣s∣=30\lvert s \rvert = 30, since this spectrum decays only like 1/s1/s, and the time sum is slightly above 0.25 because the rectangle rule counts the jump at t=0t = 0 with its full height.

A surprising integral

Plancherel turns hard integrals into easy ones. Since Π↔sinc⁡\Pi \leftrightarrow \operatorname{sinc} and ∫Π2=1\int \Pi^2 = 1:

∫−∞∞sinc⁡2(s) ds=∫−∞∞(sin⁡πsπs)2ds=1\int_{-\infty}^{\infty} \operatorname{sinc}^2(s)\, ds = \int_{-\infty}^{\infty} \left(\frac{\sin \pi s}{\pi s}\right)^2 ds = 1
python · try it yourself
import numpy as np

for L in (10, 100, 1000):
    s = np.linspace(-L, L, 400 * L + 1)
    val = np.sum(np.sinc(s) ** 2) * (s[1] - s[0])
    print(f"integral of sinc^2 over [-{L}, {L}]: {val:.6f}")
integral of sinc^2 over [-10, 10]: 0.989873
integral of sinc^2 over [-100, 100]: 0.998987
integral of sinc^2 over [-1000, 1000]: 0.999899

The integral approaches 1; the tails beyond ∣s∣=L\lvert s \rvert = L hold about 1/(π2L)1/(\pi^2 L).

Bandwidth as an energy fraction

A useful definition of bandwidth is the frequency range holding, say, 99 % of the energy. For a rectangular pulse of width 1, the main lobe ∣s∣<1\lvert s \rvert < 1 holds about 90 %:

python · try it yourself
import numpy as np

s = np.linspace(-500, 500, 2_000_001)
ds = s[1] - s[0]
density = np.sinc(s) ** 2
total = np.sum(density) * ds
for B in (0.5, 1, 2, 10):
    frac = np.sum(density[np.abs(s) < B]) * ds / total
    print(f"|s| < {B:4}: {100 * frac:.2f} % of the energy")
|s| <  0.5: 77.36 % of the energy
|s| <    1: 90.30 % of the energy
|s| <    2: 95.01 % of the energy
|s| <   10: 99.01 % of the energy

Sharp edges make the energy spread far: even ∣s∣<10\lvert s \rvert < 10 misses about 1 %. Smooth pulses, such as Gaussians or raised cosines, concentrate their energy much better, which is why communication systems shape their pulses.

In software

  • Power spectral densities (Power Spectra and Noise) are Plancherel applied to random signals; scipy.signal.welch estimates them.
  • Energy conservation is a standard unit test for FFT code (with the right normalization, norm="ortho").

Exercises

Exercise 1: Energy of a Gaussian

Compute ∫e−2πt2 dt\int e^{-2\pi t^2}\,dt (the energy of e−πt2e^{-\pi t^2}) and check it with Plancherel.

Answer

1/2≈0.70711/\sqrt{2} \approx 0.7071.

Solution

∫e−2πt2dt=1/2\int e^{-2\pi t^2} dt = 1/\sqrt{2} (a Gaussian integral). The spectrum e−πs2e^{-\pi s^2} has the same energy, ∫e−2πs2ds=1/2\int e^{-2\pi s^2} ds = 1/\sqrt{2}, as Plancherel demands.

Exercise 2: Energy of a filtered signal

A filter multiplies the spectrum by H(s)H(s) with ∣H(s)∣≤1\lvert H(s) \rvert \le 1. Can the output have more energy than the input?

Answer

No.

Solution

The output energy is ∫∣Hf^∣2ds≤∫∣f^∣2ds\int \lvert H \hat{f} \rvert^2 ds \le \int \lvert \hat{f} \rvert^2 ds, the input energy. A filter that never amplifies any frequency can only remove energy.

Exercise 3: Triangle energy (code)

Verify Plancherel for the triangle Λ(t)\Lambda(t): compute ∫Λ2 dt\int \Lambda^2\,dt and ∫sinc⁡4(s) ds\int \operatorname{sinc}^4(s)\,ds.

Answer

Both equal 2/32/3.

Solution
python · try it yourself
import numpy as np
t = np.linspace(-1, 1, 200001)
print(round(np.sum(np.clip(1 - np.abs(t), 0, None) ** 2) * (t[1] - t[0]), 6))
s = np.linspace(-200, 200, 4000001)
print(round(np.sum(np.sinc(s) ** 4) * (s[1] - s[0]), 6))
0.666667
0.666667

Test yourself

Plancherel's theorem says the Fourier transform preserves…

  1. the maximum value
  2. energy (and inner products)
  3. the number of zeros
  4. the sign

∣f^(s)∣2\lvert \hat{f}(s) \rvert^2 is interpreted as…

  1. the phase
  2. an energy density over frequency
  3. the signal's derivative
  4. its average

Why does a rectangular pulse need a wide bandwidth for 99 % of its energy?

  1. it is too long
  2. its sharp edges make the spectrum decay slowly, like 1/s21/s^2 in energy
  3. it has no energy
  4. it is periodic