A table of analytical discrete Fourier transforms

A table of analytical discrete Fourier transforms

MATHEMATICS ELSEVIER Applied Numerical Mathematics 21 (1996) 375-384 A table of analytical discrete Fourier transforms William L. Briggs a,*, Van E...

448KB Sizes 0 Downloads 77 Views

MATHEMATICS

ELSEVIER

Applied Numerical Mathematics 21 (1996) 375-384

A table of analytical discrete Fourier transforms William L. Briggs a,*, Van E m d e n Henson b,l Mathematics Department, University of Colorado at Denver, Denver, CO 808204, USA h Mathematics Department, Naval Postgraduate School, Monterey, CA 93943, USA

Abstract While most people rely on numerical methods (most notably the fast Fourier transform) for computing discrete Fourier transforms (DFTs), there it is still an occasional need to have analytical DFTs close at hand. Such a table of analytical DFTs is provided in this paper, along with comments and observations, in the belief that it will serve as a useful resource or teaching aid for Fourier practitioners.

1. Introduction

The table of discrete Fourier transforms (DFTs) that comprises most of this paper was assembled using analytical methods. The table is not exhaustive, since a good symbolic package or additional patience could certainly produce a few more DFT pairs. However it does include many commonly encountered input sequences. A few words of explanation are in order. We assume that a function f is sampled on the interval I-A~2, A/2] at N equally spaced points to produce the sequence fn, where n = - N / 2 + 1 : N/2. Of utmost importance is the fact that, when extended, the sequence fn is N-periodic. This means that if the A-periodic extension of f is continuous at x = +a/2, then f i N / 2 = f(±A/2). On the other hand, if the A-periodic extension of f is not continuous at x = +A/2, then f~N/2 must be defined as the average value of f(+A/2). Similarly, at any point of discontinunity in [-A/2, A/2], the sequence of samples fn must be assigned the average of the function values across the discontinuity. This proviso is given the name AVED: average values at endpoints and discontinuities, and is noted in the table. We can now define the DFT. The forward DFT is given by

U/2 Fk = -~ E fnWNnk n=-N/2+l 1

* Corresponding author. E-mail: [email protected]. 1E-mail: [email protected]. 0168-9274/96/$15.00 Copyright © 1996 Elsevier Science B.V. All rights reserved SSDI 0 1 6 8 - 9 2 7 4 ( 9 6 ) 0 0 0 1 8-9

376

W.L. Briggs, V.E. Henson / Applied Numerical Mathematics 21 (1996) 375-384

for k = - N / 2 + 1 : N / 2 , where i is the imaginary unit and wN - e i2~r/N, which defines another N-periodic sequence Fk. The choice of using a centered interval is somewhat arbitrary. Because of the periodicity of fn and Fk, the DFT can be defined on any N consecutive points. For the record, the corresponding inverse DFT is given by N/2 k=-N/2+l

for n = - N / 2 + 1 : N/2. The table also lists the Fourier coefficients of each input function on the interval [-A/2, A/Z], A/2

ck = ~l f

f(x)e-i27rkz/Adx

for k = 0 , + l , + 2 , . . . ,

-A/2

in order to compare Fk with ck. Each entry of the table is arranged as follows. Discrete input name

f,~, nEAr

Graph of f,~

ff k , k E Jkf

Graph of Fk

Ick - Fkl, k ~ A; Continuum input name

f(x), x c I

Graph of f ( x )

ck, k E Z

Graph of lck - Fk]

Comments

max [ck - Fk[

The first colunm has two boxes. The upper box gives the name of the input, below which are graphs of the real and imaginary parts of the discrete input sequence. The lower box contains the name of the continuum input, and the corresponding continuum input graphs. The middle column has six boxes containing, in order from top to bottom, the formula of the input sequence fn; the analytic N-point DFT output Fk; a measure of the error Ick - Fk]; the formula of the continuum input function f ( x ) ; the formula for the Fourier coefficients ck; an entry for comments, perhaps the most important of which is the AVED warning. This means that average values at endpoints and discontinuities must be used if the correct DFT is to be computed. The third column consists of two boxes. The upper box displays graphically the real and imaginary parts of the DFT. The lower box gives the maximum error max Ick - Fk], and displays graphically the error [ck - Fk] for a small (24-point) example. A few comments and observations on the entries of the table might be useful. • Symmetry. The well-known symmetries of the DFT and the Fourier coefficients are evident in the entries of the table: if fn is a real, even sequence ( f - n = fn), then the resulting DFT sequence is also real and even; if fn is a real, odd sequence (f_n = -fn), then the resulting DFT sequence is pure imaginary and odd. • Exact DFTs. The DFT is exact, meaning it reproduces the first N Fourier coefficients exactly, in several entries of the table. As shown in cases 1-4, if the input sequence is periodic and does not

