UNIT-5 CHANNEL CODING.

Slides:



Advertisements
Similar presentations
Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Advertisements

10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
NETWORKING CONCEPTS. ERROR DETECTION Error occures when a bit is altered between transmission& reception ie. Binary 1 is transmitted but received is binary.
Chapter 10 Error Detection and Correction
PART III DATA LINK LAYER. Position of the Data-Link Layer.
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Error Detection and Correction
3F4 Error Control Coding Dr. I. J. Wassell.
Chapter 10 Error Detection and Correction
Rutvi Shah1 ERROR CORRECTION & ERROR DETECTION Rutvi Shah2 Data can be corrupted during transmission. For reliable communication, errors must be detected.
Shashank Srivastava Motilal Nehru National Institute Of Technology, Allahabad Error Detection and Correction : Data Link Layer.
Channel Coding and Error Control
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.
PART III DATA LINK LAYER. Position of the Data-Link Layer.
British Computer Society
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Cyclic Redundancy Check CRC Chapter CYCLIC CODES Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword.
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
Channel Coding Binit Mohanty Ketan Rajawat. Recap…  Information is transmitted through channels (eg. Wires, optical fibres and even air)  Channels are.
CHAPTER 3: DATA LINK CONTROL Flow control, Error detection – two dimensional parity checks, Internet checksum, CRC, Error control, Transmission efficiency.
Error Detection.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
Data Communications and Networking
Hamming Distance & Hamming Code
Transmission Errors Error Detection and Correction.
Error Control Coding. Purpose To detect and correct error(s) that is introduced during transmission of digital signal.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
10.1 Types of Errors 10.2 Detection 10.3 Error Correction.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
Error Detection and Correction
CSE 5345 – Fundamentals of Wireless Networks
ERROR DETECTION AND CORRECTION
Data Link Layer.
Part III. Data Link Layer
Error Detection and Correction
Error Detection and Correction (Pengesanan dan Pembetulan ralat)
Subject Name: COMPUTER NETWORKS-1
Communication Networks: Technology & Protocols
DATA COMMUNICATION AND NETWORKINGS
Advanced Computer Networks
CIS 321 Data Communications & Networking
Part III Datalink Layer 10.
Data Link Layer.
Digital data communication (Error control)
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.
EEC4113 Data Communication & Multimedia System Chapter 5: Error Control by Muhazam Mustapha, August 2010.
Packetizing Error Detection
Packetizing Error Detection
PART III Data Link Layer.
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
Transmission Errors Error Detection and Correction
Packetizing Error Detection
Coding and Error Control
Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Error Detection and Correction
Transmission Errors 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.
Data Link Layer. Position of the data-link layer.
Chapter 10 Error Detection and Correction
Presentation transcript:

UNIT-5 CHANNEL CODING

CONVOLUTION CODES Convolutional codes map information to code bits sequentially by convolving a sequence of information bits with “generator” sequences. A convolutional encoder encodes K information bits to N>K code bits at one time step . Convolutional codes can be regarded as block codes for which the encoder has a certain structure such that we can express the encoding operation as convolution.

TYPES OF ERRORS

Single bit errors are the least likely type of errors in serial data transmission because the noise must have a very short duration which is very rare. However this kind of errors can happen in parallel transmission. Example: If data is sent at 1Mbps then each bit lasts only 1/1,000,000 sec. or 1 μs. For a single-bit error to occur, the noise must have a duration of only 1 μs, which is very rare.

BURST ERROR

The term burst error means that two or more bits in the data unit have changed from 1 to 0 or from 0 to 1. Burst errors does not necessarily mean 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 been corrupted.

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: 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)

ERROR 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 detecting errors at the destination. Make sense of message.

REDUNDANCY

Four Types Of Redundancy Checks Are Used In Data Communications

VERTICAL REDUNDANCY CHECK VRC

PERFORMANCE It can detect single bit error It can detect burst errors only if the total number of errors is odd.

LONGITUDINAL REDUNDANCY CHECK LRC

PERFORMANCE LCR increases the likelihood of detecting burst errors. If two bits in one data units are damaged and two bits in exactly the same positions in another data unit are also damaged, the LRC checker will not detect an error.

VRC and LRC

CYCLIC REDUNDANCY CHECK CRC

CYCLIC REDUNDANCY CHECK Given a k-bit frame or message, the transmitter 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 some predetermined number. The receiver then divides the incoming frame by the same number and, if there is no remainder, assumes that there was no error.

