Docsity

Hamming Code-Wireless Networks-Lecture Slides, Slides of Wireless Networking

Partial preview of the text

Download Hamming Code-Wireless Networks-Lecture Slides and more Slides Wireless Networking in PDF only on Docsity!

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

Last Lecture Review

^ Transmission Errors ^ Parity Check^ ►

Single-bit parity ► 2D parity

^ Cyclic Redundancy Check ^ Block Error Code

5

Example of Error Detection/Correction

C1C2 XORHamming distance = 3Received Codeword (Cr) = 1 0 0 1 1 1 1 0

C1Cr XOR

C2Cr XOR

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

►^ Each bit of syndrome indicates a match (0) or conflict (1)in that bit position

8

Decoding Hamming

Bit Position

Pos. Number

1100 1011 1010 1001

1000

0111 0110

0101

0100 0011

0010

0001

Trans. Block

1^1

^0

Position

Code 10

1010

9

1001

7

0111

6

0110

3

0011

XOR^

0110

Bit Position

Pos. Number

1100 1011 1010 1001

1000

0111 0110

0101

0100 0011

0010

0001

Trans. Block

1^0

^0

1 docsity.com

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

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 (

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

Automatic Repeat Request

^ Mechanism used in data link control and transportprotocols ^ Relies on use of an error detection code (such asCRC) ^ Flow Control ^ Error Control

14

Flow Control

^ Reasons for breaking up a block of data beforetransmitting:^ ►

Limited buffer size of receiver ► Retransmission of PDU due to error requires smalleramounts of data to be retransmitted ► On shared medium, larger PDUs occupy medium forextended period, causing delays at other sending stations

15

Flow Control

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

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

outstanding framess^

^ Use

m -bit sequence numbering

^ If ACK for oldest frame arrives before window isexhausted, we can continue transmitting ^ If window is exhausted, pull back and retransmit alloutstanding frames ^ Alternative: Use timeout

20

A B

fr^

Time

f1^ f^

f3^ f Receiver islooking forR^ =0next

Four frames are outstanding; so go back 4Out-of-sequenceframes

f2^ f3f

f4^ f^

f

Go-Back-N ARQ

AA CCKK 12

AA CCKK 34

AA CCKK 56

Window size long enough to cover round trip time^ A B

Time

f^

f Time-out expires

f1 A C K 1

Stop-and-Wait ARQ

Receiver islooking forR^ =0next

21

Go-Back-N with Timeout

^ Problem with Go-Back-N as presented:^ ►

If frame is lost and source does not have frame tosend, then window will not be exhausted andrecovery will not commence

^ Use a timeout with each frame^ ►

When timeout expires, resend all outstanding frames