1 / 20

Fast Fourier Transform

Fast Fourier Transform. Lecture 6 Spoken Language Processing Prof. Andrew Rosenberg. Overview. Fast Fourier Transform Multiplying Polynomials Relationship between polynomial multiplication and Fourier Analysis. Multiplying polynomials. Assume two polynomials of degree d .

marina
Download Presentation

Fast Fourier Transform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fast Fourier Transform Lecture 6 Spoken Language Processing Prof. Andrew Rosenberg

  2. Overview • Fast Fourier Transform • Multiplying Polynomials • Relationship between polynomial multiplication and Fourier Analysis

  3. Multiplying polynomials • Assume two polynomials of degree d. • The Fast Fourier Transform is an efficient (divide-and-conquer) way to do this.

  4. Multiplying polynomials • Assume two polynomials of degree d. Calculating ck takes Θ(d) steps. To calculate C(x) requires Θ(d2)

  5. Fast Fourier Transform • How to multiply polynomials efficiently. • What this has to do with frequency decomposition.

  6. Representing polynomials • A d degree polynomial can be represented by d+1 points. • “any points determine a line” Evaluation Coefficients Values Interpolation

  7. Multiplication algorithm Input: coefficients of two polynomials A(x) and B(x) and degree d Output: Their product C = AB Selection Pick points x0, x1, xn-1 where n >= 2d+1 Evaluation Compute A(x0), A(x1), ..., A(xn-1) and B(x0), B(x1), ..., B(xn-1) Multiplication Compute C(xk) = A(xk)B(xk) for all k = 0,..., n-1 Interpolation Recover C(x) = c0 + c1x + ... + c2dx2d

  8. Divide and Conquer for multiplication • How can we pick the n points used in evaluation? • Can we pick them to make the algorithm more efficient? • If we choose positive and negative pairs, the calculations overlap a lot.

  9. Example representation as even powers generally… Where Ae are the even coefficients and Ao the odd. Degree of Aeand Aoare <= d/2

  10. Divide and Conquer multiplication • Evaluating A(x) at n paired points can be done by evaluating Ae(x) and Ao(x) at n/2 points. • Recursively: • T(n) = 2T(n/2) + O(n) = O(n log n)

  11. Visualization What’s the problem with this recursion? Evaluate A(x) Evaluate Ae(x) and Ao(x)

  12. Complex numbers • After the top level of the recursion, none of the points are negative – no paired points anymore. • Solution: Use complex numbers.

  13. Complex roots of unity • Assume the “bottom” of the recursion will use +1. • Identify the n points to start with. +1 -1 +i -i • nth roots are plus minus paired • squaring them give the (n/2)th roots +1 -1 +1

  14. Relationship between Complex Numbers and Trig. functions Euler’s Theorem Discrete Fourier Transform

  15. Interpolation • We built the FFT to evaluate. • To Interpolate: Evaluation Coefficients Values Interpolation

  16. Fast Fourier Transform function FFT(a, w) --- Input: an array a = (a0,a1,…,an-1) for n a power of 2 and w, the inverse of a primitive nth root of unity. Output: coefficients --- if w = 1: return a (s0,s1,sn/2-1) = FFT(a0,a2,…,an-2),w2) (s’0,s’1,s’n/2-1) = FFT(a1,a3,…,an-1),w2) for j = 0 to n/2 – 1: rj = sj + wjs’j rj+n/2 = sj - wjs’j return r0,r1,…,rn-1

  17. Frame Overlapping • To construct a spectrogram, calculate the “Discrete Fourier Transform” (using the FFT) at overlapping frames. 10ms 10ms 10ms 10ms 10ms

  18. Example Spectrogram

  19. Single Frame of FFT Australian male /i:/ from “heed” FFT analysis window 12.8ms http://clas.mq.edu.au/acoustics/speech_spectra/fft_lpc_settings.html

  20. Next Class • Mel Frequency Cepstral Coefficients • PLP/Rasta Features • Reading: J&M 9.3

More Related