CS711008Z Algorithm Design and Analysis

Size: px
Start display at page:

Download "CS711008Z Algorithm Design and Analysis"

Transcription

1 CS711008Z Algorithm Design and Analysis Lecture 5 FFT and Divide and Conquer Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 / 56

2 Outline DFT: evaluate a polynomial at n special points; FFT: an efficient implementation of DFT; Applications of FFT: multiplying two polynomials (and multiplying two n-bits integers); time-frequency transform; solving partial differential equations; Appendix: relationship between continuous and discrete Fourier transforms 2 / 56

3 DFT: Discrete Fourier Transform DFT evaluates a polynomial A(x) = a 0 + a 1 x + + a n 1 x n 1 at n distinct points 1, ω, ω 2,, ω n 1, where ω = e 2π n i is the n-th complex root of unity Thus, it transforms the complex vector a 0, a 1,, a n 1 into another complex vector y 0, y 1,, y n 1, where y k = A(w k ), ie, y 0 = a 0 + a 1 + a 2 + a n 1 y 1 = a 0 + a 1 ω 1 + a 2 ω 2 + a n 1 ω n 1 y n 1 = a 0 + a 1 ω n 1 + a 2 ω 2(n 1) + a n 1 ω (n 1)2 Matrix form: y 0 y 1 y n 1 = ω 1 ω 2 ω n 1 1 ω 2 ω 4 ω 2(n 1) 1 ω n 1 ω 2(n 1) ω (n 1)2 a 0 a 1 a n 1 3 / 56

4 FFT: a fast way to implement DFT [Cooley and Tukey, 1965] Direct matrix-vector multiplication requires O(n 2 ) operations when using the Horner s method, ie, A(x) = a 0 + x(a 1 + x(a xa n 1 )) FFT: reduce O(n 2 ) to O(n log 2 n) using divide-and-conquer technique How does FFT achieve this? Or what calculations are redundant in the direct matrix-vector multiplication approach? Note: The idea of FFT was proposed by James Cooley and John Tukey in 1965 when analyzing earth-quake data, but the idea can be dated back to F Gauss 4 / 56

5 Let s evaluate A(x) at four special points It is easy to evaluate any 1-degree polynomial A(x) = a 0 + a 1 x at two points 1, 1 Now let s evaluate a 3-degree polynomial A(x) = a 0 + a 1 x + a 2 x 2 + a 3 x 3 at four special points 1, i, 1, i Divide: Break the polynomial into even and odd terms, ie, A even (x) = a 0 + a 2 x A odd (x) = a 1 + a 3 x Then we have the following equations: A(x) = (a 0 + a 2 x 2 ) + x(a 1 + a 3 x 2 ) = A even (x 2 ) + xa odd (x 2 ) A( x) = (a 0 + a 2 x 2 ) x(a 1 + a 3 x 2 ) = A even (x 2 ) xa odd (x 2 ) Combine: For the 4 special points 1, i, 1, i, we have A(1) = A even (1) + A odd (1) A(i) = A even ( 1) + ia odd ( 1) A( 1) = A even (1) A odd (1) A( i) = A even ( 1) ia odd ( 1) In other words, the values of A(x) at 4 points 1, i, 1, i can be calculated based on the values of A even (x), A odd (x) at 2 points 1, 1 5 / 56

6 An example: n = 4 y 0 = a 0 + a 1 + a 2 + a 3 y 1 = a 0 + a 1 ω 1 + a 2 ω 2 + a 3 ω 3 y 2 = a 0 + a 1 ω 2 + a 2 ω 4 + a 3 ω 6 y 3 = a 0 + a 1 ω 3 + a 2 ω 6 + a 3 ω 9 Objective: Evaluate A(x) at 4 points: 1, ω, ω 2, ω 3, where ω = e 1 4 2πi I ω +i ω ω 4 R ω 3 i 6 / 56

7 Step 1: Simplification y 0 = a 0 + a 1 + a 2 + a 3 y 1 = a 0 + a 1 ω 1 + a 2 ω 2 + a 3 ω 3 y 2 = a 0 + a 1 ω 2 + a 2 + a 3 ω 2 y 3 = a 0 + a 1 ω 3 + a 2 ω 2 + a 3 ω 1 7 / 56

8 Step 2 Divide into odd- and even-terms y 0 = a 0 + a 2 + a 1 + a 3 y 1 = a 0 + a 2 ω 2 + a 1 ω 1 + a 3 ω 3 y 2 = a 0 + a 2 + a 1 ω 2 + a 3 ω 2 y 3 = a 0 + a 2 ω 2 + a 1 ω 3 + a 3 ω 1 8 / 56

9 Key observation: redundant calculations y 0 = a 0 + a 2 + a 1 + a 3 y 1 = a 0 + a 2 ω 2 + a 1 ω 1 + a 3 ω 3 y 2 = a 0 + a 2 + a 1 ω 2 + a 3 ω 2 y 3 = a 0 + a 2 ω 2 + a 1 ω 3 + a 3 ω 1 Note that the calculations in the two red frames are identical, and the calculations in the blue frames are also identical after multiplying by ω 2 Here ω 2 = 1 as ω = e 2π 4 i 9 / 56

10 Step 3: Divide-and-conquer y 0 = a 0 + a 2 + a 1 + a 3 y 1 = a 0 + a 2 ω 2 + a 1 ω 1 + a 3 ω 3 y 2 = a 0 + a 2 + a 1 ω 2 + a 3 ω 2 y 3 = a 0 + a 2 ω 2 + a 1 ω 3 + a 3 ω 1 Thus the calculations in the top-left and bottom-right frames are redundant We need only = 4 log 2 4 calculations 10 / 56

11 Another example: n = 8 y 0 = a 0 + a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + a 7 y 1 = a 0 + a 1ω 1 + a 2ω 2 + a 3ω 3 + a 4ω 4 + a 5ω 5 + a 6ω 6 + a 7ω 7 y 2 = a 0 + a 1ω 2 + a 2ω 4 + a 3ω 6 + a 4ω 8 + a 5ω 10 + a 6ω 12 + a 7ω 14 y 3 = a 0 + a 1ω 3 + a 2ω 6 + a 3ω 9 + a 4ω 12 + a 5ω 15 + a 6ω 18 + a 7ω 21 y 4 = a 0 + a 1ω 4 + a 2 + a 3ω 12 + a 4ω 16 + a 5ω 20 + a 6ω 24 + a 7ω 28 y 5 = a 0 + a 1ω 5 + a 2ω 10 + a 3ω 15 + a 4ω 20 + a 5ω 25 + a 6ω 30 + a 7ω 35 y 6 = a 0 + a 1ω 6 + a 2ω 12 + a 3ω 18 + a 4ω 24 + a 5ω 30 + a 6ω 36 + a 7ω 42 y 7 = a 0 + a 1ω 7 + a 2ω 14 + a 3ω 21 + a 4ω 28 + a 5ω 35 + a 6ω 42 + a 7ω 49 Objective: Evaluate A(x) at 8 points: 1, ω, ω 2,, ω 7, where ω = e 1 8 2πi ω 4 1 ω 3 ω 5 I ω 2 +i ω 1 1 ω 7 ω8 R 11 / 56

12 Step 1: Simplification y 0 = a 0 + a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + a 7 y 1 = a 0 + a 1 ω 1 + a 2 ω 2 + a 3 ω 3 + a 4 ω 4 + a 5 ω 5 + a 6 ω 6 + a 7 ω 7 y 2 = a 0 + a 1 ω 2 + a 2 ω 4 + a 3 ω 6 + a 4 + a 5 ω 2 + a 6 ω 4 + a 7 ω 6 y 3 = a 0 + a 1 ω 3 + a 2 ω 6 + a 3 ω 1 + a 4 ω 4 + a 5 ω 7 + a 6 ω 2 + a 7 ω 5 y 4 = a 0 + a 1 ω 4 + a 2 ω 8 + a 3 ω 4 + a 4 + a 5 ω 4 + a 6 + a 7 ω 4 y 5 = a 0 + a 1 ω 5 + a 2 ω 2 + a 3 ω 7 + a 4 ω 4 + a 5 ω 1 + a 6 ω 6 + a 7 ω 3 y 6 = a 0 + a 1 ω 6 + a 2 ω 4 + a 3 ω 2 + a 4 + a 5 ω 6 + a 6 ω 4 + a 7 ω 2 y 7 = a 0 + a 1 ω 7 + a 2 ω 6 + a 3 ω 5 + a 4 ω 4 + a 5 ω 3 + a 6 ω 2 + a 7 ω 1 12 / 56

