Transmission Digital vs Analog Problem 1 Transmit information

Transmission: Digital vs. Analog Problem 1: Transmit information “faithfully” (with little or no distortion) to the receiver Reality: signal got distorted over distance because 1) impedance (within transmission medium) 2) interference (outside force, e. g. cloud, lightening) DT fixed DH Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 1

Data Encoding and Modulation Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 2

Amplitude, Frequency, and Phase of a Signal s(t)=Asin(2 ft+ ) Amplitude=A; Frequency=f; Phase= Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 3

Phase of a Signal s(t)=Asin(2 f 1 t+ ) Amplitude=A; Frequency=f 1; Phase= P/4 P/2 Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 4

Pulse Code Modulation (PCM) • Continuous analog signal is sampled, i. e. , captured the signal’s amplitude at fixed time interval, say 8000 times/sec. • The frequency we sampled the signal is called the sampling rate. • Fixed number bits (8 or 16 typical) is used to represent each sample. • Divide the signal amplitude range by 2 bitspersample (256 or 216) discrete levels. • Quantization: The measured amplitudes in real numbers are then rounded off to the closest discrete level. Say 8. 2 8 • Discrete value is then encoded as bit pattern. 00001000. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 5

Gray contour represent DM encoded signal Red stairs represent PCM encoded signal Bold line is original signal Major source of error How to reduce it? Assume 5 bits/sample Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 6

PCM Encoding Example • Example: With Stereo, 16 bits/sample, 44 k. Hz sampling rate, PCM encoding, how many bits of data will be generated by a three minute sound recording? • Ans: 3 min*60 sec/min*44000 samples/sec*16 bits/sample*2(chan nel)=253. 44 Mbits=31. 68 MB. • Examle: Telephone network, 8 bits/sample, 8 k. Hz sample rate, PCM encoding, how many bits of data will be generated by a three minute sound recording? Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 7

Network Requirement for Different Information Type: Resolution 176 (a) QCIF Videoconferencing @ 30 frames/sec = 144 760, 000 pixels/sec 720 (b) Broadcast TV 480 @ 30 frames/sec = 10. 4 x 106 pixels/sec 1920 (c) HDTV @ 30 frames/sec = 67 x 106 pixels/sec 1080 Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 8 Figure 3. 3

Network Requirement for Different Information Type: Delay and Jitter Delay: time it takes to deliver a message from sender to receiver it is related to propagation delay, transmission delay, queueing Samples in realtime media stream needs to be played back regularly. Jitter: variation of delays among msgs, due to traffic load variation can be solved by playout buffer, which accumulates enough msgs before playing(delivering to end user). What is the penalty? (a) Original sequence 1 (b) 2 4 5 6 7 8 9 Jitter due to variable delay 1 (c) 3 2 3 4 5 6 7 8 9 Playout delay Copyright © 2000 The Mc. Graw Hill Companies 1 2 3 Leon-Garcia & Widjaja: Communication Networks 4 5 cs 522 f 200 ch 3 page 9 6 Figure 3. 4

Analog Repeater Attenuated & distorted signal + noise Amp. Equalizer Recovered signal + residual noise Repeater Equalizer: a device used to eliminate/compensate the distortion. Two causes of distortion: • High frequency signal component attenuated more than that of low frequency • Delays for different frequency components are different Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 10 Figure 3. 8

A Digital Repeater Decision Circuit. & Signal Regenerator Amplifier Equalizer Timing Recovery Equalizer: only need to compensate to a point that can detect positive or negative pulse Timing Recovery Circuit: keeps track the pulse interval. Decision Circuit: sample signal at midpoint to determine the polarity (positive or negative) of the pulse. Digital transmission • eliminates accumulation of noise. • can operate at lower signal level, greater distance lower cost • handles any type of information that can be digitized. • takes advantage of error correction and data encryption techniques. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 11 Figure 3. 9

Amplitude-response Functions A(f) (a) Lowpass and idealized lowpass channel A(f) 0 f W 1 0 f W Bandwidth: the range of frequencies passed by a channel. (b) Maximum pulse transmission rate is 2 W pulses/second, called Nyquist Rate Channel With W t bandwidth t Can still tell which kind of pulse sent. If rate > 2 W, difficult to tell. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 12 Figure 3. 11

