William Stallings Data and Computer Communications

Download Report

Transcript William Stallings Data and Computer Communications

CSC535 Communication Networks I

Chapter 3a: Data Transmission Fundamentals Dr. Cheer-Sun Yang

Fundamental of Communications

 Fourier Series Approximation(section 3.3)  Nyquist Theorem(section 3.4)  Shannon’s Theorem(section 3.4)  Line Encoding (section 3.5)  Modulation and Demodulation (section 3.6) 2

A Transmission System

Transmitter

....0110101

Communication channel Receiver

....0110101

Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks Figure 3.5

3

Transmission System Components

 Transmitter  Receiver  Medium (physical link)  Guided medium  e.g. twisted pair, optical fiber  Unguided medium  e.g. air, water, vacuum  Channel (Logical Link) 4

Channel Types

 Direct link  No intermediate devices  Point-to-point  Direct link  Only 2 devices share link  Multi-point  More than two devices share the link 5

Signal Classifications

 Continuous signal  Amplitude changes in a smooth way over time  Discrete signal  Amplitude maintains a constant level then changes to another constant level  Periodic signal  Pattern repeated over time  Aperiodic signal  Pattern not repeated over time 6

Continuous & Discrete Signals

7

Periodic Signals

8

Properties of a Periodic Signal

Amplitude (A)  maximum strength of signal  unit: volts  Frequency (f)  Rate of change of signal  Hertz (Hz) or cycles per second  Period = time for one repetition (T)  T = 1/f  Phase (  )  Relative position in time 9

Varying Sine Waves

10

Wavelength

 Distance occupied by one cycle  Distance between two points of corresponding phase in two consecutive cycles  Represented by the symbol   Assuming signal velocity

v

  = vT   f = v  c = 3*10 8 ms -1 (speed of light in free space) 11

12

Characterizations of Communication Channels

Time Domain Characterization - represents the amplitude s(t) changes of a channel at different timeFrequency Domain Characterization represents the amplitude s(f) of frequencies of a signal 13

Time Domain Concepts

 Time domain characterization of a communication channel reflects the “capability” of carrying an input signal to a long distance.  The propagation speed of a signal over a channel is reflected by the impulse response at the receiver end.

14

0

t

Channel

h(t) t d t

Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 15 Figure 3.17

Time Domain Concepts(cont’d)

 A very narrow pulse s(t) is applied to the channel at time t = 0.

 The pulse appears at the other end of a channel as an impulse response, h(t).

 Ideally, we hope that h(t) = s(t - t d ).

 But, it is impossible to achieve this in real systems.

16

Fourier Transform

s

(

t

)  1 2

a

0 

n

   1

a i

cos  2 

it

/

P

 

n

   1

b i

sin  2 

it

/

P

 Jean B. Fourier found that any periodic function can be expressed as an infinite sum of

sine

function.

17

We can add sines together to make new functions.

..

g

1 (

t

)=sin(2 

f t) g

2 (

t

)=1/3sin(2  ( 3

f

)

t

)

g

3 (

t

)=

g 1

(

t) + g

2 (

t)

18

Addition of Frequency Components

19

20

. . .

1 0 0 0 0 0 0 1

. . .

t

1 ms Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 21 Figure 3.15

1.5

1 0.5

0 -0.5

-1 -1.5

1.5

1 0.5

0 -0.5

-1 -1.5

1.5

1 0.5

0 -0.5

-1 -1.5

(a) 1 Harmonic (b) 2 Harmonics (c) 4 Harmonics Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 22 Figure 3.16

Frequency Domain Concepts

 Signal usually made up of many frequencies  Components are sine waves  Can be shown (Fourier analysis) that any signal is made up of component sine waves  Can plot frequency domain functions 23

A in

cos 2 

ft t

Channel

A(f) = A out A in A out

cos

(2

ft +

(f)) t

Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 24 Figure 3.13

Frequency Domain

25

Signal with DC Component

26

Spectrum & Bandwidth

 Spectrum  range of frequencies contained in signal  Absolute bandwidth  width of spectrum  Effective bandwidth  Often just

bandwidth

 Narrow band of frequencies containing most of the energy  DC Component  Component of zero frequency  What is the frequency of a function f(t) = 5?

27

Analog and Digital Data Transmission

 Data  Entities that convey meaning  Signals  Electric or electromagnetic representations of data  Transmission  Communication of data by propagation and processing of signals  From now on, we can assume that a bit stream can be transmitted via a physical link using pulses or sine waves.

28

0110101...

d meters communication channel

0110101...

Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 29 Figure 3.10

Transmission Speed

 Also known as

