Unit 4 Shashi
Unit 4 Shashi
• To describe a convolutional code, one need to characterize the encoding function G(m),
so that given an input sequence m, one can readily compute the output sequence U.
Several methods are used for representing a convolutional encoder. The most popular
being the Connection pictorial, Connection Vectors or polynomials, the state diagram, the
tree diagram, and the trellis diagram.
The state diagram
• The simple encoder is shown in Figure 4 and its
state diagram is shown in Figure 5.
• The states, shown in the boxes of the diagram,
possible content of the rightmost K-1 stages of the
register. The paths between the states represents
the output branch words resulting from such state
transitions.
• The states of the register are designated a=00,
b=10, c=01, and d=11.
Figure 4. Convolutional encoder Figure 5. Encoder state diagram with rate ½, K=3
with rate ½, K=3
The state diagram
• The state diagram shown in Figure 5 illustrates all the
state transitions that are possible for the encoder in
Figure 4.
• There are only two transitions emanating from each state
corresponding to the two possible input bits.
• Each path between state is written the output branch
word associated with the state transition.
• In drawing the path we use the convention that a solid
line denotes a path associated with an input bit, zero, and
a dashed line denotes a path associated with an input bit,
one.
• Notice that it is not possible to move any other state in a
single transition. Shifting in one bit at a time, there are
only two possible state transitions that the register can
make at each bit time. For example, present encoder
state is 00, the only possibilities for the state at the next
shift are 00 or 10. Figure 5. Encoder state diagram with rate ½, K=3
The state diagram
Example 1. Convolution Encoding
For the encoder shown in Figure 4, show the
state changes and the resulting output
codeword sequence U for the message
sequence m = 11011, followed by K-1=2
zeros to flush the register. Assume that initial
contents of the register are all zeros.
Solution:
By comparison with the result of Example 1, we can see that each branch word of the output
sequence U is not only a function of the input bit, but is also a function of the K-1 prior bits.
The tree diagram
• Although the state diagram completely characterizes the
encoder, one can not easily use it for tracing the encoder
transitions as a function of time since the diagram can
not represent time history.
• The tree diagram adds the dimension of time to the state
diagram. The tree diagram, for the convolutional encoder
shown in Figure 4, is illustrated in Figure 6.
• At each successive input bit time, the encoding
procedure can be described by traversing the diagram
from left to right, each tree branch describing an output
branch word.
• The branching rule for finding a codeword sequence is as
follows: if the input bit is a zero, its associated branch Figure 6. Tree
word is found by moving to the next rightmost branch in representation of
the upward direction. If the input bit is a one, its branch encoder (rate ½, K=3)
word is found by moving to the next rightmost branch in
the downward direction.
The tree diagram
• Assuming that the initial contents of the encoder is all zeros,
the diagram shows that if the first input bit is a zero, the output
branch word is 00 and, if the first input bit is a one, the output
branch word is 11.
• Similarly, if the first input bit is a one, and the second input bit
is a zero, the second output branch word is 10. or if the first
input bit is a one, and the second input bit is a one, the second
output branch word is 01.
• Following this procedure, we see that the input sequence 1 1 0
1 1 traces the heavy line drawn on the tree diagram in the
Figure 6. This path corresponds to the output codeword
sequence 1 1 0 1 0 1 0 0 0 1.
• The added dimension of time in the tree diagram (compared to
the state diagram) allow one to dynamically describe the
encoder as a function of a particular input sequence.
• It is very difficult to design this type of code on paper due to Figure 6. Tree
less space and also we would lose patience. If the L is number representation of
of branch word in the sequence, then the number of branches encoder (rate ½, K=3)
increases as a function of 2 L .
The trellis diagram
• We label each node in the tree of figure 6 to correspond
to four possible states in the shift register as follows:
a=00, b=10, c=01, and d=11.
• The first branching of the tree structure, at time t1 ,
produces a pair of nodes labeled a and b. At each
successive branching the number of nodes double. The
second branching, at time t2 , results in four nodes
labeled, a, b, c, and d. After the third branching, there
are a total of eight nodes.
• We can see that all branches emanating from two nodes
of the same state generate identical branch word
sequences. From this point on, the upper and lower
halves of the tree are identical. The reason for this
Figure 6. Tree
should be obvious from examination of the encoder in representation of
Figure 4. encoder (rate ½, K=3)
The trellis diagram
• As the fourth input bit enters the encoder on the left, the
first input bit is ejected on the right and no longer
influences the output branch word.
• Consequently, the input sequences 10 0 x y . . . and 0 0 0
x y . . . , where leftmost bit is the earliest bit, generate
the same branch words after the (K=3)rd branching. This
means that any two nodes having the same state label at
the same time ti can be merged, since all succeeding
paths will be indistinguishable.
• If we do this to the tree structure of Figure 6, we obtain
another diagram called the trellis diagram.
• The trellis diagram, by exploiting the repetitive
structure, provides a more manageable encoder Figure 6. Tree
description than does the tree diagram. The trellis representation of
diagram for the convolution encoder of Figure 6 is encoder (rate ½, K=3)
shown in Figure 7.
The trellis diagram
• In drawing the trellis diagram, we use the same convention that we introduced with the
state diagram-a solid line denotes the output generated by an input bit zero, and a dashed
line denotes the output generated by an input bit one.
• The nodes of the trellis characterize the encoder states; the first row nodes correspond to
the state a= 00, the second and subsequent rows correspond to the states, b=10, c=01, and
d=11.
• At each unit of time, the trellis requires 2 K 1 nodes to represent the 2 K 1 possible encoder
states.
• The trellis in our example assumes a fixed
periodic structure after trellis depth 3 is
reached (at time t4 ).
• In general case, the fixed structure prevails
after depth K is reached.
• At this point and there after, each of the states
can be entered from either of two preceding
states.
Figure 7. Encoder trellis
diagram (rate ½ , K=3)
The trellis diagram
• Also, each of the states can transition to one of the two states.
• Of the two outgoing branches, one correspond to input bit zero, and the other correspond
to an input bit one.
• The output branch words corresponding to the state transitions appear as labels on the
trellis branches.
• One time-interval section of a fully-formed encoding trellis structure completely defines
the code.
• The only reason for showing several sections
is for viewing a code symbol sequence as a
function of time.
• The state of convolutional encoder is
represented by the contents of the rightmost
K-1 stages in the encoder register.
Figure 10. Trellis diagram labeled with distances from the all zeros path.
Distance properties of convolutional codes
• We can find the number of error, which can be corrected by the code, is expressed as
d f 1
t 1
2
where x is the largest integer but not greater than x, and d f is the minimum free
distance or free distance. Setting d f 5 , we see that code can correct any two channel
errors.
• Although, the Figure 10 presents the computation of free distance in a straight forward
way, a more direct closed form expression can be obtained by starting with state diagram.
• First we label the branches of state diagram as either D 0 1 , D1 or D 2 shown in Figure
11,where the exponent of D denotes the Hamming distance from the branch word of that
branch to the all-zeros branch. The self loop at node a can be eliminated since it
contributes nothing to the distance properties of a codeword sequence relative to the all-
zero sequence. Furthermore node a can be split into two nodes (labeled a and e), one of
which represent the input and the other the output of the state diagram.
• All paths originating at a=00 and terminating at e=00 can be traced on the modified state
diagram of Figure 11.
Distance properties of convolutional codes
• We can calculate the transfer function of the path a b c e in terms of indeterminate
“placeholder” D, as D 2 D D 2 D5 . The exponent of D represent the Hamming distance.
• Similarly, the path a b d c e and a b c b c e each have the transfer function D 6 and thus a
Hamming distance of 6 from the all-zeros path. We now write the state equations as
X b D2 X a X c
X c DX b DX d
2
X d DX b DX d
X e D2 X c
where X a ,..., X e are the dummy
variables for the partial paths to the
intermediate nodes.
• The transfer function, T(D),
sometimes called the generating
function of the code can be expressed Figure 11. State diagram, labeled according to the distance from
T D Xe X a
the all-zeros path
as 3a
Distance properties of convolutional codes
• By solving state equations shown in Equation 2, we obtain
D5
T D D5 2 D 6 4 D 7 ... 2l D l 5 ... 3b
1 2D
• The transfer function for this code indicates that there is a single path of distance 5 from
the all-zeros path, two of distance 6, four of distance 7, and in general 2l paths of distance
l+5 from the all-zeros path, where l=0, 1, 2, ….
• The free distance d f of the code is the Hamming weight of the lowest-order term in the
expansion of T(D). In this example d f 5 . In evaluating distance properties, the transfer
function T(D), can not be used for long constraint lengths since the complexity of T(D)
increases exponentially with constraint length.
Distance properties of convolutional codes
• The transfer function can be used to provide more detailed information than just the
distance of the various paths.
• Let us introduce a factor L into each branch of the state diagram so that the exponent of L
can serve as a counter to indicate the number of branches in any given path from state a =
00 to state e=00. Furthermore we introduce a factor N into all branch transitions caused
by the input bit one. Thus, as each branch is traversed, the cumulative exponent on N
increases by one, only if that branch transition is due to an input bit one.
• For convolutional code characterized in Figure 4, the state diagram is modified. The
additional factor L and N are shown on the modified state diagram of Figure 12. The
Equation 2 can be modified as follows:
X b D 2 LNX a LNX c
X c DLX b DLX d
4
X d DLNX b DLNX d
X e D 2 LX c Figure 12. State diagram, labeled
according to distance, length, and
number of input ones.
Distance properties of convolutional codes
• The transfer function of this augmented state diagram is
D5 L3 N
T D , L, N D 5 L3 N D 6 L4 1 L N 2 D 7 L5 1 L N 3 ... D l 5 Ll 3 N l 1 ...
2
1 DL 1 L N 5
• Thus, we can verify some of the path properties displayed in Figure 11. There is one path
of distance 5, length 3, which differs in one input bit from the all-zeros path. There are
two path of distance 6, one of which is length 4, the other length 5 and both differ in two
input bits from the all-zeros path. Also of the distance 7 paths, one is of length 5, two are
of length 6, and one is of length 7, all four paths correspond to input sequences that differ
in three input bits from the all-zeros path.
Thus if the all-zeros path is the correct path the noise
causes us to choose one of the incorrect paths of
distance 7, three bit error will be made.