Digital data communication (Error control)

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 Digital Data Communications Techniques.
Data and Computer Communications
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 6 – Digital Data Communications Techniques.
Coding and Error Control
PART III DATA LINK LAYER. Position of the Data-Link Layer.
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.
7/2/2015Errors1 Transmission errors are a way of life. In the digital world an error means that a bit value is flipped. An error can be isolated to a single.
Digital Data Communications Techniques Updated: 2/9/2009.
Error Detection and Correction
1/26 Chapter 6 Digital Data Communication Techniques.
Coding and Error Control
Data and Computer Communications. The Data Link Layer.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Data and Computer Communications Eighth Edition by William Stallings Lecture slides by Lawrie Brown Chapter 6 – Digital Data Communications Techniques.
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.
CSCI 465 D ata Communications and Networks Lecture 9 Martin van Bommel CSCI 465 Data Communications & Networks 1.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
FIT1005 FIT – Monash University
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 6 – Digital Data Communications Techniques.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data and Computer Communications Digital Data Communications Techniques + Error Control+ Digital Data Communications Techniques + Error Control+Multiplexing.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
Error Detection and Correction
Simple Parity Check The simplest form of error detection is the parity check used with ASCII codes, originally on asynchronous modem links Each 7 bit ASCII.
CSE 5345 – Fundamentals of Wireless Networks
1587: COMMUNICATION SYSTEMS 1 Error detection and control
Introduction to Information Technologies
Data and Computer Communications
Data Link Layer.
Error Detection and Correction
Error Detection and Correction (Pengesanan dan Pembetulan ralat)
DATA COMMUNICATION AND NETWORKINGS
Advanced Computer Networks
CIS 321 Data Communications & Networking
Data and Computer Communications
Part III Datalink Layer 10.
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.
William Stallings Data and Computer Communications 7th Edition
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, August 2010.
Data and Computer Communications
Basic concepts Networks must be able to transfer data from one device to another with complete accuracy. Data can be corrupted during transmission. For.
Chapter 7 Error Detection and Correction
EEC-484/584 Computer Networks
Data and Computer Communications
Introduction to Information Technologies
Data and Computer Communications
Coding and Error Control
Error Detection and Correction
Error Detection and Correction
Data Link Layer. Position of the data-link layer.
Presentation transcript:

Digital data communication (Error control) Networks and Communication Department Chapter 6

Lecture Contents Types of Errors. Error Detection. Error Correction. 16-Sep-18 Networks and Communication Department

Types of errors 16-Sep-18 Networks and Communication Department

Types of Error an error occurs when a bit is altered between transmission and reception SINGLE BIT ERRORS only one bit altered caused by white noise BURST ERRORS contiguous sequence of B bits in which first, last and any number of intermediate bits are in error caused by impulse noise or by fading in wireless effect is greater at higher data rates In digital transmission systems, an error occurs when a bit is altered between transmission and reception; that is, a binary 1 is transmitted and a binary 0 is received, or a binary 0 is transmitted and a binary 1 is received. Two general types of errors can occur: single-bit errors and burst errors. A single-bit error is an isolated error condition that alters one bit but does not affect nearby bits. A single-bit error can occur in the presence of white noise, when a slight random deterioration of the signal-to-noise ratio is sufficient to confuse the receiver's decision of a single bit. A burst error of length B is a contiguous sequence of B bits in which the first and last bits and any number of intermediate bits are received in error. Burst errors are more common and more difficult to deal with. Burst errors can be caused by impulse noise, and by fading in a mobile wireless environment. Note that the effects of burst errors are greater at higher data rates.

Error Detection 16-Sep-18 Networks and Communication Department

Error Detection will have errors detect using error- detecting code added by transmitter recalculated and checked by receiver still chance of undetected error Regardless of the design of the transmission system, there will be errors, resulting in the change of one or more bits in a transmitted frame. Error detection is performed by calculating an error-detecting code that is a function of the bits being transmitted. The code is appended to the transmitted bits. The receiver calculates the code based on the incoming bits and compares it to the incoming code to check for errors. A detected error occurs if and only if there is a mismatch. There is a probability that a frame contains errors and that the error-detecting scheme will detect that fact. Also have a residual error rate, being the probability that an error will be undetected despite the use of an error-detecting scheme. The simplest error-detecting scheme is to append a parity bit to the end of a block of data. The value of this bit is selected so that the character has an even number of 1s (even parity) or an odd number of 1s (odd parity). Note, however, that if two (or any even number) of bits are inverted due to error, an undetected error occurs. Typically, even parity is used for synchronous transmission and odd parity for asynchronous transmission. The use of the parity bit is not foolproof, as noise impulses are often long enough to destroy more than one bit, particularly at high data rates.

