fft for non equispaced data

23

Upload: maingot

Post on 11-Dec-2015

218 views

Category:

Documents


0 download

DESCRIPTION

Potts Tutorial for Fast Fourier Transform for non equispaced data

TRANSCRIPT

This is page 1Printer: Opaque thisChapter 1Fast Fourier transforms fornonequispaced data: A tutorialDaniel PottsGabriele SteidlManfred TascheABSTRACT In this section, we consider approximative methods for thefast computation of multivariate discrete Fourier transforms for nonequi-spaced data (NDFT) in the time domain and in the frequency domain.In particular, we are interested in the approximation error as functionof the arithmetic complexity of the algorithm. We discuss the robustnessof NDFT{algorithms with respect to roundo� errors and apply NDFT{algorithms for the fast computation of Bessel transforms.1.1 IntroductionLet �d := [� 12 ; 12 )d and IN := fk 2 Zd : �N2 � k < N2 g, where theinequalities hold componentwise. For xk 2 �d, vj 2 N�d, and fk 2 C , weare interested in the fast and robust computation of the discrete Fouriertransform for nonequispaced data (NDFT)f(vj) = Xk2IN fk e�2�ixkvj (j 2 IM ) : (1.1)For arbitrary nodes, the direct evaluation of (1.1) takes O(NdMd) arith-metical operations, too much for practical purposes. For equispaced nodesxk := kN (k 2 IN ) and vj := j (j 2 IN ), the values f(vj) can be computedby the well-known fast Fourier transform (FFT) with only O(Nd logN)arithmetical operations. However, the FFT requires sampling on an equallyspaced grid, which represents a signi�cant limitation for many applications.For example, most geographical data are sampled at individual observationpoints or by fast moving measuring devises along lines. Using the ACTmethod (adaptive weight, conjugate gradient acceleration, Toeplitz matri-ces) [12] for the approximation of functions from scattered data [22], onehas to solve a system of linear equations with a block Toeplitz matrix assystem matrix. The entries of this Toeplitz matrix are of the form (1.1)and should be computed by e�cient NDFT algorithms. Further applica-

2 Daniel Potts, Gabriele Steidl, Manfred Taschetions of the NDFT range from frequency analysis of astronomical data [19]to modelling and imaging [4, 23].Often either the nodes in time or in frequency domain lie on an equi-spaced grid, i.e., we have to computef(vj) = Xk2IN fk e�2�ikvj=N (j 2 IM ) (1.2)or h(k) := Xj2IN fj e�2�ikvj=N (k 2 IM ): (1.3)Several methods were introduced for the fast evaluation of (1.2) and (1.3).It may be useful to compare the di�erent approaches by using the followingmatrix-vector notation: For the univariate setting d = 1 and M = N , theequations (1.2) can be written asf = AN f (1.4)withf := (f(vj))N=2�1j=�N=2 ; f := (fk)N=2�1k=�N=2 ; AN := �e�2�ikvj=N�N=2�1j;k=�N=2 :Note that (1.3) is simply the \transposed" version of (1.2), i.e.h = ATN f (1.5)with h := (h(k))N=2�1k=�N=2.The di�erent NDFT algorithms can be divided into three groups:I. Based on local series expansions of the complex exponentials like Taylorseries [2] or series of prolate spheroidal functions [18] algorithms were de-veloped which are more e�cient than the direct evaluation of the NDFT. Inmatrix-vector notation, the matrixAN was approximated by the Hadamard(componentwise) product � of the classical Fourier matrixFN := �e�2�ikj=N�N=2�1j;k=�N=2and a low rank matrix E, i.e.AN � FN �E :The rank of E determines the approximation error. Multiplication of theright-hand side with a vector means to perform rank(E) times an FFT oflength N .

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 3II. A quite di�erent idea was introduced in [9] for the univariate case.Note that the idea can be generalized for \line settings". Using Lagrangeinterpolation, the matrix AN can be exactly splitted asAN = D1CD2FN ; (1.6)where Di (i = 1; 2) are diagonal matrices and whereC := (1='((vj=N)� (k=n))N=2�1j;k=�N=2with a monotone decreasing function '. A. Dutt and V. Rokhlin [9] origi-nally have used '(x) := tan(�x) � i. For real input data, a more e�cientmodi�ed version with '(x) := 1=x was suggested in [6]. See Figure 1.1. Themultiplication with C can be approximately realized by the fast multipolemethod [13].In contrast to the other NDFT methods, the splitting (1.6) works alsofor the inverse matrix, i.e. A�1N = �FND3CTD4, such that for suitably dis-tributed nodes vj , the same algorithm can be used for the inverse transform.For clustered nodes, the inverse approach does not work, since the entriesof the diagonal matrices di�er extremely. See [6].III. The most e�cient NDFT algorithms for the computation of (1.2)and (1.3) we have noticed the �rst time in [8, 4]. See also [5, 20]. In [25],we proposed a uni�ed approach to the e�cient computations of (1.2) and(1.3), which includes [8, 4]. In matrix-vector notation our approach to (1.2)can be written as AN � BFnD (n := �N ; � > 1) ; (1.7)with a modi�ed diagonalmatrixD and with a sparse matrixB with nonzeroentries ((vj=N) � (l=n)), where approximates '. The approaches in[8, 4] di�er only by the choice of the window function '. Now we havelearned that this algorithm with several window functions ' is a remake ofa gridding algorithm, which was known in image processing context yearsago [23, 15, 19]. The gridding method is simply the transposed version of(1.7) for the e�cient computation of (1.3).However, the dependence of speed and accuracy of the algorithm on thechoice of the oversampling factor � and the window width of ' was �rstlyinvestigated in [8, 4]. In [25] the error estimates from [8] were improved,which leads to citeria for the choice of the parameters of the algorithm.In this paper, we repeat the uni�ed approach (1.7) for the fast compu-tation of (1.2) from [25] and show the relation to the gridding algorithmfor the fast computation of (1.3). We will see that our approach is alsoclosely connected with interpolation methods by \translates of one func-tion" known from approximation theory. We include estimates of the ap-proximation error.

4 Daniel Potts, Gabriele Steidl, Manfred Tasche

0

0.5

1

1.5

2

2.5

3

3.5

4

0 500 1000 1500 2000 2500 3000 3500 4000 4500

[sec

]

N

[8][9][6]

original

FIGURE 1.1. Time (in seconds) for straightforward computation ofNDFT, NDFT{algorithm in [8], FMM{based NDFT{algorithms in [9]and [6] without consideration of initialization (precomputation) steps.Section 1.3 contains an algorithm for the e�cient computation of thegeneral NDFT (1.1).In Section 1.4, we demonstrate another advantage of Algorithm 1.1,namely its robustness with respect to roundo� errors, a feature which iswell-known from the classical FFT [21, 26].Finally, we apply the NDFT in a fast Bessel transform algorithm.1.2 NDFT for nonequispaced data either in timeor frequency domainLet us begin with the computation of (1.2). Only for notational reasons,we restrict our attention to the case M = N . We have to evaluate the1-periodic trigonometric polynomialf(v) := Xk2IN fk e�2�ikv (1.8)at the nodes wj := vj=N 2 �d (j 2 IN ). We introduce the oversamplingfactor � > 1 and set n := �N .Let ' be a 1-periodic function with uniformly convergent Fourier series.We approximate f by s1(v) := Xl2In gl '(v � ln ): (1.9)

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 5Switching to the frequency domain, we obtains1(v) = Xk2Zd gk ck(') e�2�ikv (1.10)= Xk2In gk ck(') e�2�ikv + Xr2Zdnf0g Xk2In gk ck+nr(') e�2�i(k+nr)vwith gk := Xl2In gl e2�ikl=n; (1.11)ck(') := Z�d '(v)e2�ikv dv (k 2 Zd):If the Fourier coe�cients ck(') become su�ciently small for k 2 ZdnIn andif ck(') 6= 0 for k 2 IN , then we suggest by comparing (1.8) with (1.10) toset gk := � fk=ck(') k 2 IN ;0 k 2 InnIN : (1.12)Now the values gl can be obtained from (1.11) by the reduced inverse d-variate FFT of size �N . If ' is also well-localized in time domain such thatit can be approximated by a 1-periodic function with supp \ �d �2mn �d (2m� n), thenf(wj) � s1(wj) � s(wj) = Xl2In;m(wj) gl (wj � ln ) (1.13)with In;m(wj) := fl 2 IN : nwj �m � l � nwj +mg. For �xed wj 2 �d,the above sum contains at most (2m+ 2)d nonzero summands.In summary, we obtain the following algorithm for the fast computationof (1.2) with O((�N)d log(�N)) arithmetical operations:Algorithm 1.1. (Fast computation of NDFT (1.2))Input: N 2 N, � > 1, n := �N , wj 2 �d, fk 2 C (j; k 2 IN ).0: Precompute ck(') (k 2 IN ), (wj � ln ) (j 2 IN ; l 2 In;m(wj)).1: Form gk := fk=ck(') (k 2 IN ):2: Compute by d{variate FFTgl := n�d Xk2IN gk e�2�ikl=n (l 2 In):3: Set s(wj) := Xl2In;m(wj) gl (wj � ln ) (j 2 IN ) :

6 Daniel Potts, Gabriele Steidl, Manfred TascheOutput: s(wj) approximate value of f(wj) (j 2 IN).In the univariate setting d = 1 , Algorithm 1.1 reads in matrix-vectornotation as ANf � BFnDf ;where B denotes the sparse matrixB := � (wj � ln)�N=2�1 ;n=2�1j=�N=2;l=�n=2 (1.14)and where D := �O j diag(1=(n ck(')))N=2�1k=�N=2 jO�T (1.15)with (N ,(n�N)=2)-zero matrices O.If only few nodes vj di�er from the equispaced nodes j, then the ap-proximating function s1 of f can be alternatively constructed by requiringexact interpolation at the nodes j=n, i.e. f(j=n) = s1(j=n) (j 2 In). Asconsequence we have only to replace ck(') in step 1 of Algorithm 1.1 bythe discrete Fourier sum of ('(l=n))l2In . The approximation of a functionf by an interpolating function s1 which is a linear combinations of trans-lates of one given function ' on a grid was considered in various papers inapproximation theory. See for example [16] and also [4].Let us turn to the gridding algorithm for the fast computation of (1.3). Itseems to be useful to introduce the gridding idea by avoiding the convenientnotation with delta distributions. In short: Forg(x) := Xj2IN fj '(x + wj);we obtain thatck(g) = Xj2IN fj e�2�ikwj ck(') = h(k) ck(') (k 2 Zd)such that h(k) in (1.3) can be computed, if ck(g) is known. Now we deter-mine ck(g) = Z�d Xj2IN fj '(x+ wj) e2�ikx dxapproximately by the trapezoidal ruleck(g) � 1nd Xl2In Xj2IN fj '(wj � ln) e�2�ikl=n ;

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 7which introduces an aliasing error. Furthermore, we replace ' by its trun-cated version , which introduces a truncation error. Obviously, this resultsin a \transposed" Algorithm 1.1, which reads for d = 1 in matrix{vectornotation ATN � DTFnBT :For l 2 In we introduce the index set Jm;n(l) := fj 2 IN : l �m � nwj �l+mg.Algorithm 1.2. (Fast computation of NDFT (1.3))Input: N 2 N, � > 1, n := �N , wj 2 �d, fk 2 C (j; k 2 IN ).0: Precompute ck(') (k 2 IN), (wj � ln ) (l 2 In; j 2 Jn;m(l)).1: Set ~gl := Xj2Jn;m(l) fj (wj � ln ) (l 2 In) :2: Compute by d{variate FFT~ck(g) := n�d Xl2In ~gl e�2�ikl=n (k 2 IN):3: Form ~h(k) := ~ck(g)=ck(') (k 2 IN ):Output: ~h(k) approximate value of h(k) (k 2 IN ).Both algorithms introduce the same approximation errors. By (1.13), theerror splits as follows:E(wj) := jf(wj)� s(wj)j � Ea(wj) +Et(wj)with Ea(wj) := jf(wj) � s1(wj)j and Et(wj) := js1(wj) � s(wj)j. Notethat Ea(wj) and Et(wj) are the aliasing error and the truncation errorintroduced by Algorithm 1.2, respectively. LetE1 := maxj2IN E(wj) ; jjf jj1 := Xk2IN jfkj:Then we obtain immediately by (1.8), (1.10) { (1.12) thatEa(wj) � Xk2IN jfkj Xr2Zdnf0g ����ck+nr(')ck(') ���� (1.16)� jjf jj1 maxk2IN Xr2Zdnf0g ����ck+nr(')ck(') ����and by (1.9), (1.11) { (1.13) thatEt(wj) � jjf jj1 n�d (maxk2IN jck(')j�1) Xl2In j'(wj � ln )� (wj � ln )j:

8 Daniel Potts, Gabriele Steidl, Manfred TascheTo �ll these error estimates with life, we consider special functions ' in thecase d = 1. In [25], we have provedTheorem 1.1. Let (1:2) be computed by Algorithm 1:1 with the dilated, pe-riodized Gaussian bell '(v) := (�b)�1=2 Xr2Ze�(n(v+r))2=band with the truncated version of ', (v) := (�b)�1=2 Xr2Ze�(n(v+r))2=b �[�m;m](n(v + r)) :Here �[�m;m] denotes the characteristic function of [�m;m]. Let � > 1 and1 � b � 2�m(2��1)� . Then ck(') = 1ne�(�kn )2b andEa(wj) � jjf jj1 e�b�2(1� 1� )�1 + �(2�� 1)b�2 + e�2b�2=��1 + �(2�+ 1)b�2�� ;Et(wj) � jjf jj1 2p�b (1 + b2m ) e�b�2(( mb� )2�( 12� )2) ;E1 � 4 jjf jj1 e�b�2(1� 1� ) :The approximation error decreases with increasing b. Thereforeb = 2�m(2�� 1)� (1.17)provides a good choice for b as function of � andm. For the above parameterb, the approximation error and the truncation error are balanced. Since2=pb� contributes also to the decay of Et(wj), we expect that the optimalparameter b lies slightly above the value in (1.17). A. Dutt and V. Rokhlin[8] does not give a criteria for the choice of the parameter b. They determineb by trial computations. Moreover, our error estimate is sharper than theestimate E1 � (b+ 9) jjf jj1 e�b�2(1� 1�2 )=4in [8].For oversampling factor � = 2, the new paper [19] of J. Pelt containsextensive numerical computations to determine the optimal parameter b asfunction of m.More recently, A. J. W. Duijndam and M. A. Schoneville [7] have eval-uated the RMS-error of Algorithm 1.2 with the Gaussian pulse '. Theyfound the same optimal parameter b as in (1.17), which con�rms our re-sult.Estimates for the multivariate setting were given in [11, 7].

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 9Figure 1.2 illustrates our theoretical results by numerical tests. The testswere implemented in MATLAB. The C{programs for Algorithm 1.1 weretaken from [6] and were included by cmex. The programs were tested on aSun SPARCstation 20 in double precision.Let N = 2t. As example we consider the computation off(wj) = 2t�1Xk=0 e�2�ikwj (j 2 I2t) (1.18)with uniformly distributed random nodes wj 2 �� 12 ; 12�. The exact vectorf := (f(wj))2t�1�1j=�2t�1 is given byf(wj) := e�2�iwj(2t�1) � e2�iwj1� e2�iwj :By ~f we denote the result of Algorithm 1.1 with '; as in Theorem 1.1,m := 15; � := 2 and b as in (1.17). LetENDFT(t) := log10(k ~f � fk2)=kfk2) :Figure 1.2 (left) shows the error ENDFT(10) for 10 numerical tests and forvariousm = 6; : : : ; 20. Figure 1.2 (right) presents the computation time (inseconds) for the cascade summation of (1.2) and for Algorithm 1.1. Notethat for t = 13 the fast Algorithm 1.1 requires for less than one secondwhile the direct method based on cascade summation takes more than 3hours.

5 10 15 20

−14

−13

−12

−11

−10

−9

−8

−7

−6

−5

0 2 4 6 8 10 12 14 1610

−3

10−2

10−1

100

101

102

103

104

105

FIGURE 1.2. Left: (m;ENDFT(10)) for m = 6; : : : ; 20. Right: Computationtime in seconds for t = 2; : : : ; 15.Next, we consider centered cardinal B-splines as window functions, whichare in contrast to the Gaussian kernel of compact support such that we have

10 Daniel Potts, Gabriele Steidl, Manfred Tascheno truncation error. Algorithm 1.2 with centered cardinal B-splines andwith a modi�ed third step was originally introduced in [4]. The di�erence inthe third step was motivated by the tight frequency localization of Lemari�e{Battle scaling functions which arise in wavelet theory. See also [25]. WithM2m we denote the centered cardinal B-spline of order 2m.Theorem 1.2. Let (1:2) be computed by Algorithm 1:1 with the dilated, pe-riodized, centered cardinal B-spline'(v) :=Xr2ZM2m(n(v + r)) (m � 1)of order 2m and let = '. Thenck(') =8><>: 1n k = 0 ;1n � sin(k�=n)k�=n �2m otherwiseand for � > 1 and 0 � � � 4m=3,E1 � 4m2m� 1 �N2 ��� (2�� 1)�2m jf j�;1 :Here jf j�;1 denotes the Sobolev-like seminorm jf j�;1 := N=2�1Pk=�N=2 jfkj jkj�.Proof: 1. For 0 < u < 1 and m 2 N, it holds thatXr2Z=f0g� uu+ r�2m � 2� uu� 1�2m + 2 1Xr=2 � uu� r�2m� 2� uu� 1�2m + 2 Z 11 � uu� x�2m dx� 4m2m� 1 � uu� 1�2m :2. Since crn(') = 0 (r 6= 0) andn ck+rn(') = � sin(k�=n)k�=n+ r��2m = � sin(k�=n)k�=n �2m � k�=nk�=n+ r��2m= n ck(') � k=nk=n+ r�2m ;we obtain by (1.16) thatE1 � 4m2m� 1 N=2�1Xk=�N=2(k 6=0) jfkj jkj� n�� jk=nj2m��(k=n� sgn(k))2m :

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 11The functions h+(u) := u2m��=(u � 1)2m and h�(u) := u2m��=(u + 1)2m aremonotonically increasing for u 2 [0; 12 ] and � � 4m=3. Thus, since jkj � N=2, weobtain the assertion.By Theorem 1.2, we have for � = 0 thatE1 � 4m2m� 1 (2�� 1)�2mjjf jj1 :If the values fk are Fourier coe�cients of a smooth function such that jf j�;1does not increase with N !1, then the estimates with larger values of �may be useful. For example, we obtain for � = � = m = 2 by Theorem 1.2that E1 � �23�5 N�2 jf j2;1 :Multivariate estimates were given in [11, 4].In various papers, other window functions than the Gaussian pulse orcentered cardinal B{splines were considered:- prolate spheroidal functions and Kaiser-Bessel functions [15],- Gaussian pulse tapered with a Hanning window [7],- Gaussian kernels combined with sinc kernels [19],- special optimized windows [15, 7].Numerical results demonstrate that the approximation error (as functionof the speed of the computation) can be further improved by using thesefunctions.1.3 NDFT for nonequispaced data in time andfrequency domainThe following algorithm for the fast computation of the general NDFT (1.1)(with M = N) turns out to be a combination of the gridding approach to(1.3) and of our approach to (1.2). Moreover, in order to apply again analiasing formula, a periodization procedure becomes necessary. In order toform a-periodic functions, a parameter a comes into the play.By '1 2 L2(Rd ) we denote a su�ciently smooth function with Fouriertransform '1(v) := ZRd '1(x)e�2�ivxdx 6= 0

12 Daniel Potts, Gabriele Steidl, Manfred Taschefor all v 2 N�d. Then we obtain forG(x) := Xk2IN fk '1(x� xk)that G(v) = Xk2IN fk e�2�ixkv '1(v)and consequently f(vj) = G(vj)'1(vj) (j 2 IN ):Thus, given '1(vj), it remains to compute G(vj).Let n1 := �1N (�1 > 1), m1 2 N (2m1 � n1). We introduce the parametera := 1 + 2m1n1 and rewrite G(v) asG(v) = Xk2IN fk ZRd '1(x� xk) e�2�ixv dx= Xk2IN fk Za�d Xr2Zd'1(x+ ra� xk) e�2�i(x+ra)v dx: (1.19)Discretization of the integral by the rectangular rule leads toG(v) � S1(v) = Xk2IN fk n�d1 Xj2Ian1 Xr2Zd'1( jn1 + ra � xk) e�2�i( jn1+ra)v:(1.20)Now we approximate the function '1 by a function 1 with supp 1 �2m1n1 �d. Then the third sum in (1.20) contains only one nonzero summandfor r = 0. Changing the order of the summation, we obtainS1(v) � S2(v) := n�d1 Xt2Ian1 Xk2IN fk 1( tn1 � xk)! e�2�itv=n1 :After the computation of the inner sum for all t 2 Ian1 , we arrive at com-putation problem (1.2), which can be solved in a fast way by Algorithm 1.1,where the corresponding window functions and parameters are indicatedby the index 2. We summarize:Algorithm 1.3. (Fast computation of NDFT (1.1))Input: N 2 N, �1 > 1, �2 > 1, n1 := �1N , a := 1 + 2m1n1 , n2 := �1�2aN ,xk 2 �d, vj 2 N�d, fk 2 C (j; k 2 IN ).0: Precompute '1(vj) (j 2 IN ), 1( tn1 � xk) (k 2 IN ; t 2 Ian1;m1 (xk)),ct('2) (t 2 Ian1), 2( vjn1 � ln2 ) (j 2 IN ; l 2 In2;m2( vjn1 )).

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 131: Compute F (t) := Xk2IN fk 1( tn1 � xk) (t 2 Ian1) :2: Form gt := F (t)=ct('2) (t 2 Ian1):3: Compute by d{variate FFTgl := n�d2 Xt2Ian1 gt e�2�itl=n2 (l 2 In2 ):4: Form s(vj) := n�d1 Xl2In2;m2 (vj=n1) gl 2( vjn1 � ln2 ) (j 2 IN ) :5: Form S(vj) := s(vj)='1(vj) (j 2 IN).Output: S(vj) approximate value of f(vj ) (j 2 IN ).The Algorithm 1.3 requires O((�1�2aN)d log(�1�2aN)) arithmetical op-erations. The approximation error is given byE(vj) � E1(vj) +E2(vj) +E3(vj)with E1(vj) := jf(vj) � S1(vj)'1(vj) j; E2(vj) := jS1(vj)�S2(vj )'1(vj) j; and E3(vj) :=jS2(vj)�s(vj)'1(vj) j : The error E3(vj) is the product of the error of Algorithm 1.1and j'1(vj)j�1. The cut-o� error E2(vj) behaves like the truncation errorin Algorithm 1.1. The error E1(vj) arising from the discretization of theintegral (1.19) can be estimated by an aliasing argument [11].The following Table 1.1 (see also [10, 11]) contains the relative approxi-mation error maxj2IN jf(vj)� S(vj)j=maxj2IN jf(vj) :introduced by Algorithm 1.3 for tensor products of Gaussian bells '1 and'2, for N := 128, m = m1 = m2, a := NN�m , �1 := 2a , �2 := 2 and forrandomly distributed nodes xj and vk=N in �2. By the choice of �1; �2and a, the main e�ort of the algorithm consists in the bivariate FFT ofsize 4N = 1024. The third column of Table 1.1 contains the error of Al-gorithm 1.3, if we simply set a = 1 and �1 = �2 = 2. This change ofparameters in uences only the �rst step of the algorithm. (A similar erroroccurs, if we consider 1 as 1-periodic function.) Table 1.1 demonstratesthe signi�cance of the parameter a.1.4 Roundo� errorsBeyond the approximation error, the numerical computation of Algorithm1.1 involves roundo� errors. In this section, we will see that similar to the

14 Daniel Potts, Gabriele Steidl, Manfred Taschem a = NN�m a = 15 5.96608e-06 0.01808507 5.44728e-08 0.03183769 1.07677e-09 0.054144511 3.31061e-11 0.090643913 1.26030e-12 0.150730015 2.16694e-13 0.2500920TABLE 1.1. Approximation error of Algorithm 1:3 for N := 128,a := NN�m , �1 := 2a , �2 := 2 and for a := 1, �1 = �2 := 2, respectively.classical FFT [21, 14], our algorithm is robust with respect to roundo�errors. In the following, we use the standard model of real oating pointarithmetic (see [14], p. 44): For arbitrary �; � 2 R and any operation � 2f+;�;�; =g the exact value � � � and the computed value (� � �) arerelated by (� � �) = (� � �) (1 + �) (j�j � u) ;where u denotes the unit roundo� (or machine precision). In the case ofsingle precision (24 bits for the mantissa (with 1 sign bit), 8 bits for theexponent), we have u = 2�24 � 5:96� 10�8and for double precision (53 bits for the mantissa (with 1 sign bit), 11 bitsfor the exponent) u = 2�53 � 1:11� 10�16:Since complex arithmetic is implemented using real arithmetic, the com-plex oating point arithmetic is a consequence of the corresponding realarithmetic (see [14], pp. 78 { 80): For arbitrary �; � 2 C , we have (� + �) = (� + �) (1 + �) (j�j � u) ; (1.21) (� �) = � � (1 + �) (j�j � 2p2u1� 2u) : (1.22)In particular, if � 2 R [ iR and � 2 C , then (��) = �� (1 + �) (j�j � u) : (1.23)To simplify the following error analysis, we assume that all entries of AN ,B, Fn and D were precomputed exactly. Moreover, we restrict our atten-tion to real input vectors f 2 RN . If we form f := ANf by conventionalmultiplication and cascade summation (see [14], p. 70), then we obtain by(1.21) and (1.23) the componentwise estimatej (f)j � fj j � (dlog2Ne + 1)u1� (dlog2Ne+ 1)u jjf jj1

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 15and by taking the Euclidean normk (f)� fk2 � �uN (dlog2Ne+ 1) + O(u2)� kfk2 :In particular, we have for f := FNf thatk (FNf)� FNfk2 � �uN (dlog2Ne+ 1) + O(u2)� kfk2 :If we compute f = FNf (f 2 RN , N power of 2) by the radix{2 Cooley{Tukey FFT, then, following the lines of the proof in [26] and using (1.21){ (1.22), the roundo� error estimate can be improved by the factor pN ,more preciselyk (FNf)� FNfk2 � �u (4 +p2)pN log2N + O(u2)� kfk2 : (1.24)The following theorem states that the roundo� error introduced by Algo-rithm 1.1 can be estimated as the FFT error in (1.24) up to a constantfactor, which depends on m and �.Theorem 1.3. Let m;N 2 N and let n := �N (� > 1) be a power of 2with 2m� n. Let h be a nonnegative real{valued even function, which decreasesmonotonically for x � 0, and let'(x) := Xr2Zh(n(x+ r)) ; (x) := Xr2Z(�[�m;m]h)(n(x+ r)) :Suppose that ' has a uniform convergent Fourier expansion with monotone de-creasing absolute values of Fourier coe�cientsck(') = 1n h(2�kn ) (k 2 Z) :Let the nodes wj := vjN 2 [� 12 ; 12 ), wj � 1 (j 2 IN) be distributed such that each\window" ��mn + ln ; mn + ln� (l 2 In) contains at most =� nodes. If (1.2) iscomputed by Algorithm 1.1 with the above functions '; , i.e.,~f := B FnDf (f 2 RN ) ;where D 2 C n;N and B 2 RN;n are determined by (1.14) { (1.15), then theroundo� error of Algorithm 1.1 can be estimated byk (f)� ~fk2 � �p �u(4 +p2)pN (log2N + log2 �+ 2m+ 14 +p2 ) +O(u2)� kfk2with � := (h2(0) + jjhjj2L2 )1=2jh(�=�)j :

16 Daniel Potts, Gabriele Steidl, Manfred TascheLet us call an algorithm for the computation of the NDFT (1.2) robust, iffor all f 2 RN there exists a positive constant kN with kN u� 1 such thatjj ( ~f)� ~f jj2 � (kNu+O(u2)) jjf jj2 :Then, by Theorem 1.3, Algorithm 1.1 is robust.Proof: 1. First, we estimate the spectral norms of D and B ([14], p. 120). Byassumption and by (1.15), we see immediately thatkDk2 = maxk2IN jn ck(')j�1 = (n jcN=2(')j)�1 = jh(�=�)j�1 : (1.25)Since is even and monotonically decreasing for x � 0, it is easy to check theintegral estimate1n Xl2In 2(wj � ln ) � 1n 2(0) + Z 1=2�1=2 2(x) dx :Then it follows by de�nition of thatXl2In 2(wj � ln ) � h2(0) + nZ m=n�m=n h2(nx) dx� h2(0) + jjhjj2L2 : (1.26)By de�nition (1.14) of the sparse matrixB = (bj;k)N=2�1;n=2�1j=�N=2;k=�n=2 ; bj;k := (wj � kn ) ;we get for the j{th component (By)j of By (y = (yk)n=2�1k=�n=2 2 C n ) thatj(By)j j2 � 2mXr=1 jbj;kr j jykr j!2 (bj;kr > 0; kr 2 f�n=2; : : : ; n=2 � 1g)� 2mXr=1 b2j;kr! 2mXr=1 y2kr! :By (1.26), we have2mXr=1 b2j;kr � Xk2In (wj � kn )2 � h2(0) + jjhjj2L2such that j(By)j j2 � (h2(0) + jjhjj2L2 ) 2mXr=1 y2kr : (1.27)

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 17By assumption, each \window" [�mn + ln ; mn + ln ) (l 2 In) contains at most =�nodes wj ; wj � 1 (j 2 IN ). Therefore each column of B contains at most =�nonzero entries such that by (1.27)kByk22 = N=2�1Xj=�N=2 j(By)j j2 � � (h2(0) + jjhjj2L2 ) kyk22and consequently kBk2 � q � (h2(0) + jjhjj2L2 )1=2 =: ~� : (1.28)2. Next, it is easy to check that by (1.23) and (1.25)k (Df)�Dfk2 � u jh(�=�)j�1 kfk2 : (1.29)From (1.25) it follows thatk (Df)k2 � k (Df)�Dfk2 + kDfk2 � jh(�=�)j�1(u+ 1) kfk2 : (1.30)3. Set y := (Fn( (Df)) and y := FnDf . Then we can estimateky � yk2 � ky � Fn( (Df))k2 + kFn( (Df))� FnDfk2such that by (1.24), (1.29) and (1.30)ky � yk2 � �u(4 +p2)pn log2 n+O(u2)� k (Df)k2+ pn k (Df)�Dfk2� jh(�=�)j�1 �u(4 +p2)pn log2 n+pnu+O(u2)� kfk2: (1.31)4. Finally, we consider the error between ( ~f) := (By) and ~f := By. By (1.28)and (1.31), we obtaink ( ~f)� ~fk2 � k (By)�Byk2 + kB(y � y)k2� k (By)�Byk2 + ~� jh(�=�)j�1 ��u(4 +p2)pn log2 n+pnu+O(u2)� kfk2 : (1.32)By (1.21), (1.23) and (1.14), it follows from [14], p. 76 thatj (By)�Byj � 2mu1� 2mu B jyjwith jyj := (jykj)n=2�1k=�n=2 and consequently by (1.28) thatk (By)�Byk2 � 2mu1� 2mu kBk2 kyk2� �2m~� u + O(u2)� kyk2 :

18 Daniel Potts, Gabriele Steidl, Manfred TascheBy (1.30) and (1.25), we obtainkyk2 � ky � yk2 + kyk2 = kFnDfk2 +O(u) kfk2� �pn jh(�=�)j�1 +O(u)� kfk2 :Thus k (By)�Byk2 � �2m ~�pn jh(�=�)j�1 u+O(u2)� kfk2 : (1.33)Together with (1.32) this yields the assertion.Note that � 2m for \uniformly distributed" nodes wj .Finally, we con�rm our theoretical results by numerical experiments. Weuse the same setting as in Section 1.2. Further, let ~fC 2 C 2t denote thevector, which was evaluated by cascade summation of the right{hand sideof (1.18), and let EC(t) := logt(k ~fC � fk2)=kfk2) :Figure 1.3 (left) shows the error EC(t) for 10 numerical tests with var-ious random nodes wj as function of the transform length N = 2t. Forcomparison, Figure 1.3 (right) presents the corresponding error ENDFT(t)introduced by NDFT{Algorithm 1.1.0 2 4 6 8 10 12 14 16

−17

−16

−15

−14

−13

−12

−11

−10

0 2 4 6 8 10 12 14 16−17

−16

−15

−14

−13

−12

−11

−10

FIGURE 1.3. Left: (t; EC(t)) for t = 1; : : : ; 13. Right: (t; ENDFT(t)) fort = 1; : : : ; 15.

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 191.5 Fast Bessel transformIn this section, we apply the NDFT for a fast Bessel transform. We areinterested in a fast algorithm for the computation off(n) := 1Z0 f(x) Jn(x) dx (n 2 N0 ) ; (1.34)where Jn(x) := 1Xk=0(�1)k (x=2)n+2kk! (n+ k)! (x 2 R)is the Bessel function (of �rst kind) of order n. Let f be a real{valued,compactly supported function with supp f � [0; a] (0 < a < 1). Usingthe formula (see [1], p. 361)e�iq cos t = 2 1Xk=0 0 (�1)k J2k(q) cos(2kt) + 2i 1Xk=0(�1)k J2k+1(q) cos(2k+1)twith 1Xk=0 0 ak := 12 + 1Xk=1 ak ;we obtain for x 2 [�1; 1] and q 2 R thate�iqx = 2 1Xk=0 0 (�1)k J2k(q)T2k(x) � 2i 1Xk=0(�1)k J2k+1(q)T2k+1(x) :Now multiplication with f(q) and integration with respect to q yieldsh(x) := aZ0 f(q) e�iqx dq (1.35)= 2 1Xk=0 0 (�1)k f(2k)T2k(x) � 2i 1Xk=0(�1)k f(2k + 1)T2k+1(x) :Note that (Re h)(x) = (Re h)(�x) ; (Imh)(x) = � (Imh)(�x) :Finally, orthogonality of the Chebyshev polynomials Tk(x)1Z�1 w(x)Tk(x)Tl(x) dx = 8<: � if k = l = 0;�=2 if k = l 6= 0;0 if k 6= l

20 Daniel Potts, Gabriele Steidl, Manfred Taschewith w(x) := (1� x2)�1=2 impliesf(2k) = (�1)k� 1Z�1 w(x) (Re h)(x)T2k(x) dx; (1.36)f(2k + 1) = (�1)k+1� 1Z�1 w(x) (Im h)(x)T2k+1(x) dx: (1.37)We approximate the integrals (1.35) { (1.37) by the following quadratureformulas: First, we compute (1.35) by the Simpson rule on the Chebyshevgrid fxl := cos (2l+1)�2N ; l = 0; : : : ; N=2� 1g, i.e.,h(xl) � hl := a3N NXj=0 !jf(ajN ) e�ijaxl=N (l = 0; : : : ; N=2� 1) : (1.38)with wj :=8<: 1 j = 0; N ;4 j = 2k � 1 (k = 0; : : : ; N=2) ;2 j = 2k (k = 0; : : : ; N=2� 1) :We realize the NDFT (1.38) by Algorithm 1.1 in O(N logN) arithmeticaloperations. Again, we choose '; as in Theorem 1.1 with m := 15; � := 2and b in (1.17). Next, we compute (1.36) and (1.37) by the trapezoidal rule,which results for k = 0; : : : ; N=2� 1 inf(2k) � ~f2k := (�1)kN N�1Xl=0 (Rehl) cos 2k(2l+ 1)�2N ; (1.39)f(2k + 1) � ~f2k+1 := (�1)k+1N N�1Xl=0 (Imhl) cos (2k + 1)(2l + 1)�2N :(1.40)For the fast computation of (1.39) and (1.40) in O(N logN) arithmeticaloperations we use the fast cosine transform of type II (DCT{II) proposedin [24, 3]. In summary, we obtain the following algorithm for the fast com-putation of the Bessel transform in O(N logN) arithmetical operations:Algorithm 1.4. (Fast Computation of Bessel transform (1.34))Input: N := 2t, f(ja=N) 2 R (j = 0; : : : ; N).1: Compute hl by (1:38) with Algorithm 1:1.2: Set Re (hl+N=2�1) := Re (hN=2�l), Im(hl+N=2�1) := �Im(hN=2�l) (l = 1; : : : ; N=2).3: Compute (1:39) { (1:40) by fast DCT{II.

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 217 8 9 10 11 12 13 14 15 16

−9

−8

−7

−6

−5

−4

−3

−2

−1

0

6 7 8 9 10 11 12 13−11

−10

−9

−8

−7

−6

−5

−4

−3

FIGURE 1.4. Left: (t; E(t)) for t = 8; : : : ; 15 and f in (1.41). Right:(t;E(t)) for t = 7; : : : ; 12 and f in (1.43).Output: ~fn approximate value of f(n) (n = 0; : : : ; N � 1).We test Algorithm 1.4 by the following examples:1. Consider f(x) := e��x �[0;a](x) (1.41)with a := 2000 and � = 0:01. By [17], p. 772 we haveZ 10 e��xJn(x) dx = (1 + �2)�1=2 (p1 + �2 + �)�n ;such that we can approximate f(k) byf(k) � fk := (1 + �2)�1=2 (p1 + �2 + �)�k :By ~f , we denote the vector computed by Algorithm 1.4. Figure 1.4 (left)shows the relative errorE(t) := log10 (k ~f � fk2)=kfk2 : (1.42)2. Let f(x) := �[0;a](x) (1.43)with a := 100. Then we have by [1], p. 480 thatZ a0 Jn(x) dx = 2 1Xl=0 J2l+n+1(a) :We choose M such that J2k+n+1(100) < 10�16 and setf(k) � fk = 2 MXl=0 J2l+k+1(100) :Figure 1.4 (right) shows the corresponding error (1.42).

22 Daniel Potts, Gabriele Steidl, Manfred TascheReferences[1] M. Abramowitz and J. A. Stegun, Handbook of Mathematical Func-tions, Dover Publ., New York, 1972.[2] C. Anderson and M. D. Dahleh, Rapid computation of the discreteFourier transform, SIAM J. Sci. Comput. 17, 913 { 919, 1996.[3] G. Baszenski and M. Tasche, Fast polynomial multiplication and con-volutions related to the discrete cosine transform, Linear Algebra Appl.252, 1 { 25, 1997.[4] G. Beylkin, On the fast Fourier transform of functions with singular-ities, Appl. Comput. Harmon. Anal. 2, 363 { 381, 1995.[5] A. Brandt, Multilevel computations of integral transforms and particleinteractions with oscillatory kernels, Comput. Phys. Comm. 65, 24 {38, 1991.[6] J. O. Droese, Verfahren zur schnellen Fourier{Transformation mitnicht�aquidistanten Knoten, Master Thesis, TH Darmstadt, 1996.[7] A. J. W. Duijndam and M. A. Schonewille, Nonuniform fast Fouriertransform, Preprint, Univ. Delft, 1998.[8] A. Dutt and V. Rokhlin, Fast Fourier transforms for nonequispaceddata, SIAM J. Sci. Statist. Comput. 14, 1368 { 1393, 1993.[9] A. Dutt and V. Rokhlin, Fast Fourier transforms for nonequispaceddata II, Appl. Comput. Harmon. Anal. 2, 85 { 100, 1995.[10] B. Elbel, Mehrdimensionale Fouriertransformation f�ur nicht �aqui-distante Daten, Master Thesis, TU Darmstadt, 1998.[11] B. Elbel and G. Steidl, Fast Fourier transform for nonequispaced data,In: Approximation Theory IX, C. K. Chui and L. L. Schumaker (eds.),Vanderbilt University Press, Nashville, 1998.[12] H. G. Feichtinger, K. H. Gr�ochenig and T. Strohmer, E�cient numer-ical methods for nonuniform sampling theory, Numer. Math. 69, 423{ 440, 1995.[13] L. Greengard and V. Rokhlin, A fast algorithm for particel simulation,J. Comput. Phys. 73, 325 { 348, 1987.[14] N. J. Higham, Accuracy and Stability of Numerical Algorithms, SIAM,Philadelphia, 1996.[15] J. I. Jackson, Selection of a convolution function for Fourier inbersionusing gridding, IEEE Trans. Medical Imaging 10, 473-478, 1991.

Chapter 1. Fast Fourier transforms for nonequispaced data: A tutorial 23[16] K. Jetter and J. St�ockler, Algorithms for cardinal interpolation usingbox splines and radial basis functions, Numer. Math. 60, 97 { 114,1991.[17] M. A. Lawrentjew und B. W. Schabat, Methoden der komplexen Funk-tionentheorie, Deutscher Verlag der Wissenschaften, Berlin, 1967.[18] G. Newsam, Private communication.[19] J. Pelt, Fast computation of trigonometric sums with application tofrequency analysis of astronomical data, Preprint, 1997.[20] W. H. Press and G. B. Rybicki, Fast algorithms for spectral analysisof unevenly sampled data, Astrophys. J. 338, 227 { 280, 1989.[21] G. U. Ramos, Roundo� error analysis of the fast Fourier transform,Math. Comp. 25, 757 { 768, 1971.[22] M. Rauth and T. Strohmer, Smooth approximation of potential �eldsfrom noisy scattered data, Preprint, Univ. Vienna, 1997.[23] Sramek, R. A. and F. R. Schwab, Imaging, in Astronomical Society ofthe Paci�c Conference, Vol. 6, R. Perley, F. R. Schwab and A. Bridle(eds.), 1988, 117 { 138.[24] G. Steidl, Fast radix{p discrete cosine transform, Appl. Algebra Engrg.Comm. Comput. 3, 39 { 46, 1992.[25] G. Steidl, A note on fast Fourier transforms for nonequispaced grids,Adv. Comp. Math. (in print).[26] P. Y. Yalamov, Improvements of some bounds on the stability of fastHelmholtz solvers, Preprint, Univ. Rousse, 1998.