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

Section 38

DOCX · 299.9 KB
Open DOCX file

Book section, apparently written by Phil as part of an August 2013 update, mirroring the preceding AMI code section. It derives the expectations <ym^2> and <ymyn> by a recursion on the probability of a change, obtains the autocorrelation sequence, and takes its Z transform to get the spectral density. It checks the limits A=B, p→0, p→1 and p→1/2, and ends with unipolar and bipolar NRZI examples. Equations are partly garbled in the extraction.

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

Extracted text (machine-read; may contain errors)
38. The Change/Hold Line Code 1 (a) Pulse Shape 1 (b) Coding 1 (c) Expectations <ym2> and <ymyn> 2 (d) The autocorrelation sequence 4 (e) Power Spectral Density Calculation using the Autocorrelation Method 6 (f) Summary, Limits and Plot of the Change/Hold Spectral Power Density 7 Example 1: Unipolar NRZI line code 12 Example 2: Bipolar NRZI line code 14 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 We assume the Change/Hold code generator is stationary as defined in (35.10). Presumably this will be the case unless some non-stationary data stream is fed into the Change/Hold encoder. With this assumption we can use (35.24) to relate the ensemble averages in (37.8) of our infinite sequence to the horizontal averages <...>1, 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) [ label n means p = n/10] 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 (=2 Re[]) (37.10) and (37.11) !Syntax Error, I z-s = !Syntax Error, I z-s - 1 = !Syntax Error, I2πδ(ωT1 - 2πm) - 1 z = eiωT (13.2) with k = ωT1 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) Summary, Limits and Plot of the Change/Hold Spectral Power Density We shall now investigate various limits of our final result which was (38.16), P(ω) = Ppulse(ω) { [ ]2 + [ ]2!Syntax Error, I2π δ(ωT1-2πm) } (38.17) Limit A → B: Setting A = B in (38.17) 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 the general result shown in box (35.37) P(ω) = Ppulse(ω) [ σ2 + μ2!Syntax Error, I2πδ(ωT1 - 2πm)] (35.28) with (as shown below Fig 36.5) σ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.