written 5.3 years ago by |
Hd $\left(e^{j \omega }\right)=0 \quad$ for $=\pi / 4\ltW \leqslant \pi / 4$ $$ \begin{array}{l}{\text { -i }=e^{-j 2 \omega} \text { for } \pi / 4\lt|w|\lt\pi \text { . }} \\ {\text { Design the filter wing Hamming window. }}\alpha=2 \\ {\begin{array}{l}{\frac{N-\alpha}{2}=2} \\ \end{array}}\end{array} $$
N-1=4
N=5
$\begin{array}{rl}{w_{H(D)}} & {=0.54-0.46 \cos \left(\frac{2 \pi n}{4}\right) \quad \text { for } 0 \leq n \leq 4} \\ \hline & {=0} & {\text { otherwise }} \\ \hline w+(0) & {=0.54-0.46\left(0.5 \frac{1 \pi}{4} 0\right)} \\ {w_{H}(1)=0.54-0.46} & {\cos \left(\frac{2 \pi}{4} \cdot 1\right)} \\ {} & {=0.54-0=0.54=w_{H}(3)} \\ {} & {=0.54-0=0.54=w_{H}(3)} \\ {} & {=0.54-0.46 \cos \left(\frac{2 \pi}{4} \cdot 2\right) }\end{array}$
$=0 \cdot 54+0 \cdot 46=1$
$\begin{aligned} h_{d}(0) &=\frac{1}{2 \pi}\left[\sin \pi(-2)-\sin \frac{\pi}{4}(-2)\right] \\ &=\frac{-1}{2 \pi}\left[0+\sin \frac{\pi}{2}\right]=\frac{-1}{2 \pi}=-0.15=h d(4) \\ h d(1)=& \frac{1}{\pi(-1)}\left[\sin \pi(-1)-\sin \frac{\pi}{4}(-1)\right] \end{aligned}$
hd $(2)=\lim _{h \rightarrow 2} \frac{\sin \pi(n-2)}{\pi(n-2)}+\lim _{n \rightarrow 2} \frac{\sin \pi / 4\left(n_{1}-2\right)}{4 \pi / 4(n-2)}=1-\frac{1}{4} : 0 : 75$ fitter impalse response $h\left(n^{\prime}\right)=h d(n) \cdot(n+n)$ $h(0)=h d(0) \cdot \omega+(0)=(-0.15)(0.08)=-0 : 01 \pi b(4)$ $b(1)=h d(-1) \cdot w+(7)=(-0.225)(0.54)=-0.11=b(3)$ $h(2)=h d(2) \cdot w_{H}(2)=(0.75)(1)=0.75$
$H(z)=\sum_{n=0}^{4} h(n) z^{n}$ $\quad=h(0) z^{0}+h(1) z^{-1}+h(2) z^{-2}+h(3) z-3+h(4) z^{-4}$ $=-0 \cdot 01-0 \cdot 11 z^{-1}+0,75 z^{-2}-0 \cdot 11 z^{-3}-0 \cdot 01 z^{-4}$
- Hanning window - $$ w_{H(n)=0} \cdot 5-0 \cdot 5 \cos \left(\frac{2 \pi n}{N-1}\right) \text { for } 0 \leq n \leq N-1 \text { : } $$ (1) design a Lip: with cat-ogs frequency 5 $\mathrm{kHz}$ sampling frequency 20 $\mathrm{kH}$ (ength $N=5$ use Hanning window with length $N=5$ $\rightarrow$ Normalized cut of frequency $f_{c}^{\prime}=\frac{f c}{F_{s}}=\frac{5 \mathrm{k} 4 \mathrm{z}}{20 \mathrm{kH} 2}=0.25$
$\begin{array}{|c|c|}\hline w_{c} & {=2 \pi f_{c}^{\prime}=2 \pi(0 \cdot 25)=0.5 \pi} \\ \hline N & {=5 \rightarrow \frac{\alpha=N-1}{2} \cdot \frac{5-1}{2}=2} \\ {} & {H_{d}\left(e^{j u 0}\right)=e^{-j 2 u s} \text { for } \sqrt{-0.5 \pi\lt| w \leq 0.5 \pi}} \\ {} & {=0} \\ {} & {=0} \\ {\omega_{H+1}(n)=0.5-0 \cdot 5 \cos \left(\frac{2 \pi n}{4}\right)} & {\text { for } 0 \leq n \leq 4}\end{array}$
$\begin{aligned} w_{H}(0)=0.5-0.5 \cos (0)=0 &=\omega_{N}(4) \\ \omega_{H}(1)=0.5-\cos 0.5 \cos \left(\frac{2 \pi}{4}(1)\right) \\=0.5-0.5 \cdot 5=\omega_{H}(3) \\ \omega_{H}(2)=0.5-0.5 \cos \left(\frac{2 \pi}{4}(2)\right) \\=0.5+0.5=1 \end{aligned}$
$\begin{aligned} h d(n)=& \frac{1}{2 \pi} \int_{-0}^{\infty} \frac{5 \pi}{2 \pi} e^{-i 2 \omega} \cdot e^{j \omega n} d \omega=\\ &=\frac{-0.5 \pi}{2 \pi}\left(^{0.5 \pi} e^{j \omega(n-2)} d w\right.\\ &=0.5 \pi \end{aligned}$
$=\frac{1}{2 \pi} \int_{0}^{0.5 \pi} e^{j w(n-2)} d w$ $=0.5 \pi$ $=\frac{1}{2 \pi} \frac{e^{j \omega(n-2)} | 0.5 \pi}{j(n-2)} | \begin{array}{c}{0.5 \pi} \\ {-0.5 \pi}\end{array}$ $=\frac{1}{2 \pi j(n-2)}\left[e^{j \pi / 2(n-2)}-e^{-j \pi / 2(n-2)}\right]$ $=\frac{1}{\pi(n-2)}\left[\frac{e^{j \pi | 2(n-2)} \cdot e^{-j \pi / 2(n-2)}}{2 j}\right]$
$$ \begin{aligned} h d(n)=& \sin \frac{\pi}{2}(n-2) \ &=\frac{2}{\pi(n-2)} \end{aligned} $$ $$ \begin{array}{r}{\pi(-2)} \ {\pi(-2)}\end{array} $$ $h_{0}[0)=\frac{\sin \pi / 2(-1)^{2}-4}{\pi(-1)^{2}-4}=\frac{5 i n \pi / 2}{-\pi}=0.318=h d 1(3)$ $h d(1)=\frac{\sin \pi / 2(-1) \cdot 2}{\pi(-1)}=\frac{-\sin \pi / 2}{-\pi}=0.318=h_{0} 1(3)$ $\operatorname{hd}(2)=\lim _{h \rightarrow 2} \frac{\sin \pi / 2(5-2)}{2 \pi / 2(n-2)}=\frac{1}{2}=0 \cdot 5$
$h(D)=h d(h)^{\prime}\left(U_{H}(D)\right) \quad$ is $h(0)=h d(0) \cdot \omega_{H}(0)=0=h(4)$ ( ) 2 add $x$ pirs $h(1)=h d(1) \cdot w_{H}(1)=(0 \cdot 5)(0 \cdot 318)=0 \cdot 159=h(3)$ $h(2)=h d(2) \cdot \omega_{H}(2)=(1)(0 \cdot 5)=0 \cdot 5$ $\begin{aligned} H(z) &=\sum_{n=0}^{4} h(n) \tau^{-n}=h(0) z^{0}+h(1) z^{-1}+h(2) z^{-2}+h(3) z^{-3} \ &=0.159 z^{-1}+0.5 z^{-2}+0.159 z^{-3} \end{aligned}$ ![enter image description here][2] Linear phase FIR filter design using window - 1 Design frequency response of lineac phase FIR filter $$ \begin{aligned} \text { Hd }\left(e^{j \omega}\right)=1 \cdot e^{-j 2 \omega} f_{0}+\pi / 4 \leq \omega \leq \pi / 4 \ \text { design the filect using sectangular window. } \ x=2 \ \frac{N-1}{2}=2 \end{aligned} $$
N-1=4 --> order of filter
N=5 --> length of filter
$W_R(n)=1 for 0\lt=n\lt=N-1$
=0 (otherwise)
$\begin{aligned} h(n)=\frac{1}{2 \pi} \int_{-\pi}^{\pi} H\left(e^{j \omega)} e^{j \omega n} d u\right.\\-\pi \\ h d(n)=\frac{1}{2 \pi} \int_{-\pi / 4}^{\pi / 4} \pm e^{-j 2 \omega} \cdot e^{j \omega n} d \omega \\ &=\frac{1}{2 \pi} \int_{-\pi / 4}^{\pi / 4} e^{j \omega(n-2)} d \omega \end{aligned}$
$\frac{1}{2 \pi j(n-2)}\left[e^{\frac{j \pi}{4}(n-2)}-e^{-j \frac{\pi}{4}(n-2)}\right]$ $=\frac{1}{\pi(n-2)}\left[\frac{e^{\frac{j \pi}{4}(n-2)}-e^{-j \frac{\pi}{4}(n-2)}}{2 j}\right]$
$\begin{array}{|r|r|}\hline h d(n) & {=\frac{\sin \pi | 4(n-2)}{\pi(n-2)}} \\ \hline & {d \cdot(0)=\frac{\sin \pi | 4(-2)}{\pi(-2)}=\frac{-\sin \pi / 2}{\pi(-2)}=\frac{-\sin \pi / 2}{-2 \pi}} \\ {} & {=\frac{1}{2 \pi}=0.15=h d(4)}\end{array}$
$\begin{aligned} h c |(1) &=\frac{\sin \pi / 4(-1)}{\pi(-1)}=\frac{-\sin \pi / 4}{-\pi} \frac{1}{\sqrt{2} \pi} \\ &=0.225=\operatorname{hd}(3) \\ &=\lim _{x \rightarrow 2} \frac{\sin \pi / 4(n-2)}{4 \pi / 4(n-2)}=0.25 \end{aligned}$
Filter impulse response $$ \begin{aligned}$$ $\begin{aligned} & h (n)=h d(n) \cdot W_{R}(n) \\ h(0) &=h d(0) \cdot W_{R}(0)=0+5=h(4) \\ h(f) &=h d(1) \cdot W R(1)=0+25-h(3) \\ h(2) &=h d(2) \cdot W R(2)=0 \cdot 25 \end{aligned}$
$$\\ h(5)=h d(5) \cdot W_{R}(5)=0 \end{aligned}$$
$H(z)=\sum_{n=0}^{4} h(n) z^{-n}=h(0) z^{0}+h(1) x^{-1}+h(2) z^{-2}+h(3) z^{-3}+h(4) z^{-4}$
$\frac{y(z)}{x(z)}=0.15+0.225 z^{-1}+0.25 z^{-2}+0.225 z^{-3}+0.15 z^-{}^4$ $y(z)=x(z)\left[0.15+0.225 z^{-1}+0.25 z^{-2}+0.225 z^{-3}+0.15 z^-{}^4\right]$