7. Turbo & LDPC Codes

Iterative decoding that approaches Shannon's limit

In 1948, Claude Shannon proved there is a theoretical limit to how much data you can reliably push through a noisy channel. For decades, every practical error-correcting code fell far short of that limit. Engineers squeezed out fractions of a decibel with ever-more-complex schemes, but the gap remained stubbornly wide.

Then, in 1993, turbo codes shocked the coding theory community by operating within 0.5 dB of the Shannon limit. Shortly after, LDPC codes — originally invented by Robert Gallager in his 1960 PhD thesis but largely forgotten — were rediscovered in the 1990s and shown to be equally powerful. These two families of codes revolutionized digital communications, from deep-space probes to the phone in your pocket.

Shannon's Channel Capacity

Shannon's noisy channel coding theorem makes a remarkable promise: for any communication channel corrupted by noise, there exists a coding scheme that can transmit data with an arbitrarily low error probability, as long as the data rate stays below a maximum called the channel capacity.

For a binary channel with a given signal-to-noise ratio (SNR), the capacity is:

Channel Capacity (AWGN channel):

C = 0.5 × log₂(1 + SNR)

Example: If SNR = 1 (0 dB):
C = 0.5 × log₂(2) = 0.5 × 1 = 0.5 bits per channel use

If SNR = 7 (~8.5 dB):
C = 0.5 × log₂(8) = 0.5 × 3 = 1.5 bits per channel use

Shannon proved you can communicate reliably up to this rate. He did not say how — that was left to engineers.

For decades, practical codes operated 3–6 dB above the Shannon limit. That means they needed far more signal power than theoretically necessary, wasting energy, bandwidth, or both.

The Gap to Shannon

The gap between a code's required SNR and the Shannon limit measures how efficient the code is. A smaller gap means the code extracts more of the channel's theoretical capacity.
Code Gap to Shannon Limit Era
Uncoded transmission ~10 dB —
Hamming codes ~5 dB 1950s
Reed-Solomon ~4 dB 1960s
Convolutional (K=7, Viterbi) ~3 dB 1970s
Concatenated codes ~2 dB 1980s
Turbo codes ~0.5 dB 1993
LDPC codes ~0.1–0.5 dB 1996 (rediscovered)

Closing that last fraction of a decibel took nearly half a century of research — and required a fundamentally different approach to decoding.

Turbo Codes: The Breakthrough (1993)

Claude Berrou, Alain Glavieux, and Punya Thitimajshima presented turbo codes at the 1993 IEEE International Conference on Communications. The audience was skeptical: results this good seemed too good to be true. But they held up.

The core idea: use two simple convolutional encoders in parallel, separated by an interleaver that scrambles the bit order. Each encoder sees the same data, but in a different sequence. The decoder then alternates between two component decoders, each passing "soft" reliability information to the other. After several iterations, errors are corrected that neither decoder alone could fix.

Turbo Encoding

  1. Input bits are fed directly to Encoder 1 (a recursive systematic convolutional encoder).
  2. The same input bits pass through an interleaver (a fixed permutation that reorders the bits), then into Encoder 2.
  3. The transmitted output consists of three streams: the original systematic bits, parity bits from Encoder 1, and parity bits from Encoder 2.
Turbo Encoder Structure:

Input ──────────┬──────────────────── Systematic bits ──→ Output bits │ ├──→ [ Encoder 1 ] ── Parity 1 ────────→ Output │ └──→ [ Interleaver ] ──→ [ Encoder 2 ] ── Parity 2 ──→ Output

The interleaver ensures that a burst of errors affecting one encoder's parity looks like scattered random errors to the other encoder — and random errors are easier to fix.

Turbo Decoding (Iterative)

  1. Decoder 1 processes the systematic bits and Parity 1. It produces a soft estimate (a probability, not a hard 0 or 1) for each bit.
  2. These soft estimates are interleaved and passed to Decoder 2 as prior information — "here is what Decoder 1 thinks each bit probably is."
  3. Decoder 2 processes the interleaved systematic bits, Parity 2, and the prior information from Decoder 1. It produces refined soft estimates.
  4. The refined estimates are de-interleaved and passed back to Decoder 1. Repeat for 6–18 iterations.
  5. After the final iteration, each bit's soft estimate is converted to a hard decision (0 or 1).

