Professional Documents
Culture Documents
Convolutional Codes
Dr. Chih-Peng Li ()
Table of Contents
10.1 Encoding of Convolutional Codes
10.2 Structural Properties of Convolutional Codes
10.3 Distance Properties of Convolutional Codes
Convolutional Codes
Convolutional codes differ from block codes in that the encoder
contains memory and the n encoder outputs at any time unit
depend not only on the k inputs but also on m previous input
blocks.
An (n, k, m) convolutional code can be implemented with a kinput, n-output linear sequential circuit with input memory m.
Typically, n and k are small integers with k<n, but the memory order m
must be made large to achieve low error probabilities.
Convolutional Codes
Shortly thereafter, Wozencraft proposed sequential decoding as an
efficient decoding scheme for convolutional codes, and
experimental studies soon began to appear.
In 1963, Massey proposed a less efficient but simpler-toimplement decoding method called threshold decoding.
Then in 1967, Viterbi proposed a maximum likelihood decoding
scheme that was relatively easy to implement for cods with small
memory orders.
This scheme, called Viterbi decoding, together with improved
versions of sequential decoding, led to the application of
convolutional codes to deep-space and satellite communication in
early 1970s.
4
Convolutional Code
A convolutional code is generated by passing the information
sequence to be transmitted through a linear finite-state shift
register.
In general, the shift register consists of K (k-bit) stages and n
linear algebraic function generators.
Convoltuional Code
Convolutional codes
k = number of bits shifted into the encoder at one time
k=1 is usually used!!
n = number of encoder output bits corresponding to the k
information bits
Rc = k/n = code rate
K = constraint length, encoder memory.
Each encoded bit is a function of the present input bits and their
past ones.
Note that the definition of constraint length here is the same as
that of Shu Lins, while the shift registers representation is
different.
6
13
14
15
16
l( j ) = ul i gi( j ) = ul g 0( j ) + ul 1 g1( j ) +
i =0
+ ul m g m( j ) , j = 1, 2,.
v (1) = (1 0 1 1 1) (1 0 1 1) = (1 0 0 0 0 0 0 1)
v (2) = (1 0 1 1 1) (1 1 1 1) = (1 1 0 1 1 1 0 1)
and the code word is
v = (1 1, 0 1, 0 0, 0 1, 0 1, 0 1, 0 0, 1 1).
21
G=
g1(1) g1( 2 )
g 0(1) g 0( 2 )
g 2(1) g 2( 2 )
g1(1) g1( 2 )
g 0(1) g 0( 2 )
g m(1) g m( 2 )
g m(1) 1 g m( 2)1
g m(1) 2 g m( 2)2
g m(1) g m( 2 )
g m(1) 1 g m( 2)1
g m(1) g m( 2 )
where the blank areas are all zeros, the encoding equations can
be rewritten in matrix form as v = uG.
G is called the generator matrix of the code. Note that each
row of G is identical to the preceding row but shifted n = 2
places to right, and the G is a semi-infinite matrix,
corresponding to the fact that the information sequence u is of
arbitrary length.
22
Example 10.2
If u=(1 0 1 1 1), then
v = uG
11 0 1
11
= (1 0 1 1 1)
= (1 1, 0 1, 0 0, 0
11 11
01 11 11
11 01 11 11
11 0 1 11
11 0 1
1, 0 1, 0 1, 0 0,
11
11 11
1 1),
24
g1(1) = (1 1),
g (21) = (0 1),
g1(2) = (0 1),
g (2)
2 = (1 0),
25
g1(3) = (1 1),
g (3)
2 = (1 0),
l(1) = ul(1)
+ u l(1)1 + u l(21)
l( 2 ) =
u l( 2 ) + u l(1)1
l(3) = ul(1) + ul( 2 ) + ul(1)1 ,
After multiplexing, the code word is given by
v = ( 0(1) 0( 2 ) 0(3) ,1(1)1( 2 )1(3) , 2(1) 2( 2 ) 2( 3) , ).
26
v (1) = (1 0 1) (1 1) + (1 1 0) (0 1) = (1 0 0 1)
v ( 2 ) = (1 0 1) (0 1) + (1 1 0) (1 0) = (1 0 0 1)
v ( 3) = (1 0 1) (1 1) + (1 1 0) (1 0) = (0 0 1 1)
and
v = (1 1 0, 0 0 0 , 0 0 1, 1 1 1).
27
(1) ( 2 ) ( 3)
(1)
( 2 ) ( 3)
g 2, m g 2, m g 2, m
g 2, 0 g 2, 0 g 2, 0 g 2,1 g 2,1 g 2,1
G=
g1(,10) g1(,20) g1(,30)
g1(,1m) 1 g1(,2m) 1 g1(,3m) 1 g1(,1m) g1(,2m) g1(,3m)
(1) ( 2 ) ( 3)
(1)
( 2)
( 3)
(1)
( 2 ) ( 3)
g 2, 0 g 2, 0 g 2, 0
g 2, m 1 g 2, m 1 g 2, m 1 g 2, m g 2, m g 2, m
28
1 0 1 1 1 1
0 1 1 1 0 0
1 0 1 111
= (1 1, 0 1, 1 0)
0 11 1 0 0
1 0 1 1 1 1
0 1 1 1 0 0
= (1 1 0, 0 0 0, 0 0 1, 1 1 1),
it agree with our previous calculation using discrete convolution.
29
An example of a (4, 3, 2)
convolutional encoder in
which the shift register
length are 0, 1, and 2.
30
31
G 0 G 1 G 2
G
G
G
G
0
1
m 1
m
G=
G0
G m 2 G m 1 G m
Gl =
(1)
( 2)
(n)
g k ,l
g k ,l g k ,l
Note that each set of k rows of G is identical to the previous set
of rows but shifted n places to the right.
32
33
m = max deg g ( j ) (D )
1 j n
39
K i = max deg g i( j ) (D ) ,
1 j n
1 i k,
1 j n
1 i k
40
G (D)
g1(1) ( D ) g1( 2) ( D )
(1)
( 2)
g 2 ( D ) g 2 ( D )
=
g (1) ( D ) g ( 2) ( D )
k
k
41
( D )
(n)
g 2 ( D )
g1(
n)
n
g (k ) ( D )
V (D ) = U(D )G (D )
where U ( D ) u (1) ( D ), u (2) ( D ), , u ( k ) ( D ) is the k-tuple of
input sequences and V ( D ) v (1) ( D ), v (2) ( D ), , v ( n ) ( D ) is
( )
( )
v(D ) = v (1) D n + Dv (2 ) D n +
42
( )
+ D n 1 v (n ) D n .
1
1
D
For the input sequences u(1)(D) = 1+D2 and u(2)(D)=1+D, the
encoding equations are
1 + D D 1 + D
(1)
(2 )
(3 )
2
V (D ) = v (D ), v (D ), v (D ) = 1 + D ,1 + D
D
1
1
= 1 + D 3 ,1 + D 3 , D 2 + D 3
] [
[
v ( D ) = (1 + D 9 ) + (1 + D 9 ) D + ( D 6 + D 9 ) D 2
= 1 + D + D8 + D 9 + D10 + D11
43
( )
v (D ) = u (i ) D n g i (D )
i =1
where
gi ( D )
(1)
gi
( D ) + Dg ( D ) +
n
( 2)
n 1
( n 1)
D gi
(D ),
n
1 i k,
44
( )
( )
g (D ) = g (1) D 2 + Dg (2 ) D 2 = 1 + D + D 3 + D 4 + D 5 + D 6 + D 7
and for u(D)=1+D2+D3+D4 , the code word is
v ( D ) = u ( D2 ) g ( D )
= (1 + D 4 + D 6 + D8 ) (1 + D + D 3 + D 4 + D 5 + D 6 + D 7 )
= 1 + D + D 3 + D 7 + D 9 + D11 + D14 + D15
again agreeing with previous calculations.
45
(u ( ) u ( )
1
1
l 1 l 2
u l(1)K1
u l(21)u l(2 2)
u l(2 K) 2
u l(k1)u l(k 2)
46
u l(k K) k
i = b0 20 + b1 21 +
47
+ bK 1 2 K 1
48
50
54
i' , j'
T (X ) =
F
i
where the sum in the numerator is over all forward paths and Fi
is the gain of the ith forward path.
56
Loop 1 : S 1 S 3 S 7 S 6 S 5 S 2 S 4 S 1
Loop 2 : S 1 S 3 S 7 S 6 S 4 S 1
Loop 3 : S 1 S 3 S 6 S 5 S 2 S 4 S 1
Loop 4 : S 1 S 3 S 6 S 4 S 1
Loop 5 : S 1 S 2 S 5 S 3 S 7 S 6 S 4 S 1
Loop 6 : S 1 S 2 S 5 S 3 S 6 S 4 S 1
Loop 7 : S 1 S 2 S 4 S 1
Loop 8 : S 2 S 5 S 2
Loop 9 : S 3 S 7 S 6 S 5 S 3
Loop 10 : S 3 S 6 S 5 S 3
Loop 11 : S 7 S 7
57
(C
(C
(C
(C
(C
(C
(C
= X8
= X3
= X7
= X2
= X9
= X8
= X3
= X5
(C 8
(C
(C
10
= X)
)
)
)
)
)
)
)
)
)
= X4
(C11 = X )
(C C
(C C
(C C
(C C
(C C
(C C
(C C
(C C
(C C
(C C
2
11
8
)
=X )
=X )
=X )
=X )
=X )
=X )
=X )
=X )
=X )
= X4
11
11
9
10
11
11
(C C C
Loop triple 2 : (loop 7, loop 10, loop 11 ) (C C C
Loop triple 1 : (loop 4, loop 8, loop 11 )
10
11
= X4
11
= X8
(
+ (X
(X
= 1 X 8 + X 3 + X 7 + X 2 + X 4 + X 3 + X 3 + X + X 5 + X 4 + X
4
+ X8 + X3 + X3 + X4 + X8 + X7 + X4 + X2 + X5
+ X 8 = 1 2X + X 3
59
(
)
(F = X )
(F = X )
(F = X )
(F = X )
(F = X )
(F = X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y 2 Z 5 + X 7 YZ 4 + Y 3 Z 6 + Y 3 Z 7
+ X 8 Y 2 Z 6 + Y 4 Z 7 + Y 4 Z 8 + 2Y 4 Z 9
70
)
)+
71
72
73
X b = DX c + DX d
X d = D2 X c + D2 X d
X e = D2 X b
The transfer function for the code is defined as T(D)=Xe/Xa. By
solving the state equations, we obtain:
D6
d
6
8
10
12
T ( D) =
D
D
D
D
a
D
=
+
2
+
4
+
8
+
=
d
2
1 2D
d =6
2(d 6 ) 2 (even d )
ad =
0
(odd d )
74
75
X b = JDX c + JDX d
X d = JND 2 X c + JND 2 X d
X e = JD 2 X b
Upon solving these equations for the ratio Xe/Xa, we obtain the
transfer function:
J 3 ND 6
T ( D, N , J ) =
1 JND 2 (1 + J )
= J 3 ND 6 + J 4 N 2 D8 + J 5 N 2 D8 + J 5 N 3 D10
+ 2 J 6 N 3 D10 + J 7 N 3 D10 +
76
Reference:
John G. Proakis, Digital Communications, Fourth Edition, pp.
477 482, McGraw-Hill, 2001.
77
78
0 Pm
I P0 0 P1 0 P2
I P0 0 P1
0 Pm 1 0 Pm
I P0
0 Pm 2 0 Pm 1 0 Pm
G=
g (kk,l+1) g (kk,l+ 2 )
79
g1(,nl)
g (2n,l)
,
g (kn,l)
G (D ) =
0 0
1 g (kk +1) (D )
g (kn ) (D )
Since the first k output sequences equal the input sequences, they
are called information sequences and the last n k output
sequences are called parity sequences.
Note that whereas in general kn generator sequences must be
specified to define an (n, k, m) convolutional code, only k(n k)
sequences must be specified to define a systematic code.
Systematic codes represent a subclass of the set of all possible
codes.
80
1 1 0 1 0 0 0 1
G=
1 1 0
1
1
1
0 0 0 1
0 1 0 0 0
The (2, 1, 3)
systematic code.
81
G(D) = [1 1 + D + D3].
(1)
(D ) = u(D )g (D ) = (1 + D 2 + D 3 )1 = 1 + D 2 + D 3
(1)
)(
v (2 ) (D ) = u(D )g (2 ) (D ) = 1 + D 2 + D 3 1 + D + D 3
= 1+ D + D2 + D3 + D4 + D5 + D6
82
0
1
1
D
+
84
86
87
for some l 0.
88
, kn = D l
+
+
1
D
D
1
G ( D) =
2
D+D
provides the required inverse of delay 0 [i.e., G(D)G1(D) = 1].
The implementation of the inverse is shown below
89
1
D
90
91
()
92
94
min {d ( v, v ) : u u} ,
96
() (
v
=
v
[ ]i 0 v0
1
2)
2)
2)
vi(
n)
() ( )
( ) () ( )
( )
() (
u
=
u
u
u
,
u
u
u
,
,
u
[ ]i 0 0
0
1
1
1
i ui
denote the ith truncation of the code word u.
1
97
2)
ui(
k)
di
{(
= min w [ v ]i : [u ]0 0
[ v ]i = [u ]i [G ]i
98
or
G 0 G1
[G ]i = G 0
G 0 G1
G0
[G ]i =
Gi
G i 1 ,
G 0
G m 1 G m
G m 2 G m 1 G m
G m 1
G1
G 0 G1
G 0 G1
G0
99
i m,
Gm
G m 1
G1
G0
G m , i > m.
G m 1
G1
G 0
di = min w ([u ]i [G ]i ) : [u ]0 0
G ( D ) = 1 + D + D 2 + D 5 + D 6 + D8 + D13 + D16 ,
1 + D 3 + D 4 + D 7 + D 9 + D10 + D11 + D12 + D14 + D15 + D16
is shown in the figure of the following page.
100
101
102
104
d free
2l 1
K + l 1) n
min l
(
l 1
2 1
106
107
108
109
110
111
112
113
Rate k/5
114
Rate k/7
115