Classnote PRM ChannelCoding31!10!2024
Classnote PRM ChannelCoding31!10!2024
Waveform coding deals with transforming waveforms into “better waveforms,” to make the detection process less
subject to errors.
Structured sequences deals with transforming data sequences into “better sequences,” having structured
redundancy (redundant bits). The redundant bits can then be used for the detection and correction of errors.
Text Books/References
• Text Books :
1) Principles of communication, 4th ed., Simon Haykin
2) Digital Communications: Fundamentals & Applications,
2nd ed., B. Sklar
• Reference Books:
1) Principles of Digital communication and coding, Viterbi
and Omura
2) Information theory and reliable communication, Gallager
Antipodal and Orthogonal Signals
Cross-correlation = -1
Cross-correlation = 0
Parity-
Check
Code
Motivation for Channel Coding
0 (1-p) 0
p
B B*
p
1 (1-p) 1
Physical Channel
• Pr{B*≠B}=p
• For a relatively noisy channel, p (i.e., probability of error) may have a value of
10-2
• For many applications, this is not acceptable
– Examples:
• Speech Requirement: Pr{B*≠B}<10-3
• Data Requirement: Pr{B*≠B}<10-6
• Channel coding can help to achieve such a high level of performance
6
Channel Coding
B1B2.. Bk W1W2.. Wn 0 (1-p) 0 W*1W*2.. W*n B*1B*2.. B*k
p
Channel Channel
Encoder p Decoder
1 (1-p) 1
Physical Channel
Physical
Channel
7
Channel Coding
11
Hamming Distance
Cont’d…
Why Linear?
• Linear Block Codes
– Stores k linearly independent codewords
– Encoding process through linear combination of
codewords g0, g1,…, gk-1 based on input message
u=[u0, u1,…, uk-1]
g0 g 00 g 01 ... g 0 ,n −1
g g g11 ... g1,n −1
1 10
. . . .
G= = . . .
.
. . . .
gk −1 g k −1, 0 g k −1,1 ... g k −1,n −1
Generator Matrix 15
Systematic Codes
• For a systematic block code the dataword appears
unaltered in the codeword – usually at the start
• The generator matrix has the structure,
k R R=n-k
1 0 .. 0 p11 p12 .. p1R
0 1 .. 0 p21 p22 .. p2 R
G= = I | P
.. .. .. .. .. .. .. ..
0 0 .. 1 p k 1 pk 2 .. pkR
1000110
0100011
c = m.G = [1011] = [1011| 100]
0010111
0001101
21 ◼ H = [PT | In-k ]
Block Codes: Check Error
P
Define matrix HT as H =
T
I n −k
P
T
cH = m | c p
I
n −k
= mP c p = c p c p = 0
22
Block Codes: Linear Block Codes
✓ The transpose of matrix HT is H = PT I n −k
23
Linear Block Codes
➢ If S is 0 then message is correct else there are errors in it,
from common known error patterns the correct message
can be decoded.
• For the (7, 4) linear block code, given by G as
1000 | 111
0100 | 110 1110 | 100
G=
H = 1101 | 010
0010 | 101
0001| 011 1011 | 001
1 0 0
0 1 0
0 0 1
vH = 1 0 0 0 1 0 1 1
T
1 0
0 1 1
1 1 1
1 0 1
1 0 0
0 1 0
0 0 1
1 0 0 0 1 0 1 1 1 0 = 1 0 0 0 0 0 1 = 0
0 1 1
Modulo-2 Addition
1 1 1 00=0
1 0 10 1 0 =1
0 1=1
0 1 0
0 0 1 11= 0
1 0 0 0 1 0 1 1 1 0 = 0 0 0 0 1 0 0 = 1
0 1 1
1 1 1
1 0 1
1 0 0
0 1 0
0 0 1
1 0 0 0 1 0 1 1 1 0 = 0 0 0 0 1 0 1 = 0
0 1 1
1 1 1
The second row 1 0 1
corresponds to the 1 0 0
second bit from left. Syndrome
0 1 0
0 0 1
vH = 1 0 0 0 1 0 1 1 0 = 0 1 0
T
1
0 1 1 Match syndrome with
1 1 1 corresponding code in
1 0 1 parity check matrix
Note:
v0 v1 v2
Parity Register
+ + +
1 0 0
0 0
s0 s1 s2
1
0 0 1
s 0 = r 0 + r3 + r5 + r 6 HT = 1 1 0
s 1 = r1 + r3 + r 4 + r5 0 1 1
s 2 = r 2 + r 4 + r5 + r 6 1 1 1
1 0 1
34
Exercise-1
Advantages and disadvantages of linear
codes
Advantages
1. Minimal distance h(C) is easy to compute if C is a linear code.
2. Linear codes have simple specifications.
• To specify a linear [n,k] –code, it is enough to list k codewords.
3. There are simple encoding/decoding procedures for linear
codes.
Disadvantages
1. Transmission bandwidth requirement is more.
2. Extra bits reduces bit rate of transmitter and also reduces its power.
Hamming Code
Question: If the received
Non-Systematic Hamming code is
0001110 with even parity
form of then detect and correct
Hamming Code error.
Answer: ???
Example: Hamming Code
Encoding Process
Decoding Process
Syndrome = p4p2p1
Overcome limitations of LBC
• The implementation of linear block codes requires
circuits capable of performing matrix multiplication and
of comparing the result of various binary numbers.
– Although integrated circuits have been developed to
implement the most common codes, the circuitry can become
quite complex for very long blocks of code.
47
Cont’d…
Cyclic Code: Encoder
Cyclic Code: Example
• Example : Find the codeword c(x) if m(x) = 1 + x + x2 and
g(x) = 1 + x + x3, for (7, 4) cyclic code
• We have n = total number of bits = 7, k = number of
information bits = 4, r = number of parity bits = n - k = 3
m( x ) x n − k
c p ( x) = rem
g ( x )
x + x + x
5 4 3
= rem 3 =x
x + x +1
Then,
c( x) = m( x) x n −k + c p ( x) = x + x 3 + x 4 + x 5
55
= 0111010
Systematic: Cyclic Code
Here
p=x
q = n-k
Systematic: Cyclic Code
Here
p=x
q = n-k
Systematic: Cyclic Code
Non-systematic: Cyclic Code
Cont’d…
Cyclic Code: Pros & Cons
Advantages of Cyclic Codes .
• They have an excellent mathematical structure. This makes the design of
error correcting codes with multiple-error correction capability relatively
easier.
• The encoding and decoding circuits for cyclic codes can be easily
implemented using shift registers.
• The error correcting and decoding methods of cyclic codes are simpler and
easy to implement. These methods eliminate the storage (large memories)
needed for lookup table decoding. Therefore the codes become powerful and
efficient.
Used in
Ethernet,
ARQ
69
Cyclic Redundancy Checker
Thank You!