0
2.0kviews
Design a high pass filter using Hamming window with a cut-off frequency of $1.2 \mathrm{rad} / \mathrm{sec}$ and number of , coefficients =9.
1
194views

Solution:

Here given $\Omega_c=1.2 \mathrm{rad} / \mathrm{sec}$.

As sampling frequency is not given

Assume $f_s=1 \mathrm{H}_2$.

$\omega_c=\frac{2 \Omega_c}{f_s}=1.2 \mathrm{rad} / \text { sample. }\\$

\begin{aligned}\\ 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}^{-1 \cdot 2} e^{j \omega n} d \omega+\left(\int_{1 \cdot 2}^{j \omega n} d \omega\right]\right.\\\\ &=\frac{1}{2 \pi}\left[\left(\frac{e^{j \omega n}}{j n}\right)_{-\pi}^{-1 \cdot 2}+\left(\frac{e^{j \omega n}}{j n}\right)_{1 \cdot 2}^\pi\right] \\\\ &=\frac{1}{2 \pi}\left[\left(\frac{e^{-j 1 \cdot 2 n}-e^{-j \pi n}}{j n}\right)+\left(\frac{e^{j \pi n}-e^{+j \cdot 2 n}}{j n}\right)\right].\\ \end{aligned}\\

\begin{aligned}\\ &h_d[n]=\left[\left(\frac{e^{j \pi n}-e^{-j \pi n}}{2 \pi j n}\right)-\left(\frac{e^{j-2 n}-e^{-j 1.2 n}}{2 \pi j n}\right]\right. \\\\ &h_d[n]=\frac{\sin \pi n}{\pi n}-\frac{\sin (1 \cdot 2 n)}{\pi n} ; \\\\ &-\left(\frac{N-1}{2}\right) \leqslant n \leqslant\left(\frac{N-1}{2}\right)\\ \end{aligned}\\

$\begin{gathered}\\ \text { Here } N=9 \\\\ h_d[0]=\lim _{n \rightarrow 0} \frac{\sin \pi n}{\pi n}-\lim _{n \rightarrow 0} \frac{\sin (1.2 n)}{\pi n}\\ \end{gathered}\\$

by $\perp$ Hospital Rule $\lim _{Q \rightarrow 0} \frac{\sin n Q}{Q}=n\\$

\begin{aligned}\\ &=1-\frac{1 \cdot 2}{\pi}\\\\ &h_d[0]=0.6180\\\\ &h_d[1]=h_d[-1]=\frac{\sin \pi}{\pi}-\frac{\sin (1.2)}{\pi}\\\\ &=0-0.29667\\\\ &=-0.29667\\ \end{aligned}\\

\begin{aligned}\\ &h_d[2]=h_d[-2]=\frac{\sin 2 \pi}{2 \pi}-\frac{\sin (1.2 \times 2)}{2 \pi}\\\\ &=-0.1075\\\\ &h_d[3]=h_d[-3]=\frac{\sin 3 \pi}{3 \pi}-\frac{\sin (1.2 \times 3)}{3 \pi}\\\\ &=0.04695\\\\ &h_d[4]=h_d[-4]=\frac{\sin 4 \pi}{4 \pi}-\frac{\sin (1.2 \times 4)}{4 \pi^{\circ}}\\\\ &=0.07927\\ \end{aligned}\\

Hamming Window:

$$W_H[n]=0.54+0.46 \cos \left(\frac{2 \pi n}{N-1}\right) ; \frac{-(N-1)}{2} \leq n \leq\left(\frac{N-1}{2}\right)\\$$

$$w_H[0]=1\\$$

\begin{aligned} w_H[1]=w_H[-1] &=0.54+0.46 \cos \left(\frac{2 \pi}{8}\right) \\\\ &=0.8652 \\ w_H[2]=w_H[-2] &=0.54+0.46 \cos \left(\frac{4 \pi}{8}\right) \\\\ &=0.54 \end{aligned}

\begin{aligned} W_H[3]=W_H[-3] &=0.54+0.46 \cos \left(\frac{6 \pi}{8}\right) \\\\ &=0.2147 \\ W_H[4]=W_H[-4] &=0.54+0.46 \cos \left(\frac{8 \pi}{8}\right) \\\\ &=0.08 \end{aligned}\\

\begin{aligned} h[n] &=h_d[n] \cdot W_H[n] \\\\ h[0]=h_d[0] W_H[0] &=0.6180 \times 1 \\\\ &=0.6180 \\\\ h[-1]=h[1]=h_d[1] W_H[1] &=(-0.29667)(0.8652) \\\\ &=-0.25667 \\\\ h[-2]=h[2]=h_d[2] W_H[2] &=(-0.1075)(0.54) \\\\ &=-0.05805 \\\\ h[-3]=h[3]=h_d[3] W_H[3] &=(0.04695)(0.2147) \\\\ &=0.01008 \\\\ h[-4]=h[4]=h_d[4] W_H[4] &=(0.07927)(0.08) \\\\ &=0.00634\\ \end{aligned}\\

$\begin{gathered}\\ h[n]=\{0.00634,0.01008,-0.05805, \\\\ -0.25667,0.6180,-0.25667,-0.05805 \\\\ 0.01008,0.00634\}\\ \end{gathered}\\$

\begin{aligned} H[z] &=\sum_{n=-\infty}^{\infty} h[n] z^{-n} \\\\\\ &=\sum_{n=-b}^{\infty} h[n] z^{-n} \\\\\\ &=\sum_{n=-4}^{-1} h[n] z^{-n}+h[0]+\sum_{n=1}^4 h[n] z^{-n} . \\\\\\ \text { as } h[n]=h[-n]\\\\ \end{aligned}\\\\

\begin{aligned} H[z]=& h[0]+\sum_{n=1}^4 n[n]\left[z^n+z^{-n}\right] \\ =& 0.618-0.25667\left(z+z^{-1}\right)-0.05805\left(z^2+z^{-2}\right) \\ &+0.01008\left(z^3+z^{-3}\right)+0.00634\left(z^4+z^{-4}\right] \end{aligned}

Now to make it causal

\begin{aligned} &h^{\prime}[n]=h[n-6] \stackrel{2}{\longrightarrow} z^{-4} H[2] \\\\ &H^{\prime}[2]=z^{-4} H[2]\\ \end{aligned}\\

\begin{aligned} H^{\prime}[z]=& {\left[0.618-0.2566\left(z+z^{-1}\right)-0.5805\left(z^2+z^{-2}\right)\right.} \\\\ &\left.+0.01008\left(z^3+z^{-3}\right)+0.00634\left(z^4+z^{-4}\right)\right] z^{-4}\\ \end{aligned}