Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
31 views7 pages

Topic22 DFT and FFT

This document provides an overview of the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. It discusses: - What the DFT is and how it converts a time domain sequence to a frequency domain sequence of the same length. - How the FFT provides an extremely fast way to compute the DFT using algorithms that exploit symmetries in the DFT calculation. - Examples of computing DFTs and derivations of the 2-point and 4-point DFT formulas. - The decimation-in-time and decimation-in-frequency algorithms for computing the DFT and their differences. - The overlap-add and overlap-save methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Topic22 DFT and FFT

This document provides an overview of the discrete Fourier transform (DFT) and fast Fourier transform (FFT) algorithms. It discusses: - What the DFT is and how it converts a time domain sequence to a frequency domain sequence of the same length. - How the FFT provides an extremely fast way to compute the DFT using algorithms that exploit symmetries in the DFT calculation. - Examples of computing DFTs and derivations of the 2-point and 4-point DFT formulas. - The decimation-in-time and decimation-in-frequency algorithms for computing the DFT and their differences. - The overlap-add and overlap-save methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

EE 220: Signals and Systems

Department of Electronics and Electrical Engineerng


Indian Institute of Technology, Guwahati
Monsoon 2023

Topic 22 : DFT and FFT


Instruction and notes by : Manish

1 Discrete Fourier transform (DFT)


The Discrete Fourier transform or DFT is not a new transform. It is simply the discrete-time
Fourier analysis of finite duration signals adopted for computer analysis.

The discrete Fourier transform (DFT) converts a finite duration time domain sequence into
a same-length sequence in frequency domain. Let x[n] be a finite duration signal. Let x̃[n] be
its periodically extended version. We represent the DFT coefficients as
N
X −1
X̃[k] = x[n]e−j2πkn/N
n=0

where N is the number of samples (the expression is also known as N-point DFT), and
k = 0, 1, 2, ..., N − 1.
An important feature of DFT is that there is an extremely fast algorithm, called the fast
Fourier transform (FFT) for its calculation.

We can also write


X̃[k] ≡ X(Ωk )
here Ωk = 2πk/N . That is, DFT corresponds to the sample of X(Ω) taken every 2π/N . This
concludes that x[n] can be uniquely represented by these samples of X(Ω). (assuming that
N > length of the sequence x[n], otherwise there could be aliasing while sampling.)

1.1 Notations
It is convenient to write:
N
X −1 N
X −1
X̃[k] = x[n]e−j2πkn/N = x[n]WNkn (1)
n=0 n=0

where
WN = e−j2π/N
WN is the N-th root of unity; called “twiddle” factor. Inverse DFT can be written:
N −1
1 X
x[n] = X[k]WN−kn (2)
N k=0

1
2 The fast Fourier transform (FFT)
A fast Fourier transform (FFT) is an algorithm that computes the discrete Fourier transform
(DFT) of a sequence. This is pretty easy to compute with modern computational tools. In
MATLAB, we can simply use the command f f t.

Homework: Check the fft MATLAB algorithm and its uses here:
https://in.mathworks.com/help/matlab/ref/fft.html

The DFT as given in Eq. (2) requires 4N 2 real multiplications and N (4N −2) real additions,
so the comuputation is Order(N 2 ). There are two ways of reducing this computational load:

• 1. Break the problem down into smaller pieces which can be re-combined. Sort of like
the “quicksort” approach to sorting;

• 2. Exploit symmetries in the twiddle factors WN

These are the symmetries in twiddle factor:


m+ N
1. WN 2
= −WNm

2. WNm+N = WNm

2. WNm = WN/m

Homework: Verify the above symmetries.

3 Example
Q1: Compute N point DFT of x[n] = 3δ[n].
Answer: X̃[k] = 3, k ∈ [0, N − 1]

Q2: Compute N point DFT of x[n] = 7δ[n − no ].


Answer: X̃[k] = 7WNkn0 , k ∈ [0, N − 1], WN = e−j2π/N

Q2: Derive the analytical formulae for 2-points and 4-points DFT.
Solution: For two points DFT: W2 = e−jπ = −1
N
X −1
X̃[k] = x[n]WNkn
n=0
X1
X̃[k] = x[n](−1)kn
n=0

X̃[k] = x[0] + (−1)k x[1]

this leads to
X̃[0] = x[0] + x[1]
X̃[0] = x[0] − x[1]
1

2
Similarly, for 4-points DFT: W4 = e−jπ/2 = −j Same analysis as above would lead to

X̃[0] = x[0] + x[2] + x[1] + x[3]


X̃[1] = x[0] − x[2] − j(x[1] − x[3])
X̃[2] = x[0] + x[2] − (x[1] + x[3])
X̃[3] = x[0] + x[2] + j(x[1] − x[3])

3.1 Generalization of above algorithm


