0% found this document useful (0 votes)
16 views25 pages

ELEC8630 Lect20 Coding

Elec8630

Uploaded by

denapaowna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views25 pages

ELEC8630 Lect20 Coding

Elec8630

Uploaded by

denapaowna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 25

Introduction to Channel

Coding
Channel Coding
• Communication through noisy channels is
subject to errors.
• In order to decrease the effect of error and
achieve reliable communication  some
redundancy has to be introduced 
transmission of extra bits & reduction in
trans. rate.
Channel Coding
Data Code
Encoding

k K<n n

• In block coding: code is called an (n, k) block code and


consists of 2k code words of length n.

• Mapping of the information source outputs into channel


inputs are done independently.

• The output of the encoder depends only on the current


input sequence of length k and not on the previous input
sequences.
Linear Block Codes

• A block code is linear if any linear


combination of two codewords is a
codeword.
• This means that the sum of any two
codewords is a codeword.
• The codewords form a k-dimensional
subspace of an n-dimensional space.
Channel Coding
• In convolutional encoding, source
outputs of length k0 are mapped into n0
channel inputs.
• The channel inputs depend not only on
the most recent k0 source outputs but also
on the last (L-1)k0 inputs of the encoder.
Convolutional codes
A concolutional 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. (K is called the Constraint
Length) Kk stages
k
1 2 … k 1 2 … k 1 2 … k
Information

bits

Convolutional
Encoder 1 2 3 n
Encoded Sequence
To Modulator
• In convolutional codes, each block of k bits is
mapped into a block of n bits to be transmitted
over the channel, but these n bits are not only
determined by the present k information bits,
but also by the previous information bits.
• This dependence on the previous information
bits causes the encoder to be a finite-state-
machine.
• Code rate is Rc = k/n.
•A way to describe the convolutional code is to
specify set of n vctors, one vector for each of the
modulo-2 adders.
•Each vector has kK dimensions and contains the
connections of the encoder to that modulo-2 adder.
•A 1 in the ith position of the vector indicates that
the corresponding stage is connected to the modulo-
2 adder, and a 0 in a given position indicates that no
connection exists between that stage and the
modulo-2 adder.

• A Convolutional code is specified by three


parameters (n, k , K ) or (k / n, K )
A Rate ½ Convolutional encoder
• Convolutional encoder (rate ½, k=1, K=3)
– 3 shift-registers where the first one takes the
incoming data bit and the rest, form the memory of
the encoder.

u1 First coded bit


(Branch word)
Input data bits Output coded bits
m u1 ,u2
u2 Second coded bit
A Rate ½ Convolutional encoder

Message sequence: m (101)


Time Output Time Output
(Branch word) (Branch word)
u1 u1
u1 u 2 u1 u 2
t1 1 0 0 1 1
t2 0 1 0 1 0
u2 u2

u1 u1
u1 u 2 u1 u 2
t3 1 0 1 0 0
t4 0 1 0 1 0
u2 u2
A Rate ½ Convolutional encoder

Time Output Time Output


(Branch word) (Branch word)
u1 u1
u1 u 2 u1 u 2
t5 0 0 1 1 1
t6 0 0 0 0 0
u2 u2

m (101) Encoder U (11 10 00 10 11)


Effective code rate

• Initialize the memory before encoding the first bit (all-


zero)
• Clear out the memory after encoding the last bit (all-
zero)
– Hence, a tail of zero-bits is appended to data bits.

data tail Encoder codeword

• Effective code rate :


– L is the number of data bits and k=1 is assumed:
L
Reff   Rc
n( L  K  1)
Encoder representation

• Vector representation:
– We define n binary vector with K elements (one vector
for each modulo-2 adder). The i:th element in each
vector, is “1” if the i:th stage in the shift register is
connected to the corresponding modulo-2 adder, and
“0” otherwise.
• Example:
u1
g1 (111) m u1 u 2
g 2 (101) u2
Example: Consider the rate 2/3 convolutional encoder.
2 bits at a time are shifted
into it and 3 output bits are
generated.
The generators are:
g1= [1011], g2= [1101],
g3= [1010].
• There are 3 ways to describe a convolutional code:
- Tree Diagram.
- Trellis Diagram.
- State Diagram.
Tree Diagram

001
110
K = 3, k = 1, n = 3 011
convolutional encoder. 100
Repeats
itself
after the
010
Kth stage.
101
000
111
001
110
011
100
010
The generators are: 101
g1= [100], g2= [101], Tree diagram for rate 1/3,
g3= [111]. K = 3 convolutional code.
Trellis Diagram

• The 3-bit o/p sequence for each i/p bit is determined by


the i/p bit and the 4 possible states of the shift register,
denoted as:
a = 00, b = 01, c = 10, d = 11
• All branches emerged from the same nodes have the
same label (state) are identical (i.e. generate identical
o/p sequences)  the 2 nodes can be merged.
DO this to the
tree diagram

Obtain the
Trellis Diagram
Trellis diagram for rate
1/3, black line: the o/p generated by the i/p bit 0
K = 3 convolutional code. red line: the o/p generated by the i/p bit 1
State Diagram

Is a graph of the possible


states of the encoder and
the possible transitions
from one state to another.

State diagram for rate 1/3, K = 3


convolutional code.
Example: K = 2, k = 2, n = 3
convolutional code.
Tree diagram
Trellis
diagram for
K = 2, k = 2,
n=3
convolutional
code.
State diagram for
K = 2, k = 2, n = 3
convolutional
To generalize, we state that a rate k/n, constraint length
K, convolutional code is characterized by 2k branches
emanating from each node of the tree diagram.

The trellis and the state diagrams each have 2k(K-1)


possible states. There are 2k branches entering each
state and 2k branches leaving each state (in the trellis
and tree, this is true after the initial transient).

You might also like