Uploaded by m y

DC6

advertisement
DIGITAL
COMMUNICATION
LECTURE- 6
1
M. Ishtiaque Aziz Zahed
CHANNEL ENODING
Purpose:
The purpose of the channel encoding is to convert
the source code to a form that will allow the
receivers to reduce the number of errors that occur
in its output due to channel noise.
Process:
The channel encoder adds redundancy to the source
code by inserting extra code digits in a controlled
manner so that the receiver can possibly detect and
2
correct channel-caused errors.
CHANNEL ENODING
Classification:
Categorically there are two types of channel
encoding process:
❑ Block code (also known as group code)
❑ Convolutional code (also known as tree code)
3
BLOCK CODES
 Block
codes correspond to subdividing the
sequence of source digits into sequential
blocks of k digits.
 Each
k digit is mapped into an n digit block
of output digits, where n>k.
 The
ratio (k/n) is called the code efficiency.
 The difference (1-(k/n)) is called redundancy.
4
BLOCK CODES
The simplest block code adds a single bit to the k data
bits. The added bit is known as parity check bit.
Technique:
This bit makes the total number of 1s either odd or even.
Advantage:
The simple block code is capable of detecting only errors
involving odd number of bits.
Limitations:
✓ Errors in an even number of bits go undetected.
✓ The single parity check bit code has no error
correction capability.
5
SIMPLE PARITY CHECK BIT CODES
Suppose a code stream generated by the source encoder
is 01001100.
Consider that this stream considers every 4 digits at a
time for channel encoding and utilizes even parity (the
number of 1s for every four digits should be even).
Using simple parity check bit code generate the channel
encoded code word.
Solution: 0100
Odd 1s
Therefore, the
channel encoded
Even 1s code-word will be
1010001100.
1100
6
BLOCK CODES FOR SINGLE ERROR
CORRECTION: HAMMING CODE
 For
a (n,k) block code, every k digit
source encoded code-word is
converted to a n digit channel
encoded code-word. The number of
parity bits is, r=(n-k).
7
HAMMING CODE
8
HAMMING CODE
9
HAMMING CODE
HAMMING CODE
11
HAMMING CODE
HAMMING CODE
•Suppose, for a (7,4) Hamming code you have been
given a coefficient matrix P.
1 1 1
1 1 0
1 0 1
0 1 1
Generate the code-word for the message 0101.
Solution: Here, Generator matrix, [G] = [I P]
1 0 0 0 1 1 1
0 1 0 0 1 1 0
0 0 1 0 1 0 1
0 0 0 1 0 1 1
13
HAMMING CODE
Code-word, [T] = [G]T [B]
1 0 0 0
0 1 0 0
0 0 1 0
=0 0 0 1
1 1 1 0
1 1 0 1
1 0 1 1
1
1
1
0
1×1⊕0×1⊕0×1⊕0×0
0×1⊕1×1⊕0×1⊕0×0
0×1⊕0×1⊕1×1⊕0×0
= 0×1⊕0×1⊕0×1⊕1×0
1×1⊕1×1⊕1×1⊕0×0
1×1⊕1×1⊕0×1⊕1×0
1×1⊕0×1⊕1×1⊕1×0
14
HAMMING CODE
1⊕0⊕0⊕0
0⊕1⊕0⊕0
0⊕0⊕1⊕0
= 0⊕0⊕0⊕0
1⊕1⊕1⊕0
1⊕1⊕0⊕0
1⊕0⊕1⊕0
1
1
1
= 0
1
0
0
15
HAMMING CODE
1
1
1
Suppose the received code word is R = 0
1
1
0
Then, syndrome [S]=[H][R]
1
1
1110100
1110100 1
H= 1 1 0 1 0 1 0 ; [S]= 1 1 0 1 0 1 0 0
1011001
1011001 1
1
0
16
HAMMING CODE
1×1⊕1×1⊕1×1⊕0×0⊕1×1⊕0×1⊕0×0
= 1×1⊕1×1⊕0×1⊕1×0⊕0×1⊕1×1⊕0×0
1×1⊕0×1⊕1×1⊕1×0⊕0×1⊕0×1⊕1×0
1⊕1⊕1⊕0⊕1⊕0⊕0
= 1⊕1⊕0⊕0⊕0⊕1⊕0
1⊕0⊕1⊕0⊕0⊕0⊕0
0
= 1
0
The syndrome is similar to 6th column of [H].
Therefore, the error is in 6th bit.
17
Download