the physical layer - faculty websitesthe physical layer chapter 2 2.1 the theoretical basis for data...

34
The Physical Layer Chapter 2

Upload: others

Post on 21-Feb-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

The Physical Layer

Chapter 2

Page 2: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

2.1 The Theoretical Basis for Data

Communication

• Fourier Analysis

• Bandwidth-Limited Signals

• Maximum Data Rate of a Channel

Page 3: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Sines and cosines The sine and cosine of a given frequency are actually the

same function, but shifted by a quarter of a period:

cos(t) = sin(t + π/2)

Source: Wikipedia http://en.wikipedia.org/wiki/Sine_wave

Page 4: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Why sines and cosines?

Because these are the fundamental “units” of propagation

of (electromagnetic) waves.

Each pure sine and cosine keeps its shape the same when

propagating over any distance!

(However, the size, a.k.a. amplitude, diminishes due to

energy loss in the propagation medium)

Source: Wikipedia http://en.wikipedia.org/wiki/Sine_wave

Page 5: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Sines and cosines

Period T

Page 6: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Sines and cosines In CS and Engineering we prefer to work with “nice”

frequencies and periods, so we multiply the time

argument.

We also need to control the

amplitude of signals:

Source: Wikipedia http://en.wikipedia.org/wiki/Sine_wave

)2sin( tfA

Tf

1 f2

Page 7: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

QUIZ

A signal is described by the function

g(t) = sin(10,000 t)

Find its amplitude, frequency and period

A =

f =

T =

)2sin( tfA T

f1

Page 8: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

QUIZ

A signal has a sine shape with a maximum of 12V,

and it repeats every 5 ms.

Write it as a function of time:

g(t) =

)2sin( tfA T

f1

Page 9: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Sines and cosines Important symmetry properties:

• The sine is an odd function: h(-t) = -h(t)

• The cosine is an even function: h(-t) = h(t)

Any function can be uniquely represented

as the sum of odd + even:

2

)()(

2

)()()(

ththththth

Plan: write the odd part as a sum of sines

and the even part as a sum of cosines:

Page 10: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Fourier series

1 1

)2cos()2sin(2

1)(

n n

nn tfnbtfnactg

Any periodic signal g(t) can be represented as a Fourier Series:

The frequency f = 1/T is called the fundamental

Its multiples nf are the nth-order harmonics.

g(t) = gDC(t) + godd(t) + geven(t)

Page 11: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

1 1

)2cos()2sin(2

1)(

n n

nn tfnbtfnactg

Fundamental → n=1

Second harmonic → n=2 Frequency is double, period is half

Third harmonic → n=3 Frequency is triple, period is one third

Visualizing harmonics

Page 12: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Fourier coefficients

dttfntgT

a

T

n 0

)2sin()(2

dttfntgT

b

T

n 0

)2cos()(2

dttgT

c

T

0

)(2

1 1

)2cos()2sin(2

1)(

n n

nn tfnbtfnactg

Page 13: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Calculus review

Page 14: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

p.92 of text:

Fourier analysis of ASCII „b‟ = 0110 0010

Take the bit rate to be 1000 bps, and amplitude 1.

• What are T and f ?

• Write the integrals for c, a1, and b1.

QUIZ

T/8 3T/8 6T/8 7T/8 time

Page 15: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data
Page 16: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

n

an

bn r.m.s.

amplitude

22

nn ba

Page 17: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Individual work:

End-of-chapter 1: Compute the Fourier coefficients for

the function

g(t) = t, defined on the interval [0, 1].

Hint: We need these formulas if integrating by hand:

Page 18: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Root-mean-square (rms) amplitude is a measure of the

energy carried by the signal g(t) at the frequency nf.

22

nn ba

The spectrum of a signal

Page 19: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

1 1

)2cos()2sin(2

1)(

n n

nn tfnbtfnactg

Two real-life problems:

In any real medium, waves of different frequencies

1. propagate with different speeds

2. are absorbed (attenuated, lose energy) in different amounts

Any superposition g(t) of different frequencies will tend to lose

shape and spread as it propagates.

The sad fate of the mighty

thunder

Page 20: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

In this class we only talk about

attenuation, b/c it‟s the more

serious problem in practice.

The effect of attenuation is …

Page 21: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Bandwidth-Limited Signals

A binary signal and its root-mean-square Fourier amplitudes.

(b) – (c) Successive approximations to the original signal.

Page 22: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Bandwidth-Limited Signals (2)

(d) – (e) Better approximations to the original signal.

Page 23: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Relation between data rate and harmonics for a telephone channel

(approx. 0-3100 Hz).

Bandwidth = range of frequencies with the property that a

given fraction of the power (usually ½) gets through.

Actually, received

Page 24: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Sampling a bandwidth-limited signal

In order to convert the received signal to digital, we need

to sample the output.

Sampling rate = # of samples collected per second.

Question: How much “information” is lost in the sampling

process?

Page 25: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Nyquist Theorem • A binary signal whose max freq. is H can be perfectly reconstructed

(w/o loss of information) by sampling it 2H times a second →

Max data rate = 2B [bps].

• Generalization: A signal with V levels →

Max data rate = 2B∙log2V [bps].

Example p.94 of text: We send binary signals on a noiseless 3-kHz

channel. What is the maximum data rate?

What if now we send 4 levels on the same channel?

8 levels?

Page 26: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Nyquist Theorem Max data rate = 2B [bps].

Max data rate = 2B∙log2V [bps].

The previous example seems to indicate that the data rate can increase

indefinitely by simply increasing the number of levels!

Problem 2: A noiseless 4-kHz channel is sampled every 1 ms. What is

the maximum data rate?

Can you figure out what happens in real-life?

Page 27: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Noiseless vs. noisy

All previous discussion was for “perfect” or “noiseless”

communication channels, i.e. channels that distort signals

only through attenuation (and different propagation speeds of

the harmonics).

In real-life, there is a third source of distortion: noise.

In computer/telecoms networks, the effects of noise are dealt

with mostly on L2 and L3, but we can also use it on L1 to

obtain an upper bound on the channel‟s data rate.

Page 28: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Signal-to-noise ratio

SNR = signal-to-noise ratio = S/N

• Adimensional!

Decibels 10∙log10 S/N [dB]

Refers in general to the ratio of any quantity to a “baseline

level” of that quantity (e.g amplification in a sound

system).

Page 29: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

QUIZ

10∙log10 S/N [dB]

The signal in a transmission line has an amplitude of 12V.

The amplitude of the noise (due to a nearby refrigerator) is

0.12V.

What is the SNR?

• As a ratio:

• In dB:

Page 30: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

QUIZ

10∙log10 S/N [dB]

The noise in a transmission line was measured as having an

amplitude of 0.003V.

The SNR is 50 dB.

What is the amplitude of the signal?

Page 31: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Signal-to-noise ratio

Background information:

• Why logarithmic? B/c of very large range, e.g. Sound

pressure compare 100 dB to the plain ratio.

• Why is 3dB special? … do the math!

• Why is the decibel sometimes defined as 20∙log10 S/N ? • Hint: this is sometimes called the “power dB”

Page 32: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Shannon‟s Theorem Max data rate = B log2(1+S/N) [bps]

• Irrespective of how many signal levels V.

• S/N must be plugged in as a ratio (of powers!), not in dB!

• Note the base 2 of the logarithm!

• It is at theoretical limit, rarely approached in practice.

Problem 2, continued: A noiseless 4-kHz channel is sampled every 1

ms. What is the maximum data rate? How does the max. data

rate change if the channel is noisy, with SNR of 30 dB?

Page 33: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

Shannon Theorem

Max data rate = H log2(1+S/N) [bps]

Caveat: In the proof of Shannon‟s Theorem, the noise spectral

distribution is assumed uniform, i.e. “white noise”. In industrial

environments, noise can be far from white …

End of Section 2.1

Page 34: The Physical Layer - Faculty WebsitesThe Physical Layer Chapter 2 2.1 The Theoretical Basis for Data Communication • Fourier Analysis • Bandwidth-Limited Signals • Maximum Data

To do for next time:

Read section 2.1 carefully, practice all examples in

text and notes.