Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,

Slides:



Advertisements
Similar presentations
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Advertisements

Data and Computer Communications
Reliability & Channel Coding
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Transmission Errors Error Detection and Correction
Chapter 3: Channel Coding (part 1)
Chapter 10 Error Detection and Correction
Coding and Error Control
Lecture 9-10: Error Detection and Correction Anders Västberg Slides are a selection from the slides from chapter 8 from:
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Digital Data Communications Techniques Updated: 2/9/2009.
Error Detection and Correction
1/26 Chapter 6 Digital Data Communication Techniques.
Chapter 10 Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
Transmission Errors Error Detection and Correction
Data link layer: services
Coding and Error Control
Channel Coding and Error Control
Coding and Error Control
Data and Computer Communications. The Data Link Layer.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
British Computer Society
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
Data and Computer Communications
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer: Error Detection and Correction
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Lecture 3-2: Coding and Error Control (Cont.) ECE
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1. Error Detection Techniques:
1 Chapter 8. Coding and Error Control Wen-Shyang Hwang KUAS EE.
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, October 2011.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
Error Detection and Correction
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 6 – Digital Data Communications Techniques.
Error Detection and Correction
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Data can be corrupted during transmission. Some applications require that errors be detected and.
Error Detection. Data can be corrupted during transmission. Some applications require that errors be detected and corrected. An error-detecting code can.
Error Detection and Correction
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 PART III: DATA LINK LAYER ERROR DETECTION AND CORRECTION 7.1 Chapter 10.
1/30/ :20 PM1 Chapter 6 ─ Digital Data Communication Techniques CSE 3213 Fall 2011.
Coding and Error Control
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Network Layer4-1 Chapter 5: The Data Link Layer Our goals: r understand principles behind data link layer services: m error detection, correction m sharing.
Part III: Data Link Layer Error Detection and Correction
Powerpoint Templates Computer Communication & Network Week # 10.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
CSE 5345 – Fundamentals of Wireless Networks
Advanced Computer Networks
Digital data communication (Error control)
Chapter 10 Error Detection And Correction
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.
Chapter 7 Error Detection and Correction
Coding and Error Control
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.
Presentation transcript:

Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall, 2002.

2  Diversity makes use of redundancy in terms of using multiple signals to improve signal quality.  Error control coding, as discussed in this lecture and next, uses redundancy by sending extra data bits to detect and correct bit errors.  Two types of coding in wireless systems (see beginning of Lecture 7) Source coding – compressing a data source using encoding of information Channel coding – encode information to be able to overcome bit errors  Now we focus on channel coding, also called error control coding to overcome the bit errors of a channel.

3 I. Error Detection  Three approaches can be used to cope with data transmission errors. 1. Using codes to detect errors. 2. Using codes to correct errors – called Forward Error Correction (FEC). 3. Mechanisms to automatically retransmit (ARQ) corrupted packets.

4  Bit errors and Packet Errors. Given the following definitions:  P b = probability of a single bit error  P 1 = probability that a frame of F bits arrives with no errors   P 2 = probability that a frame arrives with one or more errors 

5  Example: F = 500 bytes (4000 bits) P b = (a very good performing wireless link) P 1 = ( ) 4000 = P 2 = 1-( ) 4000 = out of every 1000 packets have errors At 100 kbps, this means 6 packets per minute are in error. Given 100 kilobyte data files: 200 packets per file Probability that the file is corrupted is 1- (1- P 1 ) 200 = 0.551

6  If we do nothing, then a significant amount of our data will be corrupted It is more likely that a complete file would be transmitted with corruption than without corruption.

7  Error Detection Basic Idea: Add extra bits to a block of data bits.  Data block: k bits  Error detection: n-k more bits Based on some algorithm for creating the extra bits.  Results in a frame (data link layer packets are called “frames”) of n bits

8  Parity Check Simplest scheme: Add one bit to the frame. The value of the bit is chosen so as to make the number of 1’s even (or odd, depending on the type of parity). Example  7 bit character:  Even parity would make an 8 bit character of what?  Odd parity would make an 8 bit character of what?

