Constraint length K: the number of shifts over which a single message bit influence the output M-stage shift register: needs M+1 shifts for a message to enter the shift register and
Trang 1Principles of Communications
By: Dang Quang Vinh
Faculty of Electronics and Telecommunications
Ho Chi Minh University of Natural Sciences
Convolutional codes
09/2008
Trang 2 In block coding, the encoder accepts k-bit message block and generates n-bit codeword⇒Block-by-block basis
Encoder must buffer an entire message block before
generating the codeword
When the message bits come in serially rather than in large blocks, using buffer is undesirable
Convolutional coding
Trang 3Definitions
consists of an M-stage shift register, n modulo-2 adders
with n(L+M) bits
ol) (bits/symb
) (L M n
L r
+
=
ol)(bits/symb
1
n
Trang 4 Constraint length (K): the number of shifts over which a
single message bit influence the output
M-stage shift register: needs M+1 shifts for a message to
enter the shift register and come out
K=M+1
Trang 6Output Input
Trang 7Generations
characterized by impulse response or generator
polynomial
cyclic codes
polynomials { }
) ,
, , ,
0
) ( 1
) ( 2
) ( 1
2 ) ( 2
) ( )
( ),
) 1
Trang 8 Consider the case of (2,1,2)
Impulse response of path 1 is (1,1,1)
The corresponding generator polynomial is
Impulse response of path 2 is (1,0,1)
The corresponding generator polynomial is
Message sequence (11001)
Polynomial representation:
1 )
) 1 ( D = D + D+
g
1 )
) 2
g
1 )
(D = D4 + D3 +
m
Trang 9Example(2/8)
1
1
) 1 )(
1 (
) ( )
( )
(
2 3
6
2 3
4 5
4 5
6
2 3
4
) 1 ( )
1 (
+ + +
+
=
+ + +
+ +
+ +
+
=
+ + +
+
=
=
D D
D D
D D
D D
D D
D D
D D
D D
D g
D m D
c
1
) 1 )(
1 (
) ( )
( )
(
2 3
5 4
6
2 3
4
) 2 ( )
2 (
+ +
+ +
+
=
+ +
+
=
=
D D
D D
D
D D
D
D g
D m D
c
Trang 10 Message length L=5bits
Output length n(L+K-1)=14bits
A terminating sequence of K-1=2 zeros is
appended to the last input bit for the shift
register to be restored to its zero initial state
Trang 1100
1011
010
0
10011
001
11
001001
0011
0010
011
00100
11
001001
output 111
m
c (1) =(1001111)
Trang 13Example(6/8)
denoting the impulse
input
Output Input
) ,
, , ,
0 , ) ( 1 , )
( 1 , ) ( , )
i
j i
j M i
j M i
j
Trang 14Output Input
D D
g g
D D
g g
D D
g g
D g
g
D g
g
D D
g g
10
(
1 )
( )
11
(
) ( )
10
(
1 ) ( )
01 (
1 ) ( )
01
(
1 )
( )
11
(
) 1 ( )
3
(
) 1 ( 1 )
3
(
1
) 2 ( 2 )
2
(
2
) 2 ( 1 )
2
(
1
) 1 ( 1 )
1
(
2
) 1 ( 1 )
1
(
1
Trang 16of input 1 is represented by dashed line
Output is labeled over the transition line
state Binary description
d
c
1/11
0/10 1/01
Trang 17c
0/00 1/11
0/10 1/01
1
11
01 c
0
01
00 a
0
11 d 01
1
Trang 19Trellis(1/2)
The trellis contains (L+K) levels
Labeled as j=0,1,…,L,…,L+K-1
The first (K-1) levels correspond to the
encoder’s departure from the initial state a
The last (K-1) levels correspond to the
encoder’s return to state a
For the level j lies in the range K-1 ≤ j ≤ L, all
the states are reachable
Trang 21Maximum Likelihood Decoding
of Convolutional codes
m denotes a message vector
c denotes the corresponding code vector
r denotes the received vector
With a given r , decoder is required to make estimate
of message vector, equivalently produce an estimate
of the code vector
otherwise, a decoding error
happens
Decoding rule is said to be optimum when the
propability of decoding error is minimized
The maximum likelihood decoder or decision rule is
described as follows:
Choose the estimate for which the log-likelihood
function logp(r/c) is maximum
mˆ
cˆ
c c
m
m ˆ = only if ˆ =
cˆ
Trang 22Maximum Likelihood Decoding
of Convolutional codes
Binary symmetric channel: both c and r are binary
sequences of length N
r differs from c in d positions, or d is the Hamming
distance between r and c
| (
| ( log
i i
i i
c r
c
r p
p c
r
p
if
if 1
)
| ( with
) 1 log(
1 log
) 1 log(
) (
log )
| ( log
p N
p
p d
p d
N p d
c r p
− +
=
⇒
Trang 23Maximum Likelihood Decoding
of Convolutional codes
Decoding rule is restated as follows:
Choose the estimate that minimizes the
Hamming distance between the received vector r
and the transmitted vector c
The received vector r is compared with each
possible code vector c, and the one closest
to r is chosen as the correct transmitted
code vector
cˆ
Trang 24The Viterbi algorithm
Choose a path in the trellis whose coded sequence differs from the received sequence in the fewest number of
positions
Trang 25The Viterbi algorithm
The algorithm operates by computing a
metric for every possible path in the trellis
Metric is Hamming distance between coded sequence represented by that path and
Trang 264 3
3
2 5
2 5
Code
Trang 27Free distance of a conv code
Performance of a conv code depends on
decoding algorithm and distance properties of
the code.
Free distance, denoted by dfree, is a measure of code’ s ability to combat channel noise
Free distance: minimum Hamming distance
between any two codewords in the code
dfree>2t
Since a convolutional code doesn't use blocks, processing instead a continuous bitstream, the value of t applies to a quantity of errors located relatively near to each other
Trang 28Free distance of a conv code
Conv code has linear property
So, free distance also defined:
Calculate dfree by a generating function
Generating function viewed the transfer
function of encoder
Relating input and output by convolution
Generation func relating initial and final state
Trang 29Free distance of a conv code
Modify state diagram
00
11
a b
d
c
0/00 1/11
0/10 1/01
Trang 30Free distance of a conv code
State equations:
c D a
DLd DLb
d
Dd Db
c
Lc La
D b
2 1
0 2
0
2 1
) ,
(
i
i DL L
D DL
L
D a
a L
D T
4 5
3 7 2
6
5 2 4 2 )
, (D L = D L+ D L + D L + = ∑∞ d− D d L d−T
Trang 31Free distance of a conv code
T (D,L) represents all possible transmitted
sequences that terminate with c-e
transition
For any d ≥ 5, there are 2d -5 paths with
weight w(X)=d that terminate with c-e
transition, those paths are generated by
messages containing d -4 nonzero bits
The free distance is the smallest of w(X),
so dfree=5
4 5
5 3
7 2
6
),
++
d
d
d D L L
D L
D L
D L
D T
Trang 32Systematic conv code
The message elements appear explicitly in the output sequence together with the redundant
elements
Path 1
Path 2
Output Input
Trang 33Systematic conv code
Impulse response of path 1 is (1,0,0)
The corresponding generator polynomial is
Impulse response of path 2 is (1,0,1)
The corresponding generator polynomial is
Message sequence (11001)
2 )
1 ( (D) D
1)
) 2 ( D = D +
g
Trang 34Systematic conv code
Output sequence of path 1 (1100100)
Output sequence of path 2 (1111101)
Trang 35Systematic conv code
Another example of systemmatic conv code
Path 1
Path 2
Output Input
Trang 36Systematic vs nonsystematic
of transmission errors can cause an infinite
number of decoding errors
of systematic code is smaller than that of
nonsystematic code
4 5
5 3
7 2
6
) ,
D L
D L
D L
D T
Trang 37Systematic vs nonsystematic
Maximum free distance with systematic and
nonsystematic conv codes of rate 1/2