Coding Theory Series — 09

Turbo Codes &
Iterative Decoding

The near-Shannon-limit codes that revolutionized digital communications and proved that Shannon's theoretical limits were practically achievable.

Mathematics History Applications Standards

Roadmap

Origins

The 1993 ICC paper that shocked the world and the history behind parallel concatenation.

Architecture

RSC encoders, interleavers, and the parallel concatenated structure.

Decoding

Iterative MAP decoding, extrinsic information, and the turbo principle.

Analysis

EXIT charts, convergence, waterfall/floor regions, and puncturing.

Applications

3G, 4G, deep space, satellite — turbo codes in the real world.

Legacy

How turbo codes transformed coding theory and inspired modern codes.

The Paper That Shocked the World

History

ICC 1993, Geneva — Claude Berrou, Alain Glavieux, and Punya Thitimajshima presented:

"Near Shannon Limit Error-Correcting Coding and Decoding: Turbo-Codes"

Achieved BER = 10-5 at Eb/N0 = 0.7 dB from Shannon limit — with a practical decoder!

Initial reaction: disbelief. Many attendees assumed the results were wrong. It took months of independent verification.

Key Parameters

Rate1/2
Block length65,536 bits
Iterations18
Eb/N00.7 dB from capacity
DecoderIterative MAP

Near-Shannon-Limit Performance

Mathematics
C = W log2(1 + SNR)   [Shannon Capacity]

What "Near Shannon" Means

For a rate-1/2 code on AWGN, Shannon limit is Eb/N0 = 0.187 dB.

Before turbo codes, the best practical codes operated 2-3 dB away from this limit.

Turbo codes achieved ~0.7 dB gap — an extraordinary leap.

Gap to Shannon Limit

CodeGap (dB)
Uncoded BPSK~9.6
Convolutional (K=7)~3.0
Concatenated RS+Conv~2.0
Turbo (1993)~0.7
Turbo (optimized)~0.3

Parallel Concatenated Convolutional Codes

Mathematics

A turbo code is a parallel concatenation of two (or more) constituent convolutional encoders, separated by an interleaver.

Input
Data u
RSC
Encoder 1
Parity p1
Input
Data u
Interleaver π
RSC
Encoder 2
Parity p2

Transmitted codeword: [u, p1, p2] — systematic bits + two sets of parity bits.

Base rate = 1/3 (before puncturing). The systematic nature is crucial for iterative decoding.

Recursive Systematic Convolutional Encoders

Mathematics

Why Recursive?

Feedback in the encoder creates an infinite impulse response, ensuring that low-weight inputs produce high-weight outputs.

This is key — non-recursive encoders allow low-weight codewords that limit performance.

Why Systematic?

The input bits appear directly in the output. This enables the iterative decoder to exchange extrinsic information about the same set of information bits.

Standard RSC (rate 1/2, K=4)

G(D) = [1, g1(D)/g0(D)]

Typical generators for turbo codes:

Standardg0g1K
3GPP1381584
CCSDS2383385
DVB-RCS1381584

RSC Encoder: Internal Structure

Mathematics Code

3GPP Turbo Code RSC (K=4)

uk

(+ feedback)
S0
S1
S2
pk
def rsc_encode(data, g0=0b1101, g1=0b1111, K=4):
    """RSC encoder for 3GPP turbo code (octal 13, 15)"""
    state = 0
    systematic = []
    parity = []
    num_states = K - 1

    for bit in data:
        # Feedback: XOR input with feedback taps
        fb = bit
        for i in range(num_states):
            if (g0 >> (i + 1)) & 1:
                fb ^= (state >> i) & 1

        # Parity output
        p = fb
        for i in range(num_states):
            if (g1 >> (i + 1)) & 1:
                p ^= (state >> i) & 1

        systematic.append(bit)
        parity.append(p)

        # Shift state register
        state = ((state >> 1) | (fb << (num_states - 1))) & ((1 << num_states) - 1)

    return systematic, parity

The Interleaver: Heart of the Turbo Code

Mathematics

The interleaver π permutes the input sequence before feeding it to the second encoder. This is what gives turbo codes their power — it decorrelates the inputs to the two encoders.

Why Randomness Matters

If input pattern has low weight through Encoder 1, the interleaver scrambles it so Encoder 2 likely produces high-weight parity.

Result: the combined codeword almost always has high weight — good minimum distance on average.

