ETN642 Lec11 ChannelCoding Handouts
ETN642 Lec11 ChannelCoding Handouts
(Spring 2024)
Lecture 11
Outline
• Introduction to Channel coding for error correction
• Linear block codes
• Error detection and correction capability
• Channel Encoding
• Channel Decoding
• Sub-types
• Hamming codes
• Cyclic codes
1
What is Channel Coding (FEC)
Channel coding is employed to reduce a communication link’s error rate
without retransmissions (also called forward error correction (FEC))
Additional redundant codeword symbols increase raw symbol rate over the
channel bandwidth requirement increases
Digital modulation
Channel
Digital demodulation
Channel Demod.
Format Detect
decoder Sample
2
Performance Trade-offs possible with FEC
• Error rate vs. bandwidth (A->B vs A->C) Example Case: desired PB reduction obtained
but SNR maintained
• Power vs. bandwidth (D->F vs D->E) Example Case: SNR decrease due to
reduction in TX power but PB maintained
• Data rate vs. bandwidth (D->F vs D->E) Example Case: SNR decrease due to
increase in bit rate at constant TX power
PB but PB maintained
Coded
Coding gain:
The coding gain of a channel code is defined as the
A
reduction in Eb/N0 (relative to the uncoded case) achieved
F
by using this code
C
Eb E B
GdB = − b
N 0 [dB], uncoded N 0 [dB], coded D
E
Uncoded
By convention, the coding gain is always defined for some
target PB achievable in the high SNR regime
Eb / N 0 (dB)
NOTE: Under constraint that Rb maintained after Channel Coding, faster symbol rate
5
needed more bandwidth required relative to uncoded case
Channel
Data block n-bit Codeword
Encoder
n = (n-k) redundant bits + k information bits
k information bits
code rate: R= k/n
• Error correction capability of a channel code depends on its distance properties
• The distance between two codewords is the number of symbols in which
they differ
• minimum distance of a code is the smallest distance among set of distances
between any pair of codewords of this code
6
3
Some Binary Arithmetics
• The Binary field {0,1}, also called a Galois field of order 2
and represented as GF(2) is closed under modulo 2
addition and multiplication
Addition Multiplication
0⊕0 = 0 0⋅0 = 0
0 ⊕1 = 1 0 ⋅1 = 0
1⊕ 0 = 1 1⋅ 0 = 0
1⊕1 = 0 1 ⋅1 = 1
Vector Space
Let V is a set of vectors and F a field of elements
called scalars,
1. V is closed under
4
Vector Space…cont’d
• Spanning set:
{ }
• A set of vectors G = v1 , v 2 , , v n is said to to span V or to be a
spanning set for vector space V, if all vectors in the vector space V
can be constructed as linear combinations of vectors in G
Example: 24 binary 4-tuples form the vector space V4
Example:
{(1000), (0100), (0010), (0001)} is a basis for V4 .
Vk → C ⊂ Vn
mapping (encoding)
Vn
Vk
C
10 Basis of C
10
5
Linear block code as Vector Space…cont’d
11
12
12
6
Block Code : Error Detection and Correction Capability
e = d min − 1
in received n-bit block, up to e erroneous bits can be detected
d − 1
t = min
2
in received n-bit block, up to t erroneous bits can be corrected
13
13
{v1 , v 2 ,, v k }
14
14
7
Generation of Codewords of Linear Block Code (2/4)
• Encoding an (n,k) block code
U = mG G is (k X n) generator
U is (1 X n) codeword vector matrix for the given
from the set of 2k possible linear block code
codewords {U}
15
000 000000
V1 1 1 0 1 0 0 100 110100
G = V 2 = 0 1 1 0 1 0 010 011010
V 3 1 0 1 0 0 1 110 1 01 1 1 0
001 1 01 0 0 1
101 0 111 0 1
011 1 1 0 011
1 11 0 0 0 1 11
16
16
8
Generation of Codewords of Linear Block Code (4/4)
• Systematic block code (n,k)
• For a systematic code, the the k information bits appar together
either as the first (or last) k elements in the codeword
• The generator matrix for a systematic code is given as
G = [ P Ik ]
P is the parity array part of
Ik = k × k identity matrix generator matrix, and
pij = (0 or 1)
P = k ×(n − k ) matrix
U = mG
U = (u1 , u2 ,..., un ) = ( p1 , p2 ,..., pn −k , m1 , m2 ,..., mk )
17 parity bits message bits
17
GH T = 0 UHT=0
• H is called the parity check matrix. We can use H to
test whether a received vector is a valid member of
the codeword set C = {U}
• For systematic linear block codes, H is given as
18
H = [I n − k PT ]
18
9
Decoding of Codewords of Linear Block Code…cont’d
19
19
zero
codeword
20
20
10
Syndrome Decoding using Standard Array
• The correctable error patterns are the 2n-k coset leaders in the first column of
the standard array
• Decoding will be correct if, and only if, the error pattern caused by the channel
is one of the coset leaders
21
21
22
22
11
Syndrome Decoding using Standard Array
1 0 0
0 1 0
Syndrome Table
0 0 1
Error pattern Syndrome U = (101110) transmitted. T
H =
000000 000 1 1 0
r = (001110) is received. 0 1 1
000001 101
The syndrome of r is computed : 1 0 1
000010 011
000100 110 S = rHT = (001110)H T = (100)
001000 001 Error pattern corresponding to this syndrome is
010000 010 eˆ = (100000)
100000 100
The corrected vector is estimated
010001 111
ˆ = r + eˆ = (001110) + (100000) = (101110)
U
23
23
Hamming codes
• Hamming codes are a subclass of linear block codes and
belong to the category of perfect codes.
• Hamming codes can be expressed as a function of a single
integer m ≥ 2
Codelength: n = 2m −1
Numberof information bits: k = 2m − m −1
Numberof paritybits: n-k = m
Errorcorrectioncapability: t = 1
• The n columns of the parity-check matrix, H, comprise all
2m-1 non-zero binary m-tuples, where n = 2m-1.
A t-error-correcting perfect code cannot correct any error patterns
24 with hamming weight greater than t
24
12
Hamming codes
• Example: Systematic Hamming code (7,4)
1 0 0 0 1 1 1
H = 0 1 0 1 0 1 1 = [I 3×3 PT ]
0 0 1 1 1 0 1
0 1 1 1 0 0 0
1 0 1 0 1 0 0
G= = [P I 4×4 ]
1 1 0 0 0 1 0
1 1 1 0 0 0 1
25
25
PB
8PSK
QPSK
Eb / N 0 [dB]
26
26
13