DCN Error Detection & Correction

17
ERROR DETECTION & CORRECTION Mr. Rohan Bhatka

description

SYbscit Data Communication & Networking chapter 5 Error Detection & Correction

Transcript of DCN Error Detection & Correction

Page 1: DCN Error Detection & Correction

ERROR DETECTION & CORRECTION

Mr. Rohan Bhatkar

Page 2: DCN Error Detection & Correction

GROUP MEMBERS-

Ayushi Jain

Mayur Sancheti

Mohammed driver

Rohan Bhatkar

Apeksha Mehta

Mohammed Ali Dhaga

Yash Rawani

Page 3: DCN Error Detection & Correction

Introduction To Error Detection And Correction

When a transmission of digital signal takes place between two systems such as computersas shown in given figure. The get contaminated due to the addition of NOISE to it.It is necessary to detect and correct errors because these errors can become a serious threatTo the accuracy of the digital system.

TYPES OF ERRORS-There are two types of errors- 1.CONTENT ERRORS 2.FLOW INTEGRITY ERRORS The content errors are nothing but errors in the content of a message For e.g. ”0” mayReceive as “1“or vice versa. Such errors are introduced due to noise added into the in data signals during its transmission.

Binary signal

Binary signal contaminated by noise

Computer 1 Computer 2

Page 4: DCN Error Detection & Correction

1.SINGLE BIT ERROR2.BURST ERROR

SINGLE BIT ERROR:-• The term single bit error suggests that only one bit in the given data unit such as a byte is in a error.• That means only one bit can be change from 1 to 0 or 0 to 1, as shown in the figure.

BURST ERRORS:-• If two or more bits from a data unit such as byte change from 1 to 0 or from 0 to 1 then burst errors are said to have occurred.• The length of the burst is measured from the first corrupted bit to the last corrupted bit. Some of the bits in between may not have been corrupted.• Burst errors are illustrated in the given figure.

0 1 1 1 0 0 1 1 10 01011 0

1 01 1 1 0 0 11 0001110

Medium

Medium

Transmitted Byte

Transmitted Byte

Received Byte

Received Byte

Error

Errors

Types Of Bit Errors

Page 5: DCN Error Detection & Correction

Important Definitions Related To Codes

Codeword-The Codeword is the encoded block of bits. As already seen it contains message bits & parity or redundant, as shown in given figure.

Code rate-The code rate is defined as the Ratio of the number of message bits(k) to the total number of bits(n) in a codeword.

Code rate (r) = k n

Code efficiency-The Code efficiency is defined as the ratio as the ratio of message bits to the number of transmitted bits per block.

Code efficiency = Code rate = k n

Code word

Data bits Parity bits

Page 6: DCN Error Detection & Correction

Error Detection

When a code word is transmitted, one or more number of transmitted bits will be reserved (0 & 1 or vice versa) due to transmission impairments. Thus the errors will be introduced.It is possible for the receiver to detect these errors if the received codeword (corrupted) is not one of the valid codeword's.When the errors are introduced, the distance between the transmitted & received codeword's will be equal to the number of errors as illustrated in given figure.

Hence to detect the errors at the receiver, the valid codeword's should be separated by a distance of more than 1.Otherwise the incorrect received codeword’s will also become some other valid codeword’s & the error detection will be impossible.

Transmitted code word

10101100 11101011 00100101

Received code word

11101100 01111011 10110001

Number of errors

1 2 3

Distance 1 2 3

errorerrorerror

Page 7: DCN Error Detection & Correction

Error Detection Methods

What is ERROR DECTECTION METHODS?Before thinking of correcting the errors introduced in the data bits is necessary to first detect them.For error detection & correction it is necessary to add some check bit to a block of data bits. These check bits are also known as “Redundant bits” because they do not carry any useful information.Some of the most important error detection methods are as follows-1. Parity Checking.2. Checksum Error Detection.3. Cyclic Redundancy Check (CRC).

Error Detection Methods

Parity Checking Checksum Error Detection Cyclic Redundancy Check (CRC)

Page 8: DCN Error Detection & Correction

PARITY

The simplest technique foe detecting errors is add an extra bit known as PARITY bit to each word being transmitted.As shown in given figure generally the MSB of an 8-bit word is used as the parity bit & the remaining 7 bits are used as data or message bits.

The parity of the 8-bit transmitted word can be either even parity or odd parity.Even Parity means the number of 1’s in the given word including the parity bit should be even (2,4,6,8,…..).Odd Parity means the number of 1’s in the given word including the parity bit should be odd (1,3,5,7,…..).

P d6 d0d5 d4 d3 d2 d1

