0% found this document useful (0 votes)
224 views5 pages

!VFFT

This paper presents a new superfast bit reversal algorithm. The new approach is based upon a pseudo-semi-group homomorphism property. The algorithm is based on the fast Fourier transform technique (fft)
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
224 views5 pages

!VFFT

This paper presents a new superfast bit reversal algorithm. The new approach is based upon a pseudo-semi-group homomorphism property. The algorithm is based on the fast Fourier transform technique (fft)
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

INTERNATIONAL JOURNAL OF ADAPTIVE CONTROL AND SIGNAL PROCESSING Int. J. Adapt. Control Signal Process.

2002; 16:703707 (DOI: 10.1002/acs.718)

A new superfast bit reversal algorithm


! M. Rubio1, P. Gomez1 and K. Drouiche2,n,y
1

! Universidad Polit!cnica de Madrid, Facultad de Informatica Campus de Montegancedo, s/n, 28660 Boadilla del Monte, e Madrid, Spain 2 Universit! de Cergy Pontoise, LPTM, CNRS ESA 8089, Neuville III, 95301 Neuville Sur Oise, France e

SUMMARY In this paper we present a new bit reversal algorithm which outperforms the existing ones. The bit reversal technique is involved in the fast Fourier transform technique (FFT), which is widely used in computerbased numerical techniques for solving numerous problems. The new approach for computing the bit reversal is based upon a pseudo-semi-group homomorphism property. The surprise is that this property is almost trivial to prove but at the same time it also leads to a very efcient algorithm which we believe to be the best with only ON operations and optimal constant, i.e. unity. Copyright # 2002 John Wiley & Sons, Ltd.
KEY WORDS:

benchmark; bit reverse; fast algorithm; FFT; shufing data

1. INTRODUCTION Computing the Fourier Transform of a data set is not only easy but very fast to perform using the popular fast Fourier transform algorithm (FFT) involving the DanielsonLanczos lemma and which works properly when the number of available data is a power of 2. Assume that we have n 2 Nn observations of f ; a 2p-periodic, L2 2p function, say at points xl 04l5n ; uniformly 0; distributed, i.e. xl 2pl=n: Then its Fourier coefcient Ck ; at lag 04k5n; approximated by Ck; n ; is obtained discretizing the integral Z 1 2p f xeikx dx Ck 2p 0 by the Riemann sum Ck; n
n1 1X f xl eikxl n l0

Correspondence to: Dr K. Drouiche, Universidad Politechnica de Madrid, Facultad de Inform! tica Campus de a Montegancedo, s/n 28660 Boadilla del Monte, Madrid, Spain y E-mail: [email protected]

Copyright # 2002 John Wiley & Sons, Ltd.

Received 19 April 1999 Revised 13 October 2000 Accepted 15 May 2001

704

M. RUBIO, P. GOMEZ AND K. DROUICHE

but as the sampling is uniform, we have Ck; n


n1 1 X 2ipkl=n fl e n l0

