Fast Fourier Transform - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Fast Fourier Transform

Description:

Efficient algorithm for calculating the Discrete Fourier Transform ... the length of the output frequency vectors is N/2 1, ... Complex DFT has strong duality ... – PowerPoint PPT presentation

Number of Views:639
Avg rating:3.0/5.0
Slides: 19
Provided by: rejea
Category:

less

Transcript and Presenter's Notes

Title: Fast Fourier Transform


1
Fast Fourier Transform
  • Rejean Lau, M.Eng

2
Fast Fourier Transform
  • Efficient algorithm for calculating the Discrete
    Fourier Transform
  • Presented by J.W Cooley and J.W. Tukey in paper
    An algorithm for the machine calculation of
    complex Fourier Series, Mathematics Compuation,
    Vol 19, 1965, pg. 297-301

3
FFT
  • Based on the complex DFT

In the Real DFT, the length of the output
frequency vectors is N/21, but in the Complex
DFT, it is N
4
Periodic Nature of DFT
  • Q. Why does the Complex DFT frequency array have
    length N as opposed the Real DFT with length
    N/21?
  • The Complex DFT doubles number of frequency
    values by including negative frequencies which
    mirror the positive frequencies
  • (0 frequency accounts for the 1)

5
Negative Frequency Generation
  • Can use a program to generate the negative
    frequencies to fill out the rest of the complex
    array (positions N/2 1 N)

6
How the FFT works
  • The FFT executes the following steps
  • (1) Decomposing an N point time domain signal
    into N time domain signals each composed of a
    single point
  • (2) Calculate the N frequency spectra
    corresponding to the N time domain signals
  • (3) The N spectra are synthesized into a
    single frequency spectrum

7
(1) Time domain decomposition
Log2N stages are required in the
decomposition Ie. A 16 point signal (24)
requires 4 stages A 512 point signal (27)
requires 7 stages A 4096 point signal (212)
requires 12 stages
8
(1) Time domain decomposition
  • The decomposition is simply a reordering of the
    samples in the signal

Notice that the reordering of the samples is done
in the order of bit-reversal of the binary
equivalent of the sample number The FFT time
domain decomposition can be carried out using a
bit reversal sorting algorithm
9
(2) Calculate the N frequency Spectra
  • The frequency of a 1 point signal is itself
  • That is, the value of the signal is unchanged
  • No computation is required in this step!
  • Each of the 1 point signals that were time domain
    signals are now 1 point frequency domain signals

10
(3) Synthesize the frequency spectrum signal
  • Last step in the FFT is to combine the N
    frequency spectra in the exact reverse order that
    the time domain decomposition took place
  • The bit reversal trick is not applicable in this
    case, and we must go back one stage at a time
  • Continuing from our example
  • First stage 16 frequency spectra (1 point each)
    are synthesized into 8 frequency spectra (2
    points each)
  • Second stage 8 frequency spectra (2 points each)
    are synthesized into 4 frequency spectra (4
    points each)
  • Third stage 4 frequency spectra (4 points each)
    are synthesized into 2 frequency spectra (8
    points each)
  • Fourth stage 2 frequency spectra (8 points each)
    are synthesized into 1 frequency spectra (16
    points)

11
3) Synthesize the frequency spectrum signal
  • The frequency spectra are combined in the FFT by
    duplicating them, and
  • then adding the duplicated spectra together
  • The odd frequency spectrum must also be
    multiplied by a sinusoid
  • (the shift in time domain corresponds to this
    multiplication)

12
FFT Butterfly
  • The butterfly is the basic computational element
    of the FFT, transforming two complex points into
    two other complex points

13
Flow diagram of FFT
  • Frequency Domain synthesis requires 3 loops
  • Outer loop runs through the Log2N stages
  • Middle loop moves through each of the individual
    spectra in the stage being worked on
  • Innermost loop uses the butterfly to calculate
    the points in each frequency spectra
  • The overhead in the boxes
  • determine the beginning and
  • ending indexes for the loops, as
  • well as calculating the sinusoids
  • needed in the butterflies

14
FFT Program in BASIC
15
FFT Programs
  • In-place computation same arrays are used for
    the input, intermediate storage and output ?
    efficient use of memory
  • In the BASIC program, data enter and leave the
    subroutine in the arrays REX and IMX , with
    the samples running from index 0 to N-1.
  • Upon return from the subroutine, REX and IMX
    are overwritten with the frequency domain data.
  • The length of the DFT must also be passed to the
    subroutines.
  • BASIC program uses variable N

16
Inverse FFT
  • Complex DFT has strong duality
  • This means there is symmetry between the time and
    frequency domains
  • The Inverse DFT is nearly identical to the
    Forward DFT
  • Easiest way to calculate an Inverse FFT is to
    calculate a Forward FFT, and then adjust the data

17
Testing the FFT
  • Two tests
  • Start with some arbitrary time domain signal
    input, and run it through the FFT.
  • Now run the resultant frequency spectrum
    through the Inverse FFT.
  • - The result should be identical with the input
  • Symmetry test.
  • Frequency domain of the complex DFT should be
    symmetrical around samples 0 and N/2.
  • -Results in the Inverse DFT producing a time
    domain that has
  • an imaginary part compromising of
    all zeros

18
FFT Performance
  • Time required for bit reversal negligible
  • Each of the Log2N stages has N butterfly
    computations

Where kFFT is a constant related to the processor
speed ie. kFFT 10 µs on a 100 MHz Pentium
Write a Comment
User Comments (0)
About PowerShow.com