Channel Coding and Error Control

Slides:



Advertisements
Similar presentations
Introduction to Information Technologies
Advertisements

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.
Error Detection and Correction
Cellular Communications
Transmission Errors Error Detection and Correction
Chapter 3: Channel Coding (part 1)
Error Detection and Correction
Coding and Error Control
Error Detection and Correction
Lecture 9-10: Error Detection and Correction Anders Västberg Slides are a selection from the slides from chapter 8 from:
Transmission Errors1 Error Detection and Correction.
Chapter 11 Error-Control CodingChapter 11 : Lecture edition by K.Heikkinen.
Error detection and correction
Chapter 2 : Direct Link Networks (Continued). So far... Modulation and Encoding Link layer protocols Error Detection -- Parity Check.
1 CS 6910 – Pervasive Computing Spring 2007 Section 4 (Ch.4): Channel Coding and Error Control Prof. Leszek Lilien Department of Computer Science Western.
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 COMMUNICATION Coding
Error Detection and Correction Rizwan Rehman Centre for Computer Studies Dibrugarh University.
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
Part.7.1 Copyright 2007 Koren & Krishna, Morgan-Kaufman FAULT TOLERANT SYSTEMS Part 7 - Coding.
Copyright © 2003, Dr. Dharma P. Agrawal and Dr. Qing-An Zeng. All rights reserved. 1 Chapter 4 Channel Coding.
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,
Data Link Layer - 1 Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
Data Link Layer: Error Detection and Correction
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
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.
Lecture 3-2: Coding and Error Control (Cont.) ECE
1 Chapter 8. Coding and Error Control Wen-Shyang Hwang KUAS EE.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
Wireless Communication Network Lab. Chapter 4 Channel Coding and Error Control Chih-Cheng Tseng1EE of NIU Prof. Chih-Cheng Tseng
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.
1 Error Detection and Correction Martin Weiss. Slide 2 Objectives of this Meeting u Describe the major error detection techniques u Describe forward error.
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.
1 Kyung Hee University Position of the data-link layer.
Error Detection and Correction
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
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
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.
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.
Channel Coding and Error Control 1. Outline Introduction Linear Block Codes Cyclic Codes Cyclic Redundancy Check (CRC) Convolutional Codes Turbo Codes.
Coding and Error Control
Lecture 4 Error Detecting and Correcting Techniques Dr. Ghalib A. Shah
DATA COMMUNICATION AND NETWORKINGS
DIGITAL COMMUNICATION Coding
Transmission Errors Error Detection and Correction
Coding and Error Control
Transmission Errors Error Detection and Correction
Homework #2 Due May 29 , Consider a (2,1,4) convolutional code with g(1) = 1+ D2, g(2) = 1+ D + D2 + D3 a. Draw the.
Types of Errors Data transmission suffers unpredictable changes because of interference The interference can change the shape of the signal Single-bit.
Chapter 10 Error Detection and Correction
Presentation transcript:

Channel Coding and Error Control Chapter 4 Channel Coding and Error Control

Outline Introduction Block Codes Cyclic Codes CRC (Cyclic Redundancy Check) Convolutional Codes Interleaving Information Capacity Theorem Turbo Codes ARQ (Automatic Repeat Request) Stop-and-wait ARQ Go-back-N ARQ Selective-repeat ARQ

Information to be transmitted Introduction Antenna Transmitter Information to be transmitted Source coding Channel coding Air Modulation Receiver Antenna Information received Source decoding Channel decoding Demodulation

Forward Error Correction (FEC) The key idea of FEC is to transmit enough redundant data to allow receiver to recover from errors all by itself. No sender retransmission required The major categories of FEC codes are Block codes Cyclic codes Reed-Solomon codes (Not covered here) Convolutional codes, and Turbo codes, etc.