Error Probability calculation assume that data are transmitted as one or more contiguous sequences of bits, called frames. We define these probabilities with respect to errors in transmitted frames: Pb= Probability a bit is received in error, Bit Error Rate (BER) P1= Probability a frame is received with no error P2= Probability a frame is received with undetected error F = number of bits / frame Then: P1= (1- Pb)F P2= (1- P1)

Error Detection (example) 1. ISDN has 64 Kbps channel (1-minute intervals ) , 1 frame with undetected error per day is expected, (1 frame = 1000 bits), Calculate the number of Frames / day and P2. 2. If actual Pb= 10-6, can we achieve the above P2? Number of frames = 60 * 60 * 24 * 64000 = 5.529 * 10 6 𝑷 𝟐 = 1 / 5.529 * 10 6 = 0.18 * 10 −6 2. 𝑷 𝟏 = ( 1 − 10 −6 ) 1000 = (0.999999) 1000 = 0.999 𝑷 𝟐 = ( 1 – 0.999 ) = 0.001 = 10 −3

Error Detection methods Parity check Cyclic Redundancy Check Checksum Regardless of the design of the transmission system, there will be errors, resulting in the change of one or more bits in a transmitted frame. Error detection is performed by calculating an error-detecting code that is a function of the bits being transmitted. The code is appended to the transmitted bits. The receiver calculates the code based on the incoming bits and compares it to the incoming code to check for errors. A detected error occurs if and only if there is a mismatch. There is a probability that a frame contains errors and that the error-detecting scheme will detect that fact. Also have a residual error rate, being the probability that an error will be undetected despite the use of an error-detecting scheme. The simplest error-detecting scheme is to append a parity bit to the end of a block of data. The value of this bit is selected so that the character has an even number of 1s (even parity) or an odd number of 1s (odd parity). Note, however, that if two (or any even number) of bits are inverted due to error, an undetected error occurs. Typically, even parity is used for synchronous transmission and odd parity for asynchronous transmission. The use of the parity bit is not foolproof, as noise impulses are often long enough to destroy more than one bit, particularly at high data rates.

1. Parity check parity bit set so frame has even number of ones (even parity) or odd number of ones (odd parity). Eg:Suppose that the sender wants to send the word (World) . In ASCII the five characters are coded as : The actual bits sent: The receiver counts the 1’s :(6,6,4,4,4,) the data accepted. The receiver counts the 1’s :(7,6,4,4,4,) the data discarded and ask for retransmission. 16-Sep-18 Networks and Communication Department

1. Parity check Even number of bit errors goes undetected. Eg: 1000111011 ( 6 ones) Suppose 3 bits are changed: 1111111011 (9 ones- odd so error detected) Suppose 2 bits are changed: 1110111011 (8 ones – still even so error not detected) Simple parity can detect all single bit error . It Can detect burst errors only if the total number of errors is odd 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check one of most common and powerful checks for block of k bits, transmitter generates an n-k bit frame check sequence (FCS) Transmits n bits which is exactly divisible by some number receiver divides frame by that number if no remainder, assume no error. One of the most common, and one of the most powerful, error-detecting codes is the cyclic redundancy check (CRC), which can be described as follows. Given a k-bit block of bits, or message, the transmitter generates an (n – k)-bit sequence, known as a frame check sequence (FCS), such that the resulting frame, consisting of n bits, is exactly divisible by some predetermined number. The receiver then divides the incoming frame by that number and, if there is no remainder, assumes there was no error. Can state this procedure in three equivalent ways: modulo 2 arithmetic, polynomials, and digital logic, as detailed in Stallings DCC8e chapter 6.3. Comes down to working out what remainder exists when divide data by desired number, and using that as the FCS value appended to the data to form the block.