Interleaver Types

TypeProperties
RandomBest performance, hard to implement
S-randomRandom with spread constraint
QPPQuadratic permutation polynomial — 3GPP
BlockSimple but suboptimal
QPP: π(i) = (f1 · i + f2 · i2) mod N

The interleaver design is critical: a poor interleaver can waste 1-2 dB of performance. 3GPP standardized QPP interleavers for deterministic, parallelizable operation.

Complete Turbo Encoder

Mathematics Code
import numpy as np

def turbo_encode(data, interleaver_perm):
    """
    Complete turbo encoder: 2 RSC encoders + interleaver
    Returns: systematic bits, parity1, parity2
    """
    N = len(data)

    # Encoder 1: operates on original data
    sys1, parity1 = rsc_encode(data)

    # Interleave the data
    interleaved = [data[interleaver_perm[i]] for i in range(N)]

    # Encoder 2: operates on interleaved data
    _, parity2 = rsc_encode(interleaved)

    # Overall rate = N / (N + N + N) = 1/3 before puncturing
    return sys1, parity1, parity2

def generate_random_interleaver(N):
    """Generate a random interleaver permutation"""
    perm = list(range(N))
    np.random.shuffle(perm)
    return perm

# Example usage
N = 1024
data = np.random.randint(0, 2, N).tolist()
perm = generate_random_interleaver(N)
sys_bits, p1, p2 = turbo_encode(data, perm)
print(f"Input: {N} bits -> Output: {3*N} bits (rate 1/3)")

Trellis termination: each encoder must be driven to the zero state. 3GPP uses tail-biting to avoid rate loss from termination bits.

Turbo Decoder: Iterative Architecture

Mathematics
Received
ys, yp1
SISO
Decoder 1
(BCJR/MAP)
Le1
Extrinsic
Le1
(interleaved)
Interleaver
π
SISO
Decoder 2
(BCJR/MAP)
Le2
Extrinsic
Le2
De-interleaver
π-1
A priori for
Decoder 1
Iterate

Each decoder produces soft outputs (log-likelihood ratios), not hard decisions. This is essential for iterative improvement.

The BCJR / MAP Algorithm

Mathematics

Soft-Input Soft-Output (SISO) Decoding

The BCJR algorithm (Bahl, Cocke, Jelinek, Raviv, 1974) computes the a posteriori probability (APP) for each bit given the entire received sequence.

L(uk | y) = log αk-1(s') · γk(s',s) · βk(s)   [for uk=1 vs uk=0]

α (Forward)

Forward recursion through the trellis. Probability of being in state s at time k given past observations.

γ (Branch)

Branch metrics from the channel observations and a priori information.

β (Backward)

Backward recursion through the trellis. Probability from future observations.

Complexity: O(N · 2K-1) per iteration — linear in block length, exponential in constraint length. This is why short constraint lengths (K=4) are preferred.

Extrinsic Information Exchange

Mathematics
Ltotal(uk) = Lchannel(uk) + La priori(uk) + Lextrinsic(uk)

The Key Insight

Only extrinsic information is passed between decoders — information derived from the code constraints and parity, not from the systematic channel observation.

Why Only Extrinsic?

Passing the full LLR would cause positive feedback — the decoder would reinforce its own previous decisions, leading to overconfident wrong answers.

Decomposition

Lextrinsic = Ltotal - Lchannel - La priori

This is "new information" that one decoder has learned from its parity bits, which the other decoder hasn't seen yet.

The statistical independence assumption between the two decoders' extrinsic outputs is only approximate — it degrades with iterations, leading to diminishing returns.

The Turbo Principle

Mathematics History

Named after the turbo engine: exhaust gases (extrinsic information) are fed back to boost performance, just as a turbocharger recycles exhaust to compress intake air.

Iterative Belief Passing

Iteration 1: Each decoder works with only channel information. Performance is modest.

Iteration 2-3: Decoders begin sharing useful extrinsic info. Rapid improvement.

Iteration 4-8: Refinement phase. Diminishing returns per iteration.

Iteration 8+: Convergence. Little further improvement.

Typical BER by Iteration

IterationBER
110-1
210-2
410-3
810-5
1810-6

Turbo Decoder: Python Sketch