Linear Block Codes Information is divided into blocks of length k r parity bits or check bits are added to each block (total length n = k + r) Code rate R = k/n An (n, k) block code is said to be linear if the vector sum of two codewords is a codeword Tradeoffs between Efficiency Reliability Encoding/Decoding complexity All arithmetic is performed using Modulo 2 Addition Decoding: If there are errors in the received signal then we have the received vector c+e where e is the error vector or error pattern which is 1 anywhere an error has occurred. In Minimum-distance or Maximum-likelihood decoding, we compare the received vector with all possible transmitted codes and chose that which is closest in Hamming distance (i.e., which is differs in the fewest bits). This results in a minimum probability of a code word error for the binary symmetric channel.

Linear Block Codes The uncoded k data bits be represented by the m vector: m=(m1, m2, …, mk) The corresponding codeword be represented by the n-bit c vector: c=(c1, c2, …ck, ck+1, …, cn-1, cn) Each parity bit consists of weighted modulo 2 sum of the data bits represented by symbol for Exclusive OR or modulo 2-addition

Linear Block Codes K- data and r = n-k redundant bits

Linear Block Codes: Example Example: Find linear block code encoder G if code generator polynomial g(x)=1+x+x3 for a (7, 4) code; n = total number of bits = 7, k = number of information bits = 4, r = number of parity bits = n - k = 3 I is the identity matrix P is the parity matrix

Linear Block Codes: Example The Generator Polynomial can be used to determine the Generator Matrix G that allows determination of parity bits for a given data bits of m by multiplying as follows: Other combinations of m can be used to determine all other possible code words Data Parity

Linear Block Codes Linear Block Code The block length C of the Linear Block Code is C = m G where m is the information codeword block length, G is the generator matrix. G = [Ik | P]k × n where Pi = Remainder of [xn-k+i-1/g(x)] for i=1, 2, .., k, and I is unit or identity matrix. At the receiving end, parity check matrix can be given as: H = [PT | In-k ], where PT is the transpose of the matrix P.

Linear Block Codes Example: Find linear block code encoder G if code generator polynomial g(x) with k data bits, and r parity bits = n - k  where

Block Codes: Linear Block Codes Parity check matrix HT Code Vector C Null vector 0 Receiver Message vector m Generator matrix G Code Vector C Air Transmitter Operations of the generator matrix and the parity check matrix Consider a (7, 4) linear block code, given by G as Where is an (n-k)-bit parity check vector For convenience, the code vector is expressed as

Block Codes: Linear Block Codes Define matrix HT as Received code vector x = c e, here e is an error vector, the matrix HT has the property

Block Codes: Linear Block Codes The transpose of matrix HT is Where In-k is a n-k by n-k unit matrix and PT is the transpose of parity matrix P. H is called parity check matrix. Compute syndrome as s = x HT =( c  e ) * HT = cHT  eHT = eHT

Linear Block Codes If S is 0 then message is correct else there are errors in it, from common known error patterns the correct message can be decoded. For the (7, 4) linear block code, given by G as For m = [1 0 1 1] and c = mG = [1 0 1 1| 0 0 1]. If there is no error, the received vector x = c, and s = cHT = [0, 0, 0]

Linear Block Codes Let c suffer an error such that the received vector x =c  e =[ 1 0 1 1 0 0 1 ] [ 0 0 1 0 0 0 0 ] =[ 1 0 0 1 0 0 1 ] Then, Syndrome s = xHT This indicates error position, giving the corrected vector as [1011001]

Cyclic Codes It is a block code which uses a shift register to perform encoding and decoding the codeword with n bits is expressed as: c(x)=c1xn-1 +c2xn-2……+ cn where each coefficient ci (i = 1, 2,.., n) is either a 1 or 0 The codeword can be expressed by the data polynomial m(x) and the check polynomial cp(x) as c(x) = m(x) xn-k + cp(x) where cp(x) = remainder from dividing m(x) xn-k by generator g(x)

