Viterbi Decoding for TCM
Why Viterbi is the Right Decoder for TCM
The encoder in a TCM scheme is a finite-state machine: the next state depends on the current state and the input bits. Under AWGN, the maximum-likelihood sequence detector minimizes the total squared Euclidean distance between the received-sample sequence and all admissible transmitted sequences. The Viterbi algorithm does exactly this: it performs dynamic programming on the trellis, pruning all paths that cannot be optimal at each time step, and returns the surviving best path at traceback.
TCM introduces exactly one twist compared to classical binary Viterbi decoding: the parallel transitions (multiple edges between the same pair of states, produced by the uncoded bits) must be collapsed by a subset decoder into a single "best" edge per coset per time step, before the Viterbi recursion runs on the state-pair trellis. This preprocessing step shrinks the effective branch count from per state to per state, which is what makes TCM decoding practical.
Everything else β path-metric update, add-compare-select (ACS), survivor memory, traceback β is identical to binary Viterbi. This section states the algorithm precisely, works one section of the 4-state 8-PSK trellis by hand, and discusses the complexity scaling.
Definition: Branch Metric (TCM)
Branch Metric (TCM)
For a received sample at time and a trellis edge at time labelled by coset , the branch metric (after subset decoding) is
The achieving the minimum is the subset-decoded point of at time and is recorded as the best in-coset decision for that edge; it will be used to recover the uncoded bits at traceback.
For level- cosets, candidates must be searched β typically 1, 2, or 4 points. This is a small computation per time step per coset.
Definition: Path Metric and Survivor
Path Metric and Survivor
The path metric of a trellis path ending at state at time is the sum of branch metrics along :
where is the coset labelling the -th edge of . The survivor at state at time is the path arriving at with the smallest path metric among all paths ending at :
By Bellman's optimality principle, once a path is eliminated at state at time , it cannot be part of the ML sequence through any later state, so it can be discarded.
Definition: Traceback (Survivor Decoding)
Traceback (Survivor Decoding)
At some time , the decoder selects the state with the smallest path metric and reconstructs the entire survivor path by walking backward through the stored survivor pointers. The coset indices along this path, together with the subset-decoded points at each edge, yield the maximum-likelihood sequence of transmitted symbols.
In practice, the decoder does not wait until but performs rolling traceback after each trellis sections (the traceback depth), declaring a decision at time at every time .
Recommended traceback depth: to for convolutional memory , so that the probability of incorrect traceback from a wrong final-state choice is negligible (ETrellis Depth and Decoder Latency).
Branch Metric
The cost of a single trellis edge, used by the Viterbi algorithm. For TCM, it is the minimum squared Euclidean distance between the received sample and any point in the coset labelling that edge.
Related: Branch Metric (TCM), Subset Decoding (Within-Coset Nearest-Point Rule)
Path Metric
The sum of branch metrics along a trellis path. The Viterbi algorithm maintains, for each state at each time, the minimum path metric among all paths arriving at that state (the survivor path metric).
Related: Path Metric and Survivor
Survivor Path
At each state and time, the trellis path arriving at that state with the smallest path metric. By Bellman's principle, all other paths arriving at that state can be discarded.
Related: Path Metric and Survivor, Traceback (Survivor Decoding)
Viterbi Algorithm for TCM (with Subset Decoding)
Complexity: time; memory for traceback depth .The subset-decoding step is embarrassingly parallel (one coset at a time, one sample at a time). The ACS step is the bottleneck: states times predecessors per state times two adds and one compare each = ops per symbol. This is why TCM uses small (typically 1 or 2) β the complexity grows as .
Viterbi Decoding on the 4-State 8-PSK TCM Trellis
Example: One ACS Step of Viterbi on the 4-State 8-PSK TCM
Consider the 4-state 8-PSK TCM trellis from EVerifying the Design Rules on the 4-State 8-PSK TCM. Suppose at time the path metrics at the four states are and the received sample is (between 8-PSK points labelled and , slightly closer to ). For simplicity take the normalized 8-PSK . The trellis has the standard Ungerboeck structure: each state has 2 outgoing edges; each edge has 2 parallel transitions, carrying antipodal 8-PSK points at level-2 cosets labelled by the coset bit pair (high bit, low bit).
Perform one ACS step: subset-decode the four level-2 cosets, then compute the new path metrics for .
Identify the four level-2 cosets
With Ungerboeck's labeling, the four level-2 cosets of 8-PSK are antipodal pairs:
Each coset has separation (antipodal).
Subset-decode each coset
For :
- : nearest is ; .
- : nearest is ; .
- : nearest is ; .
- : nearest is ; .
So for the four cosets. (Subset decoding collapsed 8 branch-point distances into just 4 coset metrics β a reduction in ACS input count.)
Apply the trellis transition table
For Ungerboeck's canonical 4-state 8-PSK encoder, one standard assignment (see πOne Section of the Canonical 4-State 8-PSK Ungerboeck Trellis) gives the transition/coset table (row = current state , column = input bit ):
| 0 | 1 | |
|---|---|---|
| 0 | ||
| 1 | ||
| 2 | ||
| 3 |
(Any other assignment that satisfies (R1)β(R3) gives an equivalent trellis up to state relabelling.)
ACS for new state $s' = 0$
State has two incoming edges: from via () and from via ().
- Candidate from : .
- Candidate from : .
Take the minimum: , with survivor pointer and decoded coset (subset-decoded point ).
ACS for the other three states
Similar ACS computations:
- : edges from (via , ) and from (via , ). Candidates: and . , survivor , coset .
- : edges from (via , ) and from (via , ). Candidates: and . , survivor , coset .
- : edges from (via , ) and from (via , ). Candidates: and . , survivor , coset .
Summary of the step
The updated path metrics are . State is currently the most likely end-state; this will guide the rolling traceback a few steps later. Notice that 4 ACS computations were needed β candidate metrics, halved to 4 survivors. This is the complexity contract of TCM Viterbi.
Viterbi Complexity vs. Trellis Memory
The Viterbi decoder cost per symbol scales as:
- Branch-metric step: coset metrics, each of which requires a search over in-coset candidates. Total: point-distance computations (same as full ML on the constellation).
- ACS step: adds and compares.
- Survivor memory: bits for traceback depth .
Doubling (one more memory cell ) doubles ACS cost and survivor memory, and typically gains 0.3β0.5 dB of free-distance coding gain. V.34's 16-state TCM was considered the sweet spot at the time: more states would have exceeded the DSP budget of 1994 modems. Modern 5G NR uses LDPC codes precisely because the per-symbol Viterbi complexity scales poorly as grows into the tens of thousands.
- β’
Per-symbol ACS cost: operations
- β’
Branch-metric cost: distance evaluations
- β’
Survivor memory: bits with
Common Mistake: Using Hamming Distance as the Viterbi Branch Metric for TCM
Mistake:
Applying a binary Viterbi decoder directly to the coset-label output of a TCM encoder, using Hamming distance as the branch metric.
Correction:
The correct TCM branch metric is the squared Euclidean distance in the signal space, after subset decoding β not the Hamming distance between received bits and the coset label. Using Hamming distance discards the geometric information (distance-doubling at each partition level) that is the whole point of TCM. The coding gain drops from 3β6 dB to roughly 0 dB β you end up decoding as if the underlying binary code were used directly over BPSK.
Common Mistake: Too-Shallow Traceback Depth
Mistake:
Setting the traceback depth to be too small (e.g., or ).
Correction:
With smaller than about , the probability that the survivor paths at time have not merged to a single common ancestor is non-negligible: different final states disagree on what the symbol at time was. This causes burst errors at the decoder output β not from the channel, but from the decoder itself. Rule of thumb: for rate- codes, for higher-rate codes.
Quick Check
The Viterbi decoder of a TCM code with states and coded bits performs, per symbol:
add-compare-select operations and branch-metric evaluations.
add-compare-select operations and branch-metric (coset) evaluations, each an in-coset minimum over candidates.
add-compare-select operations and a single branch-metric evaluation.
compares and branch-metric evaluations.
Each of target states has incoming edges (one per input pattern), giving ACS operations per symbol. Branch metrics are computed once per coset, so of them; each involves finding the nearest point among candidates in that coset. Total distance computations: , same as full ML.
Quick Check
A 64-state () TCM code operates at symbols/s. Using the rule-of-thumb traceback depth , what is the approximate decoder latency?
About ms.
About ms.
About s.
About s.
symbols of traceback at symbols/s gives ms. V.34 modems accepted this latency because echo cancellation and handshake overheads dominated. Modern gigasymbol-rate systems cannot tolerate even symbols of latency at those rates ( ns), which is one reason LDPC has replaced TCM in 5G NR.
Key Takeaway
Two-stage decoding. TCM decoding is binary-code Viterbi wrapped around per-coset subset decoding. First, for every time step and every coset, find the nearest in-coset constellation point and record its squared Euclidean distance to the received sample. Second, run Viterbi over the state-pair trellis using those coset-level branch metrics. The per-symbol cost is ACS operations plus distance evaluations β the same as optimal ML but organized to exploit the trellis structure.