0% found this document useful (0 votes)
46 views

Objectives:: Fast Fourier Transform

This document summarizes a lecture on the Fast Fourier Transform (FFT). It introduces the Discrete Fourier Transform (DFT) and explains that the FFT reduces the computational complexity of the DFT from O(N^2) to O(NlogN). It describes decimation-in-time as an approach to computing the FFT by dividing the DFT into successive smaller DFTs. Applications discussed include using the FFT to efficiently compute convolution, and visualizing signals in the time-frequency domain through waterfall plots and spectrograms.

Uploaded by

Deepak Vamsi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

Objectives:: Fast Fourier Transform

This document summarizes a lecture on the Fast Fourier Transform (FFT). It introduces the Discrete Fourier Transform (DFT) and explains that the FFT reduces the computational complexity of the DFT from O(N^2) to O(NlogN). It describes decimation-in-time as an approach to computing the FFT by dividing the DFT into successive smaller DFTs. Applications discussed include using the FFT to efficiently compute convolution, and visualizing signals in the time-frequency domain through waterfall plots and spectrograms.

Uploaded by

Deepak Vamsi
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

ECE

EE 8443
3512 – PatternContinuous
– Signals: Recognition
and Discrete

LECTURE 18: FAST FOURIER TRANSFORM

• Objectives:
Discrete Fourier Transform
Computational Complexity
Decimation in Time
Butterfly Diagrams
Convolution Application
Waterfall Plots
Spectrograms

• Resources:
DPWE: The Fast Fourier Transform
CNX: Decimation in Time
ECE 4773: The Fast Fourier Transform
Wiki: The Cooley-Tukey FFT

URL:
The Discrete Fourier Transform
• Recall our definition for the Discrete Fourier Transform (DFT):
N 1
X k   x[n]e  j 2kn / N , k  0, 1, ..., N  1
n0

1 N 1
x[n]   X k e j 2kn / N , n  0, 1, ..., N  1
N k 0
• The computation for Xk requires N2 complex multiplications that require four
multiplications of real numbers per complex multiplication.
• The Fast Fourier Transform (FFT) is an approach to reduce the computational
complexity that produces the same result as a DFT (same result, significantly
fewer multiplications).
• To simplify notation, define:
W N  e  j 2 / N W( N / 2 )  e  j 2 /( N / 2)  e  j 4 / N

(W N ) N  W NN  e  j 2 / N  N
 e  j 2  1
• We can rewrite the DFT equations:
N 1
X k   x[n]W Nkn , k  0, 1, ..., N  1
n0
N 1
1
x[n] 
N
X
k 0
k W N kn , n  0, 1, ..., N  1
EE 3512: Lecture 18, Slide 2
Decimation in Time (Radix 2)
• Let’s explore an approach that subdivides time interval into successively
smaller intervals. Assume N, the size of the DFT, is an even integer so that
N/2 is also an integer. Define two auxiliary signals:
a[n]  x[2n], n  0, 1, 2, ..., N / 2  1
b[n]  x[2n  1], n  0, 1, 2, ..., N / 2  1
• Let Ak and Bk denote two (N/2)-point DFTs of a[n] and b[n]:
( N / 2 ) 1
Ak   a[n]W
n 0
kn
N /2 , k  0, 1, ..., N / 2  1
( N / 2 ) 1
Bk   b[n]W
k 0
 kn
N /2 , k  0, 1, ..., N / 2  1

• We can show that these are related to the DFT by the following equations:
X k  Ak  W Nk Bk , k  0, 1, ..., N / 2  1
X ( N / 2)  k  Ak  W Nk Bk , k  0, 1, ..., N / 2  1

• The computation
k
of Ak and Bk each requires (N/2)2 = N2/4 multiplications. The
scaling by W N requires N/2 additional multiplications. The total computation
is N2/2+N/2 multiplications, which represents N2/2-N/2 fewer multiplications
than the N2 multiplications required by the DFT.
• For N = 128, this is a savings of 8,128 multiplications (16,384 vs. 8,256).
EE 3512: Lecture 18, Slide 3
Block Diagram of an FFT Algorithm
• If N is a power of 2 (e.g., N = 2q), we can repeat this process to further reduce
the computations. The overall complexity reduces from N2 to (Nlog2N)/2.