Cyclic Codes Let m(x) be the data block and g(x) be the polynomial divisor, we have xn-k m(x)/g(x) = q(x) + cp(x) /g(x) The transmitted block is c(x) = xn-k m(x) + cp(x)  c(x) / g(x) = q(x) If there are no errors the division of c(x) by g(x) produces no remainder. If one or more bit errors, then the received block c’(x) will be of the form c’(x) = c(x) + e(x) and the error pattern is detected from known error syndromes s(x) = e(x)/g(x) The syndrome value s(x) only depends on the error bits To be able to correct all single and double bits errors the relationship is (n + n(n-1)/2) ≤ (2n-k – 1)

Cyclic Code: Example Example : Find the codeword c(x) if m(x) = 1 + x + x2 and g(x) = 1 + x + x3, for (7, 4) cyclic code We have n = total number of bits = 7, k = number of information bits = 4, r = number of parity bits = n - k = 3  Then, = 0111010

Cyclic Code: Example Example : Let m(x) = 1 + x + x2 and g(x) = 1 + x + x3, for (7, 4) cyclic code Assume e(x) = 1000000. The received block c’(x) = 1111010 We have s(x) = e(x)/g(x) = x2 + 1. Therefore, s = 101. According to Table 1(b), we have the error pattern 1000000 Now, supposed the received block is 0111011, or c’(x) = x5 +x4 + x3 + x + 1. Find s(x) and the error pattern.

Table 1: A Single-Error-Correcting (7,4) Cyclic Code (a) Table of valid codewords (b) Table of syndromes for single-bit errors Data Block Codeword 0000 0000000 0001 0001011 0010 0010110 0011 0011101 0100 0100111 0101 0101100 0110 0110001 0111 0111010 1000 1000101 1001 1001110 1010 1010011 1011 1011000 1100 1100010 1101 1101001 1110 1110100 1111 1111111 Error pattern E Syndrome S 0000001 001 0000010 010 0000100 100 0001000 011 0010000 110 0100000 111 1000000 101

Cyclic Redundancy Check (CRC) Cyclic redundancy Code (CRC) is an error-checking code The transmitter appends an extra n-k-bit sequence to every frame called Frame Check Sequence (FCS). The FCS holds redundant information about the frame that helps the receivers detect errors in the frame Transmitter: For a k-bit block, transmitter generates an (n-k)-bit frame check sequence (FCS). Resulting frame of n bits is exactly divisible by predetermined number Receiver: Divides incoming frame by predetermined number. If no remainder, assumes no error

Cyclic Redundancy Check (CRC) Generator polynomial is divided into the message polynomial, giving quotient and remainder, the coefficients of the remainder form the bits of final CRC Define: Q – The original frame (k bits) to be transmitted F – The resulting frame check sequence (FCS) of n-k bits to be added to Q (usually n = 8, 16, 32) J – The cascading of Q and F P – The predefined CRC generating polynomial The main idea in CRC algorithm is that the FCS is generated so that J should be exactly divisible by P

Cyclic Redundancy Check (CRC) The CRC creation process is defined as follows: Get the block of raw message Left shift the raw message by n-k bits and then divide it by P Get the remainder R as FCS Append the R to the raw message. The result J is the frame to be transmitted J = Q  xn-k + F (= R) J should be exactly divisible by P Dividing Q  xn-k by P gives Q  xn-k/P = Q + R/P Where R is the reminder J = Q  xn-k + R. This value of J should yield a zero reminder for J/P

Common CRC Codes Code-Parity check bits Generator polynomial g(x) x12 +x11+x3+x2+x+1 CRC-16 x16 +x15+x2+1 CRC-CCITT x16 +x12+x5+1 CRC-32 x32 +x26+x23+x22+x16 +x12+x11+x10+x8+x7+x5+x4+x2+x+1

CRC Using Polynomials All of the following errors are not divisible by a suitably chosen g(x) All single-bit errors, if g(x) has more than one nonzero term All double-bit errors, if g(x) has a factor with three terms Any odd number of errors, as long as g(x) contains a factor (x +1) Any burst errors with length is less than or equal to n – k A fraction of error bursts of length n – k + 1; the fraction equals 1 – 2-(n-k-1) A fraction of error bursts of length greater than n – k + 1; the fraction equals 1 – 2-(n-k)

