23
EE 576 – Error Control Coding (142) 1 Lec 01 King Fahd University of Petroleum and Minerals Electrical Engineering Department Dr. Suhail Al-Dharrab Office: 59-0012-05 Office Hours: Sun, Tue: 13:00-13:50 Mon,Wed: 11:00-11:50 or by appointment E-mail: [email protected], Tel: 8210

EE576_Lec_01

Embed Size (px)

DESCRIPTION

error control and coding book for castello

Citation preview

Page 1: EE576_Lec_01

EE 576 – Error Control Coding (142)1 Lec 01

King Fahd University of Petroleum and MineralsElectrical Engineering Department

Dr. Suhail Al-DharrabOffice: 59-0012-05Office Hours: Sun, Tue: 13:00-13:50

Mon,Wed: 11:00-11:50 or by appointmentE-mail: [email protected], Tel: 8210

Page 2: EE576_Lec_01

EE 576 – Error Control Coding (142)2

Lecture Outline

• Basics of error control coding

• Coding gain

• Hamming bound

• Gilbert bound

Lec 01

Page 3: EE576_Lec_01

EE 576 – Error Control Coding (142)3

Communication System

Lec 01

Page 4: EE576_Lec_01

EE 576 – Error Control Coding (142)4

Error Control Coding

• What is error control?

Detecting/Correcting errors in digital data

• How?

By adding redundancy to the information sequence (encoding)

and utilize it to catch the errors (decoding)

• Why?

Enhance the reliability of the system

Lec 01

Page 5: EE576_Lec_01

EE 576 – Error Control Coding (142)5

Binary Repetition Codes

Ex: Consider a (3,1) Binary Repetition Code over BinarySymmetric Channel (BSC)

Coding Rule: 0 => 000 1 => 111If received sequence: 011. What was transmitted?

Scenario A: 111 with one error in 1st locationScenario B: 000 with two errors in 2nd & 3rd locations.

Maximum Likelihood Decoding (MLD):ScenarioA 1ScenarioB 1ScenarioA ScenarioB (for 0.5)

Decoding decision: 011 => 111Lec 01

Page 6: EE576_Lec_01

EE 576 – Error Control Coding (142)6

Post-Decoding Probability of Error

• (3,1) repetition code can correct single errors.

Block Error Probability 32 1 3

3 1 1 1 3 1

• In general for a -error correcting code:

1

Bit error probability [for the (3,1) code, ]

Improvement: For a BSC with 10 , 3 10 .

Cost: Expansion in bandwidth.

Lec 01

Page 7: EE576_Lec_01

EE 576 – Error Control Coding (142)7

Coding Gain

• Coding gain is the reduction in / required to achieve aspecific BER for a coded system compared to uncodedsystem.

• For fair comparison, / of the coded system must bescaled by the rate of the code (or equivalently reduced by10 log 1/ dB), to ensure the same energy per informationbit for both systems.

Ex: For DPSK 0.5 exp / .When coding is introduced, / drops by a factor of

We should calculate 0.5 exp / , then evaluateas a function of ′. Now it is fair to compare and .

Lec 01

Page 8: EE576_Lec_01

EE 576 – Error Control Coding (142)8

Graphical Illustration

• Plot the curve of the uncodedsystem (A)

• Shift it to the right by 10log 1/ .(B). This is the BER of the codedsystem before decoding, at thesame energy per information bit.

• Use the values of BER on (B) tofind error rate after decoding (C).

• Compare A and C for code gain.• Asymptotic gain: gain at large

/• 4-5 dB gain is typical. Some codes

provide up to 9 dB.

Lec 01

A

BC

Eb/N0

BER

G

Page 9: EE576_Lec_01

EE 576 – Error Control Coding (142)9

Hamming Distance

Lec 01

Def: The Hamming distance between two codewords and

, denoted by , , is the number of components (bits) at

which they differ.

011,000 2

011,111 1

Therefore 011 is closer to 111.

• Maximum Likelihood Decoding (MLD) reduces to Minimum

Distance Decoding.

Page 10: EE576_Lec_01

EE 576 – Error Control Coding (142)10

Geometrical Illustration

Lec 01

000

111

001

011

101100

110

010

Page 11: EE576_Lec_01

EE 576 – Error Control Coding (142)11

Error Correction and Detection

Lec 01

• Consider a code consisting of two codewords withHamming distance .

How many errors can be detected?How many errors can be corrected?

• Number of errors that can be detected 1

• Number of errors that can be corrected

• In other words, for -error correction, we must have

2 1

Page 12: EE576_Lec_01

EE 576 – Error Control Coding (142)12

Error Correction and Detection

Lec 01

Ex: A binary code of two codewords and 5

• It can correct two errors

or

• It can detect four errors

or

• It can correct one error and detect two more errors.

• In general: 2 1

Page 13: EE576_Lec_01

EE 576 – Error Control Coding (142)13

Minimum Distance of a Code

Lec 01

Def: The minimum distance of a code C is the minimum

Hamming distance between any two different codewords.

min , ∀ and in

• A code with minimum distance can correct all error

patterns up to and including -error patterns, where

2 1

It may be able to correct some higher error patterns, but not

all.

Page 14: EE576_Lec_01

EE 576 – Error Control Coding (142)14

(7,4) Binary Code

Lec 01

