Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

DFT & FFT

Revision Class (30-03-2020 to 3-04-2020)


By
M.Uttara Kumari
Find DFT using formula ( x[n] X[K])
Find X[K] ( Frequency Domain) from x[n] (time domain) signal

Find 4 point DFT j


1. x[n]= [ 1 6 7 2] K W4
X[K]=
0 1
-1 1
2. X[n]= [7 9] 1 -j
X[K]= 2 -1
3 j -j
Find 8pt DFT

• Find 8 point DFT


1. x[n]= [ 1,5,7,9,3,7,3,-5]
X[K]=
K W8
0 1
• 2. x[n]= [ 3 4 7 9 1] 1 0.707- 0.707j
2 -j
X[K]=
3 -0.707- 0.707j
4 -1
5 -0.707 + 0.707j
Note: If x[n] is a real seq , them X[k] = X*[ N-K]
6 j
X[7]= X*[1], X[6]=X*[2], X[5]=X*[3], X[0] and X[4] are always
real 7 +0.707 + 0.707j
Magnitude and Phase plots of X[k]
k X[K] Mag X[K] Angle of X[k]
0
1
2
3
4
5
6
7
Find IDFT using formula ( X[K] x[n] )
Find x[n] (time domain) signal from X[K] ( Frequency Domain)

K W8 (-k)
K W4(-k) 0 1
Find 4 point DFT 0 1 1 0.707+ 0.707j
1. X[K]= [ 6 , 1+7j, 5, 1-7j] 2 -j
X[n]= 1 +j
3 -0.707+ 0.707j
2 -1
2 X[K]= [2 3 4 5 6 8 9], find 8pt IDFT 4 -1
x[n]= 3 -j
5 -0.707 -0.707j
6 j
7 +0.707 - 0.707j
4 Pt DFT & IDFT using Transformation Matrix

Find DFT of x[n] using transformation matrix


Find x[n] using transformation matrix
X[K]= [4, 1+2j, 4, 1-2j]

1 1 1 1 4
1 1 𝑗 −1 −𝑗 1 + 2𝑗
4 1 −1 1 −1 4
1 −𝑗 −1 𝑗 1 − 2𝑗
• Find N pt DFT of x[n]= 𝑎𝑛
3. Find DFT of x[n] = (−1)𝑛
(i) N=3, (ii) N Odd(iii) N=4, (iv)N Even
1.DFT problems(Significance of
N>>>L) L=10, N=10
10

b
2.Find DFT
• X[n]= u[n]- u[n-5] using 5 point and 10 point
Similar to the previous problem and plot Magnitude and Phase plot

Note: Similar problem Example 3.7 pg No 99 , N=5 , 3


DFT{ δ[n]}= 1
−𝑗2π𝑚
DFT{ δ[n-m]} = 𝑒 𝑁

DFT{1} = N δ[K]

𝑗2π𝑚𝑛
DFT{ 𝑒 𝑁 ) = N δ[k-m]

2π𝑚𝑛 𝑁
DFT{Cos( )} = {δ[k-m] + δ[k+ m]}
𝑁 2

2π𝑚𝑛 𝑁
DFT{Sin( )} = {δ[k-m] - δ[k+ m]}
𝑁 2𝑗
Properties of Twiddle Factor
Circular Convolution
Revision class -2
Using
1. Direct Formula
2. Matrix multiplication
3. Graphical Method
4. Properties
5. DIT FFT
6.DIF FFT
Circular Convolution Direct Formula

4 Pt Circular Convolution

Ans: [4 14, 24 18]


Matrix multiplication
Circular Convolution
using
Graphical Method
Circular Convolution

• X1[n]=[2 1 2 1]
• X2[n]=[1 2 3 4]

• X3[n]= [14,16,14,16]
Using properties (i)
1 1 1 1 4
x1[n] = [ 4 2 7 9], x2[n] =[ 2 3 1] 1 −𝑗 −1 𝑗 2
1 −1 1 −1 7
Find 4 pt circular convolution using properties 1 𝑗 −1 −𝑗 9