where we set fl f xl : Computing the sequence Ck;n 04k5n requires a number of multiplications of order n2 which could quickly be seriously disabling if n is large enough. The FFT (see, for more details, References [19]), is used to decrease signicantly the above quantity to about n log2 n; where log2 n log n=log 2: However, to use the most widely used FFTs (see, for more details, Reference [10]), there is a price to pay for that, the sample size, n; has to be a power of 2, i.e. there exists p 2 Nn such that n 2p to allow the FFT algorithm to work properly. Henceforth, we shall assume that n 2p for some p 2 Nn ; now to compute the sequence Ck; n 04k5n ; the FFT algorithm needs a preliminary treatment of the data called the shufe stage which is known as the bit reversal procedure; roughly speaking, a special permutation of the indexed data is made, i.e. we rst have to scramble the data using the one-to-one mapping [11, 8]: sp : Wp ! Wp l/j sp l where Wp & N and Wp fl 2 N=04l52p g and where P l denotes the bit reverse of j; i.e. if sp P l 2 Wp with l p1 an 2n ; an 2 f0; 1g; then sp l j p1 an 2pn1 : It is easy to see that sp n0 n0 is involutive and bijective, moreover for all p 2 Nn ; we have sp 0 0 and sp 1 2p1 : For example, if p 3 we have the following mapping s3 :: Index, i 0 1 2 3 4 5 6 7 Binary 000 001 010 011 100 101 110 111 Bit reversion 000 100 010 110 001 101 011 111 s3 Several numerical techniques exist to compute the indexes (sp l04l52p ; see References [17,10,12]. The most efcient algorithm for computing the bit reversion, which is the fastest and requires the smallest size for storage, is due to Raimund Meyer (1988), which algorithm is available in Van Loan [13]. However, this algorithm does not provide the best efciency we could expect because it involves testing instructions which delay the computing of sp l04l42p ; see References [1, 4, 9, 10, 12]. Hereafter, we propose a new algorithm which is test free and moreover outperforms the known ones in terms of the computing speed of the sequence sp l04l52p moreover it privileges additions, which costs less in terms of computing time, rather than multiplications. For this we provide the following results.
Copyright # 2002 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2002; 16:703707

Bit reversed index, j s3 i 0 4 2 6 1 5 3 7

SUPERFAST BIT REVERSAL ALGORITHM

705

However, before going further, the reader is recommended to appreciate the difculty of the problem by trying to solve it at this point.

2. MAIN RESULT AND THE ALGORITHM Let nk 2k 1; 15k5p 1; note that nk belong to Wp : We start giving the following denition: Denition 1 We shall say that nk 15k5p is a node of Wp ; if and only if nk 2k 1; 15k5p 1: Observe that Wp has p 2 nodes. The following proposition will provide us the key tool to derive our new algorithm. Proposition 1 Given p 2 Nn ; x nk ; 15k5p; a node of Wp and let l 2 Wp : For all 04l5nk1 ; we have sp nk l sp nk sp l where sp nk 2 Wp is a constant which depends only on k; i.e. sp nk
k 1 X j0

2pj1

The above proposition claims that the mapping sp has a pseudo-homomorphism group property around the nodes nk ; we say pseudo because there is no homomorphism onto N. Observe that this property is only valid around the nodes nk : This property is the key tool for our proposed algorithm. Now we nish with our main result which is the algorithm for computing sp l04l52p :
*

Initialization: Set rst node n2 22 1 3; we set sp 0 0; sp 1 2p1 ; sp 2 2p2 and sp 3 sp 1 sp 2 3 2p2 : Do: for k 3 to p 2; set nk 2k 1 and sp nk sp nk1 2pk * Do for 05l5n k1 ; sp nk l sp nk sp l end Exact theoretical number of operations (all types of operations) is given by

p2 X 2p 4 2k 2 |{z} 4 2p 4 22 2p3 1 2p 4 2p1 2p1 |{z} k2 Initialization first loop |{z} odd terms

4 |{z}

second loop

2p N :
Copyright # 2002 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2002; 16:703707

706

M. RUBIO, P. GOMEZ AND K. DROUICHE

3. BENCHMARK To assess the performance of our new algorithm, we have compared it to two algorithms: the Meyers algorithm, (see, Reference [13], for more details), and the Evans algorithm (see, Reference [7], C language source code included). We have performed numerical simulations comparing these algorithms and obtained the following benchmark reported in the table below. It gives the number of operations to compute the bit reversal procedure versus p; where n 2p : Simulations were performed on a Pentium PC-200 MHz using C code.

p rM rE r p

1 2 2 1 11

2 11 15 2 12

3 28 36 4 13

4 70 90 19 14

5 150 192 42 15

6 324 415 81 16

7 662 847 152 17

8 1364 1745 287 18

9 2746 3512 550 19

10 5560 7111 1069 20

rM 11 142 22 404 44 834 89 888 179 806 360 028 720 090 144 0984 2882 006 5765 588 rE 14 250 28 653 57 339 114 58 229 954 460 440 920 924 1842 875 3685 798 7373 611 r 2100 4155 8258 16 457 32 848 65 623 131 166 262 245 524 396 1048 691 Number of operations versus p or n 2p : rM ; rE and r; respectively, are the number of operations performed to compute the bit reversion using Meyers, Evans and our algorithm. Raimund Meyer algorithm is currently used in the famous radix-2 fft procedure (including matlab), the fastest one to our knowledge, it is about On operations, see Van Loan [13]. We have also t the above data to a linear curve using the least-squares method, the results show that all algorithms are On; (r an) operations, but our algorithm has the smallest optimal slope, i.e. unity:

Algorithm Meyers Evans New

a 5.4958 7.0285 1.0003

It turns out that our algorithm outperforms Raimunds and Evans and is more than ve times faster. Remark 1 Take note that initialization is needed only for Meyers algorithm and Evans algorithm and not for the new algorithm (however, we do not consider the initialization step for counting the number of operations). Also note that our algorithm is not optimized as several computations of the same index are involved.
Copyright # 2002 John Wiley & Sons, Ltd. Int. J. Adapt. Control Signal Process. 2002; 16:703707

SUPERFAST BIT REVERSAL ALGORITHM

707

4. PROOF OF THE RESULTS Proof of the Proposition Although the proof is now trivial, because we pointed out the good property which solves the problem, we write it down here below. Observe that for any 24k5p; we have k 1 X nk 2j
j0

now let l5nk1 ; l could be written as l thus nk l hence we have sp nk l nally, summing properly, we get sp nk lk sp l
k 1 X j0 k 1 X j0 k1 X j0 k 1 X j0

aj 2 j ;

aj 2 f0; 1g

1 aj 2j

1 aj 2pj1

2pj1

sp nk which completes the proof of our theorem. The proposition follows immediately. &

REFERENCES 1. Blahut RE. Fast Algorithms for Digital Signal Processing. Addison-Wesley: New York, 1984. 2. Bracewell R. The Fourier Transform and its Applications. McGraw-Hill: New York, 1965. 3. Cooley JW, Tukey OW. An algorithm for the machine calculation of complex fourier series. Mathematics of Computation 1965; 19:297301. 4. Drouiche K. A pseudo homomorphism group property for bit reversal algorithm. RR-96-4403, UCP. 5. Duhamel P, Vetterli M. Fast Fourier transforms: a tutorial review. Signal Processing 1990; 19:259299. 6. Gergkand GD. A guided tour of the fast Fourier transform. IEEE Spectrum 1969; 7:4152. 7. Karp A. Bit reversal on uniprocessors. SIAM Review 1996; 30(1):130. 8. Lonnie C. Fundamentals of Digital Signal Processing. Wiley: New York, 1987. 9. Press WH, Flannery BP, Teukolsky SA, Vetterling WT. Fast Fourier transform. In Numerical Recipes in Fortran: The Art of Scientic Computing (2nd edn). Cambridge University Press, Cambridge, England, 1992; 490529, Chapter 12. 10. Lipson JD. Elements of Algebra and Algebraic Computing. Addison-Wesley: Reading, MA, 1981. 11. Stoer J, Bulrisch R. Introduction to Numerical Analysis. Springer: New York, 1980. 12. Nussbaumer HJ. Fast Fourier Transform and Convolution Algorithms (2nd edn). Springer: New York, 1982. 13. Van Loan C. Compuational Frameworks for The Fast Fourier Transform. SIAM: Philadelphia, 1992.

Copyright # 2002 John Wiley & Sons, Ltd.

Int. J. Adapt. Control Signal Process. 2002; 16:703707

You might also like