DSP - Module 3
DSP - Module 3
Module 3
DFT Properties
DFT of a Time reversal sequence: If
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥(𝑛) ↔ 𝑋(𝑘) Then
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥((−𝑛))𝑁 = 𝑥(𝑁 − 𝑛) ↔ 𝑋(𝑁 − 𝑘)
Proof: The N-point DFT of 𝑥(𝑛) isX(k)
N−1
X(k) = ∑ x(n)WNnk 0 ≤ 𝑘 ≤ 𝑁 − 1
n=0
Put 𝑚 = 𝑁 − 𝑛, 𝑛=𝑁−𝑚
−1 N−1
(N−m)k (N−m)k
X(k) = ∑ x(N − m)WN = ∑ x(N − m)WN
m=N m=0
N−1
Put 𝑘 = 𝑁 − 𝑘
N−1
−(N−k)m
X(N − k) = ∑ x(N − m) WN
m=0
N−1
Therefore reversing the N-point sequence in time is equivalent to reversing the DFT values.
And we know that 𝑋 ∗ (𝑘) = X(N − k) = X((−k))N
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥((−𝑛))𝑁 = 𝑥(𝑁 − 𝑛) ↔ 𝑋 (𝑁 − 𝑘 )= 𝑋 ∗ (𝑘 )
Problem: Determine the 4-point DFT of the sequence 𝑥(𝑛) = (1,2,1) , and also compute the
DFT of 𝑥((−𝑛) )4
1
Prepared by Dr Harish M S
X(k) = ∑ x(n)W4nk 0 ≤ 𝑘 ≤ 3
n=0
Put 𝑛 = 𝑛 − 𝑙
N−1
1 −(n−l)k
x(n − l) = 𝑥((𝑛 − 𝑙 ))𝑁 = ∑ X(k)WN
N
k=0
N−1
1
= ∑ X(k)WN−nk 𝑊𝑁𝑙𝑘
N
k=0
N−1
1
= ∑{X(k)WNlk }𝑊𝑁−𝑛𝑘 = X(k)𝑊𝑁𝑙𝑘
N
k=0
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
∴ 𝑥((𝑛 − 𝑙 ))𝑁 = ↔ 𝑊𝑁𝑙𝑘 𝑋(𝑘)
Problem: The 4-point DFT of x(n) is 𝑋(𝑘) = {1, 𝑗, −1, −𝑗}. Determine the DFTs of
i. 𝑥((𝑛 − 1))4
ii. 𝑥((𝑛 + 3))4
iii. 𝑥((𝑛 − 1))4 + 𝑥((𝑛 + 3))4
2
Prepared by Dr Harish M S
Solution:
i. 𝑥((𝑛 − 1))4
Let 𝑦1 (𝑛) = 𝑥((𝑛 − 1))4
𝑌1 (𝑘) = 𝑊4𝑘 𝑋(𝑘)
𝑌1 (0) = 𝑊40 𝑋 (0) = 1 × 1 = 1
𝑌1 (1) = 𝑊41 𝑋 (1) = −𝑗 × 𝑗 = 1
𝑌1 (2) = 𝑊42 𝑋 (2) = −1 × −1 = 1
𝑌1 (3) = 𝑊43 𝑋 (3) = 𝑗 × −𝑗 = 1
𝑌1 (𝑘) = [1,1,1,1]
ii. 𝑥((𝑛 + 3))4
Let 𝑦2 (𝑛) = 𝑥((𝑛 + 3))4
𝑌2 (𝑘) = 𝑊4−3𝑘 𝑋 (𝑘)
𝑌2 (0) = 𝑊40 𝑋(0) = 1 × 1 = 1
𝑌2 (1) = 𝑊4−3 𝑋(1) = −j × j = 1
𝑌2 (2) = 𝑊4−6 𝑋 (2) = −1 × −1 = 1
𝑌2 (3) = 𝑊4−9 𝑋(3) = j × −j = 1
𝑌3 (𝑘) = [1,1,1,1]
iii. 𝑥((𝑛 − 1))4 + 𝑥((𝑛 + 3))4
Let 𝑦3 (𝑛) = 𝑥((𝑛 − 1))4 + 𝑥((𝑛 + 3))4
𝑌3 (𝑘) = 𝑊4𝑘 𝑋 (𝑘) + 𝑊4−3𝑘 𝑋 (𝑘)
𝑌3 (0) = 𝑊40 𝑋(0) + 𝑊40 𝑋(0) = 1 + 1 = 2
𝑌3 (1) = 𝑊41 𝑋 (1) + 𝑊4−3 𝑋 (1) = 1 + 1 = 2
𝑌3 (2) = 𝑊42 𝑋(2) + 𝑊4−6 𝑋(2) = 1 + 1 = 2
𝑌3 (3) = 𝑊43 𝑋 (3) + 𝑊4−9 𝑋 (3) = 1 + 1 = 2
Problem: Consider the sequence 𝑥(𝑛) = (0,1,2, .3,4)
i. Sketch the sequence 𝑠(𝑛) with 6-point DFT 𝑆(𝑘) = 𝑋(𝑘)𝑊2𝑘 0≤𝑘≤5
ii. Determine the sequence 𝑦(𝑛) with 6-point DFT 𝑌(𝑘) = 𝑅𝑒(𝑋 (𝑘)) 0 ≤ 𝑘 ≤ 5
iii. Determine the sequence 𝑣(𝑛) with 6-point DFT 𝑉(𝑘) = 𝐼𝑚(𝑋(𝑘)) 0 ≤ 𝑘 ≤ 5
Solution: i. 𝑆(𝑘) = 𝑋(𝑘)𝑊2𝑘 0≤𝑘≤5
𝑆(𝑘) = 𝑋(𝑘)𝑊3𝑘6 0≤𝑘≤5
3
Prepared by Dr Harish M S
4
Prepared by Dr Harish M S
5
Prepared by Dr Harish M S
k 2k 3k 4k 5k
W(k) = 1 + W10 + W10 + W10 + W10 + W10
5k k 2k 3k 4k 5k
𝑌(𝑘) = 𝑊 (𝑘)𝑋(𝑘) = (1 + W10 )(1 + W10 + W10 + W10 + W10 + W10 )
k 2k 3k 4k 5k 5k 6k 7k 8k 9k 10k
= 1 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10
k 2k 3k 4k 5k 5k 6k 7k 8k 9k
= 1 + W10 + W10 + W10 + W10 + 2W10 + W10 + W10 + W10 + W10 + W10 +1
k 2k 3k 4k 5k 5k 6k 7k 8k 9k
= 2 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10 + W10
𝑦(𝑛) = (2,1,1,1,1,1,1,1,1,1)
DFT of circular frequency shifted sequence: If
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥(𝑛) ↔ 𝑋(𝑘) Then
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥(𝑛)𝑊𝑁−𝑙𝑛 ↔ 𝑋((𝑘 − 𝑙 ))𝑁
Proof: The N-point DFT of 𝑥(𝑛) is X(k)
N−1
Put 𝑘 = 𝑘 − 𝑙
N−1
n(k−l)
X(k − l) = ∑ x(n)WN
n=0
N−1
6
Prepared by Dr Harish M S
𝑦(𝑛) = {1,0,1,0}
DFT of complex-conjugate sequence: If
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥(𝑛) ↔ 𝑋(𝑘) Then
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
𝑥 ∗ (𝑛) ↔ 𝑋 ∗ ((−𝑘))𝑁 = 𝑋 ∗ (𝑁 − 𝑘)
𝐷𝐹𝑇{𝑥 ∗ (𝑛)} = ∑𝑁−1 ∗ 𝑛𝑘
𝑛=0 𝑥 (𝑛)𝑊𝑁 } 0≤𝑘 ≤𝑁−1
𝑁−1
= ∑ 𝑥 ∗ (𝑛)𝑊𝑁𝑛𝑘 𝑊𝑁−𝑛𝑁
𝑛=0
𝑁−1
= ∑{𝑥(𝑛)𝑊𝑁−𝑛𝑘 𝑊𝑁𝑛𝑁 }∗
𝑛=0
𝑁−1
(𝑁−𝑘)𝑛 ∗
∑{𝑥(𝑛)𝑊𝑁 }
𝑛=0
= 𝑋 ∗ (𝑁 − 𝑘)
𝑁−𝑃𝑜𝑖𝑛𝑡 𝐷𝐹𝑇
∴ 𝑥 ∗ (𝑛) ↔ 𝑋 ∗ ((−𝑘))𝑁 = 𝑋 ∗ (𝑁 − 𝑘)
DFT of Multiplication of two sequences
1
Prove that DFT{x1 (n)x2 (n) = N X1 (k) ⊛ X2 (k)
N−1 N−1
1
DFT{x1 (n)x2 (n)} = ∑{x1 (n)[ ∑ X2 (l)WN−nl ] WNnk
N
n=0 l=0
7
Prepared by Dr Harish M S
2πn
Problem: Compute the quantity∑N−1 ∗
n=0 x1 (n)x2 (n), where x1 (n) = x2 (n) = cos , 0≤𝑛≤
N
𝑁−1
2πn −j2πn 2πn j2πn
j −j
2πn 2πn ∗ e N +e N e N +e N
Solution:∑N−1 ∗
n=0 x1 (n)x2 (n) = ∑N−1
n=0 cos (cos ) = ∑N−1
n=0 ( )( )
N N 2 2
N−1 N−1 N−1 N−1
1 2π2n −j2π2n 1 1 2π2n 1 −j2π2n
= ∑ (1 + ej N + 1 + e N ) = ∑ 2 + ∑ ej N + ∑ e N
4 4 4 4
n=0 n=0 n=0 n=0
N−1 N−1 N−1
1 1 1 1 1
= ∑ 1 + ∑ WN−2n + ∑ WN2n = N + 0 + 0 = N
2 4 4 2 2
n=0 n=0 n=0
2πn
Problem: Compute the quantity∑N−1 ∗
n=0 x1 (n)x2 (n), where x1 (n) = cos and x2 (n) =
N
2πn
sin , 0≤ 𝑛 ≤ 𝑁−1
N
2πn −j2πn 2πn −j2πn
j j
2πn 2πn e N +e N e N −e N
Solution:∑N−1 ∗ N−1
n=0 x1 (n)x2 (n) = ∑n=0 cos ( sin N )∗ = ∑N−1
n=0 ( )( )
N 2 2j
N−1 N−1 N−1
1 2π2n −j2π2n 1 2π2n 1 −j2π2n
= ∑ (ej N − e N ) = ∑ ej N − ∑ e N
4j 4j 4j
n=0 n=0 n=0
N−1 N−1
1 1
∑ WN−2n − ∑ WN2n = 0 + 0 = 0
4j 4j
n=0 n=0
∑ 𝑥(𝑛)𝑦(𝑛)∗
𝑛=0
1
We know that N-point IDFT of y (n) is 𝑦(𝑛) = 𝑁 ∑𝑁−1 −𝑛𝑘
𝑘=0 𝑌(𝑘)𝑊𝑁 , then
𝑁−1 𝑁−1 𝑁−1 ∗
1
∑ 𝑥 (𝑛)𝑦(𝑛)∗ = ∑ 𝑥(𝑛) ( ∑ 𝑌(𝑘)𝑊𝑁−𝑛𝑘 )
𝑁
𝑛=0 𝑛=0 𝑘=0
8
Prepared by Dr Harish M S
This is general expression for Parseval’s theorem. In the special case where𝑦(𝑛) = 𝑥(𝑛), then
𝑁−1 𝑁−1
1
∑ 𝑥(𝑛)𝑥(𝑛)∗ = ∑ 𝑋 ∗ (𝑘)𝑋(𝑘)
𝑁
𝑛=0 𝑘=0
𝑁−1 𝑁−1
1
∑ |𝑥(𝑛) |2 = ∑ |(𝑋(𝑘))|2
𝑁
𝑛=0 𝑘=0
Which express the energy in 𝑥(𝑛) in terms of the frequency component 𝑋(𝑘).
Problem: Let 𝑥 (𝑛) = (1,2,0,3, −2,4,7,5) with 8-point DFT 𝑋(𝑘) Evaluate the following
i. X(0)
ii. X(4)
iii. ∑7𝑘=0 𝑋(𝑘)
iv. ∑7𝑘=0|𝑋(𝑘)|2
Solution:
i. X(0)
7
𝑋(𝑘) = ∑ 𝑥(𝑛)𝑊8𝑛𝑘
𝑛=0
7
∴ 𝑋 (0) = ∑ 𝑥(𝑛) = 𝑥(0) + 𝑥(1) + 𝑥 (2) + 𝑥(3) + 𝑥(4) + 𝑥(5) + 𝑥(6) + 𝑥(7)
𝑛=0
𝑋(0) = 1 + 2 + 0 + 3 − 2 + 4 + 7 + 5 = 20
ii. X(4)
7
𝑋 (𝑘) = ∑ 𝑥(𝑛)𝑊8𝑛𝑘
𝑛=0
9
Prepared by Dr Harish M S
7 7
If 𝑛 = 0, we get
7
1
𝑥(0) = ∑ 𝑋(𝑘)
8
𝑘=0
7
∑ 𝑋(𝑘) = 8𝑥(0) = 8 × 1 = 8
𝑘=0
iv. ∑7𝑘=0|𝑋(𝑘)|2
7 7
1
∑|𝑥(𝑛)|2 = ∑ |(𝑋(𝑘))|2
8
𝑛=0 𝑘=0
7
∴ ∑ |(𝑋(𝑘))|2
𝑛=0
7
= 8 ∑ |(𝑥(𝑛))|2
𝑛=0
10
Prepared by Dr Harish M S
𝑋(7) = 10
Find the remaining 6-samples of 𝑋(𝑘). And also find
a. 𝑥(0)
b. 𝑥(7)
c. ∑13
𝑛=0 𝑥(𝑛)
d. ∑13
𝑛=0|𝑥(𝑛)|
2
Solution:
Since 𝑥(𝑛) is real
𝑋(𝑘) = 𝑋 ∗ (𝑁 − 𝑘)
𝑋 (𝑘) = 𝑋 ∗ (14 − 𝑘)0 ≤ 𝑘 ≤ 13
𝑋 (8) = 𝑋 ∗ (6) = −2 + 3𝑗
𝑋(9) = 𝑋 ∗ (5) = 6 − 𝑗3
𝑋(10) = 𝑋 ∗ (4) = −2 − 2𝑗
𝑋 (11) = 𝑋 ∗ (3) = 1 + 5𝑗
𝑋 (12) = 𝑋 ∗ (2) = 3 − 4𝑗
𝑋(13) = 𝑋 ∗ (1) = −1 − 3𝑗
1
a. 𝑥(𝑛) = 𝑁 ∑𝑁−1 −𝑛𝑘
𝑘=0 𝑋(𝑘)𝑊𝑁
13
1
𝑥 (0) = ∑ 𝑋 (𝑘 )
14
𝑘=0
1
= {𝑋(0) + 𝑋 (1) + 𝑋 (2) + 𝑋(3) + 𝑋(4) + 𝑋 (5) + 𝑋 (6) + 𝑋(7) + 𝑋(8)
14
+ 𝑋 (9) + 𝑋 (10) + 𝑋 (11) + 𝑋 (12) + 𝑋 (13)}
1
= {12 + 1 + 3𝑗 + 3 + 𝑗4 + 1 − 𝑗5 + −2 + 𝑗2 + 6 + 𝑗3 − 2 − 3𝑗 + 10 − 2 + 3𝑗 + 6 − 𝑗3
14
− 2 − 2𝑗 + 1 + 5𝑗 + 3 − 4𝑗 + −1 − 3𝑗} = 2.2853
1
b. 𝑥(𝑛) = 𝑁 ∑𝑁−1 −𝑛𝑘
𝑘=0 𝑋(𝑘)𝑊𝑁
13 13
1 −7𝑘
1
𝑥 (7) = ∑ 𝑋(𝑘)𝑊14 = ∑ 𝑋(𝑘)(−1)𝑘
14 14
𝑘=0 𝑘=0
11
Prepared by Dr Harish M S
13
1
= ∑ 𝑋(𝑘)(−1)𝑘
14
𝑘=0
1
= {𝑋(0) − 𝑋 (1) + 𝑋 (2) − 𝑋(3) + 𝑋(4) − 𝑋 (5) + 𝑋 (6) − 𝑋(7) + 𝑋(8)
14
− 𝑋 (9) + 𝑋 (10) − 𝑋 (11) + 𝑋 (12) − 𝑋 (13)}
1
= {12 − 1 − 3𝑗 + 3 + 𝑗4 − 1 + 𝑗5 − 2 + 𝑗2 − 6 − 𝑗3 − 2 − 3𝑗 − 10 − 2 + 3𝑗 − 6 + 𝑗3 − 2
14
− 2𝑗 − 1 − 5𝑗 + 3 − 4𝑗 + 1 + 3𝑗} = −0.8571
c. ∑13
𝑛=0 𝑥(𝑛)
13
𝑋(𝑘) = ∑ 𝑥(𝑛)𝑊𝑁𝑛𝑘
𝑛=0
13
𝑋(0) = ∑ 𝑥(𝑛)
𝑛=0
13
∑ 𝑥(𝑛) = 12
𝑛=0
d. ∑13
𝑛=0|𝑥(𝑛)|
2
13 13 13
1 1
∑ |𝑥(𝑛) |2 = ∑|(𝑋(𝑘))|2 = ∑ 𝑋(𝑘)𝑋 ∗ (𝑘) =
14 14
𝑛=0 𝑘=0 𝑘=0
13 13 13
1 1
∑ |𝑥(𝑛) |2 = ∑|(𝑋(𝑘))|2 = ∑ 𝑋(𝑘)𝑋 ∗ (𝑘) =
14 14
𝑛=0 𝑘=0 𝑘=0
13
1 1
= ∑ 𝑋 (𝑘)𝑋 ∗ (𝑘) = {𝑋 (0)𝑋 ∗ (0) + 𝑋 (1)𝑋 ∗ (1) + 𝑋(2)𝑋 ∗ (2) + 𝑋(3)𝑋 ∗ (3) + 𝑋 (4)𝑋 ∗ (4)
14 14
𝑘=0
+ 𝑋 (5)𝑋 ∗ (5) + 𝑋 (6)𝑋 ∗ (6) + 𝑋 (7)𝑋 ∗ (7) + 𝑋 (8)𝑋 ∗ (8) + 𝑋 (9)𝑋 ∗ (9)
+ 𝑋(10)𝑋 ∗ (10) + 𝑋 (11)𝑋 ∗ (11) + 𝑋(12)𝑋 ∗ (12) + 𝑋 (13)𝑋 ∗ (13)}
1
{12 × 12 + (−12 + 32 ) + (32 + 42 ) + (12 + 52 ) + (−22 + 22 ) + (62 + 32 )
14
+ (−22 + −33 ) + 10 × 10 + (−22 + 32 ) + (62 + −32 ) + (−22 + −22 )
+ (12 + −52 ) + (32 + −42 ) + (−12 + −32 )} = 35.51
Problem: If DFT and IDFT operators are cascaded, what is the overall output?
Solution:
12
Prepared by Dr Harish M S
𝑁−1
𝑋(𝑘) = ∑ 𝑥(𝑚)𝑊𝑁𝑚𝑘
𝑚=0
𝑁−1
1
𝑥 ′ (𝑛) = ∑ 𝑋(𝑘)𝑊𝑁−𝑛𝑘
𝑁
𝑘=0
𝑁−1 𝑁−1
1
𝑥 ′ (𝑛) = ∑{ ∑ 𝑥(𝑚)𝑊𝑁𝑚𝑘 } 𝑊𝑁−𝑛𝑘
𝑁
𝑘=0 𝑚=0
𝑥 ′ (𝑛) = 𝑥(𝑛)
Problem: If the two DFT operators are cascaded, what is the overall output?
Solution:
𝑁−1
𝑋(𝑘) = ∑ 𝑥(𝑚)𝑊𝑁𝑚𝑘
𝑚=0
13
Prepared by Dr Harish M S
𝑁−1
𝑥 ′ (𝑛) = ∑ 𝑋 (𝑘)𝑊𝑁𝑛𝑘
𝑘=0
𝑁−1 𝑁−1
′(
𝑥 𝑛) = ∑{ ∑ 𝑥(𝑚)𝑊𝑁𝑚𝑘 } 𝑊𝑁𝑛𝑘
𝑘=0 𝑚=0
𝑥 ′ (𝑛) = 𝑁𝑥((−𝑛))𝑁
Problem: Let 𝑥(𝑛) be a length N with N-point DFT 𝑋(𝑘). The DFT operation is represented
𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛) In fact the 𝑦(𝑛), consists of 𝑀 + 𝐿 − 1 samples. In the frequency domain,
the same linear convolution 𝑦(𝑛) can be obtained by performing N-point 𝐷𝐹𝑇 for which 𝑁 ≥
𝑀 + 𝐿 − 1, that is
𝑌 (𝑘) = 𝑋 (𝑘)𝐻(𝑘)
14
Prepared by Dr Harish M S
Let the length of FIR filter impulse response ℎ(𝑛) be M. The input long data sequence 𝑥(𝑛) is
segmented into number of blocks 𝑥1 (𝑛), 𝑥2 (𝑛), 𝑥3 (𝑛), … … each blocks consists of 𝑁 = 𝐿 +
𝑀 − 1 and 𝐿 >> 𝑀. The first (𝑀 − 1) samples in 𝑥1 (𝑛) are zeros and L samples are from 𝑥(𝑛) .
15
Prepared by Dr Harish M S
For remaining data blocks such as𝑥2 (𝑛), 𝑥3 (𝑛), … … , the first (𝑀 − 1) sequences are from
previous blocks followed by L new data points from 𝑥(𝑛) as shown in below figure.
And
Now we have to perform N-point circular convolution 𝑥1 (𝑛) with ℎ1 (𝑛), 𝑥2 (𝑛) with
ℎ1 (𝑛), 𝑥3 (𝑛) with ℎ1 (𝑛) and so on using DFT and IDFT method. We obtain the
output 𝑦1 (𝑛) = 𝑥1 (𝑛) ⊛ ℎ1 (𝑛), 𝑦2 (𝑛) = 𝑥2 (𝑛) ⊛ ℎ1 (𝑛), 𝑦3 (𝑛) = 𝑥3 (𝑛) ⊛ ℎ1 (𝑛) and so
on. To obtain the final output 𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛), we have to combine 𝑦1 (𝑛), 𝑦2 (𝑛), 𝑦3 (𝑛)
and so on as follows
16
Prepared by Dr Harish M S
Problem: Find the output y(n) of the filter whose impulse response ℎ(𝑛) = {1,1,1} and the input
signal 𝑥(𝑛) = (3, −1, 0, 1, 3, 2, 0, 1, 2, 1) using overlap save method.
Solution: Output 𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛), 𝑀=3
𝑁 = 𝐿 + 𝑀 − 1, 𝐿 ≥ 𝑀, 𝐿=3
∴ 𝑁 = 3 + 3 − 1 = 5, thus we have to perform 𝑁 = 5 point circular convolution. The signal
𝑥(𝑛) is subdivide into 𝑥1 (𝑛) = (0,0, 3, −1,0 ), 𝑥2 (𝑛) = (−1,0, 1, 3, 2), 𝑥3 (𝑛) = (3, 2, 0, 1,2)
and 𝑥4 (𝑛) = (1,2,1,0,0). The ℎ(𝑛) is modified to ℎ1 (𝑛) = (1, 1, 1, 0, 0).
𝑦1 (𝑛) = 𝑥1 (𝑛) ⊛ ℎ1 (𝑛)
𝑌1 (𝑘 ) = 𝑋1 (𝑘)𝐻1 (𝑘) = (3𝑊52𝑘 − 𝑊53𝑘 )(1 + 𝑊5𝑘 + 𝑊52𝑘 ) = 3𝑊52𝑘 + 2𝑊53𝑘 + 2𝑊54𝑘 − 𝑊55𝑘
𝑌1 (𝑘) = −1 + 3𝑊52𝑘 + 2𝑊53𝑘 + 2𝑊54𝑘
∴ 𝑦1 (𝑛) = (−1,0,3,2,2)
𝑦2 (𝑛) = 𝑥2 (𝑛) ⊛ ℎ1 (𝑛)
𝑌2 (𝑘) = 𝑋2 (𝑘)𝐻1 (𝑘 ) = (−1 + 𝑊52𝑘 + 3𝑊53𝑘 + 2𝑊54𝑘 )(1 + 𝑊5𝑘 + 𝑊52𝑘 )
= 4 + 𝑊5𝑘 + 4𝑊53𝑘 + 6𝑊54𝑘
∴ 𝑦2 (𝑛) = (4,1,0,4,6)
𝑦3 (𝑛) = 𝑥3 (𝑛) ⊛ ℎ1 (𝑛)
𝑌3 (𝑘) = 𝑋3 (𝑘)𝐻1 (𝑘 ) = (3 + 2𝑊5𝑘 + 𝑊53𝑘 + 2𝑊54𝑘 )(1 + 𝑊5𝑘 + 𝑊52𝑘 )
= 6 + 7𝑊5𝑘 + 5𝑊52𝑘 + 3𝑊53𝑘 + 3𝑊54𝑘
∴ 𝑦3 (𝑛) = (6, 7, 5, 3, 3)
17
Prepared by Dr Harish M S
18
Prepared by Dr Harish M S
Let the length of FIR filter impulse response ℎ(𝑛) be M. The input long data sequence 𝑥(𝑛) is
segmented into number of blocks 𝑥1 (𝑛), 𝑥2 (𝑛), 𝑥3 (𝑛), … … each blocks consists of 𝑁 = 𝐿 +
𝑀 − 1 and 𝐿 >> 𝑀. The first L samples in 𝑥1 (𝑛)𝑥1 (𝑛), 𝑥2 (𝑛), 𝑥3 (𝑛), … … are from 𝑥(𝑛) and
last (𝑀 − 1) samples are zeros as shown in below figure.
And
Now we have to perform N-point circular convolution 𝑥1 (𝑛) with ℎ1 (𝑛), 𝑥2 (𝑛) with
ℎ1 (𝑛)𝑥3 (𝑛) with ℎ1 (𝑛) and so on using DFT and IDFT method. We obtain the output 𝑦1 (𝑛) =
𝑥1 (𝑛) ⊛ ℎ1 (𝑛), 𝑦2 (𝑛) = 𝑥2 (𝑛) ⊛ ℎ1 (𝑛), 𝑦3 (𝑛) = 𝑥3 (𝑛) ⊛ ℎ1 (𝑛) and so on. To obtain the
final output 𝑦(𝑛) = 𝑥(𝑛) ⊛ ℎ(𝑛), we have to combine 𝑦1 (𝑛), 𝑦2 (𝑛), 𝑦3 (𝑛) and so on as
follows
19
Prepared by Dr Harish M S
Problem: An FIR filter has a unit impulse response ℎ(𝑛) = (2, 2, 1). Determine the output
sequence in response to the input sequence 𝑥(𝑛) = (3,0,2,0,2,1,0, −2, −2,0) using over lap add
fast convolution technique. Use 8-point circular convolution.
Solution: Output 𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛), 𝑀=3
𝑁 = 8 = 𝐿 + 3 − 1, 𝐿 = 6
Thus we have to perform 𝑁 = 8 point circular convolution. The signal 𝑥(𝑛) is subdivide
into 𝑥1 (𝑛) = ( 3,0, 2,0,2,1,0,0 ) 𝑎𝑛𝑑 𝑥2 (𝑛) = (0, −2, −2,0,0,0,0,0) and ℎ(𝑛) is modified
to ℎ1 (𝑛) = (2,2,1,0,0,0,0,0).
𝑦1 (𝑛) = 𝑥1 (𝑛) ⊛ ℎ1 (𝑛)
𝑌1 (𝑘) = 𝑋1 (𝑘)𝐻1 (𝑘 ) = (3 + 2𝑊82𝑘 + 2𝑊84𝑘 + 𝑊85𝑘 )(2 + 2𝑊8𝑘 + 𝑊82𝑘 )
𝑌1 (𝑘) = 6 + 6𝑊8𝑘 + 7𝑊82𝑘 + 4𝑊83𝑘 + 6𝑊84𝑘 + 6𝑊85𝑘 + 4𝑊86𝑘 + 𝑊87𝑘
∴ 𝑦1 (𝑛) = (6,6,7,4,6,6,4,1)
𝑦2 (𝑛) = 𝑥2 (𝑛) ⊛ ℎ1 (𝑛)
𝑌2 (𝑘) = 𝑋2 (𝑘)𝐻1 (𝑘) = (−2𝑊8𝑘 − 2𝑊82𝑘 )(2 + 2𝑊8𝑘 + 𝑊82𝑘 )
𝑌2 (𝑘) = −4𝑊8𝑘 − 8𝑊82𝑘 − 6𝑊83𝑘 − 2𝑊84𝑘
∴ 𝑦2 (𝑛) = (0, −4, −8, −6, −2,0,0,0)
20
Prepared by Dr Harish M S
Problem: Find the output of the filter whose impulse response ℎ(𝑛) = (1, −2) and the input
signal 𝑥(𝑛) = (3, −2,4,1,5,7,2, −9) using over lap add method. Use only 5-point circular
convolution.
Solution: Output 𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛), 𝑀=2
𝑁 = 5 = 𝐿 + 2 − 1, 𝐿 = 4
Thus we have to perform 𝑁 = 4 point circular convolution. The signal 𝑥(𝑛) is subdivide
into 𝑥1 (𝑛) = ( 3, −2,4,1,0 )𝑥2 (𝑛) = (5,7,2, −9,0), and ℎ(𝑛) is modified to ℎ1 (𝑛) =
(1, −2,0,0,0).
𝑦1 (𝑛) = 𝑥1 (𝑛) ⊛ ℎ1 (𝑛)
𝑌1 (𝑘) = 𝑋1 (𝑘)𝐻1 (𝑘) = (3 − 2𝑊5𝑘 + 4𝑊52𝑘 + 𝑊53𝑘 )(1 − 2𝑊8𝑘 )
𝑌1 (𝑘) = 3 − 8𝑊5𝑘 + 8𝑊52𝑘 − 7𝑊53𝑘 − 2𝑊54𝑘
∴ 𝑦1 (𝑛) = (3, −8,8, −7, −2)
𝑦2 (𝑛) = 𝑥2 (𝑛) ⊛ ℎ1 (𝑛)
𝑌2 (𝑘) = 𝑋2 (𝑘)𝐻1 (𝑘) = (5 + 7𝑊5𝑘 + 2𝑊52𝑘 − 9𝑊53𝑘 )(1 − 2𝑊8𝑘 )
𝑌2 (𝑘) = 5 − 3𝑊5𝑘 − 12𝑊52𝑘 − 13𝑊53𝑘 + 18𝑊54𝑘
∴ 𝑦2 (𝑛) = (5, −3, −12, −13,18)
Problem: Find the output 𝑦(𝑛) of the filter whose impulse response ℎ(𝑛) = {1,1,1} and the
input signal 𝑥(𝑛) = (3, −1, 0, 1, 3, 2, 0, 1, 2, 1) using overlap add method.
Solution: Output 𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛), 𝑀=3
𝑁 = 𝐿 + 𝑀 − 1, 𝐿 ≥ 𝑀, 𝐿=3
∴ 𝑁 = 3 + 3 − 1 = 5,
Thus we have to perform 𝑁 = 5 point circular convolution. The signal 𝑥(𝑛) is subdivide
into 𝑥1 (𝑛) = (3, −1,0,0,0), 𝑥2 (𝑛) = (1,3,2,0,0),𝑥3 (𝑛) = (0,1,2,0,0) and 𝑥4 (𝑛) = (1,0,0,0,0).
The ℎ(𝑛) is modified to ℎ1 (𝑛) = (1, 1, 1, 0, 0).
𝑦1 (𝑛) = 𝑥1 (𝑛) ⊛ ℎ1 (𝑛)
𝑌1 (𝑘) = 𝑋1 (𝑘)𝐻1 (𝑘) = (3 − 𝑊5𝑘 )(1 + 𝑊5𝑘 + 𝑊52𝑘 )
21
Prepared by Dr Harish M S
22
Prepared by Dr Harish M S
𝑁−1
𝑋 (𝑘) = ∑ 𝑥(𝑛)𝑊𝑁𝑛𝑘 0 ≤ 𝑘 ≤ 𝑁 − 1
𝑛=0
The sequence 𝑥(𝑛) may be real or complex and 𝑊𝑁𝑘 is a complex number, thus direct
computation of DFT involves the complex multiplication and complex addition i.e.
(𝑁−𝑘)𝑘
𝑋(𝑘) = 𝑥(0)𝑊𝑁0 + 𝑥(1)𝑊𝑁𝑘 + 𝑥(2)𝑊𝑁2𝑘 + ⋯ . . +𝑥(𝑁 − 1)𝑊𝑁
Therefore, the N-point DFT computation involves (𝑁 − 1) complex addition and N complex
multiplication for one value of 𝑋(𝑘). For N values of 𝑋(𝑘) it needs 𝑁(𝑁 − 1) complex additions
and N× 𝑁 = 𝑁 2 complex multiplications.
In one complex addition, 2 real additions are required i.e. (𝑎 + 𝑗𝑏) + (𝑐 + 𝑗𝑑 ) = (𝑎 + 𝑐 ) +
𝑗(𝑏 + 𝑑).
In one complex multiplication 4 real multiplications and 2 real additions are required i. e
(𝑎 + 𝑗𝑏)(𝑐 + 𝑗𝑑 ) = (𝑎𝑐 − 𝑏𝑑 ) + 𝑗(𝑎𝑑 + 𝑏𝑐)
Therefore for N-point DFT computation
Numbers of real additions are 2𝑁(𝑁 − 1) + 2𝑁 2 = 4𝑁 2 − 2𝑁 = 2𝑁(2𝑁 − 1)
Numbers of real multiplications are 4𝑁 2
Thus in direct computation of N-point DFT we require
1. 𝑁 2 Complex multiplications.
2. 𝑁(𝑁 − 1) Complex additions.
3. 2N (2N-1) Real additions.
4. 4𝑁 2 Real multiplications.
The direct computation of the DFT is basically inefficient. The Fast Fourier Transform (FFT)
algorithm increases the computational efficiency using the symmetry and periodic properties of
twiddle factor
The efficient computation of DFT can be achieved using Fast Fourier Transform (FFT)
algorithm. The Fast Fourier Transform (FFT) algorithm increases the computational efficiency
using the symmetry and periodicity properties of twiddle factor 𝑊𝑁 . In particular, these two
properties are:
𝑁
𝑘+
Symmetry property: 𝑊𝑁 2
= −𝑊𝑁𝑘
Periodicity property: 𝑊𝑁𝑘+𝑁 = 𝑊𝑁𝑘
23
Prepared by Dr Harish M S
For N-point DFT computation by using FFT algorithm, number of complex multiplications
𝑁
required are 2 log 2 𝑁 and number of complex additions required are 𝑁 log 2 𝑁. The table 3.1
shows the comparison of computational complexity of direct DFT and FFT algorithm
Table 3.1: Comparison between direct DFT computation and DFT using FFT algorithm
DFT Using direct computation DFT Using FFT algorithm
points Complex Complex Complex Complex
N multiplication 𝑁 2 addition multiplication addition Speed
𝑁(𝑁 − 1) 𝑁 𝑁 log10 𝑁 𝑁 log 2 𝑁 improvement
log 2 𝑁 = ( log )
2 2 22
𝑁2
𝑁
log2 𝑁
2
8 64 56 12 24 5.3
16 256 240 32 64 8
256 6553 65280 1024 1048 64
1024 1048576 1047552 5120 10240 204.8
even and odd numbered sequences i.e. 𝑓1 (𝑛) = 𝑥(2𝑛) and 𝑓2 (𝑛) = 𝑥(2𝑛 + 1) respectively, 0 ≤
𝑁
𝑛≤ −1
2
24
Prepared by Dr Harish M S
𝑁 𝑁
−1 −1
2 2
Since 𝑁 = 8
3 3
25
Prepared by Dr Harish M S
𝑁
𝑔1 (𝑛) = 𝑓1 (2𝑛) = 𝑥(4𝑛) 0 ≤ 𝑛 ≤ −1
4
𝑔1 (𝑛) = {𝑥(0), 𝑥(4)}
𝑁
𝑔2 (𝑛) = 𝑓1 (2𝑛 + 1) = 𝑥(2(2𝑛 + 1) = 𝑥(4𝑛 + 2) 0 ≤ 𝑛 ≤ −1
4
𝑔2 (𝑛) = {𝑥(2), 𝑥(6)}
𝑁
ℎ1 (𝑛) = 𝑓2 (2𝑛) = 𝑥(2(2𝑛) + 1)) = 𝑥(4𝑛 + 1) 0 ≤ 𝑛 ≤ −1
4
ℎ1 (𝑛) = {𝑥(1), 𝑥(5)}
𝑁
ℎ2 (𝑛) = 𝑓1 (2𝑛 + 1) = 𝑥( 2(2𝑛 + 1) + 1) = 𝑥(4𝑛 + 3) 0 ≤ 𝑛 ≤ −1
4
ℎ2 (𝑛) = {𝑥(3), 𝑥(7)}
𝑁 𝑁 𝑁
−1 −1 −1
2 4 4
2(2𝑛+1)𝑘 𝑁
𝐹1 (𝑘) = ∑ 𝑓1 (𝑛)𝑊𝑁2𝑛𝑘 = ∑ 𝑓1 (2𝑛)𝑊𝑁4𝑛𝑘 + ∑ 𝑓1 (2𝑛 + 1)𝑊𝑁 0≤𝑘≤ −1
2
𝑛=0 𝑛=0 𝑛=0
26
Prepared by Dr Harish M S
𝑁 𝑁
−1 −1
4 4
2(2𝑛+1)𝑘
𝐹1 (𝑘) = ∑ 𝑓1 (2𝑛)𝑊𝑁4𝑛𝑘 + ∑ 𝑓1 (2𝑛 + 1)𝑊𝑁
𝑛=0 𝑛=0
𝑁 𝑁
−1 −1
4 4
= ∑ 𝑔1 (𝑛)𝑊𝑁4𝑛𝑘 + ∑ 𝑔2 (𝑛)𝑊𝑁2(2𝑛+1)𝑘
𝑛=0 𝑛=0
𝑁 𝑁
−1 −1
4 4
𝑁
𝐹1 (𝑘) = 𝐺1 (𝑘) + 𝑊𝑁2𝑘 𝐺2 (𝑘) 0≤𝑘≤ −1
2
Using periodic property
𝑁
𝐹1 (𝑘) = 𝐺1 (𝑘) + 𝑊𝑁2𝑘 𝐺2 (𝑘) 0≤𝑘≤ −1
4
𝑁 𝑁
𝐹1 (𝑘 + ) = 𝐺1 (𝑘) − 𝑊𝑁2𝑘 𝐺2 (𝑘) 0≤𝑘 ≤ −1
4 4
𝑁
Similarly 𝐹2 (𝑘) = 𝐻1 (𝑘) + 𝑊𝑁2𝑘 𝐻2 (𝑘) 0≤𝑘≤ −1
4
𝑁 𝑁
𝐹2 (𝑘 + ) = 𝐻1 (𝑘) − 𝑊𝑁2𝑘 𝐻2 (𝑘) 0≤𝑘≤ − 1𝐼𝑓 𝑁 = 8
4 4
𝐹1 (0) = 𝐺1 (0) + 𝑊80 𝐺2 (0)
𝐹1 (1) = 𝐺1 (1) + 𝑊82 𝐺2 (1)
𝐹1 (2) = 𝐺1 (0) − 𝑊80 𝐺2 (0)
𝐹1 (3) = 𝐺1 (1) − 𝑊82 𝐺2 (1)
..……….. (3)
𝐹2 (0) = 𝐻1 (0) + 𝑊80 𝐻2 (0)
𝐹2 (1) = 𝐻1 (1) + 𝑊82 𝐻2 (1)
𝐹2 (2) = 𝐻1 (0) − 𝑊80 𝐻2 (0)
{ 𝐹2 (3) = 𝐻1 (1) − 𝑊82 𝐻2 (1)
𝑁
In the third decimation, the each sequence of 𝑔1 (𝑛), 𝑔2 (𝑛), ℎ1 (𝑛) and ℎ2 (𝑛) consists of 4
sequences, then
𝑁 𝑁
−1 −1
4 4
𝑁
𝐺1 (𝑘) = ∑ 𝑔1 (𝑛)𝑊𝑁4𝑛𝑘 = ∑ 𝑥(4𝑛)𝑊𝑁4𝑛𝑘 0 ≤ 𝑘 ≤ −1
4
𝑛=0 𝑛=0
1
27
Prepared by Dr Harish M S
28
Prepared by Dr Harish M S
29
Prepared by Dr Harish M S
𝑁
3. In each stage there are Butterflies if N=8, then 4 Butterflies in each stages and total
2
𝑁
number of Butterflies 2 log 2 𝑁 = 4 log2 8 = 12 Butterflyies.
4. In the signal flow graph, the output sequence 𝑋(𝑘) is in the normal order and the input
sequence 𝑥(𝑛) is not in the normal order. The input and output sequences are bit
reversed.
x(n) X(k)
0 (000) 0 (000)
4 (100) 1 (001)
2 (010) 2 (010)
6 (110) 3 (011)
1 (001) 4 (100)
5 (101) 5 (101)
3 (011) 6 (110)
7 (111) 7 (111)
Figure 3.9: Table shows sequences of 𝑥(𝑛) and 𝑋(𝑘) are bit reversed.
Problem: Using DIT-FFT algorithm, find the 8-point DFT of the sequence
𝑥 (𝑛 ) = 𝑛 0≤𝑛≤7.
Solution: 𝑥(𝑛) = (0,1,2,3, 4 ,5, 6, 7)
First stage computation:
𝐺1 (0) = 𝑥(0)𝑊80 + 𝑥(4)𝑊80 = 0 + 4 = 4
𝐺1 (1) = 𝑥(0)𝑊80 − 𝑥(4)𝑊80 = 0 − 4 = −4
𝐺2 (0) = 𝑥 (2)𝑊80 + 𝑥(6)𝑊80 = 2 + 6 = 8
𝐺2 (1) = 𝑥(2)𝑊80 − 𝑥(6)𝑊80 = 2 − 6 = −4
𝐻1 (0) = 𝑥(1)𝑊80 + 𝑥(5)𝑊80 = 1 + 5 = 6
𝐻1 (1) = 𝑥(1)𝑊80 − 𝑥(5)𝑊80 = 1 − 5 = −4
𝐻2 (0) = 𝑥(3)𝑊80 + 𝑥 (7)𝑊80 = 3 + 7 = 10
{ 𝐻2 (1) = 𝑥(3)𝑊80 − 𝑥(7)𝑊80 = 3 − 7 = −4
Second stage computation:
30
Prepared by Dr Harish M S
31
Prepared by Dr Harish M S
32
Prepared by Dr Harish M S
33
Prepared by Dr Harish M S
Computation of 𝑋1 (k)
𝐹1 (0) = 𝑥1 (0) + 𝑥1 (2)𝑊𝑁0 = 1 + 2 = 3
𝐹1 (1) = 𝑥1 (0) − 𝑥1 (2)𝑊𝑁0 = 1 − 2 = −1
𝐹2 (0) = 𝑥1 (1) + 𝑥1 (3)𝑊𝑁0 = 1 + 2 = 3
𝐹2 (1) = 𝑥1 (1) − 𝑥1 (3)𝑊𝑁0 = 1 − 2 = −1
𝑋1 (0) = 𝐹1 (0) + 𝐹2 (0)𝑊40 = 3 + 3 = 6
𝑋1 (1) = 𝐹1 (1) + 𝐹2 (1)𝑊41 = −1 + (−1)(−𝑗) = −1 + 𝑗
𝑋1 (2) = 𝐹1 (0) − 𝐹2 (0)𝑊40 = 3 − 3 = 0
𝑋1 (3) = 𝐹1 (1) − 𝐹2 (1)𝑊41 = −1 − (−1)(−𝑗) = −1 − 𝑗
∴ 𝑋1 (k) = [6, −1 + j, 0, −1 − j]
Computation of 𝑋2 (𝑘)
𝐹12 (0) = 𝑥2 (0) + 𝑥2 (2)𝑊𝑁0 = 1 + 3 = 4
𝐹12 (1) = 𝑥2 (0) − 𝑥2 (2)𝑊𝑁0 = 1 − 3 = −2
𝐹22 (0) = 𝑥2 (1) + 𝑥2 (3)𝑊𝑁0 = 2 + 4 = 6
𝐹22 (1) = 𝑥1 (1) − 𝑥2 (3)𝑊𝑁0 = 1 − 4 = −2
𝑋2 (0) = 𝐹12 (0) + 𝐹22 (0)𝑊40 = 4 + 6 = 10
𝑋2 (1) = 𝐹12 (1) + 𝐹22 (1)𝑊41 = −2 + (−2)(−𝑗) = −2 + 2𝑗
34
Prepared by Dr Harish M S
35