PSD of Line Codes
A line code can be written as
𝑦 𝑡 = σ𝑘 𝑎𝑘 𝑝(𝑡 − 𝑘𝑇𝑏 ) (1)
Where 𝑝 𝑡 is a generic pulse shape of duration 𝑇𝑏 whose Fourier transform is 𝑃(𝑓)
𝑎𝑘 line code symbol at time k
The value of 𝑎𝑘 is random and depends on the type of line code. For example, for unipolar code, 𝑎𝑘 can
take values ‘0’ and ‘1’ randomly.
Taking the Fourier transform of (1), we have
𝑌 𝑓 = σ𝑘 𝑎𝑘 𝑃 𝑓 𝑒 −𝑗2𝜋𝑘𝑓𝑇𝑏
= 𝑃 𝑓 σ𝑘 𝑎𝑘 𝑒 −𝑗2𝜋𝑘𝑓𝑇𝑏 (2)
And the power spectral density of 𝑦 𝑡 is given by
𝑃(𝑓) 2
𝑆𝑦 𝑓 = σ∞
𝑛=−∞ 𝑅𝑛 𝑒
−𝑗2𝜋𝑛𝑓𝑇𝑏 (3)
𝑇𝑏
Where 𝑅𝑛 is the discrete autocorrelation function of the line code symbols 𝑎𝑘 .
PSD of a line code is fully characterized by pulse shape and 𝑅𝑛
Note: Proof of (3) is optional, however, if interested refer to Section 7.2.1, pp. 330, Modern Digital and Analog Communication
System by B. P Lathi and Z. Ding.
PSD of Line Codes (contd.)
Let 𝑝 𝑡 be a rectangular pulse of amplitude A and duration 𝑇𝑏 as shown below
𝑡
𝑝 𝑡 = 𝐴 𝑟𝑒𝑐𝑡 ↔ 𝑃 𝑓 = 𝐴𝑇𝑏 𝑠𝑖𝑛𝑐 𝑓𝑇𝑏 (4)
𝑇𝑏
𝑝 𝑡 − 𝑇𝑏 /2 ↔ 𝑃 𝑓 𝑒 −𝑗𝜋𝑓𝑇𝑏 (5)
𝑝 𝑡 − 𝑘𝑇𝑏 − 𝑇𝑏 /2 ↔ 𝑃 𝑓 𝑒 −𝑗2𝜋𝑘𝑓𝑇𝑏 𝑒 −𝑗𝜋𝑓𝑇𝑏 (6)
Moreover,
𝑃 𝑓 = 𝑃 𝑓 𝑒 −𝑗𝜋𝑓𝑇𝑏 = 𝑃 𝑓 𝑒 −𝑗2𝜋𝑘𝑓𝑇𝑏 𝑒 −𝑗𝜋𝑓𝑇𝑏 = 𝐴𝑇𝑏 𝑠𝑖𝑛𝑐 𝑓𝑇𝑏
And
𝑃 𝑓 2 = 𝐴2 𝑇𝑏 2 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 (7)
PSD of Unipolar NRZ Signal
In Unipolar NRZ coding
𝑎𝑘 = 1 when bit to be transmitted is ′1′ , and
𝑎𝑘 = 0 when bit to be transmitted is ′0′
Assume that the bits ′1′ and ′0′ are equiprobable. Using Eqn. (3) for PSD
𝑃(𝑓) 2
𝑆𝑦 𝑓 = σ∞
𝑛=−∞ 𝑅𝑛 𝑒
−𝑗2𝜋𝑛𝑓𝑇𝑏
𝑇𝑏
𝑅𝑛 = 𝐸 𝑎𝑘 𝑎𝑘+𝑛
𝑅0 = 𝐸 𝑎𝑘 2 = σ2𝑖=1 𝑎𝑘 2 𝑖 𝑝𝑖 , 𝑖 = 1 for 𝑎𝑘 = 1 and 𝑖 = 2 for 𝑎𝑘 = 0
Since 𝑎𝑘 is equally likely to be 1 or 0, therefore 𝑝1 = 𝑝2 = 1/2
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1
Since 𝑎𝑘 and 𝑎𝑘+1 are equally likely to be 1 or 0, therefore, the product 𝑎𝑘 𝑎𝑘+1 is equally likely to
have the following four possibilities
PSD of Unipolar NRZ Signal (contd.)
i 1 2 3 4
𝑎𝑘 𝑎𝑘+1 𝑖 1×1 1×0 0×1 0×0
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1 = σ4𝑖=1 𝑎𝑘 𝑎𝑘+1 𝑖 𝑝𝑖 , 𝑝𝑖 = 1/4 for i = 1, 2, 3, 4
1 1 1 1 1
𝑅1 = 1 × + 0 × + 0 × + 0 × =
4 4 4 4 4
𝑅2 = 𝐸 𝑎𝑘 𝑎𝑘+2
Since for 𝑅2 , the product of the 1st and 3rd symbols is required, therefore, consider all possible
combinations of 3-bits to find the non-zero product values.
111, 110, 101, 100, 011, 010, 001, 000
i 1 2 3 4 5 6 7 8
𝑎𝑘 𝑎𝑘+2 𝑖 1×1 1×0 1×1 1×0 0×1 0×0 0×1 0×0
𝑝𝑖 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8
Out of 8 combinations, only 2 product terms are 1 and the rest are 0.
2 6 1
∴ 𝑅2 = 1 × + 0 × =
8 8 4
PSD of Unipolar NRZ Signal (contd.)
In general, 𝑅𝑛 = 1/4 for 𝑛 ≠ 0
Using (3), PSD is given by
𝑃(𝑓) 2 1 1
𝑆𝑦 𝑓 = + σ∞ 𝑛=−∞, 𝑛≠0 𝑒 −𝑗2𝜋𝑛𝑓𝑇𝑏
𝑇𝑏 2 4
𝑃(𝑓) 2 1 1
= + σ∞ 𝑛=−∞ 𝑒 −𝑗2𝜋𝑛𝑓𝑇𝑏 (8)
𝑇𝑏 4 4
1 𝑛
Since σ∞
𝑛=−∞ 𝑒 −𝑗2𝜋𝑛𝑓𝑇𝑏
= σ ∞
𝑛=−∞ 𝛿 𝑓 − (9)
𝑇 𝑏 𝑇 𝑏
Putting (9) in (8), we have
𝑃(𝑓) 2 1 𝑛
𝑆𝑦 𝑓 = 1+ σ∞ 𝛿 𝑓−𝑇 (10)
4 𝑇𝑏 𝑇𝑏 𝑛=−∞ 𝑏
For rectangular pulse, from (7)
𝑃 𝑓 2 = 𝐴2 𝑇𝑏 2 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏
𝑛
Since 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 has zero-crossings at 𝑓 = 𝑇 , 𝑛 ≠ 0, therefore, final PSD is
𝑏
𝐴2 𝑇𝑏 1
𝑆𝑦 𝑓 = 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 1 + 𝑇 𝛿(𝑓) (11)
4 𝑏
Plot Eqn. (11) to visualize the shape of PSD.
PSD of Unipolar RZ Signal
• 𝑅𝑛 will be the same as NRZ
• However, since the pulse duration is now 𝑇𝑏 /2, therefore, Eqn. (7) will become
2 𝐴2 𝑇𝑏 2
𝑃 𝑓 = 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 /2 (12)
4
Putting (12) in (10), PSD is given by
𝐴2 𝑇𝑏 1 𝑛
𝑆𝑦 𝑓 = 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 /2 1 + σ∞ 𝛿 𝑓− (13)
16 𝑇𝑏 𝑛=−∞ 𝑇𝑏
Plot Eqn. (13) to visualize the shape of PSD.
PSD of Polar NRZ Signal
In Polar NRZ coding
𝑎𝑘 = 1 when the bit to be transmitted is ′1′ , and
𝑎𝑘 = −1 when the bit to be transmitted is ′0′
Assume that the bits ′1′ and ′0′ are equiprobable.
𝑅𝑛 = 𝐸 𝑎𝑘 𝑎𝑘+𝑛
𝑅0 = 𝐸 𝑎𝑘 2 = σ2𝑖=1 𝑎𝑘 2 𝑖 𝑝𝑖 , 𝑖 = 1 for 𝑎𝑘 = 1 and 𝑖 = 2 for 𝑎𝑘 = −1
Since 𝑎𝑘 is equally likely to be 1 or -1, therefore, 𝑝1 = 𝑝2 = 1/2
1 1
𝑅0 = 12 × + (−1)2 × = 1
2 2
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1
Since 𝑎𝑘 and 𝑎𝑘+1 are equally likely to be 1 or -1, therefore, the product 𝑎𝑘 𝑎𝑘+1 is equally likely to
have the following four possibilities
i 1 2 3 4
𝑎𝑘 𝑎𝑘+1 𝑖 1×1 1 × -1 -1 × 1 -1 × -1
PSD of Polar NRZ Signal (contd.)
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1 = σ4𝑖=1 𝑎𝑘 𝑎𝑘+1 𝑖 𝑝𝑖 , 𝑝𝑖 = 1/4 for i = 1, 2, 3, 4
1 1 1 1
𝑅1 = 1 × + (−1) × + (−1) × + 1 × = 0
4 4 4 4
𝑅2 = 𝐸 𝑎𝑘 𝑎𝑘+2
Since for 𝑅2 , the product of the 1st and 3rd symbols is required, therefore, consider all possible
combinations of 3-bits to find the product values.
111, 110, 101, 100, 011, 010, 001, 000
i 1 2 3 4 5 6 7 8
𝑎𝑘 𝑎𝑘+2 𝑖 1×1 1 × -1 1×1 1 × -1 -1 × 1 -1 × -1 -1 × 1 -1 × -1
𝑝𝑖 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8
Out of 8 combinations, 4 product terms are 1 and the rest are -1.
4 4
∴ 𝑅2 = 1 × + (−1) × = 0, In general, 𝑅𝑛 = 0 for 𝑛 ≠ 0
8 8
Using (3) and (7), PSD is given by
𝑆𝑦 𝑓 = 𝐴2 𝑇𝑏 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 (14)
PSD of Bipolar NRZ Signal
In Bipolar NRZ coding
𝑎𝑘 = 1 and − 1 alternatively when the bit to be transmitted is ′1′ , and
𝑎𝑘 = 0 when the bit to be transmitted is ′0′
𝑎𝑘 is a ternary signal (-1, 0, 1)
Assume that the bits ′1′ and ′0′ are equiprobable, then the probability of 𝑎𝑘 = 0 will be ½, the probability of
𝑎𝑘 = 1 will be ¼ and the probability of 𝑎𝑘 = −1 will be ¼ .
𝑅𝑛 = 𝐸 𝑎𝑘 𝑎𝑘+𝑛
𝑅0 = 𝐸 𝑎𝑘 2 = σ3𝑖=1 𝑎𝑘 2 𝑖 𝑝𝑖 , 𝑖 = 1 for 𝑎𝑘 = 1, 𝑖 = 2 for 𝑎𝑘 = −1 and 𝑖 = 3 for 𝑎𝑘 = 0
1 1 1 1
𝑅0 = 12 × + (−1)2 × + (0)2 × =
4 4 2 2
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1
Considering all 4 possible combinations of 2-bits to find the product values.
11, 10, 01, 00
i 1 2 3 4
𝑎𝑘 𝑎𝑘+1 𝑖 1 × -1 1×0 0×1 0×0
PSD of Bipolar NRZ Signal (contd.)
𝑅1 = 𝐸 𝑎𝑘 𝑎𝑘+1 = σ4𝑖=1 𝑎𝑘 𝑎𝑘+1 𝑖 𝑝𝑖 , 𝑝𝑖 = 1/4 for i = 1, 2, 3, 4
1 1 1 1 1
𝑅1 = −1 × + 0 × + 0 × + 0 × = −
4 4 4 4 4
𝑅2 = 𝐸 𝑎𝑘 𝑎𝑘+2
Since for 𝑅2 , the product of the 1st and 3rd symbols is required, therefore, consider all possible combinations
of 3-bits to find the product values.
111, 110, 101, 100, 011, 010, 001, 000
According to the bipolar rule, in 111, 1st and 3rd symbol will be of same polarity. And in 101, 1st and 3rd
symbol will be of opposite polarity
i 1 2 3 4 5 6 7 8
𝑎𝑘 𝑎𝑘+2 𝑖 1×1 1×0 1 × -1 1×0 0×1 0×0 0×1 0×0
(product) (1) (0) (-1) (0) (0) (0) (0) (0)
𝑝𝑖 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/8
1 1
∴ 𝑅2 = 1 × + (−1) × = 0, In general, 𝑅𝑛 = 0 for 𝑛 > 0.
8 8
PSD of Bipolar NRZ Signal (contd.)
Using (3) and (7) and the fact that 𝑅1 = 𝑅−1
𝑃(𝑓) 2
𝑆𝑦 𝑓 = σ∞
𝑛=−∞ 𝑅𝑛 𝑒
−𝑗2𝜋𝑛𝑓𝑇𝑏
𝑇𝑏
𝑃 𝑓 2
= 𝐴2 𝑇𝑏 2 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏
𝐴2 𝑇𝑏 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 1 1
𝑆𝑦 𝑓 = 1 − 𝑒 −𝑗2𝜋𝑓𝑇𝑏 − 𝑒 𝑗2𝜋𝑓𝑇𝑏
2 2 2
𝐴2 𝑇𝑏 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏
𝑆𝑦 𝑓 = 1 − cos(2𝜋𝑓𝑇𝑏 )
2
𝑆𝑦 𝑓 = 𝐴2 𝑇𝑏 𝑠𝑖𝑛𝑐 2 𝑓𝑇𝑏 𝑠𝑖𝑛2 𝜋𝑓𝑇𝑏 (15)
PSD of Manchester Coded Signal
Using the same procedure, show that the PSD of the Manchester coded signal is given by
𝑓𝑇𝑏 𝜋𝑓𝑇𝑏
𝑆𝑦 𝑓 = 𝐴2 𝑇𝑏 𝑠𝑖𝑛𝑐 2 𝑠𝑖𝑛2
2 2
Polar NRZ
Unipolar NRZ
Unipolar RZ Bipolar RZ
Manchester