Sending Pulse with Multiple Levels With 8 levels per pulse we can send log 28= 3 bits in just one pulse. Now we can send 3*2 W bits per second. Let us increase the signal levels!! Unfortunately, there is noise in most channels We can not have unlimited number of signal levels encoded in each pulse. 7 3 6 5 2 Still can tell they are all level 1 4 3 1 typical noise Difficult To tell if It is 3 or 2 2 1 0 0 4 signal levels Copyright © 2000 The Mc. Graw Hill Companies 8 signal levels Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 13

signal + noise High SNR t t t noise signal + noise Low SNR = t t t Average Signal Power Average Noise Power SNR (d. B) = 10 log 10 SNR Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 14 Figure 3. 12

Shannon Channel Capacity • For a low pass channel with W bandwidth, if the Signal Noise Ratio is SNR, then the maximum number of bits can be transferred over this noisy channel is C = W log 2(1+SNR) • For W=3. 4 k. Hz, SNR=40 d. B (S/N=10000), C=44. 8 kbps? 45. 178 kbps! • For 56 kbps modem on upstream from user via telephone company to ISP subject to 3. 4 k. Hz channel can achieve about 33. 6 kbps < 44. 8 kpbs. On downstream from ISP to user, the signal already digital no need for analog to digital conversion 56 kbps achievable. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 15

Channel t 0 t h(t) td Signal Pulse with zero intersymbol interference. s(t) = sin(2 Wt)/ 2 Wt T=1/2 W t T T T Copyright © 2000 The Mc. Graw Hill Companies T T T Leon-Garcia & Widjaja: Communication Networks T T T cs 522 f 200 ch 3 page 16 Figure 3. 17

1 0 1 0 T 2 T 3 T 4 T 5 T +A t -A Transmitter Filter Comm. Channel Receiver Filter r(t) Receiver Received signal Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 17 Figure 3. 19

(a) 3 separate pulses for sequence 110 T T Copyright © 2000 The Mc. Graw Hill Companies T T T t Sampling time (b) Combined signal for sequence 110 This shows when samples at the right 0, 1 T, 2 T time, we get correct encoded values. T t T T Leon-Garcia & Widjaja: Communication Networks T T cs 522 f 200 ch 3 page 18 Figure 3. 20

Line codes: represent binary digits using digital signals. 1 0 Unipolar NRZ 1 0 1 1 1 0 0 A Non. Return to Zero: It uses average power A 2/2=(1/2)(+A)2+(1/2)(0)2 Power=V 2/R Here V=A, R=1; Average. Power= sum(Prob(bitn)*Power(bitn)) Polar NRZ A/2 Use less average power A 2/4=(1/2)(+A/2)2+(1/2)(-A/2)2 then the unipolar NRZ A 2/2 NRZ-Inverted (Differential Encoding) No voltage change bit 0 Voltage change bit 1; What data are suited for this? Bipolar Encoding Zero bits do not require sending signal; low power consumption! What’s wrong? Manchester Encoding Always has voltage transition in the middle of the bit. Use for timing sync. Differential Manchester Encoding Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 19 Figure 3. 25

Ethernet Line Coding • Manchester encoding is used in Ethernet Line coding. • The presence of mid bit transition makes the timing recovery easy to design. • Manchester code is a special case of m. Bn. B code, where m bit information is encoded in n> m encoded bits. Here m=1 and n=2. • FDDI (Fiber Distribution Data Interface) LAN uses 4 B 5 B line code. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 20

Modulation 0 f 1 fc f 2 f • Band pass channel passes signal within certain range. • Modulation is used to send signal over band pass channel. • Information • Amplitude shift keying • Frequency shift keying • Phase shift keying Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 21

1 (a) Information 0 1 1 0 1 +A (b) Baseband Signal Xi(t) T 0 2 T 3 T 4 T t 6 T 5 T -A +A (c) Modulated Signal Yi(t) 0 2 T T 3 T 4 T 5 T 6 T t -A +2 A (d) 2 Yi(t) cos(2 fct) -2 A Copyright © 2000 The Mc. Graw Hill Companies 0 T 2 T 3 T 4 T Leon-Garcia & Widjaja: Communication Networks 5 T cs 522 f 200 ch 3 page 22 Figure 3. 29

