Summary of Widowed Fourier Series Method for Calculating FIR Filter Coefficients Step 1: Specify ‘ideal’ or desired frequency response of filter Step 2: Obtain impulse response, h D [n] of the desired filter by evaluating the inverse Fourier Transform as summarized in Table in next slide. Step 3: Select a window function that satisfies the passband or attenuation specifications and then determine the number of coefficients using the appropriate relationship between the filter length and the transition width Step 4: Obtain values of w[n] for the chosen window function and the values of the actual FIR coefficients, h[n] by multiplying h D [n] by w[n]
Summary of ideal impulse response of standard frequency selective filters Filter typeIdeal impulse response h D [n] h D [0] Low Pass High Pass1 Band Pass 2f 2 sinc(n 2 )- 2f 1 sinc(n 1 ) 2(f 2 -f 1 ) Band Stop 1-[2f 2 sinc(n 2 )- 2f 1 inc(n 1 )] 1-2(f 2 -f 1 )
Summary of Important Features of Common Window Functions Window RepresentationExpression Rectangular w R [n] 1 Hanningw hn [n] cos{2n /(N)} Hammingw hm [n] cos{2n /(N)} Blackmanw b [n] cos{2n /(N-1)} cos{4n /(N-1)} Order of filter = N = where c the coefficients depend on type of windows being used as in table next slide
Summary of Important Features of Common Window Functions….Cont Window Transition Passband Stopband Width RippleAttenuation (dB) (normalized) (dB) (maximum allowed) Rectangular 0.9/N Hanning 3.1/N Hamming 3.3/N Blackman 5.5/N
Example: Design a low-pass FIR filter to meet the following specs: Pass band edge frequency: 1500 Hz Transition width: 500 Hz. Stop-band attenuationA WS = > 50 dB Sampling frequencyf s = 8000 Hz. Problem Statement: 1.Meaning of given specifications are: Sampling frequency f s = 8000 Hz. Pass band edge frequency: f c =1500/8000 Transition width f = 500/8000. Stop-band attenuation A WS = > 50 dB
Design considerations contd… 2.The filter function is 3.Because of stop-band attenuation characteristics, either of the Hamming, Blackman or, Kaiser windows can be used. We use Hamming window: w hm [n] = cos{2n /(N-1)}
Design considerations contd… 4. f = transition band width/sampling frequency = 0.5/8 = = 3.3/N. Thus N = 52.8 53 i.e. for symmetrical window –26 n 26. f c ’ = f c + f/2 = ( )/8000 = Calculate values of h D [n] and w hm [n] for –26 n 26 Add 26 to each index so that the indices range from 0 to Plot the response of the design and verify the specifications.
Calculations: c = 2 f c ’ = 2 f c ’ =1.3745/ = h D (n) = f c ’ [sin(n c )/ n c ] w n = [ cos(2 n/N) The input signal to the filter function is a series of pulses of known width but of different heights manipulated as per the window function. The overall is the multiplication of two.
Calculations… h(n) = h D [n] w D [n] = {[sin(n c )/ n c ]} x {[ cos(2 n/N)} at n=0, since sin(n c )/n c = 1, and cos(0) = 1; h(0) = x[ ] = Again since 2 f c ’ / c = 1/ h(n)= [sin(1.3745n)/n ] [ cos(2 n/53)]
Coefficient Calculations