Thus $H(z)$ is a generalized linear phase filter with fractional delay $d=1/2$ and phase factor $\alpha=\pi/2$. %
\item The filter is of type IV since it has an even number of taps (2), it is antisymmetric, has a fractional group delay and a $\pi/2$ phase factor. %
Therefore the chain of transformations defines an LTI filter $\mathcal{G}$ with frequency response $G(e^{j\omega})= |H(e^{j\omega})|^2$. The corresponding impulse response is simply
\[
g[n]= h[n]\ast h[-n]
\]
What is interesting to note here is that, even though $\mathcal{R}$ is not time invariant, we can combine time variant
operators into an overall time-invariant transformation.
\item$G(e^{j\omega})$ is a real function, therefore its phase is zero.
The filter is clearly a bland lowpass with transition band approximatly between $0.3\pi$ and $0.4\pi$. [For the record, it has been designed with the command {\tt firpm(12, [0 .3 .35 1], [1 1 0 0])}, but this knowledge is not necessary to solve the exercise.]
\begin{enumerate}
\item By elimination, it cannot be Type III or IV, because either would have a zero in $\omega=0$ and it cannot be a Type II, since it would have a zero in $\pi$. Therefore it is Type I (odd-lenght, symmetric)
\item The plot shows the magnitude, but it is easy to count the 8 alternations:
\begin{itemize}
\item 3 alternations in the passband (one at zero, one around $0.25\pi$ and one at band edge)
\item 5 alternations in stopband (ont at band edge, one at $\pi$ and 3 in between
\end{itemize}
We know that the number of taps will be $M =2L+1$ where $L+2$ is the number of alternations. Therefore, $M=13$.
\item Since we don't know the phase (the plot only shows the magnitude), we can't say if the filter is causal.
\item We're modulating the filter to $\pi$, thereby transforming the lowpass in highpass:
Note that it doesn't matter where the nonzero taps of the original impulse response are, since we're interested just in the magnitude response.
\end{enumerate}
\end{solution}
\def\pth#1{(#1)}
\begin{solution}{Demodulation}
The modulated signal is given by
\[
y[n]= x[n]\cos\omega_c n,
\]
where $x[n]$ is the bandlimited signal. The purpose of demodulation is to extract the original signal from the modulated input signal. Remark that techniques A and B require the knowledge of the carrier frequency $\omega_c$, while the Galena demodulator does not.
\begin{itemize}
\item[A)]{\bf Classic demodulation:} After the multiplication by a copy of the carrier, the signal is given by
\begin{eqnarray*}
u[n] &=& y[n] \cos\omega_c n\\
&=& x[n] \cos^2\omega_c n\\
&=&\frac{1}{2}x[n] + \frac{1}{2}x[n] \cos 2\omega_c n
From the figure, it's clear that if we use a lowpass with cutoff frequency just above $\omega_b/2$ (shown with a dashed line in the picture), then the components at $\pm2\omega_c$ will be filtered out, thereby recovering the orignal signal. Of course an ideal low-pass as in the plot is impossible to design in practice but we can use an IIR or an FIR filter with good properties instead. In particular, we can exploit the gap between the baseband spectrum and the copy at the higher frequency to allocate a gently sloping transition band for the filter; this allows us to use very simple lowpass filters. The drawback of this approach, however, is that if there is noise in the received signal, more noise will leak through into the demodulated signal if the transition band is large.
\item[B)]{\bf Complex demodulation:} remember that the Hilbert filter is defined as