**1 Answer**

written 23 months ago by | • modified 23 months ago |

Design steps for FIR filter using window techniques

- First find desired unit Impulse response for given filter using Inverse Fourier Transform from given desired frequency response.
- Find length of FIR filter.
- Find desired Impulse response coefficient for given length.
- Find window coefficient for given length $w[n]$.
- Find required response $h[n]$ by multiplying $h_d[n]$.
- From $h[n]$ find $H[z]$

**Window**

**1. Rectangular Window:**

It is given by

$w_R[n]=1 \space\space\space \space \space \space -(\frac{N-1}{2})\lt=n\lt=(\frac{N-1}{2})$

$w_R[n]=0 \space\space\space \space \space \space $ otherwise

Main lobe width : $\frac{4\pi}{N}$

As window is made longer main lobe becomes narrower and higher and the side lobe becomes more concentrated around $w=0$.

As the filter length N increases the main lobe becomes narrower decreasing the width of the transition region.

The convolution of desired reposense give rise to the ripple in the both passband and stop band.

If amplitude of sidelobe is more than amplitude of ripple is also more.

Gibbs phenomenon is more is rectangular window.

**2. Triangular Window**

$w_r[n]=1-\frac{2|n|}{N-1} \space\space\space \space \space \space -(\frac{N-1}{2})\lt=n\lt=(\frac{N-1}{2})$

$w_r[n]=0 \space\space\space \space \space \space $ otherwise

Main lobe width $=\frac{8\pi}{N}$.

Sidelobe smaller than rectangular window so ripple is less.

As mainlobe is wider than rectangular window therefore transition region is more .

Attenuation in the stopband is less.

**3. Hanning Window**

$w_H[n]=0.5+0.5cos(\frac{2\pi n}{N-1}) \space\space\space \space \space \space -(\frac{N-1}{2})\lt=n\lt=(\frac{N-1}{2})$

$w_H[n]=0 \space\space\space \space \space \space $ otherwise

Mainlobe width $=\frac{8\pi}{N}$

The main lobe width is twice of rectangular window which results in the doubling of the transition region of the filter.

The magnitude of the sidelobe level is -31 dB which is lower than that of rectangular window. So ripple is less in passband and stopband.

**4. Hamming Window**

$w_H[n]=0.54+0.46cos(\frac{2\pi n}{N-1}) \space\space\space \space \space \space -(\frac{N-1}{2})\lt=n\lt=(\frac{N-1}{2})$

$w_H[n]=0 \space\space\space \space \space \space $ otherwise

The main lobe peak is higher than hanning Window.

The first side lobe peak is improved with respect to hanning Window.

However at higher frequency the stopband Attenuation is low compared with hanning Window.

**5. Blackman Window**

$w_H[n]=0.42+0.5cos(\frac{2\pi n}{N-1})+0.08cos(\frac{4\pi n}{N-1}) \space\space\space \space \space \space -(\frac{N-1}{2})\lt=n\lt=(\frac{N-1}{2})$

$w_H[n]=0 \space\space\space \space \space \space $ otherwise

The addition of cosie term reduces the sidelobes but increases the main lobe width to $\frac{12\pi}{N}$.