EE 3512: Lecture 18, Slide 4


Bit Reversing

• Note that the inputs have been shuffled so


that the outputs are produced in the
correct order.
• This can be represented as a bit-reversing
process:

Time Point Binary Reversed- Order


Word Bit Word
(n)
0 000 000 x[0]
1 001 100 x[4]
2 010 010 x[2]
3 011 110 x[6]
4 100 001 x[1]
5 101 101 x[5]
6 110 011 x[3]
7 111 111 x[7]

EE 3512: Lecture 18, Slide 5


Application – Convolution
• Given two time-limited signals:
x[n]  0, n  0 and n  N
v[n]  0, n  0 and n  Q
let r equal the smallest possible integer such that N + Q < 2r. Let L = 2r.
• We can pad these signals with zeros to make them the same length so that
we can apply an FFT:
x[n]  0, n  N , N  1, ..., L  1
v[n]  0, n  Q, Q  1, ..., L  1
• The convolution of these two (zero-padded) signals computed using a
convolution sum requires L2 /2 + 3L/2 multiplications. Computing the
convolution using the FFT requires (3L/2)log2L + L multiplications.
• Example: Consider the convolution of a pulse and a truncated exponential.
x[n]  1, 0  n  N  1
v[n]  (0.8) n u (n)

• What is the effect of truncating the exponential in the frequency domain?


EE 3512: Lecture 18, Slide 6
Application – Convolution (Cont.)
• We can select an FFT Order as follows:
N = 16
Q = 16 (an approximation)
N + Q = 32 =2**5  L = 5
• The MATLAB code to generate the
L-point DFT using the function fft() is:
N = 0:16; L = 32;
v = (0.8).^n;
Vk = fft(v, L);
x = [ones(1, 10)]
Xk = fft(x, L);
• The output can be generated by
multiplying the frequency responses,
and taking the inverse FFT:
Yk = Vk.*Xk;
y = ifft(Yk, L);
• This can be validated by using the time-domain
convolution function from Chapter 2.

EE 3512: Lecture 18, Slide 7


Application – Waterfall Plots
• Often we will used an overlapping
frame-based analysis to compute
the spectrum as a function of time.
• This approach is used in many
disciplines (e.g., graphic equalizer in
audio systems).
• One popular visualization is referred
to as a waterfall plot.

EE 3512: Lecture 18, Slide 8


Applications of the FFT – The Spectrogram
• Another very important visualization tool is the spectrogram, a time-frequency
plot of the spectrum in which the spectral magnitude is plotted as a grayscale
value or color.

EE 3512: Lecture 18, Slide 9


Spectrograms As Continuous Images

EE 3512: Lecture 18, Slide 10


Narrowband vs. Wideband Spectrograms

EE 3512: Lecture 18, Slide 11


Applications to Speech Processing

• The choice of the length of the


FFT can produce dramatically
different views of your signal.
• For speech signals, a 6 ms
window (48 samples at 8 kHz)
allows visualization of individual
speech sounds (phonemes).

• A longer FFT length (240 samples


– 30 ms at 8 kHz) allows
visualization of the fundamental
frequency and its harmonics,
which is related to the vibration of
the vocal chords.
• Such time-frequency displays
need not be limited to the Fourier
transform. For example, wavelets
are a popular alternative.
EE 3512: Lecture 18, Slide 12
Spectrograms in MATLAB
• MATLAB contains a wide variety of visualization tools including a
spectrogram function.
• MATLAB can read several file formats directly, including .wav files.
• Several aspects of the spectrogram can be programmed, including the color
map and the analysis window.

EE 3512: Lecture 18, Slide 13


Summary
• Introduced a decimation-in-time approach to fast computation of the DFT
known as the Fast Fourier Transform.
• Discussed the computational efficiency.
• Demonstrated application of this to convolution.
• Introduced applications of the convolution known as the waterfall plot and the
spectrogram.

EE 3512: Lecture 18, Slide 14

You might also like