Lesson 9 of 30 intermediate 4 min read

Before this:The FFT in practiceWindows & spectral leakage

Spectrograms & the STFT

Key takeaways A single FFT tells you which frequencies are present but not when. The short-time Fourier transform (STFT) fixes that by running an FFT on each short window as it slides along the signal, giving one spectrum per moment. Stack those spectra into a spectrogram — time on one axis, frequency on the other, magnitude as brightness — and you get the waterfall every SDR shows.

The FFT gave us a snapshot of a signal’s frequencies. But radio is alive — carriers come and go, signals drift and chirp. To see change, we slide the FFT along time. This lesson builds on the FFT and windows & leakage, and explains the display from FFT & waterfall.

Why one FFT isn’t enough

Take an FFT of a ten-second recording and you learn every frequency that appeared — but a carrier that switched on for one second looks the same as one that was on the whole time. All timing information is smeared into a single spectrum. For a live band where signals appear, transmit, and vanish, that is nearly useless. We need a spectrum for each moment.

The short-time Fourier transform

The fix is simple in concept: don’t transform the whole signal at once. Chop it into short, overlapping windows and take an FFT of each one.

signal:  [====================================================]
window1: [======]                    -> FFT -> spectrum @ t1
window2:     [======]                -> FFT -> spectrum @ t2
window3:         [======]            -> FFT -> spectrum @ t3
   ...   (slide by the hop size)         ...

Each FFT is windowed first (a Hann or Kaiser taper from the leakage lesson) to keep its spectrum clean. The step between successive windows is the hop size; windows usually overlap so nothing between them is missed. The result is a two-dimensional array: frequency down one axis, time along the other.

Reading a spectrogram

Colour-map each spectrum’s magnitude — dark for quiet, bright for strong — lay the columns side by side, and you have a spectrogram.

time → frequency steady carrier chirp / drift burst
A spectrogram: horizontal lines are steady carriers, sloping streaks are drifting or chirping signals, and rectangles are bursts that start and stop.

A waterfall is exactly this, drawn live: each incoming block becomes one FFT column, scrolled across the display. Reading it is reading a spectrogram.

The resolution tradeoff, again

The STFT can’t escape the time-vs-frequency tradeoff. A long window gives fine frequency resolution but blurs when things happened; a short window pinpoints timing but smears frequency. Choosing the window length is choosing where on that tradeoff you want to sit — wide for spotting a fleeting burst, narrow for separating two close carriers.

Window length Frequency detail Time detail Good for
Long fine coarse separating nearby carriers
Short coarse fine catching brief bursts, fast changes

Quick check: what does the STFT add over a single FFT?

Recap

  • A single FFT shows which frequencies but not when.
  • The STFT runs an FFT on each sliding, overlapping window — one spectrum per moment.
  • Stacked and colour-mapped, those spectra form a spectrogram; drawn live it’s a waterfall.
  • Window length sets the time-vs-frequency tradeoff: long for detail, short for speed.

Next up: how a real signal becomes complex I/Q in the first place — the analytic signal.

Frequently asked questions

What is the difference between an FFT and an STFT?

A single FFT gives you one spectrum for a whole block of samples, with no sense of when each frequency occurred. The short-time Fourier transform runs many FFTs, one on each short window as it slides along the signal, producing a spectrum for every moment. Stack those spectra and you can see how the signal’s frequency content evolves over time.

Is a waterfall display a spectrogram?

Yes. A waterfall is a spectrogram drawn in real time: each new row is one FFT of the most recent block of samples, colour-mapped by magnitude and scrolled down the screen. Reading it means reading a spectrogram — bright vertical lines are steady carriers, sloping streaks are drifting or chirping signals.