Professional Documents
Culture Documents
EE3101 - 7 Chapter 4-1 Error Correction Coding - r1
EE3101 - 7 Chapter 4-1 Error Correction Coding - r1
Communication Engineering
Chapter 4, Error Correction Coding
Course Intended Learning Outcomes
Explain the basic concepts of error detection/correction coding and
perform error analysis
4.1 Block Codes
4.2 Cyclic Codes
Error correction or channel coding has built in redundancies to enable reliable
transmission that can withstand effects due to noise, interference and multipath fading.
• Redundancy = (n-k)/k
• Code rate = k/n
4.1.1 Parity-check code
1) Single-Parity-check-code
• Redundant bit = 1 bit even or odd parity
• Code rate k/(k+1)
• Can only detect only odd number of bit errors, cannot correct errors
• Probability of undetected error Pud (even number of bits are inverted)
• When k is large, a look-up table is not feasible, instead a generator matrix is used.
• For a k-dimensional subspace of the n-dimensional binary vector space (k<n),
• A set of n-tuples can generate all the 2k member vectors of the subspace.
• The generating set of vectors is said to span the subspace.
• Code vector U is generated as a linear combination of k linearly independent n-tuples
V1, V2, …, Vk, i.e.,
𝑼 =𝑚 1 𝑽 𝟏 +𝑚 2 𝑽 𝟐+ …+𝑚 𝑘 𝑽 𝒌
𝑽𝟏 𝑉 11 𝑉 12 ⋯ 𝑉 1𝑛
⋮
[ ][
𝑮= 𝑽 𝟐 =
𝑽𝒌
𝑉 21
⋮
𝑉 𝑘1
𝑉 22
⋮
𝑉𝑘2
⋯
⋯
⋯
𝑉 2𝑛
⋮
𝑉 𝑘𝑛
] Generator matrix
𝑽𝟏 1 1 0 1 0 0
[ ][
𝑮= 𝑽 𝟐 = 0
𝑽𝟑 1
1
0
1
1
0
0
1
0
0
1 ] Generator matrix
Code vector
𝑝11 𝑝 12 ⋯ 𝑝1 , 𝑛− 𝑘 1 0 ⋯ 0
[𝑝
𝑮= [ 𝑷∨ 𝑰 𝒌 ] = 21
⋮
𝑝𝑘 1
𝑝 22
⋮
𝑝𝑘 2
⋯
⋯
⋯
𝑝2 , 𝑛− 𝑘
⋮
𝑝 𝑘 , 𝑛 −𝑘
0
⋮
0
1
⋮
0
⋯
⋯
⋯
0
⋮
1 ]
Where P is the parity array portion of the generator matrix with;
pij = (0 or 1), and Ik is the kk identity matrix.
Reduced complexity because it’s not necessary to store identity matrix.
Systematic code vector:
… … … … …
P I3
Example;
The 3 redundant bits provide greater ability to detect and correct errors than single
parity checks.
4.1.2.5 Parity Check Matrix
[ ]
and validate the codeword. 0 1 ⋯ 0
• The rows of H must be orthogonal to G. ⋮ ⋮ ⋯ ⋮
𝐼 𝑛 −𝑘
i.e. GHT = 0.
• H is (n-k)n matrix
• G is kn matrix
[ ]
𝑯𝑻= −
𝑃
=
0
𝑝11
𝑝21
0
𝑝 12
𝑝 22
⋯
⋯
⋯
1
𝑝1 , 𝑛 −𝑘
𝑝2 , 𝑛 −𝑘
• To be orthogonal, H must be of the form; ⋮ ⋮ ⋯ ⋮
and HT is given by; 𝑝𝑘 1 𝑝𝑘 2 ⋯ 𝑝𝑘 , 𝑛 −𝑘
4.1.2.6 Syndrome Testing Transmission U
• One to one mapping between error patterns and syndrome testing implies detected
errors can be corrected.
• A standard array (n, k) code is defined as
First row: contains all the 2k code vectors starting with all-zero vector.
First column: contains all the 2n-k correctable error pattern.
Each row is called a coset, which consists of;
I. Coset leader; a correctable error pattern in the first column
II. All code vectors perturbed by that error pattern.
𝑈1 𝑈2 ⋯ 𝑈𝑖 ⋯ 𝑈2
Array of 2n-k 2k
[ ]
𝑘
𝑒2 𝑈 2 +𝑒 2 ⋯ 𝑈 𝑖+ 𝑒2 ⋯ 𝑈 2 +𝑒 2
𝑘
= 2n elements that
⋮ ⋮ ⋯ ⋮ ⋯ ⋮
𝑒𝑗 𝑈 2 +𝑒 𝑗 ⋯ 𝑈 𝑖+ 𝑒 𝑗 ⋯ 𝑈 2 +𝑒𝑗
𝑘
corresponds to all the
⋮ ⋮ ⋯ ⋮ ⋯ ⋮ 2k n-tuples in the
𝑈2𝑛− 𝑘 𝑈 2+ 𝑒2𝑛 −𝑘 ⋯ 𝑈 𝑖 +𝑒 2
𝑛−𝑘 ⋯ 𝑈 2 + 𝑒2
𝑘 𝑛 −𝑘
vector space.
Syndrome of a Coset
• If ej is the coset leader or error pattern of the jth coset, then Ui+ej is an n-tuple in
this coset, and the syndrome is given by;
As if , it implies that the original code word can be correctly resumed if the
estimated error is equal to the actual error pattern. Otherwise, an undetectable
decoding error exists.
Codeword assigned
to message
8 valid code vectors
Message Code
Vector Vector
Example of a standard array for a (6, 3) code. 26 = sixty four 6-tuples
000 000 000
000000 110100 011010 101110 101001 011101 110011 000111
100 110 100
010 011 010 000001 110101 011011 101111 101000 011100 110010 000110
110 101 110 000010 110110 011000 101100 101011 011111 110001 000101
001 101 001 000100 110000 011110 101010 101101 011001 110111 000011
101 011 101 001000 111100 010010 100110 100001 010101 111011 001111
011 110 011 010000 100100 001010 111110 111001 00110 100011 010111
111 000 111
100000 010100 111010 001110 001001 111101 010011 100111
010001 100101 001011 111111 111000 001100 100010 010110
[ ]
0
0
1
0
1
1
0
1
1
0
0
1
0
1
1
syndrome
look-up table
Error
Pattern
000000
000001
Syndrome
000
101
000010 011
If code vector: U=101110, 000100 110
but received vector: r=001110
001000 001
Syndrome of r: S=[001110]HT=[100]
010000 010
Estimated error pattern:
Corrected vector estimated by: 100000 100
001110+100000 010001 111
=101110
because error pattern is one of the 8 allowable ones.
4.1.3 Coding Strength
4.1.3.1 Weight and Distance of Binary Vectors
Not all error patterns can be correctly decoded, the code’s correction capability can be
determined by its weight and distance.
1. Hamming weight w(U) of a code vector U is the number of non-zero elements in U.
2. Hamming distance between two code vectors U and V, d(U, V) is defined as the
number of elements in which they differ and;
• Minimum distance dmin is a measure of the code’s capability of error detection and
correction.
• By property of linear block code, W=U+V must also be a code vector, so,
• d(U, V) = w(U+V) = w(W) = d(W, 0)
Þ dmin = min d(U, V) = min d(W, 0) for all U, V, W.
dmin is the smallest distance between the all-zeros code vector and all the other code
vectors.
4.1.3.4 Error Detection and Correction
dmin
U V even dmin
t
e
dmin
U V odd dmin
t
e
• Error detection capability is defined as e = dmin-1
• It guarantees that all error patterns of (dmin-1) or fewer bit errors can be detected
• Error correction capability is defined as;
𝑑 𝑚𝑖𝑛 −1
𝑡 =⌊ ⌋ 𝑤h𝑒𝑟𝑒 ⌊ 𝑥 ⌋ 𝑟𝑜𝑢𝑛𝑑𝑠 𝑥 𝑡𝑜 𝑡h𝑒 𝑠𝑚𝑎𝑙𝑙𝑒𝑠𝑡 𝑖𝑛𝑡𝑒𝑔𝑒𝑟 , 𝑒 . 𝑔 . ⌊ 1.9 ⌋=1
2
• It’s the maximum number of guaranteed correctable errors per codeword.
• An (n, k) code is capable of detecting 2n-2k error patterns of length n.
Example: using the same as before
Code vector: U=101110, If the Hamming Probability
Received vector: r=001110 correct distance
codeword
Syndrome of r: S=[001110]HT is:
=[100]
000 000 3
Assume BPSK 110 100 4
PB = 10-2 011 010 2
Minimum Hamming distance: 3 101 110 1
i.e. correct 1 error and
101 001 4
detect 2 errors
011 101 3
Highest probability 110 011 5
000 111 2
Example: using the same as before
Code vector: U=101110, If the Hamming Probability
Received vector: r=010110 correct distance
codeword
is: