0% found this document useful (0 votes)
204 views35 pages

Efficient Computation of The DFT

The document discusses the efficient computation of the discrete Fourier transform (DFT) using the fast Fourier transform (FFT) algorithm. It begins by introducing the Cooley-Tukey decimation-in-time (DIT) algorithm, which splits the DFT computation into even and odd terms to obtain smaller DFTs. It then shows how further decomposing and rearranging terms results in a computation involving only butterfly operations and 2-point DFTs. This allows the DFT to be computed in O(N log N) time rather than O(N^2) time. The document also discusses decimation-in-frequency (DIF) FFT and alternate DIT FFT structures.

Uploaded by

Nikita Shakya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
204 views35 pages

Efficient Computation of The DFT

The document discusses the efficient computation of the discrete Fourier transform (DFT) using the fast Fourier transform (FFT) algorithm. It begins by introducing the Cooley-Tukey decimation-in-time (DIT) algorithm, which splits the DFT computation into even and odd terms to obtain smaller DFTs. It then shows how further decomposing and rearranging terms results in a computation involving only butterfly operations and 2-point DFTs. This allows the DFT to be computed in O(N log N) time rather than O(N^2) time. The document also discusses decimation-in-frequency (DIF) FFT and alternate DIT FFT structures.

Uploaded by

Nikita Shakya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 35

Efficient Computation of the DFT:

The FFT Algorithm


Hafiz Malik
Dept. of Electrical & Computer Engineering
The University of Michigan-Dearborn
[email protected]
http://www-perosnal-engin.umd.umich.edu/~hafiz

10/20/20 DFT - Hafiz Malik 1


Acknowledgement
• These lecture slides are based on
– Chapter 5 of
• Digital Signal Processing: Principles, Algorithms and
Applications 3rd e
• John G. Proakis and Dimitris K Manolakis
– Lecture slides of Prof. Richard M. Stern
• Department of Electrical and Computer Engineering,
Carnegie Mellon University

10/20/20 DFT - Hafiz Malik 2


The Cooley-Tukey decimation-in-time algorithm

• Consider the DFT algorithm for an integer power of 2, N  2


N 1 N 1
X[k]   x[n]WN nk   x[n]e j2nk / N ; WN  e j2 / N
n0 n0
• Create separate sums for even and odd values of n:
X[k]   x[n]WN nk   x[n]WN nk
n even n odd
• Letting n  2r for n even and n  2r  1 for n odd, we obtain
 N / 21  N / 2 1
X[k]   x[2r]WN 2rk   x[2r  1]WN  2r1 k
r 0 r 0

10/20/20 DFT - Hafiz Malik 3


The Cooley-Tukey DIT algorithm
• Splitting indices in time, we have obtained
 N / 21  N / 2 1
X[k]   x[2r]WN 2rk   x[2r  1]WN 2r1 k
r 0 r 0

• But W 2  e  j 2 2 / N  e  j2 /( N / 2)  W and W 2rk W k  W k W rk


N N/2 N N N N /2
So …
(N/ 2)1 ( N/ 2)1
X[k]   x[2r]WNrk/ 2  WNk  x[2r  1]WNrk/ 2
n0 n0

N/2-point DFT of x[2r] N/2-point DFT of x[2r+1]

10/20/20 DFT - Hafiz Malik 4


Computational Gain so far …

• We have split the DFT computation into two halves:


N 1
X[k]   x[n]WN nk
k 0
( N/ 2)1 ( N/ 2)1
  x[2r]WNrk/ 2  WNk  x[2r  1]WNrk/ 2
n0 n0

• Have we gained anything? Consider the nominal number of


multiplications for N  8
– Original form produces 2
8  64 multiplications
– New form produces multiplications
2(4 2 )  8  40
– So we’re already ahead ….. Let’s keep going!!
10/20/20 DFT - Hafiz Malik 5
Signal flowgraph notation
• In generalizing this formulation, it is most convenient to adopt a graphic
approach …
• Signal flowgraph notation describes the three basic DSP operations:
– Addition

x[n]
– Multiplication by a constant x[n]+y[n]
y[n]
– Delay
a
x[n] ax[n]

