Before this:Filtering & decimationDigital modulation & constellations
The demodulation pipeline
Key takeaways Turning IQ samples into usable bits is a five-stage pipeline: (1) digital tuning shifts your channel to centre; (2) filter + decimate isolates it cheaply; (3) demodulation recovers the modulating signal (FM/FSK/PSK); (4) symbol recovery times and slices it into symbols; (5) framing + decoding applies error correction and extracts the message. Demodulation handles the waveform; decoding handles the data. One shared IQ stream feeds one pipeline per channel, which is how GopherTrunk tracks many calls at once.
You’ve met the pieces — IQ, modulation, filtering. This lesson assembles them into the chain that every signal passes through inside an SDR decoder. It’s the detailed version of the antenna-to-audio story.
The pipeline overview
Stage 1 — Digital tuning
The captured IQ covers a whole band, but your channel sits somewhere off-centre. Digital tuning multiplies the IQ by a rotating tone to shift your channel down to zero frequency (baseband), so the next stage’s simple low-pass filter can isolate it. It’s the software equivalent of fine-tuning the dial — and, unlike hardware, you can do it for many channels at once from the same samples.
Stage 2 — Channel filtering and decimation
With the channel centred, a channel filter keeps just its narrow bandwidth and rejects neighbours and noise; decimation then drops the sample rate to suit that narrow signal. This is the filtering & decimation step, and it’s what makes the rest cheap enough to run in parallel.
Stage 3 — Demodulation
Now the channel is isolated at a manageable rate, demodulation recovers the modulating signal from the carrier, according to the modulation type:
- FM/FSK — track the instantaneous frequency; for 4FSK (P25/DMR) the output is a stream of four levels.
- PSK — track the phase angle of each IQ sample.
The output isn’t symbols yet — it’s a continuous, noisy stream that contains the symbols. This is the stage the constellation visualises.
Stage 4 — Symbol recovery
The demodulated stream has to be sliced into discrete symbols at exactly the right instants. That requires knowing the signal’s rhythm — clock recovery — so the decoder samples each symbol at its centre, where the eye diagram is most open. Get the timing right and the four levels resolve into clean symbols; get it wrong and symbols smear into their neighbours.
Stage 5 — Framing and decoding
Symbols become bits, but raw bits aren’t the message. Framing finds where packets begin (using known sync patterns), and decoding applies forward error correction (FEC) to fix the inevitable bit errors, then extracts the payload — a control-channel message, or vocoder frames for voice. Demodulation gave us a waveform; decoding gives us meaning.
Demodulation vs. decoding, and where failures live
It’s worth nailing the distinction: demodulation works on the waveform (stages 3–4), decoding works on the data (stage 5). Most failures show up at the boundary — a signal too weak or smeared for symbol recovery produces bit errors that FEC can’t fix. Because the constellation and eye diagram watch stage 3–4, they warn you before the decoded output fails, which is what makes them such good tuning tools.
How GopherTrunk runs many pipelines at once
Since every stage is arithmetic on the shared IQ stream, GopherTrunk instantiates one pipeline per channel — the control channel plus each active voice channel — and runs them concurrently. One radio, many simultaneous decodes. The Architecture page shows how this is wired in practice.
Notice how the data rate collapses as you move down the pipeline — which is why the expensive early stages are shared and the cheap late stages are many:
| Stage | Roughly how much data |
|---|---|
| Raw IQ in | ~2.4 M complex samples/s (the whole band) |
| After filter + decimate | ~24 k samples/s (one channel) |
| After symbol recovery | 4800 symbols/s |
| After decode | 9600 bits/s, then a handful of vocoder frames |
A million-to-one reduction from antenna to message — each stage throwing away what the next doesn’t need.
Quick check: which stage applies forward error correction and extracts the message?
Recap
- The pipeline: tune → filter/decimate → demodulate → recover symbols → frame/decode.
- Demodulation recovers the waveform; decoding (with FEC) recovers the message.
- Symbol recovery needs clock recovery to sample at the right instant.
- Failures cluster at demod/symbol-recovery — which the scopes reveal early.
- One IQ stream feeds many parallel pipelines.
Next: the timing trick at the heart of stage 4 — clock recovery.
Frequently asked questions
What are the stages of an SDR demodulation pipeline?
A typical pipeline has five stages — digital tuning to shift the wanted channel to centre, channel filtering and decimation to isolate it at a low sample rate, demodulation to recover the modulating information (FM, FSK, or PSK), symbol recovery to time and slice that into symbols, and framing and decoding to turn symbols into error-corrected bits and finally usable data or audio.
What is the difference between demodulation and decoding?
Demodulation recovers the raw modulating signal from the carrier — for example turning frequency shifts back into a stream of levels. Decoding is the later step that interprets the resulting symbols and bits — finding frame boundaries, applying error correction, and extracting the actual message. Demodulation deals with the waveform; decoding deals with the data.
Why does each channel need its own pipeline?
Each signal you follow needs to be individually tuned, filtered, demodulated, and decoded. Because the SDR captures a wide block of spectrum as shared IQ, software can run a separate pipeline per channel from that one stream — which is how a single radio can decode a control channel and several voice channels simultaneously.
Where in the pipeline do most decode failures happen?
Usually at demodulation and symbol recovery, when the signal is too weak or smeared for the symbols to be told apart cleanly, or at decoding when error correction can no longer fix the resulting bit errors. The constellation and eye-diagram views show problems at the demod/symbol stage before the failure reaches the decoded output.