1 / 16

FFT-based filtering and the Short-Time Fourier Transform (STFT)

FFT-based filtering and the Short-Time Fourier Transform (STFT). R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003. Using the FFT for DSP.

xaria
Download Presentation

FFT-based filtering and the Short-Time Fourier Transform (STFT)

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. FFT-based filteringand theShort-Time Fourier Transform (STFT) R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003

  2. Using the FFT for DSP • Because the FFT provides the means to reduce the computational complexity of the DFT from order (N2) to order (N log2(N)), it is often desirable to do FFT-based processing for DSP systems • Even the computational cost of doing both FFT and IFFT may be less than conventional methods Fast Convolution and the STFT R. C. Maher

  3. Linear Convolution via FFT

  4. Convolution • FIR digital filter computes the linear convolution of the unit sample response with the input signal • A filter of length P requires P2 complexity • Recall that convolution in time domain is multiplication in frequency domain • So, consider multiplying signal and filter transforms in the frequency domain Fast Convolution and the STFT R. C. Maher

  5. Circular Convolution • The DFT is a sampled version of the Fourier transform, so multiplying DFTs corresponds to circular convolution • Circular convolution can be thought of as “time-domain aliasing” • If we want linear convolution, we must ensure time-limited input signals to avoid time-domain aliasing (like bandlimiting to avoid frequency-domain aliasing) Fast Convolution and the STFT R. C. Maher

  6. Linear convolution with the DFT • Consider a unit sample response h[n] with finite length P, and a signal x[n] of length L • Linear convolution h*x has length L+P-1 • To avoid time-domain aliasing, we zero pad both sequences to at least length L+P-1, do FFT, multiply the transforms, then IFFT to get L+P-1 result Fast Convolution and the STFT R. C. Maher

  7. Overlap Processing • Now consider filter response of length P, but assume input signal is of arbitrarily long length: need to run filter “on the fly” as blocks of input data become available • Plan: break signal into consecutive blocks of length L, pad each with zeros to length L+P-1, and do FFT/multiply/IFFT Fast Convolution and the STFT R. C. Maher

  8. Overlap algorithm • Note that the last P-1 output samples will overlap the start of the next block, and the overlapping points must be added to get the proper response. This is known as the overlap-add algorithm. Fast Convolution and the STFT R. C. Maher

  9. Overlap-Add Process 0 L 2L 3L 4L x[n] h[n] y0[n]=h[n]*x0[n] y1[n]=h[n]*x1[n] y2[n]=h[n]*x2[n] y3[n]=h[n]*x3[n] Fast Convolution and the STFT R. C. Maher

  10. Short-Time Fourier Transform

  11. Short-Time Fourier Transform • It is often desirable to have an estimate of the input signal spectrum for a “short” interval, especially for non-stationary signals. Want to see changes in spectrum with time. • The Fourier transform gives the frequency response, but it has infinite summation Fast Convolution and the STFT R. C. Maher

  12. STFT (cont.) • Consider calculating a spectral “snapshot” by calculating Fourier transform of a short interval of the input signal w[n-m] x[n] Fast Convolution and the STFT R. C. Maher

  13. STFT (cont.) • Express the short-time Fourier transform as a 2-dimensional signal • Multiplying signal by a short time function causes smeared spectrum: convolution of the transforms Fast Convolution and the STFT R. C. Maher

  14. STFT viewpoints • Fourier transform viewpoint: group x[]·w[] • Take a sequence of DFTs as the window w[n-m] slides along the signal • Filter bank viewpoint: group x[n]e-jwn • Transform of w[n] is a low pass function • x[n]e-jwn is modulation: shifts spectrum of x[n] by w, where it can be filtered by low pass function Fast Convolution and the STFT R. C. Maher

  15. STFT Reconstruction • With some restrictions, it is possible to do perfect reconstruction. STFT and inverse STFT are a transform pair. • Typically use overlapping window functions during analysis, then overlap-add during synthesis Fast Convolution and the STFT R. C. Maher

  16. DSP Analysis/Process/Synthesis • Read in then next overlapping block of input samples • Apply analysis window • Perform FFT • Do frequency domain processing • Perform IFFT • Overlap-add into the output buffer Fast Convolution and the STFT R. C. Maher

More Related