2. Cyclic Redundancy Check There are tow ways to CRC : Modulo 2 Arithmetic. Polynomials. One of the most common, and one of the most powerful, error-detecting codes is the cyclic redundancy check (CRC), which can be described as follows. Given a k-bit block of bits, or message, the transmitter generates an (n – k)-bit sequence, known as a frame check sequence (FCS), such that the resulting frame, consisting of n bits, is exactly divisible by some predetermined number. The receiver then divides the incoming frame by that number and, if there is no remainder, assumes there was no error. Can state this procedure in three equivalent ways: modulo 2 arithmetic, polynomials, and digital logic, as detailed in Stallings DCC8e chapter 6.3. Comes down to working out what remainder exists when divide data by desired number, and using that as the FCS value appended to the data to form the block.

2. Cyclic Redundancy Check Modulo 2 Arithmetic 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 FCS, the last (n – k) bits of T. P = pattern of n - k + 1 bits; this is the predetermined divisor. We would like T/P to have no remainder. It should be clear that: T = 𝟐 𝒏−𝒌 * D + F That is, by multiplying D by 2 𝑛−𝑘 we have in effect shifted it to the left by n-k bits and padded out the result with zeroes. 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Modulo 2 Arithmetic 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Modulo 2 Arithmetic 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Modulo 2 Arithmetic 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Polynomial A second way of viewing the CRC process is to express all values as polynomials in a dummy variable X, with binary coefficients. The coefficients correspond to the bits in the binary number. A degree of a polynomial is 1 less than the number of bits in the pattern for D = 110011 we have : D(x) = 𝑥 5 + 𝑥 4 +x+1 . and for P = 11001 we have : P(x) = 𝑥 4 + 𝑥 3 +1. Arithmetic operations are again modulo 2. 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Polynomial Example: For D = 1010001101and P = 110101 find R (FCS) ?. 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Polynomial 16-Sep-18 Networks and Communication Department

2. Cyclic Redundancy Check Polynomial Benefits: Detects all burst errors that affect odd number of bits Detects all burst errors of length less than or equal to degree of the polynomial Detects, with high probability, all burst errors of length greater than the degree of the polynomial Eg: CRC-12 (X12+ X11+X3+X+1) Degree: 12 CRC an detects all burst errors that affects odd number of bits, Detects all burst errors of length less than or equal to 12. Detects all burst errors of length greater than 12 16-Sep-18 Networks and Communication Department

Error Correction 16-Sep-18 Networks and Communication Department

Error Correction correction of detected errors usually requires correct data block to be retransmitted. not appropriate for wireless applications bit error rate is high causing lots of retransmissions when propagation delay long (satellite) compared with frame transmission time, resulting in retransmission of frame in error plus many subsequent frames instead need to correct errors on basis of bits received. Error detection is a useful technique, found in data link control protocols, such as HDLC, and in transport protocols, such as TCP. However, correction of errors using an error-detecting code, requires that block of data be retransmitted. For wireless applications this approach is inadequate 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. With a long data link, an error in a single frame necessitates retransmitting many frames. Instead, it would be desirable to enable the receiver to correct errors in an incoming transmission on the basis of the bits in that transmission. Error correction operates in a fashion similar to error detection but is capable of correcting certain errors in a transmitted bit stream.

Error Correction Process Stallings DCC8e figure 6.7 shows in general how this is done. On the transmission end, each k-bit block of data is mapped into an n-bit block (n > k) called a codeword, using an FEC (forward error correction) encoder. The codeword is then transmitted. During transmission, the signal is subject to impairments, which may produce bit errors in the signal. At the receiver, the incoming signal is demodulated to produce a bit string that is similar to the original codeword but may contain errors. This block is passed through an FEC decoder, with one of four possible outcomes: 1. If there are no bit errors, the input to the FEC decoder is identical to the original codeword, and the decoder produces the original data block as output. 2. For certain error patterns, it is possible for the decoder to detect and correct those errors, the FEC decoder is able to map this block into the original data block. 3. For certain error patterns, the decoder can detect but not correct the errors, the decoder simply reports an uncorrectable error. For certain, typically rare, error patterns, the decoder does not detect that any errors have occurred and maps the incoming data block into a block different from the original.

