Académique Documents
Professionnel Documents
Culture Documents
Figure 8.3.
Figure 8.2.
Figure 8.4.
Figure 8.2.
Figure 8.3.
8.1
Butterfly
Computation
Stage 1
Current
HulfSize
HalfSize = N/23 = 1
(Distance = 1)
Decimal
aIJ Distance1
d51
d71
Stage 2
HalfSize = N/22 = 2
(Distance = 2)
421
431
461
471
Stage 3
HalfSize = N/2 = 4
(Distance = 22 = 4)
Binary
J Distance
a[O]
000
a[2]
010
011
441
451
461
471
I
I
101
111
010
011
110
111
100
101
110
111
Comparing Table 8.1 to Table 7.1, it is clear that because xi2 i1 i0 is contained in
a[i0 i1 i2 ], elements x0i1 i0 and x1i1 i0 , which form pairs during the rst stage of buttery
computation, are found in a[i0 i1 0] and a[i0 i1 1], and so on. Consequently, the value of
Distance starts from 1, and it doubles in each of the following stages. This observation immediately leads to the following algorithm in terms of the binary addresses of
elements in array a.
Algorithm 8.2 The in-place DITRN FFT algorithm in terms of binary addresses:
begin
:= 0
Assume problem size N = 2n
while n 1 do
Combine two subproblems
Apply Cooley-Tukey buttery computation
to combine all pairs of array elements whose
binary addresses dier in the th bit from the right
:= + 1
end while
end
Accordingly, the shorthand notation developed for the DIFRN FFT, which transforms bit-reversed input, applies here. That is, for N = 8, the three DIT buttery
computation steps are also represented by the sequence
i2 i1 i0
i0 i1 i2
i0 i1 2
i0 1 2
Once again, the bit-reversed ordering of the input is reected by beginning the sequence
with permuting xi2 i1 i0 from the assumed location a[i2 i1 i0 ] to a[i0 i1 i2 ].
However, the corresponding twiddle factors are dierent from the DIFRN FFT, as
explained in the next section.
8.1.1
Observe that in Table 8.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 8.2.
Table 8.2 Relating twiddle factors to binary addresses of the pair of a[J] and a[J +
Distance].
Cooley-Tukey
Butterfly
Actual Modification
of a[J] & a[J Distance]
Butterfly
Groups
Group 0
(4 Pairs)
Stage i o i l i z
(Distance = 1)
+
a[o] = a [ ~+
] w;a[l]
a[2] = a[2]
+ w;a[3]
+ w;a[5]
+ w;a[7]
Stage i O i 1 7 2
(Distance = 2)
a [ ~=
] a[o] wO,a[~]
a [ ~=
] U[O] - wO,a[2]
a[4] = a[4]
+ w;a[6]
Group 0
(2 Pairs)
+ w&[l]
Group 1
(2 pairs)
+ wga[7]
Stage io 717 2
(Distance = 4)
Group 0
+ wta[5]
(1Pair)
Group 1
a[o] = a [ ~ ] wO,a[4]
a[4] = a[O] - w;a[4]
a[1] = a[l]
+ w$a[6]
+ &a[7]
(1Pair)
Group 3
(1P 4
a[3] = a[3]
(1Pair)
Group 2
A Binary Address
Based Notation
For easy comparison with Table 7.3 for the DITNR FFT the corresponding twiddle factors and its shorthand notations are summarized in Table 8.3. Note that although the input data are in bit-reversed order, it is assumed that the pre-computed
twiddle factors are stored in natural order in the array w. That is, w[] = N
,
i1 i2
= 0, 1, . . . , N/2 1. Therefore, w[i1 i2 ] = N is used in Table 8.3.
Fable 8.3 Iden ifying twiddle xtors (N = 8)
Butterfly
Computation
Stage io 7 1 72
Current
HalfSize
lr DITRN FFT.
Decimal
Binary
Shorthand
f w [ Jtwiddle]
Jtwiddle w.r.t
modified x i 2 ; ,jn
Notation w.r.t.
Halfsize = 1
fw[O] = *w:
00
HalfSize = 2
fw[O] = *w:
is0 = 00
f w [ 2 ] = fw&
is0 = 10
f w [ O ] = *w;
f w [ l ] = *u;
fw[2] = f # L
f w [ 3 ]= f w k
ili2
HalfSize = 4
= 00
i l i 2 = 01
i l i 2 = 10
i l i 2 = 11
8.1.2
In contrast to the DIFRN FFT pseudo-code program given by Algorithm 4.2, the complete DITRN version is given below as Algorithm 8.3. As mentioned in the last section,
the twiddle factors are stored in natural order, i.e., w[] = N
, = 0, 1, . . . , N/2 1.
Algorithm 8.3 The iterative radix-2 DITRN FFT algorithm in pseudo-code.
begin
PairsInGroup := N/2
Begin with N/2 butteries in one group
NumOfGroups := 1
Same twiddle factor is employed in a group
Distance := 1
while NumOfGroups < N do
GapToNextPair := 2 NumOfGroups
GapToLastPair := GapToNextPair (PairsInGroup 1)
for K := 0 to NumOfGroups 1 do
Modify one group at a time
J := K
Address of the rst pair
JLast := K + GapToLastPair
Address of the last pair
Jtwiddle := K PairsInGroup
W := w[Jtwiddle]
Assume w[] = N
while J JLast do
Modify all pairs in the same group
Temp := W a[J + Distance]
a[J + Distance] := a[J] Temp
a[J] := a[J] + Temp
J := J + GapToNextPair
Process next pair in the group
end while
end for
PairsInGroup := PairsInGroup/2
NumOfGroups := NumOfGroups 2
Distance := Distance 2
end while
end
8.2
As derived in the previous section, the buttery computation steps in Figures 8.28.4
(for N = 8) are fully specied by the sequence
i2 i1 i0
i0 i1 i2
i0 i1 2
i0 1 2
N0 = 1, Ni2 0 , Ni1 i2 .
For N = 32, the entire Figure 8.5 can be replaced by the sequence
i4 i3 i2 i1 i0
i0 i1 i2 i3 i4
i0 i1 i2 i3 4
i0 i1 i2 3 4
i0 i1 2 3 4
with the understanding that on input, a[i0 i1 i2 i3 i4 ] contains the bit-reversed xi4 i3 i2 i1 i0 ,
and on output, a[i0 i1 i2 i3 i4 ] contains Xi0 i1 i2 i3 i4 . Refer to Figure 8.5 for the decimal
subscripts of all 32 bit-reversed input elements in a[i0 i1 i2 i3 i4 ].
The corresponding twiddle factors are