Top Banner

of 41

error dection and corection

Apr 08, 2018

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/7/2019 error dection and corection

    1/41

    Error Detection

    and Correction

    Types of Errors

    Detection Correction

  • 8/7/2019 error dection and corection

    2/41

    Basic conceptsBasic concepts

    Networks must be able to transfer data from onedevice to another with complete accuracy.

    Data can be corrupted during transmission.

    For reliable communication, errors must bedetected and corrected.

    Error detection and correction are

    implemented either at the data link layeror the transport layer of the OSI model.

  • 8/7/2019 error dection and corection

    3/41

    Types of Errors

  • 8/7/2019 error dection and corection

    4/41

    Single-bit error

  • 8/7/2019 error dection and corection

    5/41

    Single bit errors are the least likely type oferrors in serial data transmission because the

    noise must have a very short duration which isvery rare. However this kind of errors canhappen in parallel transmission.

    Example:Example:

    If data is sent at 1Mbps then each bit lasts only1/1,000,000 sec. or 1 s.

    For a single-bit error to occur, the noise musthave a duration of only 1 s, which is very rare.

  • 8/7/2019 error dection and corection

    6/41

    Burst error

  • 8/7/2019 error dection and corection

    7/41

  • 8/7/2019 error dection and corection

    8/41

    The term burst errorburst error means that two or

    more bits in the data unit have changed

    from 1 to 0 or from 0 to 1.

    Burst errorsdoes notnecessarilymean that

    the errors occur in consecutive bits, the

    length of the burst is measured from the

    first corrupted bit to the last corrupted bit.

    Some bits in between may not have beencorrupted.

  • 8/7/2019 error dection and corection

    9/41

    Burst error is most likely to happen in serial

    transmission since the duration of noise is normally longer

    than the duration of a bit.The number of bits affected depends on the data rate and

    duration of noise.

    Example:Example:

    If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect

    10 bits.(1/100*1000)

    If same data is sent at rate = 1Mbps then a noise of 1/100 sec can

    affect 10,000 bits.(1/100*106)

  • 8/7/2019 error dection and corection

    10/41

    Error detectionError detection

    Error detection means to decide whether the

    received data is correct or not without having a

    copy of the original message.

    Error detection uses the concept of redundancy,

    which means adding extra bits for detectingerrors at the destination.

  • 8/7/2019 error dection and corection

    11/41

    Error detection uses the concept of

    redundancy, which means adding extra

    bits for detecting errors at the

    destination.

  • 8/7/2019 error dection and corection

    12/41

    Redundancy

  • 8/7/2019 error dection and corection

    13/41

    Four types of redundancy checks are usedFour types of redundancy checks are used

    in data communicationsin data communications

  • 8/7/2019 error dection and corection

    14/41

    Vertical Redundancy Check

    VRC

  • 8/7/2019 error dection and corection

    15/41

    PerformancePerformance

    It can detect single bit error

    It can detect burst errors only if the total

    number of errors is odd.

  • 8/7/2019 error dection and corection

    16/41

    Longitudinal Redundancy Check

    LRC

  • 8/7/2019 error dection and corection

    17/41

    PerformancePerformance

    LCR increases the likelihood of detectingburst errors.

    If two bits in one data units are damaged

    and two bits in exactly the same positions inanother data unit are also damaged, the

    LRC checker will not detect an error.

  • 8/7/2019 error dection and corection

    18/41

    VRC and LRC

  • 8/7/2019 error dection and corection

    19/41

    Cyclic Redundancy Check

    CRC

  • 8/7/2019 error dection and corection

    20/41

    Cyclic Redundancy CheckCyclic Redundancy Check

    Given a k-bit frame or message, thetransmitter generates an n-bit sequence,known as a frame check sequence(FCS), so

    that the resulting frame, consisting of (k+n)bits, is exactly divisible by somepredetermined number.

    The receiver then divides the incomingframe by the same number and, if there isno remainder, assumes that there was noerror.

  • 8/7/2019 error dection and corection

    21/41

    Properties of polynomial

    It is obvious that we cannot choose x (binary 10) or x2

    + x (binary 110) as the polynomial because both aredivisible by x. However, we can choose x + 1 (binary

    11) because it is not divisible by x, but is divisible by x

    + 1. We can also choose x2 + 1 (binary 101) because it

    is divisible by x + 1 (binary division).

  • 8/7/2019 error dection and corection

    22/41

    Binary division in a CRC generator

  • 8/7/2019 error dection and corection

    23/41

    Binary division in CRC checker

  • 8/7/2019 error dection and corection

    24/41

    Polynomial

  • 8/7/2019 error dection and corection

    25/41

    Polynomial and Divisor

  • 8/7/2019 error dection and corection

    26/41

    Standard Polynomials

  • 8/7/2019 error dection and corection

    27/41

    Checksum

  • 8/7/2019 error dection and corection

    28/41

    At the senderAt the sender

    The unit is divided into ksections, each ofn

    bits.

    All sections are added together using onescomplement to get the sum.

    The sum is complemented and becomes the

    checksum.

    The checksum is sent with the data

  • 8/7/2019 error dection and corection

    29/41

    At the receiverAt the receiver

    The unit is divided into ksections, each ofn

    bits.

    All sections are added together using onescomplement to get the sum.

    The sum is complemented.

    If the result is zero, the data are accepted:otherwise, they are rejected.

  • 8/7/2019 error dection and corection

    30/41

    PerformancePerformance

    The checksum detects all errors involving an oddnumber of bits.

    It detects most errors involving an even number of

    bits.If one or more bits of a segment are damaged and the

    corresponding bit or bits of opposite value in a second

    segment are also damaged, the sums of those columns

    will not change and the receiver will not detect aproblem.

  • 8/7/2019 error dection and corection

    31/41

    Suppose the following block of 16 bits is to be sent using achecksum of 8 bits.

    10101001 00111001

    The numbers are added using ones complement10101001

    00111001

    ------------

    Sum 11100010

    Checksum 00011101

    The pattern sent is 10101001 0011100100011101

  • 8/7/2019 error dection and corection

    32/41

    Now suppose the receiver receives the pattern sent in and

    there is no error.

    10101001 00111001 00011101

    When the receiver adds the three sections, it will get all

    1s,which, after complementing, is all 0s and shows that

    there is no error.

    10101001

    00111001

    00011101

    Sum 11111111

    Complement 00000000 means that the pattern is

    OK.

  • 8/7/2019 error dection and corection

    33/41

    Error CorrectionError Correction

    It can be handled in two ways:

    1) receiver can have the sender retransmit the

    entire data unit.

    2) The receiver can use an error-correcting

    code, which automatically corrects certain

    errors.

  • 8/7/2019 error dection and corection

    34/41

    CorrectionCorrection

    Retransmission

    Forward Error Correction

    Burst Error Correction

  • 8/7/2019 error dection and corection

    35/41

    Single-bit error correctionSingle-bit error correctionTo correct an error, the receiver reverses the valueof the altered bit. To do so, it must know which bit

    is in error.

    Number of redundancy bits needed

    Let data bits = m

    Redundancy bits = r

    Total message sent = m+r

    The value of r must satisfy the following relation:

    22rr m+r+1 m+r+1

  • 8/7/2019 error dection and corection

    36/41

    Data and redundancy bitsData and redundancy bits

    Number ofdata bits

    m

    Number ofredundancy bits

    r

    Totalbits

    m + r

    11 2 3

    22 3 5

    33 3 6

    44 3 7

    55 4 9

    66 4 10

    77 4 11

    P iti f d d bit i H i

  • 8/7/2019 error dection and corection

    37/41

    Positions of redundancy bits in Hamming

    code

    R d d bit l l ti

  • 8/7/2019 error dection and corection

    38/41

    Redundancy bits calculation

    Example of redundancy bit calculation

  • 8/7/2019 error dection and corection

    39/41

    Example of redundancy bit calculation

    Error detection using Hamming code

  • 8/7/2019 error dection and corection

    40/41

    Error detection using Hamming code

    Burst error correction example

  • 8/7/2019 error dection and corection

    41/41

    Burst error correction example