Comp 346/488: Intro to Telecommunications
Tuesdays 7:00-9:30, Lewis Towers 412
Class 3
Chapter 3 readings (7th-9th editions):
3.1: Concepts
3.2: Analog & Digital
3.3: Transmission impairments
3.4: Channel Capacity
Also read:
4.1
5.2-5.5
sin(x)sin(3x) = 0.5 cos (2x) - 0.5 cos(4x)
Integral from 0 to π is 0.
Last week we looked at a wireshark trace of a SIP-initiated call.
Packets were 214 bytes, and were sent every 20ms. 20ms × 8
bytes/ms = 160 Bytes; I claimed that the headers were
14 B Ethernet + 20 B IP + 20 B TCP
The headers should have been:
14 B Ethernet + 20 B IP + 8 B UDP + 12 B RTP
Time v Frequency Domain
You can take any signal, periodic or not, and apply the Fourier
transform to get a frequency-domain representation. This can be messy,
but is not particularly deep. Or helpful: having a signal composed of
complex sine waves of continuously varying frequency can be intractable.
Most voice signals are not periodic at larger scales: people say different words.
What is useful, though, is the
idea that over small-but-not-too-small intervals, say 10-100ms, voice
does indeed look like a set of periodic waves. At this point, the
frequency-domain view becomes very useful, because it is just a set of
discrete frequencies.
In other words, "sound is made up of vibrations".
Maybe even more importantly, most digital data signals similarly look
"almost periodic", often over much larger intervals than voice. So the
same principle applies: translation to the frequency domain is actually
useful.
When we start looking at the details of audio highpass, lowpass, and
bandpass filters (eg for audio), we'll see that they involve averaging
over a time interval. If that time interval is too large, the signal
may no longer look very periodic and we may get misleading or distorted
results. If the time interval is too small, the filter may not be
"sharp" enough.
Files to look at
Ashortmono.text
Dshortmono.text
Numeric sound representation of A (440 Hz) and D notes
3.2: transmission (highlights)
analog transmission: needs amplifiers to overcome attenuation.
digital transmission: store-and-forward (or cut-through) switches?
Switches do signal regeneration, not amplification; noise is NOT added. BUT: we need them a lot more often.
data may need some form of encoding: analog may (eg AM modulation),
or equalization.
Digital encoding: NRZ is basic (1=on, 0=off), but isn't good in
real life.
Table 3.1 on page 82 (9th ed) (p 85 in 8th ed)
Data: the original data format
Signal: the signal actually transmitted
Transmission: how we handle that signal on the wire.
analog v data v (encoding | transmission)
Note analog data/analog signal is an odd case.
Signals v Transmission:
Normally these should match. Note special case of analog signal /
digital trans, which is taken to mean that the analog signal encodes a
digital signal in a way that the repeater knows how to decode and re-encode.
Section 3.3: Transmission impairments
-
Attenuation
-
high-frequency attenuation: signal distortion
-
Delay distortion
-
Noise
-
crosstalk (noise from other signals)
-
impulse noise (eg noise from electrical appliances)
Attenuation
1. need strength for reception
Ethernet problem with detecting collisions
2. need strength above noise level
3. attenuation increases with frequency, leading to distortion
"loading coils" in voice telephony: cut off frequencies outside of a desired range; tremendous out-of-band attenuation
attenuation measured in dB; dB per unit distance
p 85 (9th edition), fig 3.15a: relative attenuation in voice range
brief review of decibels: logarithmic scale of relative power:
db = 10 log10 (P/Pbaseline)
1 & 2 can be addressed with amplification.
3rd problem introduces fundamental distortion.
Audio: see top graph of Fig 3.15; note use of equalization to make up for high-frequency loss
Digital: high-frequency attenuation => signal degradation
Attenuation: leads to distortion of relative frequency strengths
Delay Distortion (like differential frequency attenuation, but different): different (sine) frequencies travel at different speeds.
Again, this leads to digital signal degradation, and some audio distortion.
Noise
Thermal noise:
N (watts) =
kTB, B=bandwidth, T=temp, k=Boltzmann's constant (small!). Thermal
noise is relevant for satellite transmission, but other sources of
noise are usually more important for terrestrial transmission.
Note that thermal noise is proportional to the analog bandwidth; ie, it affects all frequencies identically.
Example 3.2
Discuss dBW
Intermodulation noise
Brief discussion on why it isn't universal.
Intermodulation noise requires some nonlinear interaction between the signals!
A linear combination of frequencies f1 and f2 (ie just transmitting them side-by-side in space) does not produce energy at f1+f2.
Crosstalk
Impulse noise
-
Fridge story
-
Bad for data
-
Most significant noise for ordinary wiring
Interference (a form of impulse noise, from sharers of your frequency range)
Somebody else is using your frequency. Perhaps to make microwave popcorn. (Or perhaps you are simply driving around in the country listening to the radio.)
Other sources of noise:
- poor connectors
- cosmic rays / sunspots (form of impulse noise)
- signal reflections from connectors/taps
3.4: Channel capacity
Nyquist: max binary signal rate = 2 × band width
Hard to realize in practice.
Signal rate v data rate: if we send L bits per signal element, then the
data rate is L*signal_rate. One way to do this is to use M=2L distinct signal values (eg distinct amplitudes, etc)
Signal rate is sometimes called "modulation rate".
Traditionally measured in baud. Note that for a 56k "baud" modem, it's the data rate that is 56kbps; the signaling rate is 8000/sec.
Compare Nyquist to the Sampling Theorem, which says that a
frequency of
B can be exactly reproduced if it is sampled at a rate of 2B. (Note:
the sampling theorem allows for exact reproduction only if the sampled
values are exact. In real life, the sampled values are digitized, and
thus "rounded off"; this is called quantizing error.)
Basis of Nyquist's theorem: fundamental mathematics applied to individual sine waves.
signal rate, also known as data rate, is measured in bits per second,
and is sometimes called "bandwidth" in non-analog settings.
The Nyquist limit does not take noise into account.
Compare with example at end of section 3.1, where the best case was
data rate = bandwidth
Note that if we are talking about a single sin(x), then analog band width = 0! sin(x) does not carry any useful information.
This is a special case for binary transmission; here is the
extension for multi-level encoding. We can consider a signal of, say;,
1000
transitions per second, but with multiple levels (M many). Then max
data rate = 2B*log2(M). (For binary signals, M=2 and log2(M)=1, so we just get the formula above.). Log2(M) is the number of bits needed to encode M.
Example: M=8, log2(M) = 3
Nyquist example: binary data rate = 2B. With M levels, we can carry log2(M) bits where we used to only carry 1 bit.
Why can't we just increase the bits per signal indefinitely?
Answer: noise.
Shannon: considers noise.
Define the signal-to-noise ratio, SNR or S/N. Often measured in dB.
Then:
C ≤ B log2(SNR + 1)
B = bandwidth
C = max channel capacity
Example: 3000Hz voice bandwidth, s/n = 30 dB. or a ratio of 1000.
C = 3000*log2(1000) = 3000*10 = 30kbps
Note that increasing signal strength does tend to increase noise as
well. Also, increasing bandwidth increases noise more or less in
proportion. So: increasing B does lead to more thermal noise, and thus
by Nyquist's formula SNR will decrease.
equate the two:
C = 2B log2(M) ≤ B log2(SNR+1)
M2 ≤ SNR+1
Example on page 85: SNR = 251; combine with Nyquist to infer M≤16
56kbps modem: C=56kbps, B=3100Hz. C/B = 18
18 = log2(1 + SNR); SNR ~ 218 = 260,000 = 54 dB
Nyquist and 56Kbps modem: B=4kHz; 128 = 27 levels
Shannon and 28/56Kbps modems
Eb/N0
noise is proportional to bandwidth; let N0 = noise power per Hertz.
Eb
= energy per bit of signal (eg wattage of signal × time-length of
bit; this decreases with increased signaling rate (shorter time)).
Ratio is Eb/N0
Note that this is a dimensionless quantity, though as a ratio of energy levels it is often expressed in dB.
bit error rate decreases as this increases; significant for optical fiber designers
Examples in the book assume N0 is all thermal noise, equated to kB, but the notion makes sense when there is other noise too.
Figures in the book (9th edition) involving BER v Eb/N0:
Figure 5.4: for various digital encoding schemes
Figure 5.13: for multilevel FSK v PSK
Figure 6.8: illustrating how error-correcting codes affect this
chapter 4: transmission media
EM spectrum: Figure 4.1
Table 4.1: Attenuation of various media
consider attenuation & interference for the following.
Note: attenuation measured in dB/km! implications!
coax 7dB/km at 10mHz (fat coax); as in fig 4.3b (seems low)
2 dB/km at 1mHz
twisted pair
fig 4.3a on twisted-pair attenuation in db/km as a function of frequency
voice-grade v cat-5 25 to 12 dB/km
1kHz: 0.2dB/km (with coils), 3dB/km (without coils)
jumps to 10-25dB/km at 1mHz.
Slow ethernet: 10-20mHz
At 16 mHz, attenuation per tenth of a km:
13 dB (cat 3)
8 dB (cat 5) (80 dB/km)
Why is it TWISTED??
summary: Coax has less attenuation, much less crosstalk/interference, but is $$
fiber
fiber modes: fig 4.4 (7-9 editions)
-
step-index multimode
-
graded-index multimode
-
single-mode
light source: lasers or LEDs (the latter is cheaper)
ADSL issues:
Table 4.2, page 100: 2.6dB/100m!! (at 1 mHz)
Over the maximum run of 5 km, this works out to an incredible 90dB loss!
384Kbps: 17,000 feet
1.5mbps: 12,000 feet
ADSL must deal with tremendous signal attenuation!
Thermal noise becomes very serious!
4.2: Antennas
mostly we will skip this.
Satellite note: I used to have satellite internet.
My transmitter was 2 watts. This reaches 23,000 miles.
Problem with satellite phone links: delay
Frequencies: < 1.0 gHz: noisy
> 10 gHz: atmospheric attenuation
4.3: propagation
High-frequency is line-of-sight, but low frequency (<= ~ 1 mHz) bends
In between is "sky-wave" or ionospheric skip (2-30mHz)
Once upon a time, AT&T had chains of microwave towers, ~50 miles
apart. They would relay phone calls. They're obsolete now, replaced by
fiber.
Is it cheaper to bury 50 miles of cable, or build one tower?
4.4: line-of-sight:
Attenuation, inverse-square v exponential
water vapor: peak attenuation at 22gHz (a 2.4gHz microwave is not "tuned" to water)
rain: scattering
oxygen: peak absorption at 60 gHz
cell phones: 824-849mhz
pcs: 1.9ghz
It's not clearly spelled out in one place in chapter 4, but be aware
that wire attenuation is exponential, while wireless attenuation is
proportional to the square of the distance, meaning that in the long
run wire attenuation becomes much more significant than wireless. See
the beginning of 4.4 for the wireless-attenuation issue ("free space
loss").
chapter 5: encoding techniques
5.1 digital data/digital signal
data rate v modulation rate
(ethernet: data rate 10Mbps, modulation rate 20Mbaud)
phone modems: data rate 56kbps, modulation rate 7kbaud
RZ, NRZ
issues:
clocking
analog band width: avoid needing waveforms that are *too* square
DC component (long distances don't like this)
noise
NRZ flavors
inversion (NRZ-I) v levels (NRZ-L)
differential coding (inversion) may be easier to detect than comparison to reference level
Also, NRZ-I guarantees that long runs of 1's are self-clocked
Problems:
DC component: non-issue with short (LAN) lines, huge issue with long lines
losing count / clocking (note that NRZ-I avoids this for 1's)
Requirements:
- no DC component
- no long runs of 0 (or any constant voltage level)
- no reduction in data rate through insertion of extra bits
bipolar (bipolar-AMI): 1's are alternating +/-; 0's are 0
Fixes DC problem! Still 0-clocking problem
Note that bipolar involves three levels: 0, -1, and +1.
biphase: (bi = signal + clock)
Example: Manchester (10mbps ethernet)
10mbps bit rate
20mbps baud rate (modulation rate)
bipolar-8-zeros (B8ZS)
1-bits are still alternating +/-; 0-bits are 0 mostly.
If
a bytes is 0, that is, all the bits are 0s (0000 0000), we replace it
with 000A B0BA, where A = sign of previous pulse and B=-A.
This sequence has two code violations. The receiver detects these code violations & replaces the byte with 0x00.
Note the lack of a DC component
Example: decoding a signal
Bipolar-HDB3: 4-bit versoin of B8ZS
4b/5b
4-bit data
|
5-bit code
|
0000
|
11110 |
0001
|
01001 |
0010
|
10100 |
0011
|
10101 |
...
|
|
1100
|
11010 |
1101
|
11011 |
1110
|
11100 |
1111
|
11101 |
IDLE
|
11111 |
DEAD
|
00000 |
HALT
|
00100 |
4b/5b involves binary levels, unlike bipolar. It does entail a 20% reduction in the data rate.
It is used in 100-mbit Ethernet (and maybe gigabit Ethernet?)
Fig 5.3 (8th, 9th edition): spectral density of encodings
Lowest to highest:
-
biphase (Manchester, etc)
-
AMI,
-
B8ZS
Latter is narrower because it guarantees more transitions
=> more consistent frequency
Fig 5.4: theoretical bit error rate
biphase is 3 dB better than
AMI: not sure why. This means that, for the same bit error rate,
biphase can use half the power per bit.
5.2: digital data/analog signal: deferred to class 4
5.3: analog data/digital signal
sampling theorem: need to sample at twice the max frequency, but not more
basic idea of PCM
sampling v quantization
nonlinear encoding versus "companding" (compression/expansion)
µ-law (mu-law) encoding (used in the US)
µ = 255
F(x) = sgn(x)*log(1+µ*|x|) / log(1+µ), -1<=x<=1
-1<=F(x)<=1
F(1)=1, F(-1)=-1, F(0)=0
F(0.5)= .876
F(0.1)= .591
F(0.01)= .228
F(0.001)= .041
A-law encoding: slightly different formula, used in Europe.
delta modulation: I have no idea if this is actually used.
bias against higher frequencies, which is ok for voice but not data
advantage: one bit!
Performance:
voice starts out as a 4kHz bandwidth.
7-bit sampling at 8kHz gets 56kbps, needs 28kHz analog bandwidth (by Nyquist)
(Well, that assumes binary encoding....)
BUT: we get
- repeaters instead of amplifiers
-
digital reliability
-
no cumulative noise
-
can use TDM instead of FDM
-
digital switching
voice: often analog=>digital, then encoded as analog signal!