The discrete and fast Fourier transforms

Similar documents
Numerical Methods I Orthogonal Polynomials

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Appendix C: Recapitulation of Numerical schemes

Vectors in Function Spaces

Poisson summation and the discrete Fourier transform John Kerl University of Arizona, Math 523B April 14, 2006

Outline of Fourier Series: Math 201B

PLEASE LET ME KNOW IF YOU FIND TYPOS (send to

Fourier Series. (Com S 477/577 Notes) Yan-Bin Jia. Nov 29, 2016

SMOOTH APPROXIMATION OF DATA WITH APPLICATIONS TO INTERPOLATING AND SMOOTHING. Karel Segeth Institute of Mathematics, Academy of Sciences, Prague

Finite-dimensional spaces. C n is the space of n-tuples x = (x 1,..., x n ) of complex numbers. It is a Hilbert space with the inner product

Lecture 6 January 21, 2016

Quantum Computing Lecture 2. Review of Linear Algebra

Spectral Methods and Inverse Problems

4 Hilbert spaces. The proof of the Hilbert basis theorem is not mathematics, it is theology. Camille Jordan

Polynomial Approximation: The Fourier System

Physics 342 Lecture 2. Linear Algebra I. Lecture 2. Physics 342 Quantum Mechanics I

CHAPTER VIII HILBERT SPACES

APPENDIX A. Background Mathematics. A.1 Linear Algebra. Vector algebra. Let x denote the n-dimensional column vector with components x 1 x 2.

Chapter 8 Integral Operators

Data representation and approximation

FOURIER SERIES, HAAR WAVELETS AND FAST FOURIER TRANSFORM

Math 5520 Homework 2 Solutions

Advanced Digital Signal Processing -Introduction

The Fourier spectral method (Amath Bretherton)

Vector Spaces. Vector space, ν, over the field of complex numbers, C, is a set of elements a, b,..., satisfying the following axioms.

Lecture 7 January 26, 2016

PART IV Spectral Methods

Mathematical Methods wk 1: Vectors

Mathematical Methods wk 1: Vectors

1 Infinite-Dimensional Vector Spaces

Physics 342 Lecture 2. Linear Algebra I. Lecture 2. Physics 342 Quantum Mechanics I

The following definition is fundamental.

Introduction to the FFT

Math Linear Algebra II. 1. Inner Products and Norms

MA3232 Summary 5. d y1 dy1. MATLAB has a number of built-in functions for solving stiff systems of ODEs. There are ode15s, ode23s, ode23t, ode23tb.

Let R be the line parameterized by x. Let f be a complex function on R that is integrable. The Fourier transform ˆf = F f is. e ikx f(x) dx. (1.

Digital Image Processing

Hilbert Spaces. Hilbert space is a vector space with some extra structure. We start with formal (axiomatic) definition of a vector space.

Real Variables # 10 : Hilbert Spaces II

Cambridge University Press The Mathematics of Signal Processing Steven B. Damelin and Willard Miller Excerpt More information

LECTURE 1: SOURCES OF ERRORS MATHEMATICAL TOOLS A PRIORI ERROR ESTIMATES. Sergey Korotov,

be the set of complex valued 2π-periodic functions f on R such that

Linear Algebra Massoud Malek

Page 52. Lecture 3: Inner Product Spaces Dual Spaces, Dirac Notation, and Adjoints Date Revised: 2008/10/03 Date Given: 2008/10/03

lecture 7: Trigonometric Interpolation

Kernel Method: Data Analysis with Positive Definite Kernels

MATH745 Fall MATH745 Fall

The Discrete Fourier Transform

Mathematical Introduction

Y m = y n e 2πi(m 1)(n 1)/N (1) Y m e 2πi(m 1)(n 1)/N (2) m=1

Electrons in periodic potential

Comparison of Clenshaw-Curtis and Gauss Quadrature

Chapter III. Quantum Computation. Mathematical preliminaries. A.1 Complex numbers. A.2 Linear algebra review

Bernstein-Szegö Inequalities in Reproducing Kernel Hilbert Spaces ABSTRACT 1. INTRODUCTION

On Unitary Relations between Kre n Spaces

MARN 5898 Fourier Analysis.

Hilbert Spaces: Infinite-Dimensional Vector Spaces

7: FOURIER SERIES STEVEN HEILMAN

Interpolation on the unit circle

Definitions and Properties of R N

Hilbert spaces. 1. Cauchy-Schwarz-Bunyakowsky inequality

MATH 220: INNER PRODUCT SPACES, SYMMETRIC OPERATORS, ORTHOGONALITY

Introduction to Signal Spaces

Classical Fourier Analysis

October 25, 2013 INNER PRODUCT SPACES

Separation of Variables in Linear PDE: One-Dimensional Problems

i. v = 0 if and only if v 0. iii. v + w v + w. (This is the Triangle Inequality.)

Vector and Tensor Calculus

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

THE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.

Basic relations valid for the Bernstein space B 2 σ and their extensions to functions from larger spaces in terms of their distances from B 2 σ

Fourier Series. 1. Review of Linear Algebra

Matrix Algebra: Vectors

Physics 307. Mathematical Physics. Luis Anchordoqui. Wednesday, August 31, 16

Lecture 16: Bessel s Inequality, Parseval s Theorem, Energy convergence

Inner Product Spaces An inner product on a complex linear space X is a function x y from X X C such that. (1) (2) (3) x x > 0 for x 0.

General Inner Product & Fourier Series

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

CS168: The Modern Algorithmic Toolbox Lecture #11: The Fourier Transform and Convolution

SPECTRAL PROPERTIES OF THE LAPLACIAN ON BOUNDED DOMAINS

Geometric Multigrid Methods

Approximation Theory

Part 1a: Inner product, Orthogonality, Vector/Matrix norm

96 CHAPTER 4. HILBERT SPACES. Spaces of square integrable functions. Take a Cauchy sequence f n in L 2 so that. f n f m 1 (b a) f n f m 2.

Mathematics of Information Spring semester 2018

4.3 The Discrete Fourier Transform (DFT) and the Fast Fourier Transform (FFT)

Section 3.2. Multiplication of Matrices and Multiplication of Vectors and Matrices

Some lecture notes for Math 6050E: PDEs, Fall 2016

1 Mathematical preliminaries

1 Orthonormal sets in Hilbert space

Supplementary information I Hilbert Space, Dirac Notation, and Matrix Mechanics. EE270 Fall 2017

E The Fast Fourier Transform

1. General Vector Spaces

Exercises to Applied Functional Analysis

Math 307 Learning Goals. March 23, 2010

4 Sobolev spaces, trace theorem and normal derivative

,, rectilinear,, spherical,, cylindrical. (6.1)

Recurrence Relations and Fast Algorithms

LECTURE Fourier Transform theory

Advanced Computational Fluid Dynamics AA215A Lecture 2 Approximation Theory. Antony Jameson

Transcription:

The discrete and fast Fourier transforms Marcel Oliver Revised April 7, 1 1 Fourier series We begin by recalling the familiar definition of the Fourier series. For a periodic function u: [, π] C, we define the Fourier transform û k = 1 π e ikx u(x) dx. (1) for every k Z. By direct computation, noting that the boundary terms of the integral cancel due to periodicity, we obtain the orthogonality relation 1 π where δ jk denotes the Kronecker symbol δ jk = e ijx e ikx dx = δ ij, () { 1 if j = k, otherwise. We conclude that the inverse Fourier transform is given by (3) u(x) = k Z û k e ikx, (4) which can be verified by inserting (4) into (1), changing the order of integration and summation, and applying the orthogonality relation (). In the same way, we obtain the Parseval identity 1 π u(x) v(x) dx = û k ˆv k, (5) π k Z where the overbar denotes the complex conjugate. Remark 1. The choice of the interval of definition of the periodic function u is arbitrary, but choosing [, π[ has notational advantages. Other intervals can be obtained by translation and scaling. The prefactor on the right of (1) is sometimes fully or partially moved into the inverse Fourier transform (4). 1

Remark. More elegantly, we may speak of functions on the torus T = R/πZ. The right hand notation means that two real numbers are considered equivalent if they differ by an integer multiple of π. Remark 3. The precise functional setting is not important for our purposes, and we will not dwell on this issue. Let us remark that this theory is developed by noting that (a) the inversion formula (4) is a continuous linear map from the sequence space l 1 into the space of essentially bounded functions L (T) and that (b) the Parseval identity (5) shows that the Fourier transform is an isometry with respect to the norms of the larger respective spaces l and L (T), and can thus be extended to those larger spaces using a density argument. The details depend on advanced Analysis and may be found, for example, in []. Remark 4. The orthogonality relation () expresses that {e ikx : k Z} is an orthonormal set with respect to the inner product u, v = 1 π u(x) v(x) dx. (6) It is a nontrivial result that this set is a Hilbert basis of the function space L (T), which means that every u L (T) can be expressed as a countable linear combination of basis functions []. From this point of view, the inverse Fourier transform (4) is nothing but the representation of a function in terms of a Hilbert basis. The discrete Fourier transform Let v,..., v be an -tuple of real or complex numbers. We define the discrete Fourier transform (DFT) to be the linear map ṽ k = 1 e ikjh v j (7) where k =,..., 1 and h = π. (8) Remark 5. We can think of v,..., v as the samples of a periodic function v on the interval [, π] on the equidistantly spaced nodes In this case, we can write the formula for the DFT as ṽ k = 1 x j = jh. (9) e ikx j v(x j ), (1) which looks like a Riemann sum approximation to the continuous Fourier transform (1). This interpretation, however, has some subtleties which will be discussed further in Section 3.

We now investigate the inverse of the discrete Fourier transform (7). To this end, we first derive the discrete orthogonality relation 1 e ikjh e iljh = 1 e i(l k)jh = 1 l k ) j iπ (e 1 if l = k + m for some m Z = 1 q 1 q = otherwise where = δ per, (11) l k iπ q = e (1) so that q = e πi(l k) = 1, and where δ per denotes the periodic Kronecker symbol { δ per 1 if l = k + m for some m Z, = otherwise. Remark 6. Along the same lines, it is easy to show that for any m Z, 1 m+ j=m+1 (13) e ikjh e iljh = δ per. (14) Remark 7. In the language of linear algebra, (11) states that the family of vectors {e k = 1/ (e ikx,..., e ikx ): k =,..., 1} form an orthonormal basis of C with respect to the standard inner product. Exercise 1. Prove the discrete Parseval identity ṽ k = 1 v j. (15) k= Exercise. Let ṽ k be defined by (7) for any k Z. Show that ṽ k+ = ṽ k. Vice versa, set v j+ = v j, then show that for every m Z, Exercise 3. Let ṽ k = 1 w j = 1 m+ j=m+1 l= e ikx j v j. (16) u l v j l (17) with the understanding that the three -tuples are periodically extended beyond their basic range of definition on which the index varies from to 1; see Exercise. Show that w k = ũ k ṽ k. (18) 3

Remark 8. Exercise shows, in particular, that our choice of range for k, the wavenumber index, is arbitrary. Any range of consecutive wavenumbers will do. We conclude that the inverse discrete Fourier transform is given by v j = k= ṽ k e ikx j, (19) as can be directly verified by substituting the discrete Fourier transform (7) into the right hand sum and applying the orthogonality relation (11). Remark 9. The normalization convention is arbitrary. Many software implementations of the discrete Fourier transform, including those in Matlab and Octave, have the factor 1/ in the inverse transform (19) rather than in the forward transform (7). The convention above has the advantage that the DFT can be seen as the Riemann sum approximation of the continuous Fourier transform. If both the forward and the inverse transform get a factor of 1/, the transform is unitary, which has certain theoretical advantages, but is usually avoided in actual code. 3 Sampling and approximation From the linear algebra perspective, the previous section already gives a complete description of the discrete Fourier transform. In practice, however, the DFT is often used as an approximation to the continuous Fourier transform. Thus, we need to define the reconstruction of a function on [, π] and must then discuss the quality of the approximation. To begin, assume that u: [, π] C is continuous and periodic, and write u j = u(x j ) for j =,..., 1 to denote the values of u sampled on the grid. For simplicity, we assume that is even. We now define a function v, the trigonometric interpolant of u on the grid, by letting ṽ k be the DFT of the samples u j, for k = /,..., / 1, then set ũ k = 1 v(x) = / 1 k= / e ikx j u j () ũ k e ikx. (1) ote that k still ranges over a set of consecutive wave numbers. The particular choice here seems odd, but will turn out to be crucial for keeping the approximation error small. The name trigonometric interpolant is justified by the fact that v and u coincide on the grid, to be verified in the following straightforward exercise. 4

Exercise 4. Show that v(x j ) = u j for j =,..., 1 and that ˆv k = ũ k for k = /,..., / + 1. However, the discrete Fourier coefficients ˆv k = ũ k are generally different from the Fourier coefficients û k defined by (1)! To quantify how they differ, we compute, using (), (4), and (11), that ũ k = 1 e ikx j û l e ilx j = l Z l Z û l δ per. () Moving the term where k = l onto the left side of the equality and re-indexing the sum, we obtain the Poisson summation formula or aliasing formula ũ k û k = m Z m û k+m. (3) This result shows that the error in the Fourier coefficients with wavenumbers within the range k = /,..., / 1 depends on the magnitude of û l outside of this range. Since smooth functions have Fourier coefficients whose magnitude decreases with increasing k (a more concrete version of this statement is given below), and real-valued functions have û k = û k, the maximally symmetric choice of wavenumber range where k = /,..., / 1 can be expected to minimize the approximation error for typical functions. Remark 1. The aliasing formula implies a version of the Shannon sampling theorem, often stated as Exact reconstruction of a continuous-time baseband signal from its samples is possible if the signal is bandlimited and the sampling frequency is greater than twice the signal bandwidth [6]. It is often useful to quantify the approximation error u v directly. It is easiest to do under the assumption that u H m = k Z(1 + k ) m û k <. (4) Remark 11. The condition above is a statement about the smoothness of u. More specifically, it says that derivatives of u, while they may not exist everywhere, do not diverge too rapidly. For m = 1, for example, (4) is equivalent to saying that ( u(x) + u (x) ) dx <. (5) Remark 1. The set of L functions, i.e. square integrable functions, for which (4) holds, is called the Sobolev space H m. 5

We compute u v L = u v dx = π û k ˆv k k Z / 1 = π û k ˆv k + π + û k k= / k< / k / / 1 = π û k+j + π + û k k= / j k< / k / π û k + π û k, (6) where the last inequality is based on a i ( ) a i for nonnegative ai, and where we have symmetrized the range of the summation index taking the more conservative bound. The second term on the right of (6) is the truncation error, which can be estimated as û k = k m k m û k ( ) m k m û k = c 1 (m) m u H m. (7) The first term in (6) is the aliasing error, which is estimated as û k = k m k m û k k m k m û k c (m) m+1 u H m, (8) where the first inequality is due to the Cauchy Schwarz inequality, and the second inequality is a result of estimating the sum in terms of an integral, k m k m dk = m 1 (κ 1)1 m. (9) k κ Inserting (7) and (8) into (6), we have proved the following. Theorem 1. For every m > 1 κ 1 there exists a constant c(m) such that for every u Hm u v L c(m) 1/ m u H m, (3) where v is the trigonometric interpolant of u as given by (1), 6

4 The fast Fourier transform The fast Fourier transform is mathematically equivalent to the discrete Fourier transform, but organizes the operations in a tree-like structure which reduces to the computational complexity from the O( ) when viewed as a generic vector-matrix multiplication to O( ln ) provided that is completely factorizable into small prime factors. The construction can be understood as follows. Assume that can be written as a product of integers = pq. ow re-index the discrete Fourier transform, writing j = q j 1 + j with j 1 =,..., p 1 and j =,..., q 1, (31) k = p k + k 1 with k 1 =,..., p 1 and k =,..., q 1. (3) The discrete Fourier transform (7) then reads ṽ k = 1 = 1 = 1 q 1 p 1 j = j 1 = q 1 j = q 1 j = e i(qj 1+j )(pk +k 1 )h v j e ij (pk +k 1 )h p 1 j 1 = e ik j π/q e ik 1j h e ij 1k pqh e ik 1j 1 qh v j p 1 j 1 = e ik 1j 1 π/p v j. (33) The crucial observation is that the inner sum is now itself, for j fixed, a discrete Fourier transform of length p. Thus, if T p denotes the number of terms needed to compute a length p Fourier transform, the computation of the inner sum for all values of j requires q T p terms. Similarly, the outer sum is, for k 1 fixed, a discrete Fourier transform of length q acting on the values of the inner sum pre-multiplied by exp( ik 1 j h). Thus, its computation involves p T q terms. We conclude that, in total, T = q T p + p T q (34) which, in general, is less than = p q. Moreover, the factorization of the DFT is recursive so long as p or q can themselves be factored. In the important special case where = k, it is easy to solve this recurrence. Write t k = T, q = and p = k 1, whence (34) takes the form t k = t k 1 + k 1 t 1. (35) oting that self-consistency of this expression requires that t = (computing a length-one discrete Fourier transform is trivial and does not require any floating point operations), we can easily find the solution to this linear difference equation [4], t k = k k 1 t 1. (36) 7

Thus, T = log log t 1 = log t 1 / = O( ln ). (37) More generally, if = p 1... p m, then the discrete Fourier transform can be computed in (p 1 +... p m ) operations [1]. References [1] J.W. Cooley and J.W. Tukey, An algorithm for the machine calculation of complex Fourier series, Math. Comput. 19 (1965), 97 31. http://www.jstor.org/view/55718/di97514/97p11i/ [] G.B. Folland, Real Analysis. Wiley, 1999. [3] D.K. Maslen and D.. Rockmore, The Cooley-Tukey FFT and group theory, otices of the AMS 48 (1), 1151 116. http://www.ams.org/notices/11/fea-maslen.pdf [4] M. Oliver, Difference Equations, General Mathematics and Computational Science I Lecture otes. http://math.jacobs-university.de/oliver/teaching/iub/fall6/cps11/handouts/difference-equations.pdf [5] L.. Trefethen, Spectral Methods in Matlab. SIAM, 1. [6] yquist Shannon sampling theorem. Wikipedia, The Free Encyclopedia. June 13, 7, 5:39 UTC. http://en.wikipedia.org/w/index.php?title=yquist%e%8%93shannon_sampling_theorem&oldid=13783751 8