Top Banner
1 Data and Computer Communications Chapter 3 Data Transmission Required Reading: Stallings chapter 3
61

Data and Computer Communications

Feb 25, 2016

Download

Documents

faunia

Data and Computer Communications. Chapter 3 Data Transmission Required Reading: Stallings chapter 3. Source node. Destination node. Application. Application. Presentation. Presentation. Session. Session. Intermediate node. transport. transport. Packets. Network. Network. Network. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data and Computer Communications

1

Data and Computer Communications

Chapter 3Data Transmission

Required Reading: Stallings chapter 3

Page 2: Data and Computer Communications

2

Physical Layer

Application

Presentation

Session

transport

Network

Data link

Physical

Application

Presentation

Session

transport

Network

Data link

Physical

Network

Data link

Physical

Source node Destination node

Intermediate node

Signals

Packets

Bits

Frames

Page 3: Data and Computer Communications

3

Physical / Data Link Layer Interface

NL

DLL

PL

Frame

HDR

ACKHDR

Sender Receiver

Transmitted Bits

Page 4: Data and Computer Communications

4

Physical Layer Communications and Information Theory are

topics of whole courses We’ll cover some theoretical basics regarding

communications over a physical channel We discover that there are physical limitations

to communications over a given channel We’ll cover some fundamental theorems

Page 5: Data and Computer Communications

5

Terminology (1)TransmitterReceiverMedium

Guided mediume.g. twisted pair, optical fiber

Unguided mediume.g. air, water, vacuum

Page 6: Data and Computer Communications

6

Terminology (2)Direct link

No intermediate devicesPoint-to-point

Direct link Only 2 devices share link

Multi-point More than two devices share the link

Page 7: Data and Computer Communications

7

Terminology (3)Simplex

One direction (but in Europe means half duplex)

e.g. TelevisionHalf duplex

Either direction, but only one way at a timee.g. police radio

Full duplex Both directions at the same time

e.g. telephone

Page 8: Data and Computer Communications

8

Electromagnetic SignalsFunction of time

Analog (varies smoothly over time) Digital (constant level over time, followed by a

change to another level)Function of frequency

Spectrum (range of frequencies) Bandwidth (width of the spectrum)

Page 9: Data and Computer Communications

9

Frequency, Spectrum and BandwidthTime domain concepts

Continuous signalVaries in a smooth way over time

Discrete signalMaintains a constant level then changes to another

constant level Periodic signal

Pattern repeated over time Aperiodic signal

Pattern not repeated over time

Page 10: Data and Computer Communications

10

Periodic Signal Characteristics Amplitude (A): signal value, measured in volts Frequency (f ): repetition rate, cycles per

second or Hertz Period (T): amount of time it takes for one

repetition, T=1/f Phase (Φ): relative position in time, measured

in degrees or radians

Page 11: Data and Computer Communications

11

time(sec)am

plitu

de (v

olts

)

1 cycle

frequency (hertz)= cycles per second

phase difference

Analog Signalingrepresented by sine waves

Page 12: Data and Computer Communications

12

Digital Signalingrepresented by square waves or pulses

time(sec)am

plitu

de (v

olts

)

1 cycle

frequency (hertz)= cycles per second

Page 13: Data and Computer Communications

13

Continuous & Discrete Signals

Page 14: Data and Computer Communications

14

PeriodicSignals

Page 15: Data and Computer Communications

15

Sine WavePeak Amplitude (A)

maximum strength of signal 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

Page 16: Data and Computer Communications

16

Varying Sine Waves

Sin2πt 0.5Sin2πt

Sin4πt

2Sin

)4