Solution: Steps: X1[K]=

( Ensure both x1[n] and x2[n] are 4 points)

New X2[n]= [2 3 1 0] 1 1 1 1 2
(ii) 1 −𝑗 −1 𝑗 3
(i) Find X1[K] using DFT matrix method 1 −1 1 −1 1
1 𝑗 −1 −𝑗 0
(ii) Find X2[K] using DFT matrix method
X2[K]=
(iii) Find X3[K] = X1[K] * X2[K]
(iv) Find x3[n] using IDFT matrix method. To find x3[n]
1 1 1 1
( Refer slide 6 of DFT Revision 1 PPT)
1 1 𝑗 −1 −𝑗
4 1 −1 1 −1
1 −𝑗 −1 𝑗

X3[n]= [
Using DIT FFT Use this Diagram to find X1[K] and X2[K]
x1[n] = [ 4 2 7 9], x2[n] =[ 2 3 1]
Find 4 pt circular convolution using DIT FFT
Solution: Steps:
( Ensure both x1[n] and x2[n] are 4 points)

X2[n]= [2 3 1 0]
(i) Find X1[K] using DIT FFT matrix method
(ii) Find X2[K] using DIT FFT matrix method
(iii) Find X3[K] = X1[K] * X2[K]
(iv) Find x3[n] using DIT FFT matrix method.

Use this Diagram to find x3[n]


Using DIF FFT Use this Diagram to find X1[K] and X2[K]

x1[n] = [ 4 2 7 9], x2[n] =[ 2 3 1]


Find 4 pt circular convolution using properties
Solution: Steps:
( Ensure both x1[n] and x2[n] are 4 points)
X2[n]= [2 3 1 0]
(i) Find X1[K] using DIF FFT matrix method
(ii) Find X2[K] using DIF FFT matrix method
(iii) Find X3[K] = X1[K] * X2[K]
(iv) Find x3[n] using DIF FFT matrix method.

Use this Diagram to find x3[n]


𝑁 𝑁
• X1[k] = {δ[k-1] + δ[k+ 1]} , X2[K]= {δ[k-1] - δ[k+ 1]}
2 2𝑗
• a) Circular Convolution x3[n] = IDFT{X3[K}}= IDFT{ X1[K] × X2[K]}
𝑁 𝑁
• = IDFT( × {δ[k-1] - δ[k+ 1]} )
2 2𝑗
𝑁
=
2
b) Circular correlation x3[n] = IDFT{X3[K}}= IDFT{ X1[K] * X2*[K]}
𝑁 𝑁
= IDFT( × {δ[k-1] - δ[k+ 1]} )
2 −2𝑗
𝑁
=-
2
c)Let x3[n]= Auto corr of x1[n] = IDFT{X3[K}}= IDFT{ X1[K] × X1*[K]}
𝑁 𝑁
= IDFT( × {δ[k-1] + δ[k+ 1]} )
2 2
𝑁
=
2
d) Let x3[n] = Auto corr of x2[n] = IDFT{ X2[K] × X2*[K]}
𝑁 𝑁
= IDFT( × {δ[k-1] - δ[k+ 1]} )
−2𝑗 2𝑗
𝑁
=
2
Overlap add and save
methods
Revision class-3
Overlap Add Method 1: When N ( number of
Given x[n]= [ 1,6,8,2,5,3,9,2,7,0,1,3,6]
circular points is not given)
h[n]= [ 1 4 3]
Procedure:
1. Let ‘L’ is the length of h[n]( L=3]
2. Divide x[n] into various blocks.
Let ‘M’ is the length of each block x1[n], x2[n]…..
In this method M is taken as L ( M=L)
Then x1[n]= [1,6,8], x2[n]=[2 5 3]………………..
3.The no of circular point convolution required is
N= L+M-1= 3+3-1= 5
4. As N=5, Make h[n] and x1[n],x2[n]……… to length ‘N’
(here N=5) by appending 2 (N-M)zeros
5. So, the new sequences are
h[n]= [ 1 4 3 0 0]
X1[n]=[1 6 8 0 0 ], X2[n]=[2 5 3 0 0 ] ,X3[n]=[9 2 7 0 0 ],X4[n]=0 1 3 0 0 ],X5[n]=[ 6 0 0 0 0]
6. Find Circular convolution of h[n] with x1[n] , x2[n] etc…, (5 point circular convolution)
7. Find y1[n], y2[n]………
8. Add last 2 (N-M) samples of y1[n] to first 2 (N-M) samples of y2[n] and continue in the same for other blocks also as
shown in fig
9. The final output Y[n]= [1 10 35 52 37 29 36 47 42 34 22 7 21 33 18]
Overlap Add Method 2: When N ( number of circular points is given)
Given x[n]= [ 1,6,8,2,5,3,9,2,7,0,1,3,6]
h[n]= [ 1 4 3] Use 6 point circular convolution (N=6)
Procedure:
1. Let ‘L’ is the length of h[n]( L=3]
2. Divide x[n] into various blocks.
Let ‘M’ is the length of each block x1[n], x2[n]…..
3.The no of circular point convolution required is
N= L+M-1= 6 Then, M= 6-3+1=4
4. x1[n]=[1 6 8 2], x2[n]=[5 3 9 2], x3[n]= [7 0 1 3], x4[n]= [6 0 0 0]
5. Make h[n] to 6 length (N) by adding zeros New h[n]=[ 1 4 3 0 0 0]
6. Make x1[n],x2[n]……… to length ‘N’ (here N=6) by appending 2 (N-M) zeros.
7. So, the new sequences are
x1[n]=[1 6 8 2 0 0 ], x2[n]=[5 3 9 2 0 0 ], x3[n]= [7 0 1 3 0 0], x4[n]= [6 0 0 0 0 0]
8. Find y1[n], y2[n]……… by Circular convoluting h[n] with x1[n] , x2[n] etc…, (6 point circular
convolution)
9 Add last 2 (N-M) samples of y1[n] to first 2 (N-M) samples of y2[n] and continue in the same for other
blocks also as shown in fig
10. The final output Y[n]= [1 10 35 52 37 29 36 47 42 34 22 7 21 33 18]
Overlap Save Method 1: When N ( number of circular points is not given)
Given x[n]= [ 1,6,8,2,5,3,9,2,7,0,1,3,6]
h[n]= [ 1 4 3] Use 6 point circular convolution (N=6)
Procedure:
1. . Let ‘L’ is the length of h[n]( L=3]
2. Divide x[n] into various blocks.
Let ‘M’ is the length of each block x1[n], x2[n]…..
In this method M is taken as L ( M=L)
Then x1[n]= [1,6,8], x2[n]=[2 5 3]………………..
3.The no of circular point convolution required is
N= L+M-1= 3+3-1= 5
4. Make h[n] to 5 length (N) by adding zeros New h[n]=[ 1 4 3 0 0 ]
6. Make x1[n],x2[n]……… to length ‘N’ (here N=5) by appending (N-M) samples of previous block.
5. So, the new sequences are
x1[n]=[0 0 1 6 8 ], x2[n]=[6 8 2 5 3], x3[n]= [5 3 7 0 1 ], x4[n]= [0 1 3 6 0 ]
6. Find y1[n], y2[n]…… by Circular convoluting h[n] with x1[n] , x2[n] etc…, 5 point circular convolution)
7. Discard first 2 (N-M) samples of y1[n] ,y2[n] etc….
9. The final output Y[n]= [1 10 35 52 37 29 36 47 42 34 22 7 21 33 18]
Overlap Save Method 2: When N ( number of circular points is given)
Given x[n]= [ 1,6,8,2,5,3,9,2,7,0,1,3,6]
h[n]= [ 1 4 3] Use 6 point circular convolution (N=6)
Procedure:
1. Let ‘L’ is the length of h[n]( L=3]
2. Divide x[n] into various blocks.
Let ‘M’ is the length of each block x1[n], x2[n]…..
3.The no of circular point convolution required is
N= L+M-1= 6 Then, M= 6-3+1=4
4. x1[n]=[1 6 8 2], x2[n]=[5 3 9 2], x3[n]= [7 0 1 3], x4[n]= [6 0 0 0]
5. Make h[n] to 6 length (N) by adding zeros New h[n]=[ 1 4 3 0 0 0]
6. Make x1[n],x2[n]……… to length ‘N’ (here N=6) by appending (N-M) samples of previous block.
5. So, the new sequences are
x1[n]=[0 0 1 6 8 2], x2[n]=[8 2 5 3 9 2], x3[n]= [9 2 7 0 1 3], x4[n]= [1 3 6 0 0 0]
6. Find y1[n], y2[n]…… by Circular convoluting h[n] with x1[n] , x2[n] etc…,
7. Discard first 2 (N-M) samples of y1[n] ,y2[n] etc….
9. The final output Y[n]= [1 10 35 52 37 29 36 47 42 34 22 7 21 33 18]
DIT & DIF FFT
Revision class-4
• Find X[K] using 8 point DIT FFT ( Input Bit reversed and out put Normal Order)
X[n]= [1 2 7 4 0 1 8 2]
A B C D
• If X[K] = [1 4 2 6 2 8 1 9] Find IDFT ( X[k]) or x[n] using 8 point DIT FFT
Using 4 point DIT FFT
x[n] = [ 4 2 7 9],.

