0
3.1kviews
Design a low pass FIR filter with 7 coefficients for the following specifications passband frequency $=0.25 \mathrm{khz}$ and sampling frequency $=1 \mathrm{khz} .$ Use hamming window in designing.
1 Answer
0
243views

Given:

Pass band Cut-off Frequency $F_{c}=0.25 \mathrm{khz}$

Sampling Frequency $F_{S}=1 \mathrm{khz}$

Length of FIR $\mathrm{LPF}(\mathrm{M})=7$

$\therefore \alpha=\frac{M-1}{2}=\frac{7-1}{2}=3$

$\therefore$ Cut-off Angular Frequency of digital filter

$\omega_{c}=\frac{2 \pi F_{c}}{F_{S}}=\frac{2 \pi \times 0.25}{1}=0.5 \pi$

Desired Frequency Response of a LPF is

$H_{d}\left(e^{j w}\right)=\left\{\begin{array}{cc}{C e^{-j \alpha \omega}} & {|\omega| \leq \omega_{c}} \\ {0} & {\omega_{c} \leq|\omega| \leq \pi}\end{array}\right.$

$=\left\{\begin{array}{cc}{1 e^{-j 3 \omega}} & {|\omega| \leq 0.5 \pi} \\ {0} & {0.5 \pi \leq|\omega| \leq \pi}\end{array}(\text { Assuming Gain } \mathrm{C}=1)\right.$

Desired Impulse Response

$h_{d}(n)=\frac{1}{2 \pi} \int_{-\pi}^{\pi} H_{d}(\omega) e^{j \omega n} d \omega$

$=\frac{1}{2 \pi}\left\{\int_{-\pi}^{-0.5 \pi} 0+\int_{-0.5 \pi}^{0.5 \pi} e^{-3 j \omega} e^{j \omega n} d \omega+\int_{0.5 \pi}^{\pi} 0\right\}$

$=\frac{1}{2 \pi} \int_{-0.5 \pi}^{0.5 \pi} e^{(n-3) j \omega} d \omega \cdots(1)$

$=\frac{1}{2 \pi}\left[\frac{e^{(n-3) j \omega}}{(n-3) j}\right]_{-0.5 \pi}^{0.5 \pi}$

$=\frac{1}{2 \pi} \times \frac{1}{(n-3) j}\left[e^{(n-3) j 0.5 \pi}-e^{-(n-3) j 0.5 \pi}\right]$

$=\frac{1}{2 j(n-3) \pi} \times 2 j \sin (n-3) 0.5 \pi$

$=\frac{1}{(n-3) \pi} \sin (n-3) 0.5 \pi(\mathrm{n} \neq 3)$

Put $n=3$ in $(1), h_{d}(3)=\frac{1}{2 \pi} \int_{-0.5 \pi}^{0.5 \pi} e^{0} d \omega$

$=\frac{1}{2 \pi}[\omega]_{-0.5 \pi}^{0.5 \pi}$

$=\frac{1}{2 \pi}[0.5 \pi-(-0.5 \pi)]$

$=\frac{1}{2 \pi} \times 2 \times 0.5 \pi$

$=0.5$

$\therefore$ Desired Impulse Response

$h_{d}(n)=\left\{\begin{array}{cc}{\frac{\sin (n-3) 0.5 \pi}{(n-3) \pi}} & {n \neq 3} \\ {0.5} & {n=3}\end{array}\right.$

$h_{d}(n)$ is of infinite duration. To make it of finite duration we multiply it with Hamming window function

$W(n)=\left\{\begin{array}{cc}{0.54-0.46 \cos \frac{\pi n}{\alpha}} & {0 \leq n \leq M-1} \\ {0} & {\text { otherwise }}\end{array}\right.$

$=\left\{\begin{array}{cc}{0.54-0.46 \cos \frac{\pi n}{3}} & {0 \leq n \leq 6} \\ {0} & {\text { else }}\end{array}\right.$

$\therefore$ Finite Impulse Response $h(n)=h_{d}(n) \times W(n)$

$\therefore$ The filter coefficients $h(n)$ are

$\begin{array}{|c|c|c|c|}\hline \mathbf{n} & {h_{d}(n)} & {W(n)} & {h(n)} \\ \hline 0 & {-0.1061} & {0.08} & {-0.0085} \\ \hline 1 & {0.0000} & {0.31} & {0.0000} \\ \hline 2 & {0.3183} & {0.77} & {0.2451} \\ \hline 3 & {0.5000} & {1.00} & {0.5000} \\ \hline 4 & {0.3183} & {0.77} & {0.2451} \\ \hline 5 & {0.0000} & {0.31} & {0.0000} \\ \hline 6 & {-0.1061} & {0.08} & {-0.0085} \\ \hline\end{array}$

$\therefore$ Transfer Function of Digital FIR Filter is

$H(z)=Z\{h(n)\}=\sum_{n=0}^{7-1} h(n) \cdot z^{-n}$

$=-0.0085+0 z^{-1}+0.2451 z^{-2}+0.5 z^{-3}+0.2451 z^{-4}+0 z^{-5}-0.0085 z^{-6}$

$=-0.0085\left(1+z^{-6}\right)+0.2451\left(z^{-2}+z^{-4}\right)+0.5 z^{-3}$

Please log in to add an answer.