13 Step 2 Divide into odd- and even-terms y 0 = a 0 + a 4 + a 2 + a 6 + a 1 + a 5 + a 3 + a 7 y 1 = a 0 + a 4 ω 4 + a 2 ω 2 + a 6 ω 6 + a 1 ω 1 + a 5 ω 5 + a 3 ω 3 + a 7 ω 7 y 2 = a 0 + a 4 + a 2 ω 4 + a 6 ω 4 + a 1 ω 2 + a 5 ω 2 + a 3 ω 6 + a 7 ω 6 y 3 = a 0 + a 4 ω 4 + a 2 ω 6 + a 6 ω 2 + a 1 ω 3 + a 5 ω 7 + a 3 ω 1 + a 7 ω 5 y 4 = a 0 + a 4 + a 2 + a 6 + a 1 ω 4 + a 5 ω 4 + a 3 ω 4 + a 7 ω 4 y 5 = a 0 + a 4 ω 4 + a 2 ω 2 + a 6 ω 6 + a 1 ω 5 + a 5 ω 1 + a 3 ω 7 + a 7 ω 3 y 6 = a 0 + a 4 + a 2 ω 4 + a 6 ω 4 + a 1 ω 6 + a 5 ω 6 + a 3 ω 2 + a 7 ω 2 y 7 = a 0 + a 4 ω 4 + a 2 ω 6 + a 6 ω 2 + a 1 ω 7 + a 5 ω 3 + a 3 ω 5 + a 7 ω 1 The specific order of these terms will be explained later 13 / 56

14 Key observation: redundant calculations y 0 = a 0 + a 4 + a 2 + a 6 + a 1 + a 5 + a 3 + a 7 y 1 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 1 + a 5ω 5 + a 3ω 3 + a 7ω 7 y 2 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 2 + a 5ω 2 + a 3ω 6 + a 7ω 6 y 3 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 3 + a 5ω 7 + a 3ω 1 + a 7ω 5 y 4 = a 0 + a 4 + a 2 + a 6 + a 1ω 4 + a 5ω 4 + a 3ω 4 + a 7ω 4 y 5 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 5 + a 5ω 1 + a 3ω 7 + a 7ω 3 y 6 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 6 + a 5ω 6 + a 3ω 2 + a 7ω 2 y 7 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 7 + a 5ω 3 + a 3ω 5 + a 7ω 1 Note that the calculations in the two red frames are identical, and the calculations in the blue frames are also identical after multiplying by ω 4 Here ω 4 = 1 as ω = e 2π 8 i 14 / 56

15 Step 3: Divide-and-conquer y 0 = a 0 + a 4 + a 2 + a 6 + a 1 + a 5 + a 3 + a 7 y 1 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 1 + a 5ω 5 + a 3ω 3 + a 7ω 7 y 2 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 2 + a 5ω 2 + a 3ω 6 + a 7ω 6 y 3 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 3 + a 5ω 7 + a 3ω 1 + a 7ω 5 y 4 = a 0 + a 4 + a 2 + a 6 + a 1ω 4 + a 5ω 4 + a 3ω 4 + a 7ω 4 y 5 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 5 + a 5ω 1 + a 3ω 7 + a 7ω 3 y 6 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 6 + a 5ω 6 + a 3ω 2 + a 7ω 2 y 7 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 7 + a 5ω 3 + a 3ω 5 + a 7ω 1 Thus the calculations in the top-left and bottom-right frames are redundant 15 / 56

16 Step 3: Divide-and-conquer y 0 = a 0 + a 4 + a 2 + a 6 + a 1 + a 5 + a 3 + a 7 y 1 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 1 + a 5ω 5 + a 3ω 3 + a 7ω 7 y 2 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 2 + a 5ω 2 + a 3ω 6 + a 7ω 6 y 3 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 3 + a 5ω 7 + a 3ω 1 + a 7ω 5 y 4 = a 0 + a 4 + a 2 + a 6 + a 1ω 4 + a 5ω 4 + a 3ω 4 + a 7ω 4 y 5 = a 0 + a 4ω 4 + a 2ω 2 + a 6ω 6 + a 1ω 5 + a 5ω 1 + a 3ω 7 + a 7ω 3 y 6 = a 0 + a 4 + a 2ω 4 + a 6ω 4 + a 1ω 6 + a 5ω 6 + a 3ω 2 + a 7ω 2 y 7 = a 0 + a 4ω 4 + a 2ω 6 + a 6ω 2 + a 1ω 7 + a 5ω 3 + a 3ω 5 + a 7ω 1 Finally, we need only = 8 log 2 8 calculations 16 / 56

17 The final order 0, 1, 2, 3, 4, 5, 6, 7 0, 2, 4, 6 1, 3, 5, 7 0, 4 2, 6 3, 7 1, / 56

18 FFT Algorithm FFT(n, a 0, a 1,, a n 1 ) 1: if n == 1 then 2: return a 0 ; 3: end if 4: (E 0, E 1,, E n 2 1 ) =FFT( n 2, a 0, a 2,, a n ); 5: (O 0, O 1,, O n 2 1 ) = FFT( n 2, a 1, a 3,, a n 1 ); 6: for k = 0 to n 2 1 do 7: ω k = e 2π n ki ; 8: y k = E k + ω k O k ; 9: y n 2 +k = E k ω k O k ; 10: end for 11: return (y 0, y 1,, y n 1 ); Here FFT( n 2, a 0, a 2,, a n ) computes the polynomial A even (x) = a 0 + a 2 x + + a n x n 2 at n 2 points 1, ω 2, ω 4,, ω n 2, and FFT( n 2, a 1, a 3,, a n 1 ) computes the polynomial A odd (x) = a 1 + a 3 x + + a n 1 x n 2 at these points 18 / 56

19 Inverse Discrete Fourier Transform Inverse Discrete Fourier Transform: to determine coefficients of a polynomial a 0, a 1,, a n 1 based on n point-value pairs (1, y 0 ), (ω, y 1 ),, (ω n 1, y n 1 ), where y k = A(ω k ), and A(x) = a 0 + a 1 x + a 2 x a n 1 x n 1 Matrix form y 0 y 1 y n 1 = ω 1 ω 2 ω n 1 1 ω 2 ω 4 ω 2(n 1) 1 ω n 1 ω 2(n 1) ω (n 1)2 a 0 a 1 a n 1 It takes O(n 3 ) to calculate the inverse matrix when using the Gaussian elimination technique 19 / 56

20 Inverse Discrete Fourier Transform cont d Matrix form a 0 a 1 a n 1 = 1 n ω 1 ω 2 ω n 1 1 ω 2 ω 4 ω 2(n 1) 1 ω n 1 ω 2(n 1) ω (n 1)2 y 0 y 1 y n 1 Reason: it turns out that it is nearly its own inverse More precisely, the conjugate transpose of this matrix is its own inverse 20 / 56

21 IFFT Algorithm IFFT(n, y 0, y 1,, y n 1 ) 1: if n == 1 then 2: return y 0 ; 3: end if 4: (E 0, E 1,, E n 2 1 ) = IFFT( n 2, y 0, y 2,, y n ); 5: (O 0, O 1,, O n 2 1 ) = IFFT( n 2, y 1, y 3,, y n 1 ); 6: for k = 0 to n 2 1 do 7: ω k = e 2π n ki ; 8: a k = E k + ω k O k ; 9: a n 2 +k = E k ω k O k ; 10: end for 11: return 1 n (a 0, a 1,, a n 1 ) ; Here we assume n is the power of 2 for simplicity The normalization factors multiplying FFT and IFFT (here 1 and 1 n ) and the signs of exponents are merely conventions, and differ in some treatments 21 / 56

22 Application: fast multiplication of two polynomials (or two integers) 22 / 56

23 Multiplify two polynomials: convolution Given two polynomials A(x) = a 0 + a 1 x + a 2 x a n 1 x n 1, and B(x) = b 0 + b 1 x + b 2 x b n 1 x n 1 Let s calculate its product C(x) = A(x)B(x) = c 0 + c 1 x + c 2 x c 2n 2 x 2n 2 Brute-force (convolution): c k = k i=0 a ib k i It costs O(n 2 ) time if using the convolution technique 23 / 56

24 Conversion between two representations of polynomials An efficient conversion between these two representations is extremely useful when multiplying two polynomials a 0, a 1,, a n 1 (x 0, y 0 ),, (x n 1, y n 1 ) 24 / 56

