Multimedia Systems WS 2010/2011 15.11.2010 M. Rahamatullah - - PowerPoint PPT Presentation

multimedia systems
SMART_READER_LITE
LIVE PREVIEW

Multimedia Systems WS 2010/2011 15.11.2010 M. Rahamatullah - - PowerPoint PPT Presentation

Multimedia Systems WS 2010/2011 15.11.2010 M. Rahamatullah Khondoker (Room # 36/410 ) University of Kaiserslautern Department of Computer Science Integrated Communication Systems ICSY http://www.icsy.de Outline Error Detection and


slide-1
SLIDE 1

University of Kaiserslautern Department of Computer Science Integrated Communication Systems ICSY http://www.icsy.de

Multimedia Systems

WS 2010/2011 15.11.2010

  • M. Rahamatullah Khondoker (Room # 36/410 )
slide-2
SLIDE 2

2

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Outline

 Error Detection and Correction

 Why error occurs?

  • Attenuation
  • Distortion
  • Noise

 Error Detection Mechanisms

  • Parity Checks
  • Checksum
  • Cyclic Redundancy Check

 Error Correction Mechanism

  • FEC: Hamming Code
slide-3
SLIDE 3

3

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection and Correction

 Causes of impairment

 Attenuation: Loss of energy to overcome the resistance of the medium  Distortion: Signal changes its shape because of having different delays of composite signals  Noise: Addition of unwanted signals

  • Thermal noise, induced noise, cross talk, impulse noise
slide-4
SLIDE 4

4

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection and Correction

 Error occurs because of

 Attenuation, distortion, noise and interference

 Error types

 Single-bit error: changes of one bit

  • Happens in: Parallel transmission
  • Example: 10110101 10110111

 Burst error: changes of more than one bit

  • Reason: Noise duration is more than one bit data duration
  • Happens in: Serial transmission
  • Example: 10110101 10100111
slide-5
SLIDE 5

5

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection and Correction

 Error Detection: Detection of one or more corrupted bits in a bit string  Error Correction: Detection and correction of those corrupted bits  Redundant bits are added to detect and correct errors  Error detection mechanisms

 Parity check (one or two dimensional)  Checksum  Cyclic Redundancy Check

 Error correction mechanism

 Hamming code

slide-6
SLIDE 6

Error Detection Mechanisms

slide-7
SLIDE 7

7

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection

 Parity Check

 Simplest error detection scheme  Used for a single bit error detection  A parity bit is added at the end of a block of data

  • Example: ASCII G: 111001  1110010 (even parity)

 1110011 (odd parity)

 Two dimensional parity check

 Improved over simple parity check  Data are arranged in a table and parity bits are calculated for both row and columns  Example:

1 0 1 1 0 1 1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 1 0 0 1 1 1 0 0 0 1

slide-8
SLIDE 8

8

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection

 Difference between single parity and double parity checks

Single parity check Two dimensional parity check Detect single bit error Detect some burst errors Less overhead More overhead

slide-9
SLIDE 9

9

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: Checksum

 Several protocols in the internet uses checksum  For example: TCP/IP, ICMP  Sender side:

 The message is divided into m bit words  All words are added using one’s complement arithmetic  The sum is complemented and becomes the checksum  The checksum is sent with the data

 Receiver side

 The message including checksum is divided into m bit words  All words are added using one’s complement arithmetic  The sum is complemented and becomes the new checksum  If the value of the checksum is 0, then the message is accepted,

  • therwise, rejected
slide-10
SLIDE 10

10

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: Checksum

 Example: Data 10110110 11010101 01011011  Sender side: Message sent: 10110110 11010101 01011011 00011000

 Receiver side

1 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 0 1 0 1 1 1 1 0 0 0 1 1 0 0 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 No Error

slide-11
SLIDE 11

11

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: Checksum

 Performance

 Cannot detect error

  • when the value of one word is incremented and the value of another

word is decremented by the same amount

  • Several words value are incremented and the total change is a

multiple of 65535

 Now a days, checksum is usually replaced with Cyclic Redundancy Check (CRC)

slide-12
SLIDE 12

12

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Most common and most powerful error detecting codes  Usually used in data link layer  It can detect 100% single and double bit errors  (Message bits (k) + transmitter generated bits (n)) / predetermined number  The receiver divides the incoming message with that predetermined number  Zero reminder means no error

slide-13
SLIDE 13

13

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

Data Divisor CRC 00..0 k n n+1 bits n bits Data Divisor Reminder CRC k n n+1 bits Data CRC

Zero  accept Nonzero  Reject

Sender Receiver

slide-14
SLIDE 14

14

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Modulo-2 Arithmetic  Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 110101

slide-15
SLIDE 15

15

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 110101

slide-16
SLIDE 16

16

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 110101

slide-17
SLIDE 17

17

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 110101

slide-18
SLIDE 18

18

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 110101

slide-19
SLIDE 19

19

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Given, Data = 1010001101, Divisor = 110101, CRC bits?

1 0 1 0 0 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 1 1 0 110101 101000110101110 Transmitted bits

slide-20
SLIDE 20

20

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 Data received 101000110101110

1 0 1 0 0 0 1 1 0 1 0 1 1 1 0 1 1 0 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 0 0 110101 All zero means no error, data is accepted

slide-21
SLIDE 21

21

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Detection: CRC

 A second view of CRC is to express all values as polynomials in a dummy variable X, with binary coefficient

If, M = 110011, M(X) = x5 + x4 + X + 1

 CRC process can be expressed as  Three versions of P(X) are widely used

slide-22
SLIDE 22

Error Correction Mechanisms

slide-23
SLIDE 23

23

  • M. Rahamatullah Khondoker, University of Kaiserslautern

Error Correction

 Error Correction Approaches

 Forward Error Correction (FEC): Redundancy bits are transmitted to correct the error in the receiver

  • Example: Hamming code
  • Add redundancy to transmitted data
  • Well suited for channels with high error rate
  • No reverse channel required
  • Create high overhead

 Backward Error Correction (BEC): Sender retransmits the data upon requested by the receiver

  • Example: Automatic Repeat Request (ARQ)
  • Well suited for channels with low error rate
  • Request and retransmission cause high delay
  • Requires reverse channel

 FEC and BEC

  • BEC is used when FEC cannot correct the error
slide-24
SLIDE 24

24

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 Originally designed to detect 2 bit errors and to correct a single bit error  Now, some hamming code can correct burst errors  Here, only single bit error correction will be shown

slide-25
SLIDE 25

25

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For 𝑛 data bits, 𝑙 parity bits are added  Total number of bits, 𝑜 in the code is calculated as 𝑜 = 2𝑙 − 1  Data bits, m = 𝑜 − 𝑙  𝑙 parity bits are places in the positions 1, 2, … , 2𝑙−1  Transmission end

 Calculates parity bits as described above

 Receiving end

 Calculates parity bits in the same way  The decimal value of the result indicates the error position

slide-26
SLIDE 26

26

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For 𝑛 = 4 data bits, 𝑙 parity bits are added  Now, how to get the appropriate 𝑙  Taking different integers of 𝑙, we need to calculate 𝑜 such that m = 𝑜 − 𝑙 = 4  𝑜 = 2𝑙 − 1 = 21 − 1 = 1 𝑛 = 𝑜 − 𝑙 = 1 − 1 = 0  𝑜 = 2𝑙 − 1 = 22 − 1 = 3 𝑛 = 𝑜 − 𝑙 = 3 − 2 = 1  𝑜 = 2𝑙 − 1 = 23 − 1 = 7 𝑛 = 𝑜 − 𝑙 = 7 − 3 = 4  𝑜 = 2𝑙 − 1 = 24 − 1 = 15 𝑛 = 𝑜 − 𝑙 = 15 − 4 = 11

slide-27
SLIDE 27

27

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For example, data word, m = 1010

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-28
SLIDE 28

28

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For example, data word, m = 1010

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-29
SLIDE 29

29

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For example, data word, m = 1010

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-30
SLIDE 30

30

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 For example, data word, m = 1010  Transmitter sends 1010010

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-31
SLIDE 31

31

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 Transmitter sends 1010010  For example, receiver gets 1110010 1 1 0

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-32
SLIDE 32

32

  • M. Rahamatullah Khondoker, University of Kaiserslautern

FEC: Hamming Code

 110 (6) number positions is in error  Receiver inverts the bit from 1 to 0 1 1 0

7 6 5 4 3 2 1 D4 D3 D2 P3 D1 P2 P1 1 1 1 1 Error Position Position Number (C3C2C1) 0 (no error) 000 1 001 2 010 3 011 4 100 5 101 6 110 7 111

slide-33
SLIDE 33

Thanks for your attention Any questions, comments or concerns?

slide-34
SLIDE 34

Integrated Communication Systems ICSY University of Kaiserslautern Department of Computer Science P.O. Box 3049 D-67653 Kaiserslautern

  • M. Rahamatullah Khondoker, M.Sc.

Phone: +49 (0)631 205-26 43 Fax: +49 (0)631 205-30 56 Email: khondoker@informatik.uni-kl.de Internet: http://www.icsy.de