Professional Documents
Culture Documents
5 l l
Lecture 10
DFT and FFT
10.1 - Frequency Domain Vs. Time Domain
CTFS DTFS
CTFT DTFT
10.2 - Discrete Fourier Transform (DFT)
• A finite
f or periodic
d sequence hash only l N unique values,
l
x[n] for 0 ≤ n p N
• Spectrum
S t is
i completely
l t l defined
d fi d by
b N distinct
di ti t frequency
f
samples
• Divide 0..2π
0 2π into N equal steps
steps, {ω(k)} = 2πk/N
• Uniform sampling of DTFT spectrum:
10.2 – DFT – contd.
Hence,
Twiddle Factor
n =0 n =0
n =0
= 1 + 0 + 0 + 1e − j 2π 3 4 = 1 + e − j 3π 4
⎛ 3π ⎞ ⎛ 3π ⎞
= 1 + cos⎜ ⎟ − j sin ⎜ ⎟ = 1+ j
⎝ 2 ⎠ ⎝ 2 ⎠
DFT Example – contd.
3 3
− j 2π 2 n
¾ at k=2, X (2) = ∑ x(nT ) e − j 2 ΩnT
= ∑ x(nT ) e N
n =0 n =0
3
− j 4πn
= ∑ x(nT ) e N
n =0
= 1 + 0 + 0 + 1e − j 4π 3 4 = 1 + e − j 3π = 1 − 1 = 0
3
− j 2π 3 n
¾ at k=3, X (3) = ∑ x(nT ) e N
n =0
= 1 + 0 + 0 + 1e − j 9π 2 = 1 − j
X (k ) = {2, 1 + j , 0, 1 − j}
DFT Example – contd.
x(nT) |X(k)|
1 2
√2
x x x
0 125 250 375 t(µs) 0 12.57 25.14 37.71 50.28
kΩ(X 103 rad/s)
φ(k)(⁰)
x(n) ={1, 0, 0,1} +45 Phase Angle
indeterminate
37.71
0 x x
12.57 25.14 50.28
kΩ(X 103 rad/s)
‐45
• Check
Ch k
10.4 - DFT Computational Complexity
The DFT
has:
• (N complex multiplies + N-1 complex adds per point) x N points (k = 0..N-1)
N2 complex multiplies and N(N
N(N-1)
1) complex additions
where
cpx mult: (a+jb)(c+jd) = ac - bd + j(ad+bc)= 4 real mults + 2 real adds
• i.e.
ie
• so have
• Similarly,
10.6.2 - Multiple DIT Stages – contd.
Two-Stage DIT Flowgraph
10.6.2 - Multi-stage DIT FFT – contd.
x(0)
x(1)
10.7 - FFT Implementation Details
• Basic Butterfly at any stage
• Can be simplified to
10. 8 - 8-pt DIT FFT Flowgraph
000
001
010
0 0
2
011 W
8
100
101
110
111 2
W
8
• WN0 disappears
N
• Total no. of butterflies
Total no. of butterflies = logg 2 N
2 No off stages
t
• As
As each butterfly gives one complex multiplication and 2
each butterfly gives one complex multiplication and 2
complex addition
• So, FFT has complex multiplications of
So, FFT has complex multiplications of
N
Ο( log 2 N) instead of Ο(N 2 ) in case of DFT
2
and complex additions of
Ο(Nlog d off Ο(N(N - 1)) in
(Nl 2 N) instead
i i case off DFT
10.10 - Inverse FFT
• Thus
St
Steps ffor calculating
l l ti IFFT:
IFFT
1. Take the conjugate of the freq.
•Hence, Use FFT to calculate IFFT Samples
2. Calculate FFT of these samples
3. Divide the output by N
4 Take the conjugate of the output
4.