25 Using FFT to speed up multiplication Given two polynomials A(x) = a 0 + a 1 x + a 2 x a n 1 x n 1, and B(x) = b 0 + b 1 x + b 2 x b n 1 x n 1 Let s calculate its product C(x) = A(x)B(x) = c 0 + c 1 x + c 2 x c 2n 2 x 2n 2 Brute-force: c k = k i=0 a ib k i Cost O(n 2 ) time Using FFT and IFFT: O(n log n) a 0,a 1,,a n 1 b 0,b 1,,b n 1 c 0,c 1,,c 2n 1 FFT: O(n log n) IFFT: O(n log n) A(1), A(ω),, A(ω 2n 1 ) B(1), B(ω),, B(ω 2n 1 ) Multiply: O(n) C(1), C(ω),, C(ω 2n 1 ) 25 / 56

26 An example A(x) = 1 + 2x B(x) = 3 + 4x C(x) = A(x)B(x) = c 0 + c 1 x + c 2 x 2 + c 3 x 3 x 1 i 1 i A(x) 3 1 2i i B(x) 7 3 4i i C(x) i i By running IFFT(4, (21, 5 10i, 1, i)), we obtained the coefficients as c 0 = 3, c 1 = 10, c 2 = 8, and c 3 = 0 Extension: given two n-bit integers a = a n 1 a 1 a 0, and b = b n 1 b 1 b 0, it takes O(n log n) complex arithmetic steps to calculate c = a b 26 / 56

27 Application: time-frequency transform 27 / 56

28 DFT: time-domain vs frequency-domain DFT, denoted as X = F{x}, transforms a sequence of N complex numbers x 0, x 1,, x N 1 (time-domain) into a N-periodic sequence of complex numbers X 0, X 1,, X N 1 (frequency-domain): X k = N 1 n=0 x n e 2π N ikn, k = 0, 1,, N 1 Here, X k encodes both amplitude and phase of a sinusoidal component e 2π N kni of the function x n (the sinusoid s frequency is k cycles per N samples) Inverse transform of DFT: x n = 1 N N 1 k=0 X k e 2π N ikn An interpretation of DFT is that its inverse transform is the discrete analogy of the formula for a Fourier series: f(x) = + n= F n e inx, F n = 1 2π f(x)e inx dx 28 / 56

29 Time-frequency transformation FFT transforms the input data a 0, a 1,, a n 1 (time-domain samples) into y 0, y 1,, y n 1 (frequency domain) For example, y 0 = a 0 + a 1 + a 2 + a 3 + a 4 + a 5 + a 6 + a 7 y 1 = a 0 + a 1ω 1 + a 2ω 2 + a 3ω 3 + a 4ω 4 + a 5ω 5 + a 6ω 6 + a 7ω 7 y 2 = a 0 + a 1ω 2 + a 2ω 4 + a 3ω 6 + a 4ω 8 + a 5ω 10 + a 6ω 12 + a 7ω 14 y 3 = a 0 + a 1ω 3 + a 2ω 6 + a 3ω 9 + a 4ω 12 + a 5ω 15 + a 6ω 18 + a 7ω 21 y 4 = a 0 + a 1ω 4 + a 2 + a 3ω 12 + a 4ω 16 + a 5ω 20 + a 6ω 24 + a 7ω 28 y 5 = a 0 + a 1ω 5 + a 2ω 10 + a 3ω 15 + a 4ω 20 + a 5ω 25 + a 6ω 30 + a 7ω 35 y 6 = a 0 + a 1ω 6 + a 2ω 12 + a 3ω 18 + a 4ω 24 + a 5ω 30 + a 6ω 36 + a 7ω 42 y 7 = a 0 + a 1ω 7 + a 2ω 14 + a 3ω 21 + a 4ω 28 + a 5ω 35 + a 6ω 42 + a 7ω 49 Here y k encodes both amplitude and phase of a sinusoidal component of the time-domain samples a 0, a 1,, a 7 29 / 56

30 FFT: an example N = 8; t = 0:1/N:1-1/N; a = 1*cos(2*pi*1*t) + 2*sin(2*pi*3*t); Freq = 0:N-1; bar( Freq, abs(fft(a)), "b", 02 ); 30 / 56

31 y k encodes amplitude and phase of a sinusoidal component y k = a 0 + a 1 ω k + a 2 ω 2k + + a 7 ω 7k computes the dot product of two vectors: the time-domain samples a 0, a 1,, a 7, and a sinusoid signal 1, ω k, ω 2k,, ω 7k Here ω = e 2π 8 i and thus the sinusoid has frequency of k cycles per 8 samples The dot product y k = 0 if the time-domain samples a 0, a 1,, a 7 do not consist of any sinusoidal component of such frequency The reason is that: The dot product of these two vectors y k = 7 j=0 a jω jk is essentially a discrete analogy of the integral of two sinusoids, say 2π cos mx cos nxdx 0 The orthogonality of sinusoids states that for two integers m, n, 2π 0 2π sin mx sin nxdx = 0, 0 cos mx sin nxdx = 0, and 2π 0 cos mx cos nxdx = 0 (m n) 31 / 56

32 Calculation of y 1 1, ω 1, ω 2,, ω 7 represents a sinusoidal signal of frequency 1 cycle per 8 samples, and the existence of such sinusoidal component in the time-domain samples a 0, a 1,, a 7 is encoded by the dot product y 1 = a 0 + a 1 ω 1 + a 2 ω a 7 ω 7 a = [ ] c = [ ] s = [ ] sqrt( (a*c') 2 + (a*s') 2 ) = 4 32 / 56

33 Calculation of y 2 1, ω 2, ω 4,, ω 14 represents a sinusoidal signal of frequency 2 cycles per 8 samples, and the existence of such sinusoidal component in time-domain samples a 0, a 1,, a 7 is encoded by the dot product y 2 = a 0 + a 1 ω 2 + a 2 ω a 7 ω 14 a = [ ] c = [ ] s = [ ] sqrt( (a*c') 2 + (a*s') 2 ) = 0 33 / 56

34 Calculation of y 3 1, ω 3, ω 6,, ω 21 represents a sinusoidal signal of frequency 3 cycles per 8 samples, and the existence of such sinusoidal component in time-domain samples a 0, a 1,, a 7 is encoded by the dot product y 3 = a 0 + a 1 ω 3 + a 2 ω a 7 ω 21 a = [ ] c = [ ] s = [ ] sqrt( (a*c') 2 + (a*s') 2 ) = 8 34 / 56

35 Appendix: Relationship between continuous and discrete Fourier transforms 35 / 56

36 Fourier series, Fourier transform, DTFT, and DFT Fourier series decomposes a periodic function into a set of sine/cosine waves, and one of the motivations of Fourier transform comes from the extension of Fourier series to non-periodic functions DTFT uses discrete-time samples of a continuous function as input, and generates a continuous function of frequency Using a finite sequence of equally-spaced samples of a function as input, DFT computes a sequence of identical length, representing equally-spaced samples of DTFT The interval at which the DTFT is sampled is reciprocal of the duration of the input sequence The inverse DFT is a Fourier series using the DTFT samples as coefficients of corresponding frequency, and it is essentially a periodic summation of the original input sequence 36 / 56

37 Fourier series: history Figure: Jean-Baptiste Joseph Fourier ( ) In 1807, Joseph Fourier proposed the idea of Fourier series when solving heat equation, a partial differential equation Prior to Fourier s work, no solution to heat equation was known in the general case However, when the heat source was a simple sine or cosine wave, solutions were known (called eigensolutions) Thus, Fourier modelled complicated heat source as a superposition of simple sine/cosine waves, and rewrote the solution as superposition of corresponding eigensolutions 37 / 56

38 Fourier series Fourier series is a way to represent a periodic function of time as the sum of a set of simple sines and cosines (or, equivalently, complex exponentials) For example, the Fourier series of a periodic function f(x) (period 2π) is: f(x) = a 0 + (a n cos nx + b n sin nx) n=1 where a n = 1 π b n = 1 π a 0 = 1 2π 2π 0 2π 0 2π 0 f(t)dt f(t) cos ntdt (n = 1, 2, ) f(t) sin ntdt (n = 1, 2, ) 38 / 56

39 Fourier series: orthogonality of basis functions Unlike Taylor s expansion, the basis functions of Fourier series are orthogonal over [0, 2π], ie, for two integers m, n, 2π 0 1 sin xdx = 0, 2π 0 1 cos xdx = 0 2π 0 sin mx sin nxdx = 0, 2π 0 2π 0 cos mx cos nxdx = 0 (m n) cos mx sin nxdx = 0 The orthogonality plays an important role in solving coefficients a 0, a n, b n 39 / 56