9 The receiver separates the data bits and the error correction bits.  Then performs the same algorithm again to see of the received bits are what they should have been.  Hopefully if errors have occurred, the packet can be retransmitted or corrected.  “Hopefully” because there are always some error patterns could go undetected.

10  So, this can be used to detect errors. For example, a received (when using even parity) would be invalid. But what types of errors would NOT be detected?  Noise sometimes comes in impulses or during a deep fade – so one cannot assume individual bit errors will occur. Parity checks, therefore, have limited usefullness.

11  Cyclic Redundancy Check (CRC) Uses more than a single parity bit.  Adds an (n-k) bit frame check sequence.

12  Takes the source data and creates a sequence of bits that is only valid if divisible by a predetermined number. Using modulo-2 arithmetic.  Binary addition with no carries.  The same as the exclusive-OR operations (XOR).  Also can be implemented by polynomial operations.

13  Using the following definitions. T = n-bit frame to be transmitted. D = k-bit block of data, or message, the first k bits of T F = (n-k)-bit frame check sequence, the last (n-k) bits of T P = pattern of n-k+1 bits; this is the predetermined divisor.  The goal is for T/P to have no remainder. So, T = 2 n-k D + F  This means D is shifted by (n-k) bits and F is added to it.  Example: D = 11111, F=101  T = =

14 Suppose we divide 2 n-k D by P  Q is the quotient and R is the remainder. So, we can make our frame check sequence F = R  So, T = 2 n-k D + R  Then  In modulo-2, any number added to itself is zero, so R/P + R/P = 0  The result is a division with no remainder.

15

16

17  Using polynomial operations. In the example, P = This could also be represented as a polynomial as P(X) = X 5 + X 4 + X 2 +1  From bit positions in P of order 0 to 5. Using polynomial operations indirectly performs modulo-2 arithmetic.  CRC codes fail when a sequence of bit errors creates a different bit sequence that is also divisible by P.

18  It can be shown that the following errors can be prevented by suitably chosen values for P, and the related P(X). All single bit errors will be detected. All double-bit errors. Any odd number of errors. Any burst error for which the length of the burst is less than or equal to (n-k)  This means the burst is less than the frame check sequence.  A burst error is a contiguous set of bits where all of the bits are in error.

19  Four versions of P(X) are widely used, in different bit lengths. For example, CRC-16. P(X) = X 16 + X 15 + X 2 +1  Checksums The Internet Protocol uses a checksum approach.  Only on the packet header information.  All of the 16-bit words in the header are added together.  A checksum is then inserted into to the header.  At the receiver, all of the 16-bit words are added again, and this time (because the checksum was inserted) should sum to zero.

20 II. Block Error Correction Codes  Error detection requires blocks to be retransmitted. This is inadequate for wireless communication for two reasons. 1. The bit error rate on a wireless link can be quite high, which would result in a large number of retransmissions. 2. In some cases, especially satellite links, the propagation delay is very long compared to the transmission time of a single frame. The result is a very inefficient system.

21  It is desirable to be able to correct errors without requiring retransmission. Using the bits that were transmitted.

22  On transmission, the k-bit block of data is mapped into an n-bit block called a _____________. Using an FEC (____________________) encoder.  A codeword may or may not be similar to those form the CRC approach above.  It may come from taking the original data and adding extra bits (as with CRC).  Or it may be created using a completely new set of bits. The codewords are longer than the original data. Then the block is transmitted.

23  At the receiver, comparing the received codeword with the set of valid codewords can result in one of five possible outcomes 1. There are no bit errors  The received codeword is the same as the transmitted codeword.  The corresponding source data for that codeword is output from the decoder. 2. An error is detected and can be corrected  For certain bit error patterns, it is clear that the received codeword is close to a valid codeword.  It is assumed that the closeby codeword was sent.  It is assumed that the source data for that codeword should be used.

