Lecture 42 FFT N
Lecture 42 FFT N
Lecture 42 FFT N
08/10/2024 1
1
Introduction
Implement a convolution of two sequences
by the following procedure:
1. Compute the N-point DFT X 1 k and X 2 k
of the two sequence x1 n and x2 n
2. Compute X 3 k X 1 k X 2 k for 0 k N 1
3. Compute x3 n x1 n N x2 n as the inverse
DFT of X 3 k
Why not convolve the two sequences directly?
There are efficient algorithms called Fast
Fourier Transform (FFT) that can be orders of
magnitude more efficient than others. 2
9.1 Efficient Computation of Discrete Fourier
Transform
• The DFT pair was given as
N 1
j 2 / N kn 1 N 1
j 2 / N kn
X k x[n]e x[n] X k e
n 0
N k 0
4
4
9.2 The Goertzel Algorithm
• Makes use of the periodicity e j 2 / N Nk e j 2 k 1
• Multiply DFT equation with this factor
j 2 / N kN
N 1
j 2 / N rk N 1
j 2 / N k N r
X k e x[r ]e x[r ]e
r 0 r 0
j 2 / N k n r
Define yk n x[r ]e u n r
r
1
Hk z
1 WN k z 1
X k yk n n N , k 0,1,..., N
N 1
X k x[n]WNkn
n 0
Computational complexity
4N real multiplications; 4N real additions
Slightly less efficient than the direct method
kn
But it avoids computation and storage of W N 7
7
Second Order Goertzel Filter
• Goertzel Filter
1
Hk z 2
j k
1 e N z 1
N 1
j 2 / N kn
X k x[n]e
n 0
14
Figure 9.3
computational complexity
• Two N/2-point DFTs
• 2(N/2)2 complex multiplications
• 2(N/2)2 complex additions
• Combining the DFT outputs
• N complex multiplications
• N complex additions
• Total complexity
• N2/2+N complex multiplications
• N2/2+N complex additions
• More efficient than direct DFT
15
15
9.3 decimation-in-time FFT Algorithms
N=8
16
16
9.3 decimation-in-time FFT Algorithms
• After two steps of decimation in time
Complexity:
Nlog2N complex multiplications and additions 18
18
Butterfly Computation
Complexity:
(Nlog2N)/2 complex multiplications and Nlog2N addition
9.4 Decimation-In-Frequency FFT Algorithm
N 1
• The DFT equation X k x[n]WNnk
n 0
Split the DFT equation into even and odd frequency
indexes
N 1 N / 2 1 N 1
X 2r x[n]WNn 2 r x[n]WNn 2 r x[n]W Nn 2 r
n 0 n 0 n N / 2
N /2 1 N /2 1
Substitut
e
n 0
x[n]W n2r
N x[n N / 2]W
n 0
N
n N /2 2 r
variables N /2 1
x[n] x[n N / 2]W
n 0
nr
N /2
N /2 1
n 0
g (n)WNrn/2
31
31
9.4 Decimation-In-Frequency FFT Algorithm
N 1
• The DFT equation X k x[n]WNnk
n 0
N 1 N /2 1 N 1
X 2r 1 x[n]W n (2 r 1)
N x[n]W n (2 r 1)
N n (2 r 1)
x[n]W
N
n 0 n 0 n N /2
N /2 1 N /2 1
n 0
x[n]W n (2 r 1)
N
n 0
x[n N / 2]WN n N /2 (2 r 1)
N /2 1
x[n] x[n N / 2]W
n 0
n (2 r 1)
N
N / 2 1 N /2 1
x[n] x[n N / 2]W W n
N
rn
N /2
n 0
h(n)WNnWNrn/2
n 0
N
n 2 r 1 (2 r 1)
W N W W W W
2 rn
N
n
N
rn
N /2
n
N W N
2
WNNrWNN /2 1 32
32
decimation-in-frequency decomposition of an N-point
DFT to N/2-point DFT
N /2 1 N /2 1
X 2r x[ n ] x[ n N / 2] N /2
W nr
n 0
g (n)WNrn/2
n 0N /2 1 N /2 1
X 2r 1
n 0
x[ n ] x[ n N / 2] NW
W n rn
N /2
n 0
h(n)WNnWNrn/2
33
33
decimation-in-frequency decomposition of an 8-point
DFT to four 2-point DFT
N / 4 1 N /4 1
X 2* 2 s [ g (n) g (n N / 4)]WNsn/4
n 0
p(n)WNsn/4
n 0
N / 4 1 N /4 1
X 2*(2 s 1) [ g (n) g (n N / 4)]W W
2n
N
sn
N /4 q(n)WN2 nWNsn/4
34
n 0 n 0 34
2-point DFT
X v ( p ) X v 1 ( p ) X v 1 (q )
35
35
Final flow graph for 8-point DFT decimation in
frequency
40
40