Signals to learning / 4. Change coordinates

Lesson 15 of 40 · Intermediate · About 30 minutes

Windows and leakage

Why does one tone make many spectral bars?

You will be able to

  • Explain finite-record leakage and window trade-offs.
  • Separate zero-padding grid density from resolving power.

A record boundary is part of the model

The DFT basis assumes the finite record repeats. A tone with a non-integer number of cycles can have a jump at that periodic boundary, spreading its coefficients across bins. Multiplying by a tapered window softens boundaries and reduces distant sidelobes, but widens the main lobe.

A finer grid is not a longer observation

Zero-padding before an FFT samples the same windowed record’s spectrum more densely. It does not create extra measured time or guarantee separation of nearby tones. Window amplitude correction depends on purpose: this lab divides by coherent gain for tone amplitude, while noise-power density needs a different calibration.

x_w[n] = x[n]w[n]; coherent gain = (1/N)Σₙw[n]

Worked example

At 64 samples/s with 64 samples, a 5 Hz tone is bin-centred; 5.5 Hz is not. A longer measured record narrows frequency features, whereas padding the same record only supplies more grid points.

A common trap

A window does not universally improve resolution: lower sidelobes usually come with a wider main lobe.

Predict, then experiment

Will Hann tapering make the 5.5 Hz tone appear in exactly one bin? Before touching the controls, say or write your prediction.

Try it yourself

A tone between bins

Where does a finite record put its spectral amplitude?

64 samples at 64 Hz. Solid is rectangular-window spectrum; dashed is selected window spectrum. 0=rectangular, 1=symmetric Hann. One-sided tone amplitude is corrected by window coherent gain; this is not a noise-density calibration.

Your experiment

Compare rectangular and Hann windows for 5 and 5.5 Hz. Inspect both main-lobe width and distant bins; the displayed amplitude has coherent-gain compensation.

Change one parameter at a time. Compare what you observed with your prediction and record an explanation in your notes.

Check your understanding

Try from memory first. Hints and feedback are part of learning, not a penalty. These checks are for self-study, not a graded qualification.

1. Zero-padding a fixed record principally…
Give me a hint

Is the observation time longer?

2. For fₛ=1,000 Hz and a 250-sample record, what is the unpadded bin spacing?

Accepted absolute tolerance: ±0.001 Hz.

Give me a hint

Use fₛ/N.

Reference answers (after your attempt)
  1. densifies the frequency grid — Correct: it interpolates spectral grid samples.
  2. 4Hz — 1,000/250=4 Hz. This is grid spacing, not a universal two-tone resolution guarantee.

Apply it: Choose a window with a reason

Use paper, your notes, or a local notebook/editor. Code examples are Python 3 starting points to run yourself; this page does not execute code or automatically assess the practical task.

  1. Consider a small tone beside a much larger nearby tone.
  2. Explain why sidelobes and main-lobe width both matter.
  3. State what changing record duration does.
Reference solution & review criteria

Low sidelobes reduce masking by the large tone, but a wider main lobe may merge close tones. A longer actual observation can narrow features; padding alone cannot supply that benefit.

Your notebook

Notes and progress stay in this browser. They are not sent to the server; ordinary web-server request logs still operate. Export a backup from the course page.

Review list

Completion requires both correct checks and your practical-task acknowledgement.

Go deeper

Sources support further study; the worked examples and questions here are original. Browser experiments are small, disclosed models—not evidence of production-model quality or hardware performance.