Download presentation
Presentation is loading. Please wait.
Published byJason Atkins Modified over 9 years ago
1
CSC 535 Communication Networks I Section 3.8 Error Detection and Correction Dr. Cheer-Sun Yang
2
2 Data Link Layer Functions zFraming zError detection and correction zFlow control zError recovery (frame level)
3
3 Error Detection zAdditional bits added by transmitter for error detection code zParity yValue of parity bit is such that character has even (even parity) or odd (odd parity) number of ones yEven number of bit errors goes undetected
4
4 Cyclic Redundancy Check zFor a block of k bits transmitter generates n bit sequence zTransmit k+n bits which is exactly divisible by some number zReceive divides frame by that number yIf no remainder, assume no error yFor math, see Stallings chapter 7
5
5 Error Control zForward Error Correction (FEC): Detection and correction of errors yFEC is appropriate when a return channel is not available, retransmission requests are not easily accommodated, or retransmission is not efficient. zAutomatic repeat request (ARQ) yError detection yPositive acknowledgment yRetransmission after timeout yNegative acknowledgement and retransmission
6
6 Error Control Techniques zParity checking - a single bit error detection zInternet checksum zpolynomial codes (cyclic redundency checking) - single bit error correction and multiple bit error detection
7
7 Automatic Repeat Request (ARQ) zStop-and-wait ARQ zGo-Back-N ARQ zSelective Repeat ARQ ( also known as selective reject or selective retransmission)
8
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks8 Channel Encoder User information Pattern Checking All inputs to channel satisfy pattern/condition Channel output Deliver user information or set error alarm Figure 3.49
9
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks9 Calculate check bits Channel Recalculate check bits Compare Information bits Received information bits Check bits Information accepted if check bits match Received check bits Figure 350
10
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks10 x = codewordso = non-codewords x x x x x x x o o o o o o o o o o o o x x x x x x x o o o o o o o o o o o o A code with poor distance properties A code with good distance properties (a) (b) Figure 3.51
11
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks11 1 0 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 0 1 1 1 Bottom row consists of check bit for each column Last column consists of check bits for each row Figure 3.52
12
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks12 1 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 Two errors One error Three errors Four errors Arrows indicate failed check bits Figure 3.53
13
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks13 Figure 3.54
14
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks14 Addition: Multiplication: Division: x 3 + x + 1 ) x 6 + x 5 x 3 + x 2 + x x 6 + x 4 + x 3 x 5 + x 4 + x 3 x 5 + x 3 + x 2 x 4 + x 2 x 4 + x 2 + x x = q(x) quotient = r(x) remainder divisor dividend 35 ) 122 3 105 17 Figure 3.55
15
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks15 Steps: 1) Multiply i(x) by x n-k (puts zeros in (n-k) low order positions) 2) Divide x n-k i(x) by g(x) 3) Add remainder r(x) to x n-k i(x) (puts check bits in the n-k low order positions): quotient remainder transmitted codeword b(x) = x n-k i(x) + r(x) x n-k i(x) = g(x) q(x) + r(x) Figure 3.56
16
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks16 Generator polynomial: g(x)= x 3 + x + 1 Information: (1,1,0,0) i(x) = x 3 + x 2 Encoding: x 3 i(x) = x 6 + x 5 1011 ) 1100000 1110 1011 1110 1011 1010 1011 010 x 3 + x + 1 ) x 6 + x 5 x 3 + x 2 + x x 6 + x 4 + x 3 x 5 + x 4 + x 3 x 5 + x 3 + x 2 x 4 + x 2 x 4 + x 2 + x x Transmitted codeword: b(x) = x 6 + x 5 + x b = (1,1,0,0,0,1,0) Figure 3.57
17
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks17 reg 0reg 1reg 2 ++ Encoder for clockinputreg 0reg 1reg 2 0- 000 11=i 3 100 21=i 2 110 30=i 1 011 40=i 0 111 50101 60100 70010 check bits:r 0 = 0r 1 = 1r 2 = 0 r(x) = x Figure 3.58
18
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks18 b(x) e(x) R(x) + (Receiver) (Transmitter) Error pattern Figure 3.59
19
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks19 1. Single errors:e(x) = x i 0 i n-1 If g(x) has more than one term, it cannot divide e(x) 2. Double errors: e(x) = x i + x j 0 i < j n-1 = x i (1 + x j-i ) If g(x) is primitive, it will not divide (1 + x j-i ) for j-i 2 n-k 1 3. Odd number of errors:e(1) =1 If number of errors is odd. If g(x) has (x+1) as a factor, then g(1) = 0 and all codewords have an even number of 1s. Figure 3.60
20
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks20 4. Error bursts of length b: 0000110 0001101100 0 e(x) = x i d(x) where deg(d(x)) = L-1 g(x) has degree n-k; g(x) cannot divide d(x) if deg(g(x))> deg(d(x)) xL = (n-k) or less: all will be detected xL = (n-k+1): deg(d(x)) = deg(g(x)) i.e. d(x) = g(x) is the only undetectable error pattern, fraction of bursts which are undetectable = 1/2 L-2 xL > (n-k+1): fraction of bursts which are undetectable = 1/2 n-k L ith position error pattern d(x) Figure 3.61
21
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks21 b e r + (receiver) (transmitter) error pattern b e r + (receiver) (transmitter) error pattern (a) Single bit input (b) Vector input Figure 3.62
22
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks22 00100000010000 s = H e = = 101101 single error detected 01001000100100 s = H e = = + = 011011 double error detected 100100 1 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 11100001110000 s = H e = = + + = 0 110110 triple error not detected 011011 101101 1 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 0 1 111111 Figure 3.63
23
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks23 s = H r = He s = 0 no errors in transmission undetectable errors correctable errors uncorrectable errors (1-p) 7 7p37p3 1-3p 3p3p 7p7p 7p(1-3p)21p 2 Figure 3.64
24
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks24 If d min = 2t+1, non-overlapping spheres of radius t can be drawn around each codeword; t=2 in the figure b1b1 b2b2 oooo set of all n-tuples within distance t set of all n-tuples within distance t Figure 3.66
25
Copyright 2000 McGraw-Hill Leon-Garcia and Widjaja Communication Networks25 b1b1 b2b2 b3b3 b4b4 b L- 3 b L- 2 b L- 1 bLbL... L codewords written vertically in array; then transmitted row by row b1b1 b2b2 b3b3 b4b4 b L-3 b L-2 b L-1 bLbL... A long error burst produces errors in two adjacent rows Figure 3.66
26
26 Required Reading zSection 3.8
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.