1 / 91

Multimedie- och kommunikationssystem, lektion 6

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.

matia
Télécharger la présentation

Multimedie- och kommunikationssystem, lektion 6

An Image/Link below is provided (as is) to download presentation 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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multimedie- och kommunikationssystem, lektion 6 Kap 6: Fort. digital transmission. Felhantering.

  2. Note: In a single-bit error, only one bit in the data unit has changed.

  3. 10.1Single-bit error

  4. Note: A burst error means that 2 or more bits in the data unit have changed.

  5. 10.2Burst error of length 5

  6. Note: Error detection uses the concept of redundancy, which means adding extra bits for detecting errors at the destination.

  7. 10.3Redundancy

  8. 10.4Detection methods

  9. Note: 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).

  10. Example 1 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

  11. Example 3 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.

  12. Note: 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.

  13. Note: 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.

  14. 10.6Two-dimensional parity

  15. Example 4 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

  16. 10.7CRC generator and checker CRC = Cyclic Redundency Check

  17. ”Vanlig” division (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.

  18. Modulo 2 Arithmetic • In modulo 2 arithmetic addition and substruction are identical to EXCLUSUVE OR (XOR) operation. • Multiplication and division are the same as in base-2 arithmetic without carries in addition or borrows in substraction. 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

  19. 10.8Binary division in a CRC generator The number of 0s is one less than the number of bits in G (divisor)

  20. 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

  21. 10.8Binary division in a CRC generator Transmitted data: 1 0 0 1 0 0 0 0 1

  22. 10.9Binary division in CRC checker

  23. Another Example The transmitted data is 11010110111110

  24. 10.11A polynomial representing a divisor 7th orderpolynomial 8 bit divisor

  25. Polynomyal representation • Based upon discrete mathetematics, where bit strings are treated as polynomials. • k bit divisor is represented as (k-1) degree polynomial with coefficients 0 and 1. • Example: 1010110 has 7 bits • It can be represented as a polynomial of 6th degree 1·x6 + 0·x5 + 1·x4 +0·x3 + 1·x2 + 1·x1 + 0·x0 = x6 + x4 + x2 + x

  26. Table 10.1 Standard polynomials

  27. Example 5 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).

  28. k bits n bits Data bits to be sent CRC bits How CRC Operates • The sender wants to send k bits message • The sender and the receiver must agree in advance on n+1 bit string called generator polynomial (divisor), G. • G can be represented as n-degree polynomial • nredundant bits are added to the k bits message. They are called CRC bits.

  29. How CRC Operates (Cont.) • The redundant bits are chosen in such a way that the resulting k+n bit string is exactly divisible (with a reminder=0) by G using modulo 2 arithmetic. • The receiver divides the received data together with the CRC bits by G using modulo 2 arithmetic. • If the reminder is 0, then the string is considered to be without errors • If the reminder is not 0, the data unit is with errors and it is rejected

  30. Example 6 The 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.

  31. Example 6.7: CRC

  32. Note: • The sender follows these steps: • The unit is divided into k sections, each of n bits. • All sections are added using one’s complement to get the sum. • The sum is complemented and becomes the checksum. • The checksum is sent with the data.

  33. Column: 7 6 5 4 3 2 1 Carry from column 5 Example Carry from column 4 Carry from column 3 Carry from column 2 • n=5 bit checksum. • 20 bit data gives k=20/n=4 sections (rows). • The addition starts in the last column. • The bits are carried in the columns before. • The 6th and 7th bit are added • The sum is complemented Carry from column 1 Sum Checksum

  34. Example 7 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

  35. Note: • The receiver follows these steps: • The unit is divided into k sections, each of n bits. • All sections are added using one’s complement to get the sum. • The sum is complemented. • If the result is zero, the data are accepted: otherwise, rejected.

  36. Example 8 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.

  37. Example 9 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.

  38. 11.1 Flow and Error Control Flow Control (Flödesstyrning) Error Control (Felhantering) • Båda dessa funktioner hanteras av vissa datalänkprotokoll (lager 2), i LLC-sublagret, t.ex. vid trådlös kommunikation eller vid modem. • End-to-end flödesstyrning och felkontroll hanteras av transportprotokollet TCP (lager 4).

  39. Flow control Necessary when data is being sent faster than it can be processed by receiver to avoid that the receiver’s buffer is overwhelmed.

  40. Felhantering med hjälp av felrättande koder FEC = Forward Error Correction. Baseras på felrättande istället för felupptäckande koder. Kräver ingen backkanal. Två typer: • Faltningskoder (convolutional codes). 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. • Blockkoder (block codes) 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.

  41. Felhantering med hjälp av felupptäckande koder 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.

  42. Protocols to be presented • Idle RQ = Stop-and-wait ARQ • Sliding Window Flow Control • Go-back-N ARQ • Selective Repeat ARQ Sliding WindowProtocols

  43. The Idle RQ (Repeat Request) Protocol The simplest protocol for error and flow control How the protocol operates: • Source may not send a new frame until the receiver acknowledges previous one. • The receiver sends only positive acknowledgements (ACK) to notify the sender that the frame was received. • If the frame 0 was received, the ACK 1 is sent. In that way the sender is notified that the receiver is expecting frame 1. • The ID of the frame is called a sequence number. • 1 bit sequence numbers is sufficient. Sequence: 0 1 0 1 0 ... .

  44. Figure 6.23 Idle RQ error control scheme: (a) error free;

  45. (b) corrupted I-frame;

  46. Figure 6.24 Idle RQ link utilization.

  47. (c) corrupted ACK-frame.

  48. 11.1Normal operation ACK n = Acknowledgement. Expecting frame number n

  49. 11.2Stop-and-Wait ARQ, lost frame

More Related