Use this Diagram to find X[K]


Using 4 point DIT FFT
X[K] = [ 2, 2+3j,1,2-3j]. Find x[n]
• x[n] = [1 3 5 7 2 8 3 9 ] Find X[K] using DIF FFT
• Find IDFT of X[K] using 8 point DIF FFT X[k]= [ 1 2 3 4 5]
New X[K]= [1 2 3 4 5 0 0 0]
Point A Point B Point C Point D Final Ans 8*x[n] x[n]
1 6 3 15 X[0]=15/8
2 2 2-4j 3 X[4]=3/8
3 3 -3 3-2j X[2]
4 4 2+4j 3+2j X[6]
5 -4 -1 -5.414+7.242j X[1]
0 2 2-4j - 2.586-1.242j, X[5]
0 3 -7 -2.586+1.242j, X[3]

0 4 2+4j - 5.414-7.242 X[7]

Final ans=15,-5.414+7.242j, 3-2j, -2.586+1.242j, 3, - 2.586-


1.242j, 3+2j, - 5.414-7.242j Divide by 8
Using DIF FFT
x[n] = [ 4 2 7 9] find X[K]

Use this Diagram to find X[K]


Using DIF FFT
• X[K]= [2 , 3-5j, 1, 3+5j]
• Find x[n]
Problems on FFT applications
Revision class-5
Find DFT of a real sequences using 4 point DIT FFT
For the given X[n] =[ 2, 6, 8, 1] Find X[K] 4 point DIT FFT

