Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ling-Pei Kung
Table of Content
1
REFERENCE...............................................................................................................37
List of Tables
List of Figures
Figure 1: An simplified communication system. ...............................................................4
Figure 2: The error detection and correction capabilities based on decoding spheres.....22
uncoded source
source codeword
Source
Encoder
channel codeword
Channel
Encoder
Modulator
Channel
Source
Decoder
decoded output
Channel
Decoder
estimated source
codeword
Demodulator
received codeword
Code Words
(0 0 0 0)
(0 0 0 0 0 0 0)
(1 0 0 0)
(1 1 0 1 0 0 0)
(0 1 0 1)
(0 1 1 0 1 0 1)
(1 1 0 0)
(1 0 1 1 1 0 0)
(0 0 1 0)
(1 1 1 0 0 1 0)
(1 0 1 0)
(0 0 1 1 0 1 0)
(0 1 1 0)
(1 0 0 0 1 1 0)
(1 1 1 0)
(0 1 0 1 1 1 0)
(0 0 0 1)
(1 0 1 0 0 0 1)
(1 0 0 1)
(0 1 1 1 0 0 1)
(0 1 0 1)
(1 1 0 0 1 0 1)
(1 1 0 1)
(0 0 0 1 1 0 1)
(0 0 1 1)
(0 1 0 0 0 1 1)
(1 0 1 1)
(1 0 0 1 0 1 1)
(0 1 1 1)
(0 0 1 0 1 1 1)
(1 1 1 1)
(1 1 1 1 1 1 1)
gg 10 11 01 10 01 00 00
G47 = g = 1 1 1 0 0 1 0
g 1 0 1 0 0 0 1
0
1
2
3
a, b G
c=a*b
then c G
(ii) Associativity
The binary operation * is associative
i.e. a, b, c G
a*(b*c) = (a*b)*c
(iii) Identity G contains an identity element e such that,
aG
a*e = e*a = a
(iv) Inverse G contains an inverse a, such that
a G and a _ 0
a*a = a*a =e
Order
of
a
group:
the
number
of
Finite group: A group of a finite number of elements.
elements
in
group
1
2
3
1
2
3
2
3
0
3
0
1
0
1
2
0
1
0
0
0
1
0
2
0
3
2
3
0
0
2
3
0
2
2
1
Because 2 does not have an inverse. In fact, this set is an integer ring of modulo-4.
Note the symmetry of the tables is the result of commutativity under + and . .
Example: The elements of GF(4) form a Abelian group under "addtion" and
"multiplication". The group of nonzero elements of GF(q) under multiplication is a cyclic
group.
Table 4: Addition of GF(4) elements.
0
1
2
3
0
1
2
3
1
0
3
2
2
3
0
1
3
2
1
0
1
2
3
0
0
0
1
2
3
2
3
1
3
1
2
0
1
0
1
1
0
0
1
0
0
0
1
2.2 Ring
A ring is a set of elements R on which two binary operations addition + and . are
Integer Ring
Polynomial Ring
x= -2, -1
x= -1, -1/4
x=
x=
x= , 2
The coefficients are from GF(2) and the roots are from GF(4) called symbols.
f(x) = x3+x+1
x = , 2, 4
The coefficients are from GF(2) and the roots are from GF(8).
A polynomial p(x) of degree m is irreducible over GF(q) if p(x) is not divisible by any
polynomial over GF(q) of degree less than m but greater than 0.
2.3 Field
A set of elements F on which two binary operations, addition + and multiplication .
are defined. The set F together with + and . are a field if
(i) F is a commutative group under addition.
(ii) The set of nonzero elements in F is a commutative group under multiplication.
(iii) Multiplication is distributive over addition. that is
a, b, c F a.(b+c) = a.b + a.c
A field consists of at least two elements: additive identity and multiplicative identity
Order of a field: the number of elements in a field
Finite field: A field contains finite number of elements
Prime Field: The set of integers {0, 1, 2 ..., q-1}, where q is prime, is a field under
modulo-q addition and multiplication and is denoted by GF(q).
2.3.1 Finite Field Based on Integr Ring
The quotient ring MOD(q) is a field if and only if q is a prime integer.
Example: GF(7)
Extension Field: for any positive integer m, a field of pm elements is called an extension
field of GF(p) and is denoted by GF(pm).
The order of a finite field is a power of prime. Finite fields are called Galois fields.
The number of elements in the smallest subgroup of GF(q) is called the characteristic of
GF(q), which is equavalent to the smallest positive integer such that 1 =0.
i=1
Each Galios field contains a uniques smallest subfield which has a prime number of
elements. Hence the characteristic of a finite field is prime.
Any finite field GF(q) of characteristic contains a subfield of GF(). If q _ , then q is
a power of .
The order of a finite field element a is the smallest positive integer n such that an=1. The
nonzero elements of a finite field form a group under multiplication of GF(q).
We can also take the coefficients of the polynomial form and represent each element as a
q-ary M-tuple (a0, a1, a2, ...., am-1).
The following table shows the primitive polynomial over GF(2).
Example: GF(8)
Power Polynomial
Form Form
Binary
3-tuple
Decimal Index
LSB-MSB
0
(0 0 0)
-1
(1 0 0)
(0 1 0)
(0 0 1)
(1 1 0)
1
2
4
5
(0 1 1)
(1 1 1)
(1 0 1)
Power
Polynomial
Binary 4-tuple
decimal
index
(0 0 0 0)
-1
(1 0 0 0)
(0 1 0 0)
(0 0 1 0)
(0 0 0 1)
(1 1 0 0)
(0 1 1 0)
(0 0 1 1)
12
(1 1 0 1)
11
(1 0 1 0)
(0 1 0 1)
10
(1 1 1 0)
10
3
4
3
1
9
10
11
12
13
14
(0 1 1 1)
14
11
(1 1 1 1)
15
12
(1 0 1 1)
13
13
(1 0 0 1)
14
(x) = (x+p )
i=0
Let e be the degree of a minimal polynomial (x) of an element in GF(pm), then e is the
smallest integer such that pe = , and e m, e divides m.
2.7 2.7.
Vector Space
For any kxn matrix G over GF(2) with k linearly independent rows, there exists an (nk)xn matrix H over GF(2) with n-k linearly independent rows such that for any row gi in
G and any hi in H, gi.hi = 0. The row space of G is the null (dual) space of H and vice
versa.
A submatrix of a matrix G is a matrix that is obtained by striking out given rows or
columns of G.
3.1 Introduction
A block of length n and qk code words is called a linear (n, k) code if and only if its qk
code words form a k-dimensional subspace of the vector space of all the n-tuples over the
field GF(q).
Message units of fixed length k are transformed into a q-ary n-tuple code word or code
vector v in the code space C.
v1n = u1k G
Refer to the first example in the introduction
Example: A binary (7, 4) linear code.
gg 10 11 01 10 01 00 00
G47 = g = 1 1 1 0 0 1 0
g 1 0 1 0 0 0 1
0
1
2
3
Messages
Code Words
(0 0 0 0)
(0 0 0 0 0 0 0)
(1 0 0 0)
(1 1 0 1 0 0 0)
(0 1 0 1)
(0 1 1 0 1 0 1)
(1 1 0 0)
(1 0 1 1 1 0 0)
(0 0 1 0)
(1 1 1 0 0 1 0)
(1 0 1 0)
(0 0 1 1 0 1 0)
(0 1 1 0)
(1 0 0 0 1 1 0)
(1 1 1 0)
(0 1 0 1 1 1 0)
(0 0 0 1)
(1 0 1 0 0 0 1)
(1 0 0 1)
(0 1 1 1 0 0 1)
(0 1 0 1)
(1 1 0 0 1 0 1)
(1 1 0 1)
(0 0 0 1 1 0 1)
(0 0 1 1)
(0 1 0 0 0 1 1)
(1 0 1 1)
(1 0 0 1 0 1 1)
(0 1 1 1)
(0 0 1 0 1 1 1)
(1 1 1 1)
(1 1 1 1 1 1 1)
Every code word v in C is a linear combination of k linearly independent vectors (they are
code words as well) g0, g1, _, gk-1 in C.
The kn generator matrix G has k linear independent row vectors. G is said to generate
or span the (n, k) linear code C.
A linear systematic block code consists of k unaltered information digits and n-k paritycheck digits, which are linear sums of the information digits.
A linear systematic block code can be generated by a generator matrix G = [Pkx(n-k) Ikxk],
where Pkx(n-k) generates the parity-check equations and Ikxk is the identity matrix.
The parity-check matrix H of a linear systematic block code generated by G above is [I(nT
k)x(n-k) P (n-k)xk].
Example: The parity check matrix of the systematic (7, 4) code.
h0 1 0 0 1 0 1 1
H37 = h1 = 0 1 0 1 1 1 0
h2 0 0 1 0 1 1 1
The row space of G span C, the row space of H span Cd, which is the dual code of C.
Every vector in Cd is in the null space of G. C and Cd are said to be orthogonal subspaces
of the 2n space.
The minimum distance of a linear block code is equal to the minimum weight of its
nonzero code words.
Let C be an (n, k) linear code with parity-check matrix H. For each code vector of
Hamming weight l, there exists l columns of H such that the vector sum of these l
columns is equal to the zero vector. Conversely, if there exist l columns of H whose
vector sum is the zero vector, there exists a code vector of Hamming weight l in C.
The minimum weight wmin (or minimum distance dmin) of C is equal to the smallest
number of columns of H that sum to 0.
t
dmin
d3
Figure 2: The error detection and correction capabilities based on decoding spheres
Pu(E) =
Aipi(1-p)n-i
i=1
000000
011100
101010
110001
110110
101101
011011
000111
100000
111100
001010
010001
010110
001101
111011
100111
010000
001100
111010
100001
100110
111101
001011
010111
001000
010100
100010
111001
111110
100101
010011
001111
000100
011000
101110
110101
110010
101001
011111
000011
000010
011110
101000
110011
110100
101111
011001
000101
000001
011101
101011
110000
110111
101100
011010
000110
100100
111000
001110
010101
010010
001001
111111
100011
The decoding based on the standard array is the minimum distance decoding (i.e. the
maximum likelihood decoding).
The probablity of a decoding error is
P(E) = 1 -
eipi(1-p)n-i
i=0
n = 2m - 1
k = 2m - m - 1
m=n-k
t=1
Dmin = 3
4 Cyclic Codes
Cyclic codes are a subclass of linear codes.
Encoding and decoding of cyclic codes are algorithmic and computationally efficient in
contrast to the tabular decoding techinques for arbitrary linear codes.
Encoding and syndrome computation of cyclic codecs can be implemented by linear
feedback shift registers (LFSR).
A (n, k) linear code C is called a cyclic code if every cyclic shift of a code vector in C is
also a code vector in C. This does not mean every code vector have the same weight.
There are groups of code vectors with the same weight.
g(x)
g (x)
gn-k 0
0 g g
Gkn =
= 0 1
g (x) 0 0 0 g0 g1
1
k-1
gg 10 11 01 10 01 00 00
G47 = g = 0 0 1 1 0 1 0
g 0 0 0 1 1 0 1
0
1
2
3
10 11 01 10 01 00 00
G47 = 1 1 1 0 0 1 0
1 0 1 0 0 0 1
G can be generated by dividing xn-k+i with g(x)
xn-k+i = ai(x) g(x) + bi(x)
bi(x) = bi0 + bi1x + bi2x2 + ... + b2i,n-k-1xn-k-1
gn-k
0
0
bb01(x)
(x)
Gkn =
=
bk-1(x)
bb00 bb01 bb02
10 11 12
b(k-1)0 b(k-1)1 b(k-1)2
b0(n-k-1)
b1(n-k-1)
1 0
0 1
0
0
b(k-1)(n-k-1) 0 0
0hk hhk-1 h h0 0h 0
k
k-1
0
H(n-k)k =
0 0
hk hk-1
h0
0
10
H =
0
0
1
0 b00
0 b01
b10
b11
1 b0(n-k-1) b1(n-k-1)
b(k-1)(n-k-1)
b(k-1)0
b(k-1)1
= [0 1 2 3 4 5 6
A code word c(x) can be represented by a code vector c = (c0, c1, ... , cn-1)
c Ht = 0
Which is equivalent to the following equation
6
cii = 0
i=o
That is is a root of c(x), because c(x) is a multiple of g(x) and is a root of g(x). This
is the principle behind BCH code. Since BCH codes are constructed from the first 2t
elements (1,2,3, ...., 2t) as roots, any code word should have these 2t roots. Words
dont have these 2t roots are not code words, thus contain errors.
Error correction: by adding the error pattern to the received code vector.
5 BCH Codes
BCH codes are t-error-correcting codes with symbol field from GF(q) and error location
field from GF(qm). In general, m _ 1 for BCH codes, if m = 1, we give it another name -Reed-Solomon codes.
Let p and m be given and be any element of GF(qm) of order n (i.e. n = 1). Then for
any positive t and any integer j, the corresponding BCH code is the cyclic code of
blocklength n with the generator polynomial
g(x) = LCM [fj0(x), fj0+1(x), ,fj0+2t-1(x)]
where fj(x) is the minimal polynomial of j.
The above equation is a so-called generalized BCH generator polynomial. Usually j0 = 1
and is the primitive element of GF(qm) . Therefore, g(x) will have 1,2,3, ...., 2t
as its roots. If the symbol field and the error-locator field are different, i.e., the errorlocator field is an extension field of the symbol field, then g(x) will have more than 2t
degree. The message length is k < n-2t. In the case of Reed-Solomon codes, the message
word length is exactly n-2t. We say this is more efficient because the code rate k/n is
larger for the same n.
Example: Construct an n = 15 , 2-error-correcting BCH code.
g(x) = LCM [f1(x), f2(x), f3(x),f4(x)]
Since 1,2,4 are conjugates
f1(x) = f2(x) = f4(x)
g(x) = LCM [f1(x), f3(x)] = (x4 + x + 1) (x4 + x3 + x2 + x + 1)
= x8 + x7 + x6 + x4 + 1
Since g(x) has degree of 8, the message has length of 15 - 8 = 7. This is a (15, 7) doubleerror-correcting code.
c(x) = u(x) g(x)
u(x) = (u0, u1, u2, ..., u6)
for 1 i 2t
i
2i3i = 0
)
(n-1)i
11
H =
1
2
3
2
2
2
( ) (2)3
2 (2t)2 (2t)3
for 1 i 2t)
n-1
(2)n-1
(2t)n-1
si = r() = bi()
Thus the syndorm component si can be obtained by evaluating b(x) with x = .
Example: A double-error-correcting (15, 7) BCH code.
Suppose r = ( 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 ) = 1 + x8
g(x) = LCM [f1(x), f2(x), f3(x),f4(x)]
Since 1,2,4 are conjugates
f1(x) = f2(x) = f4(x)
g(x) = LCM [f1(x), f3(x)] = (x4 + x + 1) (x4 + x3 + x2 + x + 1)
= x8 + x7 + x6 + x4 + 1
b1(x) = x2
b3(x) = 1 + x3
s1 = 2
s2 = 4
s4 = 8
s3 = 1 + 9 = 1 + + 3 = 7
S = (2, 4, 7, 8)
si = r(i)= v(i) + e (i)
= e(i)
where e(x) is the error pattern polynomial.
e(x) = xj1 + xj2 + xj3 + _+ xjv
S1 = r() = j1 + j2 + j3 + ...+ jv
S2 = r(2) = (j1)2 + (j2)2 + (j3)2 + ...+ (jv)2
+ vxv
0 = 1
1 = 1 + 2 + 3+...+ v
2 = 12 + 23 + ... + v-1v
v = 1 2 3 .. v
The roots of (x) are 1-1, 2-1, .. , v-1 which are the inverses of the error location
number. (x) is called the error-location polynpmial. is are related to syndrome
components si by the Newtons Identities.
s1 + 1 = 0
s2 + 1s1 + 22 = 0
s3 + 1s2 + 2s1 + 33 = 0
sv + 1sv-1 + + v-1s1 + vv = 0
sv+1 + 1sv + + v-1s2 + vs1 = 0
In a binary field
ii = Error!)
We can find i from these equations and thus the eroro location numbers i by solvoing
(x). There may be many solutions, but we want to find a (x) of minimal degree which
will produce an error pattern with minimum number of errors. If v t, this (x) will give
the actual error pattern.
In summary, the error-correcting procedure for BCH codes consists of three major steps.
1. Compute the syndrome S = (s0, s1, _, s2t) from the received r(x).
2. Determine the error-location polynomial (x) from syndrome components using
Newtons Identities.
3. Determine the error-location number 1, 2, 3, .., v by finding the roots of (x)
and correct the errors in r(x)
Step 2 is the most complicated part of decoding a BCH code.
1Here one symbol is equvalent to one byte, since the symbols are elements of GF(256).
Check Bytes T3
ADTV
(147, 127)
20
CCDC
5
5
Digi-Cipher
5
5
DSC
(167, 147)
10
20
10
The length of the parity-check symbols are twice the error-correcting capability. This is
an unique property of Reed-Solomon codes and is a result of having a generator
polynomial of degree 2t.
Reed-Solomon codes is a subset of BCH codes which in tern, is a subset of cyclic codes.
The symbol field GF(q) and the error locator field GF(qm) are the same, i.e.
m=1
n = qm -1 = q - 1
Example: The symbols in the original messages are 8-bit numbers, i.e. q = 28 = 256
error correction on bytes. The length of the block is 255.
Because the symbol field and the error-locator field are the same field, all minimal
polynomials are linear. This is an important property in that it results in a generator
polynomial of degree 2t (number of parity-check symbols). Unlike other BCH codes in
which the parity-check symbols are usually more than 2t, Reed-Solomon codes are more
efficient. That is, Reed-Solomon codes contain more message symbols for the same
block length and error-correcting capability.
The minimal polynomial over GF(q) of an element in the same field is
fi(x) = x - i
and the generator polynomial of a BDH code is derived from the following
g(x) = LCM [fj0(x), fj0+1(x), ,fj0+2t-1(x)]
2A code block of n total symbols and k message symbols is written as a (n, k) code.
3T is the number of symbol errors the code can correct, regardless how many bits in a symbol.
g(x) =
(x - j0+i)
i=0
+ vxv
Now we can use Berlekamps iterative algorithm to find the error-location polynomial.
The error values are determined by
eji =
Z(1)
(1 + j1)
j=1 j_i
6 REFERENCE
Shu Lin and Daniel Costello, Jr. Error Control Coding, Prentice Hall, 1983.
Rechard E. Blahut, Theory and Practice of Error Control Codes, Addison Wesley,
1984.
Neal Glover and Trent Dudley, Practical Error Correction Design for Engineers 2nd
ed., DST, 1988.
W. Weslet Peterson and E. J. Weldon, Jr. Error-Correcting Codes, 2nd ed., MIT Press,
1972.