
Multimedie- och kommunikationssystem, lektion 6 . Kap 6: Fort. digital transmission. Felhantering. Note :. In a single-bit error, only one bit in the data unit has changed. 10.1 Single-bit error. Note :. A burst error means that 2 or more bits in the data unit have changed.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Kap 6: Fort. digital transmission. Felhantering.
In a single-bit error, only one bit in the data unit has changed.
A burst error means that 2 or more bits in the data unit have changed.
Error detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination.
In parity check, a parity bit is added to every data unit so that the total number of 1s is even (or odd for odd-parity).
Suppose the sender wants to send the word world. In ASCII (7-bit code) the five characters are coded as
1110111 1101111 1110010 1101100 1100100
Even parity is used. The following shows the actual bits sent:
11101110 11011110 11100100 11011000 11001001
Now suppose the word world in Example 1 is received by the receiver without being corrupted in transmission.
11101110 11011110 11100100 11011000 11001001
The receiver counts the 1s in each character and comes up with even numbers (6, 6, 4, 4, 4). The data are accepted.
Now suppose the word world in Example 1 is corrupted during transmission.
11111110 11011110 11101100 11011000 11001001
The receiver counts the 1s in each character and comes up with even and odd numbers (7, 6, 5, 4, 4). The receiver knows that the data are corrupted, discards them, and asks for retransmission.
Simple parity check can detect all single-bit errors. It can detect burst errors only if the total number of errors in each data unit is odd.
In two-dimensional parity check, a block of bits is divided into rows and a redundant row of bits is added to the whole block.
Suppose the following block is sent:
10101001 00111001 11011101 11100111 10101010
However, it is hit by a burst noise of length 8, and some bits are corrupted.
1010000000001001 11011101 11100111 10101010
When the receiver checks the parity bits, some of the bits do not follow the even-parity rule and the whole block is discarded.
10100000 00001001 11011101 11100111 10101010
CRC = Cyclic Redundency Check
(Kvot)
0 3
Nominator (Täljare)
5
17
1 7
. 1 5
2
(Nämnare)
Reminder (Rest)
Haltande liknelse med CRC: Om vi subtraherar täljaren (17) med resten (2) vi ett tal som är jämnt delbart med nämnaren (5). Om mottagaren tar emot något som inte är delbart med 5 har sannolikt att bitfel uppstått.
Examples:
1011 XOR 0101 = 1110
1001 XOR 1101 = 0100
0 XOR 0 = 0
0 XOR 1 = 1
1 XOR 0 = 1
1 XOR 1 = 0
10.8Binary division in a CRC generator
The number of 0s is one less than the number of bits in G (divisor)
10.8Binary division in a CRC generator
The first bit in the numerator is 1. Then the first bit in the quotient is 1.
The first bit in the quotient is 1 and one times the divisor results in this
Obtained by XOR-ing 1001 and 1101
10.8Binary division in a CRC generator
Transmitted data: 1 0 0 1 0 0 0 0 1
The transmitted data is 11010110111110
1·x6 + 0·x5 + 1·x4 +0·x3 + 1·x2 + 1·x1 + 0·x0 =
x6 + x4 + x2 + x
It is obvious that we cannot choose x (binary 10), x2 (binary 100), etc, because then the reminder is 0. We cannot chose a polynomial that is divisible by x, for example x2 + x (binary 110). However, we can choose x + 1 (binary 11) because it is not divisible by x, but is divisible by x + 1. We can also choose x2 + 1 (binary 101) because it is divisible by x + 1 (binary division).
n bits
Data bits to be sent CRC bits
How CRC OperatesThe CRC-12
x12 + x11 + x3 + x + 1
which has a degree of 12, will detect all burst errors affecting an odd number of bits, will detect all burst errors with a length less than or equal to 12, and will detect, 99.97 percent of the time, burst errors with a length of 12 or more.
Carry from column 5
ExampleCarry from column 4
Carry from column 3
Carry from column 2
Carry from column 1
Sum
Checksum
Suppose the following block of 16 bits is to be sent using a checksum of 8 bits.
10101001 00111001
The numbers are added using one’s complement
10101001
00111001 ------------Sum 11100010
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
Now suppose the receiver receives the pattern sent in Example 7 and there is no error.
10101001 00111001 00011101
When the receiver adds the three sections, it will get all 1s, which, after complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000means that the pattern is OK.
Now suppose there is a burst error of length 5 that affects 4 bits.
1010111111111001 00011101
When the receiver adds the three sections, it gets
10101111
11111001
00011101
Partial Sum 1 11000101
Carry 1
Sum 11000110
Complement 00111001the pattern is corrupted.
Flow Control (Flödesstyrning)
Error Control (Felhantering)
Necessary when data is being sent faster than it can be processed by receiver to avoid that the receiver’s buffer is overwhelmed.
FEC = Forward Error Correction.
Baseras på felrättande istället för felupptäckande koder.
Kräver ingen backkanal.
Två typer:
Ex:Vid Faltningskod med kodtakt (code rate) 1/3 infogas två redundanta bitar mellan varje bit i nyttomeddelandet. Dessa felrättande bitar beräknas kontinuerligt för varje inkommande bit i nyttomeddelandet.
Ex: I digital-TV-systemet används en s.k. Read Salomon-kod med beteckningen RS(204, 188, 8). Det innebär att nyttoinformationen delas upp i 188 byte stora block. För varje block beräknas en felrättande kod, som läggs till blocket så att blocket blir 204 byte. Redundanden är alltså 204 – 188 = 16 byte. Koden klarar 8 felaktiga byte.
Alternativ 1: Bortkastning av felaktiga paket.
Alternativ 2: ARQ = Automatic Repeat reQuest
= automatisk omsändning av paket vid bitfel, eller om paketet inte når fram.
I fortsättning kommer vi med begreppet ”error control”
eller ”felkontroll” att avse ARQ.
Sliding WindowProtocols
The simplest protocol for error and flow control
How the protocol operates:
ACK n = Acknowledgement. Expecting frame number n
Numbered acknowledgments are needed if an acknowledgment is delayed and the next frame is lost.
The sender window is the the set of frames that may be transmitted before an ACK. It slides when the senderhas received an ACK and sent next frame.
The receiver window is the the set of frames that may be accepted before the buffer is full. While the buffer is full, the receiver sends no ACK. The window of a stuffed receiver slides when the receiver has ”consumed” a frame and thus sent an ACK.
Window size N=3.
Sender
Sender
Receiver
Receiver
Transmission + propagation time for the packet
Frame 0
Frame 0
propa-gation time
Transmission time for the packet
Frame 1
ACK 0
Frame 2
.
.
.
ACK 1
Frame consump-tiondelay
Time
Frame 1
ACK 2
Transmission + propagation time for the ACK
ACK 3
ACK 1
Time
Frame 0
Frame consumptiondelay
ACK 0
.
.
.
.
.
.
Sequence numbers are 1 bit long (0 or 1)
Sequence numbers from 0 to 2m-1. m-bit field for the seq. num.
The window size is 7
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
F0
F1
ACK1
F2
0
1
2
3
4
5
6
7
0
1
2
3
4
5
6
7
0
ACK3
ACK2
F3
F4
ACK5
ACK4
F5
ACK6
Sliding Window Flow ControlN=6
Problems arise when some of the frames are discarded (errors or lost frames). Two strategies are developed to deal with this problem:
The two strategies are trade-offs between bandwidth and data-link buffer space.
In a Stop-and-Wait ARQ system, the bandwidth of the line is 1 Mbps, and 1 bit takes 20 ms to make a round trip. What is the bandwidth-delay product? If the system data frames are 1000 bits in length, what is the utilization percentage of the link?
Solution
The bandwidth-delay product is
1 106 20 10-3 = 20,000 bits
The system can send 20,000 bits during the time it takes for the data to go from the sender to the receiver and then back again. However, the system sends only 1000 bits. We can say that the link utilization is only 1000/20,000, or 5%. For this reason, for a link with high bandwidth or long delay, use of Stop-and-Wait ARQ wastes the capacity of the link.
What is the utilization percentage of the link in Example 1 if the link uses Go-Back-N ARQ with a 15-frame sequence?
Solution
The bandwidth-delay product is still 20,000. The system can send up to 15 frames or 15,000 bits during a round trip. This means the utilization is 15,000/20,000, or 75 percent. Of course, if there are damaged frames, the utilization percentage is much less because frames have to be resent.
Address
Control
Information
FCS
Flag
HDLC Frame Structure0001111111110111100011111011
000111110111101111000111110011
Redundant 0s
Number of bytes in a field
variable
1
1
1
1
1 or 2
2 or 4
Flag
01111110
Flag
01111110
Address
11111111
Control
00000011
Payload
Protocol
CRC