Sending Digits Using PSK (a) Modulate cos(2 fct) by multiplying it by Ak for (k-1)T < t <k. T: x Ak Yi(t) = Ak cos(2 fct) Here Yi(t) is the modulated signal with Ak be the amplitude of cosine wave sent by sender for kth bit. For bit 0, +A is used. For bit 1, -A is used. (b) Demodulate (recover) Ak by multiplying by 2 cos(2 fct) and lowpass filtering: Yi(t) = Akcos(2 fct) Lowpass Filter with cutoff W Hz x 2 cos(2 fct) Copyright © 2000 The Mc. Graw Hill Companies Xi(t) 2 Ak cos 2(2 fct) = Ak {1 + cos(2 fct)} Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 23 Figure 3. 30

Quadrature Amplitude Modulation (QAM) First the information bit stream are divided into two groups: odd symbols Ak and even symbols Bk Modulate cos(2 fct) and sin (2 fct) by multiplying them by Ak and Bk respectively for (k-1)T < t <k. T: Ak x Yi(t) = Ak cos(2 fc t) Bk x + Y(t) Yq(t) = Bk sin(2 fc t) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 24 Figure 3. 31

QAM Demodulator Y(t) Lowpass Filter with cutoff W/2 Hz x 2 cos(2 fc t) x 2 sin(2 fc t) Copyright © 2000 The Mc. Graw Hill Companies Ak 2 cos 2(2 fct)+2 Bk cos(2 fct)sin(2 fct) = Ak {1 + cos(4 fct)}+Bk {0 + sin(4 fct)} Lowpass Filter with cutoff W/2 Hz Bk 2 Bk sin 2(2 fct)+2 Ak cos(2 fct)sin(2 fct) = Bk {1 - cos(4 fct)}+Ak {0 + sin(4 fct)} Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 25 Figure 3. 32

Signal Constellations 2 -D signal Bk Signal with amplitude=A, phase=3/4 is sent for 01 bits A Receive signal with amplitude=A, phase=5/4 sender sent 00 bits 2 -D signal Bk Ak 11 (A, 1/4 ) Ak 10 (A, 7/4 ) 16 “levels”/ pulse 4 bits / pulse 4 W bits per second 4 “levels”/ pulse 2 bits / pulse 2 W bits per second Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 26 Figure 3. 33

Bk 0111 0100 2 A Ak A 0110 1001 1010 1011 4 “levels”/ pulse 2 bits / pulse 2 W bits per second Copyright © 2000 The Mc. Graw Hill Companies 0011 0010 0001 0000 1110 1101 1100 1111 16 “levels”/ pulse 4 bits / pulse 4 W bits per second Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 27 Figure 3. 34

Optimal 64 Set Constellation Pattern Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 28

Trellis Modulation Use dense signal sets, say 8, but restrict code sequences with which signals can be used, say only 4 are valid. Goal Error correction, reduce the error rate. At state 0, receiving input 01, Send signal 2, enter state 1. Note that at state 0, Sender only sends 0, 4, 2, 6 (even signal) At state 1 Sender only Sends 1, 3, 5, 7 (odd signal) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 29

Trellis Modulation • The sender and receiver starts at the same state 0. • If the sender receives 01011000, it will send signals 2, 3, 7, 2 and changes its states from 0 to 1, to 3, to 2 and back to 0. The receiver will traverse the same state and deliver 01011000. • At state 1, receiver receives signals 7, 5, 3, 2. It will interpret them as correct signals and deliver 11110000 to the upper layer. • At state 3, receiver receives signals 7, 5, 3, 2. It will say the first signal 7 is ok but the 2 nd signal 5 is incorrect since at state 2, it can only receive even number signal! • At state 0 or 2, receiver receivs signals 7, 5, 3, 2. It will say the first signal is already not incorrect since it can only receive even number signal at those two state. • Signal 7 has a phase angle of 7/4. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 30

