The Discrete Fourier Transform - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

The Discrete Fourier Transform

Description:

The Discrete Fourier Transform Extending the DFT to 2D (and higher) Let f(x,y) be a 2D set of sampled points. Then the DFT of f is the following: (Note that ... – PowerPoint PPT presentation

Number of Views:396
Avg rating:3.0/5.0
Slides: 37
Provided by: George697
Category:

less

Transcript and Presenter's Notes

Title: The Discrete Fourier Transform


1
The Discrete Fourier Transform
2
The Fourier Transform
  • The Fourier transform is a mathematical
    operation with many applications in physics and
    engineering that expresses a mathematical
    function of time as a function of frequency,
    known as its frequency spectrum.
  • from http//en.wikipedia.org/wiki/Fourier_transfor
    m

3
The Fourier Transform
  • For instance, the transform of a musical chord
    made up of pure notes (without overtones)
    expressed as amplitude as a function of time, is
    a mathematical representation of the amplitudes
    and phases of the individual notes that make it
    up.
  • from http//en.wikipedia.org/wiki/Fourier_transfor
    m

4
Amplitude phase
  • f(x) ? sin( ?x ? ) ?
  • ? is the amplitude
  • ? is the frequency
  • ? is the phase
  • ? is the DC offset

5
More generally
  • f(x) ?1 sin( ? 1 x ? 1 ) ?2 sin( ? 2 x ?
    2 ) ?

6
The Fourier Transform
  • The function of time is often called the time
    domain representation, and the frequency spectrum
    the frequency domain representation.
  • from http//en.wikipedia.org/wiki/Fourier_transfor
    m

7
Applications
  • differential equations
  • geology
  • image and signal processing
  • optics
  • quantum mechanics
  • spectroscopy

8
Review of complex numbers
9
Complex numbers
  • Complex numbers . . .
  • extend the 1D number line to the 2D plane
  • are numbers that can be put into the rectangular
    form, abi where i2 -1, and a and b are real
    numbers.

10
Complex numbers(rectangular form)
11
Complex numbers
  • Complex numbers . . .
  • a is the real part b is the imaginary part
  • If a is 0, then abi is purely imaginary if b is
    0, then abi is a real number.
  • originally called fictitious by Girolamo
    Cardano in the 16th century

12
Complex arithmetic
  • add/subtract
  • add/subtract the real and imaginary parts
    separately

13
Complex arithmetic
  • complex conjugate
  • often denoted as
  • negate only the imaginary part

14
Complex arithmetic
  • inverse
  • where
  • z is a complex number
  • z bar is the length or magnitude of z
  • a is the real part
  • b is the imaginary part

15
Complex arithmetic
  • multiplication (FOIL)

16
Complex arithmetic
  • division

complex conjugate of denominator
17
Complex numbers(polar form)
18
exponential vs. trigonometric
(phasor form)
Leonhard Euler 1707-1783
19
DFT(Discrete Fourier Transform)
20
DFT
  • Say we have a sequence of N (possibly complex)
    numbers, x0 xN-1.
  • The DFT produces a sequence of N (typically
    complex) numbers, X0 XN-1, via the following

21
DFT IDFT
  • The DFT (Discrete Fourier Transform) produces a
    sequence of N (typically complex) numbers, X0
    XN-1, via the following
  • The IDFT (Inverse DFT) is defined as follows

22
Calculating the DFT
  • So how can we actually calculate ?

23
Calculating the DFT
  • So how can we calculate ?
  • Lets use this relationship
  • Then
  • So what does this mean?

24
Interpretation of DFT
  • Back to the polar form
  • r/N is the amplitude and ? is the phase of a
    sinusoid with frequency k/N into which xn is
    decomposed

25
Calculating the DFT using excel
26
(No Transcript)
27
Check w/ matlab/octave
  • see http//www.mathworks.com/help/matlab/ref/fft
    .html
  • N 256 of samples
  • n (0N-1) subscripts
  • b1 0.5 freq 1
  • b2 2.5 freq 2
  • xn 0.5 sin( b1n ) 0.2 sin( b2n )
  • plot( xn )
  • Xn fft( xn )
  • plot( abs(Xn(1N/2)) )
  • X0real xn . cos( -2pin0/N )
  • X0imag xn . sin ( -2pin0/N )
  • X1real xn . cos( -2pin1/N )
  • X1imag xn . sin ( -2pin1/N )
  • X2real xn . cos( -2pin2/N )
  • X2imag xn . sin ( -2pin2/N )
  • X3real xn . cos( -2pin3/N )
  • X3imag xn . sin ( -2pin3/N )
  • .
  • .
  • .

Note . is element-wise (rather than matrix)
multiplication in matlab.
28
(No Transcript)
29
Add random noise.
  • see http//www.mathworks.com/help/matlab/ref/fft
    .html
  • N 256 of samples
  • n (0N-1) subscripts
  • b1 0.5 freq 1
  • b2 2.5 freq 2
  • r randn( 1, N ) noise
  • xn 0.5 sin( b1n ) 0.2 sin( b2n ) 0.5
    r
  • plot( xn )
  • Xn fft( xn )
  • plot( abs(Xn(1N/2)) )
  • X0real xn . cos( -2pin0/N )
  • X0imag xn . sin ( -2pin0/N )
  • X1real xn . cos( -2pin1/N )
  • X1imag xn . sin ( -2pin1/N )
  • X2real xn . cos( -2pin2/N )
  • X2imag xn . sin ( -2pin2/N )
  • X3real xn . cos( -2pin3/N )
  • X3imag xn . sin ( -2pin3/N )
  • .
  • .
  • .

30
Signal without and with noise.
31
Signal with noise. FFT of noisy signal (two major
components are still apparent).
32
Example of differences in phase. xn 0.5 sin(
b1n ) 0.2 sin( b2n ) xn 0.5
sin( b1n 0.5 ) 0.2 sin( b2n )
33
Computational complexityDFT vs. FFT
  • The DFT is O(N2) complex multiplications.
  • In 1965, Cooley (IBM) and Tukey (Princeton)
    described the FFT, a fast way (O(N log2 N)) to
    compute the FT using digital computers.
  • It was later discovered that Gauss described this
    algorithm in 1805, and others had discovered it
    as well before Cooley and Tukey.
  • With N 106, for example, it is the difference
    between, roughly, 30 seconds of CPU time and 2
    weeks of CPU time on a microsecond cycle time
    computer. from Numerical Recipes in C

34
Extending the DFT to 2D(and higher)
  • Let f(x,y) be a 2D set of sampled points. Then
    the DFT of f is the following
  • (Note that engineers often use i for amps
    (current) so they use j for ?-1 instead.)

35
Extending the DFT to 2D(and higher)
  • In fact, the 2D DFT is separable so it can be
    decomposed into a sequence of 1D DFTs.
  • And this can be generalized to higher and higher
    dimensions as well.

36
The classical Gibbs phenomenon
  • Visit http//en.wikipedia.org/wiki/Square_wave.
  • Hear it at http//www.youtube.com/watch?vuIuJTWS2
    uvY.
Write a Comment
User Comments (0)
About PowerShow.com