NRZI
PDF · 11 pages · 284.0 KB
Open PDF file
Section 38 of Phil's spectral theory book material, dated 3.26.05. It derives the autocorrelation coefficients for a two-amplitude hold/change code using a recursion in the gap between slots. It then gets the power spectral density and checks the limits A=B, p→1, p→0 and p=1/2. The NRZI case (A=1, B=0) is shown to match the unipolar NRZ spectrum. Equations are partly lost in extraction.
AI-written summary; may contain errors. This description is approximate.
Extracted text (machine-read; may contain errors)
1
This is the Title
PhL
3.26.05
38. Change/Hold line code .................................................................................................................... 1
Example: NRZI line code .............................................................................................................. 10
38. Change/Hold line code
Pulse Shape.
The pulse shape is the same as for unipolar NRZ
Xpulse(ω) = (VT1) sinc(ωT1/2)
(36.1)
Ppulse(ω) = (1/2π) V2T1 sinc2(ωT1/2)
In place of amplitude V, however, we will have A and B as described below.
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 remains what it was), whilc 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 A A B B A]
Again we shall assume an arbitrary pulse shape and make it be square at the end.
Coefficients αm,n and β:
As with AMI coding, our starting point will be equation (34.10) which we repeat here:
<|X(ω)|2 > = |Xpulse(ω)|2
m = -∞
∞
n = -∞
∞
<ymyn> eiω(m-n)T1
(36.15)
First consider
2
<yn2> = [q]A2 + [(1-q)] B2
where q is the probability that slot n is 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)
Turning to <ynym>, consider this picture similar to that used for the AMI case, where the gap is kT1units.
Here we arbitrarily drawn 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.
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 ampitude A in the statistical pulse
stream. 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 stream. 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 :
3
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)
If it was an AA to start with 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 we can write
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 ** and ** 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
(38.9)
Maple can solve this recursion equation as follows,
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,
4
<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 (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
αn,m = <ymyn> = (1/4) [ a|m-n| (A-B)2 + (A+B)2 ]
β = <yn2> = (A2+B2)/2
(38.12)
To save space, we define
c ≡ (A-B)2/4
d ≡ (A+B)2/4
(38.13)
so then
αn,m = <ymyn> = c a|m-n| + d
(38.14)
For later use, notice that
β - d = c
(38.15)
Spectrum.
The spectrum is determined by (37.9) as in the AMI case,
<|X(ω)|2> = |Xpulse(ω)|2 {
n = -∞
∞
m ≠ n
αn,m [ eiω(m-n)T1] + β
n = -∞
∞
m = n
[1] } .
(38.16)
As in the AMU case, the β term in {...} is just
β
n = -∞
∞
m = n
[1] = β
n = -∞
∞
[1] .
(38.17)
5
Since αn,m = c a|m-n| + d , the first double sum has two terms. Again looking at the AMI case, we find
that the first term is given by, again using b ≡ eiωT1,
c
n = -∞
∞
m ≠ n
a|m-n| b(m-n) = c a(1+b2-2ab)
(b-a)(1-ab)
n = -∞
∞
[1] .
|a| < 1
(38.18)
To get the second term in the first double sum, we cannot just replace c by d and then set a = 1 to get
d a(1+b2-2ab)
(b-a)(1-ab)
n = -∞
∞
[1] (with a = 1) = d (1+b2-2b)
(b-1)(1-b)
n = -∞
∞
[1] = -d
n = -∞
∞
[1]
// wrong
This is because the result is not valid at a = 1 for ω = 2πn. So we have to do this d sum separately:
d
n = -∞
∞
m ≠ n
[ eiω(m-n)T1] = d
n = -∞
∞
m ≠ n
bm-n .
We now omit the d for a while to evaluate this sum
n = -∞
∞
m ≠ n
bm-n =
n = -∞
∞
[
m = -∞
∞
bm-n -
m = n
bm-n ]
= (
n = -∞
∞
b-n ) (
m = -∞
∞
bm ) -
n = -∞
∞
[ 1 ] .
In the first factor, since b ≡ eiωT1 , we are facing squared delta functions, so we have to back off to finite
N in our processing and later take N→∞, so we continue doing this,
= ( 2πδ5(ωT1,N) )2 - (2N+1)
= (2N+1) [ ( 2πδ5(ωT1,N) )2/ (2N+1) - 1 ]
= (2N+1) [ (2πδ6(ωT1,N) - 1 ]
Then we return to N = ∞ and use
limN→∞ δ6(k,N) =
m = -∞
∞
δ(k-2πm)
(A.21)
to get our result
6
n = -∞
∞
m ≠ n
[ eiω(m-n)T1] = [
m = -∞
∞
2π δ(ωT1-2πm) - 1 ]
n = -∞
∞
[ 1 ]
(38.19)
The -1 is what one gets from the limit a→1 of a(1+b2-2ab)
(b-a)(1-ab) , but we see that there is more.
We can now assemble the pieces to get
<|X(ω)|2> = |Xpulse(ω)|2 { c a(1+b2-2ab)
(b-a)(1-ab) + β - d + d
m = -∞
∞
2π δ(ωT1-2πm) }
n = -∞
∞
[ 1 ]
Recalling that β - d = c we write this as
<|X(ω)|2> = |Xpulse(ω)|2 { c [ a(1+b2-2ab)
(b-a)(1-ab) +1] + d
m = -∞
∞
2π δ(ωT1-2πm) }
n = -∞
∞
[ 1 ]
and using **** we get
<P(ω) > = Ppulse(ω) { c [ a(1+b2-2ab)
(b-a)(1-ab) +1] + d
m = -∞
∞
2π δ(ωT1-2πm) }
(38.20)
a = (1-2p)
b = eiωT1
c = (A-B)2/4
d = (A+B)2/4
Maple now computes the square bracketed expression:
so that
[ a(1+b2-2ab)
(b-a)(1-ab) +1] =
(1-a2)
1+a2 -2acos(ωT1)
and then here is the final result for a Change/Hold line code :
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
(1-a2)
1+a2 -2acos(ωT1) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
(38.21)
7
where a = (2p-1) and p is the probability of a change while 1-p is the probability of a hold.
We shall now investigate various limits of this result.
Limit A → B.
<P(ω) > = Ppulse(ω) { A2
m = -∞
∞
2π δ(ωT1-2πm) }
(38.22)
In the case that the pulse is a box we use (34.22),
Ppulse(ω) = (1/ω1) sinc2(ωT1/2)
(38.23)
we get
<P(ω) > = A2 Ppulse(ω)
m = -∞
∞
2π δ(ωT1-2πm)
= A2
m = -∞
∞
2π δ(ωT1-2πm) (1/ω1) sinc2(πm) = A2 2π δ(ωT1) (1/ω1)
= A2 δ(ω)
(38.24)
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 between values A and B. We make use of this
limit from Appendix A with 2k = ωT1,
lima→-1
(1-a2)
1+a2 -2acos(ωT1) = π
m = ±odd
δ(ωT1/2-mπ/2) =
m = ±odd
2π δ(ωT1-mπ)
(A.25b)
and then our Change/Hold spectral power density becomes
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
m = ±odd
2π δ(ωT1-mπ) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
Installing the box pulse shape Ppulse(ω) = (1/ω1) sinc2(ωT1/2) and using (38.24) the second term
becomes just [ (A+B)
2
]2 δ(ω) while the first term is
[ (A-B)
2
]2
m = ±odd
2π δ(ωT1-mπ) (1/ω1) sinc2(mπ/2)
8
= [ (A-B)
2
]2 2π
m = ±odd
δ(ωT1-mπ) (1/ω1) (mπ/2)-2
= (A-B)2 (2/π2)
m = ±odd
(1/m2) δ(ω - mω1/2)
giving a final result,
<P(ω) > = (A-B)2 (2/π2)
m = ±odd
(1/m2) δ(ω - mω1/2) + [ (A+B)
2
]2 δ(ω)
(38.25)
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. 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
(1-a2)
1+a2-2acos(ωT1) = π
m = -∞
∞
δ(ωT1/2 - mπ) =
m = -∞
∞
2πδ(ωT1 - m2π)
(A.23c)
to get
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
m = -∞
∞
2π δ(ωT1 - 2mπ) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
Installing the square pulse spectrum (38.23) Ppulse(ω) = (1/ω1) sinc2(ωT1/2), the second term
according to (38.24) becomes [ (A+B)
2
]2 δ(ω) while the first term is
[ (A-B)
2
]2
m = ±odd
2π δ(ωT1-2mπ) (1/ω1) sinc2(mπ) = 0
giving the result
<P(ω) > = [ (A+B)
2
]2 δ(ω)
(38.26)
This is the expected result, appropriate for an average DC level of (A+B)/2.
Limit p→1/2 ( a → 0)
9
Recall the general result
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
(1-a2)
1+a2 -2acos(ωT1) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
The ratio becomes unity so the result is
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2 + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
(38.27)
Box Shaped Pulse for general p:
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
(1-a2)
1+a2 -2acos(ωT1) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
Ppulse(ω) = (1/ω1) sinc2(ωT1/2)
As usual, the second term becomes [ (A+B)
2
]2 δ(ω) , so the result is
<P(ω) > = [ (A-B)
2
]2 (1/ω1) sinc2(ωT1/2)
(1-a2)
1+a2 -2acos(ωT1) + [ (A+B)
2
]2 δ(ω)
(38.28)
Box Shaped Pulse for p = 1/2 (a = 0):
<P(ω) > = [ (A-B)
2
]2 (1/ω1) sinc2(ωT1/2) + [ (A+B)
2
]2 δ(ω)
(38.29)
<P(ω) > = (1/ω1) { [ (A-B)
2
]2 sinc2(πx) + [ (A+B)
2
]2 δ(x) } x ≡ ω
ω1
Ignoring the factor (1/ω1) we make this plot of <P(ω) > which is the same as for unipolar NRZ but with
different scaling factors for the two terms,
10
Example: 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 1 1 0 0 1]
NRZI means NRZ Invert-on-1, where NRZ means non return to zero (see comments at the start of Secton
36). NRZI does not mean "NRZ inverted". Sometimes people use A = 0 and B = 1 so then transitions
happen on 0 instead of 1, as in the standard for USB (Universal Serial Bus). We shall use A=1, B=0. The
Change/Hold spectra are symmetric in A↔B, so the NRZI spectra are the same for either convention.
Coefficients αm,n and β:
αn,m = <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.30)
Spectrum.
<P(ω) > = Ppulse(ω) { [ (A-B)
2
]2
(1-a2)
1+a2 -2acos(ωT1) + [ (A+B)
2
]2
m = -∞
∞
2π δ(ωT1-2πm) }
= Ppulse(ω) { 1
4
(1-a2)
1+a2 -2acos(ωT1) + 1
4
m = -∞
∞
2π δ(ωT1-2πm) }
(38.31)
Box Shaped Pulse for general p:
11
<P(ω) > = 1
4 (1/ω1) sinc2(ωT1/2)
(1-a2)
1+a2 -2acos(ωT1) + 1
4 δ(ω)
(38.32)
Box Shaped Pulse for p = 1/2 (a = 0):
<P(ω) > = (1/ω1) { 1
4 sinc2(πx) + 1
4 δ(x) }
x ≡ ω
ω1
(38.33)
The plot is that just shown above, but with each factor being 1/4.
This spectrum 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 a NRZI sequence y'n given by
y'n = yn – yn-1
// mod-2 math
This equation can be inverted to give (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.