Page MenuHomec4science

2022final.tex
No OneTemporary

File Metadata

Created
Thu, Mar 13, 03:13

2022final.tex

\documentclass[12pt,a4paper]{article}
\usepackage{styles/SPhw}
\usepackage{enumitem}
\usepackage{cancel}
\usepackage{mathtools}
\usepackage{mdframed}
\includecomment{sol}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{DTFT}
Consider the function $f(\omega) = \left| \cos(\omega / 2) \right|$:
\begin{enumerate}
\item {[5p]} show that $f(\omega)$ is a valid DTFT (namely, that it is $2\pi$-periodic and square integrable)
\item {[10p]} find the sequence $x[n]$ whose DTFT $X(e^{j\omega})$ is equal to $f(\omega)$.
\end{enumerate}
\begin{sol}
\Solution
\begin{enumerate}
\item the function $f(\omega)$ is $2\pi$-periodic since
\[
f(\omega + 2k\pi) = |\cos(\omega/2 + k\pi)| = |(-1)^k\cos(\omega/2)| = |\cos(\omega/2)| = f(\omega).
\]
Additionally, $f(\omega) \in L_2([-\pi, \pi])$ since
\[
\int_{-\pi}^{\pi} |\cos(\omega/2)|^2 d\omega = \frac{1}{2}\left[ \omega + \sin\omega \right]_{-\pi}^{\pi} = \pi
\]
\begin{center}
\begin{dspPlot}[xtype=freq,xticks=1,yticks=1,height=2cm]{-4,4}{0,1.1}
\dspFunc{x 90 mul cos abs}
\end{dspPlot}
\end{center}
\item using the inverse formula for the DTFT:
\begin{align*}
x[n] &= \frac{1}{2\pi}\int_{-\pi}^{\pi} |\cos(\omega/2)| e^{j\omega n} d\omega \\
&= \frac{1}{2\pi}\int_{-\pi}^{\pi} \cos(\omega/2) e^{j\omega n} d\omega \\
&= \frac{1}{4\pi}\int_{-\pi}^{\pi} (e^{j\omega / 2} + e^{-j\omega /2}) e^{j\omega n} d\omega \\
&= \frac{1}{4\pi}\int_{-\pi}^{\pi} e^{j\omega(n + 1/2)} + e^{j\omega(n - 1/2)} d\omega \\
&= \frac{-j}{4\pi}\left(\frac{1}{n + 1/2} e^{j\omega(n + 1/2)}\bigg\rvert_{-\pi}^{\pi} + \frac{1}{n - 1/2} e^{j\omega(n - 1/2)}\bigg\rvert_{-\pi}^{\pi}\right) \\
&= \frac{-j}{4\pi}\left(\frac{2j(-1)^n}{n + 1/2} - \frac{2j(-1)^n}{n - 1/2} \right) \\ \\
&= \frac{2}{\pi}\,\,\frac{(-1)^{n+1}}{4n^2 - 1}
\end{align*}
\begin{center}
\begin{dspPlot}[height=2cm]{-8,8}{-.8,.5}
\dspSignalOpt{/s 1 def}{x dup mul 4 mul 1 sub 0.63662 exch div s mul s -1 mul /s exch def}
\end{dspPlot}
\end{center}
\end{enumerate}
\end{sol}
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{System analysis}
Consider the following block diagram, where $a, b, c, d$ are real-valued coefficients:
\begin{center}
\begin{dspBlocks}{.8}{0.4}
$x[n]$~~~~ & \BDadd & \BDsplit & \BDadd & \BDadd & \BDsplit & \BDadd & ~~~~~$y[n]$ \\%
& & \BDdelay & & & \BDdelay & \\%
& & \BDsplit & & & \BDsplit & \\%
& & & & & \BDdelay & \\%
& & & & & &
\psset{arrows=->,linewidth=1.5pt}
\ncline{1,1}{1,2}\ncline{1,2}{1,4}\ncline{1,4}{1,5}\ncline{1,5}{1,7}\ncline{1,7}{1,8}
\ncline{1,3}{2,3}\ncline{2,3}{3,3}
\ncline{3,2}{1,2}\trput{$b$}\ncline{3,4}{1,4}\tlput{$d$}
\ncline{5,5}{1,5}\trput{$a$}\ncline{1,6}{2,6}\ncline{2,6}{4,6}\ncline{3,7}{1,7}\tlput{$c$}
\psset{arrows=-}
\ncline{3,2}{3,4}\ncline{3,6}{3,7}\ncline{5,5}{5,6}
\ncline{4,6}{5,6}
\end{dspBlocks}
\end{center}
\begin{enumerate}
\item {[10p]} Determine the values for $a, b, c, d$ so that the diagram implements the causal CCDE
\[
y[n] = x[n] + 3x[n-1] + 2x[n-2] + 2y[n-1] + \frac{1}{10}y[n-2] - \frac{1}{5}y[n-3].
\]
\item {[5p]} Is the resulting filter stable?
\end{enumerate}
\begin{sol}
\Solution
\begin{enumerate}
\item the block diagram shows the cascade of two incomplete second-order sections; the transfer function is therefore
\[
H(z) = \frac{1 + dz^{-1}}{1 - bz^{-1}} \, \frac{1 + cz^{-1}}{1 - az^{-2}} = \frac{1 + (c+d)z^{-1} + cdz^{-2}}{1 - bz^{-1} - az^{-2} + abz^{-3}}
\]
and the associated CCDE is
\[
y[n] = x[n] + (c+d)x[n-1] + (cd)x[n-2] + by[n-1] + ay[n-2] - (ab)y[n-3]
\]
from which
\begin{align*}
a &= 1/10 \\
b &= 2 \\
c &= 1 \\
d &= 2
\end{align*}
(alternatively, $c=2, d=1$ is also a valid choice).
\item The system has a pole in $z=2$ so it is not stable.
\end{enumerate}
\end{sol}
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{Communications}
In digital communication systems it is often necessary to precisely establish a \textit{timing reference} between transmitter and receiver. To this end, the transmitter will send a signal that contains a detectable feature at time $t = t_0$; the receiver will receive the signal after a propagation delay $t_d$ and detect the feature at time $t_1 = t_0 + t_d$. From this point on, with the transmitter using $t_0$ as the reference and the receiver using $t_1$, transmitter and receiver will be synchronized.
A common method to establish a timing reference is to send a sinusoidal carrier at frequency $f_c$ and to flip its sign at $t=t_0$, as illustrated in the following figure; by detecting the instant $t_1$ in which the phase jump occurs, the receiver achieves synchronization.
\begin{center}
\begin{dspPlot}[height=1cm,width=10cm,xout=true,xticks=custom,yticks=none,sidegap=0]{0,8}{-1.6, 1.6}
\dspFunc{x 360 mul x 2 le {0} {180} ifelse add cos}
\dspCustomTicks[axis=x]{2 $t_0$}
\dspText(-0.5, 0){TX}
\end{dspPlot}
\vspace{-1.2em}
\begin{dspPlot}[height=1cm,width=10cm,xout=true,xticks=custom,yticks=none,sidegap=0]{0.3,8.3}{-1.6, 1.6}
\dspFunc[linecolor=gray]{x 360 mul x 5 le {0} {180} ifelse add cos}
\dspCustomTicks[axis=x]{5 $t_1=t_0+t_d$}
\dspText(-0.2, 0){RX}
\end{dspPlot}
\end{center}
In this problem consider a simplified all-digital setup where the reference time at the transmitter is $n_0=0$; the transmitter's (infinite-length) timing signal at frequency $\omega_c > 0$ can be written as:
\[
s[n] = p[n]\cos(\omega_c n), \quad\mbox{ with }\quad
p[n] = \begin{cases}
+1 & n < 0 \\
-1 & n \ge 0
\end{cases}.
\]
Assume that the propagation delay is equal to an integer number of samples so that the received digital signal is simply
\[
x[n] = s[n - n_d], \qquad n_d \in \mathbb{N}^+.
\]
The signal $x[n]$ is processed at the receiver by the following system:
\vspace{2ex}
\begin{center}
\begin{dspBlocks}{1.3}{0.5}
& & \BDfilter{$H(z)$} & & & \\
$x[n]$~~ & \BDsplit & & \BDadd & \BDfilter{$D(z)$} & \BDfilter{$|\cdot|$} & ~~~$y[n]$ \\
\ncline{->}{2,1}{2,4} \ncline{->}{2,4}{2,5}^{$a[n]$~~~~} \ncline{->}{2,5}{2,6}^{$b[n]$} \ncline{->}{2,6}{2,7}
\ncline{2,2}{1,2} \ncline{->}{1,2}{1,3}
\ncline{1,3}{1,4}^{~~$j$} \ncline{->}{1,4}{2,4}
\end{dspBlocks}
\end{center}
where $H(z)$ is an ideal Hilbert filter, $D(z)$ is a length-$N$ FIR with complex-valued impulse response
\[
d[n] = \begin{cases}
e^{j\omega_c n} & 0 \le n < N \\
0 & \mbox{otherwise}
\end{cases}
\]
and the last block computes the magnitude of the filter's output, that is, $y[n] = |b[n]|$. (See the hints at the end of the exercise if you're unsure about how the Hilbert filter affects the signal.)
\begin{enumerate}
\item {[15p]} Assume $n_d = 20$; plot $y[n]$ over the interval $0 \le n \le 50$ for $N = 10$ and $N = 30$.
\item {[5p]} Describe a method to determine the value $n_d$ from $y[n]$.
\item {[5p]} What is the minimum value of $N$ that you can use in theory?
\item {[5p]} Why would you use a larger value than the theoretical minimum for $N$?
\end{enumerate}
\vspace{3ex}
Consider now a situation where the channel introduces an unwanted DC offset and so the received signal is now
\[
x[n] = s[n - n_d] + \epsilon,
\]
where $\epsilon$ is a positive real-valued constant. Assume the frequency of the timing signal is $\omega_c = 2\pi(A/B)$, with $A, B$ positive integers and $A<B$.
\begin{enumerate}
\setcounter{enumi}{4}
\item {[10p]} Determine which values for $N$ minimize the effects of the DC offset on the detection process for $n_d$.
\end{enumerate}
\vspace{2em}
\begin{mdframed}[backgroundcolor=gray!20]
\footnotesize Hints: let $\mathcal{H}\{\cdot\}$ denote the result of applying a Hilbert filter to a signal; then you can assume the following:
\vspace{-1ex}
\begin{itemize}
\item for a cosine-modulated signal: $\mathcal{H}\{w[n]\cos(\omega_0 n)\} = w[n]\sin(\omega_0 n)$
\item for a constant signal: $\mathcal{H}\{c\} = 0$
\end{itemize}
\end{mdframed}
\begin{sol}
\Solution
With a propagation delay of zero the received signal would be $x[n] = s[n]$ and so
\begin{align*}
a[n] &= x[n] + j(x \ast h)[n] \\
&= p[n]\cos(\omega_c n) + j p[n]\sin(\omega_c n) \\
& = p[n]e^{j\omega_c n}.
\end{align*}
Because of time invariance, with a nonzero propagation delay $n_d$, it is
\[
a[n] = p[n-n_d] e^{j\omega_c (n-n_d)}.
\]
The output of the FIR filter is
\begin{align*}
b[n] &= (a \ast d)[n] = \sum_{k=0}^{N-1} d[k]a[n-k] \\
&= \sum_{k=0}^{N-1} e^{j\omega_c k} e^{j\omega_c (n - n_d - k)} p[n - n_d - k] \\
&= e^{j\omega_c (n - n_d)}\sum_{k=0}^{N-1} p[n - n_d - k]
\end{align*}
and so
\[
y[n] = |b[n]| = \left| \sum_{k=0}^{N-1} p[(n - n_d) - k]\right|.
\]
We can now distinguish three cases:
\begin{itemize}
\item when $n - n_d < 0$, the argument to $p[\cdot]$, i.e. $(n - n_d) - k$, will be negative for all values of $k$ in the sum and so
\[
y[n] = \left| \sum_{k=0}^{N-1} 1\right| = N \quad \mbox{for $n < n_d$}
\]
\item similarly, when $n - n_d \ge N - 1$, the argument to $p[\cdot]$ will be non-negative for all $k$ and so
\[
y[n] = \left| \sum_{k=0}^{N-1} -1\right| = N \quad \mbox{for $n \ge n_d + N - 1$}
\]
\item for the other cases, i.e. for $n_d \le n < n_d + N - 1$ it is
\[
y[n] = \left| \sum_{k=0}^{n - n_d} 1 + \sum_{m=n - n_d + 1}^{N - 1} -1 \right| = |N - 2(n - n_d + 1)|.
\]
\end{itemize}
\begin{enumerate}
\item For a given value of $n_d$, the output $y[n]$ will be equal to $N$ for $n < n_d$ and for $n > n_d + N - 1$ while, in between these values, it will decrease linearly to a minumum value of zero for $n = n_d + N/2 - 1$ and then climb up back to $N$:
\def\yfun#1#2{x #1 1 sub le {#2 } {x #1 #2 1 sub add ge {#2 } {#2 x #1 sub 1 add 2 mul sub abs} ifelse} ifelse}
\begin{center}
\begin{dspPlot}[height=3cm,width=10cm,xout=true,xticks=10]{0,60}{0,12}
\dspFunc{\yfun{20}{10}}
\dspTaps{19 10 20 8}
\dspCustomTicks[axis=x]{24 24}
\dspText(5, 6){$N=10$}
\end{dspPlot}
\begin{dspPlot}[height=3cm,width=10cm,xout=true,xticks=10]{0,60}{0,32}
\dspFunc{\yfun{20}{30}}
\dspText(5, 15){$N=30$}
\dspTaps{19 30 20 28}
\dspCustomTicks[axis=x]{34 34}
\end{dspPlot}
\end{center}
\item In the ideal case, $y[n]$ starts to drop from its initial value of $N$ exactly for $n = n_d$, that is, $y[n] = N$ for $n < n_d$ and $y[n_d] = N-2$. So a simple detection scheme would place a threshold on $y[n]$ and look for its first ``dip'' from $N$ to $N-2$.
\item In the ideal case, for the method just described, we need a minimum FIR length $N=2$.
\item In non-ideal cases, the presence of noise would make $y[n]$ noisy as well. By using a filter of length $N$ the difference between the maximum and minimum values of $y[n]$ is equal to $N$ and so, if we use a long filter, we increase the noise margin in our estimation process.
\item If $x[n] = s[n - n_d] + \epsilon$ then, by linearity,
\[
a[n] = p[n-n_d] e^{j\omega_c (n-n_d)} + \epsilon
\]
and
\[
b[n] = e^{j\omega_c (n - n_d)}\sum_{k=0}^{N-1} p[n - n_d - k] + \epsilon\sum_{k=0}^{N-1}e^{j\omega_c k}
\]
Since $\omega_c = 2\pi(A/B)$, the effect of the DC offset will be eliminated for any value of $N$ that is a multiple of $B$
\[
N = mB, \quad m\in \mathbb{N}^+
\]
since the orthogonality of the roots of unity implies that
\[
\sum_{k=0}^{mB-1}e^{j\frac{2\pi}{B}Ak} = \frac{1 - e^{j\frac{2\pi}{B}AmB}}{1 - e^{j\frac{2\pi}{B}A}} = \frac{1 - e^{j 2\pi Am}}{1 - e^{j\frac{2\pi}{B}A}} = 0.
\]
\end{enumerate}
\end{sol}
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{Pole-zero plots}
In the following figure there are four input signals in the left column, four pole-zero plots in the middle, and four output signals on the right. For each input signal $x_i[n]$, $i = 1, 2, 3, 4$, find the filter $h_j[n]$ and the output $y_k[n]$ so that $y_k[n] = (x_i \ast h_j)[n]$. Assume that all filters are causal and all signals are infinite support (continuing in the obvious way outside of the plotted range). In your answer simply list four triples of the form $i \rightarrow j \rightarrow k$.
\def\sigPlot#1{
\hspace{-1em}
\begin{dspPlot}[height=2.5cm,width=4.5cm,xout=true,xticks=5]{-11,11}{-1.2,1.2}
\dspSignal{#1}
\end{dspPlot}}
\def\xa{\sigPlot{x 0 eq {1} {0} ifelse}}
\def\xb{\sigPlot{x 0 ge {1} {0} ifelse}}
\def\xc{\sigPlot{x 180 mul cos 0.75 mul 0.25 add}}
\def\xd{\sigPlot{x 11 add cvi 8 mod 8 div}}
\def\ya{\sigPlot{x 0 lt {0} {x 6 ge {0} {0.1666} ifelse} ifelse}}
\def\yb{\sigPlot{x 0 lt {0} {1 0.8 x exp sub} ifelse}} % \dspSignalOpt{\dspSetFilter{0.2}{-0.8}}{x 0 ge {1} {0} ifelse \dspFilter}
\def\yc{\sigPlot{0.5}}
\def\yd{\sigPlot{x 360 8 div mul 202.5 add cos}} % \dspSignalOpt[linecolor=gray]{\dspSetFilter{1 1.4142 1 0 -1 -1.4142 -1}{}}{x 11 add cvi 8 mod 8 div \dspFilter}
\def\zplane#1{
\hspace{-1.3em}
\begin{dspPZPlot}[width=3cm,clabel=~]{1.5}
#1
\end{dspPZPlot}}
\def\za{\zplane{
\dspPZ[type=zero,label=none]{0.5,0.866}
\dspPZ[type=zero,label=none]{0.5,-0.866}
\dspPZ[type=zero,label=none]{-1,0}
\dspPZ[type=zero,label=none]{-0.5,0.866}
\dspPZ[type=zero,label=none]{-0.5,-0.866}}}
\def\zb{\zplane{
\dspPZ[label=none]{0.8, 0}}}
\def\zc{\zplane{\dspPZ[type=zero,label=none]{-1,0}}}
\def\zd{\zplane{
\dspPZ[type=zero,label=none]{1,0}
\dspPZ[type=zero,label=none]{0,1}
\dspPZ[type=zero,label=none]{0,-1}
\dspPZ[type=zero,label=none]{-1,0}
\dspPZ[type=zero,label=none]{-0.707,0.707}
\dspPZ[type=zero,label=none]{-0.707,-0.707}}}
\begin{center}
\begin{tabular}{c|c|c}
\xc & \za & \yb \\
$x_1[n]$ & $H_1(z)$ & $y_1[n]$ \\[2em]
%
\xb & \zb & \yd \\
$x_2[n]$ & $H_2(z)$ & $y_2[n]$ \\[2em]
%
\xa & \zc & \yc \\
$x_3[n]$ & $H_3(z)$ & $y_3[n]$ \\[2em]
%
\xd & \zd & \ya \\
$x_4[n]$ & $H_4(z)$ & $y_4[n]$
\end{tabular}
\end{center}
\begin{sol}
\Solution
$1 \rightarrow 3 \rightarrow 3, \quad
2 \rightarrow 2 \rightarrow 1, \quad
3 \rightarrow 1 \rightarrow 4, \quad
4 \rightarrow 4 \rightarrow 2$
To establish each triple, we can look more in detail at each item in the figure.
\begin{enumerate}
\item Observations about the inputs:
\begin{itemize}
\item $x_1[n] = \delta[n]$ and so the corresponding output will be the impulse response of the associated filter;
\item $x_2[n] = u[n]$ and so the corresponding output will be the integrated impulse response of the associated filter, i.e., $y[n] = \sum_{k=0}^{n}h[k]$;
\item $x_3[n]$ is a periodic signal with period 2 (i.e. with the fastest possible frequency); it will therefore contain a term of the form $(-1)^n$ and, from the plot, it is easy to see that $x_3[n] = 0.75\,(-1)^n + 0.25$;
\item $x_4[n]$ is a periodic signal with period 8 and so it can be expressed as $x_4[n] = \sum_{k=0}^{7} \alpha_k e^{j\pi kn / 4}$.
\end{itemize}
\item Observations about the filters: note that a pole-zero plot determine the transfer function of a filter up to an unknown scaling factor $c$; with this,
\begin{itemize}
\item $H_1(z)$ is the pole-zero plot of a moving average filter of length 6, with impulse response $h_1[n] = c(u[n] - u[n-6])$;
\item $H_2(z)$ is the pole-zero plot of a leaky integrator with impulse response $h_2[n] = c \lambda^n$, $0 < \lambda < 1$;
\item $H_3(z)$ is an FIR with a single zero in $z=-1$ and thus it implements the CCDE $y[n] = c(x[n] + x[n-1])$;
\item $H_4(z)$ is an FIR with zeros at $e^{j\pi k/4}$ for $k = 0, \pm 2, \pm 3, 4$ and so it will cancel out any sinusoidal input component at frequencies $\omega_k = \pi k/4$ except for $k=\pm 1$.
\end{itemize}
\item Observations about the outputs:
\begin{itemize}
\item $y_1[n]$ is the impulse response of a moving average of length 6 so $y_1[n] = (x_1 \ast h_1)[n]$;
\item $y_2[n]$ starts at zero and grows exponentially and asymptotically; the shape is compatible with an expression of the form $y_2[n] = \sum_{k=0}^{n}\lambda^n$ for $0 < \lambda < 1$ so $y_2[n] = (x_2 \ast h_2)[n]$
\item $y_3[n]$ is a noncausal signal with infinite support and therefore the input can only be $x_3[n]$ or $x_4[n]$. By applying $H_3(z)$ to $x_3[n]$ we obtain $y[n] = x_3[n] + x_3[n-1] = 0.5 = y_3[n]$
\item $y_4[n]$ is a sinusoid of the form $\cos((\pi/4) n + \theta)$; since $H_4(z)$ cancels all frequencies at multiples of $\pi/4$ except $\pm \pi/4$ and since $x_4[n]$ contains only frequencies at multiples of $\pi/4$, $y_4[n] = (x_4 \ast h_4)[n]$
\end{itemize}
\end{enumerate}
\end{sol}
\end{exercise}
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{(10 points)}
Compute and sketch the DTFT of the following signal
\[
x[n] = \delta[n] + u[n+1] - u[n-2] - \sinc(n/3).
\]
\ifanswers{\em\vspace{3em}\par{\bfseries Solution: }
First of all, note that the signal is real and symmetric and therefore its DTFT will also be real and symmetric. Now call
\[
a[n] = \delta[n] + u[n+1] - u[n-2] = \begin{cases} 2 & n = 0 \\ 1 & |n| = 1 \\ 0 & \mbox{otherwise} \end{cases}
\]
and therefore
\[
A(e^{j\omega}) = \sum_{n=-1}^{1} a[n]e^{-j\omega n} = e^{j\omega} + 2 + e^{-j\omega} = 2 + 2\cos(\omega).
\]
The DTFT of $\sinc(n/3)$ is a rect of height three and support $[-\pi/3, \pi/3]$ and so
\[
X(e^{j\omega}) = 2 + 2\cos(\omega) - 3\rect(3\omega/2\pi).
\]
\begin{center}
\begin{dspPlot}[xtype=freq,xticks=3,yticks=1]{-1,1}{0, 3.5}
\dspFunc{x 180 mul cos 2 mul 2 add x \dspRect{0}{0.666666} 3 mul sub}
\end{dspPlot}
\end{center}
}\else{\vspace{1em}}\fi
\end{exercise}
\ifanswers{}\else{\vspace{10em}}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{(10 points)}
Consider a causal LTI system with transfer function
\[
H(z) = \frac{1}{1-e^{j\omega_0} z^{-1}} \qquad \omega_0 \in \mathbb{R}.
\]
Prove that the system is not BIBO stable by finding a causal bounded input signal that makes the output grow to infinity.
\ifanswers{\em\vspace{3em}\par{\bfseries Solution: }
From simple inspection, the CCDE describing the system is
\[
y[n] = x[n] + e^{j\omega_0}\, y[n]
\]
so that the impulse response is the sequence
\[
h[n] = e^{j\omega_0 n}u[n].
\]
Since $|h[n]| = 1$ for $n \ge 0$ the impulse response is not absolutely summable and therefore the system is not BIBO stable. For a generic causal input $x[n]$ the output is
\[
y[n] = (x\ast h)[n] = \sum_{k=0}^{n} x[k]e^{j\omega_0(n-k)} = e^{j\omega_0 n}\sum_{k=0}^{n} x[k]e^{-j\omega_0 k}.
\]
By choosing $x[n] = e^{j\omega_0 n}\, u[n]$, the above result becomes
\[
y[n] = e^{j\omega_0 n}\sum_{k=0}^{n} e^{j\omega_0 k}e^{-j\omega_0 k} = (n+1)e^{j\omega_0 n}
\]
ans since $|y[n]| = n+1$, the output grows unbounded.
}\else{\vspace{1em}}\fi
\end{exercise}
\ifanswers{}\else{\vspace{10em}}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{(10 points)}
Although the harmonic series is divergent, i.e., $\sum_{k=1}^{\infty} 1/k = \infty$, very similar derived series are surprisingly convergent. The so-called Leibniz formula, for instance, uses only the odd-indexed terms with alternating sign to yield
\[
\sum_{k=0}^{\infty} \frac{(-1)^k}{2k + 1} = 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \ldots = \frac{\pi}{4}.
\]
Consider now a continuous-time square wave $x(t)$ with period $P$, as shown in the figure below. Knowing that the signal can be expressed as the Fourier series
\[
x(t) = \frac{4}{\pi}\sum_{k=1}^{\infty}\frac{1}{2k-1}\sin(2\pi(2k-1)f_0 t)
\]
prove Leibniz formula by
a surprising result is that the alternating
\ifanswers{\em\vspace{3em}\par{\bfseries Solution: }
From simple inspection, the CCDE describing the system is
\[
y[n] = x[n] + e^{j\omega_0}\, y[n]
\]
so that the impulse response is the sequence
\[
h[n] = e^{j\omega_0 n}u[n].
\]
Since $|h[n]| = 1$ for $n \ge 0$ the impulse response is not absolutely summable and therefore the system is not BIBO stable. For a generic causal input $x[n]$ the output is
\[
y[n] = (x\ast h)[n] = \sum_{k=0}^{n} x[k]e^{j\omega_0(n-k)} = e^{j\omega_0 n}\sum_{k=0}^{n} x[k]e^{-j\omega_0 k}.
\]
By choosing $x[n] = e^{j\omega_0 n}\, u[n]$, the above result becomes
\[
y[n] = e^{j\omega_0 n}\sum_{k=0}^{n} e^{j\omega_0 k}e^{-j\omega_0 k} = (n+1)e^{j\omega_0 n}
\]
ans since $|y[n]| = n+1$, the output grows unbounded.
}\else{\vspace{1em}}\fi
\end{exercise}
\ifanswers{}\else{\vspace{10em}}\fi
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{(20 points)}
In 1734 Euler famously solved the so-called \textit{Basel problem}\/ by proving that
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}.
\]
As a signal processing expert, re-derive Euler's result by using the fact that the Hilbert filter, whose frequency response is allpass, has impulse response
\[
h[n] = \begin{cases}
0 & \mbox{$n$ even} \\
\frac{2}{\pi n} & \mbox{$n$ odd}.
\end{cases}
\]
\vspace{1em}
{\footnotesize \it Hint: at some point in the proof you may find it useful to split a series into even and odd terms: $\sum_{n=1}^{\infty} a_n = \sum_{n=1}^{\infty} a_{2n} + \sum_{n=1}^{\infty} a_{2n - 1}$.}
\ifanswers{\em\vspace{3em}\par{\bfseries Solution: }
Since the Hilbert filter is allpass, its $L_2$ norm is one:
\[
\|H(e^{j\omega})\|^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi} |H(e^{j\omega})|^2 d\omega = \frac{1}{2\pi}\int_{-\pi}^{\pi} d\omega = 1.
\]
By Parseval's theorem we therefore have that
\[
\|h[n]\|^2 = \|H(e^{j\omega})\|^2 = 1
\]
and so
\[
\sum_{n=-\infty}^{\infty} |h[n]|^2 = 2\sum_{n=1}^{\infty}\left(\frac{2}{\pi (2n-1)}\right)^2 = \frac{8}{\pi^2}\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2} = 1
\]
from which
\[
\sum_{n=1}^{\infty}\frac{1}{(2n-1)^2} = \frac{\pi^2}{8}.
\]
Now we can write
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \sum_{n=1}^{\infty} \frac{1}{(2n)^2} + \sum_{n=1}^{\infty} \frac{1}{(2n-1)^2} = \frac{1}{4}\sum_{n=1}^{\infty} \frac{1}{n^2} + \sum_{n=1}^{\infty} \frac{1}{(2n-1)^2}
\]
so that
\[
\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{4}{3} \sum_{n=1}^{\infty} \frac{1}{(2n-1)^2} = \frac{\pi^2}{6}.
\]
}\else{\vspace{1em}}\fi
\end{exercise}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{exercise}{(20 points)}
Determine the range of the real-valued feedback parameter $r$ for which the causal system implemented by the following block diagram is stable:
\vspace{2em}
\begin{center}
\begin{dspBlocks}{1.2}{0.4}
& & & & \\
$x[n]$~~~~ & \BDadd & \BDsplit & \BDsplit & ~~~~~$y[n]$ \\%
& & \BDdelay & & \\%
& \BDadd & \BDsplit & & \\%
& & \BDdelay & & \\%
& & & &
\psset{arrows=->,linewidth=1.5pt}
\ncline{2,1}{2,2} \ncline{2,2}{2,5}
\ncline{-}{4,3}{4,2} \taput{$1/2$}
\ncline{-}{6,3}{6,2}\taput{$-1$}
\ncline{2,3}{3,3} \ncline{3,3}{5,3} \ncline{-}{5,3}{6,3}
\ncline{6,2}{4,2}
\ncline{4,2}{2,2}
\ncline{1,2}{2,2}\ncline{-}{2,4}{1,4}\ncline{-}{1,4}{1,2}\taput{$r$}
\end{dspBlocks}
\end{center}
\ifanswers{\em\vspace{3em}\par{\bfseries Solution: }
The block diagram can be redrawn as
\vspace{2em}
\begin{center}
\begin{dspBlocks}{1.2}{0.4}
& & & & \\
$x[n]$~~~~ & \BDadd & \BDfilter{$G(z)$} & \BDsplit & ~~~~~$y[n]$ \\%
\psset{arrows=->,linewidth=1.5pt}
\ncline{2,1}{2,2} \ncline{2,2}{2,3}\ncline{2,3}{2,5}
\ncline{1,2}{2,2}\ncline{-}{2,4}{1,4}\ncline{-}{1,4}{1,2}\taput{$r$}
\end{dspBlocks}
\end{center}
where $G(z)$ is a pure-feedback second order system with transfer function
\[
G(z) = \frac{1}{1 + z^{-1} + z^{-2}} = \frac{1}{A(z)}.
\]
The overall input-output relation is thus $Y(z) = G(z)[X(z) + rY(z)]$ and so the system's transfer function is
\[
H(z) = \frac{G(z)}{1 - rG(z)} = \frac{1}{A(z) - r}
\]
}\else{\vspace{1em}}\fi
\end{exercise}
\end{document}

Event Timeline