0% found this document useful (0 votes)
44 views34 pages

Fast Fourier Transform (FFT) - Digital Signal Processing Lecture 6

The document provides an overview of the Fast Fourier Transform (FFT) and its relationship with the Discrete Fourier Transform (DFT), highlighting its computational efficiency. It explains the divide and conquer approach used in FFT algorithms, particularly the Radix-2 FFT, which simplifies the computation of DFTs by breaking them down into smaller components. The document also details the steps involved in computing DFTs, including the use of butterfly diagrams and the combination of smaller DFTs into larger ones.

Uploaded by

shashiboorla
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)
44 views34 pages

Fast Fourier Transform (FFT) - Digital Signal Processing Lecture 6

The document provides an overview of the Fast Fourier Transform (FFT) and its relationship with the Discrete Fourier Transform (DFT), highlighting its computational efficiency. It explains the divide and conquer approach used in FFT algorithms, particularly the Radix-2 FFT, which simplifies the computation of DFTs by breaking them down into smaller components. The document also details the steps involved in computing DFTs, including the use of butterfly diagrams and the combination of smaller DFTs into larger ones.

Uploaded by

shashiboorla
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/ 34

Fast Fourier Transform (FFT)

Borbala Hunyadi

Delft University of Technology, The Netherlands


Recap: Discrete Fourier Transform

Definition
The Discrete Fourier Transform (DFT) of a sequence x[n] is
N−1
X [k] = ∑ x[n]e −j2π N , for 0 ≤ k ≤ N − 1
kn

n=0

Applications:
● Filtering
● Spectral analysis

2 / 13
Recap: Discrete Fourier Transform

Definition
The Discrete Fourier Transform (DFT) of a sequence x[n] is
N−1
X [k] = ∑ x[n]e −j2π N , for 0 ≤ k ≤ N − 1
kn

n=0

Applications:
● Filtering
● Spectral analysis
Is DFT efficient enough?

2 / 13
Computational complexity of the DFT
Let’s define WN = e −j2π/N ! Then the DFT can be expressed as:
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Steps of the direct computation algorithm:

Stage 1:
Compute and store the values
WNl = e −j2πl/N = cos(2πl/N) − j ⋅ sin(2πl/N)
Stage 2:
for k = 0 ∶ N − 1
X [k] ← x[0]
for n = 1 ∶ N − 1
l = (kn)N
X [k] ← X [k] + x[n]WNl
end
end
3 / 13
Computational complexity of the DFT
Let’s define WN = e −j2π/N ! Then the DFT can be expressed as:
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Steps of the direct computation algorithm:

Stage 1:
Compute and store the values N evaluations of sin
WNl = e −j2πl/N = cos(2πl/N) − j ⋅ sin(2πl/N) and cos functions
Stage 2:
for k = 0 ∶ N − 1
X [k] ← x[0]
for n = 1 ∶ N − 1
l = (kn)N
X [k] ← X [k] + x[n]WNl
end
end
3 / 13
Computational complexity of the DFT
Let’s define WN = e −j2π/N ! Then the DFT can be expressed as:
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Steps of the direct computation algorithm:

Stage 1:
Compute and store the values N evaluations of sin
WNl = e −j2πl/N = cos(2πl/N) − j ⋅ sin(2πl/N) and cos functions
Stage 2:
for k = 0 ∶ N − 1 N 2 complex
X [k] ← x[0] multiplications and
for n = 1 ∶ N − 1 N(N − 1) complex
additions
l = (kn)N
X [k] ← X [k] + x[n]WNl
end
end
3 / 13
Computational complexity of the DFT
Let’s define WN = e −j2π/N ! Then the DFT can be expressed as:
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Steps of the direct computation algorithm:

Stage 1:
Compute and store the values N evaluations of sin
WNl = e −j2πl/N = cos(2πl/N) − j ⋅ sin(2πl/N) and cos functions
Stage 2:
for k = 0 ∶ N − 1 N 2 complex
X [k] ← x[0] multiplications and
for n = 1 ∶ N − 1 N(N − 1) complex
additions
l = (kn)N
X [k] ← X [k] + x[n]WNl
+ overhead:
end addressing, indexing...
end
3 / 13
Computational complexity of the DFT
Let’s define WN = e −j2π/N ! Then the DFT can be expressed as:
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Steps of the direct computation algorithm: O(N 2 ) - very costly

