Physical Layer: Data and Signals

52
1 Physical Layer: Physical Layer: Data and Signals Data and Signals 01204325: Data 01204325: Data Communication and Communication and Computer Networks Computer Networks Asst. Prof. Chaiporn Jaikaeo, Ph.D. Asst. Prof. Chaiporn Jaikaeo, Ph.D. [email protected] [email protected] http://www.cpe.ku.ac.th/~cpj http://www.cpe.ku.ac.th/~cpj Computer Engineering Department Computer Engineering Department Kasetsart University, Bangkok, Thailand Kasetsart University, Bangkok, Thailand

description

Physical Layer: Data and Signals. 01204325: Data Communication and Computer Networks. Asst. Prof. Chaiporn Jaikaeo, Ph.D. [email protected] http://www.cpe.ku.ac.th/~cpj Computer Engineering Department Kasetsart University, Bangkok, Thailand. Outline. Analog and digital data/signals - PowerPoint PPT Presentation

Transcript of Physical Layer: Data and Signals

Page 1: Physical Layer:  Data and Signals

11

Physical Layer: Physical Layer: Data and SignalsData and Signals

01204325: Data 01204325: Data Communication and Communication and Computer NetworksComputer Networks

Asst. Prof. Chaiporn Jaikaeo, Ph.D.Asst. Prof. Chaiporn Jaikaeo, [email protected]@ku.ac.th

http://www.cpe.ku.ac.th/~cpjhttp://www.cpe.ku.ac.th/~cpjComputer Engineering DepartmentComputer Engineering Department

Kasetsart University, Bangkok, ThailandKasetsart University, Bangkok, Thailand

Page 2: Physical Layer:  Data and Signals

22

OutlineOutline Analog and digital data/signalsAnalog and digital data/signals Time and frequency domain views of Time and frequency domain views of

signalssignals Bandwidth and bit rateBandwidth and bit rate Transmitting digital signals as analogTransmitting digital signals as analog Theoretical data rateTheoretical data rate Signal impairmentSignal impairment

Page 3: Physical Layer:  Data and Signals

33

Analog vs. Digital DataAnalog vs. Digital Data Analog dataAnalog data

Data take on continuous valuesData take on continuous values E.g., human voice, temperature readingE.g., human voice, temperature reading

Digital dataDigital data Data take on discrete valuesData take on discrete values E.g., text, integersE.g., text, integers

Page 4: Physical Layer:  Data and Signals

44

Analog vs. Digital SignalsAnalog vs. Digital Signals

Analog signalsAnalog signals have an infinite number of have an infinite number of

values in a rangevalues in a range

Digital signalsDigital signals Have a limited number of Have a limited number of

valuesvalues

value

time

value

time

To be transmitted, data must be To be transmitted, data must be transformed to electromagnetic signalstransformed to electromagnetic signals

Page 5: Physical Layer:  Data and Signals

55

Data and SignalsData and Signals

TelephoneAnalog Data Analog Signal

Modem

Digital Data Analog Signal

Codec

Analog Data Digital Signal

Digitaltransmitter

Digital Data Digital Signal

Page 6: Physical Layer:  Data and Signals

66

Periodic SignalsPeriodic Signals A A periodic signalperiodic signal completes a pattern completes a pattern

within a timeframe, called a within a timeframe, called a periodperiod A signal A signal xx((tt)) is periodic if and only if is periodic if and only if

x(t) = x(t+T) - < t <

value

time

period

Page 7: Physical Layer:  Data and Signals

77

Simplest form of periodic signalSimplest form of periodic signal

General form: General form: xx((tt) =) = AA××sin(2sin(2ftft + + ))

periodT = 1/f

peakamplitude

time

signal strength

Sine WavesSine Waves

phase / phase shift

Page 8: Physical Layer:  Data and Signals

88

-3

-2

-1

0

1

2

3

0 0.5 1 1.5 2 2.5 3

A = 1, f = 1, = 0 -3

-2

-1

0

1

2

3

0 0.5 1 1.5 2 2.5 3

A = 2, f = 1, = 0

-3

-2

-1

0

1

2

3

0 0.5 1 1.5 2 2.5 3

A = 1, f = 2, = 0 -3

-2

-1

0

1

2

3

0 0.5 1 1.5 2 2.5 3

A = 1, f = 1, = /4

Varying Sine WavesVarying Sine Waves

Page 9: Physical Layer:  Data and Signals

99

Time vs. Frequency Time vs. Frequency DomainsDomains

