Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.

Slides:



Advertisements
Similar presentations
Mahdi Barhoush Mohammad Hanaysheh
Advertisements

Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Cyclic Code.
Error Control Code.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Information and Coding Theory
CSE 461: Error Detection and Correction. Next Topic  Error detection and correction  Focus: How do we detect and correct messages that are garbled during.
II. Linear Block Codes. © Tallal Elshabrawy 2 Last Lecture H Matrix and Calculation of d min Error Detection Capability Error Correction Capability Error.
Chapter 10 Error Detection and Correction
Quantum Error Correction SOURCES: Michele Mosca Daniel Gottesman Richard Spillman Andrew Landahl.
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Practical Session 11 Codes. Hamming Distance General case: The distance between two code words is the amount of 1-bit changes required to reach from one.
Error detection and correction
15-853Page :Algorithms in the Real World Error Correcting Codes I – Overview – Hamming Codes – Linear Codes.
Error Detection and Correction
3F4 Error Control Coding Dr. I. J. Wassell.
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
Hamming Code Rachel Ah Chuen. Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted.
Hamming Codes 11/17/04. History In the late 1940’s Richard Hamming recognized that the further evolution of computers required greater reliability, in.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
Error Detection and Correction
Information Coding in noisy channel error protection:-- improve tolerance of errors error detection: --- indicate occurrence of errors. Source.
British Computer Society
CODING/DECODING CONCEPTS AND BLOCK CODING. ERROR DETECTION CORRECTION Increase signal power Decrease signal power Reduce Diversity Retransmission Forward.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Practical Session 10 Error Detecting and Correcting Codes.
Unit 5 Lecture 2 Error Control Error Detection & Error Correction.
Error Detection and Correction
CS717 Algorithm-Based Fault Tolerance Matrix Multiplication Greg Bronevetsky.
Coding Theory. 2 Communication System Channel encoder Source encoder Modulator Demodulator Channel Voice Image Data CRC encoder Interleaver Deinterleaver.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
DIGITAL COMMUNICATIONS Linear Block Codes
ADVANTAGE of GENERATOR MATRIX:
Linear Block Code 指導教授:黃文傑 博士 學生:吳濟廷
Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY.
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Detection (§3.2.2)
Information Theory Linear Block Codes Jalal Al Roumy.
Computer Science Division
Error Detection and Correction
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
Error Detection and Correction – Hamming Code
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
Error Detection and Correction
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
INFORMATION THEORY Pui-chor Wong.
Hamming Distance & Hamming Code
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer 1. 2 Single-bit error 3 Multiple-bit error 4.
Practical Session 10 Computer Architecture and Assembly Language.
ECE 442 COMMUNICATION SYSTEM DESIGN LECTURE 10. LINEAR BLOCK CODES Husheng Li Dept. of EECS The University of Tennessee.
Channel Coding: Part I Presentation II Irvanda Kurniadi V. ( ) Digital Communication 1.
Reliability of Disk Systems. Reliability So far, we looked at ways to improve the performance of disk systems. Next, we will look at ways to improve the.
Error Detection and Correction
Subject Name: COMPUTER NETWORKS-1
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
Error Detection Bit Error Rate(BER): It is the ratio of number Ne of errors appearing over a certain time interval t to the number Nt of 1 and 0 pulses.
II. Linear Block Codes.
Information Redundancy Fault Tolerant Computing
II. Linear Block Codes.
Error Detection and Correction
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Error Detection and Correction
Chapter 10 Error Detection and Correction
Presentation transcript:

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 we do is, given k data bits, add n-k redundant bits and make it into a n -bit codeword. We 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 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 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 used in many applications. (7,4) Hamming code. Given 4 information bits, (i0,i1,i2,i3), code it into 7 bits C=(c0,c1,c2,c3,c4,c5,c6). The first four bits are just copies of the information bits, e.g., c0=i0. Then produce three parity checking bits c4, c5, and c6 as (additions are in the binary field): – c4=i0+i1+i2 – c5=i1+i2+i3 – c6=i0+i1+i3 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.

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

Error Correction Given this, suppose we receive R=C+E. We 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, we know which bit in E is `1’. The decoding scheme is: – Compute the syndrome. – If S=(0,0,0), do nothing; else output one error bit.

How G is chosen How is G chosen such that it can correct one error? The keys are – First: ANY linear combinations of the row vectors of G has weight at least 3 (having at least three `1’s) ANY codeword is a linear combination of the row vectors So a codeword has weight at least 3. Second: 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 codeword. Because if there is only one bit wrong, the received vector will have one bit difference with the original codeword C0. If it is also only one bit away from another codeword C1, it means that C0 and C1 have at most two bit difference, a contradiction.

Error Detection What if there are 2 error bits? Can the code correct it? Can the code detect it? What if there are 3 error bits? Can the code correct it? Can the code detect it?

Exercise

Answer: (a). The error vector is a codeword.

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 Ω be the space of all 7-bit vectors. The codeword space is a subspace of Ω spanned by the row vectors of G. There must be a subspace orthogonal to the codeword space spanned by 3 vectors. So, we can take these 3 vectors and make them the column vectors of H. Given we have chosen a correct G (can correct 1 error, i.e., any non-zero vector in that space has at least 3 `1’s), any vector with only one `1’ bit or two `1’ bits multiplied with H will result in a non-zero vector.

Performance What is the overhead of the (7,4) Hamming code? How much price do we pay to correct one error bit in seven bits? Is it worth it?

Performance Probability distributions: – Bernoulli: Throw a coin, the probability to see head is p and tail 1-p. – Geometric: Keep throwing coins, the probability of throwing i times until seeing the first head is (1-p) i-1 p where i>0. – Binomial: Throw a total of n times, the probability that seeing head for i times is (n,i)(1-p) n-i p i where (n,i) means n choose i.

Performance Suppose the raw Bit Error Ratio (BER) is What is the BER after decoding the Hamming code? – Assume that if there are more than one bit error in a codeword, all decoded bits are wrong.

Performance Suppose the raw Bit Error Ratio (BER) is What is the BER after decoding the Hamming code? – Assume that if there are more than one bit error in a codeword, all decoded bits are wrong. Look at a codeword. The probability that it has i error bits is (7,i)(1-p) 7-i p i. – The probability that it has no error is The probability that it has one error is In these cases there is no error, with total probability of – In the remaining fraction of the cases, assume all data bits are wrong. – The average error ratio is The (7,4) Hamming code thus reduces the BER by almost two orders of magnitude.

Interleaving The errors in communications do not occur independently. – Independence between two events A and B means that given A happens, we still know nothing more about whether or not B will happen. – Errors are not independent because if one bit is wrong, the probability that the next bit is wrong increases, just as if we know today is raining, the probability that tomorrow will rain increases. But we used the independence assumption in the analysis of the performance!

Interleaving In fact, it is more true to assume the errors occurring in bursts. If errors are in bursts, the (7,4) Hamming code will be useless because – It is unnecessary when there is no error – It cannot correct errors during the error bursts because every codeword will have more than one error bit

Interleaving The solution is simple and neat. The sender will – Encode the data into codewords. – Apply a random permutation on the encoded bits. – Transmit. The receiver will – Apply the reverse of the random permutation. – Decode the codewords. The errors occurred in the channel will be relocated to random locations!

A Useful Website