Fast Fourier Transform - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Fast Fourier Transform

Description:

The Cooley-Tukey FFT. Most common FFT algorithm. Recursive Divide-and-Conquer algorithm ... History of Cooley-Tukey. Named for J.W. Cooley and John Tukey. Re ... – PowerPoint PPT presentation

Number of Views:805
Avg rating:3.0/5.0
Slides: 26
Provided by: E1233
Category:

less

Transcript and Presenter's Notes

Title: Fast Fourier Transform


1
Fast Fourier Transform
  • Rich Macchi
  • MET CS 566, Analysis of Algorithms
  • April 10, 2007

2
What is a Fourier Transform?
  • Invented by Jean Baptiste Joseph Fourier
  • Transforms one function into another function
  • Commonly used to transform a function in the time
    domain to the frequency domain
  • Continuous functions

3
What is a Discrete Fourier Transform?
k 0, , N - 1
  • Also known as finite Fourier transform
  • X is a set of complex numbers describing the
    transformation of domain x
  • Each output element is a summation of a function
    of all input elements

4
What is a Fast Fourier Transform?
  • Computes a discrete Fourier transform and its
    inverse efficiently
  • Fast Fourier Transform (FFT) works in time O(n
    log n)
  • (More on this later)

5
Inverse Discrete Fourier Transform
n 0, , N - 1
  • Produces original domain x given set of complex
    numbers X

6
The Cooley-Tukey FFT
  • Most common FFT algorithm
  • Recursive Divide-and-Conquer algorithm
  • Breaks input domain x into two interleaved
    sub-domains xe and xo
  • Usually this represents even- and odd-indexed
    elements of the domain
  • Radix-2 Decimation-in-Time (DIT)

7
History of Cooley-Tukey
  • Named for J.W. Cooley and John Tukey
  • Re-invented the algorithm in 1965
  • Described how to perform it on a computer
  • Implemented at IBM Research Computing Ctr.
  • Invented by Carl Friedrich Gauss
  • circa 1805
  • Did not analyze computational time

8
Radix-2 DIT case
k lt M
k M
  • Also known as Danielson-Lanczos lemma
  • Ek represents even-indexed elements
  • Ok represents odd-indexed elements

9
Pseudocode
  • assume input array x0..N-1
  • assume N is a power of 2
  • function fft(N, X0..N-1)
  • if N 1 then Xn xn
  • else
  • M N/2
  • allocate array evens0..M-1
  • allocate array odds0..M-1
  • fft(M, evens)
  • fft(M, odds)
  • for k 0 to M-1 do
  • if k lt M then Xk evensk oddsk
    e(2piik/N)
  • else Xk evensk-M oddsk-M
    e(2pii(k-M)/N)

10
Example Graphs
Time Domain
Frequency Domain
11
Common Application of FFT
  • Data compression of digitized signals
  • Audio waves sampled digitally
  • Time domain transformedto frequency domain
  • Eliminate frequencies with valuesunder a certain
    threshold
  • Also can be used for digital frequency filtering
  • Magnetic Resonance Imaging