Trellis Modulation: At state 0 Receiver receives 2, 3, 7, 2 signals • It delivers 01 01 10 00 to its upper layer. 2 2 3 7 Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 31

Trellis Modulation: At state 1, receiver receives signals 7, 5, 3, 2 • It delivers 11110000 to its upper layers. • It enters state 0 2 7 3 5 Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 32

Error Correction in Trellis Modulation • At state 1, receiver receives a signal with phase angle = 0. 40 . • What signal should it interpret? What bits should be delivered? Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 33

Electromagnetic Spectrum Frequency (Hz) 102 10 10 -2 10 -6 x rays 10 -4 10 -8 10 -10 gamma rays 1012 1014 1016 1018 1020 1022 1024 ultraviolet light broadcast radio 104 1010 visible light 108 infrared light 106 microwave radio 104 power & telephone 102 10 -14 Wavelength (meters) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 34 Figure 3. 35

Attenuation vs. Frequency for Twisted Pair 26 gauge 30 24 gauge 27 Attenuation (d. B/mi) 24 22 gauge 21 18 19 gauge 15 12 9 6 3 1 Copyright © 2000 The Mc. Graw Hill Companies 10 100 Leon-Garcia & Widjaja: Communication Networks 1000 f (k. Hz) cs 522 f 200 ch 3 page 35 Figure 3. 37

Coaxial Cable Center conductor Dielectric material Braided outer conductor Outer cover Two conductors Better immunity to interference and crosstalk. Less attenuation higher bandwidth (54 -500 MHz on Cable TV) 446 MHz / 6 MHzper. TVchannel=74 channels. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 36 Figure 3. 39

Attenuation vs. Frequency for Coaxial Cable note that typo f(k. Hz) should be f(MHz). Attenuation (d. B/km) 35 0. 7/2. 9 mm 30 25 1. 2/4. 4 mm 20 15 2. 6/9. 5 mm 10 5 0. 01 0. 1 Copyright © 2000 The Mc. Graw Hill Companies 1. 0 10 Leon-Garcia & Widjaja: Communication Networks 100 f (MHz) cs 522 f 200 ch 3 page 37 Figure 3. 40

Conventional Cable TV Systems Head end Home Unidirectional amplifier Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 38 Figure 3. 41

Topology of Hybrid Fiber-Coaxial Systems Head end Upstream fiber Downstream fiber Fiber node Fiber Coaxial distribution plant Bidirectional Split-Band Amplifier Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 39 Figure 3. 42

Frequency Allocation in Cable TV Systems Downstream (a) Current allocation 500 MHz 54 MHz Cable Modem 2 MHz Channel (500 kbps-4 Mbps) Shared Time-slot Channels Downstream Cable Modem 6 MHz channel (36 Mbps) Proposed downstream Upstream Leon-Garcia & Widjaja: Communication Networks 750 MHz 500 MHz 54 MHz Copyright © 2000 The Mc. Graw Hill Companies 42 MHz 5 MHz (b) Proposed hybrid fiber-coaxial allocation cs 522 f 200 ch 3 page 40 Figure 3. 43

(a) Geometry of optical fiber light cladding jacket core (b) Reflection in optical fiber c Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 41 Figure 3. 44

Attenuation vs. Wavelength for Optical Fiber 100 50 10 Loss (d. B/km) 5 Infrared absorption 1 0. 5 Rayleigh scattering 0. 1 850 nm 0. 05 0. 01 0. 8 1300 nm 1. 0 1. 2 1550 nm 1. 4 1. 6 1. 8 Wavelength ( m) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 42 Figure 3. 45

Single-mode vs. Multimode Optical Fiber (a) Multimode fiber: multiple rays follow different paths reflected path interference direct path 1300 nm has a region with 0. 5 d. B/km and 25 Tera. Hz. 1550 nm has a region with 0. 2 d. B/km and 25 THz. (b) Single mode: narrow core only direct path propagates in fiber ; higher speed Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 43 Figure 3. 46

Optical Transmission System Electrical signal Modulator Optical fiber Receiver Electrical signal Optical source Wavelength-division multiplexing (WDM): Send multiple wavelength light. Dense WDM (DWDM): provide 160 wavelengths, each operating at 10 Gbps for a total of 1600 Gbps. Soliton: Special pulse shape that retain shape over long distance. Experiment results: 80 Gbps over 10, 000 km. Field trials: 10 Gbps over 200 km. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 44 Figure 3. 47

