\title{COM-303 - Signal Processing for Communications}
\author{Homework \#3}
\date{Assigned on March 3, 2015.}
\begin{document}
\maketitle
\begin{exercise}{DFS and DFT}
Given a finite-length discrete signal $x[n]$ of length $N$ ($n=0,\cdots,N-1$) and its DFT $X[k]$. Derive the DFS $\widetilde{X}[k]$ of $x[n]$'s periodization $\tilde{x}[n]=x[n\mbox{ mod }N]$.
\end{exercise}
\begin{exercise}{Derivative in frequency}
\begin{enumerate}[(a)]
\item
Let
$$
x[n] \longleftrightarrow X(\e^{j\omega})
$$
be a DTFT transform-pair.
Assume $X(\e^{j\omega})$ to be differentiable, compute the inverse DTFT of $j\frac{\d}{\d \omega} X(\e^{j\omega})$.
\item
Compute the inverse DTFT of $\frac{\d}{\d\omega} \left(\frac{X(\e^{j\omega})}{\pi}\right)-2$. Which property of the DTFT allows you to simplify the calculation?
\end{enumerate}
\textit{Hint}: use integration by parts.
\end{exercise}
\begin{exercise}{DTFT visual inspection}
The real and imaginary parts of $X(\e^{j\omega})$ are (see Figure):
\begin{figure}[h!]
\centering
\def\localFigW{0.45\textwidth}
\begin{tabular}{cc}
\includegraphics[width=\localFigW]{szre}&
\includegraphics[width=\localFigW]{szim}\\
(a) The real part. & (b) The imaginary part.
\end{tabular}
\caption{Exercise 3}
\end{figure}
By visual inspection of the plots, prove that
\begin{enumerate}[(a)]
\item
$x[n]$ is $0$-mean, i.e., $\sum_{n\in\mathbb{Z}} x[n]=0$;
\item
$x[n]$ is real valued.
\end{enumerate}
\end{exercise}
\begin{exercise}{DTFT properties}
Derive the time-reverse and time-shift properties of the DTFT.
\end{exercise}
\begin{exercise}{Placherel-Parseval equaltiy}
Let $x[n]$ and $y[n]$ be two complex valued sequences and $X(\e^{j\omega})$ and $Y(\e^{j\omega})$ their corresponding DTFTs.
\begin{enumerate}[(a)]
\item
Show that
$$
\left\langle
x[n],y[n]
\right\rangle
=\frac{1}{2\pi}
\left\langle
X(\e^{j\omega}),Y(\e^{j\omega})
\right\rangle,
$$
where we use the inner products for $\ell_2(\mathbb{Z})$ and $\mathcal{L}_2([-\pi,\pi])$ respectively.
\item
What is the physical meaning of the above formula when $x[n]=y[n]$?
\end{enumerate}
\end{exercise}
\begin{exercise}{DTFT,DFT, and Matlab}
Consider the following infinite non-periodic discrete time signal:
$$
x[n]=\begin{cases}
0 & n<0,\\
1 & 0\leq n<a,\\
0 & n\geq a.
\end{cases}
$$
\begin{enumerate}[(a)]
\item
Compute its DTFT $X(\e^{j\omega})$.
We want to visualise now the magnitude of $X(\e^{j\omega})$ using Matlab. However, numeric computation programs as Matlab cannot handle continuous sequences as $X(\e^{j\omega})$, and to do so, we need to consider only a finite number of points.
\item\label{it:2}
Using Matlab, plot $10000$ points of one period of $|X(\e^{j\omega})|$ (from $0$ to $2\pi$) for $a=20$.
The DTFT is mostly a theoretical analysis tool, and in many cases, we will compute the DFT. Moreover, for obvious reasons, numeric computation programs as Matlab only compute the DFT. Recall that in Matlab we use the Fast Fourier Transform (FFT), an efficient algorithm to compute the DFT.
\item
Generate a finite sequence $x_1[n]$ of length $N=30$ such that $x_1[n]=x[n]$ for $n=1,\cdots,N$. Compute its DFT and plot its magnitude. Compare it with the plot obtained in (\ref{it:2}).
\item
Repeat now for different values of $N = 50, 100, 1000$. What can you conclude?