Download presentation
Presentation is loading. Please wait.
Published byBrianne Washington Modified over 8 years ago
1
1 Wireless Networks Lecture 5 Error Detecting and Correcting Techniques (Part II) Dr. Ghalib A. Shah
2
2 Outlines Review of previous lecture #3 Block Codes ►Hamming ►BCH ►Reed Solmon ARQ ►Sliding window ►Go-back-N Summary of today’s lecture
3
3 Last Lecture Review Transmission Errors Parity Check ►Single-bit parity ►2D parity Cyclic Redundancy Check Block Error Code
4
4 Hamming Code Designed to correct single bit errors Family of (n, k) block error-correcting codes with parameters: ► Block length:n = 2 m – 1 ► Number of data bits: k = 2 m – m – 1 ► Number of check bits: n – k = m ► Minimum distance: d min = 3 Single-error-correcting (SEC) code ► SEC double-error-detecting (SEC-DED) code
5
5 Example of Error Detection/Correction 1 1 0 1 1 0 0 0 0 1 1 1 0 1 0 C1 C2 XOR Hamming distance = 3 Received Codeword (Cr) = 1 0 0 1 1 1 1 0 1 1 1 0 0 1 1 0 1 0 0 0 C1 Cr XOR 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 C2 Cr XOR
6
6 Hamming Code Process Encoding: k data bits + (n -k) check bits Decoding: compares received (n -k) bits with calculated (n -k) bits using XOR ► Resulting (n -k) bits called syndrome word ► Syndrome range is between 0 and 2 (n-k) -1 ► Each bit of syndrome indicates a match (0) or conflict (1) in that bit position
7
7 Example of Hamming Encode Data = 00111001 Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block xxxX Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 0011 x 100 x 1 xX Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 0011 x 100 x 1 xX Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 0011x100x1XX Check bits 0111 Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 001101001111 PositionCode 10 1010 9 1001 7 0111 3 0011 XOR 0111
8
8 Decoding Hamming Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 001101101111 PositionCode 10 1010 9 1001 7 0111 6 0110 3 0011 XOR 0110 Bit Position 121110987654321 Pos. Number 110010111010100110000111011001010100001100100001 Trans. Block 001101001111
9
9 BCH Codes BCH Discoverer: Bose, Chaudhuri and Hocquenghem. Multiple error correcting codes Generalization of Hamming Code. Flexibility in choice of parameters ► Block length, code rate
10
10 BCH Codes For positive pair of integers m and t, a (n, k) BCH code has parameters: ►Block length: n = 2 m – 1 ►Number of check bits: n – k <= mt ►Minimum distance:d min >= 2t + 1 Correct combinations of t or fewer errors The generator polynomial can be constructed from the factors of (X 2m-1 +1)
11
11 Reed-Solomon Codes Subclass of nonbinary BCH codes Data processed in chunks of m bits, called symbols An (n, k) RS code has parameters: ► Symbol length: m bits per symbol ► Block length: n = 2 m – 1 symbols = m(2 m – 1) bits ► Data length: k symbols ► Size of check code: n – k = 2t symbols = m(2t) bits ► Minimum distance: d min = 2t + 1 symbols
12
12 Automatic Repeat Request Mechanism used in data link control and transport protocols Relies on use of an error detection code (such as CRC) Flow Control Error Control
13
13 Flow Control Assures that transmitting entity does not overwhelm a receiving entity with data Protocols with flow control mechanism allow multiple PDUs in transit at the same time PDUs arrive in same order they’re sent Sliding-window flow control ► Transmitter maintains list (window) of sequence numbers allowed to send ► Receiver maintains list allowed to receive
14
14 Flow Control Reasons for breaking up a block of data before transmitting: ► Limited buffer size of receiver ► Retransmission of PDU due to error requires smaller amounts of data to be retransmitted ► On shared medium, larger PDUs occupy medium for extended period, causing delays at other sending stations
15
15 Flow Control
16
16 Error Control Mechanisms to detect and correct transmission errors Types of errors: ► Lost PDU : a PDU fails to arrive ► Damaged PDU : PDU arrives with errors
17
17 Error Control Requirements Error detection ► Receiver detects errors and discards PDUs Positive acknowledgement ► Destination returns acknowledgment of received, error-free PDUs Retransmission after timeout ► Source retransmits unacknowledged PDU Negative acknowledgement and retransmission ► Destination returns negative acknowledgment to PDUs in error
18
18 Go-Back-N Improve Stop-and-Wait by not waiting! Keep channel busy by continuing to send frames Allow a window of up to W s outstanding frames Use m-bit sequence numbering If ACK for oldest frame arrives before window is exhausted, we can continue transmitting If window is exhausted, pull back and retransmit all outstanding frames Alternative: Use timeout
19
19 ►Frame transmission are pipelined to keep the channel busy ►Frame with errors and subsequent out-of-sequence frames are ignored ►Transmitter is forced to go back when window of 4 is exhausted Go-Back-N ARQ A B fr 0 Time fr 1 fr 2 fr 3 fr 4 fr 5 fr 6 fr 3 ACK1ACK1 out of sequence frames Go-Back-4: 4 frames are outstanding; so go back 4 fr 5 fr 6 fr 4 fr 7 fr 8 fr 9 ACK2ACK2 ACK3ACK3 ACK4ACK4 ACK5ACK5 ACK6ACK6 ACK7ACK7 ACK8ACK8 ACK9ACK9 R next 0 1 2 3 3 4 5 6 7 8 9
20
20 A B fr0 Time f1f2 f3 f0 Receiver is looking for R next =0 Out-of- sequence frames Four frames are outstanding; so go back 4 f2 f3 f1 f4f5f6 Go-Back-N ARQ ACK1ACK1 ACK2ACK2 ACK3ACK3 ACK4ACK4 ACK5ACK5 ACK6ACK6 Window size long enough to cover round trip time A B Time f0 Time-out expires f1 ACK1ACK1 Stop-and-Wait ARQ Receiver is looking for R next =0
21
21 Go-Back-N with Timeout Problem with Go-Back-N as presented: ►If frame is lost and source does not have frame to send, then window will not be exhausted and recovery will not commence Use a timeout with each frame ►When timeout expires, resend all outstanding frames
22
22 Receiver Receive Window R next Frames received Receiver will only accept a frame that is error-free and that has sequence number R next When such frame arrives R next is incremented by one, so the receive window slides forward by one Timer S last S last +1 S recent S last +W s -1 Timer Transmitter... Buffers S last S last +W s -1... Send Window S recent Frames transmitted and ACKed... most recent transmission oldest un- ACKed frame max Seq # allowed Go-Back-N Transmitter & Receiver
23
23 Go-back-N ARQ Acknowledgments ► RR = receive ready (no errors occur) ► REJ = reject (error detected) Contingencies ► Damaged PDU ► Damaged RR ► Damaged REJ
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.