S8 · Lesson 36 · Reed–Solomon, concatenated and modern codes
Symbol-oriented Reed–Solomon codes and burst errors, interleaving, concatenation, and the iterative turbo and LDPC codes that reach within a fraction of a decibel of capacity
For forty years after Shannon, practical codes stayed several decibels short of capacity. Reed–Solomon codes, correcting whole bytes at a time, cleaned up the bursts of errors that Viterbi decoders and scratched CDs produce, and concatenating the two brought deep-space links to within about 2.5 dB of the limit. Then in 1993 Berrou and Glavieux announced turbo codes working at 0.7 dB, a result so good that many listeners assumed a mistake, and Gallager's long-forgotten low-density parity-check codes were rediscovered a few years later. Both decode iteratively, passing soft beliefs back and forth, and they now carry the data in 4G, 5G, Wi-Fi and satellite TV.
- Approximate Eb/N0 needed for a bit error rate near 10⁻⁵ by rate-1/2 (or similar-rate) schemes against the year they appeared, with the Shannon limit for rate 1/2 and binary inputs, 0.19 dB, as the floor.
- Uncoded BPSK needs 9.6 dB; the K = 7 convolutional code about 4.4; Reed–Solomon concatenated with it about 2.5; turbo codes 0.7; long LDPC codes within a few hundredths of a decibel of the limit.
- Each step closed more of the gap with more decoding effort, until the gap was essentially gone.
Predict
The Reed–Solomon (255, 223) code works on 8-bit symbols. How many corrupted bytes per codeword can it correct, wherever they fall?
- Its 32 check symbols give = n − k + 1 = 33, so it corrects (n − k)/2 = 16 symbol errors, and a symbol counts as one error whether one bit or all eight are wrong. That makes it ideal for bursts: any run of up to 121 bad bits (15 full bytes plus one more bit) touches at most 16 bytes.
Name it
Reed–Solomon codes
Codes over symbols of m bits, with length symbols (255 for bytes). Any (n, k) RS code has , the most possible (it's maximum-distance separable), so it corrects
or twice as many erasures. A burst of up to bits always lands in at most t symbols. CDs, DVDs, QR codes, DSL and deep-space links use RS codes.
Interleaving
Writing codewords into the rows of an array and sending its columns spreads a burst across many codewords. With depth D, a burst of B symbols puts at most ⌈B/D⌉ errors in any codeword.
Concatenation
An inner code (often convolutional, soft-decoded) cleans up random errors; its occasional failures come out in bursts, which an interleaved outer RS code removes. Voyager's RS(255, 223) over the K = 7 code needed about 2.5 dB for very low error rates.
Iterative codes
- Turbo codes: two simple recursive convolutional encoders, the second fed an interleaved copy of the data. Two soft-in soft-out decoders exchange extrinsic information for several iterations.
- LDPC codes: block codes whose parity-check matrix is sparse; belief propagation passes probability messages between bit nodes and check nodes on the code's graph.
- Polar codes (Arıkan, 2009) provably reach capacity and carry 5G's control channels.
- Iterative codes show a steep waterfall a fraction of a dB above the limit, and sometimes an error floor at very low error rates.
Worked example
A burst of 100 consecutive bit errors hits a stream protected by RS(255, 223). Is it corrected?
Show the solution
- Bytes touched. 100 bits span at most if they straddle a boundary.
- Against the code. That's fewer than 16, so yes, it's corrected.
- Guaranteed limit.
- Against a binary code. A binary code correcting 100 random bit errors per 2040 bits would need far more redundancy than RS's 12.5%.
Answer yes: the burst touches at most 14 bytes, fewer than the 16 the code corrects.
Worked example
How far from capacity were the schemes on the chart?
Show the solution
- The limit. At rate 1/2 with binary inputs it's 0.19 dB.
- Each scheme's distance. Subtracting that from what each scheme needs:
| Scheme | Distance from the limit |
|---|---|
| Uncoded BPSK, at 9.6 dB | 9.4 dB |
| The K = 7 code | about 4.2 dB |
| Concatenated RS | about 2.3 dB |
| The first turbo code | 0.5 dB |
| Chung, Forney, Richardson and Urbanke's 2001 LDPC code, at very long block lengths | within 0.0045 dB |
Answer from 9.4 dB away for uncoded BPSK down to within 0.0045 dB for the 2001 LDPC code.
Worked example
A burst of 300 byte errors hits RS(255, 223) codewords interleaved to depth 8. Is it corrected? What depth would be needed?
Show the solution
- What each codeword corrects. t = 16 symbols.
- Depth 8. It spreads the burst so that some codeword gets errors: decoding fails.
- Depth needed. A depth of or more keeps every codeword at 16 or fewer (depth 20 gives at most 15).
- The cost. Buffering 19 or more codewords at each end.
Answer no, some codeword gets 38 errors at depth 8; a depth of 19 or more is needed.
Check
A Reed–Solomon code has n = 127 and k = 123 symbols. How many symbol errors can it correct?
Check
An RS code with 4-bit symbols corrects t = 16 symbols. What's the longest bit burst it always corrects?
Check
How many symbols long is a standard Reed–Solomon codeword with 4-bit symbols?
Check
An interleaver of depth 4 spreads a burst of 53 symbol errors across codewords. At most how many land in any one codeword?
Check
A rate-1/2 scheme needs 2.5 dB. How far is it from the binary-input Shannon limit of 0.19 dB?
Check
What's the rate of an RS(255, 247) code?
Check
Interleaved RS codewords correct t = 8 symbols each; a burst of 100 symbols hits an interleaver of depth 16.
(a)
At most how many errors land in one codeword?
(b)
What is the least depth that would correct the burst?
Check
A Reed–Solomon code has m-bit symbols, full length n = 2^m − 1 and k data symbols (k < n).
Step 1
How many symbol errors can it correct?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is its rate?
Step 3
What is the longest bit burst it always corrects?
Explain why
Why do turbo and LDPC decoders pass soft information back and forth instead of making hard decisions?
Each component of a turbo or LDPC code is weak on its own: a single parity check or a short convolutional code can say only a little about each bit. But each one gives evidence about the bits that the others can use. A soft decision carries not just a guess but its confidence, so one decoder can tell the other which bits it's sure of and which are shaky, and the other can use that to resolve its own uncertainties, sending back refined beliefs. Repeating the exchange lets weak, local evidence accumulate across the whole code until nearly every bit is confidently decided. A hard decision would throw away the confidence and end the conversation after one round, which is why iterative soft decoding is what lets these codes approach capacity.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.