Page MenuHomec4science

sol10.tex
No OneTemporary

File Metadata

Created
Thu, Mar 13, 02:55

sol10.tex

\documentclass[12pt,a4paper,fleqn]{article}
\usepackage{../styles/defsDSPcourse}
\title{COM-303 - Signal Processing for Communications}
\author{Solutions for Homework \#10}
\date{}
\begin{document}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{solution}{Multirate Signal Processing}
\centering
\psset{unit=0.8cm}
\begin{tabular}[h]{cc}
\begin{pspicture}(-.3,-1)(9,4)
\psaxes[labels=none,Dx=1]{->}(0,0)(8,2) \rput[d](4,-.3){$\pi/2$}
\rput[d](8,-.3){$\pi$}
\psline[linewidth=2pt](0,1.2)(1,1.2)(1,0)(2,1.2)(3,0)(3,1.2)(4,1.2)(4,0)
\end{pspicture}
&
\begin{pspicture}(-.3,-1)(9,4)
\psaxes[labels=none,Dx=1]{->}(0,0)(8,2) \rput[d](4,-.3){$\pi/2$}
\rput[d](8,-.3){$\pi$}
\psline[linewidth=2pt](4,0)(4,1.2)(5,1.2)(5,0)(6,1.2)(7,0)(7,1.2)(8,1.2)(8,0)
\end{pspicture}
\\
$Y_1(e^{j\omega})$ & $Y_2(e^{j\omega})$
\\
\begin{pspicture}(-.3,-1)(9,4)
\psaxes[labels=none,Dx=1]{->}(0,0)(8,2) \rput[d](4,-.3){$\pi/2$}
\rput[d](8,-.3){$\pi$} \psarc[linewidth=2pt](0,0){1}{0}{90}
\psarc[linewidth=2pt](4,0){1}{90}{180}
\psline[linewidth=2pt](4,0)(4,1)
\psline[linewidth=2pt](1,0)(2,1.2)(3,0)
\end{pspicture}
&
\begin{pspicture}(-.3,-1)(9,4)
\psaxes[labels=none,Dx=1]{->}(0,0)(8,2) \rput[d](4,-.3){$\pi/2$}
\rput[d](8,-.3){$\pi$} \psarc[linewidth=2pt](4,0){1}{0}{90}
\psarc[linewidth=2pt](8,0){1}{90}{180}
\psline[linewidth=2pt](4,0)(4,1) \psline[linewidth=2pt](8,0)(8,1)
\psline[linewidth=2pt](5,0)(6,1.2)(7,0)
\end{pspicture}
\\
$Y_3(e^{j\omega})$ & $Y_4(e^{j\omega})$
\end{tabular}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{solution}{Multirate identities}
\begin{enumerate}
\item In the $z$-domain, let us denote the downsampling by 2 and upsampling by 2 operations by $D_2\{\cdot\}$ and $U_2\{\cdot\}$ respectively, so that
\begin{align*}
U_2\{X(z)\} &= X(z^2) \\
D_2\{X(z)\} &= [X(z^{1/2}) + X(-z^{1/2})]/2
\end{align*}
\begin{itemize}
\item Using $z$-transforms, downsampling by 2 followed by filtering by $H(z)$ can be written as
\begin{align*}
Y(z) &= H(z)D_2\{X(z)\} \\
&= \frac{1}{2}H(z)\left(X(z^{1/2}) + X(-z^{1/2})\right).
\end{align*}
Filtering by $H(z^2)$ followed by downsampling by 2 can be written as
\begin{align*}
Y(z) &= D_2\{H(z^2)X(z)\} \\
&= \frac{1}{2}\left(H((z^{1/2})^2)X(z^{1/2}) + H((-z^{1/2})^2)X(-z^{1/2})\right) \\
&= \frac{1}{2}H(z)\left(X(z^{1/2}) + X(-z^{1/2}))\right).
\end{align*}
The two operations are thus equivalent.%
\item Filtering by $H(z)$ followed by upsampling by 2 can be written as
\begin{align*}
Y(z) &= U_2\{H(z)X(z)\} \\
&= H(z^2)X(z^2).
\end{align*}
Upsampling by 2 followed by filtering by $H(z^2)$ can be written as
\begin{align*}
Y(z) &= H(z^2)U_2\{X(z)\} \\
&= H(z^2)X(z^2).
\end{align*}
The two operations are thus equivalent.%
\end{itemize}
\item Using the identities proven in (a), the system can be redrawn as
\begin{center}
\begin{dspBlocks}{0.5}{0.4}
$x[n]$~ & \BDfilter{$H_2(z^2)$} & \BDupsmp{2} & \BDdwsmp{2} & \BDfilter{$H_1(z^2)$} & \BDupsmp{2} &\BDdwsmp{2} & $~y[n]$ \\
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,2}\ncline{->}{1,2}{1,3}\ncline{->}{1,3}{1,4}
\ncline{->}{1,4}{1,5}\ncline{->}{1,5}{1,6}\ncline{->}{1,6}{1,7}
\ncline{->}{1,7}{1,8}
\end{dspBlocks}
\end{center}
Upsampling by $N$ immediately followed by downsampling by $N$ leaves the signal unchanged so the transfer function of this system is given by
\begin{eqnarray*}
H(z)=\frac{Y(z)}{X(z)}=H_1(z)H_2(z).
\end{eqnarray*}
\item Again using (a), our system is equivalent to
\begin{center}
\begin{dspBlocks}{0.5}{0.4}
$x[n]$~ & \BDsplit & \BDfilter{$A(z)$} & \BDupsmp{2} & & \BDdwsmp{2} & \BDadd & $~y[n]$ \\
&& \BDfilter{$B(z)$} &\BDupsmp{2} & \BDfilter{$z^{-1}$} & \BDdwsmp{2} & \\
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,3}\ncline{->}{1,3}{1,4}\ncline{->}{1,4}{1,6}
\ncline{->}{1,6}{1,7}\ncline{->}{1,7}{1,8}
\ncline{->}{2,2}{2,3}\ncline{->}{2,3}{2,4}\ncline{->}{2,4}{2,5}
\ncline{->}{2,5}{2,6}\ncline{2,6}{2,7}
\ncline{1,2}{2,2}\ncline{->}{2,7}{1,7}
\end{dspBlocks}
\end{center}
The lower branch contains an upsampler followed by a delay and a downsampler. The output of such a system is easily seen to be $0$. Thus only the upper branch remains and the final transfer function of the system is given by
\begin{eqnarray*}
\frac{Y(z)}{X(z)}=A(z).
\end{eqnarray*}
\item System 1 is described by the following equation %
\begin{align*}
Y(z) &= D_2\{H(z)G(z) U_2\{X(z)\}\} \\
&= D_2\{H(z)G(z)X(z^2)\} \\
&= \frac{1}{2}\left(H(z^{1/2})G(z^{1/2})X(z) + H(-z^{1/2})G(-z^{1/2})X(z)\right) \\
&= \frac{1}{2}\left(H(z^{1/2})G(z^{1/2}) + H(-z^{1/2})G(-z^{1/2})\right)X(z) \\
&= X(z).
\end{align*}
System 1 is thus unity.\\\\
System 2 is described by the following equation %
\begin{align*}
Y(z) &= D_2\{H(z)F(z) U_2\{X(z)\}\} \\
&= D_2\{H(z)F(z)X(z^2)\} \\
&= \frac{1}{2}\left(H(z^{1/2})F(z^{1/2})X(z) +
H(-z^{1/2})F(-z^{1/2})X(z)\right) \\
&= \frac{1}{2}\left(H(z^{1/2})F(z^{1/2}) +
H(-z^{1/2})F(-z^{1/2})\right)X(z) \\
&= 0.
\end{align*}
System 2 is thus zero.
\end{enumerate}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{solution}{Quantization}
The output of the filter is
\begin{align*}
\hat{y}[n] &= \hat{x}[n] \ast h[n] \\
&= h[n] \ast (x[n] + e[n]) \\
&= y[n] + e_y[n].
\end{align*}
The second moment of the filtered noise is
\begin{align*}
\sigma_{e_y}^2 &= \mbox{E}\left[ \sum_k h[k]e[n-k] \sum_l h[l]e[n-l] \right ) \\
&= \sum_k \sum_l h[k] h[l] \underbrace{E(e[n-k]e[n-l]}_{\sigma_e^2 \delta [k-l]} \\
&= \sigma_e^2 \sum_k h^2[k] \\
&= \sigma_e^2 \sum_{k=0}^{\infty} \frac{1}{4}(a^k+(-a)^k)^2=\frac{\sigma_e^2}{4}\sum_{k=0}^{\infty} (a^{2k}+2a^k(-a)^k +(-a)^{2k}) \\
&= \frac{\sigma_e^2}{2}\left(\sum_{k=0}^{\infty}a^{2k}+\sum_{k=0}^{\infty}(-a^2)^k\right) \\
&= \frac{\sigma_e^2}{2}\left (\frac{1}{1-a^2}+ \frac{1}{1+a^2}\right ) \\
&= \sigma_e^2 \left(\frac{1}{1-a^4} \right)=\frac{\Delta^2}{12(1-a^4)}
\end{align*}
The same derivation can be carried out for $x[n]$ (since we assumed the input white) so that the input $SNR$ does not change by filtering:
\[
\mbox{SNR}_{y[n]}=\frac{12\sigma_x^2}{\Delta^2}
\]
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{solution}{Digital processing of continuous-time signals}
\begin{enumerate}
\item Playing the record at lower rpm slows the signal down by a factor $33/78$. Therefore
\[
x(t) = s\left(\frac{33}{78}\ t\right) = s\left(\frac{11}{26}\ t\right)
\]
\item From the rescaling property of the Fourier transform
\[
X(f) = \frac{26}{11}\ S\left(\frac{26}{11}\,f\right)
\]
\begin{center}
\psset{unit=1.5cm}
\begin{pspicture}(-2.3,-.3)(4.5,1.5)
\psaxes[labels=none,Dx=1]{->}(0,0)(-2.2,0)(2.2,1.5)
\rput[l](.2,1){$|X(f)|$} \rput[d](0.7,-.2){$6670$Hz}
\parabola[linewidth=2pt](-0.42,0)(0,1.2)
\end{pspicture}
\end{center}
\item We need to change the sampling rate so that, when $y[n]$ is interpolated at 44.1~KHz its spectrum is equal to $S(f)$. The rational sampling rate change factor is clearly $33/78$ which is simply $11/26$ after factoring. The processing scheme is as follows:
\begin{center}
\psset{unit=.6mm}
\begin{pspicture}(0,0)(240,40)
\rput[l](0,20){\rnode{input}{$x_c(t)$}}
\rput(40,20){\rnode{smp}{\psframebox{Samp}}}
\rput(80,20){\rnode{up}{\pscirclebox{$\uparrow 11$}}}
\rput(120,20){\rnode{fil1}{\psframebox{$L(z)$}}}
\rput(160,20){\rnode{dw}{\pscirclebox{$\downarrow 26$}}}
\rput(200,20){\rnode{int}{\psframebox{Interp}}}
\rput[l](220,20){\rnode{output}{$y_c(t)$}} \ncline{->}{input}{smp}
\ncline{->}{smp}{up}\Aput{$x[n]$} \ncline{->}{up}{fil1}
\ncline{->}{fil1}{dw} \ncline{->}{dw}{int}\Aput{$y[n]$}
\ncline{->}{int}{output}
\end{pspicture}
\end{center}
where $L(z)$ is a lowpass filter with cutoff frequency $\pi/26$ and gain $L_0 = 11$; both the sampler and interpolator work at $F_s = 1/T_s = 44100$~Hz. We have:
\begin{eqnarray*}
X_c(f) & = & \frac{26}{11}\ S\left( \frac{26}{11} \, f \right) \\
X(e^{j\omega}) & = & F_s \, X_c(\frac{\omega}{2\pi}F_s) \\
Y(e^{j\omega}) & = & L_0 \, \frac{1}{26} \, X(e^{j\frac{11}{26}\omega}) \\
& = & \frac{11}{26} \, F_s \, X_c\left( \frac{11}{26}\,\frac{\omega}{2\pi} F_s \right) \\
& = & F_s \, S\left(\frac{\omega}{2\pi} F_s \right) \\
Y_c(f) & = & (1/F_s) \, Y(e^{j2\pi f/F_s}) \\
& = & S(f)
\end{eqnarray*}
\item The sampling rate change scheme stays the same except that now $45/78 = 15/26$. Therefore, the final upsampler has to compute more samples than in the previous scheme. The computational load of the sampling rate change is entirely dependent on the filter $L(z)$. If we upsample more before the output, we need to compute more filtered samples and therefore at 45rpm the scheme is less efficient.
\end{enumerate}
\end{solution}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{solution}{Oversampled sequences}
Given that $X(e^{j \omega })=0$ for $\frac{\pi}{3} \leq | \omega | \leq \pi$, $x[n]$ can be thought of as a signal that has been sampled at $3$ times the Nyquist frequency. Therefore, we can downsample the signal without losing information at least by a factor of 3.
\begin{enumerate}
\item Assume $n_0$ is odd; we can then downsample $x[n]$ by 2, without loss of information and the corrupted sample will be discarded in the downsampling operation. We can then upsample by 2 and recover the original signal eliminating the error. If $n_0$ is even, simply shift the signal by 1 and perform the same operation.
\item If the value of $n_0$ is not known, we need to determine whether $n_0$ is odd or even. We can write
\[
\hat{x}[n] = x[n] - \epsilon \delta [n-n_0]
\]
and therefore
\[
\hat{X}(e^{j \omega }) = X(e^{j \omega }) - \epsilon e^{-j \omega n_0 }
\]
Now, if we compute the DTFT at $\omega = \frac{\pi}{2}$ we have:
\[
\hat{X}(e^{j \frac{\pi}{2} }) = X(e^{j \frac{\pi}{2} }) + \epsilon (-j)^{n_0} = \epsilon (-j)^{n_0}
\]
since, by hypothesis, $X(e^{j \frac{\pi}{2} })=0$. Therefore, If $\hat{X}(e^{j \frac{\pi}{2} })$ is real, $n_0$ is even and if it is imaginary, $n_0$ is odd.
\item If there are $k$ corrupted samples, the worst case is when the corrupted samples are consecutive. In that case we need to downsample $\hat{x}[n]$ by a factor of $k$ and then upsample it back. To do so without loss of information it must be:
\[
X(e^{j \omega })=0 \quad \mbox{for} \quad \frac{\pi}{k} \leq | \omega | \leq \pi.
\]
\end{enumerate}
\end{solution}
\end{document}

Event Timeline