z-1
x[n] x[n-1]

10/20/20 DFT - Hafiz Malik 6


Signal flowgraph representation of 8-point DFT
k
• Recall that the DFT is now of the form X[k]  G[k]  WN H[k]
• The DFT in (partial) flowgraph notation:

10/20/20 DFT - Hafiz Malik 7


Continuing with the decomposition …
• So why not break up into additional DFTs? Let’s take the
upper 4-point DFT and break it up into two 2-point DFTs:

10/20/20 DFT - Hafiz Malik 8


The complete decomposition into 2-point DFTs

10/20/20 DFT - Hafiz Malik 9


Now let’s take a closer look at the 2-point DFT

• The expression for the 2-point DFT is:


1 1
X[k]   x[n]W2nk   x[n]e  j 2nk / 2
n0 n0

• Evaluating for k  0,1 we obtain


X[0]  x[0]  x[1]
X[1]  x[0]  e  j 21 / 2 x[1]  x[0]  x[1]

which in signal flowgraph notation looks like ...


This topology is referred to as the
basic butterfly

10/20/20 DFT - Hafiz Malik 10


The complete 8-point DIT FFT Structure

10/20/20 DFT - Hafiz Malik 11


Computational Complexity of N-point FFTs

• Let
N  2 where   log 2 (N)
• (log2(N) columns)(N/2 butterflys/column)(2
mults/butterfly)
N log 2 (N)
or ~ multiplys
10/20/20 DFT - Hafiz Malik 12
Additional timesavers: reducing multiplications
in the basic butterfly
• As we derived it, the basic butterfly is of the form

WNr

WNr N / 2
• Since W N / 2  1 we can reducing computation by 2 by
N
premultiplying byWNr

WNr 1
10/20/20 DFT - Hafiz Malik 13
Alternate FFT structures

• We developed the basic decimation-in-time


(DIT) FFT structure, but other forms are
possible simply by rearranging the branches of
the signal flowgraph
• Consider the rearranged signal flow diagrams
on the following panels …..

10/20/20 DFT - Hafiz Malik 16


Alternate DIT FFT structures
• DIT structure with input bit-reversed, output natural

10/20/20 DFT - Hafiz Malik 17


Alternate DIT FFT structures
• DIT structure with input natural, output bit-reversed:

10/20/20 DFT - Hafiz Malik 18


Alternate DIT FFT structures
• DIT structure with both input and output natural:

10/20/20 DFT - Hafiz Malik 19


Alternate DIT FFT structures
• DIT structure with same structure for each stage:

10/20/20 DFT - Hafiz Malik 20


Comments on alternate FFT structures

• A method to avoid bit-reversal in filtering


operations is:
– Compute forward transform using natural input, bit-
reversed output (as in OSB 9.10)
– Multiply DFT coefficients of input and filter response
(both in bit-reversed order)
– Compute inverse transform of product using bit-
reversed input and natural output (as in OSB 9/14)
• Latter two topologies (as in OSB 9.15 and 9.16)
are now rarely used

10/20/20 DFT - Hafiz Malik 21


The decimation-in-frequency (DIF)
FFT algorithm

• Introduction: Decimation in frequency is an


alternate way of developing the FFT algorithm
• It is different from decimation in time in its
development, although it leads to a very
similar structure

10/20/20 DFT - Hafiz Malik 22


FFT: Decimation in Frequency
• Consider the original DFT equation ….
N 1
X (k )   x(n)WNnk
n 0
• Separate the first half and the second half of time samples:
( N / 2 ) 1 N 1
X (k )  n 0
x (n)W nk
N  
n N / 2
x(n)WNnk
( N / 2 ) 1 ( N / 2 ) 1
 
n 0
x(n)W nk
N W ( N / 2) k
N n 0
x( n  N / 2)WNnk

  x(n)  (1) 
( N / 2 ) 1
 k
x( n  N / 2) WNnk
n 0

• Note that these are not N/2-point DFTs


10/20/20 DFT - Hafiz Malik 23
FFT: Decimation in Frequency
  x(n)  (1) 
( N / 2 ) 1
X (k )  k
x ( n  ( N / 2)) WNnk
n 0