No. Message Codeword No. Message Codeword0 0000 0000000 8 0001 10100011 1000 1101000 9 1001 01110012 0100 0110100 10 0101 11001013 1100 1011100 11 1101 00011014 0010 1110010 12 0011 01000115 1010 0011010 13 1011 10010116 0110 1000110 14 0111 00101117 1110 0101110 15 1111 1111111

Page 15: EE576_Lec_01

EE 576 – Error Control Coding (142)15

Coding: Gain and Cost

Lec 01

• Given an , code.

- Gain is proportional to the error correction capability, .

- Cost is proportional to the number of check digits, .

• Given a sequence of information digits, it is desired to

add as few check digits ( ) as possible to correct as many

errors ( ) as possible.

What is the relation between these code parameters?

Page 16: EE576_Lec_01

EE 576 – Error Control Coding (142)16

Hamming Bound

Lec 01

• For an , code, there are 2 codewords and 2 possible

received words.

• Think of the 2 codewords as centers of spheres in an -

dimensional space.

• All received words that differ from codeword in or less

positions lie within the sphere of center and radius .

• For the code to be -error correcting (i.e. all t-error pattern

for any codeword transmitted can be corrected), all

spheres , 1, . . , 2 , must be disjoint.

Page 17: EE576_Lec_01

EE 576 – Error Control Coding (142)17

Hamming Bound

Lec 01

• In other words, when a codeword is selected, none of the

-bit sequences that differ from that codeword by or less

locations can be selected as a codeword.

• Consider the all-zero codeword. The number of words thatdiffer from this codeword by locations (bits) is

• The total number of words in any sphere (including thecodeword at the center) is

1

Page 18: EE576_Lec_01

EE 576 – Error Control Coding (142)18

Hamming Bound

Lec 01

• The total number of -bit sequences that must be availablefor the code to be a -error correcting code is

2

• But, the total number of sequences is 2n. Therefore,

2 2

or

2

Page 19: EE576_Lec_01

EE 576 – Error Control Coding (142)19

Hamming Bound

Lec 01

• This bound is known as the Hamming (sphere-packing)Bound. It provides a necessary, but not a sufficient,condition for the existence of an , -error correctingcode.

Ex: Is it theoretically possible to design a (10,7) single-errorcorrecting code?

100

101 1 10 11 2

It is not possible.

• A code for which the equality is satisfied is called a perfectcode.

Page 20: EE576_Lec_01

EE 576 – Error Control Coding (142)20

Gilbert Bound

Lec 01

• It provides the sufficient condition for the existence of a, code with .

12 2

Ex: What are the values of that are guaranteed to exist for asingle-error-correcting code of 10.Gilbert bound requires 5. A (10,5) code with 3does exist.Hamming bound requires 6. A (10,7) code with 3does not exist. The (10,6) code with 3, according to

the two bounds,may or may not exist. It is found to exist.

Page 21: EE576_Lec_01

EE 576 – Error Control Coding (142)21

The Encoding Problem

Lec 01

• How to select 2k codewords of the code C from the 2n

sequences such that some specified (or possibly themaximum possible) minimum distance of the code isguaranteed?

Ex: How were the 16 codewords of the (7,4) codeconstructed? Exhaustive search is impossible, except for veryshort codes (small k and n).

• How would the 2k n-bit codewords be assigned to the 2k k-bit information sequences?

Are we going to store the whole table of 2k(n+k) entries?!• A constructive procedure for encoding is necessary.

Page 22: EE576_Lec_01

EE 576 – Error Control Coding (142)22

The Decoding Problem

Lec 01

Standard Array

0000000  1101000  0110100  1011100  1110010  0011010  1000110  0101110  1010001  0111001  1100101  0001101  0100011  1001011  0010111  1111111

0000001  1101001  0110101  1011101  1110011  0011011  1000111  0101111  1010000  0111000  1100100  0001100  0100010  1001010  0010110  1111110

0000010  1101010  0110110  1011110  1110000  0011000  1000100  0101100  1010011  0111011  1100111  0001111  0100001  1001001  0010101  1111101

0000100  1101100  0110000  1011000  1110110  0011110  1000010  0101010  1010101  0111101  1100001  0001001  0100111  1001111  0010011  1111011

0001000  1100000  0111100  1010100  1111010  0010010  1001110  0100110  1011001  0`10001  1101101  0000101  0101011  1000011  0011111  1110111

0010000  1111000  0100100  1001100  1100010  0001010  1010110  0111110  1000001  0101001  1110101  0011101  0110011  1011011  0000111  1101111

0100000  1001000  0010100  1111100  1010010  0111010  1100110  0001110  1110001  0011001  1000101  0101101  0000011  1101011  0110111  1011111

1000000  0101000  1110100  0011100  0110010  1011010  0000110  1101110  0010001  1111001  0100101  1001101  1100011  0001011  1010111  0111111

Exhaustive decoding is impossible!!

Well-constructed decoding methods are required.

Page 23: EE576_Lec_01

EE 576 – Error Control Coding (142)23

The Course is About …

Lec 01

• Design/Find good codes, driven by the “Noisy Channel

Coding Theorem”

There exist codes of rate R that have arbitrarily small decodingerror probability (provided that R is less than the channelcapacity)

• Propose encoder and decoder circuits and algorithms

• Evaluate the performance of the code