Stage 1:
Compute and store the values N evaluations of sin
WNl = e −j2πl/N = cos(2πl/N) − j ⋅ sin(2πl/N) and cos functions
Stage 2:
for k = 0 ∶ N − 1 N 2 complex
X [k] ← x[0] multiplications and
for n = 1 ∶ N − 1 N(N − 1) complex
additions
l = (kn)N
X [k] ← X [k] + x[n]WNl
+ overhead:
end addressing, indexing...
end
3 / 13
Fast Fourier Transform

● A family of computationally efficient algorithms to compute DFT


● Not a new transform!

Different working principles:


1 Divide and conquer approach
2 DFT as convolution: linear filtering approach

4 / 13
Fast Fourier Transform

● A family of computationally efficient algorithms to compute DFT


● Not a new transform!

Different working principles:


1 Divide and conquer approach
2 DFT as convolution: linear filtering approach

4 / 13
Divide and conquer FFT
Essential ingredients:

5 / 13
Divide and conquer FFT
Essential ingredients:
● Break down the N-point DFT to a cascade of smaller-size DFTs

5 / 13
Divide and conquer FFT
Essential ingredients:
● Break down the N-point DFT to a cascade of smaller-size DFTs

Guessing game: I am thinking of a random number between 1 and


16. Can you guess which number is it?

5 / 13
Divide and conquer FFT
Essential ingredients:
● Break down the N-point DFT to a cascade of smaller-size DFTs

Guessing game: I am thinking of a random number between 1 and


16. Can you guess which number is it?

● Exploit symmetries

5 / 13
Divide and conquer FFT
Essential ingredients:
● Break down the N-point DFT to a cascade of smaller-size DFTs

Guessing game: I am thinking of a random number between 1 and


16. Can you guess which number is it?

● Exploit symmetries

WNk = WNk+N
WNLk = WN/L
k

5 / 13
Radix-2 FFT

Radix-2 FFT is the most important divide and conquer type FFT
algorithm. It can be used if N = 2r . This can always be achieved using
zero-padding the sequence.

Decimation in time (DIT) solution:


● Divide the N long sequence x[n] to 2 N/2 long sequences
● The N-point DFT of x[n] can be computed by properly combining
the 2 N/2-point DFTs
● Repeat the subdivision until the sequences are 2 samples long
(2-point DFT)

6 / 13
Radix-2 FFT
N-point DFT (N = 2r ) solved by a cascade of r stages:

The following slides show the exact operations performed during these
stages.
7 / 13
2-point DFT: How to compute in a simple way?
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Let us write out the expression for both DFT coefficients:

X [0] = x[0] + x[1]W20 = x[0] + x[1]


X [1] = x[0] + x[1]W21 = x[0] − x[1]

8 / 13
2-point DFT: How to compute in a simple way?
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Let us write out the expression for both DFT coefficients:

X [0] = x[0] + x[1]W20 = x[0] + x[1]


X [1] = x[0] + x[1]W21 = x[0] − x[1]

8 / 13
2-point DFT: How to compute in a simple way?
N−1
X [k] = ∑ x[n]WNkn , for 0 ≤ k ≤ N − 1
n=0
Let us write out the expression for both DFT coefficients:

X [0] = x[0] + x[1]W20 = x[0] + x[1]


X [1] = x[0] + x[1]W21 = x[0] − x[1]

The 2-point DFT coefficients are given by taking the sum and the
difference of the samples. This simple operation is represented by the
so-called butterfly diagram.
8 / 13
Combine two 2-point DFTs into a 4-point DFT

3
X [k] = ∑ x[n]W4kn , for 0 ≤ k ≤ 3
n=0

X [k] = x[0] + x[1]W4k + x[2]W42k + x[3]W43k

9 / 13
Combine two 2-point DFTs into a 4-point DFT

3
X [k] = ∑ x[n]W4kn , for 0 ≤ k ≤ 3
n=0

X [k] = x[0] + x[1]W4k + x[2]W42k + x[3]W43k

= (x[0] + x[2]W42k ) + (x[1]W4k + x[3]W43k )

Decimation in time: divide the


sum to a sum of even and a
sum of odd samples

9 / 13
Combine two 2-point DFTs into a 4-point DFT

3
X [k] = ∑ x[n]W4kn , for 0 ≤ k ≤ 3
n=0

X [k] = x[0] + x[1]W4k + x[2]W42k + x[3]W43k

= (x[0] + x[2]W42k ) + (x[1]W4k + x[3]W43k )

