Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Communication Systems-2

(304CDE)

Lecture 10: Error correction code


(Part 5)
Viterbi Decoding
 This is a minimum distance decoding method applicable to
convolutional codes. The most likely transmitted sequence is the
one with the smallest Hamming distance to the received sequence.
1. Begin decoding assuming that the encoder began in the all
zero state.
2. Compute the Hamming distances for all paths entering each
state, between these paths and the corresponding received
digits.
3. Select the path with the lowest ‘score’ arriving at each node
and discard the other one(s). Store the score and its
corresponding path. If the scores are equal select one at
random.
4. Repeat 2 and add the new scores.
5. Repeat 3 storing the new scores and paths (survivor
sequences).
6. Continue until all digits have been received.
7. Output the sequence which has the lowest running score.
2
Exercise
 Find the codeword for the information bits 10101 for the following
encoder 00
0
Output 1 01
11
Input Output 1
10
Output 2
+
0
1

Answer 11 01 11 01 11

3
Exercise
 Find the codeword for the information bits 10101 for the following
encoder 00
Output 1
0
01
Input Output 11
1
Output 2 10
+
0
1
Answer 11 01 11 01 11

00 11 01 11 01 11
0
01
11
0
1 01 01
10
11 11 11
1
0
1

4
Example
 The received sequence for the following encoder is 11 01 01 01 11.
What is the output of the decoder
Output 1

Input Output

Output 2
+

Answer 10101

5
Solution

00
0 11 01 11 01 11
01
11 2 3
0 ×
1 0
10 0 ×3
1
0 2
1

6
Solution (cont…)
00
0 11 01 01 01 11
01
11 1
0
1
10 0
0 ×2
1
1 ×
0 2 4
1

7
Solution (cont…)
00
0 11 01 01 01 11
01
11 1 2 3
1
0 ×
0 1 3
2
10 0 ×1 2 1

0
1
2
× ×3
4 3
1

8
Solution (cont…)
00
0 11 01 01 01 11
01
1 2 3
11
0 ×
1 0 2
1 3
10 0 ×1 2 1

0
1
2
× ×3
4 3
1

Estimated encoder input sequences: 10101

9
Exercise
 Find the decoder output for the same encoder if the received
sequence is 11 01 11 11 11

0 input 1 input

a,c
State
00 00 00 00 00
0
11 11 11 11 11

01 01 01 01

1
10 10 10 10

b,d

Stage 1 2 3 4 5
Answer 10101

10
Convolutional Encoder with L =3
x1
input

output
K x Rc=1/2,
FF1 FF2
L=3
 x2
Figure: binary convolutional encoder

Code Rate, Rc = no of inputs / no of outputs = ½


Number of Flip Flops, M = 2
Constraint length, L = M+1=3
Generator Sequences (Words ) : (g1 = 111 , g2 = 101)
Number of Sates, Ns = 2M = 4

11
State Diagram and State Table
Input Current State Next State Output
FF1 FF2 FF1 FF2 1 2
0 0 0 0 0 0 0
0 0 1 0 0 1 1
0 1 0 0 1 1 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 0 1 1 0 0 0
1 1 0 1 1 0 1
1 1 1 1 1 1 0
10

11
01 01
00
0 input
10 01
0 input 1 input 11
10
11 11 0011
00 0
00
00 10
0 1

01
12
Trellis Diagram & Hamming Distance
1 2 3 4 5 6
00 00 00 00 00 00
00 11 11 11 11 11 11
11 11 11 11

10
00 00 00 00
10 10 10 10 10
01 01 01 01 01 01

01 01 01 01
11
10 10 10 10

input 1 input 0

dfree = 2+1+2 = 5

t =  (5-1)/2 = 2  Two errors can be corrected.


13
Viterbi Decoding Example
If the received sequence y = 11 10 00 11 01 00 10 11, what
is the output of the decoder

14
11 10 00 11 01 00 10 11
2 3 3/2
00
0 3 5/0
10
0 4/3
01
2 4/3
11
11 10 00 11 01 00 10 11
2 3 2 4/3
00
0 3 0 2/5
10
0 3 1/4
01
2 3 1/4
11
11 10 00 11 01 00 10 11
2 3 2 3 2 2 3 1
00
0 3 0 2 2 1 3 3
10
0 3 1 1 3 1 4
01
2 3 2 3 3 4
1
11
11 10 00 11 01 00 10 11
2 3 2 3 2 2 3 1
00
0 3 0 2 2 1 3 3
10
0 3 1 1 3 1 4
01
2 3 2 3 3 4
1
11

 Estimated encoder output sequence: = 11 10 00 01 01 00 10 11


 Estimated encoder input sequence: = 1 0 1 1 0 1 0 0
Exercise
If the received sequence y = 11 11 10 01 00, what is the output of the
decode
input 0 input 1
00 00 00 00 00
00 11 11 11 11 11
11 11 11

10
00 00 00
10 10 10 10
01 01 01 01 01

01 01 01
11
10 10 10

 Estimated encoder output sequence: x̂ = 11 01 10 01 00


 Estimated encoder input sequence: k̂ = 1 1 1 0 1

19
Exercise
A rate 1/3 convolutional encoder has a single shift register
with two Flip Flops. There are three modulo-2 adders and
an output switch. The generator words are:

gl = 101, g2 = 110, g3 = 111

1. Draw a diagram of the encoder


2. Produce its state table
3. Draw its trellis diagram
4. Use your trellis diagram to demonstrate the
decoding of the received bits 111 010 101 000.

20
Exercise
A rate ½ convolutional code has generator words
1111 and 1101.

1. Draw a diagram of the encoder.


2. Construct a state table
3. Construct trellis diagram (four input bits
long)
4. Determine the output sequence for the four
input bits 1011 and show this on your trellis
diagram.

21
Convolutional Code: code gain

Bit error rate versus Eb/N0 for rate 1/2 Viterbi decoding. K = 3 through 8 with 32 bit
window decoding 1
1J. Heller and I. M. Jacobs, TEEE Trans. Com. Tech., vol. 19, no. 5, pp. 835-848, Oct. 1971.
22
Convolutional Code: code gain

Bit error rate versus Eb/N0 for rate 1/2 Viterbi decoding. K = 3 through 8 with 32 bit
window decoding 1
1J. Heller and I. M. Jacobs, TEEE Trans. Com. Tech., vol. 19, no. 5, pp. 835-848, Oct. 1971.
23
Turbo Code
 Introduced by Berrou, Glavieux, and Thitimajshima in 1993
 Parallel concatenation of codes (commonly Convolutional
Codes)
 Produce high weight code words
 Interleaver shuffles the input sequence
 Iterative decoding

Input
Input Output 1
Encoder 1
Decoder 1

Interleaver
Interleaver Deinterleaver
Output 2
Encoder 2
Decoder 2

Output
Encoder Decoder

24
Turbo Code

L. Perez, “Turbo Codes”, chapter 8 of Trellis Coding by C. Schlegel. IEEE Press, 1997.
25
Further reading

• B. Sklar, Digital Communications: Fundamentals and Application.


2002.

• T. K. Moon, Error correction coding: Mathematical methods and


algorithms . New Jersey: Wiley-Interscience, 2005.

• B. A. Forouzan, Data Communications and Networking. 2001.

• John G. Proakis, Masoud Salehi, Digital communications, 2008

26

You might also like