Linrad Notes
Source Issues

Linrad Notes

Unofficial notes on the internal DSP of Linrad, the software-defined-radio receiver by Leif Åsbrink, SM5BSZ, written from a reading of the source code. They cover the noise blankers, the two-channel adaptive-polarization (diversity) reception, and the FFT-based filter chain.

Linrad itself (source, binaries, and Leif's documentation) is at sm5bsz.com and on SourceForge; this fork, with SDRplay RSP (API 3.x) support, is the fventuri/linrad repository these notes accompany. The code is © Leif Åsbrink, MIT-licensed.

Linrad DSP signal chain

Each page pairs a description and a block diagram with a collapsible "In the source" panel pointing at the functions and lines it refers to.

Contents

  1. Signal-chain overview — the path from antenna to loudspeaker
  2. Architecture: threads and buffers — how the pipeline is wired
  3. First FFT and the strong/weak channel split — the split that feeds the noise blanker
  4. Noise blankers — the clever (pulse-fitting) and stupid (threshold) blankers
  5. Diversity and adaptive polarization — combining two RF channels for optimum signal-to-noise
  6. Mixers, filters, baseband and output — tuning, the baseband filter, AGC, demodulation and resampling
  7. AFC — cross-mode automatic frequency control that centres the signal
  8. Coherent CW and Morse decoding — coherent carrier extraction and Morse-to-ASCII
  9. Coherent output modes (Coh1–Coh4) — synchronous and binaural listening modes
  10. Spur removal — cancelling stable carriers from the spectrum
  11. FM and wideband-FM — FM detection, stereo composite and RDS
  12. Calibration — hardware filter correction and I/Q balance
  13. The network interface (and MAP65) — multicasting pipeline stages between machines and to decoders
  14. Wide graph and waterfall — the main display and how tuning drives the receiver
  15. Oscilloscope displays — the three time-domain scopes
  16. The transmit path — the six-FFT SSB speech processor and CW keying
  17. Source file map — which source file does what
  18. Links and references

Summary

Linrad is a fully oversampled, FFT-based receiver. The raw A/D stream is transformed by the first FFT into a wideband spectrum (the main waterfall). That spectrum is split by frequency bin into strong signals and weak signals + noise, and both parts are back-transformed to a time function in which impulse noise is exposed, where the noise blanker operates. A second FFT provides fine resolution for AFC and spur removal; a first mixer tunes the wanted signal to zero frequency and decimates it; a third FFT plus second mixer apply the baseband filter and produce the complex baseband, which is then demodulated, AGC'd, resampled and sent to the D/A. With two RF channels the whole chain carries both and combines them adaptively for optimum signal-to-noise (adaptive polarization); the same computation is used to characterize and cancel interference pulses.