Digital vs. Analog Transmission Nyquist and Shannon Laws CSE 3213, Fall 2010

advertisement
1
Digital vs. Analog Transmission
Nyquist and Shannon Laws
Required reading:
Garcia 3.1 to 3.5
CSE 3213, Fall 2010
Instructor: N. Vlajic
2
Transmission Impairments
Transmission / Signal – caused by imperfections of transmission
media
Impairments
•
for analog signals, impairments can
degrade signal quality
Sent
•
for digital signals, impairments can cause
bit errors
Sent
•
Received
Received
main types of transmission impairments:
Transmission Impairments: Attenuation
3
Attenuation – reduction / loss in signal power
•
when a signal travels through a medium it loses some
of its energy by overcoming the resistance of medium
•
main challenges in combating attenuation:
(1) received signal must have sufficient strength so that
receiver can detect signal, but should not be too strong
to overload transmitter/receiver circuitry
Less of a
problem for
digital signal !!!
(2) signal must maintain a level sufficiently higher than
noise at all times, to be received without error
•
to compensate for loss, analog amplifiers / digital
repeaters are used to boost the signal at regular intervals
Transmission Impairments: Attenuation (cont.)
4
Attenuation (cont.) – def. loss in signal power as it is transferred
across a system (medium)
>
Pin
Pout
•
determined for each individual frequency
•
apply sinwave of freq. f and power Pin to channel
input and observe signal power Pout at output
Attenuation(f) = L(f) = 10 ⋅ log10
Amplitude Response
1
A(f)=
•
Aout (f)
Ain (f)
aka ‘magnitude of frequency response’
Pin (f)
A in (f)2
1
L(f) =
=
=
Pout (f) A out (f)2 A(f)2
Atten.(f) = L(f) = 20 ⋅ log10
See Garcia pp. 125.
Pin (f)
[dB]
Pout (f)
f
1
[dB]
A(f)
channel’s amplitude response function A(f)
5
Which frequencies are
better passed through
the medium?
Transmission Impairments: Attenuation (cont.)
6
Why decibel (log function)?
1.
Signal strength often falls off exponentially, so loss is easily expressed
in terms of decibels – linear function in log-plot.
2.
The net gain or loss in a cascaded transmission path can be calculated
with simple addition and subtraction.
In figure below, a signal travels a long distance from point 1 to point 4.
The signal is attenuated by the time it reaches point 2. Between points
2 and 3, the signal is amplified. Again, between points 3 and 4, the
signal is attenuated. We can find the resultant attenuation just by
adding the decibel measurements between each set of points.
-1 dB
3dB
Pin
-7dB
3 dB
Pout
In this case, the attenuation can be calculated as: 3-7+3 = -1, which
means that the signal has gained power.
Transmission Impairments: Attenuation (cont.)
Example [ attenuation ]
Consider a series of transmission elements as shown in the figure below.
The input signal has the power of P1 = 4 mW. The 1st element is a
transmission line with a loss of 5 (x), the 2nd element is an amplifier
with a gain of 7 (x), nd the 3rd element is a transmission line with a loss
of 3 (x).
Calculate the output power P4.
loss = 5
gain = 7
loss = 3
P1 = 4 mW
P4 = ???
P4 P4 P3 P2 1 7 1
= ⋅ ⋅ = ⋅ ⋅ = 0.47
P1 P3 P2 P1 5 1 3
P4 = 0.47 ⋅ 4 [mW] = 1.88 [mW]
7
Transmission Impairments: Attenuation (cont.)
G1
G2
G3
P1 = 4 mW
P4 = ???
P4 P4 P3 P2
1 1 1
= ⋅ ⋅ = G1 ⋅ G2 ⋅ G3 = ⋅ ⋅
P1 P3 P2 P1
L1 L 2 L 3
10 ⋅ log
P4
[dB] = 10 ⋅ log(G1 ⋅ G2 ⋅ G3 ) = 10 ⋅ log(G1 ) + 10 ⋅ log(G2 ) + 10 ⋅ log(G3 )
P1
10 ⋅ log
P4
[dB] = G1[dB] + G2 [dB] + G3 [dB]
P1
8
Transmission Impairments: Attenuation (cont.)
Example [ attenuation ]
Consider a series of transmission elements as shown in the figure below.
The input signal has the power of P1 = 4 mW. The 1st element is a
Transmission line with a 12 dB loss, the 2nd element is an amplifier with
a 35 dB gain, and the 3rd element is a transmission line with a 10 dB loss.
Calculate the output power P4.
-13 dB
12 dB
-35 dB
10 dB
P1 = 4 mW
P4 = ???
10 ⋅ log
G [dB]
Pout
Pin
= −13 [dB]
Pout
↔
L [dB]
Pin
= -1.3 = Pin ⋅ 101.3 = 4 ⋅ 19.95 = 79.8 [mW]
10
9
Transmission Impairments: Delay Distortion
10
Delay Distortion – change in signal’s form / shape
•
each signal component has its own propagation
speed through a medium, and therefore, its own
delay in arriving at the final destination
•
critical for composite-analog & digital signals –
some of the signal components of one bit position
will spill over into other bit, causing ‘intersymbol
interference’
ƒ major limitation to achieving high bit rates
•
in bandlimited channels, velocity tends to be
highest near the center frequency and fall off
towards the edges of the band
Transmission Impairments: Noise
11
Noise – unwanted signals that get inserted / generated somewhere
between transmitter and receiver
•
major limiting factor in communications system performance
ƒ cannot be predicted – appears at random!
•
presence of noise limits the reliability with which the receiver
can correctly determine the information that was transmitted
•
main categories of noise:
(1) thermal noise
(2) intermodulation noise
(3) crosstalk
(4) impulse noise
Transmission Impairments: Noise (cont.)
12
(1) Thermal Noise – result of random motion of electrons – appears in
all electronic devices and transmission media –
cannot be eliminated
•
function of temperature
•
uniformly distributed across frequency spectrum
⇒ aka white noise
•
noise power density (No) = amount of thermal noise
to be found in a bandwidth of 1Hz
No = k ⋅ T [W/Hz]
where k = Boltzmann’s constant = 1.3803*10-23 [J/K]
T = temperature [K]
•
thermal noise (N) in [W], in a bandwidth of B [Hz]
N = k ⋅ T ⋅ B [W]
Example Calculate N on 20C and 1GHz: N = k*(273+20)*109 = 3.8*10 -12 .
13
Transmission Impairments: Noise (cont.)
(2) Intermodulation Noise – signals that are sum / difference of original
frequencies sharing a medium
• result of nonlinearity in transmission medium –
output signal is a complex function of the input
Vo(t)
linear channel
Vo(t)
Vi(t)
non-linear channel
Vi(t)
(3) Crosstalk – effect of one wire on the other – one wire acts as a sending
antenna and the other as the receiving antenna
• can be reduced by careful shielding and using twisted pairs
• of the same magnitude, or less, than thermal noise
(4) Impulse Noise – non-continuous, consisting of irregular pulses or
noise spikes of short duration and of relatively high
amplitude
• induced by external electromagnetic disturbances, such
as lightening, faults and flaws in communication system
Transmission Impairments: Noise (cont.)
14
Signal to Noise Ratio – ratio of the power in the desired signal
to the power in the superimposed noise
(SNR)
SNR =
average signal power
average noise power
SNR (dB) = 10 log10 SNR
•
high SNR ⇒ high-quality signal & low number
of required amplifiers / repeaters
Analog Transmission
Analog Long-Distance
Communications
•
each repeater attempts to restore analog
signal to its original form
•
restoration (noise removal) is imperfect –
noise gets amplified too !
Goals:
1) restore amplitude
2) remove delay distortion
3) remove noise
15
ƒ if signal only had components in certain freq.
band, repeater could remove noise components
outside signal band – but, not those inside /
•
signal quality decreases with # of repeaters
⇒ communications is distance-limited
•
analogy: copy a song using cassette recorder
Attenuated and
distorted signal
+
noise
Recovered signal
+
residual noise
Amp
Equalizer
Repeater
16
17
Digital Transmission
Digital Long-Distance
Communications
•
regenerator does not need to completely
recover the original shape of the transmitted
signal – it only needs to determine whether
the original pulse was positive or negative
•
original signal can be completely recovered
each time ⇒ communication over very long
distance is possible
•
analogy: copy an MP3 file
compensate for
distortion
introduced by the
channel
Decision circuit
and signal
regenerator
Amplifier
equalizer
keep track of
intervals that
define each pulse
Timing
recovery
sample signal
at midpoint
of each pulse to
determine its
polarity
18
Digital Transmission (cont.)
Example [ transmission impairments in digital transmission ]
Digital transmission can easily recover from various types of channel
impairments.
0.5
1
0
So, is digital transmission the ultimate winner?!
Analog vs. Digital Transmission
19
Low-pass Channel – bandwidth = [0, f1)
•
entire medium/bandwidth dedicated to 2 devices
•
devices alternate in transmission
Band-pass Channel – bandwidth = [f1, f2)
•
medium is shared among multiple users
•
each pair of users gets a portion of overall
bandwidth
Analog vs. Digital Transmission (cont.)
Digital Transmission
Advantages
Digital Transmission
Disadvantages
•
signal can be transmitted over long-distance
without loosing any quality
•
can operate with lower signal levels ⇒ lower
system cost
•
easier to apply encryption
•
easier integration of voice, video and data
20
•
digital signal theoretically needs a bandwidth
[0, ∞) – upper limit can be relaxed if we decide
to work with a limited number of harmonics ⇒
digital transmission needs a low-pass channel
•
analog transmission can use a band-pass
channel
Both analog and digital data may be transmitted on suitable transmission
media using either digital coding or analog modulation.
Analog vs. Digital Transmission (cont.)
digital or
analog
data
digital or
analog
data
low-pass channel
(digital signal)
band-pass channel
(analog signal)
digital or
analog
data
digital or
analog
data
21
Analog vs. Digital Transmission (cont.)
Example [ digital transmission of digital and analog data ]
Digital Data → Digital Signal: Line Coding
Analog Data → Digital Signal: PCM (Pulse Code Modul.) or
Delta Modulation
22
Analog vs. Digital Transmission (cont.)
Example [ analog transmission of digital and analog data ]
Digital data → Analog Signal: Digital Modulation
Analog data → Analog Signal: Analog Modulation
23
Last Note about Signals …
24
Throughput – measurement of how fast data can pass through an
entity in the network (computer, router, channel, etc.)
•
if we consider this entity as a wall through which bits
pass, throughput is the number of bits that can pass this
wall in one second
e.g. R=56 kbps
Example [ throughput ]
If the throughput at the connection between a device and the transmission
medium is 56 kbps, how long does it take to send 100,000 bits out of this
device?
t=
N [bits ] 100000 [bit]
=
= 1,786 [sec]
R [bps] 56000 [bps]
Last Note about Signals … (cont.)
Propagation Time – measures the time required for a signal (or a
bit) to travel from one point of transmission
medium to another
d
p = [sec]
c
• d – length of physical link [m]
• c – signal propagation speed in medium ∼ 2*108 [m/s]
Example [ propagation time ]
The light of the Sun takes approximately 8 minutes to reach the Earth?
What is the distance between the Sun and the Earth?
m
8 m
d = p [sec] ⋅ c [
] = 8 * 60 [sec] ⋅ 3 ⋅10 [
] = 144 ⋅ 10 9 [m] = 144 ⋅ 10 6 [km]
sec
sec
25
Last Note about Signals … (cont.)
Overall Delay
•
•
•
•
L [bits]
R [bps]
d [m]
c [m/s]
number of bits in message
speed of digital transmission system
distance in meters
speed of light (3x108 m/s in vacuum)
Time to deliver a block of L bits:
Delay = tpropagation + ttransmission = d/c + L/R seconds
How can
Use data compression to reduce L.
theUse
time
to speed
download
a filetobe
minimized???
higher
modem/cable
increase
R.
Place server closer to reduce d.
http://media.pearsoncmg.com/aw/aw_kurose_network_2/applets/transmission/delay.html
26
Data Rate Limits in Digital Transmission
27
Max Data Rate [bps] – depends on three factors:
• bandwidth available
Over a Channel?
•
•
# of levels in digital signal
quality of channel – level of noise
Nyquist Theorem – defines theoretical max bit rate in noiseless
channel [1924]
•
even perfect (noiseless) channels have limited
capacity
Shannon Theorem – Nyquist Theorem extended [1949]– defines
theoretical max bit rate in noisy channel
•
if random noise is present, situation deteriorates
rapidly!
T
Data Rate Limits: Nyquist Theorem
28
Intersymbol Interference – the inevitable filtering effect of any practical
channel will cause spreading of individual
data symbols that pass through the channel
• this spreading causes part of symbol energy
to overlap with neighbouring symbols causing
intersymbol interference (ISI)
• ISI can significantly degrade the ability of the
data detector to differentiate a current symbol
from the diffused energy of adjacent symbols
impulse response:
delayed pulse with ringing
narrow pulse
Bandwidth:
B[Hz]
Ts = 1/2B
As the channel bandwidth B increases, the width of the impulse response decreases
⇒ pulses can be input in the system more closely spaced, i.e. at a higher rate.
29
Data Rate Limits: Nyquist Theorem
Impulse Response – response of a low-pass channel (of bandwidth B)
to a narrow pulse h(t), aka Nyquist pulse:
s(t) =
•
sin(2πBt)
2πBt
zeros: where sin(2πBt)=0 ⇒ t =
1
2B
1.2
1.21
0.8
1
0.6
0.8
0.4
0.6
0.2
0.4
-7
-6
-5
-4
-3
-2
-7T
-6T
-5T
T
-4
T
-3
T
-2
0.20
-1-0.2 0
0
-0.4 0
T
-1-0.2
1
2
3
4
5
6
7
T1
T2
T 3
T 4
T 5
T 6
T 7
t
-0.4
TS =
1
2B
2
2B
3
2B
What is the minimum pulse/bit duration time to avoid significant ISI?!
30
Data Rate Limits: Nyquist Theorem
Example [ system response to binary input 110 ]
1
2
1
0TS
-2
-1
0
0
1
TS
2
3
4
-2
-1
0
1
2
3
4
-1
TS
-2
-1
three separate pulses
combined signal
Assume: channel bandwidth = max analog frequency passed = B [Hz].
New pulse is sent every TS sec ⇒ data rate = 1/TS [bps] = 2B [bps]
The combined signal has the correct values at t = 0, 1, 2.
rmax
1 pulse
⎡ pulses ⎤
=
= 2W = 2B ⎢
TS second
⎣ second ⎥⎦
Maximum signaling rate that is achievable through an ideal low-pass channel.
Data Rate Limits: Nyquist Theorem
Nyquist Law – max rate at which digital data can be transmitted
over a comm. channel of bandwidth B [Hz] is
Cnoiseless = 2 ⋅ B ⋅ log2M [bps]
•
M – number of discrete levels in digital signal
•
M ↑ ⇒ C ↑, however this places increased burden
on receiver – instead of distinguishing one of two
possible signals, now it must distinguish between M
possible signals
ƒ especially complex in the presence of noise
max
amplitude
if spacing between
levels becomes too
small, noise signal
can cause receiver to
make wrong decision
Typical noise
min
amplitude
Four signal levels
Eight signal levels
31
Data Rate Limits: Nyquist Theorem
Example [ multilevel digital transmission ]
2-level encoding: C=2B [bps]
one pulse – one bit
4-level encoding: C=2*2=4B [bps]
one pulse – two bits
8-level encoding: C=2*3=6B [bps]
one pulse – three bits
100110100011010010 ⇒
100110100011010010 ⇒
32
Data Rate Limits: Shannon Theorem
33
Shannon Law – max transmission rate over a channel with bandwidth
B, with Gaussian distributed noise, and with signal-tonoise ratio SNR=S/N, is
Cnoisy = B ⋅ log2 (1+ SNR) [bps]
• theoretical limit – there are numerous impairments in every
real channel besides those taken into account in Shannon's
Law (e.g. attenuation, delay distortion, or impulse noise)
• no indication of levels – no matter how many levels we use,
we cannot achieve a data rate higher than the capacity of
the channel
• in practice we need to use both methods (Nyquist & Shannon)
to find what data rate and signal levels are appropriate for
each particular channel:
The Shannon capacity gives us the upper limit!
The Nyquist formula tells us how many levels we need!
Data Rate Limits
Example [ data rate over telephone line ]
What is the theoretical highest bit rate of a regular telephone line?
A telephone line normally has a bandwidth of 3000 Hz (300 Hz to 3300 Hz).
The signal-to-noise ratio is usually 35 dB (3162) on up-link channel
(user-to-network).
Solution:
We can calculate the theoretical highest bit rate of a regular telephone line
as:
C = B log2 (1 + SNR) =
= 3000 log2 (1 + 3162) =
= 3000 log2 (3163)
C = 3000 × 11.62 = 34,860 bps
34
Data Rate Limits
35
Example [ data rate / number of levels ]
We have a channel with a 1 MHz bandwidth. The SNR for this channel is 63;
what is the appropriate bit rate and number of signal level?
Solution:
First use Shannon formula to find the upper limit on the channel’s data-rate
C = B log2 (1 + SNR) = 106 log2 (1 + 63) = 106 log2 (64) = 6 Mbps
Although the Shannon formula gives us 6 Mbps, this is the upper limit.
For better performance choose something lower, e.g. 4 Mbps.
Then use the Nyquist formula to find the number of signal levels.
C = 2 ⋅ B ⋅ log2M [bps]
4 Mbps = 2 × 1 MHz × log2 L Î L = 4
Download