18ec501 U5lm1
18ec501 U5lm1
TECHNOLOGY
DEPARTMENT OF ECE
COURSE CODE:18EC501
• System complexity.
Important definitions
• Code word: The code word is the n bit encoded block of
bits. It contains message bits and parity or redundant bits.
• Code rate/code efficiency: It is defined as the ratio of the
number of message bits(k) to the total number of bits(n)
in a code word.
Code rate (r) = k/n
• Hamming distance: number of locations in which their
respective elements differ.
e.g., 10011011
11010010 have a Hamming distance = 3
Alternatively, we can compute by adding code words (mod
2) =01001001 (now count up the ones)
• Hamming weight of a code word: It is defined as the number
of nonzero elements in the code word.
Transmission Model
Error Modulator
Digital Source
Control
Line X(w)
(Transmit
Source Encoder Coding
Coding Filter, etc)
Hc(w) Channel
Transmitter
N(w) Noise
+
Error Demod
Digital Source Line
Control (Receive
Sink Decoder
Decoding
Decoding
Filter, etc)
Y(w)
Receiver
Linear Block Codes
Definition: A code is said to be linear if any two code words in
the code can be added in modulo 2 addition to produce a
third code word in the code.
Code word length= n bits
m0,m1,m2……….mk-1 c0,c1,c2………cn-k-1
m Linear block x
encoder
--The code vector can be mathematically represented by
X=[M:C]
M= k message vector
C= (n-k) parity vector
• A block code encoder generates the parity vector or parity
bits required to be added to the message bits to generate the
code word. The code vector x can also be represented as
[X]=[M][G]
X=code vector of (1×n) size
M=message vector of (1×k) size
G=generator matrix of (k×n) size
• The generator matrix depends on the type of linear block
code used and is defined as
G = [ Ik | P]
Where Ik = (k×k) identity matrix
P= k×(n-k) coefficient matrix
1 0 . . 0
0 1 . . 0
I .
k . . . .
. . . . .
0 0 0 0 1 k k
p00 p10 ... pnk 1,0
p p11 ... pnk 1,1
P 01
. . ... .
p
0,k 1 p1,k 1 ... pnk 1,k 1 k ( n k )
• The parity vector can be obtained as
C=MP
p00 p10 ... pn k ,0
c 0 c .....c
1 n k 1
m 0 m1...... m k 1 p01 p11 ... pn k ,1
. . ... .
p0,nk p1,k 1 ... pn k ,k 1
Parity check matrix(H)
• There is another way of expressing the relationship between
the message bits and the parity bits of a linear block codes.
Let H denote an (n-k)×n matrix defined as
H = [PT | In-k]
Where PT= (n-k)×k matrix representing the transpose of the
coefficient matrix P
In-k = (n-k)×(n-k) identity matrix
Error detection and correction
capability of linear block code
dmin 1
• The maximum number of correctable errors is
given by
d min 1
t
2
where dmin is the minimum Hamming distance
between 2 code words and . means the largest
integer less than or equal to the enclosed
quantity.
Properties of G and H matrix
• GHT =0
• HGT =0
• XHT =0
Example 1,2
Syndrome: Definition & properties
• The generator matrix G is used in the encoding operation at
the transmitter. On the other hand, the parity check matrix H
is used in the decoding operation at the receiver.
Let x represent the transmitted code word and y represent
the received code word. We express the vector y as the sum
of the original code vector X and a vector E, given by
Y X E
Where E is called the error vector or error pattern. The ith
element of the E equals 0 if corresponding element of y is the
same as X. On the other hand the ith element of E equals 1 if
there is an error at the ith location.
• The syndrome vector is defined as
S=YHT
• Property: The syndrome depends only on the error pattern
and not on the transmitted code word.
S=(X+E)HT
=XHT+EHT
= EHT
Syndrome decoding
• We have discussed about the encoder for the linear block
code. Now let us learn about the decoder. The two important
functions of the decoder are
– Error detection in the received code
– Error correction
• The above two functions are accomplished by syndrome
decoding.
Detection of Error
• Since we know XHT =0
At the receiver, if S=YHT =0 then Y=X and there is no error but
if S=YHT ≠0 then Y ≠X and error exist in the received
codeword.
Correction of Error
Steps:
1. For the given received vector find the syndrome vector as
S=YHT.
2. The syndrome vector will resemble any of the column of H
matrix, which indicates there is an error in the
corresponding bit of the received vector.
3. Now calculate error vector E.
suppose 2nd column of H matrix and syndrome
vector is same that means there is an error at the 2nd bit of
received signal. Then the error vector will be E=[0100000] if
n=7.
4. Finally determine the transmitted vector as X Y E
Thank You!!!