24 3. An error is detected but cannot be corrected. The received codeword is close to two or more valid codewords. One cannot assume which codeword was the original. So, it is decided only that an error has been detected and the frame should be retransmitted. 4. An error is not detected. An error pattern occurs that transforms the transmitted codeword into another valid codeword. The receiver assumes no error has occurred. The output from the decoder is the source data for a wrong codeword. Hopefully other application processes will also check the validity of the data.

25 5. An error is detected and is erroneously corrected. An error pattern creates a new codeword that is close to a valid codeword. But the one it is close to is not the one that was sent. Therefore, the decoder outputs the source data for a wrong codeword.

26  Block Code Principles Hamming Distance  Given are two example sequences. v 1 = , v 2 =  The Hamming Distance is defined as the number of bits which disagree. d(v 1, v 2 ) = 3

27  Example: Given k = 2, n = 5 Suppose the following is received:  This is not a valid codeword.  An error is detected

28  Can the error be corrected? We cannot be sure. 1, 2, 3, 4, or even 5 bits may have been corrupted by noise. However, only one bit is different between this and d(00100,00000) = 1 Two bits changes would have been required between this and d(00100,00111) = 2 Three bits with d(00100,11110) = 3 And four bits with d(00100,11001) = 4

29  Thus the most likely codeword that was sent is The output from the decoder is then the data block 00. But there we could be having a failed correction and some other data block should have been decoded.  Decoding rule: Use the closest codeword (in terms of Hamming distance).  Why is it okay to do this? How much less likely are two errors than one error? Assume BER =

30  Now, for all cases… There are five bits in the codeword, so there are 2 5 =32 possible received codewords.  Four are valid, the other 28 would come from bit errors.  See next page In many cases, a possible received codeword is a Hamming distance of 1 from a valid codeword.

31

32  But in eight cases, a received codeword would be a distance of 2 away from two valid codewords. The receiver does not know how to choose. A correction decision is undecided. An error is detected but not correctable.  So, we can conclude that in this case an error of 1 bit is correctable, but not errors of two bits.

33  Block code design With an (n, k) code, there are 2 k valid codewords out of a possible 2 n codewords.  The ratio of redundant data bits, (n-k)/k, is called the ______________ of the code.  The ratio of k/n is called the ____________. For example, a ½ rate code carries double the bandwidth of the encoded system for the same net data rate. ½ of the bits are for error control purposes.

34  Example: A 2/5 rate code over a 30 kbps channel. Net data rate? Data rate for error control codes?

35  For a code consisting of codewords denoted w i, the minimum Hamming distance is defined as  For the example: v 1 = , v 2 = , d min = 3. The maximum number of guaranteed correctable errors is  The symbol means to round down to the next lowest integer.

36  From the example, t corr = (3-1)/2 = 1 bit error can be corrected. A two-bit error will cause either an undecided correction or a failed correction.  The number of errors that can be detected is  From the example, t det = 3-1 = 2 All two-bit errors will be detected. As little as a three bit error might cause a failed detection.

37  The following design considerations are involved with devising codewords. For values of n and k, we would like the largest possible value of d min. The code should be relatively easy to encode and decode, with minimal memory and processing time. We would like the number of extra bits, (n-k) to be _____ to preserve bandwidth. We would like the number of extra bits, (n-k) to be _____ to reduce error rate.  The last two objectives are in conflict.

38  Coding Gain Coding can allow us to use lower power (smaller E b /N 0 ) to achieve the same error rate we would have had without using correction bits.  Since errors can be corrected. The curve below on the right is for an uncoded modulation system.  Above 5.4 dB, a smaller bit error rate can be achieved using a ½ rate code for the same E b /N 0

39

40  The coding gain of a code is defined as the reduction in dB of E b /N 0 that is required to obtain the same error rate. For example, for a BER of 10 -6, 11 dB is needed for the ½ rate code, as compared to dB without the coding. This is a coding gain of 2.77 dB. What is the coding gain at a BER of ?  Next lecture: Second part of correction codes Design of specific block codes Convolutional code