Comp 346/488: Intro to Telecommunications

Tuesdays 7:00-9:30, Lewis Towers 412

Class 4: Sept 21

Chapter readings (7th-9th editions):
    4.1
    5.2-5.5
    8.1, 8.2
    10.1-10.5
   
correct (no frequency-roundoff) oscillator: in my "convolution" directory, along with correct 440.wav, 442.wav files

WavReader.java and reader.java are in my class /java directory.



Homework 1, due Oct 5
problem numbers from 9th edition, which is the same as the 7th and 8th editions unless noted.
3.12 (see §3.2 for video info)
3.15
3.16
3.18a (not in 7th edition)
Given the narrow (usable) audio bandwidth of a telephone transmission facility, a nominal SNR of 56 dB (400,000), and a certain level of distortion, (a) What is the theoretical maximum channel capacity (kbps) of traditional telephone lines?

3.20 (second 3.19 in 8th edition? Not in 7th edition)
Consider a channel with a 1-mHz capacity and an SNR of 63.
(a). What is sthe upper limit to the data rate that the channel can carry?
(b). The result of part (a) is the upper limit. However, as a practical matter, better error performance will be achieved at a lower data rate. Assume we choose a data rate of 2/3 of the maximum theoretical limit. How many signal levels are needed to achieve this data rate?

3.22. This is also 3.22 in the 8th edition, but 3.20 in the seventh. Note: power in Asin(ft) is A2/2.

4.2
4.3


Asterisk demo

Three analog phones, two SIP phones. Extensions:
To retrieve messages, dial your own extension, then press "*". You will be prompted for a password (=extension in my setup).

Private network; box "asterix" is dhcpd server for 10.5.13.0/24. "dhcpd eth0" must be started manually.

FreePBX demo

SIP phone config demo
    I'd like to have the asterisk server be configured as a DHCP option

Note that while Asterisk and the phones share a secret ("candelabra23"), and Asterisk is configured to know about the extensions, Asterisk is not otherwise configured to know about the phones. A phone could "lie" about its extension!

asterisk -rv

dialplan extension_pld.conf

; demo extensions for pld experiments
; sounds are in /var/lib/asterisk/sounds/en
; The "en" is appended automatically

[from-internal]
exten => 1248,1,Answer()
exten => 1248,n,Playback(hello-world)
exten => 1248,n,Hangup()

exten => 9000,1,Answer()
exten => 9000,n,Playback(cantdo)
exten => 9000,n,Hangup()

These are of the form "exten => num,seq#,action".
The two extensions here are 1248 and 9000, which do not physically exist (that is, they do not represent phones).
An "n" for seq# means "next in sequence".

Try calling 3030 or 3031 with "dnd" pressed. Watch the asterisk console.

The usual dialplan is to connect the call!

Note that in a real PBX, we would need to be able to examine incoming connections and figure out what extension to connect them to. This is "direct inward dialing", or DID.

See extensions_additional.conf for more. Some in particular to look at:

5.3:  analog data/digital signal

Pulse-Code Modulation, or PCM:
Note that regardless of the sample accuracy, we will always have a fair bit of high-frequency energy at the sampling frequency (this might be audible as "hiss" in a voice system). It is common to introduce an analog lowpass filter to remove some of this.

PCM DS0 performance:
voice starts out as a 4kHz bandwidth.
7-bit sampling at 8kHz gets 56kbps, needs 28kHz analog band-width (by Nyquist)
(Well, that assumes binary encoding....)
BUT: we get
voice: often analog=>digital, then encoded as analog signal! (Though nowadays it would be much more likely to remain as a digital signal, sent over DS-N / SONET lines).

8-bit µ-law companding is sometimes said to approximate 14-bit wav format.


5.4:  analog data/analog signal

Why modulate at all?
        FDM (Frequency-Division Multiplexing)
        higher transmission frequency
simplest is AM.
bandwidth is worth noting
new frequencies at carrier +/- signal are generated because of nonlinear interaction (the modulation process itself).

SSB: slightly more complex to generate and receive, but:
Sound files: beats.wav v modulate.wav
Latter has nonlinearities

(1+sin(sx)) sin(fx)  = sin(fx) + sin(sx)sin(fx)
        = sin(fx) + 0.5 cos((f-s))x) - 0.5 cos((f+s)x)

reconsider "intermodulation noise". This is nonlinear interactions between signals, which is exactly what modulation here is all about.


Angle Modulation

FM v PM: hard to tell apart, visually.
m(t) = modulation signal (eg voice)
(transmitted) signal = A cos (2πf*t + phi(t))
FM: k*m(t) = phi'(t). m(t) =const => phi(t) = kt; that is, frequency is steadily higher
PM: k*m(t) = phi(t).  m(t) = const => phi(t) = const

Figure 5.24

Somewhat surprisingly, FM and PM often sound very similar. One reason for this is that the derivative (and so the antiderivative) of a sine wave is also a sine wave. There's distortion in terms of frequency, but most voice frequencies are in a narrow range.

Picture: consider a signal m(t) = 0 0 1 1 1 1 1 1 0 0 0 0
FM,PM both need more bandwidth than AM
AM:    bandwidth = 2B, B=bandwidth of orig signal

FM,PM: bandwidth = 2(β+1)B, where again B = bandwidth of original signal.

where β = npAmax for PM, A_max = max value of m(t).
For FM, β =  delta_F/B, delta-F = peak frequency difference.

2B + delta-F, delta-F = frequency variation  (can't be too low)


5.2:  digital data/analog signal

modems, long lines & fiber
(even long copper lines tend to work better with analog signals)

ASK: "naive", though used for fiber
FSK: shift color in optical fiber (not common)
PSK: easier to implement (electrically) than FSK

Superficially, ASK appears to have zero analog band width, but this is not really the case!

ASK: 1 bit /hertz => 4000 bps max over voice line

1 bit/ 2Hz, 2400 Hz carrier => 1200 bps.



FSK analog band width = high_freq - low_freq

BFSK v MFSK: fig 5.9 for MFSK

BFSK: fig 5.8: old modems, full-duplex

MFSK: the trouble is, it takes time to recognize a frequency (several cycles at least!)

FSK is supposedly more "noise-resistant" than ASK, but fig 5.4 shows the same graph of Eb/N0 v BER for the two. (PSK is shown 3 dB lower (better) in that graph)



BPSK: decoding starts to get very nonintuitive!

DPSK: differential, like differential NRZ

QPSK: 4 phase choices, encoding 00, 01, 10, 11
9600bps modem: really 2400 baud; 4 bits per signal element (12 phase angles, four of which have two amplitude values, total 16 distinct values per signal, or 4 bits)



Nyquist limit applies to modulation rate: noise reduces it.

56Kbps modems: use PCM directly.
Station gets data 7 bits at a time, every 1/8 ms, and sets the output level to one of 128 values.

If there is too much noise for the receiver to distinguish all those values, then use just every other value: 64 values, conveying 6 bits, for 48kbps. Or 32 values (using every fourth level), for 5*8 = 40 kbps.

============
QAM



Brief comparison of Fig 5-8 and Fig 8-5. Both show side-by-side bands, interfering minimally. The first is of two bands in the voice range (1 kHz and 2 kHz respectively), representing a modem sending in opposite directions. The second is of multiple 4 kHz voice bands AM-modulated (using SSB) onto carriers of 60 kHz, 64 kHz, 68 kHz, ....