Signals to learning / 4. Change coordinates

Lesson 14 of 40 · Intermediate · About 30 minutes

The discrete Fourier transform

What exactly is in an FFT output array?

You will be able to

  • Map a DFT bin to physical frequency.
  • Distinguish a transform definition from a fast implementation.

A reversible change of coordinates

The DFT maps N samples to N complex coefficients. With the forward transform unnormalised, the inverse divides by N. For real input, negative-frequency coefficients are conjugate mirrors. A one-sided amplitude plot doubles interior positive-frequency magnitudes but not DC or the even-length Nyquist bin.

FFT is an algorithm

A fast Fourier transform calculates the DFT by exploiting structure; it is not a different signal model. For radix-2 lengths, the staged butterfly graph gives O(N log N) arithmetic rather than the direct O(N²) sum. Frequency spacing is fₛ/N; higher-index bins beyond half the rate represent negative frequencies under the conventional ordering.

fₖ = kfₛ/N; x[n] = (1/N)Σₖ X[k] exp(i2πkn/N)

Worked example

N=64 at fₛ=64 Hz gives 1 Hz bin spacing. A unit-amplitude bin-centred sine has |X[k]|=32 at its positive bin, so the interior one-sided amplitude is 2×32/64=1.

A common trap

The magnitude spectrum alone does not generally let you reconstruct the original waveform; the phase coordinates matter.

Predict, then experiment

Which bin should contain a 7 Hz tone when fₛ=N=64? Before touching the controls, say or write your prediction.

Interactive experiment

Harmonic composer

How do amplitude, frequency and phase appear in a discrete spectrum?

The waveform is the sample-wise sum; its vertical scale is automatic and labelled. The spectrum view shows 0–16 Hz of the available 0–32 Hz band. Bars use the left amplitude scale; phase points use the right −π to +π radian scale. Phase is omitted below amplitude 0.03.

Your experiment

Set Tone A to 7 Hz, amplitude 1, phase 0°; set Tone B amplitude to 0. Inspect the 7 Hz bar, then change phase while keeping frequency fixed.

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. An FFT is…
Give me a hint

Separate the definition from its algorithm.

2. With fₛ=800 Hz and N=100, what is bin spacing?

Accepted absolute tolerance: ±0.001 Hz.

Give me a hint

Divide rate by transform length.

Reference answers (after your attempt)
  1. a fast algorithm for the DFT — Correct: same mathematical coefficients, different computation.
  2. 8Hz — 800/100=8 Hz.

Apply it: Audit transform scaling

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. Specify forward and inverse normalisation.
  2. Calculate the one-sided amplitude of an interior bin with |X|=16 and N=64.
  3. State the DC/Nyquist exception.
Reference solution & review criteria

With an unnormalised forward DFT, amplitude=2×16/64=0.5 at an interior positive bin. DC and Nyquist use |X|/N; other software normalisations must be accounted for.

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.