∿ LEARN DSPFrom signal to HF transceiver
Part roadmap

Fourier, DFT and FFT

Learn to read a spectrum and to take into account the effect of a finite record length.

Goal

Learn to read a spectrum and to take into account the effect of a finite record length.

Prerequisites: Parts 01–02.

Lessons and next steps

  1. Fourier as a bank of correlators: multiply by a reference rotation and add the results.
  2. The DFT by hand and the FFT as its fast algorithm: bin order, the idea of splitting in half, and a speed comparison.
  3. The DFT frequency grid: step Fs/N, the fftfreq and fftshift functions, magnitude, phase and decibels.
  4. Spectral leakage: a tone between grid frequencies, Hann/Hamming/Blackman windows, and zero padding of the record.
  5. Single-sided and two-sided amplitude spectrum; power and its power spectral density (PSD).

Lab: experiments for this part

  • Split a sum of tones, follow the output of one correlator, and compare a manual DFT with np.fft.fft.
  • Move a tone relative to the grid and change the window; compare a longer record with zero padding.
  • Check the amplitude of a known tone and check that the power in time agrees with the power in the spectrum.

We do the experiments in Python with NumPy, SciPy and Matplotlib. We keep the parameters, units and plots. The base models use float64 and complex128; we add bit-depth limits in separate experiments.

Completion criteria

  • I can tell the difference between the frequency grid step and the ability to separate two near tones.
  • I state the spectrum normalization, the units and the correction for the window that I use.

Result for the main project

Functions that plot a time graph, an amplitude spectrum and a PSD.