12
Simple Example
Xk
N 8
xn
1
2
3
4
5
6
7
8
13
Simple Example
Xk
N 8, M 4
N 4
Even
Odd
xn
1
2
3
4
5
6
7
8
14
Simple Example
Xk
N 8, M 4
N 4, M 2
Even
Odd
N 2, M 1
Even Odd
Even Odd
xn
1
2
3
4
5
6
7
8
15
Simple Example
Xk
N 8, M 4
N 4, M 2
Even
Odd
N 2, M 1
Even Odd
Even Odd
N 1
Even Odd
Even Odd
Even Odd
Even Odd
xn
1
2
3
4
5
6
7
8
16
Simple Example
Xk
N 8, M 4
N 4, M 2
Even
Odd
k in all cases is zero Xk xn
N 2, M 1
Even Odd
Even Odd
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
17
Simple Example
Xk Ek e2pik/NOk when k 0 (lt M) Xk Ek-M
e2pi(k-M)/NOk-M when k 1 ( M) X0 E0 2e0
1 2 3 X1 E0 - 2e0 1 - 2 -1
Xk
N 8, M 4
N 4, M 2
Even
Odd
N 2, M 1
Even Odd
Even Odd
3
-1
7
-1
11
-1
15
-1
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
18
Simple Example
Xk
N 8, M 4
N 4, M 2
Even
Odd
10
3 - epi
-4
3 epi
26
-4
3 - epi
3 epi
N 2, M 1
Even Odd
Even Odd
Xk Ek e2pik/NOk when k 0 and 1 Xk Ek-M
e2pi(k-M)/NOk-M when k 2 and 3 X0 E0 e0O0
3 7 10 X1 E1 e2pi/2O1 3 (-1)epi 3 -
epi X2 E(2-2) e(2-2)O0 3 7 -4 X3
E(3-2) e2pi(3-2)/2O1 3 (-1)epi 3 epi
3
-1
7
-1
11
-1
15
-1
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
19
Simple Example
Xk
N 8, M 4
N 4, M 2
Even
Odd
10
4
-4
2
26
-4
4
2
N 2, M 1
Even Odd
Even Odd
eai cos a i sin a epi cos p i sin p sin
p 0 and cos p is -1 3 epi 3 (-1) 0i
4 3 epi 3 (-1) 0i 2
3
-1
7
-1
11
-1
15
-1
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
20
Simple Example
26
4 4i
0
-6
-8
2 2i
4 4i
2 2i
N 8, M 4
Xk
N 4, M 2
Even
Odd
10
-4
16
-4
4
2
4
2
N 2, M 1
Xk Ek e2pik/NOk when k 0,1,2,3 X0 E0
e0O0 10 16 26 X1 E1 e2pi/4O1 4
4e0.5pi 4 4(cos p/2 i sin p/2) 4 4(0
i) 4 4i X2 E2 e2pi(2)/4O2 -4 (-4)epi
-4 - 4epi -4 4(cos p i sin p) -4 4(-1
0i) -4 4 0 X3 E3 e2pi(3)/4O3 2
2e1.5pi 2 2(cos 3p/2 i sin 3p/2) 2 2(0
-1i) 2 2i
Even Odd
Even Odd
3
-1
7
-1
11
-1
15
-1
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
21
Simple Example
26
4 4i
0
-6
-8
2 2i
4 4i
2 2i
N 8, M 4
Xk
N 4, M 2
Even
Odd
10
-4
16
-4
4
2
4
2
N 2, M 1
Xk Ek-M e2pi(k-M)/NOk-M when k 4,5,6,7 X4
E(4-4) - e0O(4-4) 10 - 16 -6 X5 E(5-4) -
e2pi(5-4)/4O(5-4) 4 - 4e0.5pi 4 - 4(cos p/2
i sin p/2) 4 - 4(0 i) 4 - 4i X6 E(6-4) -
e2pi(6-4)/4O(6-4) -4 - (-4)epi -4 4epi -4
4(cos p i sin p) -4 4(-1 0i) -4 - 4
-8 X7 E(7-4) - e2pi(7-4)/4O(7-4) 2 - 2e1.5pi
2 - 2(cos 3p/2 i sin 3p/2) 2 - 2(0 -1i) 2
2i
Even Odd
Even Odd
3
-1
7
-1
11
-1
15
-1
N 1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
22
Simple Example
26
4 4i
0
-6
-8
2 2i
4 4i
2 2i
Xk
Even
Odd
10
-4
16
-4
4
2
4
2
Even Odd
Even Odd
3
-1
7
-1
11
-1
15
-1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
23
Simple Example
26
4 4i
0
-6
-8
2 2i
4 4i
2 2i
Xk
Each level is half of the previous level there
are log N levels. On every level every k index is
visited. So, the complexity of the FFT is N log
N.
Even
Odd
10
-4
16
-4
4
2
4
2
Even Odd
Even Odd
3
-1
7
-1
11
-1
15
-1
Even Odd
Even Odd
Even Odd
Even Odd
1
2
3
4
5
6
8
7
xn
1
2
3
4
5
6
7
8
24
Comparison with Naïve DFT
k 0, , N - 1
Naïve DFT traverses every element (xn)k times,
resulting in a computational complexity of ?(n2)
25
Questions?
  • Thank You.
Write a Comment
User Comments (0)
About PowerShow.com