TactivergeLite

Lite / Engineering Complex Systems / Week 21

Seeing a signal's ingredients

A chord played on a piano is one wobbly line on an oscilloscope. How can a tuner app name every note in it?

About 30 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Many problems that look hopeless in time are easy in frequency. A hum, a squeal or a failing bearing is a tall spike at one frequency even when it is invisible in the waveform. Engineers flip between the two views all day.

Predict

A signal is 1·sin(2π·2t) + 0.5·sin(2π·5t). What is its average power?

  1. 1.5
  2. 0.625
  3. 1.25
  4. 0.75
Guess first, then reveal

Different frequencies don't interfere on average, so powers add: 1²/2 + 0.5²/2 = 0.5 + 0.125 = 0.625. Check it with the synthesiser's 'Three tones' preset by zeroing component 3.

Discover

Load 'Three tones'. Read the spectrum bars, then change each phase and watch the time plot. Next put two components at the same frequency and vary one phase: what happens to that bar now?

What the interactive shows (text version)

With three tones at 2, 5 and 8 Hz the spectrum shows three bars of heights 1, 0.6 and 0.3. Changing phases changes the waveform's shape but not the bars. Putting two components at the same frequency makes one bar whose height depends on their phase difference (from the sum to the difference of the amplitudes).

You can also open the interactive on the full site when you have a faster connection.

Understand

Two views of one signal

The time domain shows value against time. The frequency domain shows how much of each frequency is present. A magnitude spectrum draws a bar of height Aᵢ at each fᵢ. The same information, arranged differently, like a recipe versus the cake.

Phase hides in the time view

Shifting a component's phase reshapes the waveform (peaks can line up or cancel) but leaves its bar the same. That is why two signals that look different can sound identical: your ear cares mostly about magnitudes. A full description keeps the phase too, so the time signal can be rebuilt.

Power adds across frequencies

Sinusoids of different frequencies average to zero when multiplied together, so the cross terms vanish and P = Σ Aᵢ²/2. That is Parseval's theorem in miniature: power computed in time equals power computed from the spectrum. Components at the same frequency are different: they combine as phasors first.

Explain it another way

Intuitive

A smoothie tastes like one thing, but its recipe card lists banana, strawberry and yoghurt with amounts. The spectrum is the recipe card of a signal.

Technical

Sinusoids at distinct frequencies are orthogonal over a common period: the average of sin(2πf₁t)·sin(2πf₂t) is 0 when f₁ ≠ f₂ and 1/2 when they are equal. Orthogonality is what lets a spectrum analyser measure each one separately.

Mathematical

x(t) = Σ Aᵢ sin(2πfᵢt + φᵢ). Mean of x² = Σᵢ Σⱼ AᵢAⱼ·mean[sin(…ᵢ) sin(…ⱼ)] = Σᵢ Aᵢ²/2 (distinct fᵢ).

Applied

Noise-cancelling headphones look for strong, steady spectral lines such as engine drone and subtract them; voices, which are spread across many frequencies, pass through.

Worked example 1

Sketch the spectrum of 3 + 2·cos(2π·10t) + sin(2π·30t).

A bar of height 3 at 0 Hz (DC), height 2 at 10 Hz and height 1 at 30 Hz. Power = 3² + 2²/2 + 1²/2 = 9 + 2 + 0.5 = 11.5.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. You change only the phase of one component. What changes?

Practice 5. Where does a constant offset appear in a spectrum?

Apply it

Record (or imagine) three sounds: a whistle, a vowel 'aaa' and a hiss. Sketch what you expect each spectrum to look like and justify each sketch in one sentence.

Reflect

Name one problem you would rather solve in the frequency domain than in the time domain, and say why.

Write your answer on paper or in your own notes. Lite never stores what you write.

← Stopping aliases before they startA square wave made of curves →