Tải bản đầy đủ (.pdf) (24 trang)

Wireless networks - Lecture 4: Error detecting and correcting techniques

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (452.37 KB, 24 trang )

Wireless Networks

Lecture 4
Error Detecting and Correcting Techniques
Dr. Ghalib A. Shah

1


Outlines







Review of previous lecture #3
Transmission Errors
Parity Check
Cyclic Redundancy Check
Block Error Code
Summary of today’s lecture

2


Last Lecture Review
 Multiplexing
► FDM, TDM


 Transmission Mediums
► Guided media
► Unguided media




Microwave
Radio waves
Infra red

 Propagation modes
► Ground wave propagation
► Sky-wave propagation
► LOS propagation

 Multi-path propagation
 Fading
3


Coping with Transmission Errors
 Error detection codes
► Detects the presence of an error

 Error correction codes, or forward correction codes
(FEC)
► Designed to detect and correct errors
► Widely used in wireless networks


 Automatic repeat request (ARQ) protocols
► Used in combination with error detection/correction
► Block of data with error is discarded
► Transmitter retransmits that block of data

4


Error Detection Process
 Transmitter
► For a given frame, an error-detecting code (check bits) is
calculated from data bits
► Check bits are appended to data bits

 Receiver





Separates incoming frame into data bits and check bits
Calculates check bits from received data bits
Compares calculated check bits against received check bits
Detected error occurs if mismatch

5


Error Detection
Transmitter


Receiver

• Error detection not 100% reliable!
• protocol may miss some errors, but rarely
• larger EDC field yields better detection and correction
6


Parity Checks
Single bit
Even or Odd parity
Only single bit error detection
What about multiple bit errors
Use when probability of bit errors is small and
independent
 Errors are usually clustered together





The ability of receiver to both detect and correct errors
is known as forward error correction (FEC)

7


Examples of parity bit check
Adding parity bit

110001011
110001010
Odd parity errors
110101011
110100011

Odd
Even
error detected
error undetected

8


Two-dimensional parity checks



Generalization of 1-bit
D bits are divided into i rows and j columns.

D1,1

D1,2

… D1,j

D1,j+1

D2,1


D2,2

… D2,j

D2,j+1

.
.
.

.
.
.

… .
… .
… .

.
.
.

Di,1

Di,2

… Di,j

Di,j+1


Di+1,1 Di+1,2 … Di+1,j Di+1,j+1


Receiver can not only detect but correct as well using row,
9
column indices


Example of 2D Odd parity check
 1110010101111010
 Let i =4, j =4
1110
0101
0111
1010
1001
Parity bits

0
1
0
1
1

1110
0001
0111
1010
1001


0
1
0
1
1

Error detection/correction

1110
0011
0111
1010
1001

0
1
0
1
1

Error detection/ no correction

10


Cyclic Redundancy Check (CRC)
 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

 Algorithm
► Generator: Transmitter
and receiver agree on an
r +1 bit pattern P.
► Transmitter chooses r
additional bits to append
with k data bits.
► Which is remainder of d /
P.
► Receiver: if remainder of
D / P is 0 , success
otherwise error

11


CRC using Modulo 2 Arithmetic
 Exclusive-OR (XOR) operation

 Parameters:







T =n-bit frame to be transmitted
D =k-bit block of data; the first k bits of T
F =(n – k)-bit FCS; the last (n – k) bits of T
P =pattern of n–k+1 bits; this is the predetermined divisor
Q =Quotient
R =Remainder

12


CRC using Modulo 2 Arithmetic
 For T/P to have no remainder, start with

T

2

n k

D F

 Divide 2n-k D by P gives quotient and remainder


2n

k

D

P

Q

 Use remainder as FCS

T

2

n k

R
P

D R
13


CRC using Modulo 2 Arithmetic
 Does R  cause T/P have no remainder?

T

P

2n k D R
P

2n k D
P

R
P

 Substituting,

T
P

Q

R
P

R
P

Q

R R
P

Q


► No remainder, so T is exactly divisible by P
14


CRC Example
Let d =10111, P=1001

Q

101011

P
1001

`P(X) =X3 +1

101110000
1001
1010
1001

D

1100
1001
1010
1001
011
T = 10111011


R

15


CRC using Polynomials
 All values expressed as polynomials
► Dummy variable X with binary coefficients

X n kD X
P X
T X

Q X

X n kD X

R X
P X
R X

16


CRC using Polynomials
 Widely used versions of P(X)
► CRC–12



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

17


Wireless Transmission Errors
 Error detection requires retransmission
 Detection inadequate for wireless applications
► Error rate on wireless link can be high, results in a
large number of retransmissions
► Long propagation delay compared to transmission
time

18



Block Error Correction Codes
 Transmitter
► Forward error correction (FEC) encoder maps each
k-bit block into an n-bit block codeword
► Codeword is transmitted; analog for wireless
transmission

 Receiver
► Incoming signal is demodulated
► Block passed through an FEC decoder

19


20


FEC Decoder Outcomes
 No errors present
► Codeword produced by decoder matches original
codeword

 Decoder detects and corrects bit errors
 Decoder detects but cannot correct bit errors;
reports uncorrectable error
 Decoder detects no bit errors, though errors
are present


21


Block Code Principles
 Hamming distance – for 2 n-bit binary sequences, the
number of different bits
► E.g., v1=011011; v2=110001;
► 011011 XOR 110001 =101010
► d(v1, v2)=3

 Redundancy – ratio of redundant bits to data bits
 Code rate – ratio of data bits to total bits
 Coding gain – the reduction in the required E b /N 0 to
achieve a specified BER of an error-correcting coded
system

22


Block Codes
 The Hamming distance d of a Block code is the
minimum distance between two code words
 Error Detection:
► Upto d-1 errors

 Error Correction:
► Upto

d 1
2


23


Example of Block code
 Let k =2, n =5
Data block

Codeword

00
01
10
11

00000
00111
11001
11110

 Suppose we receive 0 0 1 0 0 pattern
 Minimum distance is with codeword 0 0 0 0 0,
so we deduct 0 0 as data bits.

24



×