Fast Fourier Transform (FFT) (Section 4.11) CS474/674 – Prof. Bebis
DFT – Time Complexity How much time does DFT take? u=0,1,2,...,N-1 O(N 2 ) time
Fast Fourier Transform (FFT) FFT takes O(NlogN) time (assumes N=2 n )
Deriving FFT Assume that N=2 n and let Since N=2 n, there exist M such that N=2M u=0,1,2,...,N-1
Deriving FFT (cont’d) Note that: Therefore: or
Deriving FFT (cont’d) How can we compute F(u) for u=M,M+1,…,2M-1? Note that x
Deriving FFT (cont’d) Thus:
Deriving FFT (cont’d) Therefore, an N-point transform can be computed using two N/2-point transforms! Similarly, each N/2-point transform can be computed using two N/4-point transforms etc.
Example
Example (cont’d)
Implementation Details The input must be provided in the required order at each level f(0) f(1) f(2) f(3) f(4) f(5) f(6) f(7) required order original order
Implementation Details (cont’d) Bit-wise reversal rule:
Inverse FFT The inverse FFT can be computed using the same implementation –Use a flag for the sign of the exponential –Use F(u) instead of f(x) –Multiply by N Forward DFTInverse DFT