bit rate

with the unit of bits/sec.

 We need to measure how fast a signal can be transmitted by a transmitter: transmission speed  We also are interested in how fast a signal can be propagated through a physical link: propagation speed 30

Data

 Analog  Continuous values within some interval  e.g. sound, video  Digital  Discrete values  e.g. text, integers 31

Signals

 Means by which data are propagated  Analog  Continuously variable  Various media  wire, fiber optic, space  Speech bandwidth 100Hz to 7kHz  Telephone bandwidth 300Hz to 3400Hz  Video bandwidth 4MHz  Digital  Use two DC components 32

Data and Signals

 Usually use digital signals for digital data and analog signals for analog data  Can use analog signal to carry digital data  Modem  Can use digital signal to carry analog data  Compact Disc audio 33

Analog Signals

 Digital computers are incompatible with analog transmission media such as phone lines.

 How can one use analog signals to represent digital data bits?

 We need to convert digital data to analog signal at the sender side and convert analog data back to digital data at the receiver side.

34

Acoustic Spectrum (Analog)

35

Analog Signals Carrying Analog and Digital Data

36

Digital Signals Carrying Analog and Digital Data

37

Analog Transmission

 Analog signal transmitted without regard to content  May be analog or digital data  Attenuated over distance  Use amplifiers to boost signal  Also amplifies noise 38

Digital Transmission

 Concerned with content  Integrity endangered by noise, attenuation etc.

 Repeaters used  Repeater receives signal  Extracts bit pattern  Retransmits  Attenuation is overcome  Noise is not amplified 39

Advantages of Digital Transmission

 Digital technology  Low cost LSI/VLSI technology  Data integrity  Longer distances over lower quality lines  Capacity utilization  High bandwidth links economical  High degree of multiplexing easier with digital techniques  Security & Privacy  Encryption  Integration  Can treat analog and digital data similarly 40

(a) Analog transmission: all details must be reproduced accurately Received Sent • e.g. AM, FM, TV transmission (b) Digital transmission: only discrete levels need to be reproduced Sent Received • e.g digital telephone, CD Audio Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 41 Figure 3.6

Transmission Impairments

 Signal received may differ from signal transmitted  Analog - degradation of signal quality  Digital - bit errors  Caused by  Attenuation and attenuation distortion  Delay distortion  Noise 42

Attenuation

 Signal strength falls off with distance  Depends on medium  Received signal strength:  must be enough to be detected  must be sufficiently higher than noise to be received without error  Attenuation is an increasing function of frequency 43

Amplifier Equalizer Timing Recovery Decision Circuit.

& Signal Regenerator Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 44 Figure 3.9

Delay Distortion

 Only in guided media  Propagation velocity varies with frequency 45

Noise (1)

 Additional signals inserted between transmitter and receiver  Thermal  Due to thermal agitation of electrons  Uniformly distributed  White noise  Intermodulation  Signals that are the sum and difference of original frequencies sharing a medium 46

Noise (2)

 Crosstalk  A signal from one line is picked up by another  Impulse  Irregular pulses or spikes  e.g. External electromagnetic interference  Short duration  High amplitude 47

Transmission segment Source Repeater Repeater Destination Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 48 Figure 3.7

Attenuated & distorted signal + noise Amp.

Equalizer Repeater Recovered signal + residual noise Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 49 Figure 3.8

Channel Capacity

 Data rate  In bits per second  Rate at which data can be communicated  Bandwidth  In cycles per second of Hertz  Constrained by transmitter and medium 50

(a)

Lowpass and idealized lowpass channel

A

(

f

)

A

(

f

)

f

0

W

0 1

W

(b)

Maximum pulse transmission rate is 2W pulses/second

Channel

t t f

Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 51 Figure 3.11

Bandwidth Revisited

 A transmission channel can be characterized by the signals within a certain frequency ranges.  If a channel allows low frequency signals to pass, it is called a low-pass channel .

 If a channel allows high frequency signals to pass, it is called a high-pass channel .

 The bandwidth of a channel is defined as the range of fequencies that is passed by a channel.

 First major theorem: Nyquist’s Result 52

Bit Rate and Bandwidth

 First major theorem: Nyquist’s Result  The bit rate at which pulses can be transmitted over a channel is proportional to the bandwidth.

 In essence, if a channel has a bandwidth W, the narrowest pulse that can be transmitted over the channel has width  = 1/2W seconds.

 Thus the fastest rate at which pulses can be transmitted into the channel is given by the Nyquist rate: r max = 2W pulses/second.

53

Baud Rate vs. Bit Rate

 Transmission speed can be measured in

second(bps)

