CH 11
CH 11
Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Pulse Amplitude Modulation (PAM) Block Diagram of PAM System PAM Block Diagram Description Block Diagram Description (cont. 1) Block Diagram Description (cont. 2) Block Diagram Description (cont. 3) Intersymbol Interference (ISI) Eye Diagrams Formula for Eye Closure Nyquist Criterion for No ISI Nyquists Criterion (cont.) Raised Cosine Shaping Filters Raised Cosine Filters (cont.) Splitting the Shaping Interpolation Filter Bank Interpolation Filter Bank (cont.) Symbol Error Probability vs. SNR
Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide Slide
18 19 20 21 22 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Symbol Error Probability (2) Symbol Error Probability (3) Symbol Error Probability (4) Symbol Error Probability (5) Symbol Error Probability (6) Generating a Symbol Clock Tone Generating a Clock Tone (cont. 1) Generating a Clock Tone (cont. 2) Generating a Clock Tone (cont. 3) Generating a Clock Tone (cont. 4) Generating a Clock Tone (cont. 5) Generating a Clock Tone (cont. 6) Theoretical Exercises Theoretical Exercises (cont. 1) Theoretical Exercises (cont. 2) Theoretical Exercises (cont. 3) Theoretical Error Probability Making a PAM Signal Frequency Response of the Shaping Filter Using a Mailbox for Outputs Using a Mailbox (cont.) Generating a Baud Synch Signal Making a Clock Tone Generator Making a Tone Generator (cont.)
40 41 42 43 44 45
Testing the Tone Generator Testing the Generator (cont. 1) Testing the Generator (cont. 2) Optional Team Exercise Optional Team Exercise (cont. 1) Optional Team Exercise (cont. 2)
'
Chapter 11 Digital Data Transmission by Baseband Pulse Amplitude Modulation (PAM) Goals
Learn about baseband digital data transmission over bandlimited channels by PAM. Learn how to generate bandlimited PAM signals using baseband shaping lters realized by interpolation lter banks. Learn about intersymbol interference (ISI). Eye diagrams to show ISI The Nyquist criterion for no ISI Raised cosine shaping lters for no ISI Derive a symbol error probability formula. & Implement a symbol clock recovery method.
11-1
'
. .. .. .. .. ..
di . .
an
Impulse Modulator
s (t)
Transmit Filter GT (! )
s(t)
r(t)
v (t)
x(nT0
+ )
Adaptive Equalizer
y (nT )
- Quantizer
an ^
Symbol Clock Recovery ^ di Parallel to Serial Converter Receiver Map from 2J Levels to J -bit Words
. .. .. .. .. .. ..
. .. .. .. .. .. ..
&
11-2
'
The minimum level is (M 1)d and the maximum level is (M 1)d. The symbol rate is fs = 1/T = Rd /J symbols/sec or baud. &
11-3
'
s (t) =
k=
ak (t kT )
s(t) =
k=
ak gT (t kT )
The combination of impulse modulator and transmit lter is a mathematical model for a D/A converter followed by a lowpass lter. The channel is modeled as a lter C() followed by an additive noise source. The receive lter eliminates out-of-band noise and, in conjunction with the transmit lter, forms a properly shaped pulse. &
11-4
'
and the corresponding impulse response is g(t) = gT (t) c(t) gR (t) = F 1 {G()} The combined lter G() is called the baseband shaping lter. The output of the receive lter is
x(t) =
k=
&
The output of the receive lter is sampled at a rate that is an integer multiple N of the symbol rate fs . Typically, N might be 3 or 4. These samples are used by the Symbol Clock Recovery system to lock the receiver symbol clock to the transmitter clock.
11-5
'
11-6
'
Then, if the additive noise is zero, the samples of the receive lter output at the symbol instants are x(nT ) =
k=
ak [n k] = an
which are exactly the transmitted symbols. The transmit and received lters are usually designed so their cascade, GT ()GR (), has no ISI with, perhaps, some compromise equalization for the expected channel. &
11-7
'
2
Eye Diagrams
1.5
0.5
0.5
1.5
0.2
0.4
0.6
1.4
1.6
1.8
Eye Diagram for a Raised Cosine Channel with 12% Excess Bandwidth With zero noise, baud rate samples of the receive lter output are
x(nT ) =
k=
ak g(nT kT )
&
11-8
'
x(nT ) = g(0) an +
k= k=n
g(nT kT ) ak g(0)
The right-hand sum is the ISI for the received symbol. The worst case ISI occurs when the symbols ak have their maximum magnitude (M 1)d and the same sign as g(nT kT ). Then
(M 1)d
k= k=n
(M 1)d
k= k=0
k= k=0
g(kT ) g(0)
'
G()ejnT d
g(nT ) =
k=
s 2
1 s
s 2
ks
s ks 2
1 G()ejnT d T
=
k=
1 s
s 2
1 G( ks )ej(ks )nT d T
Recognizing that ejkns T = ekn2 = 1 and taking the sum inside the integral gives 1 g(nT ) = s &
s 2
G ()ejnT d
s 2
11-10
'
k=
G( ks )
The function G () is called the aliased or folded spectrum. There is no ISI if and only if G () = 1 because then the integral at the bottom of the previous slide becomes 1 g(nT ) = s
s 2
ejnT d = [n]
s 2
&
11-11
'
[0, 1] is the excess bandwidth factor. 1 0.8 0.6 G() 0.4 0.2 00 0.2 0.4 0.6 f /f s 0.8 1
for (1 ) s || (1 + ) s 2 2 elsewhere
1 sin
||
s 2
&
11-12
'
cos s t 2 1 4(t/T )2
The program C:\DIGFIL\RASCOS.EXE computes samples of the impulse response modied by the Hamming window. Special Cases If = 0, the raised cosine lter becomes an ideal at lowpass lter with cuto frequency s /2. If = 1, the frequency response has no at region and is one cycle of a cosine function raised up so it becomes 0 at the cuto frequency of s . As the bandwidth is increased by making closer to 1, the impulse response decays more rapidly.
&
11-13
'
11-14
'
This approach places the computational burden on the DSP and allows a simple analog output lowpass lter to be used. The transmit lter continuous-time output is
s(t) =
k=
ak gT (t kT )
s nT + m T = L
k=
ak gT nT + m T kT L for m = 0, 1, . . . , L 1
Now let L discrete-time interpolation sublters be dened as gT,m (n) = gT (nT + m T ) for m = 0, . . . , L 1 L
&
11-15
'
Notice that the sublters, gT,m (n), are FIR lters with T spaced taps. The L output samples for the symbol period starting at time nT are
s(nT + m T ) = L
k=
ak gT,m (n k)
for m = 0, 1, . . . , L 1 Next, the sublter outputs are multiplexed to a D/A converter at the rate of Lfs samples/second. Finally, the D/A output is passed through a simple analog lowpass lter. The interpolation lter bank is illustrated in the next slide. In practice, the transmit lter impulse response is truncated to a nite duration by a window function.
&
11-16
'
T;
(n) (n)
B B B
s(nT )
B B B
T;
..
-
Q Q
D/A +
L L
Lowpass Filter
s(t)
-
T ;L
(n)
s nT
&
11-17
'
|GT ()|2 d
With the square-root of raised cosine transmit lter, this reduces to E{a2 } n Ps = T &
11-18
'
E{a2 } n
2 = M
M/2
k=1
d2 [d(2k 1)] = (M 1) 3
2 2
and the transmitted power is d2 Ps = (M 2 1) 3T The noise at the output of the square-root of raised cosine receive lter has the variance 1 2 = 2
(1)
N0 N0 |GR ()|2 d = 2 2
(2)
Also, the channel noise power in the Nyquist band (s /2, s /2) is PN & 1 = 2
s /2 s /2
N0 N0 d = 2 2T
(3)
11-19
'
Since there is no ISI, the samples of the receive lter output have the form x(nT ) = an + vR (nT ) where vR (nT ) is a sample of the channel noise ltered by the receive lter. The received sample x(nT ) is quantized to the nearest ideal level an . Error Probability for Inner Points For the M 2 inner levels, an error is made if the noise magnitude exceeds d, half the distance between points. In this case, the symbol error probability is PI = P (|vR (nT )| > d) = 2Q(d/) where Q(x) is the Gaussian tail probability
Q(x) =
x
1 t2 e 2 dt 2
&
11-20
'
Error Probability for the Outer Points For the level (M 1)d the error probability is PO+ = P (vR (nT ) < d) = Q(d/) For the outer level (M 1)d the error probability is PO = P (vR (nT )) > d) = Q(d/) = PO+ The total symbol error probability is Pe = = & 1 1 M 2 PI + PO+ + PO M M M M 1 2 Q(d/) M
11-21
'
Solving the transmitted power equation (1) for d and using formula (2) for the receive lter output noise power and formula (3) for the channel noise power, the error probability can be expressed in terms of the channel signal-to-noise ratio Ps /PN as 1/2 M 1 Ps 3 Pe = 2 Q M M 2 1 PN
- Squarer
p(t)
z (t)
PhaseLocked Loop
( - t)
&
11-22
'
s /2 0 s /2
Let the combined baseband shaping lter and prelter frequency and impulse responses be G1 () = G()B() and g1 (t) = g(t) b(t) Then, the prelter output is
q(t) = &
k=
ak g1 (t kT )
11-23
'
=
k= m=
ak am g1 (t kT )g1 (t mT )
p(t) is passed through a bandpass lter H() centered at the symbol rate s .
H()
s 0 s
&
z(t) looks like a sinusoid at the clock frequency with slowly varying amplitude and phase. Its zero crossings cluster together. z(t) is applied to a phase-locked loop to generate a stable symbol clock.
11-24
'
It will be assumed that the symbols are a sequence of zero-mean uncorrelated random variables. Therefore, E{ak am } = a2 k,m The expected value of the squarer output is
E{p(t)} =
k= m=
This reduces to
(t) = E{p(t)} = a2
k=
2 g1 (t kT )
(t) is periodic with period equal to the symbol period T . It can be expressed as a Fourier series of the form
E{p(t)} =
k=
pk ejks t
&
11-25
' where
E{p(t)}ejks t dt
0
pk
= =
a T 2
G1 ()G1 (ks ) d
The expected value of the output bandpass lter is also periodic with the Fourier series expansion
E{z(t)} =
k=
zk ejks t
G1 ()G1 (ks ) d
11-26
'
11-27
'
&
11-28
'
Theoretical Exercises
1. Write a C function to generate pseudo-random four-level symbols. The function should use a 23-stage self synchronizing shift register sequence generator with the connection polynomial h(D) = 1 + D18 + D23 or 1 + D5 + D23
as discussed in Chapter 9, to generate the binary sequence dn . Generate the four-level sequence an from pairs of binary symbols (d2n , d2n+1 ) according to the rule an = (1)d2n (1 + 2d2n+1 )d where d is a desired scale factor. 2. Draw a vertical axis and show the 4 levels. Label each level with its analog value and also the corresponding pair of binary digits.
&
11-29
'
3. Design an interpolation lter bank. Use the program C:\DIGFIL\RASCOS.EXE to generate the sublter coecients. Use a symbol rate of fs = 1/T = 4 kHz. First, use an excess bandwidth factor of = 1.0.
Truncate the shaping lter impulse response to the interval [4T, 4T ] with a Hamming window. Generate L=16 samples of the PAM signal per symbol interval, that is, generate the sequence s(kT /16). 4. Generate data for an eye diagram that extends over two symbol intervals. Write enough pairs (mod(k, 32), s(kT /16)) to a le to form a reasonably lled out 4-level eye diagram. &
11-30
'
11-31
'
5. Plot the shaping lter impulse response and eye diagram for = 1. 6. Change to 0.125 and generate a new eye diagram. Plot the new shaping lter impulse response and eye diagram. Discuss dierences in the impulse responses and eye diagrams for the two cases. 7. Comment on how the excess bandwidth factor aects the required symbol sampling time accuracy in the receiver. 8. Square-Root of Raised Cosine Shaping Repeat the raised cosine exercises for a square-root of raised cosine baseband shaping lter, but only for = 0.125. Also, compute the peak fractional eye closure dened on Slide 11-9 from the shaping lter impulse response. &
11-32
'
9. Theoretical Error Probability The error probability can be expressed in terms of the channel signal-to-noise ratio Ps /PN as M 1 Pe = 2 Q M 3 Ps M 2 1 PN
1/2
under the following conditions: A at channel frequency response. Symbols from the M level alphabet are used with equal probability. Symbols selected at dierent times are uncorrelated random variables. The noise is white and Gaussian with power spectrum N0 /2. The transmit and receive lters have square-root of raised cosine responses. Plot Pe for M = 2, 4, and 8 on the same graph as a function of the channel signal-to-noise ratio Ps /PN . Plot Pe on a logarithmic scale and 10 log10 (Ps /PN ) dB on a linear scale.
&
11-33
'
11-34
'
gn ejnT /4
g0 + 2
n=1
gn cos(nT /4)
Compute and plot the amplitude response of your lter in dB over the frequency range of 0 to 8 kHz. &
11-35
'
There are a variety of ways to structure the program. Here is one approach to try. Write output samples to the McBSP DXR with an interrupt routine triggered by the serial port transmit interrupts (XINT). Write the samples to the left channel. Determine the symbol timing by counting interrupts modulo 4. Set up an 8-word circular buer as a mail box. One half of the buer (4 words) will be used to hold the output samples for the current symbol period, and the remaining half will be used to store the four samples for the next symbol period. Each symbol period, the input and output halves will be swapped. These are sometimes called ping pong buers.
Output 0 1 2 3 0 1 2 3
&
Input
11-36
'
Initialize the output pointer to the address of the rst word in the buer and the input pointer to fth word. Before starting data transmission, set the interrupt count to 0 to indicate the start of a symbol. At the start of each symbol period, generate four output samples, and write them to the mailbox. Do this in the main routine. The input pointer should be incremented circularly after each sample is written to the mailbox. After the four samples are written to the mailbox, the main routine should wait for the interrupt count to become 0. Remember, the interrupt routine should count interrupts modulo 4.
&
11-37
'
The transmit interrupt service routine should write the sample addressed by the output pointer to the DXR, increment the output pointer circularly modulo 8, and increment the interrupt count modulo 4.
'
Write a program for the DSP to implement the symbol clock recovery system discussed in Slides 11-22 11-28 to the point labelled z(t) on Slide 11-22. Do not implement the phase-locked loop. Use the same raised cosine baseband shaping lter you designed for the C6x PAM signal generator. The sampling rate for all operations in the symbol clock tone generator should be 4fs = 16 kHz. Write the PAM output samples to the left channel D/A converter. Connect the left channel line output to the left channel line input. Send the input samples to your clock tone generation function. For the prelter, B(), design a second-order IIR lter with a center frequency of fs /2 = 2 kHz and roughly a 100 Hz 3 dB bandwidth. &
11-39
'
For the postlter, H(), design a second-order bandpass IIR lter with a center frequency of 4 kHz and a 3 dB bandwidth of roughly 25 Hz. You should experiment with these bandwidths and observe how they aect the system performance. Write the tone generator system output samples z(nT /4) to the right channel output.
'
11-41
'
11-42
'
11-43
'
The sampling phase of the codec cannot be altered, so you will have to pass the received samples through a variable phase interpolator that compensates for the phase dierence between the transmit and receive clocks. Variable phase interpolators are discussed in the next chapter. You can lock the phase of the receiver symbol clock to the positive zero crossings of the symbol clock tone generator. In addition you will have to compensate for any delays in the system so that samples are taken at the symbol instants, that is, at the point where the eye has its maximum opening. You should also process the received samples with a baseband version of the T /2 spaced adaptive equalizer described in Chapter 15. The equalizer will automatically adjust for any symbol sampling phase oset but not for a frequency oset. &
11-44
'
&
11-45