PHYS-230 · Lesson 7 of 12 · 26 min
Fourier analysis, dispersion and wave packets
In 1807 Joseph Fourier presented a memoir on heat flow to the Paris Academy claiming that any function on an interval, even one with corners and jumps, can be written as a sum of sines and cosines. The examiners, who included Lagrange, were doubtful, and the work was published in full only in 1822 as The Analytical Theory of Heat. Fourier was essentially right, and his idea is now one of the most used tools in science and engineering. For waves it means that any disturbance can be analysed as a superposition of sinusoids, each of which we already understand. This lesson develops Fourier series and transforms, the trade-off between duration and bandwidth, the discrete Fourier transform that computers use, and then dispersion: what happens to a wave packet when sinusoids of different frequencies travel at different speeds. That leads to the group velocity, the speed at which energy and information actually travel.
Fourier series
A function \(f(t)\) with period \(T\) and angular frequency \(\omega_1 = 2\pi/T\) can be written
The coefficient formulas follow by multiplying the series by \(\cos m\omega_1t\) or \(\sin m\omega_1t\), integrating over a period, and using orthogonality: the integral of a product of two different harmonics over a period is zero, and the integral of a harmonic squared is \(T/2\). For any function that is piecewise smooth, Dirichlet proved in 1829 that the series converges to \(f(t)\) where \(f\) is continuous and to the midpoint of the jump where it is not. The complex form is often neater: \(f(t) = \sum_{n=-\infty}^{\infty} c_ne^{in\omega_1t}\) with \(c_n = \frac1T\int_0^T f(t)e^{-in\omega_1t}\,dt\).
Take the square wave equal to \(+1\) for \(0 < t < T/2\) and \(-1\) for \(T/2 < t < T\). It is odd, so all \(a_n = 0\), and
which is \(4/n\pi\) for odd \(n\) and zero for even \(n\). So
The coefficients fall only as \(1/n\), because the function has jumps; a function with corners but no jumps, like the plucked string of lesson 6, has coefficients falling as \(1/n^2\), and smoother functions converge faster still. Near a jump the partial sums overshoot. However many terms are kept, the first peak beside the jump exceeds the true value by about 9 parts in a hundred of the size of the jump; the overshoot narrows toward the jump but does not shrink. This is the Gibbs phenomenon, described by Henry Wilbraham in 1848 and by J. Willard Gibbs in 1898–99, and it is why sharp edges in images and audio processed with truncated Fourier series show ringing.
Energy is shared among the harmonics. Parseval's theorem states that the mean square of the function equals the sum of the mean squares of its harmonics, \(\frac1T\int_0^T f^2\,dt = \frac{a_0^2}{4} + \frac12\sum(a_n^2 + b_n^2)\). For the square wave the left side is 1, and the right side is \(\frac12\cdot\frac{16}{\pi^2}(1 + \frac19 + \frac1{25} + \cdots)\), which gives Euler's famous sum \(1 + \frac19 + \frac1{25} + \cdots = \pi^2/8\). For a sound wave Parseval says the power is the sum of the powers in each harmonic, which is what a spectrum analyser displays.
The Fourier transform
A pulse that happens once is not periodic. Let the period \(T\) grow without bound: the harmonics \(n\omega_1\) crowd together into a continuum, and the series becomes an integral,
\(F(\omega)\) is the spectrum of the pulse: how much of each frequency it contains. Two examples matter most. A Gaussian pulse \(f(t) = e^{-t^2/2\tau^2}\) has a Gaussian spectrum \(F(\omega) = \sqrt{2\pi}\,\tau\,e^{-\omega^2\tau^2/2}\), of width \(1/\tau\) in angular frequency. A finite wave train, \(\cos\omega_0t\) switched on for a duration \(\Delta t\), has a spectrum centred on \(\omega_0\) with width of order \(2\pi/\Delta t\). In both cases the product of the duration and the bandwidth is fixed: short pulses are broadband and narrow spectral lines require long wave trains. With rms widths the precise statement is
with equality for the Gaussian. This bandwidth theorem is pure mathematics, not physics, but it has physical consequences everywhere. It is why the resonance of lesson 3 with width \(\gamma\) rings for a time \(1/\gamma\); why a 10 fs laser pulse at 800 nm must contain wavelengths spread over about 100 nm; why a digital link that sends a billion pulses per second needs a gigahertz of bandwidth; and, multiplied by Planck's constant, why quantum mechanics has the energy-time uncertainty relation.
The discrete Fourier transform
A computer samples a signal at \(N\) equally spaced times \(t_j = j\Delta t\) and computes
the discrete Fourier transform. Component \(k\) corresponds to frequency \(k/(N\Delta t)\), so the frequency resolution is \(1/(N\Delta t)\), the reciprocal of the record length, another form of the bandwidth theorem. Sampling imposes a limit too. A sinusoid at frequency \(f\) and one at \(f + 1/\Delta t\) give identical samples, so frequencies above the Nyquist frequency \(f_s/2\), half the sampling rate, are indistinguishable from lower ones: they alias. Harry Nyquist identified the limit in 1928, and Claude Shannon's sampling theorem of 1949 showed that a signal containing no frequencies above \(f_s/2\) is completely determined by its samples. CD audio samples at 44.1 kHz so that the whole audible range up to about 20 kHz is captured. Computed directly, the transform takes about \(N^2\) operations; the fast Fourier transform published by James Cooley and John Tukey in 1965, anticipated by Gauss around 1805, takes about \(N\log_2N\), which turns a million-point transform from a trillion operations into twenty million.
Worked problem
Reading a spectrum
A signal is sampled at 1000 Hz for 0.5 s. What is the frequency resolution, what is the highest frequency that can be represented, and where does a 700 Hz tone appear?
Show solution
- \(N = 500\) samples, so the resolution is \(1/(0.5\ \mathrm{s}) = 2\ \mathrm{Hz}\).
- The Nyquist frequency is \(1000/2 = 500\ \mathrm{Hz}\).
- A 700 Hz tone aliases to \(|700 - 1000| = 300\ \mathrm{Hz}\).
Answer: 2 Hz resolution, 500 Hz maximum, and the 700 Hz tone masquerades as 300 Hz. An analogue low-pass filter before the sampler, the anti-aliasing filter, prevents this.
Dispersion
On an ideal string every frequency travels at the same speed, so a pulse keeps its shape. In a dispersive medium the phase velocity \(\omega/k\) depends on frequency, and the components of a pulse drift apart. Examples are everywhere. Deep-water surface waves obey \(\omega = \sqrt{gk}\), so long waves outrun short ones. Light in glass has a refractive index that falls with wavelength, so blue travels more slowly than red, which is why prisms spread white light. A stiff piano string has \(\omega^2 = v^2k^2 + \beta k^4\), which makes its upper partials slightly sharp of true harmonics, a property tuners compensate for by stretching the octaves. And the electron gas in the ionosphere gives radio waves \(\omega^2 = \omega_p^2 + c^2k^2\), with no propagation at all below the plasma frequency \(\omega_p\).
Phase and group velocity
Superpose two waves of nearly equal wavenumber and frequency, \(k \pm \Delta k\) and \(\omega \pm \Delta\omega\):
The fast factor is a carrier wave whose crests move at the phase velocity \(v_p = \omega/k\). The slow factor is an envelope, a pattern of beats in space, whose peaks move at \(\Delta\omega/\Delta k\). In the limit of a narrow band of wavenumbers this becomes the group velocity
A general packet \(\int A(k)e^{i(kx - \omega(k)t)}dk\) with \(A(k)\) peaked at \(k_0\) can be handled by expanding \(\omega(k) \approx \omega_0 + v_g(k - k_0)\): the integral becomes \(e^{i(k_0x - \omega_0t)}\) times a function of \(x - v_gt\) alone, so the envelope moves rigidly at \(v_g\) to first order. The second-order term \(\tfrac12\omega''(k - k_0)^2\) makes the envelope spread, which is group-velocity dispersion. Energy and information travel with the envelope, at the group velocity. For deep-water waves \(\omega = \sqrt{gk}\) gives \(v_g = \tfrac12\sqrt{g/k} = v_p/2\): watch the wake of a boat and you see individual crests appear at the back of a wave group, run forward through it and vanish at the front. For light in a medium of index \(n(\lambda)\), the group index is \(n_g = n - \lambda\,dn/d\lambda\), larger than \(n\) in normal dispersion, so pulses in an optical fibre travel more slowly than the phase velocity \(c/n\).
The phase velocity can exceed \(c\), for example for X-rays in glass, where the refractive index is slightly less than 1, or in the ionosphere. This does not violate relativity, because no energy or signal travels at the phase velocity. In ordinary media the group velocity is less than \(c\). In regions of strong absorption it can formally exceed \(c\) or even become negative, but the signal velocity, the speed of the front of a sharply switched-on wave, never exceeds \(c\), as Arnold Sommerfeld and Léon Brillouin showed in 1914.
Worked problem
Ocean swell from a distant storm
A storm 2000 km away generates swell with periods from 8 to 16 s. Using \(\omega = \sqrt{gk}\), find the group velocities and arrival times.
Show solution
- With \(\omega = 2\pi/T\) and \(k = \omega^2/g\), \(v_p = \omega/k = g/\omega = gT/2\pi\) and \(v_g = v_p/2 = gT/4\pi\).
- For \(T = 16\ \mathrm{s}\): \(v_g = 9.81 \times 16/4\pi = 12.5\ \mathrm{m/s}\); arrival after \(2\times10^6/12.5 = 1.6\times10^5\ \mathrm{s}\), about 44 hours.
- For \(T = 8\ \mathrm{s}\): \(v_g = 6.2\ \mathrm{m/s}\), arrival after about 89 hours.
Answer: The long-period swell arrives about two days before the short-period swell. Walter Munk used exactly this dispersion to trace swell reaching California back to storms in the Southern Ocean in the 1960s.
Computing spectra and packets
The program builds square-wave partial sums and measures the Gibbs overshoot, takes the discrete Fourier transform of a two-tone signal to recover its frequencies and amplitudes, demonstrates aliasing, and propagates a deep-water wave packet by summing its Fourier components, tracking its envelope peak and a single crest.
import math, cmath
# 1. Gibbs overshoot: maximum of the partial sum just after the jump at t = 0 (period 2 pi)
def partial(t, N):
return 4 / math.pi * sum(math.sin((2*m + 1) * t) / (2*m + 1) for m in range(N))
for N in (5, 20, 80):
peak = max(partial(i * 1e-4, N) for i in range(1, int(math.pi / (2*N) * 1e4 * 2)))
print(f"{N:3d} odd terms: peak {peak:.5f}, overshoot = {(peak - 1)/2:.4f} of the jump")
# 2. DFT of a two-tone signal sampled at 1000 Hz for 0.5 s
fs, N = 1000, 500
sig = [1.0*math.sin(2*math.pi*50*j/fs) + 0.5*math.sin(2*math.pi*120*j/fs) for j in range(N)]
def dft(x):
n = len(x)
return [sum(x[j] * cmath.exp(-2j*math.pi*j*k/n) for j in range(n)) for k in range(n // 2)]
F = dft(sig)
peaks = sorted(range(len(F)), key=lambda k: -abs(F[k]))[:2]
for k in sorted(peaks):
print(f"peak at {k*fs/N:.0f} Hz, amplitude {2*abs(F[k])/N:.3f}")
# 3. aliasing: a 700 Hz tone sampled at 1000 Hz
alias = [math.sin(2*math.pi*700*j/fs) for j in range(N)]
Fa = dft(alias)
k = max(range(len(Fa)), key=lambda k: abs(Fa[k]))
print(f"700 Hz tone appears at {k*fs/N:.0f} Hz")
# 4. deep-water packet: superpose components with omega = sqrt(g k)
g, k0, sk = 9.81, 2*math.pi/20, 0.02 # carrier wavelength 20 m
ks = [k0 + sk * (i - 40) / 10 for i in range(81)]
amps = [math.exp(-((kk - k0)/sk)**2 / 2) for kk in ks]
def eta(x, t):
return sum(a * math.cos(kk*x - math.sqrt(g*kk)*t) for a, kk in zip(amps, ks))
def envelope(x, t):
return abs(sum(a * cmath.exp(1j*(kk*x - math.sqrt(g*kk)*t)) for a, kk in zip(amps, ks)))
vp = math.sqrt(g / k0); vg = vp / 2
for t in (0.0, 60.0):
xs = [i * 0.5 for i in range(-200, 1200)]
xpk = max(xs, key=lambda x: envelope(x, t))
print(f"t = {t:4.0f} s: envelope peak at x = {xpk:6.1f} m (v_g t = {vg*t:6.1f} m), crest speed v_p = {vp:.2f} m/s")5 odd terms: peak 1.18233, overshoot = 0.0912 of the jump 20 odd terms: peak 1.17919, overshoot = 0.0896 of the jump 80 odd terms: peak 1.17899, overshoot = 0.0895 of the jump peak at 50 Hz, amplitude 1.000 peak at 120 Hz, amplitude 0.500 700 Hz tone appears at 300 Hz t = 0 s: envelope peak at x = 0.0 m (v_g t = 0.0 m), crest speed v_p = 5.59 m/s t = 60 s: envelope peak at x = 168.0 m (v_g t = 167.6 m), crest speed v_p = 5.59 m/s
The overshoot settles at about 0.0895 of the jump, the Gibbs constant, regardless of the number of terms. The transform recovers the 50 Hz and 120 Hz tones with amplitudes 1.0 and 0.5, and the 700 Hz tone appears at 300 Hz, as the worked example predicted. The packet's envelope peak moves at the group velocity, half the speed of its crests: after 60 s it has travelled about \(v_g t\), while a crest has gone twice as far.
Common mistakes
MistakeExpecting the Gibbs overshoot to vanish as more Fourier terms are added.
InsteadIt narrows but stays at about 9 parts in a hundred of the jump; only smoothing the coefficients removes it.
MistakeThinking a short pulse can have a narrow spectrum.
InsteadDuration and bandwidth satisfy \(\Delta t\,\Delta\omega \ge \tfrac12\).
MistakeIgnoring aliasing when sampling.
InsteadFrequencies above half the sampling rate fold back; filter before sampling.
MistakeAssuming energy travels at the phase velocity.
InsteadEnergy and information travel at the group velocity \(d\omega/dk\).
MistakeConcluding a phase velocity greater than \(c\) violates relativity.
InsteadNo signal travels at the phase velocity; the signal front never exceeds \(c\).
Summary and key terms
- Periodic functions are sums of harmonics with coefficients found by orthogonality; the square wave is \(\frac4\pi\sum_{\text{odd } n}\sin(n\omega_1t)/n\).
- Partial sums overshoot jumps by about 9 parts in a hundred (Gibbs); Parseval equates mean square to the sum of harmonic powers.
- The Fourier transform gives the spectrum of a pulse; duration and bandwidth obey \(\Delta t\,\Delta\omega \ge \tfrac12\).
- The DFT has resolution \(1/(N\Delta t)\); frequencies above \(f_s/2\) alias; the FFT costs \(N\log N\).
- In dispersive media \(v_p = \omega/k\) and \(v_g = d\omega/dk\) differ; deep-water waves have \(v_g = v_p/2\).
- Fourier series
- The expansion of a periodic function as a sum of sines and cosines of harmonic frequencies.
- Gibbs phenomenon
- The persistent overshoot of Fourier partial sums near a jump.
- spectrum
- The distribution of a signal over frequency, given by its Fourier transform.
- aliasing
- The appearance of a frequency above half the sampling rate as a lower frequency.
- dispersion
- Dependence of wave speed on frequency or wavelength.
- group velocity
- The speed of a wave envelope, d omega over d k, at which energy travels.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Find the Fourier series of the sawtooth \(f(t) = t\) on \(-\pi < t < \pi\), repeated.
Show answer
Odd, so \(b_n = \frac1\pi\int_{-\pi}^{\pi}t\sin nt\,dt = 2(-1)^{n+1}/n\): \(f = 2(\sin t - \tfrac12\sin2t + \tfrac13\sin3t - \cdots)\).
Use Parseval on the sawtooth to evaluate \(\sum 1/n^2\).
Show answer
\(\frac1{2\pi}\int t^2\,dt = \pi^2/3 = \frac12\sum 4/n^2\), so \(\sum 1/n^2 = \pi^2/6\).
A Gaussian laser pulse at 800 nm has rms duration 5.0 fs. Find its minimum rms spread in frequency and in wavelength.
Show answer
\(\Delta\omega = 1/(2\Delta t) = 1.0\times10^{14}\ \mathrm{rad/s}\), so \(\Delta f = 1.6\times10^{13}\ \mathrm{Hz}\) and \(\Delta\lambda = \lambda^2\Delta f/c \approx 34\ \mathrm{nm}\) rms.
A signal containing 30 kHz is sampled at 44.1 kHz. Where does it appear?
Show answer
At \(44.1 - 30 = 14.1\ \mathrm{kHz}\), squarely in the audible band, unless filtered first.
For capillary waves \(\omega^2 = (\sigma/\rho)k^3\). Find \(v_g/v_p\).
Show answer
\(\omega \propto k^{3/2}\), so \(v_g = \tfrac32\omega/k = \tfrac32 v_p\): ripples' crests move backward through the group.
Glass has \(n = 1.500\) at 600 nm with \(dn/d\lambda = -4.0\times10^{-5}\ \mathrm{nm^{-1}}\). Find the group index.
Show answer
\(n_g = n - \lambda\,dn/d\lambda = 1.500 + 600(4.0\times10^{-5}) = 1.524\).
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.