The above is also known as decimation in time or butterfly diagram. Let’s say
N
X −1
X[k] = x[n]WNkn
n=0

Split the summation into two sums over even and odd values of n, as shown below:
N N
2
−1 2
−1
X X k·(2r+1)
X[k] = x[2r]WNk·2r + x[2r + 1]WN
r=0 r=0

But using WN2 = WN/2 , we can rewrite the last expression as:

X[k] = G[k] + WNk H[k]

where
N
2
−1
X
k·r
G[k] = x[2r]WN/2
r=0

and
N
2
−1
X
k·r
H[k] = x[2r + 1]WN/2
r=0

3
Figure: For N=8; 8 pt FFT : signal flow diagram

4 Decimation in time and decimation in frequency algo-


rithms
The above algorithm is called decimation in time algorithm. To summarize, its progression
happens as per the below butterfly diagram:

Figure: Decimation in time : signal flow diagram


On the other hand, the decimation in frequency algorithm is very similar except that the
input values are naturally ordered here while output values are ordered in the binary bit-
reversed manner.

4
Figure: Decimation in frequency : signal flow diagram

To understand the difference between the two algorithms, we can observe the following
figure:

Figure: Decimation in time vs decimation in frequency algorithms

5 Algorithms for Computation of convolution


5.1 Overlap add method
This is used to calculate convolution of two very long sequences x[n] and h[n]. We break a
very long signal x[n] into multiple smaller parts; then perform the convolution with h[n]; and
finally overlap and add the individual results. Let’s understand this algorithm with a simple
example.

For simplicity, we are going to assume two rather smaller sequences. Let’s assume x[n] =
[1, 2, 3, 4, 5, 2, 4, 0, 1] and h[n] = [1, 1, 1].

5
Let’s break x[n] such that

x0 [n] = [1, 2, 3]
x1 [n − 3] = [4, 5, 2]
x2 [n − 6] = [4, 0, 1]

So the convolution now becomes


y[n] = x[n] ∗ h[n] = x0 [n] ∗ h[n] + x1 [n − 3] ∗ h[n] + x2 [n − 6] ∗ h[n]
= y0 [n] + y1 [n − 3] + y2 [n − 6]

Individually, we can estimate this as

y0 [n] = [1, 3, 6, 5, 3]
y1 [n − 3] = [4, 9, 11, 7, 2]
y2 [n − 6] = [4, 4, 5, 1, 1]

The length of convolution should be : m + n − 1 = 11. So let’s overlap above result and add
them:
y[n] = [1, 3, 6, 5, 3, 0, 0, 0, 0, 0, 0]
+ [0, 0, 0, 4, 9, 11, 7, 2, 0, 0, 0]
+ [0, 0, 0, 0, 0, 0, 4, 4, 5, 1, 1]
⇒ y[n] = [1, 3, 6, 9, 12, 11, 11, 6, 5, 1, 1]

This method is just a simple algorithm to calculate the convolution of very long sequences.

5.2 Overlap save method


This is just another simple algorithm to compute the convolution of two sequences. In this
algorithm, one sequence x[n] is divided into blocks of data of size l + m − 1; where l and m are
arbitrary length of the two segments.
Each block consists of the last m − 1 points of the previous block followed by l new data
points to form a data sequence of length n = l + m − 1. For the first block, m − 1 points are
set to zero.
The overlap-save procedure cuts the signal up into equal length segments with some overlap.
Then performs the circular convolution with h[n].
Let’s see with an example:
Example: Determine the output of linear FIR filter whose impulse response is h(n) =
1, 2, 3 and the input signal is x(n) = 1, 2, 3, 4, 5, 6, 7, 8, 9 using overlap save method.
Solution: let’s assume two segments of 3 length each for each signal. so l + m − 1 = 5

x1 [n] = [0, 0, 1, 2, 3]
x2 [n] = [2, 3, 4, 5, 6]
x3 [n] = [5, 6, 7, 8, 9]
x4 [n] = [8, 9, 0, 0, 0]
h[n] = [1, 2, 3, 0, 0]

6
This leads to circular convolutions resulting in

x1 [n] ⊛ h[n] = [12, 9, 1, 4, 10]


x2 [n] ⊛ h[n] = [29, 25, 16, 22, 28]
x3 [n] ⊛ h[n] = [47, 43, 34, 40, 46]
x4 [n] ⊛ h[n] = [8, 25, 42, 27, 0]

Finally, to get y[n] discard the first m − 1 elements from each result and add to get the correct
length result (n + m − 1 = 11)

y[n] = [1, 4, 10, 16, 22, 18, 34, 40, 46, 42, 27]

Reference material
1. Textbook: Signals and Systems by Alan Oppenheim
2. Topic notes are inspired from the course materials of ECE423: Colorado State University.
[Please report any typos in the notes by sending an email to the instructor.]

You might also like