Skip to main content

Short note: Trellis diagram of convolutional encoder

Short answer

A trellis diagram shows encoder states over time with branches for each input. For a rate-1/2, K=3 encoder (generators 111, 101), message 1010 with two flushing zeros produces output 11 10 00 10 11 00, tracing a unique path through states a→b→c→b→c→a→a.

Write a short note on trellis diagram of a message 1010 using a ½ rate 3-state memory block convolutional encoder.

A trellis diagram is a time-expanded state diagram of a convolutional encoder. The encoder states (contents of the memory) are drawn as rows of nodes, time runs left to right, and each branch shows the transition caused by one input bit, labelled with the output bits. Each message traces one path through the trellis; the Viterbi decoder searches the trellis for the closest path.

Assumed encoder ("3-state memory" read as a three-stage shift register, i.e. constraint length K=3K=3: the present bit plus 2 memory flip-flops, giving 22=42^2=4 states), rate 1/2, generators g(1)=111g^{(1)}=111, g(2)=101g^{(2)}=101:

c1=mi⊕mi−1⊕mi−2,c2=mi⊕mi−2c_1=m_i\oplus m_{i-1}\oplus m_{i-2},\qquad c_2=m_i\oplus m_{i-2}

States (mi−1mi−2)(m_{i-1}m_{i-2}): a = 00, b = 10, c = 01, d = 11.

Encoding 1010 (with two 0s to flush)

InputState beforeOutputState after
1a (00)11b (10)
0b (10)10c (01)
1c (01)00b (10)
0b (10)10c (01)
0 (flush)c (01)11a (00)
0 (flush)a (00)00a (00)

Encoded sequence: 11 10 00 10 11 00.

Trellis with the message path

      t0     t1     t2     t3     t4     t5     t6
a 00  *      o      o      o      o      *======*
        \                               /
           \                           /
b 10  o      *      o      *      o   /  o      o
               \         /   \      /
                  \   /         \  /
c 01  o      o      *      o      *      o      o


d 11  o      o      o      o      o      o      o
in:      1      0      1      0      0      0
out:    11     10     00     10     11     00

In the full trellis every state has two branches leaving it (input 0 and input 1). After K−1=2K-1=2 steps the pattern of branches repeats at every stage. The path marked with * (= for a horizontal branch) is the unique path for 1010; any received sequence is decoded by finding the path with the minimum Hamming distance from it.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Communication Systems chapter 8 questions →