MAR 5898 Fourier Analysis. Dmitriy Leykekhman Spring 2010 Goals Fourier Series. Discrete Fourier Transforms. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 1
Complex umbers. i = 1 z = x + iy x is the real part of z and y is the imaginary part of z x = Re(z), y = Im(z) z = x iy is the complex conjugate of z z = x 2 + y 2 e iθ = cos θ + i sin θ Euler s formula z = x + iy = z e iθ polar representation of a complex number D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 2
Fourier Series. Let f be 2π periodic functions. The Fourier series of a function f is the series f(x) c n e inx, where c n = 1 2π n= 2π 0 f(x)e inx dx. are called Fourier coefficients. otice that the series may not converge or converge to a different functions. That is why we use sign instead of the equal sign. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 3
Approximating Fourier Coefficients. To approximate Fourier coefficients c k, k = 0, 1,..., We sample f at = 2n + 1 points Put x j = j 2π, j = 0,..., 1. f j = f(x j ), j = 0,..., 1. Since f is 2π periodic, we have f = f 0. Applying the composite trapezoidal rule to approximate c k, we obtain c k = 1 2π 2π 0 f(x)e ikx dx 1 1 f j e ijk2π, k = n,..., 0,..., n. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 4
Properties of the Approximating Fourier Coefficients. For k = 1,..., n the approximate Fourier coefficients satisfy c k = 1 1 f j e ij( k)2π = 1 1 f j e ijk2π = 1 1 f j e ijk2π = c k c k = 1 1 f j e ijk2π e ijk2π }{{} = 1 =1 1 f j e ij( k)2π = c k D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 5
Discrete Fourier Transform. Given real numbers f 0,..., f 1 we want to compute The map c k = 1 1 f 0,..., f 1 c k = 1 f j e ijk2π, k = 0,..., 1. 1 is called the Discrete Fourier Transform (DFT). f j e ijk2π, k = 0,..., 1, D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 6
Matrix Representation of the Discrete Fourier Transform. Let ω = e i2π/ C be the th root of unity. Thus we can rewrite c k = 1 = 1 1 ( 1, ω k f j e ijk2π, ω 2k k = 0,..., 1. = 1 1 f j ω jk,..., ω ( 1)k ) f 0 f 1 f 2. f 1, D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 7
Matrix Representation of the Discrete Fourier Transform. We can rewrite it using matrix representation c 0 1 1 1... 1 c 1 c 2 = 1 1 ω 1 ω 2... ω ( 1) 1 ω 2 ω 4... ω 2( 1)............. c 1 1 ω ( 1) ω 2( 1)... ω ( 1)2 f 0 f 1 f 2. f 1 D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 8
Matrix Representation of the Discrete Fourier Transform. The matrix F = 1 1 1... 1 1 ω 1 ω 2... ω ( 1) 1 ω 2 ω 4... ω 2( 1)............ 1 ω ( 1) is called the Fourier matrix. Since ω 2( 1)... ω ( 1)2 ω l = e il2π/ = e il2π/ = ω l, the matrix F is equal to its conjugate F. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 9
Matrix Representation of the Discrete Fourier Transform. We can rewrite the Discrete Fourier Transform as c 0 f 0 c 1 c 2 = 1 f 1 F f 2.. f 1 c 1. Thus the application of the DFT to a vector f is a matrix-vector multiplication c = 1 F f. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 10
The Fourier Matrix Lemma The Fourier matrix F satisfies F F = I, where I is the identity matrix, i.e. Proof. For k, l {0,..., 1}, (F F ) kl = F 1 = 1 F, (F ) 1 = 1 F. = 1 1 ω lj ωkj 1 = e ij(k l)2π/ = e ijl2π/ e ijk2π/ 1 (e i(k l)2π/ ) j {, if k = l; = 1 (e i(k l)2π/ ) 1 e i(k l)2π/ = 0, if k l. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 11
The Inverse Discrete Fourier Transform. The inverse Discrete Fourier Transform maps c into f and is given by f 0 f 1 f 2, or f k = 1. f 1 = F c 0 c 1 c 2. c 1 c j e ijk2π/, k = 0,..., 1. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 12
Fast Fourier Transform (FFT). Straight forward implementation of matrix-vector products F c and 1 F f require O( 2 ) operations. Using the special the special structure of F, these multiplications can be done more efficiently in O( log ) operations using so-called Fast Fourier Transform (FFT). Matlab s fft(f) uses FFT to compute F f Matlab s ifft(c) uses FFT to compute 1 F c ote: there is a difference in scale by : fft(f) computes F f, not 1 F f and ifft(c) computes 1 F c, not F c. D. Leykekhman - MAR 5898 Parameter estimation in marine sciences Linear Least Squares 13