Monday 25 April 2016

FIR FILTER USING WINDOW FUNCTION

It is a filter whose impulse response if of finite duration. We have implemented this filter for linear phase using both C programming and Scilab.
     We used C programming to find impulse response h(n). Attenuation in passband and stopband (As,AP), passband and stopband frequencies(fS,fP) and sampling frequency(FS) were taken as inputs. From these values desired impulse response function was calculated and was then multiplied by the window function. The window function is decided from the value of As. The As of window function should be greater than that of the input.
     Scilab was used to plot the magnitude spectrum and phase spectrum of the FIR filter.
     As we take window function with higher As value, the side lobe width goes on decreasing with increasing main lobe width. The phase response of the filter is linearly varying with frequency and no distortion is observed in the output. The output is same as input delayed by some constant.
 
https://drive.google.com/drive/folders/0BwJUrR8ne7NkY21ycmFDRVpWSk0

3 comments: