Title: Errors, Error Detection, and Error Control
1Data CommunicationsRoosevelt University Roger
Clery
- Chapter 6
- Errors, Error Detection, and Error Control
2ERRORAny unwanted signalAny rem val or
attenuation of a signalAny unwanted chhaangee in
a signal
3 Objectives
- After reading this chapter, you should be able
to - Identify the different types of noise commonly
found in computer networks - Specify the different error-prevention
techniques, and be able to apply an
error-prevention technique to a type of noise - Compare the different error-detection techniques
in terms of efficiency and efficacy
4 Objectives (continued)
- Perform simple parity and longitudinal parity
calculations, and enumerate their strengths and
weaknesses - Cite the advantages of cyclic redundancy
checksum, and specify what types of errors cyclic
redundancy checksum will detect - Differentiate between the three basic forms of
error control, and describe the circumstances
under which each may be used
5 Objectives (continued)
- Follow an example of Stop-and-wait ARQ, Go-back-N
ARQ, and Selective-reject ARQ
6 Introduction
- Noise is always present
- If a communications line experiences too much
noise - Signal will be lost or corrupted
- Communication systems should check for
transmission errors - Once an error is detected, a system may perform
some action - Some systems perform no error control, but simply
let the data in error be discarded
7 Noise and Errors White Noise
- Also known as thermal or Gaussian noise
- Relatively constant
- Can be reduced
- If white noise gets to strong
- Can completely disrupt signal
8 White Noise (continued)
There is something fundementaly wrong with
diagram B C
9Real Noise
10 Impulse Noise
- One of the most disruptive forms of noise
- Random spikes of power
- Can destroy one or more bits of information
- Difficult to remove from an analog signal
- May be hard to distinguish from original signal
- Impulse noise can damage more bits if the bits
are closer together (transmitted at a faster rate)
11 Impulse Noise (continued)
12 Impulse Noise (continued)
13 Crosstalk
- Unwanted coupling between two different signal
paths - For example, hearing another conversation while
talking on the telephone - Relatively constant
- Can be reduced with proper measures
14 Crosstalk (continued)
15 Echo
- The reflective feedback of a transmitted signal
as the signal moves through a medium - Most often occurs on coaxial cable
- If echo bad enough, it could interfere with
original signal - Relatively constant
- Can be significantly reduced
16 Echo (continued)
17 Jitter
- The result of small timing irregularities during
transmission of digital signals - Occurs when a digital signal is repeated over and
over - If serious enough, jitter forces systems to slow
down their transmission - Steps can be taken to reduce jitter
18 Jitter (continued)
19Real Jitter
20 Delay Distortion and Attenuation
- Delay Distortion - occurs because the velocity of
propagation of a signal through a medium varies
with the frequency of the signal - Can be reduced
- Attenuation - the continuous loss of a signals
strength as it travels through a medium
21 Error Prevention
- To prevent errors from happening, several
techniques may be applied - Proper shielding of cables to reduce interference
- Telephone line conditioning or equalization
- Replacing older media and equipment with new,
possibly digital components - Proper use of digital repeaters and analog
amplifiers - Observe the stated capacities of the media
22 Error Prevention (continued)
23 Error Detection
- Despite best prevention techniques, errors may
still occur - To detect an error, error detection code has to
be added to the data/signal - Lets examine two basic techniques for detecting
errors - Parity checking
- Cyclic redundancy checksum
24 Parity Checks
- Simple parity - If performing even parity, add a
parity bit such that an even number of 1s is
maintained - If performing odd parity, add a parity bit such
that an odd number of 1s is maintained - For example, send 1001010 using even parity
- For example, send 1001011 using even parity
25 Parity Checks (continued)
- What happens if the character 10010101 is sent
and the first two 0s accidentally become two 1s? - Thus, the following character is received
11110101 - Will there be a parity error?
- Problem Simple parity only detects odd numbers
of bits in error
26 Longitudinal Parity
- Longitudinal parity
- Adds parity bit to each character
- Then adds row of parity bits after a block of
characters - Row of parity bits is actually a parity bit for
each column of characters - Row parity bits plus column parity bits add a
great amount of redundancy to a block of
characters
27 Longitudinal Parity (continued)
28 Longitudinal Parity (continued)
29 Parity Checks (continued)
- Both simple parity and longitudinal parity do not
catch all errors - Simple parity only catches odd numbers of bit
errors - Longitudinal parity is better at catching errors
- But requires too many check bits added to a block
of data - We need a better error detection method
- What about cyclic redundancy checksum?
30 Cyclic Redundancy Checksum (CRC)
- CRC error detection method treats packet of data
to be transmitted as a large polynomial - Transmitter
- Using polynomial arithmetic, divides polynomial
by a given generating polynomial - Quotient is discarded
- Remainder is attached to the end of message
31 Cyclic Redundancy Checksum (continued)
- Message (with the remainder) is transmitted to
the receiver - Receiver divides the message and remainder by
same generating polynomial - If a remainder not equal to zero results ? error
during transmission - If a remainder of zero results ? error during
transmission
32 Cyclic Redundancy Checksum (continued)
33 Error Control
- Once an error is detected, what is the receiver
going to do? - Do nothing
- Return an error message to the transmitter
- Fix the error with no further help from the
transmitter
34 Error Control (continued)
- Do nothing
- Seems like a strange way to control errors
- Some newer systems such as frame relay perform
this type of error control - Return a message has three basic formats
- Stop-and-wait ARQ
- Go-back-N ARQ
- Selective-reject ARQ
35 Stop-and-wait ARQ
- Simplest error control protocol
- A transmitter sends a frame then stops and waits
for an acknowledgment - If a positive acknowledgment (ACK) is received,
the next frame is sent - If a negative acknowledgment (NAK) is received,
the same frame is transmitted again
36 Stop-and-wait ARQ (continued)
37 Go-back-N ARQ
- Go-back-N ARQ and selective reject are more
efficient protocols - They assume that multiple frames are in
transmission at one time (sliding window) - A sliding window protocol allows transmitter to
send up to the window size frames before
receiving any acknowledgments - When a receiver does acknowledge receipt, the
returned pack contains the number of the frame
expected next
38 Sliding Window Protocol
39 Go-back-N ARQ (continued)
- Using the go-back-N ARQ protocol, if a frame
arrives in error, the receiver can ask the
transmitter to go back to the Nth frame and
retransmit it - After the Nth frame is retransmitted, the sender
resends all subsequent frames
40 Selective-reject ARQ
- Most efficient error control protocol
- If a frame is received in error, the receiver
asks transmitter to resend ONLY the frame that
was in error - Subsequent frames following the Nth frame are not
retransmitted
41 Selective-reject ARQ (continued)
42 Selective-reject ARQ (continued)
43 Selective-reject ARQ (continued)
44 Selective-reject ARQ (continued)
45 Correct the Error
- For a receiver to correct the error with no
further help from the transmitter requires a
large amount of redundant information
accompanying original data - This redundant information allows the receiver to
determine the error and make corrections - This type of error control is often called
forward error correction
46 Error Detection in Action
- Asynchronous transfer mode (ATM) incorporates
many types of error detection and error control - ATM inserts a CRC into the data frame (the cell),
which checks only the header and not the data - This CRC is also powerful enough to perform
simple error correction on the header - A second layer of ATM applies a CRC to the data,
with varying degrees of error control
47 Summary
- Noise in computer networks
- Error-prevention techniques
- Simple parity and longitudinal parity
calculations - Cyclic redundancy checksum
- Three forms of error control
- Stop-and-wait ARQ, Go-back-N ARQ and
Selective-reject ARQ
48 FEC - no feedback channel - quality paid by
redundantbits
- used in ARQ as in TCP/IP - feedback
channel - retransmissions - quality paid by delay
Taxonomy of Coding
- Makes bits equal probable
- Strives to utilize channel capacity by adding
extra bits
- for baseband communications - RX
synchronization - Spectral shaping for BW
requirements - error detection
- Secrecy/ Security - Encryption (DES)
- Redundancy removal - Destructive (jpeg,
mpeg) - Non-destructive (zip)
FEC Forward Error Correction ARQ Automatic
Repeat Request DES Data Encryption Standard
49Block Interleaving
- In fading channels received data can experience
burst errors that destroy large number of
consecutive bits. This is harmful for channel
coding - Interleaving distributes burst errors along data
stream - A problem of interleaving is introduced extra
delay - Example below shows block interleaving
Received interleaved data
1 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 0 1
1 0 0 0 1 1 1 0 1 0 1 1 1 0 0 0 1 1 0 0 1
Block deinterleaving
Recovered data
1 0 0 0 1 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1
50Detect Error On Credit Card
51Formula for detecting error
Let d2, d4, d6, d8, d10, d12, d14, d16 be all the
even values in the credit card number. Let d1,
d3, d5, d7, d9, d11, d13, d15 be all the odd
values in the credit card number. Let n be the
number of all the odd digits which have a value
that exceeds four Credit card has an error if the
following is true (d1 d3 d5 d7 d9 d11
d13 d15) x 2 n (d2 d4 d6 d8 d10
d12 d14 d16) 0 mod(10)
52Detect Error On Credit Card
n 3
d1
d2
d3
d15
d16
53Now the test
(4 4 8 1 3 5 7 9) 41 (5 2 1
0 3 4 6 8) x 2 3 61 41 61 102
mod (10) 2
3
54Credit Card Summary
The test performed on the credit card number is
called a parity check equation. The last digit is
a function of the other digits in the credit
card. This is how credit card numbers are
generated by Visa and Mastercard. They start with
an account number that is 15 digits long and use
the parity check equation to find the value of
the 16th digit. This method allows computers to
detect 100 of single-position errors and about
98 of other common errors (For All Practical
Purposes p. 354).
55The purpose of error correcting codes
- A message can become distorted through a wide
range of unpredictable errors. - Humans
- Equipment failure
- Lighting interference
- Scratches in a magnetic tape
56Encoding
Naïve approach Hamming codes
57Why error-correcting code?
- To add redundancy to a message so the original
message can be recovered if it has been garbled. - e.g. message 10
- code 1010101010
58Send a message
Message
Encoder
Channel
Decoder
Message
10
101010
noise
001010
10
59Take Naïve approach
Append the same message multiple times. Then take
the value with the highest average.
Message 1001 Encode 1001100110011001 Channe
l 1001100100011001 Decode a1
Average(1,1,0,1) 1 a2 Average(0,0,0,0)
0 ... (a1,a2,a3,a4) Message 1001
60Hamming 7,4 Code
The seven is the number of digits that make the
code. E.g. 0100101 The four is the number of
information digits in the code. E.g. 0100101
61Diagram of Hamming CodeUsing Odd Parity
62Hamming Code with DataP1 protects D1, D2 and D3
63Practice Hamming 1
64Practice Hamming 1
65Practice Hamming 2
66Practice Hamming 2
67Remember !
- Hamming Code finds errors
- Hamming Code lets you fix errors without
retransmission - Hamming code has lots of overhead so only use
when retransmission is difficult (Its only
0.57142857142857 efficient)
68Hamming 7,4 Encoding
Encoded with a generator matrix. All codes can be
formed from row operations on matrix. The code
generator matrix for this presentation is the
following
69Hamming 7,4 Codes
1000011 0100101 0010110 0001111 1100110 1010101 1
001100 0110011 0101010 0011001 1101001 1001010 111
1111 0111100 0011001 0000000
Codes Possible codes
70Minimum Weight Theorem
Definitions Proof of Theorem
71Definitions
The weight of a code is the number of nonzero
components it contains. e.g. wt(0010110) 3 The
minimum weight of Hamming codes is the weight of
the smallest nonzero vector in the code. e.g.
d(G) 3
72Definitions
The distance between two codes u and v is the
number of positions which differ e.g.
u(1,0,0,0,0,1,1) v(0,1,0,0,1,0,1) dist(u,v)
4 Another definition of distance is wt(u v)
dist(u,v).
73END 6