Download presentation
Presentation is loading. Please wait.
Published byBlaze Phillips Modified over 9 years ago
2
Fast Fourier Transform Lecture 6 Spoken Language Processing Prof. Andrew Rosenberg
3
Overview Fast Fourier Transform –Multiplying Polynomials –Relationship between polynomial multiplication and Fourier Analysis 1
4
Multiplying polynomials Assume two polynomials of degree d. The Fast Fourier Transform is an efficient (divide-and-conquer) way to do this. 2
5
Multiplying polynomials Assume two polynomials of degree d. 3 Calculating c k takes Θ(d) steps. To calculate C(x) requires Θ(d 2 )
6
Fast Fourier Transform How to multiply polynomials efficiently. What this has to do with frequency decomposition. 4
7
Representing polynomials A d degree polynomial can be represented by d+1 points. –“any points determine a line” 5 Coefficients Values Evaluation Interpolation
8
Multiplication algorithm Input: coefficients of two polynomials A(x) and B(x) and degree d Output: Their product C = AB Selection Pick points x 0, x 1, x n-1 where n >= 2d+1 Evaluation Compute A(x 0 ), A(x 1 ),..., A(x n-1 ) and B(x 0 ), B(x 1 ),..., B(x n-1 ) Multiplication Compute C(x k ) = A(x k )B(x k ) for all k = 0,..., n-1 Interpolation Recover C(x) = c 0 + c 1 x +... + c 2d x 2d 6
9
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. 7
10
Example representation as even powers generally… 8 Where A e are the even coefficients and A o the odd. Degree of A e and A o are <= d/2
11
Divide and Conquer multiplication Evaluating A(x) at n paired points can be done by evaluating A e (x) and A o (x) at n/2 points. Recursively: –T(n) = 2T(n/2) + O(n) = O(n log n) 9
12
Visualization Evaluate A(x) 10 Evaluate A e (x) and A o (x) x0x0 -x 0 x1x1 -x 1 …x n/2-1 -x n/2-1 x02x02 x12x12 …x n/2-1 2 What’s the problem with this recursion?
13
Complex numbers After the top level of the recursion, none of the points are negative – no paired points anymore. Solution: Use complex numbers. 11
14
Complex roots of unity Assume the “bottom” of the recursion will use +1. Identify the n points to start with. 12 +1 +1+i-i n th roots are plus minus paired squaring them give the (n/2) th roots
15
Relationship between Complex Numbers and Trig. functions 13 Euler’s Theorem Discrete Fourier Transform
16
Interpolation We built the FFT to evaluate. To Interpolate: 14 Coefficients Values Evaluation Interpolation
17
function FFT(a, w) --- Input: an array a = (a 0,a 1,…,a n-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 (s 0,s 1,s n/2-1 ) = FFT(a 0,a 2,…,a n-2 ),w 2 ) (s’ 0,s’ 1,s’ n/2-1 ) = FFT(a 1,a 3,…,a n-1 ),w 2 ) for j = 0 to n/2 – 1: r j = s j + w j s’ j r j+n/2 = s j - w j s’ j return r 0,r 1,…,r n-1 Fast Fourier Transform 15
18
Frame Overlapping To construct a spectrogram, calculate the “Discrete Fourier Transform” (using the FFT) at overlapping frames. 16 10ms
19
Example Spectrogram 17
20
Single Frame of FFT 18 http://clas.mq.edu.au/acoustics/speech_spectra/fft_lpc_settings.html Australian male /i:/ from “heed” FFT analysis window 12.8ms
21
Next Class Mel Frequency Cepstral Coefficients PLP/Rasta Features Reading: J&M 9.3 19
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.