\usepackage{../styles/defsDSPcourse} %check this file for the definitions of sets, abbreviations, parenthesis, environments etc.
\title{COM-303 - Signal Processing for Communications}
\author{Homework \#1}
\date{February 2015}
\begin{document}
\maketitle
\begin{exercise}{Digital signals}
Which one(s) of the following signals is/are digital?
\begin{enumerate}
\item Music recorded on a CD.
\item Music listened by the audience at a live concert.
\item Music recorded on a LP record (vinyl).
\item Photo recorded using a photographic film.
\item Photo recorded using a CCD sensor.
\item A page on a book.
\item The image of a book page on a Kindle.
\end{enumerate}
\end{exercise}
\begin{exercise}{Sampling music}
A music song recorded in a studio is stored as a digital sequence on a CD. The analog signal representing the music is 2 minutes long and is sampled at a frequency $f_s=44100\;s^{-1}$. How many samples should be stored on the CD? (Assume that the audio file is mono, or in other words, single channel).
\end{exercise}
\begin{exercise}{Elementary signals and operators}
Using elementary operators, express the delta signal $\delta[n]$ in terms of
the unit step $u[n]$ and conversely.
\end{exercise}
\begin{exercise}{Moving average}
Consider the following signal,
\begin{equation}
x[n] = \delta[n] + 2\delta [n-1] + 3\delta [n-2].
\end{equation}
Compute its moving average $y[n]=\frac{x[n]+x[n-1]}{2}$, where we call $x[n]$ the input and $y[n]$ the output.
\end{exercise}
\begin{exercise}{Operators and linearity}
A \emph{linear} operator is one for which the following holds:
\[
\left\{
\begin{array}{l}
S\{\alpha x[n]\} = \alpha S\{x[n]\} \\
S\{x[n] + y[n]\} = S\{x[n]\} + S\{y[n]\}
\end{array}
\right.
\]
\begin{enumerate}
\item Show that the delay operator $D\{x[n]\} = x[n-1]$ is linear.
\item Show that the squaring operator $S\{x[n]\} = x^2[n]$ is \emph{not} linear.
\end{enumerate}
\end{exercise}
\begin{exercise}{Operators with matrix notation}
In $\mathbb{C}^N$, any linear operator on a finite-length signal $x[n]$ can be expressed as a matrix-vector multiplication. Let us see an example: in $\mathbb{C}^N$, define the delay operator as the left circular shift of a vector
\[
D\{x[n]\} = [x[N-1] \; x[0] \; x[1] \; \ldots \;
x[N-2]]^T.
\]
Assume $N=4$ for convenience; it is easy to see that
\[
D\{x[n]\}=D\{\mathbf{x}\} = \begin{bmatrix}
0 & 0 & 0 & 1\\
1 & 0 & 0 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0
\end{bmatrix} \mathbf{x} = \mathbf{Dx}
\]
Write out the matrix form of the differentiation operator $\Delta\{x[n]\} = x[n]- D\{x[n]\} = x[n] - x[n-1]$ in $\mathbb{C}^4$.
%Let $\{\mathbf{x}^{(k)}\}_{k=0,\ldots,N-1}$ be a basis for a
%subspace $S$. Prove that any vector $\mathbf{z}\in S$ is
%\emph{uniquely} represented
%in this basis.\\\\
%\emph{Hint:} prove by contradiction.
%\end{exercise}
%
%
%\begin{exercise}{Fourier Basis}
%Consider the {\it Fourier basis} $\{ \wb^{(k)}\}_{k=0,
%\ldots,N-1}$, defined as:
%\[
%\wb_n^{(k)}=e^{-j\frac{2\pi}{N}nk}.
%\]
%\begin{enumerate}
%
%\item Prove that it is an {\it orthogonal basis} in $\setC^N$.
%
%\item Normalize the vectors in order to get an {\it orthonormal
%basis}.
%
%\end{enumerate}
%\end{exercise}
%
%
%\begin{exercise}{vector spaces}
%Show that the set of all ordered n-tuples $[a_1,a_2, \dots
%,a_n]$ with the natural definition for the sum: $[a_1,a_2, \dots
%,a_n]+[b_1,b_2, \dots ,b_n]=[a_1+b_1,a_2+b_2, \dots ,a_n+b_n]$ and
%the multiplication by a scalar: $\alpha[a_1,a_2, \dots
%,a_n]=[\alpha a_1,\alpha a_2, \dots ,\alpha a_n]$ form a vector
%space. Give its dimension and find a basis.
%\end{exercise}
%
%\begin{exercise}{Bases \& Matlab}
%Consider the following change of basis matrix in $\mathbb{C}^8$, with respect to the standard orthonormal basis:
%\[
% \mathbf{H} = \begin{bmatrix}
%1 & -1 & 0 & 0 & 0 & 0 & 0 & 0\\
%0 & 0 & 1 & -1 & 0 & 0 & 0 & 0\\
%0 & 0 & 0 & 0 & 1 & -1 & 0 & 0\\
%0 & 0 & 0 & 0 & 0 & 0 & 1 & -1\\
%1 & 1 & -1 & -1 & 0 & 0 & 0 & 0\\
%0 & 0 & 0 & 0 & 1 & 1 & -1 & -1\\
%1 & 1 & 1 & 1 & -1 & -1 & -1 & -1 &\\
%1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 &\\
%\end{bmatrix}.
%\]
%
%\begin{enumerate}
%\item What is an easy way to prove that the rows in $\mathbf{H}$ do indeed form a basis? (\emph{Hint}: it's enough to show that they are linearly independent, which is to say, that the matrix has full rank...)
%\item Use Matlab to verify point (a).
%\end{enumerate}
%The basis described by $\mathbf{H}$ is called the \emph{Haar basis} and it is one of the most celebrated cornerstones of a branch of signal processing called wavelet analysis (which we won't study in this class). To get a feeling for its properties, however, consider the following set of Matlab experiments:
%\begin{enumerate}
%\setcounter{enumi}{2}
%\item Verify that $\mathbf{H}\mathbf{H}^H$ is a diagonal matrix, which means the vectors are orthogonal.
%\item Consider a constant signal {\tt x = ones(8,1)} and compute its coefficients in the Haar basis.
%\item Consider an alternating signal \verb| x = (-1).^(0:7)'| and compute its coefficients in the Haar basis.