# Digital Filters

 Question 1
Let h[n] be a length-7 discrete-time finite impulse response filter, given by

h=4, h=3, h=2, h=1,
h[-1]=-3, h[-2]=-2, h[-3]=-1,

and h[n] is zero for $|n|\geq 4$. A length-3 finite impulse response approximation g[n] of g[n] has to be obtained such that

$E(h,g)=\int_{-\pi}^{\pi}|H(e^{j\omega })-G(e^{j\omega })|^2d\omega$

is minimized, where $H(e^{j\omega })$ and $G(e^{j\omega })$ are the discrete-time Fourier transforms of h[n] and g[n], respectively. For the filter that minimizes E(h,g), the value of 10g[-1]+g, rounded off to 2 decimal places, is ________
 A -18.05 B -32.45 C -27 D -20.25
GATE EC 2019   Signals and Systems
Question 1 Explanation:
From Parseval's theorem,
$\sum_{n=-\infty}^{\infty}|x[n]|^{2}=\frac{1}{2 \pi} \int_{-\pi}^{\pi}\left|X\left(e^{j \omega}\right)\right|^{2} d \omega$
So,
$\int_{-\pi}^{\pi}\left|H\left(e^{j \omega}\right)-G\left(e^{j \omega}\right)\right|^{2} d \omega=2 \pi \sum_{n=-3}^{3}|h(n)-g(n)|^{2}$
The solution of g(n) that minimizes E(h, g) also
minimizes $\sum_{n=-3}^{3}|h(n)-g(n)|^{2}$
$\sum_{n=-3}^{3}|h(n)-g(n)|^{2}$
$=|4-g(0)|^{2}+|3-g(1)|^{2}+|-3-g(-1)|^{2}+10$
The solution of g(n) that minimizes the above
equation is
$g(n)=(-3,4,3\}$
$So, 10 g(-1)+g(1)=10(-3)+3=-27$
 Question 2
The direct form structure of an FIR (finite impulse response) filter is shown in the figure. The filter can be used to approximate a
 A low-pass filter B high-pass filter C band-pass filter D band-stop filter
GATE EC 2016-SET-3   Signals and Systems
Question 2 Explanation:
\begin{aligned} y(n] &=5[x[n]-x[n-2]] \\ H(z) &=\frac{Y(z)}{X(z)}=5\left[1-z^{-2}\right] \\ \text{But,}\quad z &=e^{i \omega} \\ H\left(e^{j \omega}\right) &=5\left[1-e^{-j2w}\right]\\ \end{aligned} \begin{aligned} \omega&=0 \left|H\left(e^{j \omega}\right)\right|=0 \\ \omega&=\frac{\pi}{2} \left|H\left(e^{j \omega}\right)\right|=10 \\ \omega&=\pi \left|H\left(e^{j \omega)} \mid=0\right.\right. \end{aligned}
$\therefore \quad$ The given one is bandpass filter.
 Question 3
A continuous-time filter with transfer function $H(S)=\frac{2s+6}{s^{2}+6s+8}$ is converted to a discretetime filter with transfer function $G(z)=\frac{2z^{2}-0.5032z}{z^{2}-0.5032z+k}$ so that the impulse response of the continuous-time filter, sampled at 2 Hz, is identical at the sampling instants to the impulse response of the discrete time filter. The value of k is ________
 A 0.01 B 0.04 C 0.1 D 0.4
GATE EC 2016-SET-2   Signals and Systems
Question 3 Explanation:
\begin{aligned} \text{Given, }H(s)&=\frac{2 s+6}{s^{2}+6 s+8}=\frac{1}{s+2}+\frac{1}{s+4} \\ h(t) &=e^{-2 t} u(t)+e^{-4 t} u(t) \\ \text{Given, }f_{s} &=2 \mathrm{Hz} \end{aligned}
\begin{aligned} \text { For discrete time }, t &=n T_{s}=\frac{n}{2} \\ h[n] &=\left(e^{-n}+e^{-2 n}\right) \cup(n] \\ H(z) &=\frac{1}{1-e^{-1} Z^{-1}}+\frac{1}{1-e^{-2} Z^{-1}} \\ &=\frac{Z}{Z-e^{-1}}+\frac{Z}{Z-e^{-2}} \\ &=\frac{2 Z^{2}-0.5032 Z}{Z^{2}-0.5032 Z+0.049} \\ K &=0.049 \end{aligned}
There are 3 questions to complete. 