MSB LSB

7- data bitsParity bits

Page 9: DCN Error Detection & Correction

Two Dimensional Check

When a large number of binary words are being transmitted or received in succession, the resulting collection of bits is considered as a block of data, with rows & columns as shown in given figure.The parity bits are produced for each row & column of such block of data.

The two sets of parity bits so generated are known as:• Longitudinal Redundancy Check (LRC) bits.• Vertical Redundancy Check (VRC) bits.

Page 10: DCN Error Detection & Correction

Cyclic Redundancy Check (CRC)

This is a type of polynomial code in which a bit string is represented in the form of polynomials with coefficient of 0 and 1 only

Polynomial arithmetic uses a modulo-2 arithmetic i.e. addition and subtraction are identical to EXOR.

For CRC code the sender and receiver should agree upon a generator polynomial G(x). A codeword can be generated for a given data word (message) polynomial M(x) with the help of long division.

This technique is more powerful than the parity check and checksum error detection.

CRC is based on binary division. A sequence of redundant bits called CRC or CRC remainder is appended at the end of a data unit such as byte.

The resulting data unit after adding CRC remainder becomes exactly divisible by another predetermined binary number.

At the receiver, this data unit is divided by the same binary number.There is no error if this division does not yield any remainder. But a non-zero

remainder indicates presence of errors in the received data unit.Such an erroneous data unit is then rejected.

Page 11: DCN Error Detection & Correction

Error Correction Technique

Codes are generated by adding a group of parity bits or check bits.The source generates the binary data which is accepted by encoder to add the check bits to them to produce the code words.The check bits are used by decoder to detect and correct the errors.

The encoder adds check bits to the data bits according to the prescribed rule.Decoder uses parity bits to detect and correct errors after separating data and check bits.The data bits are then applied to the destination.

Data source DestinationEncoder Decoder

Data bits Check bits

Data bits Code words Data bits

Page 12: DCN Error Detection & Correction

FEC (Forward Error Correction)

In FEC the receiver searches for the most likely correct code word.When a Error is detected, the distance between the received invalid code word & all the possible valid code words in measured.The nearest valid code word (the one having minimum distance) is the most likely correct version of the received code word as shown in given figure.

In given figure, The valid code word 1 has the minimum distance (1), hence it is the most likely correct code word.

1 1 0 1 1 1 0 0

1 1 1 0 1 1 0 1

1 1 1 1 0 1 0 0

1 1 0 0 1 1 0 0

Distance

Distance

Distance

Received Code Word

Valid Code Word 1

Valid Code Word 2

Valid Code Word 3

1

2

3

Concept of FEC

Page 13: DCN Error Detection & Correction

CRC Checker

The codeword at the receiver of data & CRC.The receiver treats it as one unit & divides it by the same (n+1) bit divider which was used at the transmitter.The reminder of this division is then checked.If the reminder is Zero, then the received codeword is error free & hence should be accepted.Nut non-zero reminder presence of errors hence the corresponding codeword should be rejected.

Data CRC

Received Codeword

Divisor

Reminder

Data CRC

(n+1) bits

If reminder is 0 then no errors.

Page 14: DCN Error Detection & Correction

ARQ Technique (Retransmission)

There are two basic systems of error detection & correction they are•Automatic repeat request (ARQ).•Forward error correction (FEC).

In ARQ system when error is detected, a request is made for the retransmission of that signal.

The points differs ARQ & FEC are:-•In ARQ system less number of check bits (parity bits) are required to be sent. This will increase the (k/n) ratio for an (n,k) block code if transmitted using the ARQ system.•A return transmission path & additional hardware in order to implement repeat transmission of codeword's will be needed.•The bit rate of forward transmission must make allowance for the backward repeat transmission.

Page 15: DCN Error Detection & Correction

Block Diagram of the basic ARQ System

Encoder Input buffer & controller

Forward Transmission

channel

Return Transmission

channel

Output buffer &

Controller

Detector

Feedback path

Feedback channelMessageInput

ACK / NAK

Page 16: DCN Error Detection & Correction

Operations of ARQ System

The encoder produces codeword's for each message signal and its input. Each codeword at the encoder output is stored temporarily and transmitted over the forward transmission channel.

At the destination a decoder will decode the code words and look for errors.

If decoder doesn’t get a error than it is positive (ACK), and if he gets negative than its negative (NAK).

If its NAK than its will return back to “controller” and it will correct the word and pass it back to input buffer.

A word can be retransmitted twice or more no of times.The output will be displayed as the errors are being cleared.

Page 17: DCN Error Detection & Correction

FINISH