Why Iteration Works

Analogy: Imagine two people solving a crossword puzzle. Each person can solve some clues the other cannot. They pass their partial solutions back and forth. Each round, newly filled-in letters make previously unsolvable clues solvable. After a few exchanges, the entire puzzle is complete — even though neither person could have finished it alone.

Turbo decoding works the same way. Decoder 1 is confident about some bits and uncertain about others. It shares its confidence levels with Decoder 2, which has different strengths (because it saw the data in a different order). Decoder 2 uses that extra knowledge to resolve some of its own uncertainties, then passes its improved estimates back. Each iteration resolves more ambiguity until nearly all bits converge to a confident, correct decision.

The mathematical foundation is extrinsic information: each decoder only passes along the new information it has discovered, not a rehash of what it received. This prevents feedback loops and ensures convergence.

LDPC Codes: Rediscovered Power

Robert Gallager invented Low-Density Parity-Check codes in his 1960 PhD thesis at MIT. The codes were elegant but computationally demanding — far beyond what 1960s hardware could handle. They were largely ignored for over 30 years.

In 1996, David MacKay and Radford Neal rediscovered LDPC codes and demonstrated that they could match or exceed turbo codes in performance. The coding theory community suddenly had two independent paths to the Shannon limit.

An LDPC code is defined by a parity-check matrix H in which the vast majority of entries are 0 — hence "low-density." This sparsity is what makes efficient decoding possible.

The structure can be visualized as a Tanner graph: a bipartite graph with two kinds of nodes. Variable nodes (one per codeword bit) sit on one side. Check nodes (one per parity-check equation) sit on the other. An edge connects a variable node to a check node wherever the matrix H has a 1.

LDPC Decoding: Belief Propagation

Decoding an LDPC code means passing messages back and forth between variable nodes and check nodes on the Tanner graph. This algorithm is called belief propagation (or sum-product decoding).

One Iteration of Belief Propagation

  1. Variable-to-check messages: Each variable node sends a message to every connected check node saying, "Based on the channel observation and messages from my other check nodes, here is my current belief about my bit value." (A log-likelihood ratio, not a hard bit.)
  2. Check-to-variable messages: Each check node gathers messages from all its connected variable nodes and replies to each one: "Given what the other variables in this parity equation say, here is what you should be to satisfy the check."
  3. Update beliefs: Each variable node combines the channel observation with all incoming check-node messages to form an updated belief.
  4. Check convergence: If all parity checks are satisfied (or a maximum iteration count is reached), stop. Otherwise, repeat from step 1. Typically 10–50 iterations suffice.
Small Tanner Graph Example (6 bits, 3 checks):

Variable nodes: v1 v2 v3 v4 v5 v6 |\ /| /\ | /| / | | \ / | / \ | / | / | | X | / \ | / | / | | / \ | / \ | / |/ | Check nodes: c1 c2 c3

Check c1: v1 XOR v2 XOR v4 = 0 Check c2: v2 XOR v3 XOR v5 = 0 Check c3: v3 XOR v4 XOR v5 XOR v6 = 0

Messages flow along every edge, each iteration refining the confidence in every bit's value.

Turbo vs LDPC

Turbo Codes

  • Parallel concatenation of convolutional encoders
  • MAP (maximum a posteriori) decoding
  • Slightly better at short block lengths
  • Serial decoder architecture
  • Used in 3G (UMTS) and 4G (LTE)
  • Lower decoder throughput

LDPC Codes

  • Graph-based parity-check structure
  • Belief propagation decoding
  • Better at long block lengths
  • Highly parallelizable decoder — many nodes update simultaneously
  • Used in Wi-Fi, 5G NR, DVB-S2
  • Higher decoder throughput

Both approach the Shannon limit. In practice, LDPC codes have won the majority of new standards because their decoders parallelize naturally in hardware, achieving the multi-gigabit throughputs that modern systems demand.

