Professional Documents
Culture Documents
7.1
Recall that the recursive radix-2 DIT FFT algorithm was derived in Chapter 3, in
which the Cooley-Tukey buttery in Figure 7.1 represents the last combination step in
computing the transform
1
N
2
(7.1)
Xr =
k=0
1
N
2
r(2k)
x2k N
+ N
k=0
r(2k)
x2k+1 N
r = 0, 1, . . . , N 1.
(n1)
Assuming N = 2n , Yr
subproblems dened by
1
(n1)
and Zr
N
2
(7.2)
Yr(n1)
1
N
2
r(2k)
x2k N
k=0
(n1)
yk
rk
N , r = 0, 1, . . . , N/2 1
k=0
and
1
N
2
(7.3)
Zr(n1)
x2k+1 N
k=0
(n1)
1
N
2
r(2k)
k=0
(n1)
(n1)
zk
rk
N , r = 0, 1, . . . , N/2 1.
2
Note that yk
x2k and zk
x2k+1 , k = 0, 1, . . . , 2n1 1, identify input
elements to the two subproblems of size 2n1 as depicted in Figure 7.2 for N = 8.
Since each subproblem is to be solved by the same DIT FFT algorithm recursively,
two subproblems of size N = 2n2 are dened by the even and odd elements from
(n1)
(n2)
(n1)
(n2)
(n1)
yk
, namely, yk
y2k , and zk
y2k+1 as depicted in Figure 7.3; the
other two subproblems of size N = 2n2 are dened by the even and odd elements
(n1)
(n2)
(n1)
(n2)
(n1)
, namely, yk
z2k , and zk
z2k+1 as depicted in Figure 7.4.
from zk
The subdivision steps continue until the subproblem size becomes one, and solution to
(0)
(0)
(0)
(0)
each subproblem is simply itself; i.e., Y0 = y0 and Z0 = z0 .
Therefore, the DIT FFT algorithm begins its computation by combining all pairs
(0)
(0)
of (properly identied) y0 and z0 to form solutions to subproblems of size two, and
so on. For N = 8, the three combination steps are depicted in Figures 7.3, 7.4, and
7.5. As expected, the in-place DIT FFT overwrites the naturally ordered input by
bit-reversed output after the last combination step in Figure 7.5.
Figure 7.4.
Figure 7.3.
Figure 7.5.
Figure 7.4 Solve the second half-size subproblem by in-place DITNR FFT.
Figure 7.3.
7.2
problem by in-place
FFT.
NR DIT
Figure 7.4.
Since the input data are in natural order, array element a[m] is assumed to contain xm
in the development of the pseudo-code program in this section. For easy comparison
with the DIFNR FFT specied in Table 4.2, the buttery computation steps depicted
in Figures 7.3 7.5 are summarized in Table 7.1, where all buttery pairs are identied
by the addresses of a[J] and a[J + Distance].
Table 7.1 Decimal and binary addresses for a[J] and a[J +Distance] in Figures 7.37.5.
Buttery
Current
Decimal
Computation
HalfSize
Stage 1
HalfSize = N/23 = 1
2
(Distance = 2 = 4)
Stage 2
Stage 3
Binary
Decimal
Binary
a[J]
a[J + Distance]
J + Distance
a[0]
000
a[4]
100
a[2]
010
a[6]
110
a[1]
001
a[5]
101
a[3]
011
a[7]
111
HalfSize = N/22 = 2
a[0]
000
a[2]
010
(Distance = 2)
a[4]
100
a[6]
110
a[1]
001
a[3]
011
a[5]
101
a[7]
111
HalfSize = N/2 = 4
a[0]
000
a[1]
001
(Distance = 1)
a[2]
010
a[3]
011
a[4]
100
a[5]
101
a[6]
110
a[7]
111
Observe that the distance between a[J] and a[J + Distance] is a power of 2, so
the binary number property 5 (page 34) applies here as before. That is, the addresses
a[J] and a[J + Distance], denoted as binary numbers in1 i1 i0 , dier only in bit ik
when Distance = 2k and the algorithm can be expressed in terms of binary addresses
as shown below.
Algorithm 7.1 The radix-2 DIT FFT algorithm in terms of binary addresses:
begin
k := n 1
Assume problem size N = 2n
while k 0 do
Combine two subproblems
Apply Cooley-Tukey buttery computation
to combine all pairs of array elements whose
binary addresses dier in bit ik
k := k 1
end while
end
Accordingly, the shorthand notation developed for the DIFNR FFT applies here.
That is, for N = 8, the three DIT buttery computation steps are also represented by
the sequence
i2 i1 i0
2 i1 i0
2 1 i0
However, the corresponding twiddle factors are now dierent, and they are identied
in the next section.
7.2.1
Observe that in Table 7.1, each buttery step combines pairs of subproblems of HalfSize
0
beginning with HalfSize = 1 and twiddle factor N
= 1. Following the denition of
the Cooley-Tukey buttery in Figure 7.1, the second buttery step combines pairs of
0
subproblems of HalfSize = 2, and the corresponding twiddle factors are 40 = N
=
N/4
1
1, and 4 = N , and so on. For N = 8, the twiddle factors corresponding to all
combination steps are identied in Table 7.2.
Table 7.2 Relating twiddle factors to binary addresses of the pair a[J] and a[J +
Distance] (N = 8).
Cooley-Tukey
Actual Modication
Buttery
A Binary Address
Buttery
Groups
Based Notation
Group 0
0
a[0i1 i0 ] = a[0i1 i0 ] + N
a[1i1 i0 ]
0
a[4] = a[0] N
a[4]
(4 Pairs)
0
a[1i1 i0 ] = a[0i1 i0 ] N
a[1i1 i0 ]
0
a[0] = a[0] + N
a[2]
Group 0
i2 0
a[i2 0i0 ] = a[i2 0i0 ] + N
a[i2 1i0 ]
(2 pairs)
i2 0
a[i2 1i0 ] = a[i2 0i0 ] N
a[i2 1i0 ]
Stage
i2 i1 i0
(Distance = 4)
Stage
2 i1 i0
(Distance = 2)
0
a[7] = a[3] N
a[7]
0
a[1] = a[1] + N
a[3]
0
a[3] = a[1] N
a[3]
2
a[4] = a[4] + N
a[6]
Group 1
2
a[6] = a[4] N
a[6]
(2 pairs)
2
a[5] = a[5] + N
a[7]
Stage
2 1 i0
(Distance = 1)
2
a[7] = a[5] N
a[7]
0
a[0] = a[0] + N
a[1]
Group 0
i1 i2
a[i2 i1 0] = a[i2 i1 0] + N
a[i2 i1 1]
0
a[1] = a[0] N
a[1]
(1 pair)
i1 i2
a[i2 i1 1] = a[i2 i1 0] N
a[i2 i1 1]
Group 1
(1 pair)
1
a[4] = a[4] + N
a[5]
Group 2
1
a[5] = a[4] N
a[5]
(1 pair)
3
a[6] = a[6] + N
a[7]
Group 3
3
a[7] = a[6] N
a[7]
(1 pair)
For easy comparison with Table 4.3 for the DIFNR FFT, the corresponding twiddle
factors and their shorthand notation are summarized in Table 7.3. In order not to
invoke a bit-reversing subroutine in the program, it is assumed that the pre-computed
twiddle factors are stored in bit-reversed order although the input data are in natural
i1 i2
order. Therefore, w[i2 i1 ] = N
is used in Table 7.3.
Butterfly
Current
Computation
Halfsize
Stage i z i l i o
T
Stage r z i l i o
-I-,
Stage r z r 1 i o
Decimal
Binary
fw[Jtwiddle]
Jtwiddle w.r.t
modified zi2ilin
Halfsize = 1
*w[O] = *w;
00
HalfSize = 2
f w [ O ]= * w ;
f w [ l ] = *w&
oiz = 00
fw[O] = *w;
i2il
Halfsize = 4
Notation w.r.t.
modified
*w;
zililio
= fl
Oiz = 01
= 00
i*il = 01
* w [ l ] = fw:
*w[2] = * w h
f w [ 3 ]= fw$
7.2.2
Shorthand
i z i l = 10
iZil
= 11
In contrast to the DIF FFT pseudo-code program given by Algorithm 4.2, the complete
DIT FFT version is given below as Algorithm 7.2. For simplicity, the twiddle factors
are assumed to have been stored in the array w in bit-reversed order. For example,
i1 i2
for N = 8, the N/2 = 4 pre-computed twiddle factors are stored as w[i2 i1 ] = N
;
for N = 32, the N/2 = 16 pre-computed twiddle factors are stored as w[i4 i3 i2 i1 ] =
i 1 i 2 i3 i4
N
.
7.3
As derived in the previous section, the buttery computation steps in Figures 7.37.5
(for N = 8) are fully specied by the sequence
i2 i1 i0
2 i1 i0
2 1 i0
N0 = 1, Ni2 0 , Ni1 i2 .
For N = 32, the entire Figure 7.6 can be replaced by the sequence
i4 i3 i2 i1 i0
4 i3 i2 i1 i0
4 3 i2 i1 i0
4 3 2 i1 i0
4 3 2 1 i0
with the understanding that on input, a[i4 i3 i2 i1 i0 ] contains xi4 i3 i2 i1 i0 , and on output,
a[i4 i3 i2 i1 i0 ] contains the bit-reversed Xi0 i1 i2 i3 i4 . Refer to Figure 7.6 for the decimal
subscripts of all 32 bit-reversed output elements Xi0 i1 i2 i3 i4 .
The corresponding twiddle factors are