2( tSinor

)125.0(2 tSin

Phase Shift in seconds

Phase Shift in radians

Page 17: Data and Computer Communications

17

Wavelength ()Distance occupied by one cycleDistance between two points of

corresponding phase in two consecutive cycles

Assuming signal velocity in space is equal to v = vT or f = v Here, V=c = 3*108 ms-1 (speed of light in free

space)

Page 18: Data and Computer Communications

18

Frequency Domain ConceptsA Signal is usually made up of many

frequenciesComponents are sine wavesIt Can be shown (Fourier analysis) that

any signal is made up of component sine waves

One can plot frequency domain functions instead of/in addition to time domain functions

Page 19: Data and Computer Communications

19

Addition of FrequencyComponents

(a) Sin(2πft)

(b) (1/3)Sin(2π(3f)t)

(c) (4/π)[Sin(2πft)+(1/3)Sin(2π(3f)t)]

Page 20: Data and Computer Communications

20

FrequencyDomain

Note: For square waves, only odd harmonics exist (plus the fundamental component of course).

(a) Frequency domain function for s(t)=(4/π)[Sin(2πft)+(1/3)Sin(2π(3f)t)]

(b) Frequency domain function for a single square pulse s(t)=1 for -X/2<t<X/2

Figure a is discrete because the time domain function is periodic. Figure b is continuous because the time domain function is aperiodic.

See Figure 3.16 Page 103. Note that s(f) is of the form

XSinX

Page 21: Data and Computer Communications

21

Communications Basics Represent a signal as a single-valued function of

time, g(t), to model behavior of a signal (may be voltage, current or other change)

Jean-Baptiste Fourier showed we can represent a periodic signal (given some conditions) as the sum of a possibly infinite number of sines and cosines

Period = Tg(t) = (1/2)c + an sin(2nft) + bn cos(2nft)

n=1 n=1f = 1/T is fundamental frequencya & b coefficients are the amplitude of the nth harmonic

This is a Fourier Series

Page 22: Data and Computer Communications

22

Time -> Harmonic spectrumOriginal

As we add more harmonics the signal reproduces the original more closely

Page 23: Data and Computer Communications

23

No transmission facility can transmit signals without losing some power

Usually this attenuation is frequency dependent so the signal becomes distorted

Generally signal is completely attenuated above some max frequency (due to medium characteristics or intentional filtering)

The signal is bandwidth limited

Signal Transmission

Page 24: Data and Computer Communications

24

Time T necessary to transmit a character depends on coding method and signalling speed

Signaling speed = number of times per second the signal changes value and is measured in baud

Note that baud rate is not necessarily the same as the bit rate

By limiting the bandwidth of the signal we also limit the data rate even if a channel is perfect

Overcome this by encoding schemes

Signal Transmission

Page 25: Data and Computer Communications

25

Spectrum & BandwidthSpectrum

range of frequencies contained in signalAbsolute bandwidth

width of spectrumEffective bandwidth

Often just bandwidth Narrow band of frequencies containing most of

the energyDC Component

Component of zero frequency

Page 26: Data and Computer Communications

26

Signal with DC Component

(a) s(t)=1+(4/π)[Sin(2πft)+(1/3)Sin(2π(3f)t)]

Page 27: Data and Computer Communications

27

Data Rate and BandwidthAny transmission system has a limited

band of frequenciesThis limits the data rate that can be

carriedSee Figure 3.8 Page 79

Page 28: Data and Computer Communications

28

BandwidthWidth of the spectrum of frequencies that

can be transmitted if spectrum=300 to 3400Hz,

bandwidth=3100HzGreater bandwidth leads to greater costsLimited bandwidth leads to distortionAnalog measured in Hertz, digital

measured in baud

Page 29: Data and Computer Communications

29

BPS vs. BaudBPS=bits per secondBaud=# of signal changes per secondEach signal change can represent more

than one bit, through variations on amplitude, frequency, and/or phase

Page 30: Data and Computer Communications

30

Analog and Digital Data TransmissionData

Entities that convey meaningSignals

Electric or electromagnetic representations of data

Transmission Communication of data by propagation and

processing of signals

Page 31: Data and Computer Communications

31

DataAnalog

Continuous values within some interval e.g. sound, video

Digital Discrete values e.g. text, integers

Page 32: Data and Computer Communications

32

Acoustic Spectrum (Analog)

Page 33: Data and Computer Communications

33

SignalsMeans by which data are propagatedAnalog

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

Page 34: Data and Computer Communications

34

Digital Text SignalingTransmission of electronic pulses

representing the binary digits 1 and 0How do we represent letters, numbers,

characters in binary form?Earliest example: Morse code (dots and

dashes)Most common current form: ASCII

Page 35: Data and Computer Communications

35

ASCII Character CodesUse 8 bits of data (1 byte) to transmit one

character8 binary bits has 256 possible outcomes (0

to 255)Represents alphanumeric characters, as

well as “special” characters

Page 36: Data and Computer Communications

36

Digital Image Signaling Pixelization and binary representation

Code: 0000000000111100011101100111111001111000011111100011110000000000

Page 37: Data and Computer Communications

37

Data and SignalsUsually use digital signals for digital data

and analog signals for analog dataCan use analog signal to carry digital data

ModemCan use digital signal to carry analog data

Compact Disc audio

Page 38: Data and Computer Communications

38

Why Study Analog?Telephone system is primarily analog

rather than digital (designed to carry voice signals)

Low-cost, transmission medium (present almost at all places at all times

If we can convert digital information (1s and 0s) to analog form (audible tone), it can be transmitted inexpensively

Page 39: Data and Computer Communications

39

Voice SignalsEasily converted from sound frequencies

(measured in loudness/db) to electromagnetic frequencies, measured in voltage

Human voice has frequency components ranging from 20Hz to 20kHz

For practical purposes, the telephone system has a narrower bandwidth than human voice, from 300 to 3400Hz

Page 40: Data and Computer Communications

40

Analog Signals Carrying Analog and Digital Data

Page 41: Data and Computer Communications

41

Digital Signals Carrying Analog and Digital Data

Page 42: Data and Computer Communications

42

Analog TransmissionAnalog signal transmitted without regard

to contentMay be analog or digital dataAttenuated over distance Use amplifiers to boost signalAlso amplifies noise

Page 43: Data and Computer Communications

43

Digital TransmissionConcerned with contentIntegrity endangered by noise,

attenuation etc.Repeaters usedRepeater receives signalExtracts bit patternRetransmitsAttenuation is overcomeNoise is not amplified

Page 44: Data and Computer Communications

44

Advantages of Digital Transmission Digital technology

Low cost LSI/VLSI technology Data integrity

Longer distances over lower quality lines Capacity utilization

Economical high bandwidth links High degree of multiplexing easier with digital techniques

Security & Privacy Encryption

Integration Can treat analog and digital data similarly

Page 45: Data and Computer Communications

45

Transmission Mediathe physical path between transmitter and

receiverdesign factors

bandwidth attenuation: weakening of signal over

distances interference number of receivers

Page 46: Data and Computer Communications

46

Impairments and CapacityImpairments exist in all forms of data

transmissionAnalog signal impairments result in

random modifications that impair signal quality

Digital signal impairments result in bit errors (1s and 0s transposed)

Page 47: Data and Computer Communications

47

Transmission ImpairmentsSignal received may differ from signal

transmittedAnalog - degradation of signal qualityDigital - bit errorsCaused by

Attenuation and attenuation distortion Delay distortion Noise

Page 48: Data and Computer Communications

48

Transmission ImpairmentsAttenuation

loss of signal strength over distanceAttenuation Distortion

different losses at different frequenciesDelay Distortion

different speeds for different frequenciesNoise

Page 49: Data and Computer Communications

49

Attenuation

transmitter receiver

P1 watts P2 watts

Attenuation 10 log10 (P1/P2) dB

Amplification 10 log10 (P2/P1) dB

Page 50: Data and Computer Communications

50

AttenuationSignal strength falls off with distanceDepends on mediumReceived signal strength:

must be enough to be detected must be sufficiently higher than noise to be

received without errorAttenuation is an increasing function of

frequency

Page 51: Data and Computer Communications

51

Delay DistortionOnly in guided mediaPropagation velocity varies with frequency

Page 52: Data and Computer Communications

52

Noise (1)Additional signals inserted between

transmitter and receiverTypes of Noise:Thermal

Due to thermal excitement of electrons Uniformly distributed, cannot be eliminated White noise

Intermodulation Signals that are the sum and difference of

original frequencies sharing a medium

Page 53: Data and Computer Communications

53

Noise (2)Crosstalk

A signal from one line is picked up by another NEXT (near-end crosstalk )

interference in a wire at the transmitting end of a signal sent on a different wire

FEXT (far-end crosstalk) interference in a wire at the receiving end of a signal sent on a different wire

Impulse Irregular pulses or spikes e.g. External electromagnetic interference Short duration High amplitude Less predictable

Page 54: Data and Computer Communications

54

Noise

Effect distorts a transmitted signal attenuates a transmitted signal

signal-to-noise ratio to quantify noise

S/Ndb = 10 log S= average signal power

N= noise power

SN

Page 55: Data and Computer Communications

55

Effect of noise

Signal

Noise

Signal+Noise

0 1 1 1 1 0 0 0 0 1 Data Received

Sampling times

Bit error

0 1 0 1 1 0 0 1 0 1 Original data

Logic Threshold

Page 56: Data and Computer Communications

56

Channel CapacityData rate

In bits per second Rate at which data can be communicated

Bandwidth In cycles per second of Hertz Constrained by transmitter and medium

Page 57: Data and Computer Communications

57

Maximum Data Rate

In 1920s Nyquist (of the Nyquist Theorem) developed an equation for the maximum data rate of a noiseless channel For low pass filtered signal of bandwidth B Sampling at exactly 2B samples per sec allows

reconstruction of the signal More samples are useless since the

frequencies above B are filtered out

C=Capacity=max data rate = 2B log2 M bits/secfor M discrete levels

Page 58: Data and Computer Communications

58

Nyquist theorem

“ In a perfectly noiseless channel, if f is the maxmimum frequency the medium can transmit, the receiver can completely reconstruct a signal by sampling it 2*f times per second”

Nyquist, 1920

Page 59: Data and Computer Communications

59

Nyquist formula

M Max data rate (C) 2 6200 bps 4 12400 bps 8 18600 bps16 24800 bps

C = 2B log2 MB = bandwidthM = number of discrete signal levels

Theoretical capacity for Noiseless channel

Example: Channel capacity calculation for voice bandwidth (~3100 Hz):

Page 60: Data and Computer Communications

60

In the ‘40s Shannon (of Shannon’s Law) extended the equation to a channel subject to thermodynamic (thermal) noise Thermal noise measured by ratio of signal (S)

power to noise (N) power (signal-to-noise ratio - S/N)

But represented as: 10 log10 S/N These units are called decibels (dB) Now, for a channel with signal to noise of S/NCapacity=C=max bits/sec = B log2 (1 + S/N)

Shannon’s Law

Here, C=Theoretical Maximum capacity with noise

Note: Only much lower rates are achieved since the equation assumes zero impulse noise and no attenuation and delay distortion.

Page 61: Data and Computer Communications

61

Bit rate and Baud rate Bit rate number of bits that are transmitted in a second

Baud rate number of line signal changes (variations) per second

If a modem transmits 1 bit for every signal change

bit rate = baud rate

If a signal change represents 2 or more or n bits bit rate = baud rate *n