Phil Lucht Math & Physics Archive
Home / Math and Physics Files / Math / Spectral Theory Book / Work for Aug 2013 Update / new and old sections

aug 8 retired sec 35 thru 38

DOCX · 840.5 KB
Open DOCX file

Archived draft sections removed from Phil's Spectral Theory book before the August 8, 2013 update. The visible part, Section 35, defines a statistical pulse train as an ensemble of PAM sequences and contrasts horizontal and vertical averages. It uses stationarity and large-N assumptions to show that the single-train and ensemble autocorrelations agree. It then derives the power spectrum of an infinite uncorrelated pulse train, a continuous part plus discrete spectral lines. Sections 36-38 were not seen.

AI-written summary; may contain errors. This description is approximate.

Extracted text (machine-read; may contain errors)
before installing on Aug 8, 2013 I saved off these former Sections 35,36,37,38 35. Statistical Pulse Trains (a) What is a Statistical Pulse Train? Suppose we capture a 1 GHz PAM signal (zeros and ones) for 1 μsec and thus grab a sequence of N = 1,000 symbols ym (perhaps using a logic analyzer or digital scope). We could compute the average value for this sequence and we might find <ym>1 = 0.55. Here <...>1 refers to a horizontal average over a single pulse train amplitude sequence. By its definition, this average cannot depend on the index m, we are just computing an average of the ym values in the sequence, <ym>1 = (1/N) Σm=1N ym . Now it might be that during this 1 μsec, there was something unusual about the data being sent, so that this measurement of <ym>1 = 0.55 is not really representative over a longer term. One alternative would be to capture a much longer sequence. Rather than do this, our approach will be to grab very many 1 μsec pulse trains and form an ensemble of these representative pulse trains. Perhaps we do this for a whole minute, so the ensemble then has a huge number (call it I) of pulse trains. We then write down these amplitude sequences in a vertical list on a very tall piece of paper, one sequence below the next. We then number the positions in the sequences 1 to N and we then define <ym> as the vertical average through this ensemble of the sequences in position m. This vertical average is written <ym> = (1/I) Σi=1I ym(i) and in theory this could be different for different columns m. For example, consider this ensemble of sequences which has N = 6 and I = 3: 1 2 3 4 5 6 a b c d e f sequence #1 a' b' c' d' e' f' sequence #2 a" b" c" d" d" f" sequence #3 We would have <ym>1 = (a+b+c+d+e+f)/6. // horizontal average for the first sequence <y3> = (c + c' + c")/3 // vertical average for column 3 Our pulse train sequence has a random variable Ym associated with each pulse train position, m = 1,2...N, and the vertical average <ym> is the expected value of Ym over the ensemble, normally written <ym> = E(Ym). The experiment associated with Ym is the generation of a pulse train by some Apparatus, the experiment is run many times, and the outcomes for random variable Ym are the values of the symbols located in position m of these pulse trains. See Appendix G for the meaning of "random variable". The ensemble is characterized by various statistical properties, such as E(Ym) or E(YnYmYk), each being a vertical average down through the ensemble. Our statistical pulse train is an idealized pulse train whose amplitudes form a statistical sequence whose statistics ( like E(Ym) and E(YnYmYk) ) exactly match those of the ensemble. It is not any particular member of the ensemble, since any member might deviate somehow. And it is certainly not the average of the pulse trains in the ensemble, since this average pulse train would have amplitudes ym = <ym> which has nothing to do with anything ( and also would have illegal symbols, e.g., ym = 1/2). If N were very large, a pulse train of the ensemble might come close to being a statistical pulse train. Common usage refers to our statistical pulse train as a random pulse train whose sequence of amplitudes is a random sequence. The problem with this terminology is that the word "random" suggests for example that <ym> = the mean value of Ym in the ensemble = 1/2. That is to say, the word random suggests a flat distribution where p(1) = 1/2 and p(0) = 1/2. But if p(1) = 1/3 and p(0) = 2/3, our ensemble would still be associated with a statistical pulse train, Any value of p ≡ p(1) would describe a statistical pulse train, along with the other statistical properties. This same subtle implication of the word random appears in Appendix G on "random variables" and basic probability theory. In what follows, we shall only be concerned with the first and second order statistics of the statistical pulse train, which are <ym> = E(Ym) and <ymyn> = E(YmYn). (b) Spectral Power Density for a Statistical Pulse Train A Tale of Two Formulas With the above introduction, we now imagine an ensemble of pulse trains such that: I = number of pulse trains in the ensemble N = length of each pulse train in symbols ym = are real, not complex, as appropriate for values of the random variable Ym We are interested in the ensemble averages of E(ω) and P(ω) and P. We indicate the ensemble average of some quantity Q by <Q>. By averaging equations (34.13) through (34.15) we obtain <E(ω)> = Ppulse(ω) T1 !Syntax Error, I !Syntax Error, I <ymyn> eiω(m-n)T (35.1) <P(ω)> = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ymyn> eiω(m-n)T (35.2) <P> = !Syntax Error, Idω <P(ω)> (35.3) where the vertical ensemble average <ymyn> is given by <ymyn> = (1/I) !Syntax Error, I ym(i)yn(i) . (35.4) If we define s ≡ n-m and use z ≡ eiωT as in (24.1) , we can rewrite (35.1) as <P(ω)> = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ymym+s> z-s . (35.5) Recall now an earlier expression for P(ω) of a single pulse train, P(ω) = Ppulse(ω) | Y"(z) |2 = Ppulse(ω) R"(z) (34.14a) R"(z) ≡ !Syntax Error, I rs z-s // Z Transform of rs rs ≡ !Syntax Error, I ynyn+s ≡ <ymym+s>1 = autocorrelation sequence (32.17) We can now compare this single pulse train expression with the ensemble expression, P(ω) = Ppulse(ω)!Syntax Error, I <ymym+s>1 z-s one pulse train z ≡ eiωT (35.6) <P(ω)> = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ymym+s> z-s ensemble of pulse trains (35.5) These are our "two formulas" for spectral power density. We now want to compare the two averages appearing in these equations : <ym>1 cannot depend on m from its definition as a horizontal average over a sequence. <ym> might depend on m <ymym+s>1 = rs cannot depend on m from its definition (32.17), but generally depends on s <ymym+s> may depend on m as well as s <ymym+s>1 is not associated with any random variables <ymym+s> is associated with random variables Ym and Ym+s as outlined above If Ym and Ym+s are independent random variables, then <ymym+s> = <ym>< ym+s> (see App G). In contrast, the statement <ymym+s>1 = <ym>1< ym+s>1 = <ym>1< ym>1 = < ym>12 might be true, but has no connection to any random variables upon whose independence this factoring could be postulated. In order to make a connection between these two kinds of averages, we have to make a few assumptions. Assumptions of the Large N Regime (1) The first assumption is that the Apparatus generating the pulse trains of the ensemble is a "stationary stochastic process" which means that <ym> does not depend on m <ymym+s> does not depend on m (35.7a) It is understood that <ymym+s> = 0 if one or both of the subscripts goes off the end of the pulse train and of course <ym> = 0 for m outside the pulse train. We imagine the finite pulse train as being preceded and followed by an infinite string of pulses with 0 amplitudes. (2) The second assumption is that the pulse trains of the ensemble are long enough (large enough N) so that each ensemble member is a "statistical pulse train" in that it very closely has the statistics of the ensemble. This does not mean that the ensemble pulse trains are the same. (35.7b) One implication of the second assumption is that all member pulse trains (i = 1,2.. I) then have the same autocorrelation function and we may then write rs(i) = <ymym+s>1(i) = (1/N) Σm=1N ym(i) ym+s(i) = the same for all i = 1 to I. ≡ rs ≡ <ymym+s>1 . (35.8) Consider then, Σm=1N <ymym+s> = N <ymym+s> . // assumption (1) On the left side of this equation we insert the definition of <ymym+s> <ymym+s> = (1/I) Σi=1I ym(i) ym+s(i) with this result Σm=1N (1/I) Σi=1I ym(i) ym+s(i) = N <ymym+s> . Now reorder the sums to get (N/I) Σi=1I [(1/N) Σm=1N ym(i)ym+s(i)] = N <ymym+s> (N/I) Σi=1I <ymym+s>1(i) = N <ymym+s> (1/I) Σi=1I <ymym+s>1 = <ymym+s> // use (35.8) and cancel the N's <ymym+s>1 [ (1/I) Σi=1I 1 ] = <ymym+s> <ymym+s>1 = <ymym+s> . As a special case, we can set s = 0 to get <ym2>1 = < ym2> . In similar fashion, our assumption (2) implies that all pulse trains in the ensemble have the same horizontal mean, so <ym>1(i) ≡ <ym>1 . (35.8') Consider then Σm=1N <ym > = N <ym> // assumption (1) Σm=1N [ (1/I) Σi=1I ym(i)] = N <ym> (N/I) Σi=1I (1/N) Σm=1N [ym(i)] = N <ym> (N/I) Σi=1I <ym>1(i) = N <ym> (1/I) Σi=1I <ym>1 = <ym> // use (35.8') and cancel the N's <ym>1 = <ym> . Thus, with assumptions (1) and (2) regarding our ensemble of pulse trains (which assumptions require that the pulse train length N be very large), we have found that <ymym+s>1 = <ymym+s> <ymym>1 = <ymym> <ym>1 = <ym> . (35.9) These relations are equalities for N = ∞, are approximately valid for large N, and are invalid for small N. In this special situation, if in addition the random variables Ym and Ym+s are independent, not only may we write E(YmYm+s) = E(Ym)E(Ym+s) <ymym+s> = <ym>< ym+s> // independent, s≠ 0 but we may also write, from assumption (1), <ymym+s> = <ym>< ym> = <ym>2 // independent, s≠0 (35.10) which by (35.9) then justifies the claim that <ymym+s>1 = <ym>1< ym>1 = <ym>12 // independent, s≠0 (35.11) (c) Spectral Power Density of an Infinite Uncorrelated Pulse Train Here we loosely use the term "uncorrelated" to mean that our Large N Regime assumptions (35.7) are met and that random variables Yn associated with our ensemble are independent. This does imply that the Yn are uncorrelated, see Appendix G. In this regime, we can momentarily forget about the ensemble and compute the spectral power density from (34.14a) which says P(ω) = Ppulse(ω) R"(z) where R"(z) is the Z transform of the autocorrelation sequence rs = <ymym+s>1 . The ensemble is still there, however, and one should not forget about it, but under our assumptions all the elements of the ensemble have the same P(ω) so <P(ω)> = P(ω). With the assumptions above leading to (35.9), we may now compute the spectral power density of an infinite pulse train when the random variables Yn are independent. We define μ as E(Yn) for the ensemble and then relate it as per (35.9) to <ym>1, μ ≡ <ym> = <ym>1 (35.12) so that <ymym+s>1 = <ym>12 = μ2 . // independent (35.13) Then from (G.30) we have σ2 = E(Yn2) - E(Yn)2 = <yn2> - <yn>2 = <yn2>1 - <yn>12 = <yn2>1 - μ2 from which <yn2>1 = μ2 + σ2 . (35.14) Our autocorrelation function is then s=0 r0 = <yn2>1 = μ2 + σ2 s≠0 rs = <ymym+s>1 = μ2 = limN→∞ [!Syntax Error, I yn yn+s ] (32.16) (35.15) One usually plots rs in this manner : Fig 35.1 All that remains is to compute R"(z): R"(z) = !Syntax Error, I rs z-s = !Syntax Error, I{ μ2 } z-s + { σ2+μ2 } = μ2 !Syntax Error, I z-s + σ2 . Since z = eiωT from (24.1) we have z-s = e-iωTs . Then we can use (13.2) (valid for either exponential sign) !Syntax Error, Ie-ink = !Syntax Error, I2πδ(k - 2πm) -∞ < k < ∞ . (13.2) with k = ωT1 to get !Syntax Error, I z-s = !Syntax Error, I2πδ(ωT1 - 2πm) and we thus have, R"(z) = σ2 + μ2 !Syntax Error, I2πδ(ωT1 - 2πm) (35.16) so the spectral power density from (34.14a) is P(ω) = Ppulse(ω) [σ2 + μ2!Syntax Error, I2πδ(ωT1 - 2πm)] . (35.17) Since 2πδ(ωT1 - 2πm) = (2π/T1) δ (ω - 2πm/T1) = ω1 δ(ω - mω1) = δ( - m) (35.18) we have these alternate forms P(ω) = Ppulse(ω) [σ2 + ω1 μ2 !Syntax Error, I δ(ω - mω1) ] (35.17a) P(ω) = σ2 Ppulse(ω) + ω1 μ2 !Syntax Error, I Ppulse(mω1)δ(ω - mω1) (35.17b) P(ω) = Ppulse(ω) [σ2 + μ2!Syntax Error, I δ( - m) ] (35.17c) P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) In general, the spectrum has a continuous part σ2Ppulse(ω) and the rest is discrete. Some of the spectral lines may be killed off if Ppulse(mω1) = 0 for certain values of m. If the symbol mean μ vanishes, the discrete part goes away. The continuous part is in effect created by the variance of the distribution pYn(x). Verification To find external verification for (35.17), we write things in terms of f where ω = 2πf, Ppulse(ω) = = // (34.4) and text after (1.4) P(f) = 2πP(ω) // (34.4) last item 2π δ(ωT1-2πm) = 2π δ(2πfT1-2πm) = (1/T1) δ( f - m/T1) . Then (35.17) becomes P(f) = { σ2 + !Syntax Error, I δ( f - m/T1) } or P(f) = { σ2 + !Syntax Error, I δ( f - m/T1) } (35.17c) This may be compared to result (A.17) in Appendix A of Xiong which we quote, Symbols in the set {A,B} As a simple example, suppose the set of symbols that our yi can take is just {A,B}. Then the pmf distribution associated with random variable Yn (see Appendix G) is quite simple : pYn(x) = p if x = A pYn(x) = 1-p if x = B . (35.19) We can then compute μ = <ym> = [p]A + [1-p]B (35.20) For n ≠ m we then have <ymyn> = <ym>2 = μ2 = { pA + (1-p)B }2 = [pp] AA + [p(1-p)] AB + [(1-p)p]BA + [(1-p)(1-p)]BB (35.21) and for n = m, <ym2> = [p]AA + [(1-p)] BB . (35.22) In the square brackets [..] we indicate the probability of some case occurring, and this is multiplied by the value that the quantity in question takes in that case. Notice how the long expression for <ymyn> makes complete sense if one enumerates all possibilities. The variance may be computed as σ2 = <yn2> - μ2 = [p]AA + [(1-p)] BB - { pA + (1-p)B }2 = [p(1-p)] (A-B)2 (35.23) where Maple helps out With our assumptions leading to the identifications (35.9) we obtain the spectrum of an infinite statistical pulse train with independent amplitudes in the set {A,B} P(ω) = Ppulse(ω) [σ2 + μ2 !Syntax Error, I2πδ(ωT1 - 2πm)] = Ppulse(ω) [ p(1-p)(A-B)2 + (pA + (1-p)B)2 !Syntax Error, I2πδ(ωT1 - 2πm)] (35.24) For the interesting case that p = 1/2 this becomes P(ω) = Ppulse(ω) [ (A-B)2 + (A+B)2 !Syntax Error, I2πδ(ωT1 - 2πm)] (35.25) (d) Spectral Power Density of a Finite Uncorrelated Pulse Train We assume now that the yn vanish outside the range n = (-N,N) so the finite pulse train is 2N+1 symbols long. Our pulse train ensemble then contains a set of I pulse trains of length 2N+1. We assume N is large enough so the assumption (35.7a) is still reasonable. This certainly rules out numbers like N = 1,2,3.. but might be reasonable for N = 100 and beyond, with decreasing error as N increases. For very small pulse trains, one can only express results in terms of the specific yn which appear and statistics is not useful. We shall use the following expression for <P(ω)> which is the ensemble average for our ensemble of finite pulse trains of length 2N+1 and duration T = (2N+1)T1, <P(ω)> = Ppulse(ω) <| Y"(z) |2> = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ym yn> eiω(m-n)T (34.14) = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ym yn> zn-m z = eiωT . (35.26) where z = eiωT from (24.1). We make the stationarity assumption (35.7a) that <ym> and <ymym+s> do not vary with m, and we go on to assume that the Yn are independent so that <ymyn> = <ym>2 for m≠n and that <ymyn> = <ym2> for m = n. In this case, <ymyn> is independent of indices m and n within the range of the pulse train, and of course <ym2> is also independent of m, being the s=0 case of <ymym+s> not varying with m. As before, we define μ and σ : μ ≡ <ym> for m≠ n <ym yn> = <ym>2 = μ2 σ2 = <ym2> - <ym>2 = <ym2> - μ2 => <ym2> = μ2 + σ2 . (35.27) We then take the double sum in (35.26) through a long set of simple processing steps, !Syntax Error, I !Syntax Error, I <ym yn> zn-m = !Syntax Error, I !Syntax Error, I μ2 zn-m + !Syntax Error, I !Syntax Error, I( μ2 + σ2) zn-m = !Syntax Error, I[ μ2 !Syntax Error, I zn-m + ( μ2 + σ2) !Syntax Error, I zn-m ] = !Syntax Error, I[ μ2 (!Syntax Error, I zn-m – !Syntax Error, I) zn-m + ( μ2 + σ2) !Syntax Error, I zn-m ] = !Syntax Error, I[ μ2 !Syntax Error, I zn-m + σ2 !Syntax Error, I zn-m ] = !Syntax Error, I[ μ2 !Syntax Error, I zn-m + σ2 !Syntax Error, I 1 ] = !Syntax Error, I[ μ2 !Syntax Error, I zn-m + σ2 ] = μ2 (!Syntax Error, Izn)( !Syntax Error, Izm)* + (2N+1) σ2 (35.28) Since z = eiωT we use (13.3) , !Syntax Error, I eink = 2π { } ≡ 2π δ5(k,N) . -∞ < k < ∞ (13.3) where δ5 is one of several multi-peak "delta function models" discussed in Appendix A. We identify eink = zn = einωT so that k = ωT1 and then (!Syntax Error, Izn ) = 2π { } ≡ 2π δ5(ωT1,N) . Our double sum evaluation is then !Syntax Error, I !Syntax Error, I <ym yn> zn-m = μ2 [2π δ5(ωT1,N)]2 + (2N+1) σ2 We next use another model δ6 from Appendix A, δ6(k,N) ≡ = . (A.20) to write [2π δ5(ωT1,N)]2 = (2N+1) 2π δ6(ωT1,N) so the double sum now has this form !Syntax Error, I !Syntax Error, I <ym yn> zn-m = (2N+1) [ μ2 2π δ6(ωT1,N) + σ2 ] (35.29) and we then arrive at our calculated value for <P(ω)> for the finite pulse train <P(ω)> = Ppulse(ω) [σ2 + μ2 2π δ6(ωT1,N) ] . (35.30) We then argue that, although N is finite, N is large enough so that any pulse train in the ensemble is a statistical pulse train having the statistics of the ensemble as a whole, which means all the pulse trains have the same P(ω) and so <P(ω)> = P(ω) and then P(ω) = Ppulse(ω) [σ2 + μ2 2π δ6(ωT1,N) ] . (35.31) In the limit N→∞ we know that limN→∞ δ6(k,N) = limN→∞ = !Syntax Error, Iδ(k-2πm) (A.21) so we obtain P(ω) = Ppulse(ω) [σ2 + μ2 2π!Syntax Error, Iδ(ωT1-2πm)] // N = ∞ (35.32) which replicates our earlier result (35.17) for the infinite pulse train. Comment 1: The method used in this section could have been used in the previous section to derive the power spectral density for an infinite pulse train. In fact, by taking the limit N→∞ of (35.31) to get (35.32) we did just that! This ensemble method makes no mention of autocorrelation. We chose to use the autocorrelation method in our infinite pulse train analysis just to demonstrate the method and its assumptions (which are not always stated). Thus, we have demonstrated both formulas from our Tale of Two Formulas. Xiong uses the autocorrelation method in his baseband chapter. Comment 2: If we blindly repeat the finite N calculation using the autocorrelation method with the same rs shown in (35.15) and Fig 35.1, we obtain R"(z) = !Syntax Error, I rs z-s = !Syntax Error, I{ μ2 } z-s + { σ2+μ2 } = μ2 !Syntax Error, I z-s + σ2 = σ2 + μ2 2π δ5(ωT1,2N) which does give the correct result as N→∞. But for finite N, as Fig A.6 shows, if σ2 is small and μ2 large, then this function R"(z) goes negative in places near the peaks, which conflicts with R"(z) = | Y"(z) |2 being everywhere non-negative ( δ6 never goes negative). This paradox is explained by realizing that for finite N, if the ensemble random variables are independent, we have for s≠ 0 that <ymym+s> = < ym >2, but the identifications of (35.9) are only approximate for finite N so <ymym+s>1 = <ym>12 is only approximately true, creating the error just noted. (e) Statistical Uncorrelated Pulse Trains: Summary and Examples Here then is a brief summary of the above results: Spectral Power Density of an Uncorrelated Statistical Pulse Train (35.33) x(t) = !Syntax Error, I yn xpulse(t - nT1) // or !Syntax Error, I for a finite pulse train P(ω) = Ppulse(ω) [ σ2 + μ2 !Syntax Error, I2πδ(ωT1 - 2πm)] // infinite (35.17) P(ω) = Ppulse(ω) [ σ2 + μ2 2π δ6(ωT1,N) ] // finite (35.31) If symbols are restricted to {A,B} then : σ2 = p(1-p) (A-B)2 and for p = 1/2 σ2 = (A-B)2 (35.23) μ = pA + (1-p)B and for p = 1/2 μ2 = (A+B)2 (35.20) Example: Suppose A = 1 and B = 0 so that σ2 = p(1-p) and μ2 = p2. If we go on to assume p = 1, then every pulse has amplitude 1 and we have a simple pulse train. In this case σ2 = 0 and μ2 = 1 so P(ω) ≡ Ppulse(ω)!Syntax Error, I 2πδ(ωT1 - 2πm) joules which agrees with our infinite simple pulse train result (33.25). As we reduce p below p = 1, the line spectra are scaled down by μ2 = p2 < 1, and a continuous spectrum starts to appear with σ2 = p(1-p). The randomness (variance σ2) of the amplitudes creates a continuous component in the spectral power density. As p reaches p = 1/2, we get σ2 = 1/4 and μ2 = 1/4 to give this classic result P(ω) = Ppulse(ω) [(1/4) + (1/4) !Syntax Error, I2π δ(ωT1- 2πm) ] p = 1/2 (35.34) Finally, when p reaches p = 0, then every pulse has B = 0, x(t) ≡ 0, σ2 = 0, μ2 = 0, and so P(ω) = 0. There is nothing left. (f) A numerical example of a Statistical Pulse Train Recall from box (34.4) that for a finite pulse train, P(ω) = Ppulse(ω) = T = (2N+1)T1. (35.35) Therefore we can write (35.34) as = |Xpulse(ω)|2 [(1/4) + (1/4) 2π δ6(ωT1,N) ] . (35.36) We shall use for xpulse(t) a square pulse of height A=1 and width τ = T1 = 1 so that, from (9.2), | Xpulse (ω) | = sinc(ω/2) . (35.37) Since our pulse train will be fairly short (N = 20 pulses) and since we shall only average a small number of pulse trains (M = 10), we know our result will not exactly match (35.36). Still, we hope to see in our result some kind of continuous background spectrum which approximates the curve (1/4)|Xpulse(ω)|2 = (1/4) sinc2(ω/2), and we expect to see delta-function-like peaks which, since 2πδ6(0,N) = (2N+1), have a peak value of about (1/4)41 = 10.25. Since this will be added to the continuous background, the central peak should have a height of 10.25 + .25 = 10.5. However, for our small ensemble, we won't have exactly p = 1/2, so the delta peak won't be exactly 10.5 units high. We know that δ6 has identical peaks spaced by 2π, but we expect the non-central peaks to be suppressed by the sinc2(ω/2) zeros which occur at ω = m(2π). Here is the self-documented Maple program which generates <|X(ω)|2>. The program also generates the quantity <X(ω)> upon which we shall comment in (g) below. At this point, before Xpulse(ω) is added to the result, we plot <|X(ω)|2>. As expected, we see the peaks of δ6 spaced by 2π and having height around 10 units, Fig 35.2 We now insert copies of Xpulse(ω) as appropriate, and then we can plot for ω in the same range (-10,10) Fig 35.3 We see that the zeros of the sinc function have killed off the adjacent peaks. Next, we restrict the plot height to be 0.8 units to view the detail, chopping off the δ6 peak, Fig 35.4 The spectrum is seen to have a continuous component which very well approximates one quarter of the sinc2 curve, as we hoped it would. This tracking also occurs away from the central peak. Here is a blow-up of the above plot for ω in the range (5, 30) Fig 35.5 It might be noted that Maple does this work analytically, so that Was-av is a function of ω having a large number of trigonometric terms. For the reader's interest, we show Was-av(ω) for a typical program run : In more serious work with larger numbers, one would of course do this in a more numeric fashion, but we are able to confirm the basic results even with this small experiment. (g) What role has the Autocorrelation Function played in our development? In Section 32 the autocorrelation function was first introduced as rx(t) for x(t), and was computed for the simple case of a box pulse. Treating the definition of rx(t) as a convolution equation, the Wiener-Khintchine Relation Rx(ω) = |X(ω)|2 was trivially derived, where Rx(ω) is the Fourier Integral Transform of rx(t). It was then shown that the spectral energy density of a pulse train is E(ω) = (1/2π) Rx(ω) due to this relation. It was then shown that rx(0) = E, the total energy in the pulse train. We then commented on the origin of the name, showing that the auto-correlation function is the cross-correlation function of a function with itself. Finally, we developed the Z Transform version of the Wiener-Khintchine Relation R"(z) = (T1/T) | Y"(z) |2 where R"(z) is the Z Transform of the autocorrelation sequence rs. Section 33 (simple pulse trains) made no mention of autocorrelation. In Section 34 (general pulse trains) it was noted again that P = rx(0)/T since P = E/T, and that P(ω) = Rx(ω)/ (2πT) since Rx(ω) = |X(ω)|2. At the end of section (b) both E(ω) and P(ω) are stated in terms of R"(z) . In Section 35 (statistical pulse trains) the autocorrelation sequence was used as one of two pathways to calculate a statistical spectral power density under certain assumptions. It was later noted that the other pathway could have been used, with no need to mention autocorrelation, and this second pathway was in fact used for the finite pulse train case. This leads us to make several comments: (1) The autocorrelation function/sequence need play no role whatsoever in our development of key equations such as P(ω) = Ppulse(ω) [σ2 + μ2 2π!Syntax Error, Iδ(ωT1-2πm)] N→∞ (35.32) (2) In some textbooks, one gets the impression that the autocorrelation function is somehow crucial for the development of such equations. It is not. (3) Our main reason for even bringing it up is that autocorrelation is closely related to what we are doing, and in other applications such as those involving noise (and pseudo-noise PN) it becomes more significant. In such applications, the definition of rx(t) might include a normalizing factor so it is then autocorrelation per unit time, or per pulse (per chip in the PN world). (4) In (34.14a) we note that P(ω) = Ppulse(ω)R"(z) where R"(z) is the Z Transform of the autocorrelation sequence rs defined in (32.17). Then in Appendix F (e) we compute R"(z) for a sequence which respects certain simple conditions met by a Maximum Length Sequence (MLS). The resulting P(ω) is not easily computed in any other manner, so in this case the pathway through the autocorrelation route is extremely valuable. (h) A paradox and its resolution Now while here, we can back up and apply our statistical average directly to the spectrum in (34.6) using (34.7). The result is <X(ω)> = Xpulse(ω) !Syntax Error, I<yn> e-inωT . (34.6,7) From (35.20) we have <yn> = [p] A + [1-p] B = p if A=1, B=0 . (35.38) In this case, we can extract p from the above sum, which then collapses to form the usual (13.2) delta function sum. The result is then the same as the regular pulse train result (14.4) with an overall factor of p out front, namely, <X(ω)> = p !Syntax Error, IXpulse(mω1) 2π δ( ωT1 - 2πm) . (35.39) This says that our average spectrum is 100% discrete, there is no continuous part! If p = 1/2, the average spectrum is just 1/2 times our discrete unit amplitude pulse train spectrum (14.4). How can this be true, if we just showed in (35.17) that the average spectral density <|X(ω)|2> has a continuous spectral component? The answer lies in the fact that <ab> ≠ <a><b>, where < > is our averaging operation. Thus <|X(ω)|2> ≠ <X(ω)><X(ω)*> . (35.40) There is no reason in the world why the average of a product should be the product of the averages, ( Σi=1N AiBi) ≠ ( Σi=1N Ai) ( Σi=1N Bi) . In the numerical example presented in Section 35 (f), we computed <X(ω)> for a small ensemble of pulse trains. Here are plots of the real and imaginary part of <X(ω)>, Fig 35.6 We can see that, apart from the noise of our low statistics, there is only the central peak and no continuous spectrum component. A blow-up of the central region follows, Fig 35.7 36. Application to some Standard Non-Correlated Pulse Train Types (Line Codes) Here we apply our boxed results (35.33) to statistical pulse trains of various types. When a pulse train is in fact a voltage on a pair of wires (transmission line, such as a telephone "line"), the way in which signals are encoded in the pulse train is called a line code. One could consider a random speed Morse code signal going down a wire as a line code, but the term usually refers to a sequence of equally spaced amplitude modulated pulses, meaning a pulse train. Often line codes get modulated onto an RF carrier, in which case the line code is thought of as the baseband signal prior to modulation. For this reason, line codes are often discussed in the "baseband chapter" of any digital communications text. The line code names are a little strange due to their history. Here are the pulse shapes used for RZ and NRZ lines codes. In either case a 1 is (is coded as) a pulse and a 0 is no pulse. Fig 36.1 On the left, since the signal returns to zero inside the pulse period, it is called a "return to zero" code RZ. Since this does not happen on the right, that is a "non return to zero" code, NRZ. (a) Unipolar NRZ line code Pulse Shape. The pulse is a box of amplitude V and width τ = T1, Fig 36.2 From (9.2) we know that Xpulse(ω) = (VT1) sinc(ωT1/2) = (VT1) sinc(π ) ω1 = 2π/T1 Ppulse(ω) = = (VT1)2 sinc2(π )/(2πT1) = (V2/ω1) sinc2(π ) (36.1) Coding: NRZ is a normal binary signal, high for period T1 to indicate a 1, and low for T1 to indicate a 0. Sometimes this is called unipolar NRZ since the signal never goes negative. Fig 36.3 Coefficients σ2 and μ2 : From summary box (35.33), A = 1 and B = 0 => σ2 = p(1-p) μ2 = p2 μ = p Spectrum: The average spectral power density for the NRZ line code is : P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) P(ω) = (V2/ω1) [ p(1-p) sinc2(π ) + p2 !Syntax Error, I sinc2(π ) δ( - m) P(ω) = (V2/ω1) [ p(1-p) sinc2(π ) + p2 δ( ) ] // any p (36.2) P(ω) = (V2/ω1) [ sinc2(π ) + δ( ) ] // for p = 1/2 (36.3) The sinc function killed off all but the m = 0 line ( the "DC line"). In order to express this (and later) results in the frequency domain, we use these relations P(ω) = P(f)/2π // (34.4) bottom line 1/ω1 = T1/2π = ≡ x for plots // f1 = 1/T1 (36.4) to obtain P(f) = V2T1 [ p(1-p) sinc2(π ) + p2 δ( ) ] // any p (36.2)' P(f) = V2T1 [ sinc2(π ) + δ( ) ] // for p = 1/2 (36.3)' This last line can be written P(f) = V2 [ T1 sinc2(πfT1) + δ(f) ] // for p = 1/2 (36.3)" which then agrees with Xiong (2.25). Plot: Ignoring the overall factor (V2/ω1) we make this plot of P(ω) given by (36.2): Fig 36.4 The red curve should be scaled by the red factor shown on the left, and the blue delta line should be scaled by the blue factor on the right. Power Partition: The total power in the continuous part of the spectrum is: ( dω = ω1dx ) AC power = !Syntax Error, I ω1dx P(xω1> = p(1-p) V2 !Syntax Error, I dx sinc2(πx) = p(1-p) V2 . The total power in the DC line at ω = 0 is DC power = !Syntax Error, I ω1dx P(xω1) = V2!Syntax Error, I dx p2 δ(x) = p2V2 Thus we find that total power = p2 V2 + p(1-p) V2 = pV2 DC AC If p = 1/2, then total power = (1/4) V2 + (1/4) V2 = (1/2)V2 (36.5) DC AC so half the power is in the DC line and half in the AC signal. The DC term is certainly reasonable since we know that with p = 1/2, the average voltage is (V/2). If one wanted to reduce wasted power, it would be good to give this signal a DC offset of -V/2 and then there would be no DC line. This is in fact the next example if one takes V → V/2. (b) Bipolar NRZ line code Pulse Shape. The pulse shape is the same as for Unipolar NRZ Fig 36.2 Ppulse(ω) = (V2/ω1) sinc2(π ) same as for unipolar NRZ (36.1) Coding: 1 is coded as a positive box with amplitude V, and a 0 as a negative box having amplitude -V. Fig 36.5 Coefficients σ2 and μ2 : From summary box (35.33), A = 1 and B = -1 => σ2 = 4p(1-p) μ2 = (1-2p)2 μ = 2p-1 Spectrum: The average spectral power density for the bipolar NRZ line code is : P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) P(ω) = (V2/ω1) [4p(1-p) sinc2(π ) + (1-2p)2!Syntax Error, I sinc2(π ) δ( - m) P(ω) = (V2/ω1) [4p(1-p) sinc2(π ) + (1-2p)2 δ( ) ] // any p (36.6) P(ω) = (V2/ω1) [ sinc2(π ) ] { = Ppulse(ω) } // for p = 1/2 (36.7) which become, using (36.4), P(f) = (V2T1) [4p(1-p) sinc2(π ) + (1-2p)2 δ( ) ] // any p (36.6)' P(f) = (V2T1) [ sinc2(π ) ] { = Ppulse(f) } // for p = 1/2 (36.7)' This last result agrees with Xiong (2.20). The spectrum is all continuous when p = 1/2 since then the DC portion is killed off. As noted in the comment after (35.17b), a discrete spectrum cannot exist if the waveform amplitudes have zero mean, μ = 0. Notice that for p = 1/2, bipolar NRZ has P(ω) = Ppulse(ω), so the statistical pulse train spectrum is the same as that of the underlying pulse. Plot: Ignoring the overall factor (V2/ω1) we make this plot of <P(xω1)> given by (36.6) Fig 36.6 which is the same as the spectrum for unipolar NRZ except for the two scaling factors. Power Partition: We can again compute the DC and AC power. AC power = unipolar NRZ with p(1-p) → 4p(1-p), so AC = 4p(1-p) V2 DC power = unipolar NRZ with p2 → (2p-1)2, so DC = (2p-1)2 V2 total power = (2p-1)2V2 + 4p(1-p)V2 = V2 , independent of p. (36.8) DC AC The total power is independent of p because a pulse has the same AC power if it goes up or down. For p = 1/2 we get total power = 0 + V2 = V2 // p = 1/2 DC AC and now no power is wasted pushing DC through a line. If we take V→V/2 to have a comparable peak-to-peak amplitude, we find AC power = (V/2)2 which is the same as the AC power in (36.5); it is not affected by a DC offset of -V/2. (c) Unipolar RZ line code Pulse Shape. Here the basic pulse is a box that fills only half the time interval T1. Fig 36.7 According to (12.1) applied to the above pulse. x(t) ↔ X(ω) x(t - T1/2) ↔ X(ω) e-iωT/2 . (12.1) where X(ω) is for a pulse of total width T1/2 centered at t = 0. The spectrum of this centered pulse is given by (9.2) with τ = T1/2 as X(ω) = (VT1/2) sinc(ωT1/4). Thus, the above pulse has this spectrum Xpulse(ω) = e-iωT/2 (VT1/2) sinc(ωT1/4) = e-iωT/2 (VT1/2) sinc( ) and then Ppulse(ω) = = sinc2( ) = (V2/4ω1) sinc2( ) . (36.9) Coding: 1 is coded as the presence of the pulse, 0 is coded as the absence of a pulse. Fig 36.8 Coefficients σ2 and μ2 : From summary box (35.33), coefficients are the same as for NRZ, A = 1 and B = 0 => σ2 = p(1-p) μ2 = p2 μ = p Spectrum: The average spectral power density for the unipolar RZ line code is : P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) P(ω) = (V2/4ω1) [ p(1-p) sinc2( ) + p2!Syntax Error, I sinc2( ) δ( - m) P(ω) = (V2/4ω1) [ p(1-p) sinc2( ) + p2!Syntax Error, I sinc2( m) δ( - m) + p2 δ( ) ] (36.10) P(ω) = (V2/4ω1) [ sinc2( ) + !Syntax Error, I sinc2( m) δ( - m) + δ( ) ] (36.11) where the last line is for p = 1/2. Then using (36.4) we write the f domain versions, P(f) = (V2T1/4) [ p(1-p) sinc2( ) + p2!Syntax Error, I sinc2( m) δ( - m) + p2 δ( ) ] (36.10)' P(f) = (V2T1/4) [ sinc2( ) + !Syntax Error, I sinc2( m) δ( - m) + δ( ) ] (36.11)' In all these expressions one can replace sinc2( m) by its odd-integer value since sinc2( m) = Result (36.11)' agrees with Xiong (2.31) in which Rb ≡ 1/T = our 1/T1, but he has not separated out the three terms m = 0, m = even ≠ 0 and m = odd. Plot: Ignoring now the overall factor (V2/4ω1) we get this power spectrum P(ω) from (36.10), Fig 36.9 We now have three pieces: a continuous part, the DC line, and a set of lines at odd m. The main peak is twice as wide as the NRZ peak since the underlying pulse is half as wide. Power Partition: Once again, we can compute the total power for each of these three pieces. odd lines power = !Syntax Error, I ω1dx P(xω1) = ω1 (V/2)2 (1/ω1) p2!Syntax Error, I dx sinc2( x) 2!Syntax Error, I δ(x - m) = (V/2)2 2p2 !Syntax Error, Isinc2( m) = (V/2)2 2p2!Syntax Error, I = (V/2)2 2p2 (2/π)2 !Syntax Error, I = (V/2)2 2p2 (2/π)2 (π2/8) = p2(V/2)2 where the sum Σodd(1/m2) = π2/8 is from Gradshteyn and Ryzhik 0.234.2. Then DC power = !Syntax Error, I ω1dx P(xω1) = (V/2)2p2 !Syntax Error, I dx sinc2( x) δ(x) = p2 (V/2)2 which is the same as the odd lines power. Finally, continuum power = !Syntax Error, I ω1dx P(xω1) = (V/2)2 p(1-p) !Syntax Error, I dx sinc2( x) = 2p(1-p) (V/2)2 So the power partitioning is total power = p2(V/2)2 + p2 (V/2)2 + 2p(1-p) (V/2)2 DC other lines continuum = p2(V/2)2 + p(2-p) (V/2)2 = 2p(V/2)2 = (p/2)V2 . (36.12) DC AC This is half of the total power of unipolar NRZ (36.4), which seems reasonable since the pulses here have half the duration. (d) Bipolar RZ line code Pulse Shape. The pulse shape is the same as for Unipolar RZ Fig 36.7 Ppulse(ω) = (V2/4ω1) sinc2( ) . (36.9) Coding: 1 is coded as a positive pulse with amplitude V, and a 0 as a negative pulse having amplitude -V. Fig 36.10 Coefficients σ2 and μ2 : From summary box (35.33), and the same as for bipolar NRZ A = 1 and B = -1 => σ2 = 4p(1-p) μ2 = (1-2p)2 μ = 2p-1 Spectrum: The average spectral power density for the bipolar RZ line code is : P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) P(ω) = (V2/4ω1) [4p(1-p) sinc2( ) + (1-2p)2!Syntax Error, I sinc2( ) δ( - m) P(ω) = (V2/4ω1) [4p(1-p) sinc2( ) + (1-2p)2!Syntax Error, I sinc2( m )δ( - m) + (1-2p)2 δ( )] (36.13) P(ω) = (V2/4ω1) sinc2( ) { = Ppulse(ω) } // p = 1/2 (36.14) which become, using (36.4), P(f) = (V2T1/4) [4p(1-p) sinc2( ) + (1-2p)2!Syntax Error, I sinc2( m )δ( - m) + (1-2p)2 δ( ) ] (36.13)' P(f) = (V2T1/4) sinc2( ) { = Ppulse(f) } // p = 1/2 (36.14)' This last result agrees with Xiong (2.30). As noted earlier, sinc2( m) = for odd m. Plot: Ignoring now the overall factor (V2/4ω1) we get this power spectrum from (36.13), Fig 36.11 Power Partition: Once again, we can compute the total power for each of three pieces. These are the same as for the unipolar RZ if we make the replacements p(1-p) → 4p(1-p) and p2→ (1-2p)2, so odd lines power = (1-2p)2 (V/2)2 DC power = (1-2p)2 (V/2)2 continuum power = 8p(1-p) (V/2)2 So the power partitioning is total power = (1-2p)2 (V/2)2 + (1-2p)2 (V/2)2 + 8p(1-p) (V/2)2 DC odd lines continuum = (1-2p)2 (V/2)2 + [1-4p(p-1)] (V/2)2 = 2 (V/2)2 = V2/2 (36.15) DC AC As expected, this is half the total power of bipolar NRZ since the pulses have half the duration. For p = 1/2 all the power is in the continuum. (e) Manchester line code This line code was developed at the University of Manchester probably in the World War II era. At that time Tom Kilburn, Alan Turing and others were building the world's first stored-program computer. Pulse Shape: The pulse shape here is the biphase (biphasic, diphase) pulse, Fig 36.12 We already computed Xpulse(ω) for this pulse in (19.2), so we now set τ = T1/2 and A/2 = V to get Xpulse(ω) = (4iV/ω) sin2(ωT1/4) = (4iV/ω) sin(ωT1/4) [sin(ωT1/4) / (ωT1/4 )] (ωT1/4 ) = (iVT1) sin(ωT1/4) sinc(ωT1/4) Ppulse(ω) = = (V2/ω1) sin2( ) sinc2( ) . (36.16) This spectral pulse density is 4 sin2( )times that of the RZ pulse shown in (36.9). This extra factor kills off the spectrum at ω = 0. Coding: 1 is coded as the above pulse, 0 is coded as the negative of the pulse (but some sources use the opposite polarity), Fig 36.13 Coefficients σ2 and μ2 : From summary box (35.33), and the same as for bipolar NRZ A = 1 and B = -1 => σ2 = 4p(1-p) μ2 = (1-2p)2 μ = 2p-1 Comment: Notice that the mean value of the waveform in Fig 36.13 is 0 regardless of p, whereas the mean value μ of the amplitudes yn is given by μ = 2p-1. Spectrum: The average spectral power density for the Manchester code is : P(ω) = σ2 Ppulse(ω) + μ2 !Syntax Error, I Ppulse(mω1) δ( - m) (35.17d) P(ω) = (V2/ω1) [4p(1-p) sin2( ) sinc2( ) + (1-2p)2!Syntax Error, I sin2( ) sinc2( ) δ( - m)] P(ω) = (V2/ω1) [4p(1-p) sin2( ) sinc2( ) + (1-2p)2!Syntax Error, I sinc2( m )δ( - m) ] (36.17) P(ω) = (V2/ω1) sinc2( ) { = Ppulse(ω) } // p = 1/2 (36.18) which become, using (36.4), P(f) = (V2T1) [4p(1-p) sin2( ) sinc2( ) + (1-2p)2!Syntax Error, I sinc2( m ) δ(- m) ] (36.17)' P(f) = (V2T1) sin2( ) sinc2( )] // p = 1/2 (36.18)' As noted earlier, sinc2( m) = for odd m. The last result agrees with Xiong (2.38). He refers to this Manchester code as Bi-Φ-L. Plot: Ignoring the leading factor (V2/ω1) the spectrum for (36.17) has this plot, Fig 36.14 Power Partition: lines power = !Syntax Error, I ω1dx<P(xω1)> = V2 (2p-1)2!Syntax Error, I dx sin2( x) sinc2( x)!Syntax Error, I δ(x - m) = V2 (2p-1)2!Syntax Error, I sin2( m) sinc2( m) = V2 (2p-1)2!Syntax Error, I sin4( m) ( m)-2 = V2 (2p-1)2(2/π)2!Syntax Error, I 1 /m2 = V2 (2p-1)2(2/π)2 2!Syntax Error, I 1 /m2 = V2 (2p-1)2(2/π)2 2 (π2/8) = (2p-1)2 V2 continuum power = !Syntax Error, I ω1dx<P(xω1)> = V2 4p(1-p) !Syntax Error, I dx sin2( x) sinc2( x) = V2 4p(1-p) since the integral is just 1. Therefore, total power = 0 + (2p-1)2 V2 + 4p(1-p) V2 = V2 (36.19) DC lines continuum AC In the case p = 1/2, the lines power vanishes leaving only continuum power = V2. Since the power is kept away from DC, Manchester coding is useful for AC-coupled transmission lines, such as lines incorporating transformers. The down side compared to NRZ is that the first spectral hump goes out to ω = 2ω1, which reflects the fact that the minimum pulse width is T1/2 whereas in NRZ it is T1. So a transmission line must then have twice the bandwidth for Manchester relative to NRZ. (f) Noise, ISI and Eye Patterns In general, if some spectral components are filtered away in a transmission line (or in some general signal pathway), the corresponding pulse (by inverse Fourier Transform) has curved corners, meaning the pulse gets rounded and spread out. This effect along with noise can result in inter-symbol interference (ISI). The superposition of such pulses on an oscilloscope (triggered on a recovered T1 clock) for a random pulse train is called an eye pattern. This pattern must have a central clear area to allow the two (or more for some line codes) pulse levels to be distinguished by a receiving circuit. Here is a marginal eye pattern for NRZ on the left, and a better one for AMI on the right (see Section 37). Fig 36.15 37. The AMI Line Code (a) Pulse Shape The pulse shape is the same as for unipolar NRZ , Fig 36.2 Xpulse(ω) = (VT1) sinc(ωT1/2) (36.1) Ppulse(ω) = (1/2π) V2T1 sinc2(ωT1/2) However, we shall do the analysis below for a general xpulse(t) and insert the box shape at the end. (b) Coding Alternate Mark Inversion (AMI) means that a 0 is encoded as a zero (for duration T1) and a 1 is encoded as a pulse (of duration T1) of either plus or minus polarity. As each 1 is encountered in the data, the pulse polarity is the negative of that used for the previous encoded 1 pulse, so the 1 polarities are alternated, as in this example Fig 37.1 (c) Expectations <ym2> and <ymyn> A zero is coded with amplitude B = 0, but a one is coded with either A = +1 or A = -1, so we have A = ± 1, B = 0. Because there is now correlation between different locations m and n in the pulse train, we can no longer use the simple results of box (35.33). Consider then the expression given in (35.22) for the statistical average <yn2>. We assume that p is the probability of a 1 being coded, so 1-p is the probability of a 0 being coded. Then we have <yn2> = [p]AA + [(1-p)] BB = [p]AA = [p] (±1) (±1) = p (37.1) That was the easy one. For <ynym> with m ≠ n, we have a much harder problem. Consider <ymyn> = [pp] AA' + [p(1-p)] AB' + [(1-p)p]BA' + [(1-p)(1-p)]BB' = [pp] σ σ' + [p(1-p)] σ 0 + [(1-p)p] 0 σ' + [(1-p)(1-p)] 0 0 = p2 σ σ' (37.2) where σ = ±1 and σ' = ±1. Here p2 is the probability that both slot positions ym and yn are coded for 1. This can happen in four different ways, as illustrated here, Fig 37.2 By symmetry, the probability of cases 1 and 2 is the same, and the probability of cases 3 and 4 is the same. This is perhaps not totally obvious, but the reason will become clear below when we talk about legal pulse patterns. Given that both m and n are coded for 1, let X/2 be the total probability for the case 1, and Y/2 be the total for the case 3. Then we can write <ymyn> = (+1)(+1) p2X/2 + (-1)(-1) p2X/2 + (+1)(-1) p2Y/2 + (-1)(+1) p2Y/2 = p2(X-Y) . Given that both m and n are coded for a 1, since we have enumerated all the cases, we must have X + Y = 1 // probability of getting any of the four cases. Our task then is to compute probabilities X and Y. For cases 1 and 2 taken together, X is the probability that the gap between the coded 1's is filled with a legal sequence of pulses. This is the key statement and the reader may want to ponder the previous sentence thinking about probability as the number of legal ways divided by the total number of ways. Only the legal ways can show up in a statistical ensemble. If the gap is "legal", there must be an odd number of coded 1's in the gap, due to the AMI alternation coding rule. Similarly, Y is the probability that there are an even number of coded 1's in the gap. Define, k = |m-n| - 1 = size of gap and think of X and Y as depending on k, so we write Xk and Yk. Note that Y = Yk = (1-Xk) = probability that gap has even number of coded 1's. So far, we add k labels to our results shown above, <ymyn> = p2(Xk-Yk) = p2 (2Xk - 1) k = |m-n| - 1 . (37.3) Assume we have a gap of size k and there exists some Xk and Yk we don't yet know. What can be said about X and Y if the gap is increased to size k+1 by adding one more pulse period in between? Claim: Xk+1 = Yk p + Xk (1-p) = probability of having an odd number of coded 1's in gap k+1 Explanation: Yk is the probability the k gap had an even number of coded 1's. In order to make the k+1 gap have an odd number of coded 1's we have to put a coded 1 in the new space, which has probability p. This gives the first term Yk p . Xk is the probability the k gap had an odd number of coded 1's. In order to make the k+1 gap have an odd number of coded 1's we have to put a coded 0 in the new space, which has probability (p-1). This gives the second term Xk (1-p) . Since this exhausts the ways we can get from k to k+1, Xk+1 has the probability shown above. We could write a similar expression for Yk+1 but it is not needed. Since Yk = 1-Xk we then have Xk+1 = (1-Xk) p + Xk (1-p) = p - pXk + Xk- pXk = (1-2p)Xk + p . (37.4) Now define, a ≡ (1-2p) => p = (1-a)/2 and 1-p = (1+a)/2 Then the above reads, Xk+1 = aXk + p . (37.5) This is a difference equation (recurrence relation) which we want to solve for Xk. If there is no gap at all (k=0), we have two adjacent identical pulses which is illegal so X0 = 0. If the gap is k = 1, then the middle element must be different from the two ends, so X1 = p, consistent with (37.5). We now examine the recurrence relations: X0 = 0 X1 = p X2 = a(p) + p = p(a+1) X3 = a[p(a+1]+ p = p(a2+a +1) .... Xk = p (ak-1 + ..... + a2 + a + 1) The geometric series can be summed in the usual manner and yields Xk = p (1 - ak)/(1-a) = p (1 - ak)/2p = (1 - ak)/2 . (37.6) The same result can be obtained from Maple in this manner : Inserting this result into (37.3) gives <ymyn> = p2 (2Xk - 1) = p2 (2[(1 - ak)/2] - 1) = p2 ( (1 - ak) - 1) = - p2ak = - p2 a[|m-n| - 1] = (-p2/a) a|m-n| . (37.7) Therefore, we have our final results for our two expectations, <ymyn> = (-p2/a) a|m-n| m ≠ n // a ≡ (1-2p) <yn2> = p . (37.8) These results are in agreement with Bennett and Davey equations (19-111) and (19-119), and in fact it is their method we have presented above. (d) The autocorrelation sequence As discussed in Section 35 (b), in the Large N Regime assuming stationarity as in (35.7) we can make the identifications shown in (35.9) rs = <ymym+s>1 = <ymym+s> s≠ 0 r0 = <ym2>1 = <ym2> where rs = <ymym+s>1 is the autocorrelation sequence for the ym. Thus we have from (37.8) rs = (-p2/a) a|s| = -p2 a|s|-1 = -p2 (1-2p)|s|-1 s ≠ 0 r0 = p (37.9) We now plot the autocorrelation function for various p values using this code Here are plots of rs for p = 0.0 (red) to p = 0.5 (black) where, as usual, we connect the discrete points of the sequence with lines, Fig 37.3 For p = 0, the autocorrelation sequence is a flat line (red) because in this case all symbols are 0. As the probability p of encoding a 1 increases, the autocorrelation sequence becomes more "active" away from the s = 0 central point. At p = 1/10 (blue), nothing much happens beyond |s| = 1. For p = 2/10 green1), we see action all the way out to |s| = 3 and even beyond. As p increases, the value of r1 becomes larger and more negative, meaning if s = 0 is a coded + pulse, then s = 1 is likely to be a -1 pulse due to the AMI prescription. The p = 1/2 curve is magenta. As p is further increased from p = 1/2, the density of coded 1's in the pulse train increases and the correlation distance increases as these 1's affect each other more and more. Here are plots for p = 0.5 (magenta) to p = 1.0 (gray). The action is so violent now that we had to increase the vertical range relative to the previous set of graphs. Fig 37.4 The p = 1 plot (gray) has a very simple interpretation: Now every pulse is coded as a 1, so every pulse must alternate in polarity, so as we slip two pulse trains relative to each other to obtain the autocorrelation sequence, if we slip an even number of symbols things are 100% correlated, and if we slip an odd number, things are then 100% anti-correlated. (e) Power Spectral Density Calculation using the Autocorrelation Method As outlined in Section 35, we have two approaches to find the power spectrum. Here we shall use the "autocorrelation method" where R"(z) is the Z Transform of rs . P(ω) = Ppulse(ω) R"(z) z = eiωT (34.14a) Our task then is to compute R"(z) from the autocorrelation sequence rs given in (37.9) rs = (-p2/a) a|s| = -p2 a|s|-1 = -p2 (1-2p)|s|-1 s ≠ 0 r0 = p (37.9) So: R"(z) = !Syntax Error, I rs z-s = p - (p2/a) !Syntax Error, I a|s| z-s |a|<1 a = 1-2p = p - (p2/a)[ !Syntax Error, Ias z-s + !Syntax Error, Ias zs ] = p - (p2/a)[ !Syntax Error, I(a/z)s + !Syntax Error, I(az)s ] |a/z| < 1 |az| < 1 = p - (p2/a)[ !Syntax Error, I {x}s + !Syntax Error, I {x*} s ] x = a/z |x| < 1 |x*|<1 = p - (p2/a)[ + ] // the usual geometric series sums = p - (p2/a) 2 Re[] . (37.10) Maple provides an assist by evaluating Re[] so we learn that Re[] = – (37.11) and then R"(z) = p - (p2/a) 2[ - ] (37.12) We then let Maple work on this expression a bit, continuing from the Maple code above, from which we learn that R"(z) = = . (37.13) Therefore the AMI power spectral density is given by P(ω) = Ppulse(ω) a = (1-2p) (1-a2) = 4p(1-p) (37.14) which is valid for |a| < 1 which means 0 < p < 1. (f) Power Spectral Density Calculation using the Ensemble Method The starting point is (35.5) which we repeat here, <P(ω)> = Ppulse(ω) !Syntax Error, I !Syntax Error, I <ymym+s> z-s . (35.5) In section (c) we determined these ensemble averages for random variables Yn and Ym <ymyn> = (-p2/a) a|m-n| m ≠ n // a ≡ (1-2p) <yn2> = p . (37.8) which we write now as <ymym+s> = (-p2/a) a|s| s ≠ 0 // a ≡ (1-2p) <yn2> = p . (37.8) Then (35.5) may be written as <P(ω)> = Ppulse(ω) !Syntax Error, I { p + (-p2/a)!Syntax Error, I a|s|z-s } But we calculated {.....} in (37.10) so we don't repeat all that work and just quote the result, { p + (-p2/a)!Syntax Error, I a|s|z-s } = z = eiωT Thus we have <P(ω)> = Ppulse(ω) !Syntax Error, I = Ppulse(ω) ( !Syntax Error, I[1] ) The remaining sum is either 2πδ(0) or (2N+1) in the limit N→∞. But (T/T1) is this same quantity, so we find that ( ) = 1 and our final result is <P(ω)> = Ppulse(ω) This is then the mean of the spectral power densities of all the pulse trains in the ensemble. Since we are in the N → ∞ limit, this is the same as P(ω) for any pulse train in the ensemble so we end up with P(ω) = Ppulse(ω) (37.15) which is the same as (37.14) as computed by the autocorrelation method. As usual, in the "ensemble method", there is no need to talk about <....>1 type averages, or autocorrelation sequences. (g) Summary, Plot and Limits of the AMI Spectral Power Density Using x = ω/ω1 = ωT1/(2π) = fT1 = (37.15) can be written in these alternate forms (the last form uses (33.24)), P(ω) = Ppulse(ω) a = (1-2p) (1-a2) = 4p(1-p) (37.15) P(ω) =  Ppulse(ω) a = (1-2p) (1-a2) = 4p(1-p) (37.15a) P(f) =  2π Ppulse(f) a = (1-2p) (1-a2) = 4p(1-p) (37.15b) P(f) =  4p(1-p) |Xpulse(f)|2 (1/T1) (37.15c) where we recall from the text after (1.4) that X(ω) = X(f). This last result (37.15c) agrees with Bennet and Davey (19-123) but they have a leading factor 8 instead of 4. This is because they regard the frequency range for f as (0,∞) instead of (-∞,∞) so the left part of the spectrum is folded over to the right side giving them an extra factor of 2. Note that the AMI spectrum is completely continuous, there is no discrete part at all. Setting p = 1/2 gives a = 0 and therefore P(ω) =  Ppulse(ω) sin2(πx) p = 1/2 . (37.16) Selecting a box of height V and width T1 we have from (36.1) Ppulse(ω) = = (VT1)2 sinc2(π )/(2πT1) = (V2/ω1) sinc2(π ) (36.1) so that P(ω) =  V2(1/ω1) sinc2(πx) sin2(πx) p = 1/2 x = ω/ω1 (37.17) P(f) =  V2T1sinc2(πfT1) sin2(πfT1) p = 1/2 x = fT1 (37.17)' This last result agrees with Xiong (2.34) where the code is called AMI-NRZ. Plot: Ignoring now the overall factor (V2/ω1) [ or V2T1] we get this AMI p = 1/2 power spectrum Fig 37.5 This shape is the same as the continuous part of the Manchester spectrum, but the first zero is at 1 instead of 2 since the pulse AMI pulse is twice as wide as the Manchester pulse. The AMI Limit as p→ 0 (a → +1) Our derivation of (37.15) by either method required that |a| < 1 to obtain convergence of the geometric series, so we are a little wary of taking the limit a→ 1. We will find, however, that the limit gives the correct result so we must be getting convergence for the point a = 1 on the complex circle of convergence. The same comment applies to the limit a→ -1 of the next section. In this limit p = 0, we know that our pulse train is just the constant value 0 so P(ω) = 0, so let's see how this happens from (37.15) P(ω) =  Ppulse(ω) = Ppulse(ω) [sin2(ωT1/2)] Using this limit from Appendix A lima→+1 (1/π) = !Syntax Error, Iδ(k - mπ) (A.23c) we find that P(ω) = Ppulse(ω) [sin2(ωT1/2)] π !Syntax Error, Iδ(ωT1/2 - mπ) = Ppulse(ω) π !Syntax Error, I[sin2(mπ)] δ(ωT1/2 - mπ) = 0 since sin(mπ) = 0 for all m The AMI Limit as p→ 1 (a → -1) First of all, we can see that in this limit the AMI waveform has alternating-sign pulses. With V = 1, this waveform matches that shown in (34.21), P(ω) = Ppulse(ω) !Syntax Error, I δ(x - m/2) x = ω/ω1 . (34.21) Somehow in this limit, the all-continuous AMI spectrum becomes all-discrete! How exactly does this happen? Consider again our continuous AMI result, <P(ω) > =  Ppulse(ω) a = (1-2p) . (37.15a) It seems possible that this becomes discrete because when a = -1, (1-a2) = 0 and P(ω) = 0 except possibly at singular points where the denominator vanishes. In Appendix A it is shown that lima→-1 δ8(k, a) = lima→-1 (1/π) = !Syntax Error, Iδ(k-mπ/2) . (A.25a) Therefore we may write P(ω) =  Ppulse(ω) π δ8(πx,a) → Ppulse(ω) π!Syntax Error, Iδ(πx-mπ/2) = Ppulse(ω)!Syntax Error, Iδ(x-m/2) and this agrees with our expected result shown just above. 38. The Change/Hold Line Code Here we mimic the previous Section on the AMI code. The calculation of <ymyn> is similar, but not the same. At the end, we apply the results to the NRZI line code. (a) Pulse Shape The pulse shape is the same as for unipolar NRZ , Fig 36.2 Xpulse(ω) = (VT1) sinc(ωT1/2) (36.1) Ppulse(ω) = (1/2π) V2T1 sinc2(ωT1/2) In place of amplitude V we will have A and B as described below. (b) Coding The coding uses two amplitudes A and B. Hold or Change coding means that a 0 is encoded as no change in the pulse amplitude (it holds, remaining what it was), while a 1 is encoded as a change A↔B. Here is an example starting with an A pulse: data = [ 1 0 1 1 0 0 1] encode = [ A B B A B B B A] Fig 38.1 Again we shall assume an arbitrary pulse shape and insert the box-pulse at the end. (c) Expectations <ym2> and <ymyn> First consider <yn2> = [q]A2 + [(1-q)] B2 , where q is the probability that slot n has yn = A. In this code, since only change and hold are coded, there is no preference for either amplitude, so q = 1/2 and <yn2> = (A2+B2)/2 . (38.1) We define p to be the probability of a change (data = 1), and 1-p to be the probability of a hold (data = 0). Turning to <ynym>, consider this picture similar to that used for the AMI case, where the gap is kT1units. Here we arbitrarily draw A > 0 and B < 0 and we draw the pulse as square, but it could be any shape and A and B can have any signs. Fig 38.2 Denote the four probabilities as p(AA)k and so on. Since slot m and slot n must each be filled with either an A or a B, this picture shows the only four possibilities, so (different scaling relative to AMI analysis) p(AA)k + p(AB)k + p(BA)k + p(BB)k = 1 . Note that p(AA)k is the probability of slot m and slot n both having amplitude A in the statistical pulse train. With these probabilities, we will have <ymyn> = p(AA)k AA + p(AB)k AB + p(BA)k BA + p(BB)k BB . (38.2) In case 1, there are a certain number of holds and changes during the gap such that the overall effect is a hold. The number of changes must have been even. But this same statement can be made about case 4, so cases 1 and 4 have the same probability of existing in the pulse train. Similarly, cases 2 and 3 have the same probability and in those cases the number of changes must be odd. So now we have two variables to worry about and they add to 1/2 : p(AA)k + p(AB)k = 1/2 (38.3) <ymyn> = p(AA)k AA + p(AB)k AB + p(AB)k BA + p(AA)k BB = p(AA)k ( AA + BB) + p(AB)k (AB + BA) so <ymyn> = p(AA)k( A2 + B2) + p(AB)k 2AB . (38.4) If the gap is zero, what is the probability of having an adjacent AA in the pulse stream? The probability of having the left A is 1/2, and the probability for an A being followed by a A is 1-p. Therefore p(AA)0 = (1/2)(1-p) . (38.5) Consider now the gap as shown at value k. We claim that p(AA)k+1 = p(AA)k (1-p) + p(AB)k p . (38.6) Proof: If it was an AA to start with gap k, then to be AA with gap k+1 we have to add another A which has probability (1-p) since this is a hold. Conversely, if it was an AB we have to add an A which is a change, which has probability p. Then from (38.3) we rewrite (38.6) as p(AA)k+1 = p(AA)k (1-p) + (1/2 - p(AA)k ) p . (38.7) To simplify notation, let Xk ≡ p(AA)k so that p(AB)k = 1/2 - Xk . Then (38.4) and (38.7) become <ymyn> = Xk (A2 + B2) + (1/2 - Xk)2AB = (A-B)2Xk + AB (38.8) Xk+1 = Xk (1-p) + (1/2-Xk) p = (1-2p)Xk + p/2 = aXk + p/2 a ≡ 1-2p , same as for AMI (38.9) Maple solves this recursion equation as follows, using (38.5) that X0 = (1/2)(1-p), so we find that Xk = (1 + ak+1)/4 = p(AA)k . (38.10) As a check, suppose p = 0 so there can be no changes. Then a = 1 and p(AA)k = 1/2. We can now have only case 1 or case 4, so we know p(AB)k = 0, and that is consistent with p(AA)k + p(AB)k = 1/2 . Continuing from (38.8), <ymyn> = (A-B)2Xk + AB = (A-B)2(1 + ak+1)/4 + AB = [ (A-B)2/4] ak+1 + (A-B)2/4 + AB = [ (A-B)2/4] ak+1 + [(A+B)2/4] = (1/4) [ (A-B)2 ak+1 + (A+B)2 ] (38.11) and we note that the result is indeed symmetric under A↔ B. Again for p = 0 (always hold, a=1) we find that <ymyn> = (A2+B2)/2 which is the same then as <yn2>. For a constant pulse train, the amount of slot separation makes no difference. Since k = |m-n| - 1 in general, we get these final results, <ymyn> = (1/4) [ a|m-n| (A-B)2 + (A+B)2 ] m ≠ n a ≡ 1-2p <yn2> = (A2+B2)/2 . (38.12) (d) The autocorrelation sequence As discussed in Section 35 (b), in the Large N Regime assuming stationarity as in (35.7) we can make the identifications shown in (35.9) rs = <ymym+s>1 = <ymym+s> s≠ 0 r0 = <ym2>1 = <ym2> where rs = <ymym+s>1 is the autocorrelation sequence for the ym. Thus we have from (38.12) rs = (1/4) [ a|s| (A-B)2 + (A+B)2 ] s ≠ 0 a ≡ 1-2p r0 = (A2+B2)/2 . (38.13) Note that for p = 0, we get rs = (1/4) [ 1|s| (A-B)2 + (A+B)2 ] = (A2+B2)/2 = r0, so in this case the autocorrelation plot will be a horizontal line (red below) at this value (A2+B2)/2. This is the case of never any change, so half our ensemble is all A and half is all B which is why <ym2> = (A2+B2)/2. We now plot the autocorrelation function for various p values using this code For all plots below, we assume A = 1, and we plot curves for p = 1/n for n = 0 to 10 giving B = 1 (a) Since B = A = 1, there is no change whether or not we "hold" or change", so all plots are the same. B = 1/2 (b) B = 0 (c) B = -1/2 (d) B = -1 (e) Figures 38.3 (a) through (e) For each set of plots other than the first, as p ranges from 0 to 1/2, the infinite range correlation of having no change (red curve, p = 0) reduces (underdamped, shall we say), and for p = 1/2 we have a constant value for |s| ≥ 1 (critically damped). Then for p > 1/2 we have "oscillation" (overdamped). The ultimate case occurs when p = 1 where there the values A = 1 and B = -1 strictly alternate, so we have a square wave. As we relatively slide a pair of these square waves to create the autocorrelation function, as expected correlation jumps between +1 for even symbol shifts and -1 for odd symbol shifts (gray curve). (e) Power Spectral Density Calculation using the Autocorrelation Method As outlined in Section 35, we have two approaches to find the power spectrum. Here we shall use the "autocorrelation method" where R"(z) is the Z Transform of rs . P(ω) = Ppulse(ω) R"(z) z = eiωT (34.14a) Our task then is to compute R"(z) from the autocorrelation sequence rs given in (38.13) rs = (1/4) [ a|s| (A-B)2 + (A+B)2 ] s ≠ 0 a ≡ 1-2p r0 = (A2+B2)/2 . (38.13) So: R"(z) = !Syntax Error, Irs z-s = (A2+B2)/2 + (1/4) (A-B)2 !Syntax Error, I a|s| z-s + (1/4) (A+B)2 !Syntax Error, Iz-s (38.14) The two sums have (conveniently) already been computed: !Syntax Error, I a|s| z-s = –2 |a| < 1 (37.10 and (37.12) !Syntax Error, I z-s = !Syntax Error, I z-s - 1 = !Syntax Error, I2πδ(ωT1 - 2πm) - 1 above (35.16) Thus R"(z) = (A2+B2)/2 + (1/4) (A-B)2 [–2 ] + (1/4) (A+B)2[!Syntax Error, I2πδ(ωT1 - 2πm) - 1] = (1/4) (A-B)2 + (1/4) (A-B)2 [–2 ] + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πm) = (1/4) (A-B)2 [ 1 – 2 ] + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πm) = (1/4) (A-B)2 + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πm) (38.15) Installing this result into (34.14a) which says P(ω) = Ppulse(ω) R"(z), we get a final result for the power spectral density of the Change/Hold line code: P(ω) = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πm) } (38.16) a = (1-2p) (1-a2) = 4p(1-p) (f) Power Spectral Density Calculation using the Ensemble Method The starting point is (35.5) which we repeat here, <P(ω)> = Ppulse(ω) !Syntax Error, I !Syntax Error, I<ymym+s> z-s . (35.5) In section (c) we determined these ensemble averages for random variables Yn and Ym <ymyn> = (1/4) [ a|m-n| (A-B)2 + (A+B)2 ] m ≠ n a ≡ 1-2p <yn2> = (A2+B2)/2 . (38.12) which we write now as <ymym+s> = (1/4) [ a|s| (A-B)2 + (A+B)2 ] s ≠ 0 a ≡ 1-2p <yn2> = (A2+B2)/2 . (38.12) Then (35.5) may be written as <P(ω)> = Ppulse(ω) !Syntax Error, I {(A2+B2)/2 + (1/4) (A-B)2 !Syntax Error, I a|s| z-s + (1/4) (A+B)2 !Syntax Error, Iz-s } But we calculated {.....} in (37.10) so we don't repeat all that work and just quote the result, {(A2+B2)/2 + (1/4) (A-B)2 !Syntax Error, I a|s| z-s + (1/4) (A+B)2 !Syntax Error, Iz-s = (1/4) (A-B)2 + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πk) Thus we have <P(ω)> = Ppulse(ω) * !Syntax Error, I { (1/4) (A-B)2 + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πk) } = Ppulse(ω) * !Syntax Error, I { (1/4) (A-B)2 + (1/4) (A+B)2!Syntax Error, I2πδ(ωT1 - 2πk) }( !Syntax Error, I[1] ) The remaining sum is either 2πδ(0) or (2N+1) in the limit N→∞. But (T/T1) is this same quantity, so we find that ( ) = 1 and our final result is <P(ω)> = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πk) } This is then the mean of the spectral power densities of all the pulse trains in the ensemble. Since we are in the N → ∞ limit, this is the same as P(ω) for any pulse train in the ensemble so we end up with P(ω) = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πm) } (38.17) which is the same as (38.16) as computed by the autocorrelation method. As usual, in the "ensemble method", there is no need to talk about <....>1 type averages, or autocorrelation sequences. (g) Summary, Limits and Plot of the Change/Hold Spectral Power Density We shall now investigate various limits of our final result which was P(ω) = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πm) } (38.17) Limit A → B: Setting A = B in (38.171) gives P(ω) =  Ppulse(ω) { A2!Syntax Error, I2π δ(ωT1-2πm) } . (38.18) In the case that the pulse is a box of unit height we use (34.22), Ppulse(ω) = (1/ω1) sinc2(ωT1/2) (38.19) to get  P(ω) = A2 Ppulse(ω) !Syntax Error, I2π δ(ωT1-2πm) = A2!Syntax Error, I2π δ(ωT1-2πm) (1/ω1) sinc2(πm) = A2 2π δ(ωT1) (1/ω1) = A2 δ(ω) . (38.20) This is exactly what we expect when A = B, since the pulse train is then just a constant value A ! Limit p→1 ( a → -1) : In this limit we expect to get a square-wave pulse train with alternating values A and B. We make use of this limit from Appendix A with 2k = ωT1, lima→-1 = π!Syntax Error, Iδ(ωT1/2-mπ/2) = !Syntax Error, I2π δ(ωT1-mπ) (A.25b) and then the Change/Hold spectral power density (38.17) becomes P(ω) = Ppulse(ω) { [ ]2 !Syntax Error, I2π δ(ωT1-mπ) + [ ]2 !Syntax Error, I2π δ(ωT1-2πm) } . Installing from (34.22) the unit-height box pulse shape Ppulse(ω) = (1/ω1) sinc2(ωT1/2) and using (38.20) the second term becomes just [ ]2 δ(ω) while the first term is [ ]2 !Syntax Error, I2π δ(ωT1-mπ) (1/ω1) sinc2(mπ/2) =  [ ]2 2π !Syntax Error, Iδ(ωT1-mπ) (1/ω1) (mπ/2)-2 =  (A-B)2 (1/π2) !Syntax Error, I(1/m2) δ(ω - mω1/2) giving a final result, P(ω) = [ ]2 !Syntax Error, I(1/m2) δ(ω - mω1/2) + [ ]2 δ(ω) . (38.21) Comparing the first term with (34.23), we see that it is the spectrum of a square wave whose peak-to-peak amplitude is (A-B), which is exactly what it should be since every pulse is a "change". The second term then correctly accounts for the expected average DC level of (A+B)/2. Limit p→0 ( a → +1) : In this case for a square wave we expect to get a result appropriate for an ensemble of pulse trains half of which have constant value A and the other have constant value B, since all pulse trains are in a permanent hold state with p = 0; nothing changes. This time we use this limit (A.23c) with 2k = ωT1, lima→+1 = π !Syntax Error, Iδ(ωT1/2 - mπ) = !Syntax Error, I2πδ(ωT1 - m2π) (A.23c) to get from (38.21), P(ω) = Ppulse(ω) { [ ]2 !Syntax Error, I2π δ(ωT1 - 2mπ) + [ ]2 !Syntax Error, I2π δ(ωT1-2πm) } =  Ppulse(ω)!Syntax Error, I2π δ(ωT1 - 2mπ) . (38.22) Ignoring the leading factor, this agrees with the first line of (33.25) which was developed for a simple pulse train with unit amplitudes yn = 1. This result then describes the average spectral power of an ensemble in which 50% of the pulse trains have amplitude A and the rest amplitude B. Installing the square pulse spectrum (34.22) Ppulse(ω) = (1/ω1) sinc2(ωT1/2) gives P(ω) = (1/ω1) sinc2(ωT1/2) !Syntax Error, I2π δ(ωT1 - 2mπ) = (1/ω1) 2π δ(ωT1) = (T1ω1)-1 2π δ(ω) = δ(ω) which describes an ensemble of constant pulse trains 50% of which are x(t) = A and the rest x(t) = B. Limit p→1/2 ( a → 0) Recall again the general result (38.17), P(ω) = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πm) } (38.17) The big ratio becomes unity so the spectral power density is then P(ω) =  Ppulse(ω) { [ ]2 + [ ]2 !Syntax Error, I2π δ(ωT1-2πm) } . (38.23) Box-Shaped Pulse for general p: Start as just above with (38.171) and insert Ppulse(ω) for the box, P(ω) =  Ppulse(ω) { [ ]2 + [ ]2 !Syntax Error, I2π δ(ωT1-2πm) } Ppulse(ω) = (1/ω1) sinc2(ωT1/2) . As usual, the second term becomes [ ]2 δ(ω) , so the result is [ a = 1-2p, x = ω/ω1 = fT1 ] P(ω) = [ ]2 (1/ω1) sinc2(ωT1/2) + [ ]2 δ(ω) (38.24) P(f) = [ ]2 T1 sinc2(πfT1) + [ ]2 δ(f) . (38.24)' Box-Shaped Pulse for p = 1/2 (a = 0): P(ω) = [ ]2 (1/ω1) sinc2(ωT1/2) + [ ]2 δ(ω) (38.25) = (1/ω1) { [ ]2 sinc2(πx) + [ ]2 δ(x) } x ≡ = f T1 P(f) = T1 [ ]2 sinc2(πfT1) + [ ]2 δ(f) . (38.25)' Ignoring the factor (1/ω1) in (38.25), we make this plot of P(ω) , which is the same as for unipolar NRZ but with different scaling factors for the two terms, Fig 38.4 Example 1: Unipolar NRZI line code Coding: This is a special case of Change/Hold encoding where A = 1 and B = 0. data = [ 1 0 1 1 0 0 1] encode = [ 1 0 0 1 0 0 0 1] Fig 38.5 NRZI means NRZ Invert-on-1, where NRZ means non-return to zero (see comments at the start of Section 36). NRZI does not mean "NRZ inverted". Some other sources use A = 0 and B = 1 so then transitions happen on 0 instead of 1, as in the standard for USB (Universal Serial Bus). The Change/Hold spectra are symmetric in A↔B, so the NRZI spectra are the same for either convention. Expectation Values <ymyn> = (1/4) [ a|m-n| (A-B)2 + (A+B)2 ] = (1/4) [ a|m-n| + 1 ] <yn2> = (A2+B2)/2 = 1/2 (38.26) Spectrum: From (38.17), and with a = (1-2p), P(ω) = Ppulse(ω) { [ ]2 + [ ]2 !Syntax Error, I2π δ(ωT1-2πm) } = Ppulse(ω) { + !Syntax Error, I2π δ(ωT1-2πm) } . (38.27) Box-Shaped Pulse for general p: From (38.24), P(ω) = (1/ω1) sinc2(ωT1/2) + δ(ω) . (38.28) Box-Shaped Pulse for p = 1/2 (a = 0): From (38.25), P(ω) = (1/ω1) { sinc2(πx) + δ(x) } x ≡ = fT1 (38.29) P(f) = T1 sinc2(πx) + δ(f) . (38.29)' The plot is that of Fig 38.3, but with each factor being 1/4. The spectrum (38.29) is exactly the same as that for unipolar NRZ shown in (36.3) with V = 1. One way to understand this fact is that for every NRZ sequence yn there is an NRZI sequence y'n , y'n = yn – yn-1 . // mod-2 math This equation can be solved for yn in terms of y'n (assume y0= 0), yn = Σm=1n y'm n = 1,2,3.... Consider the space of all random sequences of 1's and 0's ( random pulse trains p = 1/2). Since we just showed that the relation {yn} ↔ {y'n} is one-to-one, the mapping f: {yn}→{y'n} just reorders the set of random sequences in the ensemble used to compute the spectral power density, so that density cannot change. In contrast, for p ≠ 1/2, the NRZI power spectrum (38.28) is quite different from the NRZ power spectrum (36.3), P(ω) = (1/ω1) [ sinc2(πx) + δ(x)] // unipolar NRZI (38.28) a = (2p-1) P(ω) = (1/ω1) [sinc2(πx) (1-a2) + (2p)2 δ(x)] // unipolar NRZ (36.3) Example 2: Bipolar NRZI line code data = [ 1 0 1 1 0 0 1] encode = [ 1 -1 -1 1 -1 -1 -1 1] Fig 38.6 In this case A = 1 and B = -1 so the general Change/Hold spectrum (38.17) becomes P(ω) =  Ppulse(ω) a = (2p-1) // bipolar NRZI (38.30) and for p = 1/2 (a=0) we obtain, P(ω) =  Ppulse(ω) . // = (1/2π) T1 sinc2(ωT1/2) for the box pulse (36.1) (38.31) In contrast, the Bipolar NRZ spectrum is P(ω) = Ppulse(ω) [ σ2 + μ2!Syntax Error, I2πδ(ωT1 - 2πm)] (35.17) where σ2 = 4p(1-p) = (1-a2) and μ2 = (1-2p)2 = a2, so P(ω) = Ppulse(ω) [ (1-a2) + a2!Syntax Error, I2πδ(ωT1 - 2πm)] // bipolar NRZ (38.32) If p = 1/2 (a = 0) then the Bipolar NRZ spectrum becomes P(ω) = Ppulse(ω) (38.33) which is the same as for Bipolar NRZI.