Lecture 12
Lecture 12
Fourier Transform
(II)
Time Domain vs Frequency Domain
Last time, we saw the equations that
calculate the Fourier Transform and its
inverse.
Use the Fourier transform, denoted F, to
get the weights (amount) of each
harmonic component in a signal:
F s F f t f t e j2 s t dt
Time Domain vs Frequency Domain
And use the Inverse Fourier Transform,
denoted F-1, to recombine the weighted
harmonics into the original signal:
f t F -1F s Fs e j2 s t ds
Time Domain vs Frequency Domain
This gives us two ways of looking at a
signal:
either by looking at the signal itself in the time
domain or
by looking at its Fourier transform in the
frequency domain.
Does the Fourier Transform of a
?Function Always Exist
This raises a valid question: does the
Fourier Transform of a signal always
exist?
The answer is yes, as long as the signal
has a finite sum (area under the curve):
f t dt
B
f t dt
0
B
Does the Fourier Transform of a
?Function Always Exist
A constant function technically doesn’t meet this
bounding requirement.
So, it’s weight at s = 0 is infinite.
However, if we treat a constant function as the
limit of cos(s) as s goes to 0, then its Fourier
Transform in the limit goes to a delta function.
Thus, the integrated transform is still finite. (We’ll
come back later and talk more about integrated
transforms.)
The Discrete Fourier Transform
Because sinusoids repeat periodically, the
Fourier Transforms for periodic functions tend to
be simpler than those for non-periodic ones.
Let us first consider the one-dimensional case:
If we take a function with limited domain N units wide
and cause it to repeat every N units,
Then, the spectrum of the periodic function must only
have components with frequencies 1/N, 2/N, ... N/N
all sinusoids that make up the Fourier Transform of this
periodic image must resynchronize at the edges of the
image in order to begin again.
The Discrete Fourier Transform
Instead of continuous frequency space,
we have a discrete one.
The Fourier transform thus becomes
N1
1
F s
N
f n e
n 0
j2 s n N
The Discrete Fourier Transform
and,
N1
f n F s e j2 s n N
s 0
N1
1
F s
N
f xW
x 0
sx
N
The Fast Fourier Transform
Algorithm (FFT)
If N is a multiple of 2, i.e N = 2M
Then
2M 1
1
F s
2M
f xW
x 0
sx
2M
FFT Algorithm
If we separate the ODD and EVEN terms
M1
1
f 2 x W s 2 x
2M
M
1
x 0
F s
2 M1
1
f 2 x 1W2 M
s 2 x 1
M x 0
FFT Algorithm
However,
2s s
W 2M W M
and
2 s 1 s s
W 2M W W
M 2M
FFT Algorithm
Therefore,
M1
1
f 2 x Wsx
M
M
1
x 0
F s
2 M1
1
f 2 x 1WM W2 M
sx s
M x 0
FFT Algorithm
Notice that this is the Fourier Transform of
the even terms (we’ll call it Feven(s)) plus a
constant Ws2M times the Fourier Transform
of the odd terms (we’ll call it Fodd(s)).
FFT Algorithm
This means that the first M terms of the
Fourier Transform of 2M items can be
computed by
1
F s
2
Feven s Fodd s Ws
2M
Similarly, the last M terms can be computed by
1
F s
2
Feven s Fodd s Ws
2M
FFT Algorithm
This means that an N-point transform can
be computed by separating the odd and
even elements of the original function,
computing their individual N/2 element
DFTs, and then combining them
FFT Algorithm
If N is a power of two (N=2p),we can
repeat this process recursively
Eventually, we get down to two one-point
transforms, each of which is its own
transform
We combine these, recombine the results,
recombine those results, etc. until we have
the complete transform
FFT Algorithm
This divide-and-conquer Fast Fourier
Transform (FFT) algorithm takes O(N
logN) operations,
as compared to O(N2) for the Discrete
Fourier Transform.
FFT Algorithm
You should realize that the Fast Fourier
Transform is nothing but an algorithm for
computing the Discrete Fourier Transform
in a faster way. It is not anything different.
A lot of people say they “compute the FFT
of an image”, but doing so is like saying
they “quicksort some data”.
FFT Algorithm
One sorts data
Quicksort is one algorithm for doing it.
Likewise, one computes Discrete Fourier
Transforms
The FFT is one algorithm for doing it.
Also keep in mind that the FFT only works when
N is a power of two.
When N is not a power of two, one can usually
pad the data to make it so.