120 likes | 162 Vues
EFFICIENT SIMULTANEOUS MULTI-SCALE COMPUTATION OF FFTS. Dave Cohen. Concept. We would like to utilize properties of DFTs in order to save computation time when calculating variable window-length STFTs of the same signal.
E N D
EFFICIENT SIMULTANEOUS MULTI-SCALE COMPUTATION OF FFTS Dave Cohen
Concept • We would like to utilize properties of DFTs in order to save computation time when calculating variable window-length STFTs of the same signal. • This would allow us to visualize a certain signal at multiple resolutions for purposes of audio event detection.
Motivation • Window size generally known for analyzing speech signals. • For non-speech audio event detection, however, window size not known. • E.g. Door Slam sharply localized in time with a large frequency spread. • Mechanical noise has a fixed frequency bandwidth persisting over a long period of time.
DIF FFT • Decimation in Frequency breaks signal into its first half (x0[n]) and second half (x1[n]) . • This yields the following properties: • X[2k] = FN/2{x0[n]+ x1[n]}, 0 ≤ k < N/2 • X[2k+1] = FN/2{e−j2πn/N(x0[n] – x1[n])}, 0 ≤ k < N/2 • If X0[k] and X1[k] have already been calculated, X[2k] can computed with just N/2 additions. • X[2k]=X0[k]+X1[k], 0≤k<N/2 (1)
DIF FFT (cont.) • This simplification does not work with X[2k+1] because the signals are modulated. Modulation in time is the same as a shift in frequency: • FN/2{e−j2πn/Nx0[n]} = X0(ω + π/N) where X0(ω) is DTFT of x0[n] From this, we can find the DFT: • X0(π(2k + 1)/N) = X0[k + 1/2] Thus the following equation emerges for X[2k +1]: • X[2k+1] = X0[k + 1⁄2] – X1[k + 1⁄2],0 ≤ k < N/2(2) • Exact computation of (2) would require either an N-point FFT of both x0[n]and x1[n], or a size N/2 sinc-interpolation of the samples of X0[k]and X1[k]. • Both methods are more costly than direct computation, so for now we ignore a simplification on the odd samples and implement only equation (1).
Savings • Because the multi-scale FFT requires one extra N/2-point FFT calculation, two extra N/4-point FFT calculations, etc., its total complexity is: • N log N + (N/2) log(N/2) + 2(N/4) log(N/4) + 4(N/8) log(N/8) + ... + (N/4)(2) log(2). • To obtain the same results, however, the standard FFT algorithm has a complexity of: • N log N + 2(N/2)log(N/2) + 4(N/4)log(N/4) + ... + (N/2)(2)log(2). • The savings of the multi-scale FFT over the normal FFT, then, are: • (N/4) log(N) log(N/2) • If N = 8192 (so log(N) = 13), we save about 319,000 complex multiplications (42%).
Results from timing tests • The multi-scale FFT algorithm was tested against a fair-opponent DIF FFT implementation. • For window sizes from 211 through 220, multi-scale FFT took only 53% ± 1% as long. • Measured compute times of both implementations were almost exactly linear with respect to the log of the window sizes, as that value ranged from 11 to 20.
Further research • Approximate equation 2 by linear interpolation of frequency samples. • This would have two major advantages: • Offers huge computational savings. • Allows for easy calculation of overlapping windows.