Convolutional Codes Most widely used channel code Encoding of information stream rather than information blocks Decoding is mostly performed by the Viterbi Algorithm (not covered here) The output constraint length K for a convolution code is defined as K = M + 1 where M is the maximum number of stages in any shift register The code rate r is defined as r = k/n where k is the number of parallel information bits and n is the the number of parallel output encoded bits at one time interval A convolution code encoder with n=2 and k=1 or code rate r = 1/2 is shown next

Convolutional Codes: (n = 2, k = 1, M = 2) Encoder y1 y1 1 Input Output x D1 D1 1 D2 D2 c 1 1 y2 y2 1 1 y1 = x D1 D2 y2 = x D2 D1, D2 - Registers Input x: 1 1 1 0 0 0 … Output y1, y2: 11 01 10 01 11 00 … Input x: 1 0 1 0 0 0 … Output y1, y2: 11 10 00 10 11 00 …

State Diagram 10/1 11 01/0 01/1 10/0 10 01 00/1 11/1 11/0 00 00/0

Tree Diagram …… First input First output … 1 1 0 0 1 … 10 11 11 01 11 00 …… First input 00 First output 00 11 … 1 1 0 0 1 11 10 11 … 10 11 11 01 11 01 10 11 10 00 00 1 01 01 10 11 11 00 01 11 00 10 01 01 01 11 01 10 00 10 01 10

Trellis … 11 0 0 1 10 11 11 01 11 00 00 00 00 00 00 00 00 00 00 00 11 11 11 11 11 11 11 11 10 10 10 10 10 10 … 00 00 00 10 10 10 10 01 01 01 01 01 01 01 01 01 01 01 01 01 11 11 11 11 11 11 10 10 10

Interleaving Input Data Write Interleaving Read Transmitting Data a1, a2, a3, a4, a5, a6, a7, a8, a9, … Input Data Write a1, a2, a3, a4 a5, a6, a7, a8 a9, a10, a11, a12 a13, a14, a15, a16 Interleaving Read Transmitting Data a1, a5, a9, a13, a2, a6, a10, a14, a3, … Through Air a1, a5, a9, a13, a2, a6, a10, a14, a3, … Received Data Read a1, a2, a3, a4 a5, a6, a7, a8 a9, a10, a11, a12 a13, a14, a15, a16 De-Interleaving Write Output Data a1, a2, a3, a4, a5, a6, a7, a8, a9, …

Interleaving (Example) Burst error Transmitting Data 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0,… 0, 1, 0, 0 0, 1, 0, 0 0, 1, 0, 0 1, 0, 0, 0 Read Write De-Interleaving 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, … Output Data Discrete errors

Automatic Repeat Request (ARQ) Source Transmitter Channel Receiver Encoder Transmit Controller Modulation Destination Demodulation Decoder Acknowledge

Stop-And-Wait ARQ (SAW ARQ) Retransmission 1 2 3 3 Transmitting Data Time ACK NAK ACK 1 2 3 Received Data Time Error 1 2 3 Output Data Time ACK: Acknowledge NAK: Negative ACK

Go-Back-N ARQ (GBN ARQ) 1 2 3 4 5 3 4 4 5 6 7 5 Transmitting Data Time NAK NAK 1 2 3 4 5 Received Data Time Error Error 1 2 3 4 5 Output Data Time Sender needs to buffer all the packets have not been acknowledged. Only a buffer of one packet size is needed at the receiver.

Selective-Repeat ARQ (SR ARQ) Transmitting Data 1 Time Received Data NAK Error Retransmission 2 3 4 5 6 7 8 9 Buffer Output Data Receiver needs a large memory to buffer and reorder packets before passing to the upper layer.

Homework Problems: 4.4, 4.7, 4.10, 4.12 Practice in home: 4.1, 4.6, 4.17,4.19, 4.24