.

bits per

 Technically, transmission is rated in number of changes in the signal per second that the hardware generates.

baud

, the  Using RS-232 standard to communicate, bit rate rate = baud rate.

 In general, bit rate rate = N * baud rate, where N is the number of signals in a string.

54

Baud Rate vs. Bit Rate

    Sender sends the bit string, by b 1 b 2 … b n .

The transmitter alternately analyzes each string and transmits a signal component uniquely determined by the bit values. Once the component is sent, the transmitter gets another bit string and repeats this process.

The different signal components make up the actual transmitted signal. The frequency with which the components change is the baud rate.

At the receiving end, the process is reversed.The receiver alternately samples the incoming signal and generates a bit string. 55

Baud Rate vs. Bit Rate

 Consequently, the bit rate depends on two things: the frequency with which a component can change (baud rate) and N, the number of bits in the string. That is why the formula: bit rate = N * baud rate 56

Nyquist Sampling Theorem

     Due to Harry Nyquist (1920) Nyquist showed that if F is the maximum frequency the medium can transmit, the receiver can completely reconstruct by sampling it 2ƒ times per second on a perfectly noiseless channel.

In other words, the receiver can reconstruct the signal by sampling it at intervals of 1/(2f) second.

For example, if the max frequency is 4000 Hz, the receiver needs to sample the signal 8000 times per second or using 2ƒ as the baud rate.

Bit rate = 2ƒ * N.

57

1 +

A

-

A

0 0 1 1 0 1

T

2

T

3

T

4

T

5

T t

Transmitter Filter Comm. Channel Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks Receiver Filter

r(t)

Receiver Received signal 58 Figure 3.19

Data Rate and Bandwidth

 It looks like that one can increase the bandwidth W of a channel to achieve a higher bit rate r without considering the actual characteristics of a transmission link.

 In fact, any transmission system has a limited band of frequencies. For example, a channel can use +5V as bit 1, -5V as bit 0; a channel may also be able to use +5V as ‘11’, +3V as ‘10’, -3V as ‘01’, and -5V as ‘00’. We are actually dividing the frequency range of F(=1/T) for representing 2 bits into that for representing 4 bits.

59

Data Rate and Bandwidth

Question: Can we keep increasing the bandwith or dividing the bandwidth to increase the bit rate?

60

typical noise 4 signal levels Copyrighted by McGraw Hill (Leon-Garca and Widjaja) Communication Networks 8 signal levels 61 Figure 3.22

Data Rate and Bandwidth

 In fact, any transmission system has a limited band of frequencies. We cannot increase the bandwidth indefinitely. Signals can be impaired.

 We cannot keep dividing the total frequency range into smaller ranges since the receiver will become harder to distinguish one frequency from another.

 This also limits the data rate a channel can achieve.

 This leads to the second major result: Shannon’s Theorem 62

Any Limit on Bit Rate?

 The formula that Bit rate = 2ƒ * N seems to imply that there is no upper bound for the data rate given the maximum frequency. Unfortunately, this is not true for two reasons. 63

How about real hardware?

 First, if we used amplitude to represent data bits, each time we separate the amplitude into smaller ranges to represent more data bits, the receiver must be more sophisticated (and more expensive) to be able to detect smaller differences. If the differences become too small, we eventually exceed the ability of a deviec to detect them.

64

How about real hardware?

 Second, many channels are actually subject to noise.

65

Limitation on Real Hardware

66

Signal-to-Noise Ratio

 Electrical engineers uses S/N to indicate the quality of sound. The higher the ration is, the better the quality is.  B = log 10 (S/N) bels, where B is the quality rate.

 S/N is known as the signal-to-noise ratio.

 Quality of sound is measured in decibles (abbreviated dB) or bels (1 dB = 0.1 Bel).

 If B=2.5 bels, then S = ___________N?

67

High SNR Low SNR signal noise signal + noise

t t t

signal noise

t t

SNR = Average Signal Power Average Noise Power SNR (dB) = 10 log 10 SNR (Leon-Garca and Widjaja) Communication Networks signal + noise 68 Figure 3.12

t

Shannon’s Theorem

 Bit rate = Bandwidth * log 2 (1+S/N) bps.

 According to this result, a bit rate around 35,000 bps is an upper limit for conventional modems.

69

Example of Shannon’s Theorem

 Bandwidth = 3000 Hz,  Quality rate = 35 dB or 3.5 bels,  What is the bit rate?

 Please work with your neighbors now.

 Hint: You must find S/N first.

70

Reading Material

 Don’t read sections 3.2 and 3.3 now. You may get confused.

71