the physical layer - faculty websitesthe physical layer chapter 2 2.1 the theoretical basis for data...
TRANSCRIPT
The Physical Layer
Chapter 2
2.1 The Theoretical Basis for Data
Communication
• Fourier Analysis
• Bandwidth-Limited Signals
• Maximum Data Rate of a Channel
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
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
Sines and cosines
Period T
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
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
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
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:
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)
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
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
Calculus review
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
n
an
bn r.m.s.
amplitude
22
nn ba
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:
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
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
In this class we only talk about
attenuation, b/c it‟s the more
serious problem in practice.
The effect of attenuation is …
Bandwidth-Limited Signals
A binary signal and its root-mean-square Fourier amplitudes.
(b) – (c) Successive approximations to the original signal.
Bandwidth-Limited Signals (2)
(d) – (e) Better approximations to the original signal.
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
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?
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?
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?
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.
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).
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:
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?
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”
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?
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
To do for next time:
Read section 2.1 carefully, practice all examples in
text and notes.