Page MenuHomec4science

99-is-exercises.tex
No OneTemporary

File Metadata

Created
Thu, Mar 13, 08:46

99-is-exercises.tex

\section{Exercises}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Zero-order hold}
Consider a discrete-time sequence $x[n]$ with DTFT $X(e^{j\omega})$. Next, consider the continuous-time interpolated signal
\[
x_0(t) = \sum_{n=-\infty}^{\infty}x[n] \,\mbox{rect}\,(t-n)
\]
i.e.\ the signal interpolated with a zero-order hold and $T_s = 1$~sec.
\begin{enumerate}
\item Express $X_0(f)$ (the spectrum of $x_0(t)$) in terms of $X(e^{j\omega})$.
\item Compare $X_0(f)$ to $X(f)$, the Fourier transform of the signal
\[
x(t) = \sum_{n\in\mathbb{Z}} x[n]\, \textrm{sinc} (t-n)
\]
Comment on the result: you should point out two major problems.
\end{enumerate}
As it appears, interpolating with a zero-order hold introduces in-band distortion in the region $|f| < 1/2$ and out-of-band spurious components at higher frequencies. Both problems could however be fixed by a well-designed continuous-time filter $G(f)$ applied to the ZOH interpolation.
\begin{enumerate}
\setcounter{enumi}{2}
\item Sketch the frequency response $G(f)$
\item Propose two solutions (one in the continuous-time omain, and another in the discrete-time domain) to eliminate or attenuate the in-band distortion due to the zero-order hold. Discuss the advantages and disadvantages of each.
\end{enumerate}
\end{exercise}
}\fi
\ifanswers{%
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Interpolation.}
Consider a finite-energy discrete-time sequence $x[n]$ with DTFT $X(e^{j\omega})$ and the continuous-time interpolated signal
\[
x_0(t) = \sum_{n=-\infty}^{\infty} x[n] \mbox{rect}\,(t-n)
\]
i.e. a signal obtained from the discrete-time sequence using a zero-centered zero-order hold with interpolation period $T_s = 1$s. Let $X_0(f)$ be the Fourier transform of $x_0(t)$.
\begin{enumerate}
\item Express $X_0(f)$ in terms of $X(e^{j\omega})$.
\item Compare $X_0(f)$ to $X(f)$, where $X(f)$ is the spectrum of the continuous-time signal obtained using an ideal sinc interpolator with $T_s=1$:
\[
x(t) = \sum_{n=-\infty}^{\infty} x[n]\textrm{sinc}(t-n)
\]
Comment on the result: you should point out two major problems.
\item The signal $x(t)$ can be obtained back from the zero-order hold interpolation via a continuous-time filtering operation:
\[
x(t)=x_0(t)\ast g(t).
\]
Sketch the frequency response of the filter $g(t)$.
\item Propose two solutions (one in the continuous-time domain, and another in the discrete-time domain) to eliminate or attenuate the distortion due to the zero-order hold. Discuss the advantages and disadvantages of each.
\end{enumerate}
\end{exercise}
}\fi
\ifanswers{%
\begin{solution}{}
\begin{enumerate}
\item
\begin{align*}
X_0(f) &= \int_{-\infty}^{\infty} x_0(t)e^{-j2\pi f t} dt\\
&= \int_{-\infty}^{\infty} \sum_{n=-\infty}^{\infty}x[n]\mbox{rect}\,(t-n)e^{-j2 \pi f t} dt \\
&= \sum_{n=-\infty}^{\infty} x[n] \int_{-\infty}^{\infty} \mbox{rect}\,(t-n)e^{-j2\pi f t} dt \\
&= \sum_{n=-\infty}^{\infty}x[n] e^{-j2\pi f n} \, \int_{-1/2}^{1/2} e^{-j2\pi f \tau} d\tau \\
&= X(e^{j2\pi f}) \, \frac{\sin(\pi f)}{\pi f}\, \\
&= \mbox{sinc}(f)\,X(e^{j2\pi f}).
\end{align*}
\item To understand the effects of the zero-order hold consider for instance a discrete-time signal with a triangular
spectrum, as shown in the left panel below. We know that sinc interpolation will exactly preserve the shape of the spectrum and return a continuous-time signal that is strictly bandlimited to the $[-F_s/2, F_s/2]$ interval (with $F_s = 1/T_s = 1$), that is:
\[
X(f) = \begin{cases}
X(e^{j2\pi f}) & |f| < 1/2 \\
0 & \mbox{otherwise}
\end{cases}
\]
as shown in the right panel below.
\begin{center}
\begin{tabular}{cc}
$X(e^{j\omega})$ & $X(f)$ \\
\begin{dspPlot}[xtype=freq,xout=true,width=5cm,height=2cm]{-1,1}{0,1.2}
\dspFunc{x \dspTri{0}{1}}
\end{dspPlot}
&
\begin{dspPlot}[sidegap=0,xticks=0.5,yticks=none,width=5cm,height=2cm]{-1.5,1.5}{0,1.2}
\dspFunc{x \dspTri{0}{0.5}}
\end{dspPlot}
\end{tabular}
\end{center}
Conversely, the spectrum of the continuous-time signal interpolated by the zero-order hold is the product of $X(e^{j2\pi f})$, which is periodic with period $F_s = 1$ Hz, and the term $\sinc(f)$, whose first spectral null is for $f=1$ Hz. Here are the two terms, and their product, in magnitude:
\begin{center}
\begin{tabular}{cc}
$X(e^{j2\pi f})$ & $\sinc(f)$ \\
{ % need to group these lines to avoid a clash between the tabular environment and dspCustomTicks...
\begin{dspPlot}[sidegap=0,xticks=custom,yticks=custom,width=5cm,height=2cm]{-5,5}{0,1.2}
\dspCustomTicks[axis=x]{0 0 2 1 4 2}
\dspFunc{x \dspPeriodize \dspTri{0}{1}}
\end{dspPlot}
}
&
{
\begin{dspPlot}[sidegap=0,xticks=custom,yticks=none,width=5cm,height=2cm]{-5,5}{0,1.2}
\dspFunc{x \dspSinc{0}{2} abs}
\dspCustomTicks[axis=x]{0 0 2 1 4 2}
\end{dspPlot}
}
\end{tabular}
$X_0(f)$ \\
\begin{dspPlot}[sidegap=0,xticks=custom,yticks=none]{-4.5,4.5}{0,1.2}
\dspFunc{x \dspPeriodize \dspTri{0}{1} x \dspSinc{0}{2} mul abs}
\dspCustomTicks[axis=x]{0 0 2 1 4 2}
\end{dspPlot}
\end{center}
There are two main problems in the zero-order hold interpolation as compared to the sinc interpolation:
\begin{itemize}
\item The zero-order hold interpolation is NOT bandlimited: the $2\pi$-periodic replicas of the digital spectrum leak through in
the continuous-time signal as high frequency components. This is due to the sidelobes of the interpolation function in the frequency domain (rect in time $\leftrightarrow$ sinc in frequency) and it represents an undesirable high-frequency content which is typical of all local interpolation schemes.
\item There is a distortion in the main portion of the spectrum (that between$-F_s/2$ and $F_s/2 = 0.5$ Hz) due to the non-flat frequency response of the interpolation function. It can be seen if we zoom in the baseband portion:
\begin{center}
\begin{dspPlot}[sidegap=0,xticks=2,yticks=none]{-1,1}{0,1.2}
\dspFunc{x \dspPeriodize \dspTri{0}{1} x \dspSinc{0}{2} mul abs}
\dspCustomTicks[axis=x]{0 0 1 0.5}
\end{dspPlot}
\end{center}
\end{itemize}
\item As we have seen, $X(f) = X(e^{j2\pi f}) \rect(f)$ while $X_0(f) = \mbox{sinc}(f)\,X(e^{j2\pi f})$. Therefore
\[
G(f) = \begin{cases}
\frac{1}{\textrm{sinc}\left(f\right)} & |f| < 1/2 \\
0 & \mbox{otherwise}
\end{cases}
\]
\item A first solution is to compensate for the distortion introduced by $G(f)$ in the discrete-time domain. This is
equivalent to pre-filtering $x[n]$ with a discrete-time filter of magnitude $1/G(e^{j2\pi f})$ . The advantages of this method is that digital filters such as this one are relatively easy to design and that the filtering can be done in the discrete-time domain. The disadvantage is that this approach does not eliminate or attenuate the high frequency leakage outside the baseband.
In continuous time, one could cascade the interpolator with an analog lowpass filter to eliminate the leakage. The disadvantage is that it is hard to implement an analog lowpass which can also compensate for the in-band distortion introduced by $G(f)$; such a filter will also introduce unavoidable phase distortion (no analog filter has linear phase).
\end{enumerate}
\end{solution}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{A bizarre interpolator}
Consider the local interpolation scheme of the previous exercise but assume that the characteristic of the
interpolator is the following:
\[
I(t) = \begin{cases}
1 - 2|t| & \mbox{ for } |t| \leq 1/2 \\
0 & \mbox{ otherwise}
\end{cases}
\]
This is a triangular characteristic with the same support as the zero-order hold. If we pick an interpolation interval $T_s$ and interpolate a discrete-time signal $x[n]$ with $I(t)$, we obtain the continuous-time signal:
\[
x(t) = \sum_n x[n]\, I\! \left( \frac{t-nT_s}{T_s} \right)
\]
which looks like this:
\begin{center}
\begin{dspPlot}[height=\dspHeightCol,xout=true]{0,5}{-1.2,1.2}
\psset{linewidth=1pt,linecolor=ColorCT}
\psline(-.5, 0)(0, 1)(.5, 0)
\psline(.5, 0)(1, 0.7)(1.5, 0)
\psline(1.5, 0)(2, -0.2)(2.5, 0)
\psline(2.5, 0)(3, -1)(3.5, 0)
\psline(3.5, 0)(4, 0.5)(4.5, 0)
\psline(4.5, 0)(5, -0.5)(5.5, 0)
\psset{linecolor=black}
\dspTaps[linecolor=ColorDT]{0 1 1 0.7 2 -0.2 3 -1 4 0.5 5 -0.5}%
\end{dspPlot}
\end{center}
Assume that the spectrum of $x[n]$ between $-\pi$ and $\pi$ is
\[
X(e^{j\omega}) =
\begin{cases}
1 & \mbox{ for } |\omega| \leq 2\pi/3 \\
0 & \mbox{ otherwise}
\end{cases}
\]
(with the obvious $2\pi$-periodicity over the entire frequency axis).
\begin{enumerate}
\item Compute and sketch the Fourier transform $I(f)$ of the interpolating function $I(t)$. (Recall that the triangular function can be expressed as the convolution of $\mbox{rect}(t/2)$ with itself).
\item Sketch the Fourier transform $X(f)$ of the interpolated signal $x(t)$; in particular, clearly mark the Nyquist frequency $f_N = 1/(2T_s)$.
\item The use of $I(t)$ instead of a sinc interpolator introduces two types of errors: briefly describe them.
\item To eliminate the error \emph{in the baseband} $[-f_N, f_N]$ we can pre-filter the signal $x[n]$ with a filter $h[n]$ \emph{before} interpolating with
$I(t)$. Write the frequency response of the discrete-time filter $H(e^{j\omega})$.
\end{enumerate}
\end{exercise}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Aliasing or not.}
Consider a bandlimited continuous-time signal $x(t)$ with the following spectrum $X(f)$:
\begin{center}
\begin{dspPlot}[sidegap=0,xout=true,xticks=custom,yticks=custom]{-4,4}{0,1.2}
\dspFunc{x \dspQuad{0}{1}}
\dspCustomTicks[axis=x]{1 $2$KHz}
\end{dspPlot}
\end{center}
Sketch the DTFT of the discrete-time signal $x[n] = x(n/F_s)$ for the cases $F_s =4$KHz and $F_s = 2$KHz.
\end{exercise}
}\fi
\ifanswers{%
\begin{solution}{}
For $F_s =4$KHz there is no aliasing and the spectrum is like so:
\begin{center}
\begin{dspPlot}[xtype=freq,xout=true,yticks=none]{-1,1}{0,1.2}
\dspFunc{x \dspQuad{0}{1}}
\end{dspPlot}
\end{center}
For $F_s = 2$KHz there is aliasing and we have
\begin{center}
\begin{dspPlot}[xtype=freq,xout=true,yticks=none]{-1,1}{0,1.2}
\dspFunc{
x \dspQuad{-2}{2}
x \dspQuad{0}{2}
x \dspQuad{2}{2}
add add 2 div}
\end{dspPlot}
\end{center}
\end{solution}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Another view of Sampling}
An alternative way of describing the sampling operation relies on the concept of \textit{modulation by a pulse train}. Given a sampling interval $T_s$, a continuous-time pulse train $p(t)$ is an infinite collection of equally spaced Dirac deltas:
\[
p(t) = \sum_{k=-\infty}^{\infty}\delta(t-kT_s).
\]
The pulse train is the used to modulate a continuous-time signal:
\[
x_s(t) = p(t)\,x(t).
\]
Intuitively, $x_s(t)$ represents a ``hybrid'' signal where the nonzero values are only those of the discrete time samples that would be obtained by raw-sampling $x(t)$ with period $T_s$; however, instead of representing the samples a countable sequence (i.e. with a different mathematical object) we are still using a continuous-time signal that is nonzero only over infinitesimally short instants centered on the sampling times. Using Dirac deltas allows us to embed the instantaneous sampling values in the signal.
Note that the Fourier Transform of the pulse train is
\[
P(f) = F_s \sum_{k=-\infty}^{\infty} \delta \! \left( f- k F_s \right)
\]
(where, as per usual, $F_s = 1/T_s$). This result is a bit tricky to show, but the intuition is that a periodic set of pulses in time produces a periodic set of pulses in frequency and that the spacing between pulses frequency is inversely proportional to the spacing between pulses in time.
Derive the Fourier transform of $x_s(t)$ and show that if $x(t)$ is bandlimited to $F_s/2$, where $F_s = 1/T_s$, then we can reconstruct $x(t)$ from $x_s(t)$.
\end{exercise}
}\fi
\ifanswers{%
\begin{solution}{}
By using the modulation theorem, the product in time becomes a convolution in frequency:
\begin{align*}
X_s(f) &= X(f) \ast P(f) \\
&= \int_\mathbb{R} X(\varphi)P(f - \varphi)d\varphi \\
&= F_s \int_\mathbb{R} X(\varphi) \sum_{k \in \mathbb{Z}} \delta\left(f - \varphi - k F_s\right)d\varphi \\
&= F_s \sum_{k \in \mathbb{Z}} X\left(f - kF_s\right).
\end{align*}
In other words, the spectrum of the delta-modulated signal is the periodization (with period $F_s=1/T_s$) of the original spectrum. If the latter is bandlimited to $F_s/2$ there will be no overlap between copies in the periodization and therefore $x(t)$ can be obtained simply by lowpass filtering $x_s(t)$ in the continuous-time domain.
\end{solution}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{The sinc as an infinite product}
Show that
\[
\frac{\sin x}{x} = \prod_{k=1}^{\infty} \cos\left(\frac{x}{2^k}\right)
\]
by using (recursively) the trigonometric identity $\sin x = 2\sin \frac{x}{2}\cos \frac{x}{2}$ and the fact that $\lim_{x\rightarrow 0} \frac{\sin x}{x} = 1$.
\end{exercise}
}\fi\ifanswers{%
\begin{solution}{}
\begin{align*}
\sin x &= 2\sin \frac{x}{2}\cos \frac{x}{2} \\
&= 4\sin \frac{x}{4}\cos \frac{x}{4} \cos \frac{x}{2} \\
&= \ldots \\
&= 2^k\, \sin \frac{x}{2^k} \prod_{n=1}^{k} \cos \frac{x}{2^n}
\end{align*}
With this, for all $k ge 0$,
\[
\frac{\sin x}{x} = \frac{2^k}{x}\sin \frac{x}{2^k} \prod_{n=1}^{k} \cos \frac{x}{2^n};
\]
as $k$ goes to infinity, the first term tends to one and only the infinite product remains.
\end{solution}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Bandpass Sampling}
Consider a real, continuous-time signal $x_c(t)$ with the following spectrum $X_c(f)$:
\begin{center}
\begin{dspPlot}[height=\dspHeightCol,xtype=freq,xticks=custom]{-4,4}{0, 1.2}
\psline[linecolor=ColorCF](-4,0)(-2,0)(-2,1)(-1,0)(1,0)(2,1)(2,0)(4,0)
\dspCustomTicks{-2 $-2f_0$ -1 $-f_0$ 0 0 1 $f_0$ 2 $2f_0$}
\end{dspPlot}
\end{center}
\begin{enumerate}
\item What is the bandwidth of the signal? What is the minimum sampling period in order to satisfy the sampling theorem?
\item Take a sampling period $T_s = 1/(2f_0)$; clearly, with this sampling period, there will be aliasing. Plot the DTFT of the discrete-time signal $x_a[n] = x_c(nT_s)$.
\item Suggest a block diagram to reconstruct $x_c(t)$ from $x_a[n]$.
\item With such a scheme available, we can therefore exploit aliasing to reduce the sampling frequency necessary to sample a bandpass signal. In general, what is the minimum sampling frequency to be able to reconstruct, with the above strategy, a real-valued signal whose frequency support on the positive axis is $[f_0, f_1]$ (with the usual symmetry around zero, of course)?
\end{enumerate}
\end{exercise}
}\fi
\ifanswers{%
\begin{solution}{}
\begin{enumerate}
\item The highest nonzero frequency is $2f_0$ and therefore $x_c(t)$ is $4f_0$-bandlimited. The minimum sampling frequency that satisfies the sampling theorem is $F_s = 4f_0$. Note however that the support over which the (positive) spectrum is nonzero is the interval $[f_0, 2f_0]$ so that one could say that the total \emph{effective} bandwidth of the signal is only $2f_0$.
\item The digital spectrum will be the periodized continuous-time spectrum, rescaled to $[-\pi, \pi]$; the periodization after sampling at a frequency $F_a = 2f_0$, yields
\[
\tilde{X}_c(f) = \sum_{k = -\infty}^{\infty} X_c(f - 2kf_0).
\]
The general term $X_c(f - 2kf_0))$ is nonzero for $f_0 \leq |f - 2kf_0| \leq 2f_0 \quad \textrm{ for } k\in\mathbb Z$ or, equivalently,
\begin{align*}
(2k+1)f_0 & \leq f \leq (2k+2)f_0 \\
(2k-2)f_0 & \leq f \leq (2k-1)f_0.
\end{align*}
These are non-overlapping intervals and, therefore, no disruptive superposition will occur. The DTFT of the samples signal is
\[
X_a(e^{j\omega}) = 2f_0 \sum_{k = -\infty}^{\infty} X_c(\frac{\omega}{\pi}f_0 - 2kf_0);
\]
for instance, as $\omega$ goes from zero to $\pi$, the nonzero contribution to the DTFT will be the term $X_c(\frac{\omega}{\pi}f_0 - 2f_0)$ where the argument goes from $-2f_0$ to $-f_0$. The spectrum is represented here with periodicity explicit:
\begin{center}
\begin{dspPlot}[xtype=freq,xout=true,xticks=1,yticks=custom]{-4,4}{0,1.2}
\dspFunc{x \dspPeriodize \dspTri{0}{1}}
\dspCustomTicks[axis=y]{1 $2f_0$}
\end{dspPlot}
\end{center}
\item Here's a possible scheme:
\begin{itemize}
\item Sinc-interpolate $x_a[n]$ with period $T_a = 1/F_a$ to obtain $x_b(t)$; the spectrum will be like so:
\begin{center}
\begin{dspPlot}[xtype=freq,xout=true,xticks=custom,yticks=custom,width=5cm,height=2cm]{-4,4}{0,1.2}
\dspFunc{x -2 lt {0} {x 2 gt {0} {x \dspPeriodize \dspTri{0}{1}} ifelse} ifelse}
\dspCustomTicks[axis=y]{1 $2f_0$}
\end{dspPlot}
\end{center}
\item filter in continuous time $x_p(t)$ with an ideal bandpass filter with (positive) passband equal to $[f_0, 2f_0]$ to obtain $x_c(t)$.
\end{itemize}
\item The effective \emph{positive} bandwidth of a signal whose spectrum is nonzero only over $[-f_1, -f_0] \cup [f_0, f_1]$ is $W = f_1 - f_0$. Obviously the sampling frequency must be at least equal to the \textit{total} effective bandwidth, so a first condition on the sampling frequency is $F_s \geq 2W.$ We can now distinguish two cases.
\begin{itemize}
\item[1)] assume $f_1$ is a multiple of the positive bandwidth, i.e.\ $f_1 = MW$ for some integer $M > 1$ (for $x[n]$ above, it was $M = 2$). Then the argument we made before can be easily generalized: if we pick $F_s = 2W$ and sample we have that
\[
\tilde{X}_c(f) = \sum_{k = -\infty}^{\infty} X_c(f - 2kW).
\]
The general term $X_c(f - 2kW)$ is nonzero only for
\[
f_0 \leq |f - 2kW| \leq f_1 \quad \textrm{for } k\in\mathbb Z.
\]
Since $f_0 = f_1 - W = (M-1)W$, this translates to
\begin{align*}
(2k+M-1)W & \leq f \leq (2k+M)W \\
(2k-M)W & \leq f \leq (2k-M+1)W
\end{align*}
which, once again, are non-overlapping intervals.
\item[2)] if $f_1$ is \emph{not} a multiple of $W$ the easiest thing to do is to decrease the lower frequency $f_0$ to a new {\em smaller} frequency $f_0'$ so that the new positive bandwidth $W' = f_1 - f_0'$ divides $f_1$ exactly. In other words we set a new lower frequency $f_0'$ so that it will be $f_1 = M(f_1-f_0')$ for some integer $M>1$; it is easy to see that
\[
M = \biggl\lfloor \frac{f_1}{f_1 - f_0} \biggr\rfloor.
\]
since this is the maximum number of copies of the $W$-wide spectrum which fit \emph{with no overlap} in the $[0, f_0]$ interval. If $W > f_0$ obviously we cannot hope to reduce the sampling frequency and we have to use normal sampling. This artificial change of frequency will leave a small empty ``gap'' in the new bandwidth $[f_0', f_1]$, but that's no problem. Now we use the previous result and sample at $F_s = 2(f_1 - f_0')$ with no overlaps. Since $f_1 - f_0' = f_1/M$, we have that, in conclusion, the minimum sampling frequency is
\[
F_s = 2f_1 / \biggl\lfloor \frac{f_1}{f_1 - f_0} \biggr\rfloor
\]
i.e.\ we obtain a sampling frequency reduction factor of $\lfloor f_1/(f_1 - f_0) \rfloor$.
\end{itemize}
\end{enumerate}
\end{solution}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Digital processing of continuous-time signals}
For your birthday, you receive an unexpected present: a $4$~MHz sampler, complete with anti-aliasing filter. This means you can safely sample signals up to a frequency of $2$ ~MHz; since this frequency is above the AM radio frequency band, you decide to hook up the sampler to your favorite signal processing system and build an entirely digital radio receiver. In this exercise we will explore how to do so.
To simplify things a bit, assume that the AM radio spectrum extends from $1$~Mhz to $1.2$~Mhz and that in this band you have ten channels side by side, each one of which occupies $20$~KHz.
\begin{enumerate}
\item Sketch the digital spectrum at the output of the A/D converter, and show the bands occupied by the channels, numbered from $1$ to $10$, with their beginning and end frequencies.
\end{enumerate}
The first thing that you need to do is to find a way to isolate
the channel you want to listen to and to eliminate the rest.
For this, you need a bandpass filter centered on the band of
interest. Of course, this filter must be {\em tunable} in
the sense that you must be able to change its spectral
location when you want to change station. An easy way to
obtain a tunable bandpass filter is by modulating a lowpass
filter with a sinusoidal oscillator whose frequency is
controllable by the user:
\begin{enumerate}\setcounter{enumi}{1}
\item As an example of a tunable filter, assume $h[n]$ is an ideal lowpass filter with cutoff frequency $\pi/8$. Plot the magnitude response of the filter $h_m[n] = \cos(\omega_m n)h[n]$, where $\omega_m = \pi/2$; $\omega_m$ is called the {\em tuning frequency}.
\item Specify the cutoff frequency of a lowpass filter which can be used to select one of the AM channels above.
\item Specify the tuning frequencies for channel~$1$, $5$ and $10$.
\end{enumerate}
Now that you know how to select a channel, all that is left to do is to demodulate the signal and feed it to an interpolator and then to a loudspeaker.
\begin{enumerate}\setcounter{enumi}{4}
\item Sketch the complete block diagram of the radio receiver, from the antenna going into the sampler to the final loudspeaker. Use only one sinusoidal oscillator. Do not forget the filter before the interpolator (specify its bandwidth).
\end{enumerate}
The whole receiver now works at a rate of $4$ MHz; since it outputs audio signals, this is clearly a waste.
\begin{enumerate}\setcounter{enumi}{5}
\item Which is the minimum interpolation frequency you can use? Modify the receiver's block diagram with the necessary elements to use a lower frequency interpolator.
\end{enumerate}
\end{exercise}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Acoustic aliasing}
Assume $x(t)$ is a continuous-time pure sinusoid at $10$ KHz. It is sampled with a sampler at $8$ KHz and then interpolated back to a continuous-time signal with an interpolator at $8$ KHz. What is the perceived frequency of the interpolated sinusoid?
\end{exercise}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Interpolation subtleties}
We have seen that any discrete-time sequence can be sinc-interpolated into a continuous-time signal which is $F_s$-bandlimited; $F_s$ depends on the
interpolation interval $T_s$ via the relation $F_s = 1/T_s$.
Consider the continuous-time signal $x_c(t) = e^{-t/T_s}u(t)$ and the discrete-time sequence $x[n] = e^{-n}u[n]$. Clearly, $x_c(nT_s) = x[n]$; but, can we also say that $x_c(t)$ is the signal we obtain if we apply sinc interpolation to the sequence $x[n] = e^{-n}$ with interpolation interval $T_s$?
Explain in detail.
\end{exercise}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Time and frequency}
Consider a real continuous-time signal $x(t)$. All you know about the signal is that $x(t) = 0$ for $|t| > t_0$. Can you determine a sampling frequency $F_s$ so that when you sample $x(t)$, there is no aliasing? Explain.
\end{exercise}
}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifexercises{%
\begin{exercise}{Aliasing in time}\label{aliasTimeEx}
Consider an $N$-periodic discrete-time signal
$\tilde{x}[n]$, with $N$ an \emph{even} number, and let
$\tilde{X}[k]$ be its DFS:
\[
\tilde{X}[k] = \sum_{n=0}^{N-1}\tilde{x}[n]
\, e^{-j\frac{2\pi}{N}nk}\, ,\qquad \quad k\in \mathbb{Z}
\]
Let $\tilde{Y}[m] = \tilde{X}[2m]$, i.e.\ a ``subsampled''
version of the DFS coefficients; clearly this defines a
$(N/2)$-periodic sequence of DFS coefficients.
%Consider
Now consider
the $(N/2)$-point inverse DFS of $\tilde{Y}[m]$ and call
this $(N/2)$-periodic signal $\tilde{y}[n]$:
\[
\tilde{y}[n] = \frac{2}{N}\sum_{k=0}^{N/2-1}\tilde{Y}[k]
\, e^{j\frac{2\pi}{N/2}nk},\qquad \quad n \in \mathbb{Z}
\]
Express $\tilde{y}[n]$ in terms of $\tilde{x}[n]$ and
describe in a few words what has happened to $\tilde{x}[n]$
and why.
\end{exercise}
}\fi

Event Timeline