Solution procedure:
A B
Input Point ‘A’ Point ‘B’ Out put X[K]
X[n]

x[0] 2 2+8=10 10 X[0]= 10+7=17

x[2] 8 2-8=-6 -6 X[1]=-6-5j

x[1] 6 6+1=7 7 X[2]=10-7=3

x[3] 1 6-1=5 -5j X[3]=-6+5j

X[K]=[ 17, -6-5j, 3, -6+5j]


Find DFT of two 4 point real sequences using single 4 point DIT FFT
For the given X1[n] =[ 2, 6, 8, 1] and X2[n]= [3 1 9 5]
Find X1[K] and X2[K] using single 4 point DIT FFT
Solution procedure:

1. x[n]= x1[n] +j x2[n]


2. Then x[n]= [2+3j, 6+j, 8+9j, 1+5j]
3. Find X[K] using DIT FFT
4. X[K]= [17+18j, -10-11j,3+6j,-2-j]

5. X1[K]= {X[K] + X*[N-K]}/2


X1[0]= {X[0] + X*[0]}/2 = [17+18j +17-18j]/2 = 17
X1[1]= {X[1] + X*[3]}/2 ={ -10-11j -2+j] /2 = -6 – 5j
X1[2]=[3+6j +3-6j]/2 =3
X1[3] = -6+5j
X1[K]= [[17, -6-5j, 3 , -6+5j ]

1. X2[K] = {X[K] - X*[N-K]} /2j

2. X2[ K] = [ 18, -6 +4j, 6, -6-4j]


• where N=4
Find the DFT of the following 8point real sequence using single 4 pt DIT FFT
Given sequence is X[ n] =[ 2, 5,6,1,0,3,4,2] Find X[K] using single 4 pt FFT use DIT FFT

Solution Procedure:

1. The new seq is x3[n]= x1[n] +j x2[n] ( x1[n] even seq, x2[n] is the odd seq )
2. Where x1[n]=[ 2,6,0,4] and x2[n]=[ 5,1,3,2]
3. Then x3[n]= [2+5j, 6+j, 3j, 4+2j]

4. Find X3[K] using DIT FFT X3[K]= [ 12+11j, 1, -8+5j, 3+4j]


5. X1[K]= {X3[K] + X3*[N-K]}/2 X1[K]= [ 12, 2-2j, -8, 2+2j]
6. X2[K] = {X3[K] – X3*[N-K]}/2j X2[K] =[ 11, 2+j, 5, 2-j]

7. X[0] = X1[0] + W8 0 X2[0] , X[1] = X1[1] + W8 1 X2[1]


X[2] = X1[2] + W8 2 X2[2] , X[3] = X1[3] + W8 3 X2[3]
8. X[4] = X1[0] - W8 0 X2[0] , X[4] = X1[1] - W8 1 X2[1]
X[6] = X1[2] - W8 2 X2[2] , X[7] = X1[3] - W8 3 X2[3]
9. X[K] =[ 23, 4.121-2.7j, -8-5j, -0.12+1.29j, 1, -.121-1.29j, -8+5j, 4.121+2.7j ]
Find DFT of two 4 point real sequences using single 4 point DIF FFT
For the given
X1[n] =[ 2, 6, 8, 1] and X2[n]= [3 1 9 5]
Find X1[K] and X2[K] using single 4 point DIF FFT

• Solution procedure:

1. x[n]= x1[n] +j x2[n]


2. Then x[n]= [2+3j, 6+j, 8+9j, 1+5j]
3. Find X[K] using DIF FFT

4. X1[K]= {X[K] + X*[N-K]}/2


5. X2[K] = {X[K] - X*[N-K]}/2j
• where N=4
Find the DFT of the following 8point real sequence using single 4 pt DIF FFT
Given sequence is X[ n] =[ 2, 5,6,1,0,3,4,2] Find X[K] using single 4 pt FFT use DIF FFT

Solution Procedure:

1. The new seq is x3[n]= x1[n] +j x2[n] ( x1[n] even seq, x2[n] is the odd seq )
2. Where x1[n]=[ 2,6,0,4] and x2[n]=[ 5,1,3,2]
3. Then x3[n]= [2+5j, 6+j, 3j, 4+2j]

4. Find X3[K] using DIF FFT


5. X1[K]= {X3[K] + X3*[N-K]}/2
6. X2[K] = {X3[K] – X3*[N-K]}/2

7. X[0] = X1[0] + W8 0 X2[0] , X[1] = X1[1] + W8 1 X2[1]


X[2] = X1[2] + W8 2 X2[2] , X[3] = X1[3] + W8 3 X2[3]
8. X[4] = X1[0] - W8 0 X2[0] , X[4] = X1[1] - W8 1 X2[1]
X[6] = X1[2] - W8 2 X2[2] , X[7] = X1[3] - W8 3 X2[3]
9. X[K] =[ ………………………………………]
Thank you

You might also like