Also known as: forward error correction, FEC, channel coding
Forward error correction (FEC) adds structured redundancy to transmitted data so the receiver can correct errors on its own — no acknowledgement, no retransmission.1 That one-way property is what makes it essential to broadcast and radio: a scanner listening to a trunked-radio control channel cannot ask the tower to resend a garbled grant, so the redundancy has to be baked into the transmission. FEC is the counterpart to the detect-and-retransmit approach (ARQ); a cyclic redundancy check only detects corruption, whereas FEC repairs it up to a bounded amount.
How it works
An FEC encoder maps k information bits to n > k coded bits; the extra n − k bits are a
structured function of the data, so only a small subset of all 2ⁿ bit patterns are legal codewords.
When errors nudge a received word off a codeword, the decoder snaps it back to the nearest legal one.
Two numbers characterise any scheme:
- Code rate
R = k/n— the fraction of transmitted bits that carry payload. Lower rate (more redundancy) tolerates more errors but costs bandwidth or throughput. - Coding gain — how many dB of signal-to-noise ratio the code saves for a target error rate versus sending uncoded. A few dB of coding gain can be the difference between a locked and an unlocked channel.
Variants
FEC splits into two great families:
- Block codes treat data as fixed-size blocks and add parity per block. Examples include Hamming (1 error), Golay (3 errors), BCH, and Reed–Solomon (symbol-oriented, excellent against bursts). Modern capacity-approaching block codes include LDPC, used in Wi-Fi, DVB-S2, and 5G data channels.
- Convolutional codes encode a continuous stream, each output depending on a sliding window of input bits; they are decoded with the Viterbi algorithm and are often punctured to raise the rate. Turbo codes combine two convolutional codes with interleaving and iterative decoding to approach the Shannon limit, and power 3G/4G traffic channels.
A second axis is decision type. A hard-decision decoder is handed already-sliced bits (0/1); a soft-decision decoder is handed the demodulator’s confidence in each bit (e.g. a log-likelihood) and typically wins ~2 dB of coding gain by using that reliability information. Viterbi, turbo, and LDPC decoders are all naturally soft. Codes are also frequently paired with interleaving so that channel bursts are scattered into the isolated errors the code is designed to fix.
In practice
Where FEC sits in a frame matters: control and signalling fields usually get the strongest, lowest-rate protection because a single lost grant can break a call, while bulk voice or data may run a higher-rate code to conserve throughput. Systems commonly concatenate codes — an outer Reed–Solomon block code over an inner convolutional code, separated by an interleaver — so the inner code cleans up random noise and the outer code sweeps up the residual bursts the inner decoder emits.
Relevance to SDR
Every digital protocol GopherTrunk decodes leans on FEC: P25 uses trellis/convolutional coding, Golay and Reed–Solomon; DMR uses the Hamming-based BPTC product code; TETRA and NXDN layer convolutional coding with interleaving; and ADS-B uses a CRC that doubles as a short error-correcting code. GopherTrunk implements the matching decoders in each chain, which is why a digital signal stays perfect until it abruptly fails — the famous cliff effect. The decoder repairs errors invisibly until the error rate exceeds the code’s correcting power, at which point frames stop validating and audio drops out all at once, rather than degrading gracefully like analog.
Sources
-
Error correction code — Wikipedia, for the block/convolutional families, code rate, and hard vs soft decoding. ↩