Gigabit Ethernet 1000 Base-X standard Two variations: • 1000 BASE-SX: use “shortwave” lightsource, nomially at 850 nm, multiple mode fiber. distance limit 550 meters. • 1000 BASE-LX: use “longwave” lightsource, nomially at 1300 nm, single mode (5 km) or multiple mode fiber (550 m). Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 45

Frequency (Hz) 104 105 106 108 107 109 1011 1010 1012 FM radio & TV AM radio Cellular & PCS Wireless cable satellite & terrestrial microwave LF 104 MF 103 HF 102 VHF 101 UHF 1 SHF 10 -1 EHF 10 -2 10 -3 Wavelength (meters) ISM bands: 902 -928 MHz, 2400 -2483. 5 MHz, 5725 -5850 MHz wireless LAN PCS bands: 1. 7 -2. 3 GHz AMPS bands: 824 -849 MHz (832*30 k. Hz Tx channels), 869 -894 MHz (Rx) Satellite: 4/6, 11/14, 20/30 GHz bands (downlink/uplink) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 46 Figure 3. 48

All inputs to channel satisfy pattern/condition User information Encoder Copyright © 2000 The Mc. Graw Hill Companies Channel output Pattern Checking Leon-Garcia & Widjaja: Communication Networks Deliver user information or set error alarm cs 522 f 200 ch 3 page 47 Figure 3. 49

Received information bits Information bits Recalculate check bits Channel Calculate check bits Compare Check bits Copyright © 2000 The Mc. Graw Hill Companies Received check bits Leon-Garcia & Widjaja: Communication Networks Information accepted if check bits match cs 522 f 200 ch 3 page 48 Figure 350

(a) A code with poor distance properties o o x x x o o o x x o o x = codewords Copyright © 2000 The Mc. Graw Hill Companies (b) A code with good distance properties o o o x x x o o o x x o o = non-codewords Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 49 Figure 3. 51

1 0 0 0 1 Last column consists of check bits for each row 1 0 0 1 1 0 1 0 0 1 1 1 Bottom row consists of check bit for each column Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 50 Figure 3. 52

1 0 0 0 0 0 0 0 1 One error 1 0 0 1 1 0 1 0 0 Two errors 1 0 0 1 1 1 1 0 0 1 0 0 0 1 Three errors 1 0 0 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1 Four errors Arrows indicate failed check bits Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 51 Figure 3. 53

Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 52 Figure 3. 54

Addition: Multiplication: = q(x) quotient x 3 + x 2 + x Division: divisor x 3 + x + 1 ) x 6 + x 5 x 6 + 3 35 ) 122 105 17 Copyright © 2000 The Mc. Graw Hill Companies x 4 + x 3 dividend x 5 + x 4 + x 3 x 5 + x 3 + x 2 x 4 + x 2 + x x Leon-Garcia & Widjaja: Communication Networks = r(x) remainder cs 522 f 200 ch 3 page 53 Figure 3. 55

Steps: 1) Multiply i(x) by xn-k (puts zeros in (n-k) low order positions) quotient 2) Divide xn-k i(x) by g(x) remainder xn-ki(x) = g(x) q(x) + r(x) 3) Add remainder r(x) to xn-k i(x) (puts check bits in the n-k low order positions): b(x) = xn-ki(x) + r(x) Copyright © 2000 The Mc. Graw Hill Companies transmitted codeword Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 54 Figure 3. 56

Generator polynomial: g(x)= x 3 + x + 1 Information: (1, 1, 0, 0) i(x) = x 3 + x 2 Encoding: x 3 i(x) = x 6 + x 5 x 3 + x 2 + x 1110 x 3 + x + 1 ) x 6 + x 5 x 6 + x 4 + x 3 1011 ) 1100000 1011 x 5 + x 4 + x 3 x 5 + 1110 1011 x 3 + x 2 x 4 + x 2 + x x 1010 1011 010 Transmitted codeword: b(x) = x 6 + x 5 + x b = (1, 1, 0, 0, 0, 1, 0) Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 55 Figure 3. 57

