Sie sind auf Seite 1von 35

# Name

Convolutional codes
Tomashevich Victor
Name - 2 -
Introduction
Convolutional codes map information to code bits sequentially by
convolving a sequence of information bits with generator sequences

A convolutional encoder encodes K information bits to N>K code bits
at one time step

Convolutional codes can be regarded as block codes for which the
encoder has a certain structure such that we can express the
encoding operation as convolution
Name - 3 -
Properties of convolutional codes
Consider a convolutional encoder. Input to the encoder is a
information bit sequence
u
(partitioned into blocks of length K):
) , , (
1 0
u u u =
), , , (
) ( ) 2 ( ) 1 ( K
i i i i
u u u u =
The encoder output the code bit sequence
x
(partitioned into blocks
) , , (
1 0
x x x =
), , , (
) ( ) 2 ( ) 1 ( N
i i i i
x x x x =
N
K
R =
of length N)
Name - 4 -
Example: Consider a rate convolutional code with K=1 and N=2
defined by the circuit:
i
u
i
x
The sequences
) , , (
) 1 (
1
) 1 (
0
x x
,
) , , (
) 2 (
1
) 2 (
0
x x
are generated as follows:
i i
u x =
) 1 (
1
) 2 (

+ =
i i i
u u x and
Multiplexing between
) 1 (
i
x
and
) 2 (
i
x
gives the code bit sequence
) , , ( ) ), ( ), ((
1 0
) 2 (
1
) 1 (
1
) 2 (
0
) 1 (
0
x x x x x x x = =
Name - 5 -
The convolutional code is linear

The encoding mapping is bijective

Code bits generated at time step i are affected by information bits up
to M time steps i 1, i 2, , i M back in time. M is the maximal
delay of information bits in the encoder

Code memory is the (minimal) number of registers to construct an
encoding circuit for the code.

Constraint length is the overall number of information bits affecting
code bits generated at time step i: =code memory + K=MK + K=(M +
1)K

A convolutional code is systematic if the N code bits generated at
time step i contain the K information bits

Name - 6 -
Example: The rate code defined by the circuit

i
u
i
x
has delay M=1, memory 1, constraint length 2, and it is systematic
Example: the rate 2/3 code defined by the circuit
) 1 (
i
u
) 2 (
i
u
) 1 (
i
x
) 2 (
i
x
) 3 (
i
x
has delay M=1, memory 2, constraint length 4, and not systematic
Name - 7 -
Tree
A
A
A
B
B
A
0
u
1
u
2
u
1
0
00
01
00
00
01
11
00
11
01
10
10
11
10
11
Name - 8 -
Trellis
The tree graph can be contracted to a direct graph called trellis
of the convolutional code having at most S nodes at distance
i=0,1, to the root
The contents of the (at most) MK encoder registers are assigned
the variables
1 , , 1 , 0 ), 2 (
) (
= e K M j GF s
j
i

The vector ) , , (
) 1 ( ) 1 ( ) 0 (
=
K M
i i i i
s s s s
combibing all register contents at time step i is called state of
the encoder at time step i.
The code bit block
i
x
is clearly a function of
i
s
and
i
u
, only
Name - 9 -
Example:
The encoder of the rate convolutional code has
2 2
1
= = S
different states. The state is given by
i
s s =
The code bit block
i
x
at time step i is computed from
i
s
and
i
u
by
i i
u x =
) 1 (
and
i i i
s u x + =
) 2 (
0 =
i
u
1 =
i
u
A A A A
B B B
11 11 11
00 00 00
01
01
10 10
Name - 10 -
Example: Constructing a trellis section
i
u
i
x
i i
u x =
) 1 (
and
i i i
s u x + =
) 2 (
Two equations are required:
(1) How does
i
s
depend on
m i
u

and possibly
0 , )

m s
m i
1
=
i i
u s
(2) How does
i
x
depend on
i
s and
i
u
i i
u x =
) 1 (
and
i i i
s u x + =
) 2 (
The branches are labeled with
i i
x u | called state transition
i
s
to a new state
1 + i
s
Name - 11 -
Trellis section:
0 0
1 1
0|00
0|01
1|11
1|10
0 0 0 0 0
1
1 1 1 1
0|00
0|00 0|00
1|10
1|10
1|10
0|01 0|01
0|01
1|11 1|11 1|11
0
s
1
s
2
s
2 L
s
1 L
s
Name - 12 -
0 0 0 0 0
1 1 1 1
0|00 0|00 0|00
1|10 1|10
0|01 0|01
1|11 1|11 1|11
0
s
1
s
2
s
2 L
s
1 L
s
Name - 13 -
State diagram
Example: Trellis of the rate convolutional code
i i
u x =
) 1 (
and
i i i
s u x + =
) 2 (
0 0
1 1
00
01
11
10
0 =
i
u
1 =
i
u
i
s
1 + i
s
State diagram:
0
1
00
01
11
10
0 =
i
u
1 =
i
u
Name - 14 -
Description with submatrices
Definition: A convolutional code is a set C of code bit sequences
), , , , , (
1 0

i
x x x x =
), , , (
) ( ) 2 ( ) 1 ( N
i i i i
x x x x = ) 2 (
) (
GF x
j
i
e
partitioned into lenth N blocks
There exist many encoders mapping information bit sequences
) , , (
1 0
u u u =
), , , (
) ( ) 2 ( ) 1 ( K
i i i i
u u u u = ) 2 (
) (
GF u
j
i
e
(partitioned into length K<N blocks) to code bit sequences x
for the same code
Name - 15 -
Example: the following two encoding curcuits generate the
same set of code word sequences
) 1 (
i
u
) 2 (
i
u
) 1 (
i
x
) 2 (
i
x
) 3 (
i
x
) 1 (
i
x
) 2 (
i
x
) 3 (
i
x
) 1 (
i
u
) 2 (
i
u
Name - 16 -
Generator matrix
, G u x =
where
|
|
|
|
|
.
|

\
|
=

M
M
M
G G G G
G G G G
G G G G
G
2 1 0
2 1 0
2 1 0
i G u x
M
m
m m i i
=

=

,
0
The generated convolutional code has rate R=K/N, memory
K*M, and constraint length K*(M+1)
Name - 17 -
Example:
The rate code is given by
i i
u x =
) 1 (
i i i
s u x + =
) 2 (
and
0
G
governs how
i
u
affects
( ) 1 1 : ) (
0
) 2 ( ) 1 (
= = G x x x
i i i
1
G governs how
1 i
u
affects
( ) 1 0 :
1
= G x
i
, ) , , ( )) ( ), ( ), ((
2 1 0
) 2 (
2
) 1 (
2
) 2 (
1
) 1 (
1
) 2 (
0
) 1 (
0
G u u u x x x x x x =
where
|
|
|
.
|

\
|
=
11
01 11
01 11
G
Name - 18 -
Description with polynomials
|
|
|
|
|
.
|

\
|
=
) ( ) ( ) (
) ( ) ( ) (
) ( ) ( ) (
) (
) ( ) 2 ( ) 1 (
) (
2
) 2 (
2
) 1 (
2
) (
1
) 2 (
1
) 1 (
1
D g D g D g
D g D g D g
D g D g D g
D G
N
K K K
N
N

) 2 ( , ) (
) (
,
) (
,
2 ) (
2 ,
1 ) (
1 ,
) (
0 ,
) (
GF g D g D g D g g D g
j
m i
M j
M i
j
i
j
i
j
i
j
i
e + + + + =
)) ( ), ( ), ( ( ) (
) ( ) 2 ( ) 1 (
D u D u D u D u
K
=
where
, , , 2 , 1 , ) (
) ( ) (
1
) (
0
) (
K j D u D u u D u
i j
i
j j j
= + + + + =
)) ( , ), ( ), ( ( ) (
) ( ) 2 ( ) 1 (
D x D x D x D x
N
=
where
N j D x D x x D x
i j
i
j j j
, , 2 , 1 , ) (
) ( ) (
1
) (
0
) (
= + + + + =
) ( ) ( ) ( D G D u D x =
, , , 0 , , , 1 , , , 1 ), , (
) (
,
M m N j K i j i G g
m
j
m i
= = = =
N j K i D g M
j
i
j i
, , 1 , , , 1 )), ( deg( max
) (
,
= = =
Name - 19 -
Example:
The rate code is given by
i i
u x =
) 1 (
i i i
s u x + =
) 2 (
and
) (
) 1 (
1
D g
and
) (
) 2 (
1
D g )) ( ) ( ( ) (
) 2 (
1
) 1 (
1
D g D g D G =
From M=1 follows that
1 ))) ( deg((
) (
s D g
j
i
The polynomial
) (
) 1 (
1
D g
governs how
, 1 , 0 , =

m u
m l
affects
1 0 1 ) ( :
) 1 (
1
) 1 (
= + = D D g x
l
The polynomial
) (
) 2 (
1
D g
governs how , 1 , 0 , =

m u
m l
affects
1 1 1 ) ( :
) 2 (
1
) 2 (
+ = + = D D D g x
l
D D u u + = = 1 ) ( ) , 0 , 1 , 1 (
, G u x = yielding ) , 00 , 01 , 10 , 11 ( = x
) ( ) ( ) ( D G D u D x = yielding
( )
2
1 1 ) ( D D D x + + =
Name - 20 -
Punctured convolutional codes
A sequence of code bits is punctured by deleting some of the
bits in the sequence according to a fixed rule
In general, the the puncturing of a rate K/N convolutional
code is defined using N puncturing tables, one for any code
bit , , , 1 ,
) (
N j x
j
i
= in a block
i
x
Each table contains p bits, where p is the puncturing period. If
a bit is 1, the corresponding code bit is part of the punctured
code, if the bit is 0, the corresponding code bit is not part of the
punctured code
For a sequence of code bit blocks , , 1 , 0 , = i x
i
the puncturing
tables are applied periodically. N puncturing tables are combined
in a
p N
puncturing matrix
P
Name - 21 -
Example:
The encoder circuit of rate convolutional code given by
( )
2 2
1 1 ) ( D D D D G + + + =
) 0 , 0 , 1 , 0 , 0 ( = u ) 11 , 01 , 11 , 00 , 00 ( =
NP
x
The sequence
NP
x
is punctured using two different puncturing
matrices:
,
1 0 0 1
0 1 1 1
1
|
|
.
|

\
|
= P
|
|
.
|

\
|
=
1 0 1 1
0 1 1 1
2
P
The puncturing period p is 4. Using
1
P , 3 out of 4 code bits
) 1 (
i
x
and 2 out of 4 code bits
) 2 (
i
x of the mother code bits are used, the
5 / 4 ) 2 3 /( ) 4 4 ( 2 / 1 = + + = R
and
u
is encoded to
) 11 , 1 , 1 , 0 , 00 ( ) 11 , 1 , 1 , 0 , 00 ( = = X X X x
Name - 22 -
Using
,
2
P
the rate of the punctured code is
3 / 2 ) 3 3 /( ) 4 4 ( 2 / 1 = + + = R
and
u
is encoded to
) 11 , 1 , 1 , 00 , 00 ( ) 11 , 1 , 1 , 00 , 00 ( = = X X x
) 1 (
i
x
) 2 (
i
x
1 1 1 0
1 0 0 1
1 1 1 0
1 1 0 1
1
P
2
P
Puncturing tables
Pucturing period p=4
1 2 3 4
1 0
|
1
|
1
|
0
|
0 0
) 2 (
4
) 1 (
4
) 2 (
3
) 1 (
2
) 1 (
1
) 2 (
0
) 1 (
0
x x x x x x x
0 0 1 0 0
4 3 2 1 0
u u u u u
Encoder of a rate code punctured to a rate 4/5 (top puncturing
tables) or a rate 2/3 code (bottom puncturing tables)
Name - 23 -
The rate R of a punctured code obtained from a rate
N K R /
0
=
mother code using the
p N
puncturing matrix
P
is given as
P in of
p K
P in of
p N
R R
1 # 1 #
0

=
With puncturing we can easily construct convolutional codes
with arbitrary rational rate. However, punctured codes of rate
R=K/N obtained from an optimized good mother code of
memory m usually perform worse than unpunctured rate K/N,
memory m optimized codes given by a
N K
generator matrix
) (D G
This performance gap increases with the number of punctured
bits. The advantage of puncturing is that the decoding
complexity is not altered, since the original trellis of the mother
code can be used
Name - 24 -
Consider a rate 1/3, memory 4 mother code given by the submatrices
) 101 ( ), 011 ( ), 010 ( ), 111 (
3 2 1 0
= = = = G G G G
and
), 111 (
4
= G
code# rate punc. table
f
d
f
d
c
9
1/3
8/24
8
7
6
5
4/11
8/12
4/10
8/20
4/9
8/18
1/2
8/16
11
9
8
7
7
8
10
2
2
32
1111 1111
1111 1111
1111 1111
1111 1111
1111 1111
1110 1110
1111 1111
1111 1111
1100 1100
1111 1111
1111 1111
1000 1000
1111 1111
1111 1111
0000 0000
code#
rate
punc. table
f
d
f
d
c
4
4/7
8/14
3
2
1
2/3
8/12
4/5
8/10
8/9
8/9
5
4
3
2
8
4
42
2
1111 1111
1110 1110
0000 0000
1111 1111
1010 1010
0000 0000
1111 1111
1000 1000
0000 0000
1111 0111
1000 1000
0000 0000
Name - 25 -
Decoding of convolutional codes
The Viterbi algorithm
j
u
j
x
1
j
x
2
j
s
1 j
s
2
) 1 , 1 , 1 , 1 , 1 , 1 , 1 ( + + + + + + + = u
) 1 , 1 ( ) , (
20 10
+ + = s s
) 1 1 , 1 1 , 1 1 , 1 1 , 1 1 , 1 1 , 1 1 ( + + + + + + + + + + + + + + = x
Name - 26 -
+1+1 +1+1
-1-1
-1+1
+1-1 +1-1
-1+1
-1-1
j j
s s
2 1
,
j j
x x
2 1
,
1 2 1 1
,
+ + j j
s s
+1/+1+1
-1/-1-1
+1/+1+1
-1/-1+1
-1/-1+1
+1/+1-1
+1/+1-1
-1/-1-1
Name - 27 -
Hard decisions
= y
j
m
j j
m
j
m
j
y x y x
2
) (
2 1
) (
1
) (
+ = A
+1+1 +1+1 +1+1 +1+1 +1+1 +1+1 -1+1
+1+1
0
-2
+2
0
0
-2
+2
0
-2
0
0
0
+2
-2
+2
j=0
j=6 j=5 j=4 j=3
j=2 j=1
j=7
+2
-4
+8
+6 +4
+12
+10 +8 +6
+2 0 +2
+4 +2
-2
0
+6
+6
+4 +2
0 +2
+4 +2 +4 +2
(+1+1,-1+1,+1+1,+1+1,+1+1,+1+1,+1+1)
Name - 28 -
+1+1 +1+1 +1+1 +1+1 +1+1 +1+1 -1+1
+1+1
0
-2
+2
0
0
-2
+2
0
-2
0
0
0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-1-1
+1+1
0
+2
-2
+2
0
0
+2
-2
-2
+2
-2
0
+2
-2
+2
0
0
+2
-2
0
0
0
0
0
-2 -2
+2 0 +2
j=0
j=6 j=5 j=4 j=3
j=2 j=1
j=7
+2
-2
+8
+6
+12
+10 +8 +2
+2 0 +4
0 0
-2
-2
+6
+10
+8
+4 +6
+8 +8 +2
=
j
u

+1 -1 -1 +1 +1 +1 +1
- 2 decoding errors
Name - 33 -
Soft decisions

=
=
= +
= +
=
, , 2
, , 2 / 1
, , 2 / 1
, 2
) (
) (
) (
,
) (
ij
m
ij
ij
m
ij
ij
m
ij
ij
m
ij
ij
y x
y x
y x
y x
l
GOOD channel
GOOD channel
j j j j j j
m
j
y l x y l x
2 2 2 1 1 1
) (
+ =
CSI values ((G,B),(B,B),(G,G),(G,B),(B,B),(G,G),(G,G))
= y
(+1+1,-1-1,-1+1,+1+1,+1+1,+1+1,+1+1)
Name - 34 -
+1+1 +1+1 +1+1 +1+1 +1+1 -1+1 -1-1
+1+1
0
+1
-2.5
+2.5
-4
+4
-1
+1
-2.5
+2.5
0
-4
0
0
0
0
0
-4
+4
-4
+4
-1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
-4 -4 -1
-2.5
+1
+2.5
+4 +4 +4
j=0
j=6 j=5 j=4 j=3
j=2 j=1
j=7
+2.5
-2.5
+10
+7 +9
+18
+14 +11
+10
+5
-0.5 +1.5
+7.5 +3.5
-2.5
-2.5
+7
+13
+9 +5
-0.5
+1.5
+9 +5 +4 +1.5
G B G G G G B B G G G B B B
+2 +0.5 +2 +2 +2 +2 +0.5 +0.5 +2 +0.5 -2 +2 -0.5-0.5
Name - 35 -
+1+1 +1+1 +1+1 +1+1 +1+1 -1+1 -1-1
+1+1
0
+1
-2.5
+2.5
-4
+4
-1
+1
-2.5
+2.5
0
-4
0
0
0
0
0
+4 +4
0
0
0
0
-2.5
+2.5
+4
j=0
j=6 j=5 j=4 j=3
j=2 j=1
j=7
+2.5
-2.5
+10
+18
+14 +11
+10
-0.5 +1.5
+7.5 +3.5
-2.5
-2.5
+7
+13
+1.5
+1.5
G B G G G G B B G G G B B B
+2 +0.5 +2 +2 +2 +2 +0.5 +0.5 +2 +0.5 -2 +2 -0.5-0.5
=
j
u

+1 +1 +1 +1 +1 +1 +1
- No error