Convolutional Code (II)
Convolutional Code (II)
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.
In the important special case when k=1, the information sequence is not divided into blocks and can be processed continuously. Convolutional codes were first introduced by Elias in 1955 as an alternative to block codes.
3
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
the encoder consists of an m= 3-stage shift register together with n=2 modulo-2 adders and a multiplexer for serializing the encoder outputs.
The mod-2 adders can be implemented as EXCLUSIVE-OR gates.
Since mod-2 addition is a linear operation, the encoder is a linear feedforward shift register. All convolutional encoders can be implemented using a linear feedforward shift register of this type.
17
18
20
v = (1 1, 0 1, 0 0, 0 1, 0 1, 0 1, 0 0, 1 1).
21
( ( g m1) g m2 )
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,
23
11 11 11 1 1),
24
25
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
28
29
An example of a (4, 3, 2) convolutional encoder in which the shift register length are 0, 1, and 2.
30
31
33
v (1) ( D) = u( D)g (1) ( D) v ( 2 ) ( D) = u( D)g ( 2 ) ( D), where u(D) = u0 + u1D + u2D2 + is the information sequence.
36
( ( g (1) ( D ) = g 01) + g1(1) D + + g m1) D m ( ( g ( 2 ) ( D ) = g 02 ) + g1( 2 ) D + + g m2 ) D m and all operations are modulo-2. After multiplexing, the code word become v ( D) = v (1) ( D 2 ) + Dv ( 2 ) ( D 2 ) the indeterminate D can be interpreted as a delay operator, and the power of D denoting the number of time units a bit is delayed with respect to the initial bit.
37
m = max deg g ( j ) (D )
1 j n
39
K i = max deg g i( j ) (D ) ,
1 j n
1 i k,
where g i( j ) (D ) is the generator polynomial relating the ith input to the jth output, and the encoder memory order m is
m = max K i = max deg g i( j ) .
1 i k 1 j n 1 i k
40
G (D)
( 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 (1) (2) input sequences and V ( D ) v ( D ), v ( D ), , v ( n ) ( D ) is the n-tuple of output sequences. After multiplexing, the code word becomes
v(D ) = v (1) D n + Dv (2 ) D n +
( )
( )
+ D n 1 v (n ) D n .
( )
42
] [ [
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 ) gi
(1)
( D ) + Dg ( D ) +
n
( 2)
i
D gi
n 1
( n 1)
(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 )
(u ( ) u ( )
1 1 l 1 l 2
u l(1)K1
2) 2) u l(1u l( 2
2) u l( K 2
k k) u l(1)u l( 2
k) u l( K k
46
i = b0 20 + b1 21 +
47
+ bK 1 2 K 1
48
50
10.2 Structural Properties of Convolutional Codes Modified encoder state diagram of a (2, 1, 3) code.
The path representing the sate sequence S0S1S3S7S6S5S2S4S0 has path gain X2X1X1X1X2X1X2X2=X12.
52
10.2 Structural Properties of Convolutional Codes Modified encoder state diagram of a (3, 2, 1) code.
The path representing the sate sequence S0S1S3S2S0 has path gain X2X1X0X1 =X12.
53
54
where Ci is the sum of the loop gains, ' Ci ' C j 'is the product of i i' , j the loop gains of two nontouching loops summed over all pairs of nontouching loops, '' Ci '' C j '' Cl '' is the product of the loop gains of i , j '' , l '' three nontouching loops summed over all nontouching loops.
55
T (X ) =
F
i i
where the sum in the numerator is over all forward paths and Fi is the gain of the ith forward path.
56
(C 8
(C (C (C (C (C (C (C (C (C
= X8 = X3 = X7 = X2 = X9 = X8 = X3 = X) = X5
2 3 4
5 6
) ) ) ) ) ) ) ) )
9 10
(C11 = X )
= X4
(C C (C C (C C (C C (C C (C C (C C (C C (C C (C C
2 3 4 4 6 7 2 7 7 8
11 8
11
11 9
10
11
11
) =X ) =X ) =X ) =X ) =X ) =X ) =X ) =X ) =X )
= X4
3 8 3 9 8 7 4 4 4
11
= X4
11
= X8
)
)
( + (X (X
+ X8 + X3 + X3 + X4 + X8 + X7 + X4 + X2 + X5 + X 8 = 1 2X + X 3
59
Foward path 1 : S 0 S1 S 3 S 7 S 6 S 5 S 2 S 4 S 0 F1 = X 12 Foward path 2 : S 0 S1 S 3 S 7 S 6 S 4 S 0 Foward path 3 : S 0 S1 S 3 S 6 S 5 S 2 S 4 S 0 Foward path 4 : S 0 S1 S 3 S 6 S 4 S 0 Foward path 5 : S 0 S1 S 2 S 5 S 3 S 7 S 6 S 4 S 0 Foward path 6 : S 0 S1 S 2 S 5 S 3 S 6 S 4 S 0 Foward path 7 : S 0 S1 S 2 S 4 S 0
60
7 2
( ) (F = X ) (F = X ) (F = X ) (F = X ) (F = X ) (F = X ).
11 6 3 4 8 5 7 6 7 7
61
62
63
T(X) provides a complete description of the weight distribution of all nonzero code words that diverge from and remerge with state S0 exactly once. In this case, there is one such code word of weight 6, three of weight 7, five of weight 8, and so on.
64
( + (X
) ( )
= 1 2 X 2 X 2 X 3 + X 4 + X 5.
65
+ X 4 1 + X 3 1 X X 2 + X 6 1 X 2 + X 6 1 + X 5 (1 X ) + X 8 1 + X 4 1 X X 2 X 3 + X 4 + X 7 1 X 3 + X 6 1 + X 3 (1 X ) + X 6 1 = 2 X 3 + X 4 + X 5 + X 6 X 7 X 8.
( (
This code contains two nonzero code word of weight 3, five of weight 4, fifteen of weight 5, and so on.
66
T ( X , Y , Z ) = Ai , j ,l X Y Z .
i j l i , j ,l
The coefficient Ai,j,l denotes the number of code words with weight i, whose associated information sequence has weight j, and whose length is l branches.
67
10.2 Structural Properties of Convolutional Codes The augment state diagram for the (2, 1, 3) codes.
68
= 1 ( X 8Y 4 Z 7 + X 3Y 3 Z 5 + X 7Y 3 Z 6 + X 2Y 2 Z 4 + X 4Y 4 Z 7
= 1 + XY Z + Z 2 X 2Y 2 Z 4 Z 3 X 3 YZ 3 Y 3 Z 6
3
( (Z
Z4
) ( ) X (Y Z
8 3
Y 4 Z 7 X 9Y 4 Z 7
69
) )+
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 T ( D) = = D 6 + 2 D8 + 4 D10 + 8 D12 + = ad D d 1 2D2 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= where I is the k k identity matrix, 0 is the k k all-zero matrix, and Pl is the k (n k) matrix
( ( g1,kl+1) g1,kl+ 2 ) g (k +1) g (k + 2 ) 2,l Pl = 2,l g (kk,l+1) g (kk,l+ 2 ) ( g1,nl) g (2n,l) , g (kn,l)
79
G(D) = [1 1 + D + D3].
(1)
(D ) = u(D )g (D ) = (1 + D 2 + D 3 )1 = 1 + D 2 + D 3
(1)
)(
The (2, 1, 3) systematic code requires only one modulo-2 adder with three inputs.
83
84
The (3, 2, 2) systematic encoder, and it requires only two stages of encoder memory rather than 4.
85
86
87
n , k = D l
89
91
()
92
10.2 Structural Properties of Convolutional Codes In choosing nonsystematic codes for use in a communication system, it is important to avoid the selection of catastrophic codes. Only a fraction 1/(2n 1) of (n, 1, m) nonsystematic codes are catastrophic. A similar result for (n, k, m) codes with k > 1 is still lacking.
94
where v and v are the code words corresponding to the information sequences u and u, respectively. In equation above, it is assumed that if u and u are of different lengths, zeros are added to the shorter sequence so that their corresponding code words have equal lengths.
95
96
2)
( v0 ) , v1( ) v1(
n 1
2)
2)
vi(
n)
2)
ui(
k)
97
di
{(
where v is the code word corresponding to the information sequence u. di is the minimum-weight code word over the first (i + 1) time units whose initial information block is nonzero. In terms of the generator matrix of the code,
[ v ]i = [u ]i [G ]i
98
or
G 0 G1 G0 [G ]i =
G m 1 G m G m 2 G m 1 G m G m 1 G1 G 0 G1 G 0 G1 G0
Gm G m 1 G1 G0
99
is seen to depend only on the first n(i + 1) columns of G and this accounts for the name column distance function. The definition implies that di cannot decrease with increasing i (i.e., it is a monotonically nondecreasing function of i). The complete CDF of the (2, 1, 16) code with
101
102
104
d free
2l 1 min l ( K + l 1) n l 1 2 1
106
107
108
109
110
111
112
113
Rate k/5
114
Rate k/7
115