\documentstyle[12pt]{article}
\input{psfig.sty}
\input{figcommands.tex}
\textwidth 17cm
%\textheight 21cm
\textheight 22cm
\oddsidemargin=0cm
\evensidemargin=0cm
\topmargin=-1cm
%%%\topmargin=-3cm
\pagestyle{empty}
\begin{document}

\noindent {\bf Student name:}\\
\noindent {\bf Student number:}

\begin{center}
Department of Electrical and Computer Engineering\\
University of Toronto\\
\vspace{0.5cm}

ECE 431F, Digital Signal Processing (DSP); Prof. S. Mann\\
\vspace{0.5cm}

{\LARGE\bf MIDTERM TEST  }\\
{Friday October 19, 2001, 7PM to 8PM}
\vspace{0.5cm}

{\bf Time allowed: 60 minutes.  Type X (``aids allowed'').
\\
(3+6+8+8 = 25 points = 25\% of final grade)}
\end{center}
\vspace{0.5cm}

\noindent {\bf Note:} Please write your answers in the allocated space only.
All answers should be properly explained by providing appropriate detailed
arguments, reasoning, formulas, diagrams, etc..\\

%%%%{\bf Problem 1 (3+3+3=total 9 points)} \\

Q0 (3points): let x=[1+2*i 3+7*i 4+9*i];
calculate X=fft(x) and show that time-reversing the order of the samples
in x causes the samples in X to also be reversed.

Q1 (6 points): Three cosine signals, of frequencies 45kHz, 50kHz, and 55kHz,
have signal strengths, $a$, $b$, and $c$, respectively.
The positive frequency content is as shown below:
%\begin{figure}
 \figc{fig1.idraw,width=3in}
wherein you should know what the negative frequency content is based on the
fact that they are cosine signals.
% \caption{Three cosine signals of frequencies 45kHz, 50kHz, and 55kHz.}
% \label{fig:fig1}
%\end{figure}

A sampler that operates at only 45kHz is used to sample the above signal.

Q1a: Describe what is being depicted in the above figure.
     Is it a function?  Explain.

Q1b: Sketch the Fourier transform of the resulting (e.g.
     the output of your sampler when the above signal is
     connected to its input) discrete-time
     signal for the region $0 \leq \omega \le 2\pi$,
     where $\omega$ denotes fractional angular frequency.
     Is the signal depicted in your sketch a function?  Explain.

Q1c: Find the smallest value $N$ for which the N point DFT will contain
     the values $a$, $b$, and $c$, among its samples.

Q2 (8 points): A bankrupt global e-commerce middleware
Quality of Service (QoS) provider
has the following left as garbage on the curb in front of their
abandoned building for your free use:
\\ % need newline or fig follows text
\figc{fig2.idraw,width=6in}
\begin{itemize}
 \item five mystery ``Fortescue'' chips with the strange looking letters
       ``S.C.T.'' stamped on the top of each one.
       You are able to determine that each of these
       five devices performs a matrix multiplication
       of an input sample, with the following 3 by 3 matrix:
$$ %       \begin{equation}
        {\cal F} =
        \left[\begin{array} {ccc}
              1/3 & 1/3 & 1/3 \\
         1/3&-\frac{1}{6}+\frac{\sqrt{3}}{6}i&-\frac{1}{6}-\frac{\sqrt{3}}{6}i\\
         1/3&-\frac{1}{6}-\frac{\sqrt{3}}{6}i&-\frac{1}{6}+\frac{\sqrt{3}}{6}i
           \end{array}
        \right],
        \;\; \mbox{where}\;\; i=\sqrt{-1};
$$ %       \end{equation}
       %%% where $i=\sqrt{-1}$;
 \item one hundred conjugators;
 \item two hundred amplifiers that each amplify a possibly complex valued input
       by a possibly complex valued constant gain factor that you can set;
 \item three hundred adders that each add together two possibly complex valued
       input signals;
 \item hundreds of scraps of hookup wire;
 \item some drawings.
\end{itemize}

Q2a: Can you use some or all of these items to implement a 3 point DFT?
     If yes, explain (with clearly drawn diagrams, etc.) how it can be done.

Q2b: Can you use some or all of these items to implement an N point DFT,
     where $N$ is the number you determined in Question 1c?
     If yes, explain (with clearly drawn diagrams, etc.) how it can be done.

Q3 (8 points): The drawings (among the garbage you found on the curb) depict
     an interpolator as shown below: % (Fig~3)
     \\ % need newline or fig goes to right on page
%     \begin{figure}
      \figc{fig3.idraw,width=5.75in}
%      \caption{Interpolator}
%      \label{fig:fig3}
%     \end{figure}
     for realtime interpolation to take input signals having 3 samples,
     and convert them into output signals having $N$ samples
     (where N is, of course, a multiple of 3).
     A zero inserter inserts $(N-3)/3$ zeros after every sample.
     Then a filter is applied by using an $N$ point DFT
     (e.g. an $N$ point FFT) followed by
     an $N$ point IFFT.  Any filter coefficients that you wish to
     zero can be left unconnected
     (as indicated by switches in the diagram) or by using
     amplifiers with gains set to zero.

Q3a: If N is the number you determined in Question 1c, can this device be
     implemented using what you found in the garbage?
     If yes, explain (with clearly drawn diagrams, etc.) how it can be done.

Q3b: Devise another way of doing it, so that you either make it possible to
     do, or use fewer of the components than in Q3a.

\end{document}

