Error Control Code Error Control Code Widely used

  • Slides: 10
Download presentation
Error Control Code

Error Control Code

Error Control Code • Widely used in many areas, like communications, DVD, data storage…

Error Control Code • Widely used in many areas, like communications, DVD, data storage… • In communications, because of noise, you can never be sure that a received bit is right • In physical layer, what you do is, given k data bits, add n-k redundant bits and make it into a n-bit codeword. You send the codeword to the receiver. If some bits in the codeword is wrong, the receiver should be able to do some calculation and find out – There is something wrong – Or, these things are wrong (for binary codes, this is enough) – Or, these things should be corrected as this for non-binary codes – (this is called Block Code)

Error Control Codes • You want a code to – Use as few redundant

Error Control Codes • You want a code to – Use as few redundant bits as possible – Can detect or correct as many error bits as possible

Error Control Code • Repetition code is the simplest, but requires a lot of

Error Control Code • Repetition code is the simplest, but requires a lot of redundant bits, and the error correction power is questionable for the amount of extra bits used • Checksum does not require a lot of redundant bits, but can only tell you “something is wrong” and cannot tell you what is wrong

(7, 4) Hamming Code • The best example for introductory purpose and is also

(7, 4) Hamming Code • The best example for introductory purpose and is also used in many applications • (7, 4) Hamming code. Given 4 information bits, (i 0, i 1, i 2, i 3), code it into 7 bits C=(c 0, c 1, c 2, c 3, c 4, c 5, c 6). The first four bits are just copies of the information bits, e. g. , c 0=i 0. Then produce three parity checking bits c 4, c 5, and c 6 as (additions are in the binary field) – c 4=i 0+i 1+i 2 – c 5=i 1+i 2+i 3 – c 6=i 0+i 1+i 3 • For example, (1, 0, 1, 1) coded to (1, 0, 1, 1, 0, 0, 0). • Is capable of correcting one bit error

Generator matrix • Matrix representation. C=IG where • G is called the generator matrix

Generator matrix • Matrix representation. C=IG where • G is called the generator matrix

Parity check matrix • It can be verified that any CH=(0, 0, 0) for

Parity check matrix • It can be verified that any CH=(0, 0, 0) for all codeword C

Error Correction • What you receive is R=C+E. You multiply R with H: S=RH=(C+E)H=CH+EH=EH.

Error Correction • What you receive is R=C+E. You multiply R with H: S=RH=(C+E)H=CH+EH=EH. S is called the syndrome. If there is only one `1’ in E, S will be one of the rows of H. Because each row is unique, you know which bit in E is `1’. • The decoding scheme is: – Compute the syndrome – If S=(0, 0, 0), do nothing. If S!=(0, 0, 0), output one error bit.

How G is chosen • How G is chosen such that it can correct

How G is chosen • How G is chosen such that it can correct one error? • Any combinations of the row vectors of G has weight at least 3 (having at least three `1’s) – and codeword has weight at least 3. • The sum of any two codeword is still a codeword, so the distance (number of bits that differ) is also at least 3. • So if one bit is wrong, won’t confuse it with other codewords

The existence of H • We didn’t compare a received vector with all codewords.

The existence of H • We didn’t compare a received vector with all codewords. We used H. • The existence of H is no coincidence (need some basic linear algebra!) Let Omega be the space of all 7 -bit vectors. The codeword space is a subspace of Omega spanned by the row vectors of G. There must be a subspace orthogonal to the codeword space spanned by 3 vectors which is the column vectors of H.