Code
def turbo_decode(y_sys, y_p1, y_p2, interleaver, n_iterations=8):
    """
    Iterative turbo decoder using log-MAP algorithm
    """
    N = len(y_sys)
    L_a = np.zeros(N)  # A priori (initially zero)

    for iteration in range(n_iterations):
        # --- Decoder 1 ---
        # Input: channel systematic + channel parity1 + a priori from Dec2
        L_total_1 = map_decode(y_sys, y_p1, L_a)
        # Extract extrinsic info: remove channel + a priori
        L_e1 = L_total_1 - 2 * y_sys - L_a

        # --- Interleave extrinsic for Decoder 2 ---
        L_e1_interleaved = interleave(L_e1, interleaver)
        y_sys_interleaved = interleave(y_sys, interleaver)

        # --- Decoder 2 ---
        L_total_2 = map_decode(y_sys_interleaved, y_p2, L_e1_interleaved)
        L_e2 = L_total_2 - 2 * y_sys_interleaved - L_e1_interleaved

        # --- De-interleave extrinsic for Decoder 1 ---
        L_a = deinterleave(L_e2, interleaver)

    # Final decision
    L_final = deinterleave(L_total_2, interleaver)
    decoded = (L_final < 0).astype(int)
    return decoded

The log-MAP (max-log-MAP) approximation avoids costly exponentials while losing only ~0.1 dB compared to true MAP.

EXIT Charts

Mathematics

Extrinsic Information Transfer Charts

Introduced by Stephan ten Brink (2001), EXIT charts visualize the convergence behavior of iterative decoders by tracking mutual information.

Axes

X-axis: IA — mutual information of a priori input

Y-axis: IE — mutual information of extrinsic output

Reading the Chart

Plot transfer curves for both decoders (one flipped). Decoding converges if there's an open tunnel between the curves.

Convergence Conditions

Open tunnel → convergence

Curves touch/cross → convergence failure

The tunnel width indicates how many iterations are needed — narrow tunnel means more iterations.

EXIT charts can be used to design better constituent codes by shaping the transfer curves.

BER Curves: Waterfall & Error Floor

Mathematics

Waterfall Region

At a threshold SNR, BER drops precipitously — the "waterfall." This is where iterative decoding converges successfully.

The waterfall threshold is predicted by EXIT chart analysis and density evolution.

Error Floor Region

At high SNR, BER decrease slows dramatically. Caused by low-weight codewords that the interleaver couldn't eliminate.

Floor typically at BER ~ 10-6 to 10-9 depending on interleaver design and block length.

Factors Affecting Performance

FactorWaterfallFloor
Block length ↑↓ better↓ better
Iterations ↑↓ betterNo effect
Interleaver designModerateCritical
Constraint length ↑Slight ↓↓ better

The error floor is turbo codes' Achilles' heel — it limits their use in applications requiring BER < 10-10 (e.g., fiber optics).

Puncturing for Rate Control

Mathematics Standards

The base turbo code is rate 1/3. Puncturing — selectively deleting parity bits — increases the rate to match channel conditions.

Puncturing Patterns

Alternate which parity bits to keep:

Rate 1/2: keep p1[odd], p2[even]
Rate 2/3: keep every 3rd parity
Rate 4/5: keep every 8th parity

Rate-Compatible Codes

Design puncturing so higher-rate patterns are subsets of lower-rate patterns. Enables HARQ: retransmit only the punctured bits.

3GPP Rate Matching

RateUse CaseGap to Shannon
1/3Cell edge, high protection~0.5 dB
1/2Typical data~0.8 dB
2/3Good channel~1.2 dB
3/4High throughput~1.5 dB
4/5Very good channel~2.0 dB

Practical Decoder Variants

Mathematics Code

True MAP (BCJR)

Optimal bit-wise decisions. Requires log-sum-exp operations:

log(ea + eb) = max(a,b) + log(1 + e-|a-b|)

The correction term requires a lookup table. Best performance but highest complexity.

Max-Log-MAP

Approximation: drop the correction term.

log(ea + eb) ≈ max(a,b)

~0.1-0.3 dB loss but dramatically simpler hardware. Most implementations use this.

SOVA (Soft Output Viterbi Algorithm)

Modified Viterbi that outputs reliability information. ~0.5 dB worse than MAP but even simpler. Used in early turbo decoder chips.

The trade-off: MAP gives optimal per-bit decisions; Max-Log-MAP trades ~0.2 dB for 50% complexity reduction; SOVA trades ~0.5 dB for further simplification.

Turbo Codes in 3G/4G

