12 Frequency Analysis 08-05-2023
12 Frequency Analysis 08-05-2023
(EEE301)
Dr. P. Geethanjali
Fast Fourier Transform Algorithm
• Consider DTFT
• Basic idea is to split the sum into 2 subsequences of length N/2 and continue all
the way down until you have N/2 subsequences of length 2
Log2(8)
N
Decimation in Time
In this method we split x (n) into the even indexed x (2m) and the odd indexed x
(2m + 1) each N/2 long. DFT can be expressed as:
N / 2 1 N / 2 1
2 mk k ( 2 m 1)
X (k )
m0
x ( 2 m )W N x ( 2 m 1)W
m0
N
N / 2 1 N / 2 1
X (k ) x ( 2 m )W mk
W k
x ( 2 m 1)W km (1)
N /2 N N /2
m 0 m0
K = 0,1,2,3,4,……………..,N-1
Then equation (1) for the first N/2 points can be expressed as
X (k ) G (k ) WNk H (k ) k 0,1,2,...., N / 2 1
Decimation in Time
But
WN( N / 2 k ) WNk
G (k ) G ( N / 2 k ), k 0,1,2,..., N / 2 1
H (k ) H ( k N / 2) k 0,1,2,...., N / 2 1
Then
X ( k N / 2 ) G ( k ) W Nk H ( k ) k N / 2, N / 2 1,...., N
0
0.0 0
0
0.0
Same result
X [ k 0 ] W 1 x[0] W ( W
1 1 x[1]) x[0] x[1]
m 0 m0
0 0
0.1 1 0.1 1
X [k 1] W x[0] W ( W1 x[1]) x[0] W1 x[1] x[0] x[1]
1 1
m0 m 0
FFT Algorithms - Four point FFT
First find even and odd parts and then combine them:
Decimation in Time and Frequency
x(0)=1 4
X(0 )= 10
W40 1 -2
x(2)=3 X(1)= -2+2j
-1
6 W40 1
x(1)=2 X(2)= -2
-1
1
W40 1 -2 W4 j
x(3)=4 X(3)= -2-2j
-1 -1
Inverse Fourier Transform
The inverse discrete Fourier can be calculated using the same method
but after changing the variable WN and multiplying the result by 1/N
8 4 1/4
X(0) =10 x(0) = 1
~
W40 1 12 8 1/4
X(2) =-2 x(1) = 2
-1 ~
-4 W40 1 12 1/4
X(1) = -2+2j x(2) = 3
~ -1
W40 1 j4 W~ 1 j
X(3) = -2-2j 4 16 1/4 x(3) = 4
-1 -1
Decimation in Frequency
WN e j 2 / N
X (k ) can be expressed as
N / 2 1 N 1
kn kn
X (k )
n0
x ( n )W N x ( n )W
n N / 2
N
N / 2 1 N / 2 1
kn k (n N / 2)
X (k ) n0
x ( n )W N x ( n N / 2 )W
n0
N
N / 2 1 N / 2 1
kn kN / 2 kn
X (k ) n0
x ( n )W N W N x
n0
( n N / 2 )W N
Decimation in Frequency
But
W N( N / 2 ) k e 2 k ( N / 2 ) / N e k ( 1) k
Then
N / 2 1 N / 2 1
kn k kn
X (k )
n0
x(n)W N (1) x(n N / 2)W
n0
N
If k = 2m or an even number
N / 2 1
X (2m) x ( n ) x ( n N / 2 ) W
n0
N
2 mn
N / 2 1
mn
X ( 2 m) a
n0
( n )W N /2
Decimation in Frequency
Noting That
WN2 mn e j 2 mn2 / N e j 2mn /( N / 2 ) WNmn/ 2
a ( n) x ( n ) x ( n N / 2)
Then X(2m) is N/2-point DFT for a(n)
If k = 2m+1 (odd number) and using the same method
N / 2 1
X ( 2 m 1) x ( n ) x ( n N / 2) W
n 0
N
n
W N2 mn
N / 2 1
X (2m 1) b(n)W W
n0
n
N
mn
N /2
b( n ) x ( n) x ( n N / 2)
a(0)
x(0) X(0)
a(1)
x(1) X(2)
N/2-point
a(2) DFT
x(2) X(4)
a(3)
x(3) X(6)
b(0) W80
x(4) X(1)
-1
b(1) W81
x(5) X(3)
-1 N/2-point
b(2) W 82 DFT
x(6) X(5)
-1
b(3) W 83
x(7) X(7)
-1
Decimation in Frequency
x(0) X(0)
W80
x(1) X(4)
-1
W80
x(2) X(2)
-1
W82 W80
x(3) X(6)
-1 -1
W80
x(4) X(1)
-1
W81 W80
x(5) X(5)
-1 -1
2 0
W W
x(6) 8 8
X(3)
-1 -1
W 83 W82 W80
X(7)
x(7)
-1 -1 -1
Decimation in Frequency
In general
If N = 1024
Complex multiplication of DFT is: 1,048,576
Complex multiplication of FFT is: 5,120
Decimation in Frequency
4 10
x(0) =1 X(0)
6 W40 1 -2
x(1) =2 X(2)
-1
-2 W40 1 -2+2j
x(2) =3 X(1)
-1
-2 W41 j W40 1 -2-2j
x(3) =4 X(3)
-1 -1
Inverse Fourier Transform
The inverse discrete Fourier transform can be found using
N 1
1 kn
x(n)
N
X ( k )W
k 0
N n 0 ,1, 2,....., N 1
~
where W Nkn W N kn is called the twiddled factor
We can see that the difference between the inverse discrete Fourier and
forward Fourier transform is the twiddled factor and the division by 1/N
Inverse Fourier Transform
X(0) 1/N x(0)
~
W80 1/N x(4)
X(1)
~
-1
W80 1/N
X(2) x(2)
-1 ~ ~
X(5)
W81 W80 1/N x(5)
-1 ~ ~ -1
X(6) W 8
2
W 8
0
1/N x(3)
-1 -1 ~ ~
~
X(7) W 8
3
W 8
2
W80 1/N x(7)
-1 -1 -1
Inverse Fourier Transform
Example Given a sequence X(n) given in the previous example. Find the
IFFT using decimation in frequency method
solution
8 4 1/4
X(0) =10 x(0) = 1
-4 ~
W40 1 12 1/4
X(1) = -2+2j x(2) = 3
-1
12 W~ 0 1 8
X(2) =-2 4 1/4
x(1) = 2
-1 ~
j4 ~
1
W40 1 16
X(3) = -2-2j W j
4 1/4
x(3) = 4
-1 -1