Upload
gauravthakur
View
608
Download
0
Embed Size (px)
Citation preview
BCH CODES
HISTORY
WHY CODING ?
• 2 Key system parameters available for designer – Ch BW – Transmitted Sig Power
• Hence we go for modulation schemes but error performance is an issue – hence error control coding
• Another motivation is to reduce Eb/ N0 for a fixed BER to reduce Tx power to reduce hardware cost
IMPLICATIONS OF CH CAP THEOREM
• Block CodesDivide the message into blocks, each of k bits,
called datawords. Then add r redundant bit to make length n=k+r
The resulting n-bit blocks are called codewords.
• Convolution CodesAbsence of memory (nutshell- serial input no
blocks)
ERROR CORRECTION CODES
DEFINITIONS
• WORD:- Sequence of symbol.• CODE :- Set of vectors called the codeword.• HAMMING WEIGHT :- No of non-zero elements.• HAMMING DISTANCE :- No of places the codeword differs.
D(c1, c2) = w(c1-c2)• BLOCK LENGTH :- Length of code words in a BLOCK CODE,
denoted by “n”.• MSG BITS :- “k”• CODE RATE :- Of an (n,k) code , the ratio of (k/n), and reflects
the fraction of the codeword that consists the info.
• MINIMUM DISTANCE :- Minimum hamming distance b/w any two codes.
• MINIMUM WEIGHT(w) :- The smallest weight of any nonzero codeword.
DEFINITIONS
LINEAR CODES
• Properties– Addition of two codewords gives third codeword.– All zero code is also a codeword.– Minimum distance = minimum weight.
LINEAR CODESK- msg bits (m0, m1, m2, m3,…………… mk-1) b-parity bits (b0, b1, b2, b3,
…………… bn-k-1)
Codeword(c0, c1, c2, c3,…………… cn-1) n – code length
Ci = bi (parity bit) i= 0,1,2,………n-k-1. mi+k-n(msg bits) i= n-k, n-k+1, ……..n-1
• The (n-k) parity bits are linear sum of k msg bits.
• bi = p0i m0 + p1i m1 + ………….+ pk-1i mk-1
• Where the coeff are defined as follows:-
pij = 1 if bi depends on mj 0 otherwise
LINEAR CODES
Coefficient matrix P p00 p01 …….. P0n-k-1
p10 p11 …….. P1,n-k-1
P = . . . . . . pk-1,0 pk-1,1 ……. Pk-1,n-k-1
Where pi = 0 or 1
Identity Matrix : Ik =
1 0 0 0…. 0 0 1 0 0…. 0 0 0 1 0…. 0 . . . . . . . .0 0 0 1 ….1
All code words can be obtained as linear combination of basis vectors.
The basis vectors can be designated as {, , ,….., } For a linear code, there exists a k by n generator matrix such
that
where c={, , ….., } and m={, , ……., }
GENERATOR MATRIX
G = [ P]C = m.G = [m mP]
Messagepart Parity part
m=(1110) and G = =
c= m.G =
= 1. c = (1101000) + (0110100) + (1110010) = (0101110)
1 1 0 1 0 0 00 1 1 0 1 0 01 1 1 0 0 1 01 0 1 0 0 0 1
Example:Let us consider (7, 4) linear code where k=4 and n=7
• For decoding we require to separate the parity bits and also find out if there was an error.
• We use a parity check matrix H s.t H = [ PT I n-k ]And H GT = 0 c HT = 0
Thus m c
c 0 null vector
GENERATOR MATRIX
PARITY CHECK
MATRIX T
CYCLIC CODES
• They form a sub class of linear block codes• Properties– Linearity a+b = c– Cyclic property ie any cyclic shift of a code word is
also a code word.
BCH CODES ARE LINEAR CYCLIC BLOCK CODES
CHARACTERISTICS OF BCH CODES• For positive pair of integers m≥3 and t, a (n, k) BCH code
has parameters:– Block length: n = 2m – 1– Number of check bits: n – k ≤ mt– Minimum distance: dmin ≥ 2t + 1• t<(2m – 1)/2 random errors detected and corrected.• So also called ‘t-error correcting BCH code’.• Major advantage is flexibility for block length and code
rate.K- msg bits (m0, m1, m2, m3,…………… mk-1)
b-parity bits (b0, b1, b2, b3,
…………… bn-k-1)
n – code length
MANIFESTATION OF CHARACTERISTICS• The parameters of some useful BCH codes are:
n = 2m – 1n
n – k ≤ mtk
t<(2m – 1)/2 t
Generator Polynomial
7 4 1 1 011
15 11 1 10 011
15 7 2 111 010 001
15 5 3 10 100 110 111
31 26 1 100 101
31 21 2 11 101 101 001
31 16 3 1 000 111 110 101 111
31 11 5 101 100 010 011 011 010 101
31 6 7 11 001 011 011 110 101 000 100 111
• Generator polynomial g(x) specified in terms of its roots from Galois Field GF(2k).
• g(x) has α,α2,…, α2t and their conjugates as its roots.
• We choose g(x) from xn + 1 polynomial factors by taking xn-k as highest term.
CHARACTERISTICS OF BCH CODES
Galois Field Root Elements Min Poly
Genr Poly
GALOIS FIELD
• Evariste Galois (1832)
Field +, -, x, /
Ring+, -x
Gp
+, -
AXIOMS FOR FINITE FIELDS1. Field F is closed under + and x iea+b and a.b are in F if a & b are in
F2. Associative law : (a+b)+c = a+(b+c), a.(b.c) = (a.b).c3. Commutative law : a+b=b+a, a.b=b.a4. Distributive : a.(b+c)= a.b+a.c5. Identity elements 1 & 0 must exist in F s.t6. a+0 =a7. a.1 = a8. For any a there is additive inverse s.t a+(-a)=09. For any a except 0 there is multiplicative inverse (a= ) s.t a() =110. A field with finite elements is called Galois Field denoted by
GF(q). 11. If 1st 8 properties are satisfied then its called a ring.
STRUCTURE OF FINITE FIELDS• Gaolis Field : Fq ={0, α, α2, …, αq-1}.
• Primitive element : An element α in a finite field Fq is called a primitive element (or generator) of Fq if Fq ={0, α, α2, …, αq-1}.For q = pm
• Where : q represents the number of elements in the field.
p is a prime number α is the primitive elementord[α] = q-1 and αq-1 = 1 m is degree of primitive polynomial• Now, p [α] = 0 of degree m
• Example : Consider the field GF(5)=(0,1,2,3,4) , we will check if 2 and 3 are primitive elements
• (mod 5) = 1 (mod 5) = 1 • (mod 5) = 2 (mod 5) = 3• (mod 5) = 4 (mod 5) = 4• (mod 5) = 3 (mod 5) = 3
MODULAR ARITHMETIC
• Use only limited range of integers.• We, define upper limit, called a ,modulus N.• Then use only the integers 0 to N-1.• This is modulo-N arithmetic.
Modulo-2 ArithmeticHere modulus N is 2. we can use only 0
and 1. operation in this arithmetic are very simple.
The addition and subtraction give the same results. Here, we use XOR operation for both the add and sub.
The result of an XOR operation is 0(if both the bits are same. The result is 1 if the any of the two bit is different.)
MODULO OPS
Mod 5 addition Mod 5 multiplication for GF(5)
MIN POLY• If βϵFqit is a root of xq -1 which is a poly with coeff in Fp[x] • Min poly of β is : Mβ[x] = poly of least degree in Fp[x]
s.t Mβ[β] = 0 ie……• Min poly is always monic.• Mβ(x) =
conjugates of β = β,βp , βp2 ………..
Example of GF(16)• Generator poly g(x)
• Message D: (0110011)• Data: d(x)=x⁵+x⁴+x+1 • So code C(x)=d(x).g(x) = (x⁵+x⁴+x+1)(x¹ +x +x⁸+x⁶+x⁵+x³+1)⁰ ⁹ = x¹⁵+2x¹⁴+2x¹³+x¹²+2x¹¹+4x¹ +3x +2x⁸⁰ ⁹ +2x⁷+2x⁶+2x⁵+2x⁴+x³+x+1 = x¹⁵+x¹²+ x + x³+x+1⁹• Codeword, C: (1001001000001011)
BLOCK DIAGRAM
Block diagram of (15,7) BCH Encoder
Mistake…..????