Convolutional Code
How a Convolutional Encoder Builds Redundancy
The encoder is a finite-state machine built from a shift register of K−1 memory stages and a bank of modulo-2 adders. As each information bit shifts in, the adders combine taps from the register according to fixed generator polynomials to produce n output bits per k input bits. Because the present output depends on a window of recent inputs, the code carries memory; the constraint length K quantifies how many bit positions, including the current one, influence each output group. A rate-1/2, K=7 encoder therefore has six memory stages and 26 = 64 states, and its behavior is captured completely by a state diagram or, unrolled over time, a trellis.
Decoding inverts this process by searching the trellis for the path whose coded sequence is closest to the received samples. The Viterbi algorithm performs this maximum-likelihood search efficiently using add-compare-select recursion, retaining only the survivor path into each state. Soft-decision metrics, where the demodulator passes quantized confidence values rather than hard 0/1 bits, recover roughly 2 dB more coding gain than hard-decision metrics. The decoder must accumulate a traceback depth of about five times the constraint length (35 trellis steps for K=7) before the survivor paths merge reliably and a decision bit can be released.
Throughput can be raised without redesigning the encoder by puncturing: the transmitter periodically deletes selected coded bits to convert the native rate-1/2 stream into higher rates such as 2/3, 3/4, 5/6, or 7/8. The decoder inserts erasures at the punctured positions and runs the same Viterbi machine, trading a fraction of a dB to several dB of coding gain for additional payload capacity. This is exactly how 802.11a adapts coding rate across its modulation-and-coding-scheme table.
Governing Relationships
Nstates = 2(K−1) (K = constraint length)
Code rate and bandwidth expansion:
R = k / n → BW expansion = 1 / R
Asymptotic coding gain (soft decision, AWGN):
Ga ≈ 10 × log10(R × dfree) dB
Encoder output (rate 1/2 example):
v1[n] = ∑ g1,i · u[n−i] (mod 2), v2[n] = ∑ g2,i · u[n−i] (mod 2)
Where u = input bit stream, g = generator polynomial taps, dfree = minimum free distance. Example: R=1/2, K=7, dfree=10 → Ga ≈ 10×log10(5) ≈ 7 dB asymptotic, about 5.2 dB realized at BER 10−5.
Common Convolutional Codes and Their Parameters
| Code (octal generators) | Rate R | Constraint K | dfree | Soft gain @ 10−5 | Typical Use |
|---|---|---|---|---|---|
| 5, 7 | 1/2 | 3 | 5 | ~3.5 dB | Low-complexity links |
| 171, 133 | 1/2 | 7 | 10 | ~5.2 dB | 802.11a/g, CCSDS, GSM |
| 171, 133 (punctured) | 3/4 | 7 | 4 | ~3.7 dB | Higher-throughput Wi-Fi |
| 561, 753 | 1/2 | 9 | 12 | ~5.7 dB | Deep-space, NASA |
| 171, 133, 165 | 1/3 | 7 | 15 | ~5.8 dB | IS-95, CCSDS rate-1/3 |
Frequently Asked Questions
What do constraint length and code rate mean for a convolutional code?
Constraint length K is the number of bit positions, including the current input, that affect each output group; it equals the shift-register length plus one, so K=7 means 6 stages and 26 = 64 trellis states. Code rate R = k/n is input bits per output bits, so rate 1/2 doubles the symbol stream. Larger K raises dfree and coding gain but Viterbi complexity grows as 2(K−1), so practical codes use K = 5 to 9. The canonical 802.11a/CCSDS code is rate-1/2, K=7 with generators 171 and 133 octal.
How does a convolutional code differ from a block code like Reed-Solomon?
A block code adds parity to fixed-length blocks independently and has no memory between blocks; a convolutional code carries memory in its shift register so output depends on a running window of recent inputs. Convolutional codes pair naturally with soft-decision Viterbi decoding and excel against random AWGN errors, while Reed-Solomon excels against bursts. Concatenated systems use an outer Reed-Solomon (255,223) around an inner convolutional code, the classic deep-space and DVB arrangement.
What coding gain does a rate-1/2 K=7 code give at a BER of 10−5?
With soft-decision Viterbi decoding on an AWGN channel it provides about 5.2 dB of gain, cutting required Eb/N0 from roughly 9.6 dB (uncoded BPSK) to about 4.4 dB. Hard-decision decoding loses roughly 2 dB. Puncturing to rate 3/4 trades about 1.5 dB of gain for throughput. The asymptotic limit is near 10×log10(R×dfree); real systems fall short at moderate BER due to error-event multiplicity.