Binary Division

Checksum

At the sender The unit is divided into k sections, each of n bits. All sections are added together using one’s complement to get the sum. The sum is complemented and becomes the checksum. The checksum is sent with the data

At the receiver The unit is divided into k sections, each of n bits. All sections are added together using one’s complement to get the sum. The sum is complemented. If the result is zero, the data are accepted: otherwise, they are rejected.

PERFORMANCE The checksum detects all errors involving an odd number 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 a problem.

Error Correction It can be handled in two ways: receiver can have the sender retransmit the entire data unit. The receiver can use an error-correcting code, which automatically corrects certain errors.

Single-bit error correction To correct an error, the receiver reverses the value of 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: 2r ≥ m+r+1

ERROR CORRECTION

HAMMING CODE

HAMMING CODE

Hamming Code

Example of Hamming Code

Single-bit error

Error Detection

PARITY CHECK CODES information bits transmitted = k bits actually transmitted = n = k+1 Code Rate R = k/n = k/(k+1) Error detecting capability = 1 Error correcting capability = 0

CYCLIC CODES Special case of Linear Block Codes Cyclic shift of a codeword is also a codeword Easy to encode and decode, Can correct continuous bursts of errors CRC (used in Wireless LANs), BCH codes, Hamming Codes, Reed Solomon Codes (used in CDs)

CONVOLUTIONAL CODES Block codes require a buffer Example k = 1 n = 2 Rate R = ½

CONVOLUTIONAL CODES Encoder consists of shift registers forming a finite state machine Decoding is also simple – Viterbi Decoder which works by tracking these states First used by NASA in the voyager space programme Extensively used in coding speech data in mobile phones

ERROR CONTROL CODING Extra bits are added to the data at the transmitter (redundancy) to permit error detection or correction at the receiver Done to prevent the output of erroneous bits despite noise and other imperfections in the channel The positions of the error control coding and decoding are shown in the transmission model

ERROR MODELS Many other types Burst errors, i.e., contiguous bursts of bit errors output from DFE (error propagation) common in radio channels Insertion, deletion and transposition errors We will consider mainly random errors

Forward Error Correction (FEC) Coding designed so that errors can be corrected at the receiver Appropriate for delay sensitive and one-way transmission (e.g., broadcast TV) of data Two main types, namely block codes and convolutional codes. We will only look at block codes

ERROR CONTROL TECHNIQUES Error detection in a block of data Can then request a retransmission, known as automatic repeat request (ARQ) for sensitive data Appropriate for Low delay channels Channels with a return path Not appropriate for delay sensitive data, e.g., real time speech and data

Forward Error Correction (FEC)

Forward error correction (FEC) or channel coding is a technique used for controlling errors in data transmission over unreliable or noisy communication channels. The central idea is the sender encodes the message in a redundant way by using an error-correcting code (ECC). FEC gives the receiver the ability to correct errors without needing a reverse channel to request retransmission of data, but at the cost of a fixed, higher forward channel bandwidth. FEC is therefore applied in situations where retransmissions are costly or impossible, such as one-way communication links and when transmitting to multiple receivers in multicast. FEC information is usually added to mass storage devices to enable recovery of corrupted data, and is widely used in modems.

FEC processing in a receiver may be applied to a digital bit stream or in the demodulation of a digitally modulated carrier. Many FEC coders can also generate a bit-error rate (BER) signal which can be used as feedback to fine-tune the analog receiving electronics. The noisy-channel coding theorem establishes bounds on the theoretical maximum information transfer rate of a channel with some given noise level. The maximum fractions of errors or of missing bits that can be corrected is determined by the design of the FEC code.

Automatic Repeat Request (ARQ) Automatic Repeat reQuest (ARQ), also known as Automatic Repeat Query, is an error-control method for data transmission that uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service. If the sender does not receive an acknowledgment before the timeout, it usually re-transmits the frame/packet until the sender receives an acknowledgment or exceeds a predefined number of re-transmissions. The types of ARQ protocols include Stop-and-wait ARQ Go-Back-N ARQ Selective Repeat ARQ All three protocols usually use some form of sliding window protocol to tell the transmitter to determine which (if any) packets need to be retransmitted.