= (x[0] + x[2]W42k ) + W4k (x[1] + x[3]W42k )

9 / 13
Combine two 2-point DFTs into a 4-point DFT

3
X [k] = ∑ x[n]W4kn , for 0 ≤ k ≤ 3
n=0

X [k] = x[0] + x[1]W4k + x[2]W42k + x[3]W43k

= (x[0] + x[2]W42k ) + (x[1]W4k + x[3]W43k )

= (x[0] + x[2]W42k ) + W4k (x[1] + x[3]W42k )

= (x[0] + x[2]W2k ) + W4k (x[1] + x[3]W2k )

using the property


WNLK = WN/Lk
N = 4 and
L=2
9 / 13
Combine two 2-point DFTs into a 4-point DFT

3
X [k] = ∑ x[n]W4kn , for 0 ≤ k ≤ 3
n=0

X [k] = x[0] + x[1]W4k + x[2]W42k + x[3]W43k

= (x[0] + x[2]W42k ) + (x[1]W4k + x[3]W43k )

= (x[0] + x[2]W42k ) + W4k (x[1] + x[3]W42k )

= (x[0] + x[2]W2k ) + W4k (x[1] + x[3]W2k ) = G [k] + W4k H[k]

G [k] ≡ x[0] + x[2]W2k is the H[k] ≡ x[1] + x[3]W2k is the


2-point DFT of even samples 2-point DFT of odd samples

9 / 13
4-point DFT from 2-point DFTs

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

X [0] = G [0] + H[0]


X [1] = G [1] + W4 H[1]
X [2] = G [2] + W42 H[2]
X [3] = G [3] + W43 H[3]

10 / 13
4-point DFT from 2-point DFTs

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

X [0] = G [0] + H[0]


X [1] = G [1] + W4 H[1]
X [2] = G [2] + W42 H[2] = G [0] + W42 H[0]
X [3] = G [3] + W43 H[3] = G [1] + W43 H[1]

G [k] and H[k] are 2-point


DFTs, hence, 2-periodic

10 / 13
4-point DFT from 2-point DFTs

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

X [0] = G [0] + H[0]


X [1] = G [1] + W4 H[1]
X [2] = G [2] + W42 H[2] = G [0] + W42 H[0]
X [3] = G [3] + W43 H[3] = G [1] + W43 H[1]

10 / 13
General case: N-point DFT from N/2-point DFTs

N−1
X [k] = ∑ x[n]WNkn
n=0

11 / 13
General case: N-point DFT from N/2-point DFTs

N−1
X [k] = ∑ x[n]WNkn
n=0

N/2−1 N/2−1
= ∑ x[2r ]WN2kr + WNk ∑ x[2r + 1]WN2kr
r =0 r =0

Decimation in time: divide the


sum to a sum of even and a
sum of odd samples

11 / 13
General case: N-point DFT from N/2-point DFTs

N−1
X [k] = ∑ x[n]WNkn
n=0

N/2−1 N/2−1
= ∑ x[2r ]WN2kr + WNk ∑ x[2r + 1]WN2kr
r =0 r =0

N/2−1 N/2−1
kr
= ∑ x[2r ]WN/2 + WNk ∑ x[2r + 1]WN/2
kr
r =0 r =0

using the property


WNLK = WN/L
k

11 / 13
General case: N-point DFT from N/2-point DFTs

N−1
X [k] = ∑ x[n]WNkn
n=0

N/2−1 N/2−1
= ∑ x[2r ]WN2kr + WNk ∑ x[2r + 1]WN2kr
r =0 r =0

N/2−1 N/2−1
kr
= ∑ x[2r ]WN/2 + WNk ∑ x[2r + 1]WN/2
kr
= G [k] + WNk H[k]
r =0 r =0

G [k] is the N/2-point DFT H[k] is the N/2-point DFT


of even samples, hence N/2- of odd samples, hence N/2-
periodic periodic

11 / 13
Example: 8-point FFT

Start with 2-point DFTs of samples arranged in bit-reversed order and


combine the results in each stage! Note that the butterflies can be
k+N/2
further simplfied with WN = −WNk

12 / 13
Computational complexity of Radix-2 FFT
● v = log2 N stages
● per stage, there are N/2 butterflies
● per butterly, 1 complex multiplication and 2 complex additions
Total: log2 N ⋅ N/2 complex multiplications and log2 N ⋅ N complex
additions, i.e. O(Nlog2 N).

13 / 13

You might also like