Week 14
Week 14
03 FFT
Introduction
3
The Discrete Fourier
Transform (DFT)
The Discrete Fourier
Transform (DFT)
• The DTFT yields a continuous and periodic spectra of a
aperiodic signal.
• So here the problem arises, when we want to process, estimate,
plot or compute this continuous signal.
𝐿−1
𝑋 𝜔 = 𝑥 𝑛 𝑒 −𝑗𝜔𝑛 0 ≤ 𝜔 ≤ 2𝜋
𝑛=0
The Discrete Fourier Transform
(DFT)
• When x(𝜔) is sampled at equally spaced frequencies. The resultant
samples are:
𝑁−1
𝑋 𝑘 = 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁 𝑘 = 0,1,2, … 𝑁 − 1
𝑛=0
𝑁−1
1 𝑗2𝜋𝑘𝑛/𝑁 𝑛 = 0,1,2, … 𝑁 − 1
𝑥 𝑛 = 𝑋 𝑘 𝑒
𝑁
𝑘=0
𝑋 𝑘 = 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁
𝑘 = 0,1,2, … 𝑁 − 1
𝑛=0
The Discrete Fourier
Transform (DFT)
Discrete Fourier Transform
(DFT)
Example
• Find the 4-point DFT of the sequence 𝑥(𝑛) = cos 𝑛𝜋/4.
Solution:
Since N=4 𝑛 = {0,1,2,3}
𝑋 0 = 𝑥 𝑛 =1
𝑛=0
• For k=1
𝑋 1 = 1 − 𝑗1.414
𝑥 0 = 𝑋 𝑘
𝑛=0
1
𝑥 0 = {3 + 2 + 𝑗 + 1 + (2 − 𝑗)}
4
𝑥 0 =2
• For n=1
𝑥 1 =0
𝑥 𝑛 = {2,0,0,1}
Fast Fourier Transform
(FFT)
Computational Complexity of
DFT
• A major practical consideration when computing the
DFT is its speed.
• The most obvious approach to compute the DFT & IDFT
is to implement equations directly, but this way is very
slow.
Computational Complexity of
DFT
• N Point DFT Requires: 𝑁−1
𝑋 𝑘 = 𝑥 𝑛 𝑒 −𝑗2𝜋𝑘𝑛/𝑁
• 𝑁 complex multiplies
2
𝑛=0
• 𝑁(𝑁 − 1) complex additions
DFT Decomposition
• DFT Decomposition:
i. Decimation in time
ii. Decimation in frequency
The Discrete Fourier Transform
(DFT)
• The DFT and IDFT can also be expressed in terms of 𝑊𝑁 as:
𝑁−1
𝑋 𝑘 = 𝑥 𝑛 𝝎𝑘𝑛
𝑁 0≤𝑘 ≤𝑁−1
𝑛=0
𝑁−1
1 −𝑘𝑛
𝑥 𝑛 = 𝑋 𝑘 𝝎𝑁 0≤𝑛 ≤𝑁−1
𝑁
𝑘=0
Where 𝜔𝑁 = 𝑒 −𝑗2𝜋/𝑁
Decimation in time
𝑁−1
𝑋 𝑘 = 𝑥 𝑛 𝝎𝑘𝑛
𝑁
𝑛=0
• Put n=2r and 2r+1
𝑁/2−1 𝑁/2−1
2𝑟𝑘 (2𝑟+1)𝑘
𝑋 𝑘 = 𝑥 2𝑟 𝝎𝑁 + 𝑥 2𝑟 + 1 𝝎𝑁
𝑛=0 𝑛=0
𝑁/2−1 𝑁/2−1
2 𝑟𝑘 2𝑟𝑘 𝑘
𝑋 𝑘 = 𝑥 2𝑟 (𝝎𝑁 ) + 𝑥 2𝑟 + 1 𝝎𝑁 𝝎𝑁
𝑛=0 𝑛=0
Decimation in time
𝑁/2−1 𝑁/2−1
𝑋 𝑘 = 𝐺 𝑘 + 𝝎𝑘𝑁 𝐻(𝑘)
Decimation in time
X [k ] = G
[ k ] +W
k
N H
[ k ]
N/2 DFT N/2 DFT
of even samples of odd samples