ECE 3203
Digital Signal Processing
Discrete and Fast Fourier Transform
Shah Muhammad Azmat Ullah
Lecturer,
Dept. of ECE, KUET.
Khulna University of Engineering & Technology
Fast Fourier Transform (FFT)
Efficient Computation of the DFT : Fast Fourier Transform (FFT)
Algorithms.
A fast Fourier transform (FFT) is an algorithm that computes the
discrete Fourier transform (DFT) of a sequence, or its inverse (IDFT).
Department of Electronics and Communication Engineering (ECE) 2
Fast Fourier Transform (FFT)
The DFT of a sequence {x(n)} of length N is given by complex-valued sequence {X(k)}
𝑁−1
𝑋 𝐾 = 𝑥 𝑛 𝑒 −𝑗2𝜋𝑛𝑘/𝑁 ; 0 ≤ 𝑘 ≤ 𝑁 − 1
𝑛=0
−𝒋𝟐𝝅/𝑵
Let, 𝑾𝑵 = 𝒆
Hence, FFT
𝑁−1
𝑋 𝐾 = 𝑥(𝑛)𝑊𝑁𝑛𝑘 ; 0 ≤ 𝑘 ≤ 𝑁 − 1
𝑛=0
Similarly, IDFT/IFFT becomes,
𝑁−1
1
𝑥 𝑛 = 𝑋(𝑘)𝑊𝑁−𝑛𝑘 ; 0 ≤ 𝑛 ≤ 𝑁 − 1
𝑁
𝑛=0
Department of Electronics and Communication Engineering (ECE) 3
Fast Fourier Transform (FFT)
Phase factor 𝑾𝑵 = 𝒆−𝒋𝟐𝝅/𝑵 has symmetry and periodicity properties.
𝑘+𝑁/2
Symmetry propert𝑦 ∶ 𝑊𝑁 = −𝑊𝑁𝑘
Periodicity propert𝑦 ∶ 𝑊𝑁𝑘+𝑁 = −𝑊𝑁𝑘
Complexity:
Direct Method of DFT : 𝑁 2
FFT Algorithm : 𝑁 𝑙𝑜𝑔2 𝑁 [ for 𝑁 ≥ 3 , 𝑁 𝑙𝑜𝑔2 𝑁 < 𝑁 2 ]
FFT Algorithm take advantages of the symmetry and periodicity properties of the
𝟐𝝅
−𝒋 𝒏𝒌
complex number 𝑾𝒏𝒌
𝑵 =𝒆 𝑵
Department of Electronics and Communication Engineering (ECE) 4
Radix / Size of FFT
FFT decomposes an N-point DFT into smaller size DFTs.
If 𝑁 is factored 𝑎𝑠 𝑁 = 𝑟1 𝑟2 𝑟3 … … 𝑟𝐿
𝑤ℎ𝑒𝑟𝑒, 𝑟1 = 𝑟2 = ⋯ = 𝑟𝐿 = 𝑟
Then,
𝑁 = 𝑟𝐿
𝑟 = radix / minimum size of DFT / radix of the FFT algorithm.
𝐿 = no. of DFT stages.
Radix-2 is mostly used.
Department of Electronics and Communication Engineering (ECE) 5
Fast Fourier Transform (FFT)
Two methods of FFT:
1. Decimation-in-Time (DIT) Algorithm -> DIT FFT Algorithm
2. Decimation-in-Frequency (DIF) Algorithm -> DIF FFT Algorithm
Department of Electronics and Communication Engineering (ECE) 6
DIT FFT Algorithm
If 𝑁 = 2𝐿 , then 𝑥(𝑛) is decimated into 2 (even & odd numbered) 𝑁/2 point sequences.
Department of Electronics and Communication Engineering (ECE) 7
DIT FFT Algorithm
Department of Electronics and Communication Engineering (ECE) 8
DIT FFT Algorithm
According to, 𝟐𝝅
−𝒋 𝒏𝒌
Symmetry propert𝑦 ∶ 𝑊𝑁
𝑘+𝑁/2
= −𝑊𝑁𝑘 𝑾𝒏𝒌
𝑵 =𝒆 𝑵
Periodicity propert𝑦 ∶ 𝑊𝑁𝑘+𝑁 = −𝑊𝑁𝑘
In fig 6.4,
𝑊20 , 𝑊40 , 𝑊80 = 1
𝑊21 , 𝑊42 , 𝑊84 = −1
𝑊41 , 𝑊43 , 𝑊82 , 𝑊86 = 𝑗 𝑜𝑟 − 𝑗
And,
𝑊80 = −𝑊84
𝑊81 = −𝑊85
𝑊82 = −𝑊86
𝑊83 = −𝑊87
Department of Electronics and Communication Engineering (ECE) 9
DIT FFT Algorithm
The decimation-in-time FFT algorithm decomposes the DFT by sequentially splitting
input samples x(n) in the time domain into sets of smaller and smaller subsequences
and then forms a weighted combination of the DFTs of these subsequences.
Department of Electronics and Communication Engineering (ECE) 10
DIT FFT Algorithm
Using basic butterfly flow graph and symmetry, periodicity of phase/twiddle factor:
Department of Electronics and Communication Engineering (ECE) 11
DIT FFT Algorithm
It is observed that the input data has been shuffled, that is, appears in “bit reversed” order
depicted in following table for N=8.
Department of Electronics and Communication Engineering (ECE) 12
DIT FFT Example
Given x(n) ={1, 2, 3, 4, 4, 3, 2, 1}, find X(k) using DIT FFT algorithm
Department of Electronics and Communication Engineering (ECE) 13
DIF FFT Algorithm
Decimation-in-frequency FFT decomposes the DFT by recursively splitting the
sequence elements X(k) in the frequency domain into sets of smaller and smaller
subsequences.
It also obtains DFT of any x(n).
Difference with DIT-FFT is in basic butterfly diagram & stages are just inversed.
Department of Electronics and Communication Engineering (ECE) 14
DIF FFT Algorithm
In DIF-FFT
algorithm the
input sequence
x(n) appears in
natural order
while the output
X(k) appears in
the bit-reversed
order.
Department of Electronics and Communication Engineering (ECE) 15
DIF FFT Example
Given x(n) =𝟐𝒏 and 𝑵 = 𝟖, find X(k) using DIF FFT algorithm
Department of Electronics and Communication Engineering (ECE) 16
IDFT by Direct DFT
IDFT
𝑁−1
1
𝑥 𝑛 = 𝑋(𝑘)𝑊𝑁−𝑛𝑘 ; 0 ≤ 𝑛 ≤ 𝑁 − 1
𝑁
𝑛=0
Taking Complex Conjugate of the above expression,
𝑁−1
𝑁𝑥 ∗ 𝑛 = 𝑋 ∗ (𝑘)𝑊𝑁𝑛𝑘 𝐷𝐹𝑇 𝑜𝑓 [𝑋 ∗ 𝑘 ]
𝑛=0
1
∴ 𝑥∗ 𝑛 = 𝐷𝐹𝑇 𝑋 ∗ 𝑘
𝑁
Taking Complex Conjugate again
∗
𝑁−1
1
𝑥 𝑛 = 𝑋 ∗ (𝑘)𝑊𝑁𝑛𝑘
𝑁
𝑛=0
1 ∗
= 𝐹𝐹𝑇 𝑋 ∗ 𝑘
𝑁
Department of Electronics and Communication Engineering (ECE) 17
IDFT by Direct DFT
An FFT algorithm can be used to compute the IDFT if the output is divided by N and the twiddle
factors are negative powers of 𝑊𝑁 , i.e. powers of 𝑊𝑁−1 is used instead of powers of 𝑊𝑁 .
Therefore, an IFFT flow graph can be obtained from an FFT flow graph by replacing all the x(n) by
X(k), dividing the input data by N, and changing the exponents of 𝑊𝑁 to negative values.
So, Difference with DIT-FFT:
1. Shift the stages of input-output of DIT-FFT inversely.
2. Divide the resultant by N.
Department of Electronics and Communication Engineering (ECE) 18
IDFT by Direct DFT
Department of Electronics and Communication Engineering (ECE) 19
IDFT by Direct DFT Example
Department of Electronics and Communication Engineering (ECE) 20
IDFT by Direct DFT Example
Department of Electronics and Communication Engineering (ECE) 21
IDFT by Direct DFT Example
Department of Electronics and Communication Engineering (ECE) 22
References
Digital Signal Processing: A Practical Approach
- Emmanuel C. Ifeachor & Barrie W. Jervis.
Digital Signal Processing
- S. Salivahanan, A. Vallavaraj, C Gnanapriya.
Digital Signal Processing Principles Algorithms and Applications
- John G. Proakis, Dimitris G. Manolakis
Signals and Systems Using MATLAB
- Luis F. Chaparro
Digital Signal Processing Using MATLAB
- Vinay K. Ingle, John G. Proakis
Department of Electronics and Communication Engineering (ECE) 23
Department of Electronics and Communication Engineering (ECE) 24