40 Fourier series: complex exponential form According to the Euler s formula e ix = cos x + i sin x, we have cos x = 1 2 (eix + e ix ), sin x = 1 2i (eix e ix ), and f(x) = a 0 + (a n cos nx + b n sin nx) n=1 1 = a 0 + (a n 2 (einx + e inx 1 ) + b n 2i (einx e inx )) n=1 = a 0 + ( 1 2 (a n ib n )e inx (a n + ib n )e inx ) n=1 Define F 0 = a 0, and F n = 1 2 (a n ib n ) (n > 0) We have F n = 1 2 (a n + ib n ), and thus rewrite the Fourier series as: f(x) = + n= F n e inx, F n = 1 2 (a n ib n ) = 1 2π 2π Complex exponential form is necessary as the complex coefficients F n (called frequency spectrum) could encode both amplitude and phase of basic waves 40 / 56 0 f(t)e int dt

41 Fourier series: example 1 Periodic function f(x) = { 1 2 (π x) 0 < x 2π f(x + 2π) otherwise f(x) π 2 3π 2π π 0 π 2π 3π x π 2 Fourier series: f(x) = n=1 1 n sin nx (since a n = 0, b n = 1 n ) f(x) π 2 3π 2π π 0 π 2π 3π x π 2 41 / 56

42 Fourier series: extension to f(x) with period of 2L For a periodic function f(x) with period of 2L, the Fourier series is: f(x) = a 0 + The coefficients are: (a n cos π L nx + b n sin π L nx) n=1 a 0 = 1 2L a n = 1 L b n = 1 L 2L 0 2L 0 2L 0 f(t)dt f(t) cos π L ntdt f(t) sin π L ntdt 42 / 56

43 Fourier series: example 2 Periodic function f(x) = period T = 1 { 1 x < x T, and f(x) has a 2 f(x) x Fourier series: f(x) = 1 2T + 2 π n=1 1 n sin( π 2T n) cos(2π T nx) f(x) x 43 / 56

44 Convergence of Fourier series: Dirichlet s conditions Dirichlet s theorem states the sufficient conditions for the convergence of Fourier series, ie, if f(x) satisfies the following conditions: 1 f(x) is periodic, and absolutely integrable over a period; 2 f(x) must have a finite number of maxima and minima in any bounded interval; 3 f(x) must have a finite number of discontinuities in any bounded interval, and the discontinuity cannot be infinite Then a 0 + m (a n cos nx + b n sin nx) 1 (f(x + 0) + f(x 0)) 2 n=1 when m A succinct proof using Dirac s δ function can be found in Mathematical Methods for Physics (by Q Gu) 44 / 56

45 Proof Since a n cos nx + b n sin nx = 1 π sum of Fourier series is: S m (x) = 1 2π = = π π π f(t) cos n(x t)dt, the partial m f(t)[1 + 2 cos n(x t)]dt π n=1 π π π π f(t) sin((m )(x t)) 2π sin 1 dt 2 (x t) f(t)d m (x t)dt Here D m (x) = 1 2π (1 + 2 cos x + 2 cos 2x cos mx) Note that lim m D m (x) = δ(x) since D m (0) = 1 2π (2m + 1) Thus, we have lim S m(x) = m π π π continous at x) Please refer to Mathematical Methods for Physics π D m (x)dx = 1 and f(t)δ(x t) = f(x) (when f(x) is 45 / 56

46 Fourier transform (in terms of angular frequency ω) Fourier transform of a function of time (a signal) is a complex-valued function of frequency (represented as angular frequency ω), whose absolute value represents the amount of that frequency present in the original function F(ω) = f(x)e ixω dx, f(x) = 1 2π F(ω)e iωx dω Fourier transform, denoted as F(ω) = F{f(x)}, is called frequency representation of the original signal, and F(ω) is called spectral density { 1 x For example, the Fourier transform of 1 4 f(x) = 0 otherwise is F(ω) = f(x)e iωx dx = 2 ω sin( ω 4 ) f(x) 1 F(ω) x 8π 4π 0 4π 8π ω 46 / 56

47 Fourier transform (in terms of ordinary frequency ν) For a sinusoidal wave with period T (measured in seconds), its frequency can be measured using angular frequency ω (measured in radians per second) or using ordinary frequency ν (measured in cycles per second, or hertz), where ω = 2πν, and ν = 1 T When using angular frequency ω, Fourier transform is defined as: F(ω) = f(x)e ixω dx f(x) = 1 F(ω)e iωx dω 2π Replacing ω with ω = 2πν, we obtain another representation of Fourier transform in terms of ordinary frequency ν: F(ν) = f(x) = f(x)e 2πixν dx F(ν)e 2πixν dν 47 / 56

48 Connection between Fourier series and Fourier transform For a function that are zero outside an interval, we can calculate Fourier series on any larger interval As we lengthen the interval, the coefficients of Fourier series will approach Fourier transform f(x) T = 1 1 2π Fn ω 1 ω = 2π x 8π 4π 0 4π 8π ω f(x) T = 2 1 2π Fn ω 1 ω = π x 8π 4π 0 4π 8π ω f(x) 1 T = F(ω) x 8π 4π 0 4π 8π ω 48 / 56

49 Fourier transform: deduction Consider a periodic function f(x) with period 2L Its Fourier series f(x) = a 0 + n=1 (a n cos π L nx + b n sin π Lnx) can be rewritten as f(x) = a 0 + n=1 (a n cos ω n x + b n sin ω n x), where ω n = π Ln represents angular frequency Intuitively, when L, f(x) becomes a non-periodic function over (, ), and ω dω n=1 In particular, we have a 0 = 1 absolutely integrable, and a n cos ω nx = n=1 = n=1 2L n=1 0 0 L L L f(t)dt 0 since f(x) is 1 [ L f(t) cos ω ] ntdt cos ω nx L L ω [ L π dω [ 1 π L f(t) cos ω ntdt ] cos ω nx f(t) cos ωtdt ] cos ωx 49 / 56

50 Fourier transform: deduction cont d Similarly, we have b n sin ω nx n=1 and rewrite Fourier series as: f(x) = 1 π = 1 π = 1 2π = 1 2π = 1 2π = 1 2π 0 ω=0 t= ω=0 t= ω=0 t= 0 dω [ 1 f(t) sin ωtdt ] sin ωx π f(t)(cos ωx cos ωt + sin ωx sin ωt)dtdω f(t) cos ω(x t)dtdω f(t)(e iω(x t) + e iω(x t) )dtdω [ f(t)e iω(x t) dω + F(ω)dt f(t)e iω(x t) dωdt 0 f(t)e iω(x t) dω ] dt 50 / 56

51 Fourier transform: properties Linear operations performed in one domain (time or frequency) have corresponding operations in the other domain Differentiation in time domain corresponds to multiplication in the frequency domain, usually making it easier to analyze Convolution in the time domain corresponds to the ordinary multiplication the frequency domain Functions that are localized in one domain have Fourier transforms that are spread out across the other domain, known as the uncertainty principle The Fourier transform of a Gaussian function is another Gaussian function 51 / 56

52 Fourier transform: Poisson summation formula For a function f(x) with its Fourier transform (in terms of ordinary frequency) F(ν) = f(x)e 2πixν dx, the Poisson summation formula states k= f(k) = k= F(k) { 1 x For example, the Fourier transform of 4 f(x) = 0 otherwise is F(ν) = f(x)e 2πiνx dx = 1 πν sin( πν 2 ) Poisson summation formula states that f(k) = 1 = F(k) k= k= f(x) 1 F(ν) x 8π 4π 0 4π 8π ω 52 / 56

53 DTFT Discrete-time Fourier transform (DTFT) refers to Fourier analysis on the uniformly-spaced samples of a continuous function, ie, a Fourier series with x n as coefficients: X(ω) = x ne inω n= Here, the frequency variable ω has normalized units of radians/sample f(x) 1 F(ω) x 8π 4π 0 4π 8π ω x n 1 X(ω) x 8π 4π 0 4π 8π ω 53 / 56

54 Inverse transform of DTFT DTFT is itself a periodic function of frequency X(ω) From this function, the original samples x n can be readily recovered as below: x n = 1 X(ω)e inω dω 2π For example, the DTFT is X(ω) = cos ω + 2 cos 2ω The original samples can be recovered as: x 0 = 1 2π (1 + 2 cos ω + 2 cos 2ω)dω = 1 Similarly, we obtained x 1 = x 1 = x 2 = x 2 = 1 x n 1 X(ω) x 8π 4π 0 4π 8π ω 54 / 56

55 DTFT and DFT From these samples, DTFT produces a function of frequency that is a periodic summation of the Fourier transform of the original continuous function The sampling theorem states the theoretical conditions under which the original function can be perfectly recovered from DTFT of the samples When the input data sequence x n is N-periodic, DTFT reduces to DFT, ie, N 1 X k = x ne 2π N kni n=0 Alternatively, DTFT is itself a continuous function, and the discrete samples of it can be efficiently calculated using DFT 55 / 56

56 Appendix: Dirac s δ function Dirac s δ function { has the following two properties: x = 0 1 δ(x) = 0 otherwise 2 + δ(x)dx = 1 We can prove the following properties: For any contineous function f(x), + f(x)δ(x x 0 )dx = f(x 0 ) δ(x) is the Fourier transform of 1 since F{δ(x)} = + δ(x)e ixω dx = 1 According to the inverse Fourier transform of 1, we have: δ(x) = 1 2π e iωx dω = 1 2π e iωx dω 56 / 56

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis

SEISMIC WAVE PROPAGATION. Lecture 2: Fourier Analysis SEISMIC WAVE PROPAGATION Lecture 2: Fourier Analysis Fourier Series & Fourier Transforms Fourier Series Review of trigonometric identities Analysing the square wave Fourier Transform Transforms of some

More information

Periodic functions: simple harmonic oscillator

Periodic functions: simple harmonic oscillator Periodic functions: simple harmonic oscillator Recall the simple harmonic oscillator (e.g. mass-spring system) d 2 y dt 2 + ω2 0y = 0 Solution can be written in various ways: y(t) = Ae iω 0t y(t) = A cos

More information

PHYS 502 Lecture 3: Fourier Series

PHYS 502 Lecture 3: Fourier Series PHYS 52 Lecture 3: Fourier Series Fourier Series Introduction In mathematics, a Fourier series decomposes periodic functions or periodic signals into the sum of a (possibly infinite) set of simple oscillating

More information

Analysis II: Fourier Series

Analysis II: Fourier Series .... Analysis II: Fourier Series Kenichi Maruno Department of Mathematics, The University of Texas - Pan American May 3, 011 K.Maruno (UT-Pan American) Analysis II May 3, 011 1 / 16 Fourier series were

More information

5.6 Convolution and FFT

5.6 Convolution and FFT 5.6 Convolution and FFT Fast Fourier Transform: Applications Applications. Optics, acoustics, quantum physics, telecommunications, control systems, signal processing, speech recognition, data compression,

More information

Today s lecture. The Fourier transform. Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm

Today s lecture. The Fourier transform. Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm Today s lecture The Fourier transform What is it? What is it useful for? What are its properties? Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm Jean Baptiste Joseph Fourier

More information

CHAPTER 4 FOURIER SERIES S A B A R I N A I S M A I L

CHAPTER 4 FOURIER SERIES S A B A R I N A I S M A I L CHAPTER 4 FOURIER SERIES 1 S A B A R I N A I S M A I L Outline Introduction of the Fourier series. The properties of the Fourier series. Symmetry consideration Application of the Fourier series to circuit

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design and Analysis LECTURE 14 Divide and Conquer Fast Fourier Transform Sofya Raskhodnikova 10/7/2016 S. Raskhodnikova; based on slides by K. Wayne. 5.6 Convolution and FFT Fast Fourier Transform:

More information

Lecture 34. Fourier Transforms

Lecture 34. Fourier Transforms Lecture 34 Fourier Transforms In this section, we introduce the Fourier transform, a method of analyzing the frequency content of functions that are no longer τ-periodic, but which are defined over the

More information

Lecture 4: Fourier Transforms.

Lecture 4: Fourier Transforms. 1 Definition. Lecture 4: Fourier Transforms. We now come to Fourier transforms, which we give in the form of a definition. First we define the spaces L 1 () and L 2 (). Definition 1.1 The space L 1 ()

More information

multiply both sides of eq. by a and projection overlap

multiply both sides of eq. by a and projection overlap Fourier Series n x n x f xa ancos bncos n n periodic with period x consider n, sin x x x March. 3, 7 Any function with period can be represented with a Fourier series Examples (sawtooth) (square wave)

More information

Fourier Series and Fourier Transforms

Fourier Series and Fourier Transforms Fourier Series and Fourier Transforms EECS2 (6.082), MIT Fall 2006 Lectures 2 and 3 Fourier Series From your differential equations course, 18.03, you know Fourier s expression representing a T -periodic

More information

The Fast Fourier Transform. Andreas Klappenecker

The Fast Fourier Transform. Andreas Klappenecker The Fast Fourier Transform Andreas Klappenecker Motivation There are few algorithms that had more impact on modern society than the fast Fourier transform and its relatives. The applications of the fast

More information

Signals and Systems Lecture (S2) Orthogonal Functions and Fourier Series March 17, 2008

Signals and Systems Lecture (S2) Orthogonal Functions and Fourier Series March 17, 2008 Signals and Systems Lecture (S) Orthogonal Functions and Fourier Series March 17, 008 Today s Topics 1. Analogy between functions of time and vectors. Fourier series Take Away Periodic complex exponentials

More information

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences

CSE 421 Algorithms. T(n) = at(n/b) + n c. Closest Pair Problem. Divide and Conquer Algorithms. What you really need to know about recurrences CSE 421 Algorithms Richard Anderson Lecture 13 Divide and Conquer What you really need to know about recurrences Work per level changes geometrically with the level Geometrically increasing (x > 1) The

More information

University of Connecticut Lecture Notes for ME5507 Fall 2014 Engineering Analysis I Part III: Fourier Analysis

University of Connecticut Lecture Notes for ME5507 Fall 2014 Engineering Analysis I Part III: Fourier Analysis University of Connecticut Lecture Notes for ME557 Fall 24 Engineering Analysis I Part III: Fourier Analysis Xu Chen Assistant Professor United Technologies Engineering Build, Rm. 382 Department of Mechanical

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Design and Analysis of Algorithms CSE 5311 Lecture 5 Divide and Conquer: Fast Fourier Transform Junzhou Huang, Ph.D. Department of Computer Science and Engineering CSE5311 Design and Analysis of Algorithms

More information

Chapter 4 The Fourier Series and Fourier Transform

Chapter 4 The Fourier Series and Fourier Transform Chapter 4 The Fourier Series and Fourier Transform Representation of Signals in Terms of Frequency Components Consider the CT signal defined by N xt () = Acos( ω t+ θ ), t k = 1 k k k The frequencies `present

More information

Fourier Series. Fourier Transform

Fourier Series. Fourier Transform Math Methods I Lia Vas Fourier Series. Fourier ransform Fourier Series. Recall that a function differentiable any number of times at x = a can be represented as a power series n= a n (x a) n where the

More information

Math 115 ( ) Yum-Tong Siu 1. Derivation of the Poisson Kernel by Fourier Series and Convolution

Math 115 ( ) Yum-Tong Siu 1. Derivation of the Poisson Kernel by Fourier Series and Convolution Math 5 (006-007 Yum-Tong Siu. Derivation of the Poisson Kernel by Fourier Series and Convolution We are going to give a second derivation of the Poisson kernel by using Fourier series and convolution.

More information

Computational Methods CMSC/AMSC/MAPL 460

Computational Methods CMSC/AMSC/MAPL 460 Computational Methods CMSC/AMSC/MAPL 460 Fourier transform Balaji Vasan Srinivasan Dept of Computer Science Several slides from Prof Healy s course at UMD Last time: Fourier analysis F(t) = A 0 /2 + A

More information

Notes on Fourier Series and Integrals Fourier Series

Notes on Fourier Series and Integrals Fourier Series Notes on Fourier Series and Integrals Fourier Series et f(x) be a piecewise linear function on [, ] (This means that f(x) may possess a finite number of finite discontinuities on the interval). Then f(x)

More information

Fourier Series Example

Fourier Series Example Fourier Series Example Let us compute the Fourier series for the function on the interval [ π,π]. f(x) = x f is an odd function, so the a n are zero, and thus the Fourier series will be of the form f(x)

More information

Fast Fourier Transform

Fast Fourier Transform Fast Fourier Transform December 8, 2016 FFT JPEG RGB Y C B C R (luma (brightness), chroma 2 (color)) chroma resolution is reduced image is split in blocks 8 8 pixels JPEG RGB Y C B C R (luma (brightness),

More information

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum

Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum Chapter 4 Discrete Fourier Transform (DFT) And Signal Spectrum CEN352, DR. Nassim Ammour, King Saud University 1 Fourier Transform History Born 21 March 1768 ( Auxerre ). Died 16 May 1830 ( Paris ) French

More information

Fast Convolution; Strassen s Method

Fast Convolution; Strassen s Method Fast Convolution; Strassen s Method 1 Fast Convolution reduction to subquadratic time polynomial evaluation at complex roots of unity interpolation via evaluation at complex roots of unity 2 The Master

More information

Mathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT

Mathematics for Chemists 2 Lecture 14: Fourier analysis. Fourier series, Fourier transform, DFT/FFT Mathematics for Chemists 2 Lecture 14: Fourier analysis Fourier series, Fourier transform, DFT/FFT Johannes Kepler University Summer semester 2012 Lecturer: David Sevilla Fourier analysis 1/25 Remembering

More information

Fourier Sin and Cos Series and Least Squares Convergence

Fourier Sin and Cos Series and Least Squares Convergence Fourier and east Squares Convergence James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University May 7, 28 Outline et s look at the original Fourier sin

More information

The Fourier Transform (and more )

The Fourier Transform (and more ) The Fourier Transform (and more ) imrod Peleg ov. 5 Outline Introduce Fourier series and transforms Introduce Discrete Time Fourier Transforms, (DTFT) Introduce Discrete Fourier Transforms (DFT) Consider

More information

Wave Phenomena Physics 15c. Lecture 10 Fourier Transform

Wave Phenomena Physics 15c. Lecture 10 Fourier Transform Wave Phenomena Physics 15c Lecture 10 Fourier ransform What We Did Last ime Reflection of mechanical waves Similar to reflection of electromagnetic waves Mechanical impedance is defined by For transverse/longitudinal

More information

Lecture 5. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith)

Lecture 5. The Digital Fourier Transform. (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith) Lecture 5 The Digital Fourier Transform (Based, in part, on The Scientist and Engineer's Guide to Digital Signal Processing by Steven Smith) 1 -. 8 -. 6 -. 4 -. 2-1 -. 8 -. 6 -. 4 -. 2 -. 2. 4. 6. 8 1

More information

FOURIER TRANSFORMS. At, is sometimes taken as 0.5 or it may not have any specific value. Shifting at

FOURIER TRANSFORMS. At, is sometimes taken as 0.5 or it may not have any specific value. Shifting at Chapter 2 FOURIER TRANSFORMS 2.1 Introduction The Fourier series expresses any periodic function into a sum of sinusoids. The Fourier transform is the extension of this idea to non-periodic functions by

More information

The Fast Fourier Transform: A Brief Overview. with Applications. Petros Kondylis. Petros Kondylis. December 4, 2014

The Fast Fourier Transform: A Brief Overview. with Applications. Petros Kondylis. Petros Kondylis. December 4, 2014 December 4, 2014 Timeline Researcher Date Length of Sequence Application CF Gauss 1805 Any Composite Integer Interpolation of orbits of celestial bodies F Carlini 1828 12 Harmonic Analysis of Barometric

More information

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone Patrice Koehl Department of Biological Sciences National University of Singapore http://www.cs.ucdavis.edu/~koehl/teaching/bl5229 koehl@cs.ucdavis.edu Fourier analysis: the dial tone phone We use Fourier

More information

Fourier series

Fourier series 11.1-11.2. Fourier series Yurii Lyubarskii, NTNU September 5, 2016 Periodic functions Function f defined on the whole real axis has period p if Properties f (t) = f (t + p) for all t R If f and g have

More information

Chapter 4 The Fourier Series and Fourier Transform

Chapter 4 The Fourier Series and Fourier Transform Chapter 4 The Fourier Series and Fourier Transform Fourier Series Representation of Periodic Signals Let x(t) be a CT periodic signal with period T, i.e., xt ( + T) = xt ( ), t R Example: the rectangular

More information

APPLIED MATHEMATICS Part 4: Fourier Analysis

APPLIED MATHEMATICS Part 4: Fourier Analysis APPLIED MATHEMATICS Part 4: Fourier Analysis Contents 1 Fourier Series, Integrals and Transforms 2 1.1 Periodic Functions. Trigonometric Series........... 3 1.2 Fourier Series..........................

More information

PHYS 391 Fourier Transform Primer Eric Torrence with modifications by Dean Livelybrooks, March 2014

PHYS 391 Fourier Transform Primer Eric Torrence with modifications by Dean Livelybrooks, March 2014 PHYS 391 Fourier Transform Primer Eric Torrence with modifications by Dean Livelybrooks, March 2014 1 Introduction This document is intended to give you just enough information to follow the discussion

More information

Fourier Series and Integrals

Fourier Series and Integrals Fourier Series and Integrals Fourier Series et f(x) beapiece-wiselinearfunctionon[, ] (Thismeansthatf(x) maypossessa finite number of finite discontinuities on the interval). Then f(x) canbeexpandedina

More information

Lecture # 06. Image Processing in Frequency Domain

Lecture # 06. Image Processing in Frequency Domain Digital Image Processing CP-7008 Lecture # 06 Image Processing in Frequency Domain Fall 2011 Outline Fourier Transform Relationship with Image Processing CP-7008: Digital Image Processing Lecture # 6 2

More information

f(x) cos dx L L f(x) sin L + b n sin a n cos

f(x) cos dx L L f(x) sin L + b n sin a n cos Chapter Fourier Series and Transforms. Fourier Series et f(x be an integrable functin on [, ]. Then the fourier co-ecients are dened as a n b n f(x cos f(x sin The claim is that the function f then can

More information

Review of Linear Time-Invariant Network Analysis

Review of Linear Time-Invariant Network Analysis D1 APPENDIX D Review of Linear Time-Invariant Network Analysis Consider a network with input x(t) and output y(t) as shown in Figure D-1. If an input x 1 (t) produces an output y 1 (t), and an input x

More information

14 Fourier analysis. Read: Boas Ch. 7.

14 Fourier analysis. Read: Boas Ch. 7. 14 Fourier analysis Read: Boas Ch. 7. 14.1 Function spaces A function can be thought of as an element of a kind of vector space. After all, a function f(x) is merely a set of numbers, one for each point

More information

DISCRETE FOURIER TRANSFORM

DISCRETE FOURIER TRANSFORM DISCRETE FOURIER TRANSFORM 1. Introduction The sampled discrete-time fourier transform (DTFT) of a finite length, discrete-time signal is known as the discrete Fourier transform (DFT). The DFT contains

More information

THE FOURIER TRANSFORM (Fourier series for a function whose period is very, very long) Reading: Main 11.3

THE FOURIER TRANSFORM (Fourier series for a function whose period is very, very long) Reading: Main 11.3 THE FOURIER TRANSFORM (Fourier series for a function whose period is very, very long) Reading: Main 11.3 Any periodic function f(t) can be written as a Fourier Series a 0 2 + a n cos( nωt) + b n sin n

More information

23.6. The Complex Form. Introduction. Prerequisites. Learning Outcomes

23.6. The Complex Form. Introduction. Prerequisites. Learning Outcomes he Complex Form 3.6 Introduction In this Section we show how a Fourier series can be expressed more concisely if we introduce the complex number i where i =. By utilising the Euler relation: e iθ cos θ

More information

`an cos nπx. n 1. L `b

`an cos nπx. n 1. L `b 4 Fourier Series A periodic function on a range p,q may be decomposed into a sum of sinusoidal (sine or cosine) functions. This can be written as follows gpxq 1 2 a ` ř8 `b (4.1) The aim of this chapter

More information

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides)

Fourier analysis of discrete-time signals. (Lathi Chapt. 10 and these slides) Fourier analysis of discrete-time signals (Lathi Chapt. 10 and these slides) Towards the discrete-time Fourier transform How we will get there? Periodic discrete-time signal representation by Discrete-time

More information

a n cos 2πnt L n=1 {1/2, cos2π/l, cos 4π/L, cos6π/l,...,sin 2π/L, sin 4π/L, sin 6π/L,...,} (2)

a n cos 2πnt L n=1 {1/2, cos2π/l, cos 4π/L, cos6π/l,...,sin 2π/L, sin 4π/L, sin 6π/L,...,} (2) Note Fourier. 30 January 2007 (as 23.II..tex) and 20 October 2009 in this form. Fourier Analysis The Fourier series First some terminology: a function f(t) is periodic if f(t + ) = f(t) for all t for some,

More information

FOURIER SERIES. Chapter Introduction

FOURIER SERIES. Chapter Introduction Chapter 1 FOURIER SERIES 1.1 Introduction Fourier series introduced by a French physicist Joseph Fourier (1768-1830), is a mathematical tool that converts some specific periodic signals into everlasting

More information

LINEAR SYSTEMS. J. Elder PSYC 6256 Principles of Neural Coding

LINEAR SYSTEMS. J. Elder PSYC 6256 Principles of Neural Coding LINEAR SYSTEMS Linear Systems 2 Neural coding and cognitive neuroscience in general concerns input-output relationships. Inputs Light intensity Pre-synaptic action potentials Number of items in display

More information

Lecture Notes: Fourier Analysis

Lecture Notes: Fourier Analysis 18.33 Lecture Notes: Fourier Analysis Homer Reid April 8, 214 Contents 1 Fourier Analysis 2 2 The Fourier transform 4 3 Examples of Fourier transforms 8 4 The smoothness of f(t) and the decay of f(ω) 12

More information

Appendix C: Recapitulation of Numerical schemes

Appendix C: Recapitulation of Numerical schemes Appendix C: Recapitulation of Numerical schemes August 31, 2009) SUMMARY: Certain numerical schemes of general use are regrouped here in order to facilitate implementations of simple models C1 The tridiagonal

More information

Fourier Series. 1. Review of Linear Algebra

Fourier Series. 1. Review of Linear Algebra Fourier Series In this section we give a short introduction to Fourier Analysis. If you are interested in Fourier analysis and would like to know more detail, I highly recommend the following book: Fourier

More information

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018

Introduction to Fourier Analysis Part 2. CS 510 Lecture #7 January 31, 2018 Introduction to Fourier Analysis Part 2 CS 510 Lecture #7 January 31, 2018 OpenCV on CS Dept. Machines 2/4/18 CSU CS 510, Ross Beveridge & Bruce Draper 2 In the extreme, a square wave Graphic from http://www.mechatronics.colostate.edu/figures/4-4.jpg

More information

1 The Complex Fourier Series

1 The Complex Fourier Series The Complex Fourier Series Adding Complexity to life The complex Fourier series is in some ways a superior product, at least for those people who are not terrified by complex numbers. Suppose fx) is a

More information

LECTURE 12 Sections Introduction to the Fourier series of periodic signals

LECTURE 12 Sections Introduction to the Fourier series of periodic signals Signals and Systems I Wednesday, February 11, 29 LECURE 12 Sections 3.1-3.3 Introduction to the Fourier series of periodic signals Chapter 3: Fourier Series of periodic signals 3. Introduction 3.1 Historical

More information

Fourier transforms. c n e inπx. f (x) = Write same thing in an equivalent form, using n = 1, f (x) = l π

Fourier transforms. c n e inπx. f (x) = Write same thing in an equivalent form, using n = 1, f (x) = l π Fourier transforms We can imagine our periodic function having periodicity taken to the limits ± In this case, the function f (x) is not necessarily periodic, but we can still use Fourier transforms (related

More information

FFT: Fast Polynomial Multiplications

FFT: Fast Polynomial Multiplications FFT: Fast Polynomial Multiplications Jie Wang University of Massachusetts Lowell Department of Computer Science J. Wang (UMass Lowell) FFT: Fast Polynomial Multiplications 1 / 20 Overview So far we have

More information

Ver 3808 E1.10 Fourier Series and Transforms (2014) E1.10 Fourier Series and Transforms. Problem Sheet 1 (Lecture 1)

Ver 3808 E1.10 Fourier Series and Transforms (2014) E1.10 Fourier Series and Transforms. Problem Sheet 1 (Lecture 1) Ver 88 E. Fourier Series and Transforms 4 Key: [A] easy... [E]hard Questions from RBH textbook: 4., 4.8. E. Fourier Series and Transforms Problem Sheet Lecture. [B] Using the geometric progression formula,

More information

Fig. 1: Fourier series Examples

Fig. 1: Fourier series Examples FOURIER SERIES AND ITS SOME APPLICATIONS P. Sathyabama Assistant Professor, Department of Mathematics, Bharath collage of Science and Management, Thanjavur, Tamilnadu Abstract: The Fourier series, the

More information

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi.

How to Multiply. 5.5 Integer Multiplication. Complex Multiplication. Integer Arithmetic. Complex multiplication. (a + bi) (c + di) = x + yi. How to ultiply Slides by Kevin Wayne. Copyright 5 Pearson-Addison Wesley. All rights reserved. integers, matrices, and polynomials Complex ultiplication Complex multiplication. a + bi) c + di) = x + yi.

More information

Divide and Conquer algorithms

Divide and Conquer algorithms Divide and Conquer algorithms Another general method for constructing algorithms is given by the Divide and Conquer strategy. We assume that we have a problem with input that can be split into parts in

More information

Fundamentals of the DFT (fft) Algorithms

Fundamentals of the DFT (fft) Algorithms Fundamentals of the DFT (fft) Algorithms D. Sundararajan November 6, 9 Contents 1 The PM DIF DFT Algorithm 1.1 Half-wave symmetry of periodic waveforms.............. 1. The DFT definition and the half-wave

More information

EA2.3 - Electronics 2 1

EA2.3 - Electronics 2 1 In the previous lecture, I talked about the idea of complex frequency s, where s = σ + jω. Using such concept of complex frequency allows us to analyse signals and systems with better generality. In this

More information

The O () notation. Definition: Let f(n), g(n) be functions of the natural (or real)

The O () notation. Definition: Let f(n), g(n) be functions of the natural (or real) The O () notation When analyzing the runtime of an algorithm, we want to consider the time required for large n. We also want to ignore constant factors (which often stem from tricks and do not indicate

More information

Biomedical Engineering Image Formation II

Biomedical Engineering Image Formation II Biomedical Engineering Image Formation II PD Dr. Frank G. Zöllner Computer Assisted Clinical Medicine Medical Faculty Mannheim Fourier Series - A Fourier series decomposes periodic functions or periodic

More information

DIVIDE AND CONQUER II

DIVIDE AND CONQUER II DIVIDE AND CONQUER II master theorem integer multiplication matrix multiplication convolution and FFT Lecture slides by Kevin Wayne Copyright 2005 Pearson-Addison Wesley http://www.cs.princeton.edu/~wayne/kleinberg-tardos

More information

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016

Lecture 4 Filtering in the Frequency Domain. Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016 Lecture 4 Filtering in the Frequency Domain Lin ZHANG, PhD School of Software Engineering Tongji University Spring 2016 Outline Background From Fourier series to Fourier transform Properties of the Fourier

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 12 Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction permitted for noncommercial,

More information

2.161 Signal Processing: Continuous and Discrete Fall 2008

2.161 Signal Processing: Continuous and Discrete Fall 2008 MIT OpenCourseWare http://ocw.mit.edu 2.6 Signal Processing: Continuous and Discrete Fall 2008 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. MASSACHUSETTS

More information

A glimpse of Fourier analysis

A glimpse of Fourier analysis Chapter 7 A glimpse of Fourier analysis 7.1 Fourier series In the middle of the 18th century, mathematicians and physicists started to study the motion of a vibrating string (think of the strings of a

More information

Information and Communications Security: Encryption and Information Hiding

Information and Communications Security: Encryption and Information Hiding Short Course on Information and Communications Security: Encryption and Information Hiding Tuesday, 10 March Friday, 13 March, 2015 Lecture 5: Signal Analysis Contents The complex exponential The complex

More information

BME 50500: Image and Signal Processing in Biomedicine. Lecture 2: Discrete Fourier Transform CCNY

BME 50500: Image and Signal Processing in Biomedicine. Lecture 2: Discrete Fourier Transform CCNY 1 Lucas Parra, CCNY BME 50500: Image and Signal Processing in Biomedicine Lecture 2: Discrete Fourier Transform Lucas C. Parra Biomedical Engineering Department CCNY http://bme.ccny.cuny.edu/faculty/parra/teaching/signal-and-image/

More information

26. The Fourier Transform in optics

26. The Fourier Transform in optics 26. The Fourier Transform in optics What is the Fourier Transform? Anharmonic waves The spectrum of a light wave Fourier transform of an exponential The Dirac delta function The Fourier transform of e

More information

ECG782: Multidimensional Digital Signal Processing

ECG782: Multidimensional Digital Signal Processing Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu ECG782: Multidimensional Digital Signal Processing Filtering in the Frequency Domain http://www.ee.unlv.edu/~b1morris/ecg782/ 2 Outline Background

More information

7: FOURIER SERIES STEVEN HEILMAN

7: FOURIER SERIES STEVEN HEILMAN 7: FOURIER SERIES STEVE HEILMA Contents 1. Review 1 2. Introduction 1 3. Periodic Functions 2 4. Inner Products on Periodic Functions 3 5. Trigonometric Polynomials 5 6. Periodic Convolutions 7 7. Fourier

More information

Physics 250 Green s functions for ordinary differential equations

Physics 250 Green s functions for ordinary differential equations Physics 25 Green s functions for ordinary differential equations Peter Young November 25, 27 Homogeneous Equations We have already discussed second order linear homogeneous differential equations, which

More information

Fourier series. XE31EO2 - Pavel Máša. Electrical Circuits 2 Lecture1. XE31EO2 - Pavel Máša - Fourier Series

Fourier series. XE31EO2 - Pavel Máša. Electrical Circuits 2 Lecture1. XE31EO2 - Pavel Máša - Fourier Series Fourier series Electrical Circuits Lecture - Fourier Series Filtr RLC defibrillator MOTIVATION WHAT WE CAN'T EXPLAIN YET Source voltage rectangular waveform Resistor voltage sinusoidal waveform - Fourier

More information

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case.

Examples of the Fourier Theorem (Sect. 10.3). The Fourier Theorem: Continuous case. s of the Fourier Theorem (Sect. 1.3. The Fourier Theorem: Continuous case. : Using the Fourier Theorem. The Fourier Theorem: Piecewise continuous case. : Using the Fourier Theorem. The Fourier Theorem:

More information

λ n = L φ n = π L eınπx/l, for n Z

λ n = L φ n = π L eınπx/l, for n Z Chapter 32 The Fourier Transform 32. Derivation from a Fourier Series Consider the eigenvalue problem y + λy =, y( L = y(l, y ( L = y (L. The eigenvalues and eigenfunctions are ( nπ λ n = L 2 for n Z +

More information

Communication Signals (Haykin Sec. 2.4 and Ziemer Sec Sec. 2.4) KECE321 Communication Systems I

Communication Signals (Haykin Sec. 2.4 and Ziemer Sec Sec. 2.4) KECE321 Communication Systems I Communication Signals (Haykin Sec..4 and iemer Sec...4-Sec..4) KECE3 Communication Systems I Lecture #3, March, 0 Prof. Young-Chai Ko 년 3 월 일일요일 Review Signal classification Phasor signal and spectra Representation

More information

Vectors in Function Spaces

Vectors in Function Spaces Jim Lambers MAT 66 Spring Semester 15-16 Lecture 18 Notes These notes correspond to Section 6.3 in the text. Vectors in Function Spaces We begin with some necessary terminology. A vector space V, also

More information

ECE Digital Image Processing and Introduction to Computer Vision. Outline

ECE Digital Image Processing and Introduction to Computer Vision. Outline ECE592-064 Digital mage Processing and ntroduction to Computer Vision Depart. of ECE, NC State University nstructor: Tianfu (Matt) Wu Spring 2017 1. Recap Outline 2. Thinking in the frequency domain Convolution

More information

Fourier Transform for Continuous Functions

Fourier Transform for Continuous Functions Fourier Transform for Continuous Functions Central goal: representing a signal by a set of orthogonal bases that are corresponding to frequencies or spectrum. Fourier series allows to find the spectrum

More information

Notes and Problems for Applied Mathematics I

Notes and Problems for Applied Mathematics I Notes and Problems for Applied Mathematics I Charles L. Byrne December 7, 2005 2 Contents 1 The Fourier Transform 3 1.1 Basic Properties........................ 3 1.2 Examples............................

More information

80 Wyner PreCalculus Spring 2017

80 Wyner PreCalculus Spring 2017 80 Wyner PreCalculus Spring 2017 CHAPTER NINE: DERIVATIVES Review May 16 Test May 23 Calculus begins with the study of rates of change, called derivatives. For example, the derivative of velocity is acceleration

More information

Math 489AB A Very Brief Intro to Fourier Series Fall 2008

Math 489AB A Very Brief Intro to Fourier Series Fall 2008 Math 489AB A Very Brief Intro to Fourier Series Fall 8 Contents Fourier Series. The coefficients........................................ Convergence......................................... 4.3 Convergence

More information

Fourier transforms. R. C. Daileda. Partial Differential Equations April 17, Trinity University

Fourier transforms. R. C. Daileda. Partial Differential Equations April 17, Trinity University The Fourier Transform R. C. Trinity University Partial Differential Equations April 17, 214 The Fourier series representation For periodic functions Recall: If f is a 2p-periodic (piecewise smooth) function,

More information

Wave Phenomena Physics 15c

Wave Phenomena Physics 15c Wave Phenomena Physics 5c Lecture Fourier Analysis (H&L Sections 3. 4) (Georgi Chapter ) What We Did Last ime Studied reflection of mechanical waves Similar to reflection of electromagnetic waves Mechanical

More information

Higher-order ordinary differential equations

Higher-order ordinary differential equations Higher-order ordinary differential equations 1 A linear ODE of general order n has the form a n (x) dn y dx n +a n 1(x) dn 1 y dx n 1 + +a 1(x) dy dx +a 0(x)y = f(x). If f(x) = 0 then the equation is called

More information

INTRODUCTION TO THE DFS AND THE DFT

INTRODUCTION TO THE DFS AND THE DFT ITRODUCTIO TO THE DFS AD THE DFT otes: This brief handout contains in very brief outline form the lecture notes used for a video lecture in a previous year introducing the DFS and the DFT. This material

More information

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

4.3 The Discrete Fourier Transform (DFT) and the Fast Fourier Transform (FFT) CHAPTER. TIME-FREQUECY AALYSIS: FOURIER TRASFORMS AD WAVELETS.3 The Discrete Fourier Transform (DFT and the Fast Fourier Transform (FFT.3.1 Introduction In this section, we discuss some of the mathematics

More information

Series FOURIER SERIES. Graham S McDonald. A self-contained Tutorial Module for learning the technique of Fourier series analysis

Series FOURIER SERIES. Graham S McDonald. A self-contained Tutorial Module for learning the technique of Fourier series analysis Series FOURIER SERIES Graham S McDonald A self-contained Tutorial Module for learning the technique of Fourier series analysis Table of contents Begin Tutorial c 24 g.s.mcdonald@salford.ac.uk 1. Theory

More information

1 Curvilinear Coordinates

1 Curvilinear Coordinates MATHEMATICA PHYSICS PHYS-2106/3 Course Summary Gabor Kunstatter, University of Winnipeg April 2014 1 Curvilinear Coordinates 1. General curvilinear coordinates 3-D: given or conversely u i = u i (x, y,

More information

Fast Fourier Transform

Fast Fourier Transform Why Fourier Transform? Fast Fourier Transform Jordi Cortadella and Jordi Petit Department of Computer Science Polynomials: coefficient representation Divide & Conquer Dept. CS, UPC Polynomials: point-value

More information

Time-Frequency Analysis

Time-Frequency Analysis Time-Frequency Analysis Basics of Fourier Series Philippe B. aval KSU Fall 015 Philippe B. aval (KSU) Fourier Series Fall 015 1 / 0 Introduction We first review how to derive the Fourier series of a function.

More information

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes

Jim Lambers ENERGY 281 Spring Quarter Lecture 5 Notes Jim ambers ENERGY 28 Spring Quarter 27-8 ecture 5 Notes These notes are based on Rosalind Archer s PE28 lecture notes, with some revisions by Jim ambers. Fourier Series Recall that in ecture 2, when we

More information

Time-Dependent Statistical Mechanics A1. The Fourier transform

Time-Dependent Statistical Mechanics A1. The Fourier transform Time-Dependent Statistical Mechanics A1. The Fourier transform c Hans C. Andersen November 5, 2009 1 Definition of the Fourier transform and its inverse. Suppose F (t) is some function of time. Then its

More information

Chapter Generating Functions

Chapter Generating Functions Chapter 8.1.1-8.1.2. Generating Functions Prof. Tesler Math 184A Fall 2017 Prof. Tesler Ch. 8. Generating Functions Math 184A / Fall 2017 1 / 63 Ordinary Generating Functions (OGF) Let a n (n = 0, 1,...)

More information