Date post: | 16-Sep-2015 |
Category: |
Documents |
Upload: | bao-tram-nguyen |
View: | 214 times |
Download: | 2 times |
Chapter 9
An Ordered Radix-2 DIT FFT
This chapter presents the sixth variant of the FFT algorithm, which applies decimation-in-time FFT to transform naturally ordered input time series to naturally orderedoutput frequencies. As expected, this ordered DITNN FFT corresponds to the orderedDIFNN FFT presented in Chapter 6. Readers of this chapter are thus assumed tobe familiar with the concept of combining permutation with buttery computation inthe ordered DIF FFT, which allows the implementation of repeated permutation ofintermediate results without extra accesses to memory. Since it would be helpful tolook at the same from a dierent angle, this chapter begins with the following genericdescription of the DIT FFT algorithm, which is correct regardless of where the inputelement xm, m = 0, 1, . . . , N 1, and its derivatives are stored in array a.
Algorithm 9.1 The radix-2 DIT FFT algorithm in terms of binary subscripts.
begink := n 1 Assume problem size N = 2nwhile k 0 do Combine two subproblems
Apply Cooley-Tukey buttery computation
to combine all pairs of elements of x whose
binary subscripts dier in bit ikk := k 1
end whileend
Accordingly, the two in-place DIT FFT algorithms presented in Chapters 7 and 8and the ordered DITNN FFT algorithm presented in this chapter must all implementexactly the same computation, and they each can be understood by relating the loca-tions where xm and its derivatives are stored in the input and the working arrays asshown in Table 9.1 for the familiar N = 8 example.
2000 by CRC Press LLC
Recall that x(3)i2i1i0 = Xi0i1i2 . Therefore, the result b[i0i1i2] = x(3)i2i1i0
from theDITNN algorithm ensures that the output is in natural order. Based on Table 9.1, theordered DITNN FFT can immediately be described in full for the N = 8 example inTable 9.2, which can be compared with Table 7.2 for the DITNR FFT and Table 8.2for the DITRN FFT.
The eect of combining buttery computation with permutation from array a to b,or vice versa, is reected by the shorthand notation
i2i1i0i2i1i0
i12i0
i012
a b a b.
Observe that the twiddle factors remain the same for all three DIT FFT algorithms,
i.e., they are
0N = 1, i20N , i1i2N .
Table 9.1 Relating the NR, RN, and NN variants of the DIT FFT.
2000 by CRC Press LLC
Table 0.2 The NN DIT FFT applied to a N = 8 example. Cooley-Tukey
)utterfly Combine
with Permutation
Stage 1: i z i l io t
t Stage 2: i 1 7 2 i o
1 Stage 3: i 0 7 1 7 2
Actual Modification &
Permutation from a to b
or Vice Versa
b[O] = a[O] + wO,a[4]
b[ l ] = u[1] + w5a[5] b[4] = u[O] - w ; u [ ~ ]
b[5] = ~ [ l ] - w;a[5] b[2] = u[2] + w;a[6] b[6] = a[2] - w;a[6] b[3] = u[3] + w$a[7] b[7] = a[3] - w;a[7] u[O] = b[O] + wLb[2] a[4] = b[O] - &b[2] u[1] = b[ l ] + w;b[3] ~ [ 5 ] = b[ l ] - &b[3] a[2] = b[4] + w%b[6] ~ [ 6 ] = b[4] - w;b[6] a[3] = b[5] + wgb[7] a[7] = b[5] - w$b[7] b[O] = a[O] + w;a[l]
b [ l ] = 421 + w:a[3]
b[2] = a[4] + w:u[5]
b[4] = a[O] - w;o[l]
b[5] = a[2] - w t a [ 3 ]
b[6] = ~ [ 4 ] - w ; u [ ~ ] b[3] = u[6] + wLo[7] b[7] = a[6] - wLa[7]
Butted]
Groups
Group 0
( 4 Pairs)
Group 0
( 2 Pair4
k Binary Address Based Notation
to Show the Combined Effect
a[Oiaio] = b[iZOiO] + w$Ob[iz l i o ] o[lizio] = b[i20io] - w y b [ i 2 1 i o ]
2000 by CRC Press LLC
9.1 Deriving the (Ordered) DITNN FFT From Its
Recursive Denition
For completeness, the derivation of the ordered DIT FFT from its recursive denitionis also depicted for the N = 8 example in Figures 9.19.4.
Figure 9.1 The rst division step of the (ordered) DITNN FFT.
2000 by CRC Press LLC
Figure 9.2. Figure 9.3.
Figure 9.4.
Figure 9.2 Solve one half-size subproblem by (ordered) DITNN FFT.
2000 by CRC Press LLC
Figure 9.3 Solve one half-size subproblem by (ordered) DITNN FFT.
2000 by CRC Press LLC
Figure 9.4 Solve the entire problem by (ordered) DITNN FFT.
9.2 The Pseudo-code Program for the DITNN FFT
In contrast to the DIFNN FFT pseudo-code program given by Algorithm 6.1, the DITNNversion is given below as Algorithm 9.2. Note that the twiddle factors are assumed tobe stored in natural order, i.e., w[] = N , = 0, 1, . . . , N/2 1.
2000 by CRC Press LLC
Figure 9.2. Figure 9.3.
Algorithm 9.2 The (ordered) radix-2 DITNN FFT algorithm.
beginPairsInGroup := N/2 Initially: N/2 pairs in one groupNumOfGroups := 1Distance := N/2NotSwitchInput := truewhile NumOfGroups < N do Combine pairs in each group
if NotSwitchInput Array a contains input; array b contains outputL := 0for K := 0 to NumOfGroups 1 do
JFirst := 2 K PairsInGroupJLast := JFirst + PairsInGroup 1Jtwiddle := K PairsInGroup Assume w[] = NW := w[Jtwiddle] Same twiddle factor in each groupfor J := JFirst to JLast do
Temp := W a[J + Distance]b[L] := a[J ] + Tempb[L+N/2] := a[J ] TempL := L+ 1
end forend forNotSwitchInput := false
else Array b contains input; array a contains outputL := 0for K := 0 to NumOfGroups 1 do
JFirst := 2 K PairsInGroupJLast := JFirst + PairsInGroup 1Jtwiddle := K PairsInGroup Assume w[] = NW := w[Jtwiddle] Same twiddle factor in each groupfor J := JFirst to JLast do
Temp := W a[J + Distance]a[L] := b[J ] + Tempa[L+N/2] := b[J ] TempL := L+ 1
end forend forNotSwitchInput := true
end ifPairsInGroup := PairsInGroup/2NumOfGroups := NumOfGroups 2Distance := Distance/2
end whileend
2000 by CRC Press LLC
9.3 Applying the (Ordered) DITNN FFT to a
N = 32 Example
Generalizing the shorthand notation for N = 32, the following sequence represents allve stages of permutation and computation depicted in Figure 9.5.
i4i3i2i1i0i4i3i2i1i0
i34i2i1i0
i234i1i0
i1234i0
i01234
a b a b a b.
The corresponding twiddle factors are
0N = 1, i4000N , i3i400N , i2i3i40N , i1i2i3i4N ;and w[i1i2i3i4] = i1i2i3i4N is assumed in Algorithm 9.2.
By comparing Figure 9.6, where the butteries associated with a particular pairof resulting subproblems are shown without the cluttering of others, with the twounordered DIT FFT in Figures 7.6 and 8.5, one once again observes that
all three DIT algorithms treat exactly the same pairs of subproblems duringeach stage of the computation.
Thus, they all implement the same radix-2 DIT FFT algorithm.
2000 by CRC Press LLC
Figure 9.5 Butteries of the (ordered) DITNN FFT algorithm.
2000 by CRC Press LLC
Figure 9.6 Identifying the subproblem pairs in the (ordered) DITNN FFT.
2000 by CRC Press LLC
INSIDE the FFT BLACK BOX: Serial and Parallel Fast Fourier Transform AlgorithmsTable of ContentsPart II: Sequential FFT AlgorithmsChapter 9: An Ordered Radix-2 DIT FFT9.1 Deriving the (Ordered)DIT NN FFT From Its Recursive Definition9.2 The Pseudo-code Program for the DIT NN FFT9.3 Applying the (Ordered)DIT NN FFT to a N = 32 Example