Standards Applications

3GPP UMTS (3G)

First major standard to adopt turbo codes (Release 99, 1999).

Constituent code(13, 15)8, K=4
Block sizes40 – 5114 bits
InterleaverQPP
IterationsTypically 6-8

LTE (4G)

Enhanced turbo code for higher throughput.

Block sizes40 – 6144 bits
InterleaverQPP (contention-free)
Max rate~0.95 with rate matching
HARQChase combining + IR

Why Turbo for 4G?

Near-capacity performance for the block sizes used in LTE (hundreds to thousands of bits).

Flexible rate matching via puncturing supports adaptive modulation and coding.

QPP interleaver enables parallel decoding — essential for high data rates.

5G NR replaced turbo codes with LDPC for data and polar codes for control — turbo codes' higher decoding latency became a bottleneck at 5G data rates.

Deep Space Communications

Applications Standards

CCSDS (Consultative Committee for Space Data Systems) adopted turbo codes in 2003 for deep space missions where every fraction of a dB matters.

CCSDS Turbo Code

Constituent code(23, 33)8, K=5
Rates1/2, 1/3, 1/4, 1/6
Block sizes1784, 3568, 7136, 8920
InterleaverPermutation polynomial

Missions Using Turbo Codes

Mars Reconnaissance Orbiter — high-res imagery from Mars

Messenger — Mercury orbit

New Horizons — Pluto flyby data

JWST — alongside RS codes

Why Deep Space Needs Near-Capacity Codes

Signal from Mars: ~1 W transmitter, 225 million km distance. Every 0.5 dB saved doubles the data rate or halves the antenna size needed on Earth.

Satellite & Broadcasting

Standards Applications

DVB-RCS

Digital Video Broadcasting — Return Channel via Satellite uses turbo codes for the return link from user terminals.

Rates: 1/3, 2/5, 1/2, 2/3, 3/4

Block sizes: 12 – 216 bytes

CDMA2000 / IS-2000

North American 3G standard independently adopted turbo codes with slightly different parameters than 3GPP.

WiMAX (IEEE 802.16)

Convolutional turbo codes (CTC) with duo-binary structure — processes pairs of bits for higher throughput.

Military & Tactical

MIL-STD-188-110C and Link 16 use turbo codes for low-SNR tactical communications.

Comparison with Classical Codes

Mathematics
Property Convolutional RS + Conv Turbo
Gap to Shannon 3-4 dB 2-3 dB 0.3-0.7 dB
Decoding Viterbi (hard) Algebraic + Viterbi Iterative MAP (soft)
Latency Low Medium High (iterative)
Error Floor None Very low Exists (~10-7)
Complexity O(2K) O(n2) + O(2K) O(N · 2K · I)
Flexibility Fixed rate Fixed rate Rate-compatible

Turbo codes' weakness: the error floor and high decoding latency. These drove the search for alternatives — leading to the rediscovery of LDPC codes and invention of polar codes.

The Revolution Turbo Codes Caused

History

Before 1993

Coding theory was considered a "mature" field. Shannon's limit seemed a theoretical ideal, forever out of practical reach.

Research funding was declining. The field was losing momentum.

The Paradigm Shift

Iterative decoding was the breakthrough concept — not just turbo codes themselves. The idea that simple decoders exchanging soft information could approach optimality.

What Turbo Codes Inspired

Rediscovery of LDPC codes (1996)

Turbo equalization

Iterative MIMO detection

Turbo source-channel coding

EXIT chart analysis framework

Factor graph / message passing unification

"Turbo codes didn't just give us a better code — they gave us a new way of thinking about decoding." — David Forney

Turbo Codes: Timeline & Summary

History Standards
YearMilestone
1974BCJR algorithm published (foundation for MAP decoding)
1993Berrou, Glavieux, Thitimajshima present turbo codes at ICC
1995Independent verification; turbo code theory develops rapidly
19993GPP Release 99 (UMTS) adopts turbo codes
2000CDMA2000 standard adopts turbo codes
2001EXIT charts introduced by ten Brink
2003CCSDS adopts turbo codes for deep space
20083GPP LTE Release 8 uses enhanced turbo codes
20185G NR replaces turbo codes with LDPC/Polar

Turbo codes reigned as the state-of-the-art for 25 years — an extraordinary run in a fast-moving field. Their iterative decoding principle lives on in every modern communication system.