Designing Good LDPC Codes

Not all LDPC codes perform equally. Code design is a rich and active field:

  • Random vs. structured construction: Early LDPC codes used random parity-check matrices. Modern standards use quasi-cyclic LDPC codes (as in 5G NR), which have algebraic structure that simplifies encoder and decoder hardware.
  • Degree distributions: Irregular LDPC codes — where different variable and check nodes have different numbers of connections — consistently outperform regular codes where every node has the same degree.
  • Optimization tools: Techniques like density evolution and EXIT charts let designers predict a code's performance mathematically, without running expensive simulations, and tune degree distributions for maximum efficiency.
The details of code construction involve deep combinatorics and optimization. The key takeaway: carefully designed LDPC codes get closer to the Shannon limit than naive constructions, and modern standards benefit from decades of this design work.

The Impact

Before turbo and LDPC codes, communicating with a spacecraft at Mars required enormous ground antennas and painfully low data rates. After adopting these codes, the same antenna could support dramatically higher throughput — or a smaller antenna could achieve the same rate, saving weight and cost.

The same principle applies everywhere: mobile phones, satellite television, deep-space exploration, data centers. Every bit of redundancy now works far harder than it did with older codes.

Turbo and LDPC codes did not merely improve performance — they essentially closed the gap to the theoretical limit. What Shannon proved possible in 1948 became practically achievable 45 years later. This is one of the great success stories of information theory: a theoretical result guiding decades of engineering until the bound was reached.

Where They're Used Today

Standard / Application Code Type Notes
3G / UMTS Turbo First major deployment of turbo codes
4G / LTE Turbo Rate-1/3 turbo code, up to 6144-bit blocks
5G NR LDPC (data), Polar (control) Quasi-cyclic LDPC for high throughput
Wi-Fi 802.11n/ac/ax LDPC Optional in 11n, mandatory in 11ax
DVB-S2 (satellite TV) LDPC + BCH Concatenated for very low error floors
10GBase-T Ethernet LDPC Enables 10 Gbps over copper cabling
SSD / flash storage LDPC Compensates for wear-related bit errors
WiMAX (802.16) LDPC and Turbo Both supported in the standard

What's Next

Turbo and LDPC codes brought us to the edge of what Shannon said is possible on well-understood channels. But what about channels that change unpredictably, or situations where you don't even know how many packets will be lost? In the next chapter, we explore polar codes — the first codes provably capacity-achieving with explicit, low-complexity construction — and fountain codes, a radically different approach where the encoder can produce a potentially limitless stream of coded packets, and the receiver reconstructs the original data from whichever packets happen to arrive.

Try It Yourself — LDPC Belief Propagation

This demo uses the article's example: a (6,3) LDPC code with 6 variable nodes and 3 parity checks. Toggle the data bits to encode a codeword, flip received bits to introduce errors, then step through belief propagation and watch the Tanner graph converge.

Part 1 — Encode

Part 2 — Channel Errors

Click received bits to flip them. The parity checks in the Tanner graph below will show which constraints are violated.

Part 3 — Belief Propagation

Each iteration, variable nodes send beliefs to check nodes, and check nodes reply with corrections. Confidence bars show how certain each node is about its bit value.

Key Takeaways

  • Shannon's 1948 theorem set a hard limit on reliable communication rates. Turbo and LDPC codes come within a fraction of a decibel of that limit.
  • Turbo codes use two parallel convolutional encoders with an interleaver; the decoder iterates between two component decoders, exchanging soft information.
  • LDPC codes are defined by sparse parity-check matrices and decoded via belief propagation on a Tanner graph, where messages pass between variable and check nodes.
  • Iteration is the shared secret: neither turbo nor LDPC decoders solve the problem in one pass. Instead, they refine their estimates over many rounds, each time resolving more uncertainty.
  • LDPC codes have become the dominant choice in modern standards (5G, Wi-Fi, DVB-S2) primarily because their decoders parallelize efficiently in hardware.
  • These codes transformed the economics of communication: same hardware, more data, or less hardware for the same data — a direct consequence of closing the gap to Shannon's limit.