Sunday, 23 April 2017

FIR FIlter Design using Windowing Method

             The second type of filters after IIR filters are FIR filters(Finite Impulse Response i.e. h[n] has finite length). The inherent advantage these filters possess is stability. After passing Ap,As,fp and fs in the code, it automatically calculates the filter order and the window type used. All window functions namely Rectangular,Bartlett,Hanning,Hamming and Blackman were analyzed. The window type is obtained from the attenuation in stopband(As). Here, inverse-DTFT of the ideal filter design is done to obtain desired h[n],after which  it is multiplied with the suitable window function to obtain the final output. For sharper frequency transitions from pass band to stop band, ripples are obtained in the frequency response. h[n] obtained is symmetric.

19 comments:

  1. Replies
    1. Check out MATLAB's documentation on FIR Window functions.

      Delete
  2. well explained

    ReplyDelete
    Replies
    1. Refer to TI's documentation for implementation.

      Delete
  3. which is best windowing method?

    ReplyDelete
    Replies
    1. It depends upon the application as well as the characteristics you want in your filter that has to be designed.

      Delete
    2. The windowing method depends on your input paramters.
      If you closely observe the frequency spectrum, the side lobes are more. These side lobes are not advisable. Based on this criterion you should select your filter.
      I had implemented a digital FIR filter using Hamming Window for ECG analysis. But the side lobes were more. Hence stopband attenuation was non-uniform.
      For practical application avoid sharper transition band as int increase the side lobes.

      Delete
  4. Which window has least errors?

    ReplyDelete
    Replies
    1. Errors depend on the practical application. Blackman filter,for example has highest stopband attenuation. Hence, there are least chances of errors. However, if the transition band width is reduced , more side lobes are observed. Hence , window functions should be selected after observing the frequency spectrums.

      Delete
  5. Replies
    1. While comparing Windowing and FSM methods , FSM is preferred. FSM involves DFT which has discrete frequency computations compared to IDTFT in windowing method.

      Delete
  6. FIR requires more storage than IIR Filters

    ReplyDelete
    Replies
    1. Floating point computation is another issue.

      Delete
  7. Blackman window function has the highest attenuation out of the ones mentioned in the blog

    ReplyDelete
    Replies
    1. Blckman window's passband is flat and that is a disadvantage.

      Delete
  8. blackman window gives the highest attenuation in stopband.

    ReplyDelete
    Replies
    1. True. It's not the best for all applications though.

      Delete
  9. All window functions have to be analyzed for obtaining the best output

    ReplyDelete
    Replies
    1. Yes. Comparative analysis of stopband attenuation is necessary.

      Delete