W.L. Briggs, VE. Henson /Applied Numerical Mathematics 21 (1996) 375-384

377

consist of frequencies greater than COmax: N/A cycles per unit length (or time), then the DFT is exact. This condition is just the Nyquist sampling condition. • Errors. The table gives estimates of the difference ]ck - Fk[ which should be interpreted in an asymptotic sense. If Ick - Fkl is given a s C N -p, the meaning is that lim [c~ - Fkl _ C, N--+~ NP where 0 < C < cx~ is a constant. These estimates are obtained by a liberal use of Taylor series for large N. This asymptotic measure of error conforms with the pointwise errors in the DFT which can be obtained from the Poisson summation formula. Roughly speaking, if the periodic extension of f has p - 1 continuous derivatives, and f(P) is bounded and piecewise monotone, then C

Ick- Fkl

Np+I

for k = - N / 2 + l :N/2,

where C is a constant for all N [1]. The case p = 0 corresponds to functions f whose periodic extension is only piecewise continuous. A similar bound holds for DFT approximations of the Fourier transform of compactly supported functions. For example, cases 5, 6, 6c, 7, 9, 10, 10a, 11, 13, 14, and 15b of the table are piecewise continuous functions (p = 0), and all show asymptotic errors of the form C N - 1 or C k N -2. The latter term means that for the low frequency coefficients ([kl ,-~ O(1)), the error can decrease a s C N - 2 ; however, for the high frequency coefficients (Ikl ~ O(N/2)), the error decreases as C N -1. In cases 6b, 6d, 7, 8, 12, and 15a, the derivative of the input function is piecewise continuous (p = 1), and the errors decrease a s C N -2. For input functions with higher degrees of smoothness, analytical DFTs are difficult to compute, however numerical experiments confirm the error estimates for larger values of p.

2. The table of DFTs

The following notational conventions hold throughout the table of DFTs:

A/'= { - N / 2 + 1,... , N / 2 } ,

77 = [-A/2, A/2],

Z= {0,+1,+2,...}; (

CON =

e i(27r/N),

27rk Ok -- N '

5(k)= ~l' [ 0,

ifk=O, if k # 0;

(

~N(k) = ~ 1, if k = 0 or a multiple of N,

( 0,

otherwise;

AVED = average values at endpoints and discontinuities, C is a constant independent of k and N.

W.L. Briggs, VE. Henson /Applied Numerical Mathematics 21 (1996) 375-384

378

Table of DFTs

Discrete input name

fn, n E N

Graph of f,~

Fk, k E N

Graph of Fk

Ick- Fkl,

kEN

Continuum input name

f(x), x

I

Graph of f ( x )

Ck, k E Z

Graph of Ick - Fkl

Comments

max [ck - Fk[

6(n - no)

Fk:

(1/N)WN"°k

T~:

Exact

77: Jlll'tlllii~lI' ,llll

1. Impulse 7~:

il i

77:

E

I,

,lih ,11 ,III, i Jill'

1. None

no E

N

2a. Paired impulses

½(~(,~ - ,~,) + ,(n + n,,))

Fk:

7~:

( l / N ) cos(2rnok/N)

~:

Exact

77:

lil!

Z:

I,

,I[I,

LIII' i 'III~

,11

2a. None

rm E N

2b. Paired impulses

½(~(n + no) - ~(n - no))

Fk:

7~:

(i/N) sin(21rnok/N)

7~:

Exact

77: IIIll ,lll,illlll '1111

Z:

il

2b. None

no

EN

W.L. Briggs, V.E. Henson /Applied Numerical Mathematics 21 (1996) 375-384 3. Complex harmonic .1~: II

till'llillll[llIII

Z: l]]It

it1111 ~III'i tlll'

3. Complex harmonic

Fk and ck: ~N (k - ko) (periodic)

7¢:

Exact

22

i

ei27rkox/A ~(k - k,,)

Z:

ko E Z

m a x Ick - Fkl = 0

3a. Constant

1

Fk and ck:

7¢:

IIIIII]IHIIII[IIIIIHII

~N (k)

72

Exact

3a. Constant

1

T~:

(periodic) Z:

i

Z:

Case 3 : k a y = 0

max Ick - Fkl = 0

4a. Cosine harmonic

cos(27rkon/N)

Fk and ak:

½(3N(k - k,,) + G ( k + k,,))

~:

Z:

Exact

Z:

4a. Cosine harmonic

cos( 2rr~z / A )

7~: I1 ~/11t IIill till'

lit

I11

½(~(k - k,,) + ~(k + k,,))

22

ko E Z

m a x Ick - F k l = 0

4b. Critical mode

cos(.n) = ( - l ) ~

Fk and ck :

7Z: f/lIlllIl]lilllllllllllI

~ g ( k - ½N)

7Z:-

z:

Exact

Z:

4b. Critical mode

cos(TrNx/A)

i

t(5(k- ½N) + 5(k + ½N)) Z:

Case 4a: ka = i1 N

m a x Ick - Fk I = 0

379

W.L. Briggs, V.E. Henson /Applied Numerical Mathematics 21 (1996) 375-384

380

4c. Sine harmonic

sin( 27rkon / N )

7~: Illll ~111~!11111 '111'

( i / N ) ( 6 N ( k + ko) - 6N(k - ko))

Z:

Exact

4c. Sine harmonic

sin( 27rkox / A )

Fk and ck :

Z:

( i / N ) ( 6 ( k + ko) - 6(k - ko)) ko E Z

27:

max [ck - Fk [ = 0

5. Complex wave 7-~:

tll,

,lil,

'111' i '111'

Fk and ck:

,Ill,

sin(Tr(k - ko)) sin(2r(k - ko)/N) 2N sin2(Tr(k - k~,)/N)

g: Illl fllJiIIII Jil, l 5. Complex wave

, ,.i,I1,,.,

7~:

C ( k - ko)N -z

,

Z:

ei2rcko:c/A

]ck - Fkh

sin(rr(k - ko))

illlil, .... i .......

ko = 2.4

ill

~(k - k,,)

6a. Cosine ,11 I[111, i '~lllll

AVED, ko ~ Z

m a x ~ 1 0 -2, N = 2 4

cos ( ~rkon / N )

Fk and ck:

cos(Trk)sin(zrko/2) ( sin0+ 4N

sin0_ sin 2 0 _ / 2 ]

\ sin 2 0+/2

C k o N -2

Z:

2-:

cosQrkox / A )

6a. Cosine

m

,11,

7~:

[ck - Fkh

IIIIIrlll~tilillllllltll

2ko cos(Trk) sin('xko/2) "/r(4k 2 - k~)

Z:

/~, ~ Z, 0+ = zr(2k + ko)/N

max~

6b. Half cosine

cos(~n/U)

Fk and ck:

7~:

..,,~lllllllllllll~,,,. :~

6b. Half cosine

Z:

sin0_

"~

sin20_/2]

C N -2

Z:

7~:

cos(Trk) { sin0+ 4N \sinZ 0+/2

i

cos(~)

ko = 2.4

10 -3 , N = 2 4

7~:

~i f

Z:

on (_l, ~1

2cos(Trk) 7r(4k 2 - 1) Case 6a: 0~ = 7r(2k :t: 1 ) / N , ko = 1, A = 1

Ick - ~1 IIIIltl~l~ifll~llilllll

max ~ 10 -3, N = 24

W.L. Briggs, V.E. Henson / Applied Numerical Mathematics 21 (1996) 375-384

sin(rrkon/N)

6c. Sine "R.: ' ' l l l l t l l ' i

i,ll[ll]r,

Fk and ck:

icosQrk)sin(rrko/2) ( sine+ 4N

\ ~ / 2

sine_ "~ + sit ~-/2 )

Z:

sin( Trl~,x / A )

6c. Sine

il'"

Ick - Fk[, ko = 2.4

• 4k cos(rrk) sin(rrko/2) 1

7~: • ,li

C k N -2

2;:

381

111[I .....

::.... rrTTIIl]

,n-(4k2 -- k 2)

Z:

AVED, k,) ~ Z, 0± = rr(2k + ko)/N

max ,~ 10 -2, N = 24

6d. E v e n sine

I sin(2rrn/N)l

Fk and ck:

~ : ,,lllIIIl,, ,,,111111,,

1 +cos(Trk) ( sin0+ 4N \ sin 2 O+/2

sin0_ "~ sin 2 O_/2 ,/

C N -2

27:

i

i

Z:

6d. Even sine

I sin(27rx/A)l

7~:

I 1 + cos(Trk) rr 1 - k2

2;:

Oj: = (27r/N)(k ± 1), c:~, = F±, = 0

max ~ 10 -3, N = 24

7. Linear

n/U

Fk and ck:

Fo = 0, Fk -- icos(~rk) sinOk 4 N sin2 0k/2

77.:

i ,,,,,till[

~: Ilia'"'"!

I~k - Fkl IllllitllPT[

C k N -2

Z:

Z:

x/A

7. Linear /

CO = O~ C k =

..,1{, ''il''

fck - Fkl

i cos (rrk) 2rrk

]1111~.....

.....

2;:

AVED, f-N~2 = 0

max~

8. Triangular wave

1 - 21nl/N

Fk and ck:

,,,IEIIIl]lllIll~

~:'

F

27: 8. Triangular wave

....

....

1 -cos(~k)

,llllll

10 . 2 , N = 2 4

~:

.

,I,,

El = ½, Fk-- N2sin2Ok/2 C N -2

Z:

1 - 2lxl/A

Ick - ~1

1 -cos@k)

IIIlILillllll

~2k2

2;:

max ~ 10 -3, N = 24

W.L. Briggs, V.E. Henson / Applied Numerical Mathematics 21 (1996)375-384

382

9. Rectangular wave

illlllllllll "R.: IIIIIIIIIIli

-1,

-N/2 < n < O

1,

O < n < N/2

Fk and ck:

Fo = O, Fk = i (c°s(Trk) - 1) sin0k 2 N sin 2 0,~/2 C k N -2

27: 9. Rectangular wave

I

27:

-l,

-A/2 < x < O

1,

0 < x < A/2

CO =

27:

AVED, f~ = 0 for n = 0, + N / 2

10. Square pulse

Ick - Fkl

i(cos(rk) - 1) 7rk

7Po: _ _ J - -

O,

'''11,.

Ck =

max ,-~ 10 -2, N = 24

1, Inl < M / 2 Fk and ck:

O, M / 2 < Inl < N / 2 7~:

~l[llllllillllllll,

77:

Fo = M / N , Fk = sinQrkM/N) sinOk 2N sin2 0k/2

1, Ixl <

a/2

O, a/2 <

Ixl <

A/2

sin( Trka / A ) 7rk

c o = a / A , ck -

AVED, 0 < a / A = M / N < 1

27: 10a. Square pulse



. i

.

'

17:

C k N -2

10. Square pulse

•til

1, Inl < N / 4

Ick - FkL lie ii .... . .

,fr Ill

m a x ~ 10 -2 , N = 2 4 Fk and ck:

O, N / 4 < Inl < N / 2 7~:

iI[lllilll[l, E~=½, Fk--

10a. Square pulse

1, Ixl < 1/2 0,

i

lil I:

C k N -2

27:

Z:

sin(rrk/2) sin Ok 2 N s i n 20k/2

Ick - Fkl

1/2<1x1<1 sin(rrk/2)

~k AVED, Case 10: A = 2a = 1

ILI,,.i..,L m a x ~ 10 -2 , N = 2 4

W.L Briggs, V.E. Henson / Applied Numerical Mathematics 21 ( 1 9 9 6 ) 3 7 5 - 3 8 4

11. Exponential

e -aAnlN,

0 ~ n <. N - 1

R: till,, I

2 N ( I - 2eN cos 0k + e 2 )

383

Fk and ok:

or(1 - e ~ ) - i2o'eN sinOk ............

27:

,~ C N - I

1 1. Exponential

e -ax, 0
....... ,ili Z:

A

]ck--Fk],

a ( a A - i2~rk)

7"4:

ilt~"'

a=2,

A=3

Ilirl, ..... i ..... ,irilll

a 2 A 2 + 47r2k 2

Z:

AVED, a = 1 - e - a A , eN = e - a A I N

max ~ 10 -2, N = 24

12. Even exponential

e-aAInl/N

Fk and ck:

77,.: , , l , l l l l l l l i l l l l l l l l , r , ,

(] - ~ ) 0

- ~2cos(~k))

N ( I - 2eN cos0k + e 2 ) 27:

..., C N - 2

12. E v e n exponential

e -<=1, I~1 <

' 7

7

~

:

~

'

i

7~: Z:

A/2

]ck--Fk],

2aA(1 - e2 cos(rrk))

i~l,l,l,l,lil,l,f,t,i,i,

e N =- e - a A / N

max~

l 0 -3. N = 2 4

e2 = e - a A / 2 ~

13. Odd exponential

(nllnl)e-=Al
Fk and ck:

• 2 ( e N sin Ok)(e2 cos(Trk) - 1) 1 N(I - 2eN cos0k + e 2)

"R:

'"'lilllil]

. . . . . li

C N -]

27:

• 77~: ............ ~

_7:

(x/Ixl)e-<~1, Ixl

13. Odd exponential .

<

Ick--Fkl,

14. Linear/exponential

(nA/N)e-aAI

eN = e -aA/N

A=I

nl/N

max .~ 10 -2, N = 24 Fk and ck:

• 2A sin Ok:(o'k (e~t --eN )+...+Ne2eN cos(rrk)(l - e N cos Ok) )

1

N2(e%--nc,)sOk(~+eN)+...+2e~(~,,.,(20~)+2)+l) , ,,li

55:

,.~ C N -1

55:

14. Linear/exponential

xe-alaq

]ck--Fk], IIlIl~ ....

o'k = 1 + ( N / 2 Z:

a=2,

a 2 A 2 + 47r2k 2

AVED, e2 = e - a A / 2 ,

Jtlttlllll ]!llllllllll'

A/2

il . . . . .

i47rk(e2 cos(Trk) - 1)

27:

"R.:

A=!

a 2 A 2 + 47r2k 2

27:

T4.:

a=2,

e2 ~ e - a A / 2 ~

il"

a=2,

A=3

.... ~llllii

1)e2cos(Trk)

CN ~ e - a A / 1 V

d = a2A 2 + 4~r2k 2, AVED

max~

10 -3 . N = 2 4

W.L. Briggs, V.E. Henson / Applied Numerical Mathematics 21 (1996)375-384

384

e -aAInt/N cos(Trn/N)

15a.

Fk and ck:

Cosine/exponential ...,qlllll,

7¢.:

i

.....

(l--e2N)+2e2eNcos(rrk)sinO+ (1--e2~)--2e2eNcos(Trk)sinO_ 2N(l_2eNCOSO++e2N) -~- 2 N ( l _ 2 e N c o s O _ + e 2 )

27:

CN -2

15a.

'R,:

.,1i1,,,

I:

e -a[~l cos(rrx/A)

Ick--Fk[, a = 2 ,

A=3

Cosine/exponential e2k+ c o s ( r r k )

+ a

A(k~ + a2) e2 ~ e - a A / 2 ,

27:

m

e2k- cos(Trk)

-

-

a

IIIIIiItl,lil,llllllllll

i

A(k 2_ + a2)

¢3N ~ e - a A / N

O± = (Tr/N)(2k + 1), k± = (zr/A)(2k i 1)

max ~ 10 -3, N = 24

AVED 15b. Sine/exponential 7~:

,~llllllll,i IljlllllI~'

2-:

15b. Sine/exponential

e -aAlnl/N sinQrn/N)

i \

1--e N cos 0 5- + e 2 e N cos(rrk) sin 0 + - - I - e N cos O_ - e 2 e N cos(rrk) sin O_ N ( l - Z e N cos 0 + + e 2 ) N ( l - 2 e N .... 0 _ + e 2 ) ]

27: ....

CN-' e -al~l sin(Trx/A) ie2k+ sin((2k

+ 1)7r/2))

A(k2+ + a 2) e2 ~ e - a A / 2

2-:

Fk and ck:

Ii

il'"

]ck--Fkl, a = 2 , + a

m

ie2k_ sin((2k - I)7r/2)) + a A(k 2_ + a 2)

[lilt

.....

i .....

A=3

iiIlll

e N ~- e - a A / N

O± = ( r / N ) ( 2 k + 1), k± = (Tr/A)(2k 4- 1)

max ,-~ 10 -3, N = 24

AVED

References [1] W.L. Briggs and V.E. H e n s o n , The DFT: An Owner's Manual f o r the Discrete Fourier Transform (SIAM, 1995).