Consider the signalConsider the signal

)32sin(31)2sin()( tttx

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3

-1.5

-1

-0.5

0

0.5

1

1.5

0 0.5 1 1.5 2 2.5 3+ =

Demo: sine.py

Page 10: Physical Layer:  Data and Signals

1010

Time vs. Frequency Time vs. Frequency DomainsDomains

0

1

-1

2 4 time

signal strength

0

1

-1

2 4

signal strength

frequency

Time Domain Representation plots amplitude as a function

of time

Frequency Domain Representation plots each sine wave’s peak

amplitude against its frequency

Demo: Equalizer

Page 11: Physical Layer:  Data and Signals

1111

Fourier AnalysisFourier Analysis Any periodic signal can be represented Any periodic signal can be represented

as a sum of sinusoidsas a sum of sinusoids known as a known as a Fourier SeriesFourier Series

E.g., a square wave:E.g., a square wave:

+ + + + …

=

Joseph Fourier(1768-1830)

Page 12: Physical Layer:  Data and Signals

1212

Fourier AnalysisFourier Analysis Every periodic signal consists ofEvery periodic signal consists of

DC componentDC component AC componentsAC components

Fundamental frequency (Fundamental frequency (ff00)) Harmonics (multiples of Harmonics (multiples of ff00))

DC componentAC components

fundamentalfrequency

3rd harmonic 5th harmonic

Page 13: Physical Layer:  Data and Signals

1313

Fourier Series: Fourier Series: RepresentationsRepresentations

Amplitude-phase formAmplitude-phase form

Sine-cosine formSine-cosine form

Complex exponential form (Euler Complex exponential form (Euler formula)formula)

1

000 )2sin()2cos()(n

nn ntfbntfaatx

1

00 )2cos()(n

nn ntfcctx

n

ntfjnectx 02)(

Note:Note:ccnn are complex are complex jj = = -1-1eeiixx = cos = cos xx + + jj sin sin xx

Demo: Falstad

Page 14: Physical Layer:  Data and Signals

1919

The time and frequency domains of a nonperiodic signal

Page 15: Physical Layer:  Data and Signals

2020

Frequency SpectrumFrequency Spectrum Frequency domain representation Frequency domain representation

shows the shows the frequency spectrumfrequency spectrum of a of a signalsignal

E.g., square waveE.g., square wave

0 0 f0 3f0 5f0 7f0 9f0 11f0

...

Page 16: Physical Layer:  Data and Signals

2121

BandwidthBandwidth A property of a mediumA property of a medium

Indicates the difference between the highest Indicates the difference between the highest and the lowest frequencies allowed to passand the lowest frequencies allowed to pass

<highest freq allowed><highest freq allowed> – – <lowest freq allowed><lowest freq allowed>

Also a property of a single spectrumAlso a property of a single spectrum

Cutoff frequency(half of power is lost)

Page 17: Physical Layer:  Data and Signals

2222

Bandwidth of a MediumBandwidth of a Medium

Transmission medium

1(low-pass channel)gain

freq

t t

0 f0 3f0 5f0 f0 f0 3f0 5f0 7f0

...9f0 f

Page 18: Physical Layer:  Data and Signals

2323

ExampleExample What is the bandwidth of this signal?What is the bandwidth of this signal?

A medium can pass frequencies from A medium can pass frequencies from 4000 to 7000 Hz. Can the above 4000 to 7000 Hz. Can the above signal pass through?signal pass through?

)6000sin(31)2000sin(2)( tttx

Page 19: Physical Layer:  Data and Signals

2424

Digital SignalsDigital Signals Properties:Properties:

Bit rateBit rate – number of bits per second – number of bits per second Bit intervalBit interval – – duration of 1 bit duration of 1 bit

1 0 0 1 1 10 0

...time

amplitude

bit interval

Page 20: Physical Layer:  Data and Signals

2525

Two digital signals: one with two signal levels and the other with four signal levels

Page 21: Physical Layer:  Data and Signals

2626

The time and frequency domains of periodic and nonperiodicdigital signals

Page 22: Physical Layer:  Data and Signals

2727

Baseband transmission

Baseband transmissionBaseband transmission Sending a digital signal over a channel Sending a digital signal over a channel

without changing it to an analog signalwithout changing it to an analog signal

Baseband transmission requires a Baseband transmission requires a low-passlow-pass channel channel

Page 23: Physical Layer:  Data and Signals

2828

A digital signal is a composite analog signal with an infinite bandwidth.

Note

Page 24: Physical Layer:  Data and Signals

2929

Baseband transmission using a dedicated medium

Page 25: Physical Layer:  Data and Signals

3030

Digital vs. AnalogDigital vs. Analog Using one harmonicUsing one harmonic

1 1 1 1 1 1

1 sec

Bit rate = 6

Digital

1 0 1 0 1 0

Bit rate = 6

Digital1 0 1 0 1 0

f = 3

Analog

1 1 1 1 1 1

f = 0

Analog

Page 26: Physical Layer:  Data and Signals

3131

Digital vs. AnalogDigital vs. Analog Using more harmonicsUsing more harmonics

Adding 3Adding 3rdrd harmonic to improve quality harmonic to improve quality

1 0 1 0 1 0

f0 = 3, fmax = 9

Analog1 0 1 0 1 0

Bit rate = 6

Digital

Page 27: Physical Layer:  Data and Signals

3232

Table 3.2 Bandwidth requirements

Page 28: Physical Layer:  Data and Signals

3333

Digital vs. Analog Digital vs. Analog BandwidthBandwidth

Digital bandwidthDigital bandwidth Expressed in Expressed in bits per second (bps)bits per second (bps)

Analog bandwidthAnalog bandwidth Expressed in Expressed in Hertz (Hz)Hertz (Hz)

Bit rate and bandwidth are proportional to each otherBit rate and bandwidth are proportional to each other

Page 29: Physical Layer:  Data and Signals

3434

Low-Pass and Band-Pass Low-Pass and Band-Pass ChannelsChannels

Low-pass channelLow-pass channel

Band-pass channelBand-pass channel

frequencyf1 f2

gain

frequencyf1

gain

Page 30: Physical Layer:  Data and Signals

3535

Modulation of a digital signal for transmission on a bandpass channel

Page 31: Physical Layer:  Data and Signals

3636

Transmission ImpairmentTransmission Impairment AttenuationAttenuation DistortionDistortion NoiseNoise

Page 32: Physical Layer:  Data and Signals

3737

Signal AttenuationSignal Attenuation Attenuation Attenuation Loss of energy Loss of energy

Signal strength falls off with distanceSignal strength falls off with distance

Attenuation dAttenuation depends on mediumepends on medium Attenuation is an increasing function Attenuation is an increasing function

of frequencyof frequency

Transmission medium

Page 33: Physical Layer:  Data and Signals

3838

Relative Signal StrengthRelative Signal Strength Measured in Measured in Decibel (dB)Decibel (dB)

PP11 and and PP22 are signal powers at points 1 and 2, are signal powers at points 1 and 2, respectivelyrespectively

Positive dB Positive dB signal is amplified (gains strength) signal is amplified (gains strength) Negative dB Negative dB signal is attenuated (loses signal is attenuated (loses

strength)strength)

dB = 10 log10 (P2/P1)

Point 1 Point 2

Page 34: Physical Layer:  Data and Signals

3939

Sometimes the decibel is used to measure signal power in milliwatts. In this case, it is referred to as dBm and is calculated as dBm = 10 log10 Pm , where Pm is the power in milliwatts. Calculate the power of a signal with dBm = −30.

SolutionWe can calculate the power in the signal as

Example

Page 35: Physical Layer:  Data and Signals

4040

The loss in a cable is usually defined in decibels per kilometer (dB/km). If the signal at the beginning of a cable with −0.3 dB/km has a power of 2 mW, what is the power of the signal at 5 km?SolutionThe loss in the cable in decibels is 5 × (−0.3) = −1.5 dB. We can calculate the power as

Example

Page 36: Physical Layer:  Data and Signals

4141

Signal DistortionSignal Distortion Distortion Distortion Change in signal shape Change in signal shape

Only happens in guided mediaOnly happens in guided media Propagation velocity varies with frequency Propagation velocity varies with frequency

Page 37: Physical Layer:  Data and Signals

4242

NoiseNoise Noise Noise Undesirable signals added Undesirable signals added

between the transmitter and the between the transmitter and the receiverreceiver

Types of noiseTypes of noise ThermalThermal

Due to random motion of electrons in a wireDue to random motion of electrons in a wire

Page 38: Physical Layer:  Data and Signals

4343

NoiseNoise Types of noise (cont’d)Types of noise (cont’d)

CrosstalkCrosstalk Signal from one line picked up by anotherSignal from one line picked up by another

ImpulseImpulse Irregular pulses or spikesIrregular pulses or spikes E.g., lightningE.g., lightning Short durationShort duration High amplitudeHigh amplitude

Wire 1

Wire 2

Page 39: Physical Layer:  Data and Signals

4444

Signal-to-Noise RatioSignal-to-Noise Ratio Signal-to-Noise Ratio (SNR)Signal-to-Noise Ratio (SNR)

noise

signal

PowerPower

SNR

Page 40: Physical Layer:  Data and Signals

4545

The power of a signal is 10 mW and the power of the noise is 1 μW; what are the values of SNR and SNRdB ?

SolutionThe values of SNR and SNRdB can be calculated as follows:

Example

Page 41: Physical Layer:  Data and Signals

4646

Data Rate: Noiseless Data Rate: Noiseless ChannelsChannels

Nyquist TheoremNyquist Theorem

Bit rateBit rate in bps in bps BandwidthBandwidth in Hz in Hz LL – number of signal levels – number of signal levels

Bit Rate = 2 × Bandwidth × log2L

Harry Nyquist(1889-1976)

Page 42: Physical Layer:  Data and Signals

4747

We need to send 265 kbps over a noiseless channel with a bandwidth of 20 kHz. How many signal levels do we need?SolutionWe can use the Nyquist formula as shown:

Example

Since this result is not a power of 2, we need to either increase the number of levels or reduce the bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is 240 kbps.

Page 43: Physical Layer:  Data and Signals

4848

Data Rate: Noisy ChannelsData Rate: Noisy Channels Shannon CapacityShannon Capacity

CapacityCapacity (maximum bit rate) in bps (maximum bit rate) in bps BandwidthBandwidth in Hz in Hz SNRSNR – – SSignal-to-ignal-to-NNoise oise RRatioatio

Capacity = Bandwidth × log2(1+SNR)

Claude Elwood Shannon(1916-2001)

Page 44: Physical Layer:  Data and Signals

4949

A telephone line normally has a bandwidth of 3000. The signal-to-noise ratio is usually 3162. Calculate the theoretical highest bit rate of a regular telephone line.

Example

This means that the highest bit rate for a telephone line is 34.860 kbps. If we want to send data faster than this, we can either increase the bandwidth of the line or improve the signal-to-noise ratio.

Page 45: Physical Layer:  Data and Signals

5050

We have a channel with a 1-MHz bandwidth. The SNR for this channel is 63. What are the appropriate bit rate and signal level?

SolutionFirst, use the Shannon capacity

followed by the Nyquist formula

Example

Page 46: Physical Layer:  Data and Signals

5151

The Shannon capacity gives us the upper limit; the Nyquist formula tells us

how many signal levels we need.

Note

Page 47: Physical Layer:  Data and Signals

5252

Network PerformanceNetwork Performance BandwidthBandwidth

HertzHertz Bits per second (bps)Bits per second (bps)

ThroughputThroughput Actual data rateActual data rate

Latency (delay)Latency (delay) Time it takes for an entire message to Time it takes for an entire message to

completely arrive at the destinationcompletely arrive at the destination

Page 48: Physical Layer:  Data and Signals

5353

LatencyLatency Composed ofComposed of

Propagation timePropagation time Transmission timeTransmission time Queuing timeQueuing time Processing timeProcessing time

Entiremessage

transmissiontime

propagationtime

Page 49: Physical Layer:  Data and Signals

5454

Data bits

LatencyLatency

Time Time

First bit leaves

Last bit leaves

First bit arrives

Last bit arrives

Sender Receiver

Propagation time

Transmission time

Page 50: Physical Layer:  Data and Signals

5555

Bandwidth-Delay ProductBandwidth-Delay Product The link is seen as a pipeThe link is seen as a pipe

Cross section = bandwidthCross section = bandwidth Length = delayLength = delay

Bandwidth-delay product defines the Bandwidth-delay product defines the number of bits that can fill the linknumber of bits that can fill the link

Page 51: Physical Layer:  Data and Signals

5656

Figure Filling the link with bits for case 1

Page 52: Physical Layer:  Data and Signals

5757

SummarySummary Data need to take form of signal to Data need to take form of signal to

be transmittedbe transmitted Frequency domain representation of Frequency domain representation of

signal allows easier analysissignal allows easier analysis Fourier analysisFourier analysis

Medium's bandwidth limits certain Medium's bandwidth limits certain frequencies to passfrequencies to pass

Bit rate is proportional to bandwidthBit rate is proportional to bandwidth Signals get impaired by attenuation, Signals get impaired by attenuation,

distortion, and noisedistortion, and noise