Convolutional Codes: Trellis Structure, the Viterbi Algorithm, and Free Distance
Anchor (Master): MacWilliams & Sloane 1977 The Theory of Error-Correcting Codes (North-Holland) Chapter 11-12; Viterbi 1967 Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm; Forney 1973 The Viterbi Algorithm
Intuition Beginner
Imagine a conveyor belt carrying bits one at a time. As each bit enters, it slides into a row of storage cells called a shift register. Each cell holds one bit. When a new bit arrives, every existing bit shifts one position to the right, and the oldest bit falls off the end. The register always holds the most recent few bits.
Now attach some XOR gates to this register. Each gate reads a fixed subset of the register cells and outputs their parity (sum mod 2). If the register has two cells and you attach two XOR gates, each gate reads a different combination of cells. Every time a new input bit arrives, each gate produces one output bit. With one input and two outputs, you get a rate-1/2 encoder: it turns one bit into two [source pending].
The specific wiring of each XOR gate is determined by its generator polynomial. For a constraint-length-3 encoder (two register cells), the generators mean: the first gate reads all three tap positions (binary ), and the second gate reads positions 1 and 3 (binary ). These octal numbers are a compact way to specify the XOR wiring.
The contents of the shift register at any moment define the encoder's state. With two register cells, there are possible states: , , , . As each input bit arrives, the state changes. The old state and the input bit together determine the new state and the two output bits. This finite-state machine has a natural graphical representation called a trellis.
A trellis diagram arranges the 4 states as dots in a vertical column at each time step, then draws arrows between columns showing which transitions are possible. An input of 0 produces one set of arrows (solid lines, say) and an input of 1 produces another (dashed lines). Each arrow carries a label: the two output bits produced by that transition. Any codeword corresponds to a path through the trellis from left to right [source pending].
The decoding problem is this: given a noisy received sequence, find the path through the trellis whose output labels are closest to what was received. This is the Viterbi algorithm, and it works by a principle Andrew Viterbi described in 1967 [source pending]. At each time step, for each state, keep only the single best path that ends at that state. Discard all worse paths. Then extend the survivors one step forward and repeat.
Think of the trellis as a maze. You are racing through it, and at each intersection (state) you keep only the fastest route that reaches that intersection. By the time you reach the end, the single surviving route is the most likely codeword. This pruning is what makes Viterbi decoding feasible: the number of paths you track never exceeds the number of states, no matter how long the input sequence is.
For our 4-state example, the Viterbi algorithm tracks at most 4 candidate paths at any time. Each path has a cumulative distance score (how many bits differ from the received sequence). At each step, each state receives two incoming candidates (one from an input-0 transition, one from an input-1 transition). The algorithm picks the one with the lower score and discards the other. This is the Add-Compare-Select operation, and it runs in constant time per state per time step [source pending].
After processing the entire received sequence, the decoder traces back through the surviving path's history to recover the most likely input sequence. The total work scales as where is the sequence length and is the number of register cells. For (our example), decoding 1000 input bits requires about 4000 compare-select operations. The algorithm is optimal: it finds the maximum-likelihood codeword, the one most likely to have been transmitted given the channel noise model [source pending].
Visual Beginner
Convolutional Encoder (rate 1/2, generators (7,5)_8, constraint length K=3)
Input ---> [+]<----+----+----> Output c^(1) (generator 111)
| | |
v v v
[s1] --> [s2]
| | |
+-------+----+----> Output c^(2) (generator 101)
XOR taps:
c^(1) = input XOR s1 XOR s2 (generator 1+D+D^2 = 111_2 = 7_8)
c^(2) = input XOR s2 (generator 1+D^2 = 101_2 = 5_8)
State = (s1, s2) contents of the shift register.Trellis for (7,5)_8 encoder, 4 states, first 3 time steps:
t=0 t=1 t=2 t=3
S=00 ----00/00--- 00 ----00/00--- 00 ----00/00--- 00
\ / \ / \ /
\--1/11-- 10 \--1/11-- 10 \--1/11-- 10
/ \ / \ / \
/ --0/00-- 01 / --0/00-- 01 / --0/00-- 01
S=01 | |
\--1/10-- 11 \--1/10-- 11 \--1/10-- 11
(etc. --- each state has exactly 2 incoming and 2 outgoing branches.
Labels: input/output, e.g. "1/11" means input bit 1, output bits 11.)
Convention: solid line = input 0, dashed = input 1.
Each path left-to-right through the trellis is one codeword.| Component | Role |
|---|---|
| Shift register | Stores the most recent input bits (encoder memory) |
| Generator polynomials | Specify which register taps feed each XOR gate |
| State | Contents of the shift register ( possible values) |
| Trellis | Graph of states over time; branches labelled with input/output |
| Viterbi algorithm | Shortest-path search on the trellis (ML decoding) |
Figure: Top: the rate-1/2 convolutional encoder with generators . The input bit feeds into a 2-cell shift register. Two XOR gates produce output bits according to the generator tap patterns. Bottom: the corresponding 4-state trellis over three time steps. Each node is a state (register contents). Each branch is a transition, labelled with the input bit and the resulting output pair. The Viterbi decoder finds the lowest-weight path through this trellis matching the received sequence.
Worked example Beginner
Consider the rate-1/2 convolutional code. The encoder has constraint length (memory ) and 4 states. We encode the input sequence starting from state .
Time 1: Input . Register contents: . Output . Output . Transmitted pair: . New state: .
Time 2: Input . Register contents: . Output . Output . Transmitted pair: . New state: .
Time 3: Input . Register contents: . Output . Output . Transmitted pair: . New state: .
Time 4: Input . Register contents: . Output . Output . Transmitted pair: . New state: .
Time 5: Input . Register contents: . Output . Output . Transmitted pair: . New state: .
The transmitted codeword is .
Now suppose the channel introduces one error and the received sequence is (the third pair is corrupted from to ). The Viterbi decoder computes, for each branch in the trellis, the Hamming distance between the branch label and the received pair. It then finds the path through the trellis with the smallest total distance. The correct path (corresponding to input ) has total distance 1 (one branch mismatches by one bit). All other paths have distance at least 3. The decoder correctly recovers the input.
Check your understanding Beginner
Formal definition Intermediate+
Let denote the binary field and the ring of polynomials in the indeterminate with coefficients in .
Definition (Convolutional encoder). A rate- convolutional encoder is a linear map from to specified by a polynomial generator matrix . For the common case , the encoder is fully specified by generator polynomials , and encoding is:
where is the input polynomial and is the -th output polynomial [source pending].
The constraint length of the encoder is one plus the maximum degree among the generator polynomials: . The encoder memory is . The physical interpretation is that each output at time depends on the current input bit and the most recent input bits stored in a shift register.
Example. For the code, the generators are and . The constraint length is (memory ), and the rate is . The generator matrix is the polynomial matrix .
Definition (Trellis section). The trellis at time is a directed graph whose vertices are the states . For each state and each input symbol , there is a directed edge from state at time to state at time , where is determined by shifting the register contents and inserting . The edge is labelled with the input/output pair where is the output produced by input when the register holds state [source pending].
The full trellis for a sequence of input symbols consists of columns of state nodes (assuming the encoder starts and ends in state ), connected by branches per section. Each path through the trellis from the initial state to the terminal state corresponds to one codeword.
Counterexamples to common slips
Convolutional codes are not block codes. A block code of length processes symbols as a unit. A convolutional code processes a potentially infinite stream of input symbols, and each output symbol depends on a sliding window of inputs. The "block length" of a convolutional code is not a fixed parameter; it is the length of the input sequence being encoded.
The Viterbi algorithm does not produce soft outputs. Viterbi finds the most likely codeword (hard decisions). The BCJR algorithm [source pending] produces a-posteriori probabilities for each bit (soft decisions). Turbo decoding requires BCJR, not Viterbi, as the component decoder.
Constraint length is not the same as memory. Constraint length where is the memory (number of register cells). The number of states is , not . A "constraint length 7" code has and states.
Key theorem with proof Intermediate+
Theorem (Viterbi optimality). Consider a rate- convolutional code with memory and trellis states . Let be the received sequence, where each is an -tuple. Define the branch metric as the Hamming distance between and the output associated with input from state . The Viterbi algorithm, which at each time and state selects the survivor path with minimum cumulative metric:
where the minimum is over all predecessor states and inputs such that the transition exists, produces the maximum-likelihood codeword.
Proof. The proof proceeds by induction on the trellis depth. Let denote the minimum cumulative distance among all paths from the initial state at time 0 to state at time .
Base case. At , the encoder is in state with cumulative metric . All other states have (unreachable). This correctly records that only the zero state is a valid starting point.
Inductive step. Assume equals the minimum cumulative distance to state at time for all . Any path to state at time must pass through some predecessor state at time and traverse exactly one branch from to . The cost of such a path is . By the induction hypothesis, is the optimal cost to reach . The Add-Compare-Select operation computes:
which is the minimum cost of any path from the initial state to at time . This follows from the Markov property of the encoder: the future output depends only on the current state, so the optimal path to any future point decomposes into the optimal path to the current state plus the optimal branch [source pending].
At the terminal time , the minimum-metric state gives the ML codeword, and traceback recovers the associated input sequence.
Bridge. The Viterbi algorithm's optimality builds toward iterative turbo decoding in 46.08.02 by establishing the trellis as the natural computational structure for convolutional codes. The same trellis appears in turbo decoding, but with BCJR replacing Viterbi to produce soft outputs. The foundational reason Viterbi works is that the encoder's finite-state Markov structure provides the optimal-substructure property required for dynamic programming, and this is exactly the property that makes the trellis a computational engine for both hard-decision and soft-decision decoding.
Trellis construction for the code
We now construct the complete trellis for the code. The four states are labelled by the register contents :
State transition table for (7,5)_8 encoder:
Current Input Next Output
State s u state c^(1) c^(2)
-------- ---- ------ -------------
00 0 00 0 0
00 1 10 1 1
01 0 00 1 1
01 1 10 0 0
10 0 01 1 0
10 1 11 0 1
11 0 01 0 1
11 1 11 1 0Verification for state , input : the register holds . The new input shifts the register to , so the next state is . Output . Output . The output pair is , matching the table.
Viterbi algorithm: worked numerical example
We decode the received sequence on the trellis. The encoder starts in state . We compute the survivor path metrics step by step.
Time 1, received . From state :
- Input 0 goes to state , output . Distance: . Metric .
- Input 1 goes to state , output . Distance: . Metric .
States and are unreachable: .
Time 2, received . From each reachable state:
- From state (metric 2): input 0 goes to with output , distance , cumulative . Input 1 goes to with output , distance , cumulative .
- From state (metric 0): input 0 goes to with output , distance , cumulative . Input 1 goes to with output , distance , cumulative .
Survivors: , , , .
Time 3, received . From each state:
- State (metric 3): to with output , cum. . To with output , cum. .
- State (metric 0): to with output , cum. . To with output , cum. .
- State (metric 3): to with output , cum. . To with output , cum. .
- State (metric 2): to with output , cum. . To with output , cum. .
Survivors (taking the minimum for each destination state): (from , input 1), (from , input 0), (from , input 0), (from , input 1).
Time 4, received . Computing similarly:
- State (metric 1): to with output , cum. . To with output , cum. .
- State (metric 1): to with output , cum. . To with output , cum. .
- State (metric 3): to with output , cum. . To with output , cum. .
- State (metric 2): to with output , cum. . To with output , cum. .
Survivors: , , (from , input 0), (from , input 1).
Time 5, received . From each state:
- State (metric 2): to with output , cum. . To with output , cum. .
- State (metric 2): to with output , cum. . To with output , cum. .
- State (metric 2): to with output , cum. . To with output , cum. .
- State (metric 1): to with output , cum. . To with output , cum. .
Survivors: , , (from , input 0), (from , input 1).
The minimum-metric state at time 5 is state with metric 1. Tracing back: . Reading the input bits from last to first: . This matches the original input, confirming the decoder corrects the single error.
Free distance and the transfer-function bound Intermediate+
Definition (Free distance). The free distance of a convolutional code is the minimum Hamming weight of any nonzero codeword:
where denotes the Hamming weight (number of nonzero symbols) and the minimum is taken over all nonzero codewords produced by any nonzero input sequence starting and ending in state [source pending].
The free distance is the convolutional analogue of the minimum distance of a block code. It determines the error-correcting capability: for maximum-likelihood decoding (Viterbi), any error pattern of weight less than is guaranteed to be corrected.
Computing via the state diagram. The state diagram of the encoder is a directed graph whose nodes are the states and whose edges are the state transitions. Each edge is labelled with where is the Hamming weight of the output symbols on that transition. The free distance is the weight of the lowest-weight closed path through the state diagram that starts and ends at state and visits at least one nonzero state.
For the code, the state diagram has 4 states. The all-zero loop (state to itself with input 0, output weight 0) contributes zero weight and is excluded. The lowest-weight detour from state is:
with total weight . This detour corresponds to input sequence (and the register clears after two steps), producing output . The output weight is . Therefore for the code.
The transfer function. The augmented state diagram generalizes this by replacing each branch label with where is the number of nonzero input bits (information weight) and counts the number of branches. The transfer function from state back to (splitting state into a source and sink) is a generating function whose coefficients enumerate codewords by their output weight, input weight, and length.
Setting gives , where counts the number of codewords of weight . For the code, , confirming with one codeword at that weight, two codewords at weight 6, and so on [source pending].
Error probability bound. On the binary symmetric channel with crossover probability , the first-event error probability (probability that the Viterbi decoder selects a wrong path at the first divergence from the correct path) is bounded by:
This union bound counts all possible error events, each weighted by the probability that the noise causes a path of that weight to be selected over the correct path. The bound is tight at low because the dominant contribution comes from the term [source pending].
Catastrophic error propagation
Definition (Catastrophic code). A convolutional code is catastrophic if there exists an infinite-weight input sequence that produces a finite-weight codeword. In a catastrophic code, a finite number of channel errors can cause an infinite number of decoding errors.
Theorem (Non-catastrophic condition). For a rate- convolutional code with generators , the code is non-catastrophic if and only if:
i.e., the generators have no common polynomial factor other than [source pending].
Proof sketch. If divides all generators, then the input produces output . Since has infinite weight (its coefficients do not vanish), this maps an infinite-weight input to a finite-weight output, which is catastrophic. Conversely, if the generators are coprime, no such input exists: by the Bezout identity, there exist polynomials such that , which means the encoding map is injective on the input weight.
The code is non-catastrophic: . A catastrophic example would be generators which have .
Puncturing
Definition (Punctured convolutional code). Given a rate- mother code, a puncturing pattern is a binary matrix of size where is the puncturing period. The encoder produces output symbols per input bit, but only those in positions where has a are transmitted; positions with are deleted [source pending].
For a rate- mother code, deleting every fourth parity symbol from the second output stream achieves rate :
Over two input bits, the mother code produces 4 output symbols. After puncturing, 3 symbols are transmitted, giving rate . For rate :
Over three input bits, 6 symbols become 4 after puncturing, giving rate .
Puncturing allows a single Viterbi decoder to handle multiple rates by inserting "erased" symbols (which contribute zero to the branch metric) at the punctured positions before decoding.
Exercises Intermediate+
Lean formalization Intermediate+
Mathlib has Polynomial over Fin 2 (representing ), Matrix, and LinearMap infrastructure, but lacks the specific structures needed for convolutional codes. The encoder is a linear map specified by a polynomial generator matrix; this could be built from existing components. The trellis is a directed acyclic graph with state-vertex structure indexed by time and state; no such graph type exists in Mathlib. The Viterbi algorithm is shortest-path dynamic programming on this DAG with additive branch metrics, requiring a formalization of path metric accumulation and survivor selection. Free distance computation needs the state-diagram transfer function (a rational function in ), which requires formalizing signal flow graphs or Mason's gain formula over polynomial rings. A Codex.CodingTheory.Convolutional module defining polynomial encoders, trellis states, and Viterbi decoding would be the load-bearing first step. This unit ships without formalization.
Advanced results Master
Union bound and tangential bound
The transfer-function bound is a union bound: it sums the pairwise error probabilities over all possible error events. This bound is tight at low crossover probabilities but becomes loose as approaches the computational cutoff rate .
The tangential bound tightens the union bound by accounting for the overlap between error events. For a convolutional code with free distance on the BSC with crossover , the tangential bound on the bit-error probability is:
The derivative with respect to weights each error event by the number of information-bit errors it causes, giving a bound on the bit-error rate rather than the event-error rate. For the code, the derivative at introduces a factor related to the number of nonzero input bits in each detour, which refines the bound [source pending].
For the AWGN channel with binary PSK signalling, the pairwise error probability for a codeword at distance from the correct one is where and is the code rate. The union bound becomes:
At high , this is dominated by the term, giving the asymptotic approximation [source pending].
Sequential decoding
For constraint lengths (more than 1024 states), the Viterbi algorithm becomes impractical because the number of states grows exponentially. Sequential decoding algorithms --- the Fano algorithm and the stack algorithm --- provide an alternative that avoids exploring the full trellis.
The Fano algorithm (1963) performs depth-first search on the code tree (the tree obtained by "unrolling" the trellis), using a threshold that increases in discrete steps. At each node, the algorithm extends the most promising branch. If the path metric drops below the threshold, the algorithm backs up and tries the other branch, or increases the threshold. The average number of computations per decoded bit is bounded by a constant for rates below the computational cutoff rate on the BSC, but the worst case is unbounded (the algorithm can "freeze" on certain noise patterns) [source pending].
The stack (Zigangirov-Jelinek) algorithm maintains a sorted list of partial paths ordered by their cumulative metric. At each step, the algorithm extends the top (best) path by one branch and re-inserts the extensions. This avoids the backtracking of the Fano algorithm but requires memory proportional to the stack size.
Sequential decoding achieves near-ML performance with variable computational effort: most frames decode quickly, but a few require extensive searching. This variability makes it unsuitable for real-time applications with strict latency requirements but acceptable for deep-space communication, where throughput can be adjusted via retransmission protocols.
Tail-biting convolutional codes
A tail-biting convolutional code encodes a finite block by starting and ending in the same state. Instead of forcing the encoder to state by appending zero tail bits (which wastes rate), the tail-biting encoder reads the last bits of the input block to determine the initial state, so that the final state equals the initial state. This eliminates the rate loss of caused by termination [source pending].
Decoding a tail-biting code is harder than decoding a terminated code because the initial state is unknown. The Viterbi algorithm must be run from all possible initial states, and the best final-to-initial-state match is selected. This multiplies the decoding complexity by , but for small (say ) this is feasible. Tail-biting convolutional codes are used in the GSM cellular standard and in some IEEE 802.11 OFDM modes.
The BCJR algorithm as a soft-output generalization
The Bahl-Cocke-Jelinek-Raviv (BCJR) algorithm computes the a-posteriori probability (APP) for each bit given the entire received sequence. Like Viterbi, it operates on the trellis, but instead of keeping only the best path, it computes the probability of each state transition using a forward-backward procedure [source pending].
The forward metric is the probability of reaching state at time having observed . The backward metric is the probability of observing given state at time . The branch metric is the joint probability of the transition and the observation. The APP for bit is:
The log-likelihood ratio is the soft output. The BCJR algorithm has the same complexity as Viterbi but produces per-bit reliability information. This soft output is essential for turbo decoding, where the component decoders exchange reliability information iteratively.
Synthesis. Convolutional codes encode a streaming input through a finite-state shift register, producing a trellis structure that supports optimal ML decoding via the Viterbi algorithm; the free distance determines error-correcting capability and is computed from the state-diagram transfer function; puncturing allows flexible rates from a single mother code; and the BCJR algorithm extends Viterbi to produce soft outputs needed for iterative turbo decoding. The foundational reason convolutional codes dominated practical communications for decades is that the trellis structure provides the right balance: finite-state memory (unlike block codes' memorylessness) enables performance gains through code correlation, while the trellis graph supports efficient optimal decoding (unlike the NP-hard ML decoding of general linear block codes). The central insight is that the Viterbi algorithm exploits the Markov structure of the encoder to convert an exponential search over sequences into a tractable dynamic program, and this same structure generalizes to the soft-decision BCJR algorithm that underpins modern iterative decoding.
Full proof set Master
Proposition (Transfer function for the code). The transfer function of the convolutional code is .
Proof. We compute the transfer function using Mason's gain formula on the augmented state diagram. The state diagram has 4 states: , , , . We split into a source node and a sink node.
The branch gains (using only the output weight variable ) are:
- (input 0, output ): gain . This is the self-loop at state .
- (input 1, output ): gain .
- (input 0, output ): gain .
- (input 1, output ): gain .
- (input 0, output ): gain .
- (input 1, output ): gain .
- (input 0, output ): gain .
- (input 1, output ): gain .
The forward paths from source to sink that avoid revisiting are: with gain , and with gain , and so on. The self-loops are at (gain ) and (gain , excluded by splitting).
The state equations (eliminating ) give , where the denominator arises from the two possible continuations through states and at each step. The expansion shows that the number of codewords doubles with each additional unit of weight above .
Proposition (Free distance lower bound). For a rate- non-catastrophic convolutional code with memory and generators of maximum degree , the free distance satisfies .
Proof sketch. Any nonzero input sequence of weight 1 produces a codeword. The shortest such input is a single nonzero bit followed by enough zeros to return the encoder to state . The resulting codeword has at most nonzero output pairs (one per time step while the nonzero bit is in the register), each contributing at most nonzero symbols. Thus . For the code with : , and the actual value is , which is close to this upper bound.
Proposition (Viterbi complexity). The Viterbi algorithm for a rate- convolutional code with memory decoding a sequence of input bits requires operations.
Proof. The trellis has sections and states per section. At each state at time , the algorithm evaluates incoming branches (one for input 0, one for input 1). Each evaluation requires computing the branch metric (comparing output symbols to received symbols, costing ) and adding it to the predecessor's cumulative metric (). The compare-select operation costs . Total per state per time step: . Total over all states and time steps: . The traceback costs , which is dominated.
Connections Master
46.08.02— Turbo codes use recursive systematic convolutional encoders whose trellis structure is the same as developed here. The BCJR algorithm replaces Viterbi to produce soft outputs for iterative decoding. The puncturing technique from this unit is also used in turbo codes to achieve flexible rates.40.06.06— Block codes (Hamming, BCH, Reed-Solomon) are memoryless: each codeword is an independent encoding of a fixed-size block. Convolutional codes introduce finite-state memory, creating correlation between output symbols that spans input bits. This memory is what gives convolutional codes their "gain" over memoryless codes of the same rate at short-to-moderate block lengths.46.08.01— LDPC codes decode on a bipartite Tanner graph using belief propagation; convolutional codes decode on a trellis using Viterbi/BCJR. The trellis is a chain-structured graph (1D), while the Tanner graph is a sparse bipartite graph (2D). The different graph structures lead to different performance profiles: convolutional codes with Viterbi provide optimal ML decoding at moderate complexity (), while LDPC codes with belief propagation provide near-ML performance at linear complexity.46.03.01— Channel capacity sets the ultimate limit on code performance. Convolutional codes with Viterbi decoding approach within a few dB of capacity for moderate constraint lengths (), but the gap is larger than for turbo or LDPC codes. The computational cutoff rate of sequential decoding is a capacity-like threshold specific to convolutional codes.37.01.01— The Viterbi algorithm is a general-purpose shortest-path algorithm for directed acyclic graphs with additive edge weights. It applies to hidden Markov model inference (finding the most likely state sequence given observations), sequence detection in intersymbol interference channels, and speech recognition. The trellis structure is the same as the HMM state-time diagram.
Historical & philosophical context Master
Peter Elias introduced convolutional codes in his 1955 paper "Coding for Noisy Channels" (IRE Convention Record, vol. 3, pp. 37-46). Elias observed that encoding could be given memory by using shift registers, creating a code that operates on continuous data streams rather than fixed blocks. The key advantage over block codes: the decoder can exploit the correlation between consecutive output symbols, providing better performance at short block lengths without the need for algebraic structure.
Andrew Viterbi published his decoding algorithm in 1967, originally as a tool for deriving error bounds rather than as a practical decoder [source pending]. The algorithm's optimality (it performs maximum-likelihood decoding) was recognized by Forney, who gave it the name "Viterbi algorithm" in his 1973 tutorial paper [source pending]. Forney demonstrated that the algorithm applies not only to convolutional decoding but to any estimation problem on a finite-state Markov process observed in noise.
Convolutional codes with Viterbi decoding became the standard for satellite and deep-space communication in the 1970s and 1980s. NASA's Voyager program (1977 launch) used a constraint-length-7 convolutional code with Viterbi decoding for the downlink, achieving coding gains of 5-6 dB over uncoded transmission. This coding gain translated directly into transmitter power savings, reducing the size and weight of the spacecraft's antenna and power systems. The same code was used in the Galileo, Magellan, and Cassini missions.
The GSM (2G) cellular standard adopted convolutional codes with constraint lengths 5 and 7 for voice and data channels, decoded by Viterbi. Every mobile phone manufactured between 1991 and the transition to 3G contained a Viterbi decoder. The IEEE 802.11a Wi-Fi standard (1999) used convolutional codes as the mandatory forward error-correction scheme.
The philosophical lesson is that the shift from block codes to convolutional codes represented a change in perspective: from algebraic structure to probabilistic structure. Block codes rely on the algebraic properties of finite fields to guarantee a minimum distance. Convolutional codes rely on the statistical properties of the channel and the encoder's memory to provide coding gain. The Viterbi algorithm is a probabilistic tool (ML estimation on a Markov process), not an algebraic one. This probabilistic perspective prepared the ground for the turbo and LDPC codes of the 1990s, which pushed the probabilistic approach to its logical conclusion: iterative soft-information processing that approaches the Shannon limit.
The transition away from convolutional codes began with the adoption of turbo codes in 3G (1999) and LDPC codes in 5G (2017). However, convolutional codes remain in use for short-block applications (control channels, signalling) where the overhead of iterative decoding is not justified, and in legacy systems. The trellis structure and Viterbi algorithm also live on as subroutines within turbo decoders (as the constituent code) and in equalizers for intersymbol interference channels.
Bibliography Master
@book{macwilliams-sloane1977,
author = {MacWilliams, F. J. and Sloane, N. J. A.},
title = {The Theory of Error-Correcting Codes},
publisher = {North-Holland},
year = {1977},
}
@article{viterbi1967,
author = {Viterbi, A. J.},
title = {Error Bounds for Convolutional Codes and an Asymptotically Optimum Decoding Algorithm},
journal = {IEEE Transactions on Information Theory},
volume = {13},
pages = {260--269},
year = {1967},
}
@article{forney1973,
author = {Forney, G. D.},
title = {The Viterbi Algorithm},
journal = {Proceedings of the IEEE},
volume = {61},
pages = {268--278},
year = {1973},
}
@article{elias1955,
author = {Elias, P.},
title = {Coding for Noisy Channels},
journal = {IRE Convention Record},
volume = {3},
pages = {37--46},
year = {1955},
}
@article{bahl-cocke-jelinek-raviv1974,
author = {Bahl, L. R. and Cocke, J. and Jelinek, F. and Raviv, J.},
title = {Optimal Decoding of Linear Codes for Minimizing Symbol Error Rate},
journal = {IEEE Transactions on Information Theory},
volume = {20},
pages = {284--287},
year = {1974},
}
@article{berrou-glavieux-thitimajshima1993,
author = {Berrou, C. and Glavieux, A. and Thitimajshima, P.},
title = {Near {Shannon} Limit Error-Correcting Coding and Decoding: {Turbo-Codes}},
booktitle = {Proc. IEEE Int. Conf. Communications (ICC)},
pages = {1064--1070},
year = {1993},
}
@book{proakis-salehi2008,
author = {Proakis, J. G. and Salehi, M.},
title = {Digital Communications},
edition = {5th},
publisher = {McGraw-Hill},
year = {2008},
}Meta Master
This unit introduced convolutional codes from first principles: the shift-register encoder, the trellis as its natural graphical representation, the Viterbi algorithm for optimal ML decoding via dynamic programming on the trellis, and the free distance as the fundamental performance metric computed from the state-diagram transfer function. We covered catastrophic codes, puncturing for rate flexibility, and the BCJR algorithm as the soft-output generalization of Viterbi. The trellis machinery developed here is the direct prerequisite for understanding turbo codes (46.08.02), where recursive systematic convolutional encoders serve as the constituent codes and BCJR provides the soft outputs for iterative decoding. The next step is to see how two such convolutional codes, coupled through an interleaver and decoded iteratively, achieve near-Shannon-limit performance.