Professional Documents
Culture Documents
C.S. Ramalingam
2π
Notation: WN = e −j N . Hence,
x0
i x1
h
(N−1)k
Xk = 1 WNk WN2k
. . . WN
..
.
xN−1
X = Wx
1 1 1 ··· 1
1 WN WN2 ··· WNN−1
2(N−1)
W = 1 WN2 WN4 ··· WN
..
.
2(N−1) (N−1)(N−1)
1 WNN−1 WN ··· WN
N×N
However, the first row and first column are all 1s, and should
not be counted as multiplications
There are 2N − 1 such instances
Hence, the number of complex multiplications is N 2 − 2N + 1,
i.e., (N − 1)2
For large N,
(N − 1)2 ≈ N 2
N(N − 1) ≈ N 2
Hence both multiplications and additions are O(N 2 )
Let N = 8
Straightforward implementation requires, approximately, 64
multiplications
Questions:
But,
2π 2π
−j N/2 (rk)
WN2rk = e −j N
(2rk)
=e rk
= WN/2
and hence
N N
2
−1 2
−1
X X
rk
Xk = gr WN/2 + WNk rk
hr WN/2
r =0 r =0
= Gk + WNk Hk k = 0, 1, . . . , N − 1
N
{Gk } and {Hk } are 2 point DFTs
The N/2 point DFTs {Gk } and {Hk } are periodic with period
N/2
Gk+ N = Gk
2
Hk+ N = Hk
2
k+ N2
WN = −WNk
Gk Xk
k
N
W
Hk Xk + N
−WNk 2
Xk = Gk + WNk Hk
k+ N2
Xk+ N = Gk+ N + WN Hk+ N
2 2 2
= Gk − WNk Hk
Figure 9.4 Flowgraph of Decimation in Time algorithm for N = 8 (Oppenheim and Schafer, Discrete-Time Signal
Processing, 3rd edition, Pearson Education, 2010, p. 726)
N
The same idea can be applied for calculating the 2 point
DFT of the sequences {gr } and {hr }
Computational savings can be obtained by dividing {gr } and
{hr } into their odd- and even-indexed halves
P0 = p0 + p1 P1 = p0 − p1
Figure 9.11 Flowgraph of Decimation in Time algorithm for N = 8 (Oppenheim and Schafer, Discrete-Time Signal
Processing, 3rd edition, Pearson Education, 2010, p. 730)
N 2 N
After the first split, N 2 −→ 2
2 + 2
N
2 is due to the twiddle factors
N 2 N 2 N
After the second split, 2 −→ 2 4 + 4
Hence,
N 2 N N 2 N N
N 2 −→ 2
2 + −→ 4 4 + +
2
|{z} |2 {z 2}
first stage second stage
k+ N
If WN 2 = −WNk is not considered, the overhead count will
be N and not N2
In this case,
N 2 N 2
N 2 −→ 2
2 N −→ 4
+ |{z} 4 +N +N
| {z }
first stage second stage
For N = 1024
N 2 = 1, 048, 576 N log2 N = 10, 240
Savings of two orders of magnitude!
return input ;
}
Bit reversal for the entire array can take a large overhead if
performed inefficiently
There are several efficient algorithms for sorting an array in
bit-reversed order
Bit reversal on uniprocessors by Alan H. Karp, SIAM Review,
Vol. 38, March 1996, pp. 1–26
http://www-graphics.stanford.edu/~seander/
bithacks.html#BitReverseTable
C.S. Ramalingam (EE Dept., IIT Madras) Intro to FFT 24 / 30
In-Place Computation
Notation:
(0)
First stage: Xk = xk
(log N)
Last stage: Xk 2 = Xk
For the m-th stage butterfly
(m−1) (m−1)
Input: Xp , Xq
(m) (m)
Output: Xp , Xq
The corresponding equations are
(m) (m−1) (m−1)
Xp = Xp + WNr Xq
(m) (m−1) (m−1)
Xq = Xp − WNr Xq
(m−1) (m )
Xp Xp
r
N
W
(m−1) (m )
Xq Xq
−WNr
Figure 9.22 Flowgraph of Decimation in Frequency algorithm for N = 8 (Oppenheim and Schafer, Discrete-Time
Signal Processing, 3rd edition, Pearson Education, 2010, p. 740)
Example: N = 6 = 3 × 2
x0 , x3 , x1 , x4 , x2 , x5