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.
\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 \ge0
\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:
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 \le50$ 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
\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}
\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,
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$.
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, \pm2, \pm3, 4$ and so it will cancel out any sinusoidal input component at frequencies $\omega_k =\pi k/4$ except for $k=\pm1$.
\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]$
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 \ge0$ 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
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
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
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 \ge0$ 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
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}$.}