How Error Correction Works On the transmission end, each k-bit block of data is mapped into an n-bit block (n > k) called a codeword, using an FEC (forward error correction) encoder. The codeword is then transmitted. At the receiver, the incoming signal is demodulated to produce codeword but may contain errors. This block is passed through an FEC decoder, with one of four possible outcomes: In essence, error correction works by adding redundancy to the transmitted message. The redundancy makes it possible for the receiver to deduce what the original message was, even in the face of a certain level of error rate. In this section we look at a widely used form of error-correcting code known as a block error-correcting code. If we wish to transmit blocks of data of length k bits, we map each k-bit sequence into a unique n-bit codeword, which differ significantly from each other. Typically, each valid codeword reproduces the original k data bits and adds to them (n – k) check bits to form the n-bit codeword. Then if an invalid codeword is received, assume the valid codeword is the one that is closest to it, and use the input bit sequence associated with it. The ratio of redundant bits to data bits, (n – k)/k, is called the redundancy of the code, and the ratio of data bits to total bits, k/n, is called the code rate. The code rate is a measure of how much additional bandwidth is required to carry data at the same data rate as without the code. For example, a code rate of 1/2 requires double the transmission capacity of an uncoded system to maintain the same data rate.

How Error Correction Works If there are no bit errors, the input to the FEC decoder is identical to the original codeword, and the decoder produces the original data block as output. For certain error patterns, it is possible for the decoder to detect and correct those errors, the FEC decoder is able to map this block into the original data block. For certain error patterns, the decoder can detect but not correct the errors, the decoder simply reports an uncorrectable error. For certain, typically rare, error patterns, the decoder does not detect that any errors have occurred and maps the incoming data block into a block different from the original. In essence, error correction works by adding redundancy to the transmitted message. The redundancy makes it possible for the receiver to deduce what the original message was, even in the face of a certain level of error rate. In this section we look at a widely used form of error-correcting code known as a block error-correcting code. If we wish to transmit blocks of data of length k bits, we map each k-bit sequence into a unique n-bit codeword, which differ significantly from each other. Typically, each valid codeword reproduces the original k data bits and adds to them (n – k) check bits to form the n-bit codeword. Then if an invalid codeword is received, assume the valid codeword is the one that is closest to it, and use the input bit sequence associated with it. The ratio of redundant bits to data bits, (n – k)/k, is called the redundancy of the code, and the ratio of data bits to total bits, k/n, is called the code rate. The code rate is a measure of how much additional bandwidth is required to carry data at the same data rate as without the code. For example, a code rate of 1/2 requires double the transmission capacity of an uncoded system to maintain the same data rate.

Block Code Principles Hamming distance = difference in # of bits E.g: p = 011011 , q = 110001 ,d (p,q) = 3 Example: We map each k-bit sequence into a unique n-bit codeword Data Code 00 00000 01 00111 10 11001 11 11110 Now, suppose that a codeword block is received with the bit pattern 00100.This is not a valid codeword, and so the receiver has detected an error. # Find the distance between all the valid codes (in pairs) on this slide. d(11001, 00100) = 4 ; d(11110, 00100) = 3 d(00000, 00100) = 1 ; d(00111, 00100) = 2 the valid codeword that is closest to it (minimum distance) is selected

Block Code Principles Received 00100, valid? Can it be corrected? Find distances and the minimum. ‘Select the valid code at the minimum distance’ Received 00100, correct word? More than one minimum distance!!! 01010 (Invalid) => valid 00000 and 11110 ‘Equidistance of 2’ => can detect, not correct

Block Code Principles issue Example : if we have 01010 (Invalid) valid 00000 and 11110 (More than one minimum distance!!!) Receiver has no way to choose between two alternatives. Can always correct a single bit error . but cannot correct double bit error. Received 00100, valid? Can it be corrected? Find distances and the minimum. ‘Select the valid code at the minimum distance’ Received 00100, correct word? More than one minimum distance!!! 01010 (Invalid) => valid 00000 and 11110 ‘Equidistance of 2’ => can detect, not correct

Summary There are two types of errors : single bit error , burst errors. To detect the errors we use CRC process which has two ways : Modulo 2 Arithmetic , polynomial. To correct the errors we use the Hamming distance. 16-Sep-18 Networks and Communication Department

Reference Chapter 6 (6.2 , 6.3 , 6.4). 16-Sep-18 Networks and Communication Department