1 / 30

FFT Filtering

FFT Filtering. If we took the FFT of a sampled signal, changed the spectral components (e.g., deleted high frequencies), and then took the inverse FFT, we would be performing a filtering operation. x[n]. y[n]. FFT. IFFT. H[k]. X[k]. Y[k].

maire
Download Presentation

FFT Filtering

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 Filtering

  2. If we took the FFT of a sampled signal, changed the spectral components (e.g., deleted high frequencies), and then took the inverse FFT, we would be performing a filtering operation. x[n] y[n] FFT IFFT H[k] X[k] Y[k]

  3. The only problem with using this approach with real-time filtering is that the input sequence is typically a continuous stream and that the order of the FFT would be infinite. Even if the sequence is finite but large, there would be a large delay before the filtered signal is produced. Is it possible to perform FFT’s to filter a sampled sequence in (finite-length) sampled segments?

  4. To see if this segment-based filtering is possible let us examine what happens when we filter a finite segment of sampled data. Let us look at an N-point segment of sampled data:

  5. Taking the DFT (FFT) of this segment we have We then filter this segment by multiplying X[k] by a filter function H[k]:

  6. We then take the inverse FFT of Y[k] to obtain y[n]. What is the resultant filtered function? To find-out the answer to this question, let us look at Y[k]:

  7. where (n-m)N is the difference n-mmodulo N.

  8. [If, say, n=1, m=2 and N=4, we have n-m=-1 and (n-m)4 = 3.] So, if Y[k] is the FFT of y[n], we have where *N is the cyclic convolution operator.

  9. So, the upper path on the FFT diagram is the cyclic convolution. *N x[n] y[n] FFT IFFT H[k] X[k] Y[k]

  10. Example: Find the cyclic convolution for N=4 of x[n] and h[n] where

  11. The cyclic convolution operation can be viewed fairly easily if we arrange the sample values of x[n] around a circle: x[1] x[2] x[0] x[3]

  12. We can then arrange the values of h[n-m] similarly. For n=0, we have the following: h[3] n=0 x[1] h[2] x[2] x[0] h[0] x[3] h[1]

  13. For n=1, we have h[0] n=1 x[1] h[3] x[2] x[0] h[1] x[3] h[2]

  14. For n=2, we have h[1] n=2 x[1] h[0] x[2] x[0] h[2] x[3] h[3]

  15. For n=3, we have h[2] n=3 x[1] h[1] x[2] x[0] h[3] x[3] h[0]

  16. The cyclic convolution is a sum of products. When we take the sum of products of x[m] and h[n-m] around the unit circle we have y[n].

  17. h[3] n=0 x[1] h[2] x[2] x[0] h[0] x[3] h[1]

  18. h[0] n=1 x[1] h[3] x[2] x[0] h[1] x[3] h[2]

  19. h[1] n=2 x[1] h[0] x[2] x[0] h[2] x[3] h[3]

  20. h[2] n=3 x[1] h[1] x[2] x[0] h[3] x[3] h[0]

  21. Carrying-out the arithmetic, we have

  22. Exercise: Show that the FFT of y[n] is equal to the product of the FFT’s of h[n] and x[n] in this last example. Use the MATLAB fft() function.

  23. Example: Find the cyclic convolution for N=4 of x[n] and h[n] where

  24. 0 n=0 ½ 0 ¼ 1 1 0 ¼

  25. 1 n=1 ½ 0 ¼ 1 ¼ 0 0

  26. ¼ n=2 ½ 1 ¼ 1 0 0 0

  27. 0 n=3 ½ ¼ ¼ 1 0 0 1

  28. For our final answer, we have In this last example the cyclic convolution is the same as the ordinary convolution.

  29. The reason why the two convolutions yielded the same result is that the two functions x[m], and h[-m]do not overlap except at m=0when wrapped around the unit circle. We began our discussion of FFT filtering by proposing that we segment the stream of samples x[n] into segments of length N. If the length of each segment of x[n] plus the length of h[n] is less than or equal to N+1, then filtering can be performed.

More Related