Encoder for clock 0 1 2 3 4 5 6 7 input - 1=i 3 1=i 2 0=i 1 0=i 0 0 r 0 = 0 + reg 0 0 1 1 1 0 r 1 = 1 reg 1 0 0 1 1 1 0 0 1 r 2 = 0 reg 2 0 0 0 1 1 1 0 0 reg 1 reg 2 check bits: r(x) = x Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 56 Figure 3. 58

(Transmitter) b(x) + R(x) (Receiver) e(x) Error pattern Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 57 Figure 3. 59

1. Single errors: e(x) = xi 0 i n-1 If g(x) has more than one term, it cannot divide e(x) 2. Double errors: e(x) = xi + xj 0 i < j n-1 = xi (1 + xj-i ) If g(x) is primitive, it will not divide (1 + xj-i ) for j-i 2 n-k 1 3. Odd number of errors: e(1) =1 If number of errors is odd. If g(x) has (x+1) as a factor, then g(1) = 0 and all codewords have an even number of 1 s. Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 58 Figure 3. 60

ith position L 4. Error bursts of length b: 0000110 • • 0001101100 • • • 0 error pattern d(x) e(x) = xi d(x) where deg(d(x)) = L-1 g(x) has degree n-k; g(x) cannot divide d(x) if deg(g(x))> deg(d(x)) • L = (n-k) or less: all will be detected • L = (n-k+1): deg(d(x)) = deg(g(x)) i. e. d(x) = g(x) is the only undetectable error pattern, fraction of bursts which are undetectable = 1/2 L-2 • L > (n-k+1): fraction of bursts which are undetectable = 1/2 n-k Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 59 Figure 3. 61

(a) Single bit input (transmitter) b + r (receiver) e error pattern (b) Vector input (transmitter) b + r (receiver) e error pattern Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 60 Figure 3. 62

s = H e 0 0 1 1 1 0 1 0 = = 0 0 1 1 1 0 0 0 1 1 0 1 0 = = + = 1 0 0 0 1 1 1 0 0 single error detected 1 1 1 double error detected 1 1 1 0 0 0 1 1 1 0 1 0 1 1 0 = = + = 0 0 0 1 1 1 0 0 0 Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks triple error not detected cs 522 f 200 ch 3 page 61 Figure 3. 63

s = H r = He 7 p s = 0 1 -3 p no errors in transmission (1 -p)7 Copyright © 2000 The Mc. Graw Hill Companies undetectable errors 7 p 3 correctable errors 7 p(1 -3 p) Leon-Garcia & Widjaja: Communication Networks 3 p uncorrectable errors 21 p 2 cs 522 f 200 ch 3 page 62 Figure 3. 64

b 1 o set of all n-tuples within distance t o o o b 2 set of all n-tuples within distance t If dmin= 2 t+1, non-overlapping spheres of radius t can be drawn around each codeword; t=2 in the figure Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 63 Figure 3. 66

L codewords written vertically in array; then transmitted row by row A long error burst produces errors in two adjacent rows Copyright © 2000 The Mc. Graw Hill Companies b 1 b 2 b 3 b 4 . . . b. L-3 b. L-2 b. L-1 b. L . . . Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 64 Figure 3. 66

13 1 (a) 14 (b) DTE Copyright © 2000 The Mc. Graw Hill Companies 25 1 Protective Ground (PGND) 1 2 Transmit Data (TXD) 2 3 Receive Data (RXD) 3 4 Request to Send (RTS) 4 5 Clear to Send (CTS) 5 6 Data Set Ready (DSR) 6 7 Ground (G) 7 8 Carrier Detect (CD) 8 20 Data Terminal Ready (DTR) 20 22 Ring Indicator (RI) 22 Leon-Garcia & Widjaja: Communication Networks DCE cs 522 f 200 ch 3 page 65 Figure 3. 67

Copyright © 2000 The Mc. Graw Hill Companies Leon-Garcia & Widjaja: Communication Networks cs 522 f 200 ch 3 page 66 Figure 3. 68
- Slides: 66