Home / Math and Physics Files / Math / Spectral Theory Book / Work for Aug 2013 Update / new and old sections
Section 37
DOCX · 147.6 KB
Open DOCX file
A draft book section by Phil, in the Aug 2013 update folder, analyzing the AMI line code with a general pulse shape and then a box pulse. It finds the symbol expectations by a recurrence for the odd/even count of 1s in a gap, gets the autocorrelation sequence r_s, and Z-transforms it (with Maple help) to get the spectrum. It also covers plots for various p, the p=1/2 case, and the limits p to 0 and p to 1, with comparison to Bennett and Davey and to Xiong.
AI-written summary; may contain errors.
Extracted text (machine-read; may contain errors)
37. The AMI Line Code 1
(a) Pulse Shape 1
(b) Coding 1
(c) Expectations <ym2> and <ymyn> 1
(d) The autocorrelation sequence 5
(e) Power Spectral Density Calculation using the Autocorrelation Method 6
(f) Summary, Plot and Limits of the AMI Spectral Power Density 8
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.37). Consider then the expression given in (35.33) 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
We assume the AMI 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 AMI 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 (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 sequence 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 (green), 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) 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 so (37.14) simplifies somewhat to give,
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.