Fanlab

Physics · Oscillations and waves · Year 3

Fourier: the spectrum of sound

How does a spectrum analyser tell a pipe from a drum at a glance?

Open the experiment

The situation

In the music room a nay, a doira and a dutar are playing. A microphone sends the sound to an oscilloscope: the nay draws an almost smooth sine wave on the screen, the dutar a complex but repeating curve, and in the doira no repetition can be seen at all. Can any periodic sound be broken down into a sum of simple sine waves? How does a spectrum analyser “recognise” an instrument at a glance?

Topic

Fourier analysis. Sound spectrum: telling a doira from a nay

Key ideas

  • Fourier series
  • Spectrum and FFT
  • Gibbs phenomenon

Formulas

s(t)=∑n=1∞bnsin⁡(2πnf0t)

Fourier series (for an odd signal): a periodic signal is a sum of sine waves with frequencies that are multiples of f0.

bn=2T∫0Ts(t)sin⁡(2πnf0t)dt

Amplitude of the nth harmonic. T=1/f0 is the period.

ssq(t)=4π∑n oddsin⁡(2πnf0t)n

Square wave: only odd harmonics, with amplitudes falling as 1/n.

Xk=∑m=0N−1xme−2πikm/N

Discrete Fourier transform. The FFT computes it in Nlog2⁡N operations (N=4096, Δf=fs/N≈3.9 Hz).

fmn=jmn2πRTσ

Modes of a circular membrane: jmn are the zeros of the Bessel function (2.405; 3.832; 5.136; 5.520), T is the tension, σ is the surface density.

Theory

A sum of harmonics

Any periodic signal (with period T=1/f0) can be broken down into a sum of sine waves with frequencies f0,2f0,3f0,… — this is the Fourier series. Each sine wave is a rotating vector (a phasor): its length is the amplitude and its rotation rate is the frequency. The height of the tip of the chain of phasors on the board draws exactly the signal (slowed down 1000 times on the screen).

Spectrum and FFT

The spectrum shows how much amplitude there is at each frequency. The analyser takes N=4096 points of the signal (0.256 s at fs=16 kHz), smooths them with a Hann window and computes the fast Fourier transform (FFT). The frequency resolution is Δf=fs/N≈3.9 Hz: peaks closer than this merge together.

Gibbs phenomenon

If we build a discontinuous signal (square, sawtooth) from a finite number of harmonics, an “overshoot” appears next to the jump. As the harmonics are added it becomes narrower and moves closer to the jump, but its height stays at about 9 % of the jump. The root-mean-square error, however, tends to zero — the series approaches the signal “in energy”.

Instrument timbre

The sound of the nay is almost a sine wave: a strong fundamental and a few weak harmonics. The harmonics of a string are whole-number multiples, but they depend on where it is plucked (the dutar is plucked at x0=L/5: the 5th and 10th harmonics are missing). The modes of the doira membrane are determined by the zeros of the Bessel function: the frequency ratios are 1 : 1.593 : 2.136 : 2.295 — not whole numbers, so the waveform does not repeat. The model is simplified: an ideal membrane (the effect of the air and the jingling of the rings is ignored), and the instrument spectra are approximate.

The Fourier integral and the delta function

If we make the period T infinitely long, the spacing between harmonics f0=1/T tends to zero and the series turns into the Fourier integral: S(f)=∫−∞∞s(t)e−2πiftdt,  s(t)=∫−∞∞S(f)e2πiftdf. The spectrum of a non-periodic signal (a single strike, a decaying doira) is no longer separate lines but a continuous curve. The shorter the signal, the wider its spectrum: ΔtΔf∼1. The analyser also takes only a 0.256 s piece of the signal, so each harmonic comes out as a peak a few hertz wide (1/0.256 s≈4 Hz). Two limiting cases: the spectrum of an infinitely long sine wave is an infinitely thin peak at f0 with a finite area, the Dirac delta function δ(f−f0) (δ=0 if f≠f0; ∫δdf=1); the spectrum of an infinitely short “click” δ(t) is the same at all frequencies. Vector algebra, the Gauss and Stokes theorems, curvilinear coordinates and the delta function in fields — in the “Vector fields: div and curl” experiment.

Did you know?

  • In 1822 Joseph Fourier published the book “The Analytical Theory of Heat”: in it the idea of expanding a function into a series of sines and cosines was used to calculate how heat spreads.
  • The fast Fourier transform (FFT) algorithm was published in 1965 by J. Cooley and J. Tukey. A similar method was used by C. F. Gauss around 1805, but it was printed only after his death.

Inside the experiment

The experiment starts from a real-life situation: you predict the result, change the controls, run the experiment and draw a conclusion. Inside are missions, theory, a quiz and a guided tour in which the camera moves and explains the key points.

More experiments in this section