• For k even, let k  2r


  x(n)  (1) 
( N / 2 ) 1
X (k )  2r
x(n  ( N / 2)) WNn 2 r
n 0
( N / 2 ) 1
   x ( n )  x ( n  ( N / 2)) W nr
N /2
n 0

• For k odd, let k  2r 1

  x(n)  (1) 
( N / 2 ) 1
X (k )  2r
( 1) x(n  ( N / 2)) WNn ( 2 r 1)
n 0
( N / 2 ) 1
   x(n)  x(n  ( N / 2))W W
n 0
n
N
nr
N /2

• These expressions are the N/2-point DFTs of


10/20/20
x ( n )  x ( n  ( N / 2)) and [ x ( n )
DFT - Hafiz Malik
 x ( n  ( N / 2))]WN
n
24
These equations describe the
following structure:

10/20/20 DFT - Hafiz Malik 25


Continuing by decomposing the odd
and even output points results …

10/20/20 DFT - Hafiz Malik 26


… and replacing the N/4-point DFTs by
butterflys we obtain

10/20/20 DFT - Hafiz Malik 27


The DIF FFT is the transpose of the DIT FFT
• To obtain flowgraph transposes:
– Reverse direction of flowgraph arrows
– Interchange input(s) and output(s)
• DIT butterfly: DIF butterfly:

• Comment:
– We will revisit transposed forms again in our discussion of
filter implementation

10/20/20 DFT - Hafiz Malik 28


The DIF FFT is the transpose of the DIT FFT
• Comparing DIT and DIF structures:
DIT FFT structure: DIF FFT structure:

• Alternate forms for DIF FFTs are similar to those of


DIT FFTs

10/20/20 DFT - Hafiz Malik 29


Alternate DIF FFT structures
• DIF structure with input natural, output bit-reversed:

10/20/20 DFT - Hafiz Malik 30


Alternate DIF FFT structures
• DIF structure with input bit-reversed, output natural:

10/20/20 DFT - Hafiz Malik 31


Alternate DIF FFT structures
• DIF structure with both input and output natural:

10/20/20 DFT - Hafiz Malik 32


Alternate DIF FFT structures
• DIF structure with same structure for each stage:

10/20/20 DFT - Hafiz Malik 33


FFT structures for other DFT sizes
• Can we do anything when the DFT size N is not
an integer power of 2 (the non-radix 2 case)?
• Yes! Consider a value of N that is not a power
of 2, but that still is highly factorable …

• Let N  p1 p2 p3 p4 ...p ; q1  N / p1, q2  N / p1 p2 , etc.


Then let

N 1
X[k]   x[n]WNnk
n0
q1 1 q1 1 q1 1
p1rk ( p1r1)k ( p r 2)k
  x[ p1r]WN   x[ p1r  1]WN   x[ p1r  2]WN 1  ...
r0 r0 r0
10/20/20 DFT - Hafiz Malik 34
Non-radix 2 FFTs (continued)
• An arbitrary term of the sum on the previous
panel is

q1 1
 x[ p1r  l]WN( p1rl)k
r0
q1 1 q1 1
p1rk lk
  x[ p1r  l]WN WN  WN  x[ p1r  l]Wqrk
lk
1
r0 r0

• This is, of course, a DFT of size of points


spaced by q1
p1

10/20/20 DFT - Hafiz Malik 35


Non-radix 2 FFTs (continued)
• In general, for the first decomposition we use

p1 1 q1 1
X[k]   WNlk  x[ p1r  l]Wqrk
1
l 0 r0
• Comments:
– This procedure can be repeated for subsequent factors of
N
– The amount of computational savings depends on the
extent to which N is “composite”, able to be factored into
small integers
– Generally the smallest factors possible used, with the
exception of some use of radix-4 and radix-8 FFTs

10/20/20 DFT - Hafiz Malik 36


Direct DFT & FFT Comparison
• Time (1 multiplication per microsec)

Direct DFT
N FFT
26 64 .02 sec .002 sec
29 512 1 .02 sec
212 4096 67 .2
215 32768 1 hr 11 mins 2
218 262144 3 days 4 hrs 19

10/20/20 DFT - Hafiz Malik 37

You might also like