BLOCK CODES Data is grouped into blocks of length k bits (dataword) Each dataword is coded into blocks of length n bits (codeword), where in general n>k This is known as an (n,k) block code A vector notation is used for the datawords and codewords, Dataword d = (d1 d2….dk) Codeword c = (c1 c2……..cn) The redundancy introduced by the code is quantified by the code rate, Code rate = k/n i.e., the higher the redundancy, the lower the code rate

Block Code - Example Data word length k = 4 Codeword length n = 7 This is a (7,4) block code with code rate = 4/7 For example, d = (1101), c = (1101001)

Error Control Process Decoder gives corrected data May also give error flags to Indicate reliability of decoded data Helps with schemes employing multiple layers of error correction

PARITY CODES Example of a simple block code – Single Parity Check Code In this case, n = k+1, i.e., the codeword is the dataword with one additional bit For ‘even’ parity the additional bit is, For ‘odd’ parity the additional bit is 1-q That is, the additional bit ensures that there are an ‘even’ or ‘odd’ number of ‘1’s in the codeword

Parity Codes – Example 1 Even parity (i) d=(10110) so, c=(101101)

PARITY CODES – EXAMPLE 2 Coding table for (4,3) even parity code Dataword Codeword

PARITY CODES To decode Code can detect single errors Calculate sum of received bits in block (mod 2) If sum is 0 (1) for even (odd) parity then the dataword is the first k bits of the received codeword Otherwise error Code can detect single errors But cannot correct error since the error could be in any bit For example, if the received dataword is (100000) the transmitted dataword could have been (000000) or (110000) with the error being in the first or second place respectively Note error could also lie in other positions including the parity bit.

HAMMING DISTANCE Error control capability is determined by the Hamming distance The Hamming distance between two codewords is equal to the number of differences between them, e.g., 10011011 11010010 have a Hamming distance = 3 Alternatively, can compute by adding codewords (mod 2) =01001001 (now count up the ones)

HAMMING DISTANCE The Hamming distance of a code is equal to the minimum Hamming distance between two codewords If Hamming distance is: 1 – no error control capability; i.e., a single error in a received codeword yields another valid codeword XXXXXXXX is a valid codeword Note that this representation is diagrammatic only. In reality each codeword is surrounded by n codewords. That is, one for every bit that could be changed

HAMMING DISTANCE If Hamming distance is: 2 – can detect single errors (SED); i.e., a single error will yield an invalid codeword XOXOXO X is a valid codeword O in not a valid codeword See that 2 errors will yield a valid (but incorrect) codeword

HAMMING DISTANCE The maximum number of detectable errors is That is the maximum number of correctable errors is given by, where dmin is the minimum Hamming distance between 2 codewords and means the smallest integer

LINEAR BLOCK CODES parity bits n-k (=1 for Parity Check) Message m = {m1 m2 … mk} Transmitted Codeword c = {c1 c2 … cn} A generator matrix Gkxn

LINEAR BLOCK CODES Linearity Example : 4/7 Hamming Code k = 4, n = 7 4 message bits at (3,5,6,7) 3 parity bits at (1,2,4) Error correcting capability =1 Error detecting capability = 2

LINEAR BLOCK CODES If there are k data bits, all that is required is to hold k linearly independent code words, i.e., a set of k code words none of which can be produced by linear combinations of 2 or more code words in the set. The easiest way to find k linearly independent code words is to choose those which have ‘1’ in just one of the first k positions and ‘0’ in the other k-1 of the first k positions.

LINEAR BLOCK CODES For example for a (7,4) code, only four codewords are required, e.g., So, to obtain the codeword for dataword 1011, the first, third and fourth codewords in the list are added together, giving 1011010 This process will now be described in more detail

An (n,k) block code has code vectors d=(d1 d2….dk) and c=(c1 c2……..cn) The block coding process can be written as c=dG where G is the Generator Matrix

Thus, ai must be linearly independent, i.e., Since codewords are given by summations of the ai vectors, then to avoid 2 datawords having the same codeword the ai vectors must be linearly independent. Sum (mod 2) of any 2 codewords is also a codeword, i.e., Since for datawords d1 and d2 we have;

So, 0 is always a codeword, i.e., Since all zeros is a dataword then,

DECODING LINEAR CODES One possibility is a ROM look-up table In this case received codeword is used as an address Example – Even single parity check code; Address Data 000000 0 000001 1 000010 1 000011 0 ……… . Data output is the error flag, i.e., 0 – codeword ok, If no error, dataword is first k bits of codeword For an error correcting code the ROM can also store datawords.