# Zero-order interpolation problem

Let $x_c(t)=\cos(\omega_0t)$. This signal is sampled with $\omega_s$, which is greater than the Nyquist rate. It is then interpolated with a zero-order interpolator. The signal obtained is $y_c(t)$. What should be the relationship between $\omega_0$ and $\omega_s$ so that $y_c(t)$ is periodic? Also, find the relationship between the amplitudes of the first two non-zero Fourier coefficients of $y_c(t)$.

I guess that, for $y_c(t)$ being periodic, $Y(j\omega )$ should consist of just deltas. The problem is that I don't see how this could happen. Mathematically,

$$X_p(j\omega)=\frac{\omega_s}{2}\sum\limits_{k=-\infty}^\infty [\delta(\omega -k\omega_s- \omega_0)+\delta(\omega -k\omega_s+ \omega_0)]$$ $$H_0(j\omega )=\frac{2\pi}{\omega_s}\text{sinc}\left(\frac{\omega}{\omega_s}\right)e^{-j\frac{\pi\omega}{\omega_s}}$$

With $x_p(t)$ being the sampled signal and $h_0(t)$ the impulse response of the interpolator. So

$$Y_c(j\omega)=X_p(j\omega)\cdot H_0(j\omega )$$

I'd like to clear up some confusion in your question. First you state that for $y_c(t)$ to be periodic, its Fourier transform should consist only of Dirac delta impulses. That's not true, at least it's not sufficient. As an example, take a signal with Fourier transform

$$Y(j\omega)=\delta(\omega -1)+\delta(\omega - \sqrt{2})\tag{1}$$

The corresponding signal is not periodic even though its spectrum only consists of Dirac delta impulses. The reason is that the discrete frequency contributions of a periodic signal must be at integer multiples of the fundamental frequency, which is not the case for the spectrum given in $(2)$. So it's important to realize that a discrete spectrum is only necessary but not sufficient for periodicity.

The second confusion is that you don't see how $Y_c(j\omega)$ can only consist of Dirac impulses. Note that for any function $H(j\omega)$ (which is continuous at $\omega=\omega_0$), we have

$$H(j\omega)\delta(\omega-\omega_0)=H(j\omega_0)\delta(\omega-\omega_0)\tag{2}$$

So no matter which form $H_0(j\omega)$ takes, $Y_c(j\omega)$ will always be an infinite sum of Dirac impulses, where the weight of each impulse is determined by the value of $H_0(j\omega)$ at the respective frequency. So the question is not whether $Y_c(j\omega)$ is a sum of weighted Dirac impulses (it always is!), but whether this sum of Dirac impulses corresponds to a periodic signal.

So it is only about the relation of the frequencies of the Dirac impulses, not about their weights, which are determined by $H_0(j\omega)$. So for the determination of periodicity, $H_0(j\omega)$ is irrelevant, as already pointed out in Marcus Müller's answer.

Since you already know that the ratio $\omega_s/\omega_0$ must be rational for the sampled signal to be periodic, let me show you how to obtain the ratio of the amplitudes of the first two non-zero Fourier coefficients of $y_c(t)$. Since $\omega_s>2\omega_0$, the first frequency component of $y_c(t)$ is at $\omega_0$, and the second one is at $\omega_s-\omega_0$. As mentioned before, the weights of the Dirac impulses are given by $H_0(j\omega)$ evaluated at the respective frequencies. So the amplitude ratio of the first and second Fourier coefficient is

$$\frac{H(j\omega_0)}{H(j(\omega_s-\omega_0))}=\frac{\text{sinc}(\frac{\omega_0}{\omega_s})}{\text{sinc}(\frac{\omega_s-\omega_0}{\omega_s})}=\frac{\sin(\pi\frac{\omega_0}{\omega_s})}{\pi\frac{\omega_0}{\omega_s}}\frac{\pi(1-\frac{\omega_0}{\omega_s})}{\sin(\pi(1-\frac{\omega_0}{\omega_s}))}=\frac{\omega_s}{\omega_0}-1\tag{3}$$

because $\sin(\pi-x)=\sin(x)$.

You're thinking too complicated.

For a digital signal to be periodic, it simply has to repeat every $P\in\mathbb N$ samples.

Now, you have a continuous signal which is $\frac{2\pi}{\omega_0}$-periodic.

Obviously, if a period happens to be exactly "worth" a natural number $N\in\mathbb N$ sample times, the resulting sample from sampling it will repeat with a period of $N$.

More generally, if $M\in\mathbb N$ periods of the continuous signal are as long as $N$ sampling times, the digital signal will also be periodic.

So, as a general rule, one period of the input signal must be worth $\frac{N}{M}$ sampling times, or:

\begin{align*} \frac{2\pi}{\omega_0} &\overset != \frac NM \frac {1}{f_\text{sampl}}&\quad N,M\in \mathbb N\\ &= R\frac {1}{f_\text{sampl}} &\quad R\in \mathbb Q\text,\\ \text{which means that}\\ \frac{f_\text{sample}}{\omega_0} &= \frac {R}{2\pi}\text;\\ \text{with}\\ f_{sample}&=\frac{\omega_s}{2\pi}\\ \text{it follows that}\\ \frac{\omega_s}{\omega_0} &= R\text, \end{align*}

i.e. the relationship between signal frequency and sampling rate needs to be rational.

The fact that you have a zero-order interpolator afterwards doesn't change this consideration -- the interpolator's output will be periodic iff its input is.

• "... the digital signal will also be continuous." I guess that should be "periodic" ... Otherwise, you're of course right. – Matt L. Feb 8 '16 at 20:43
• @MattL. d'oh! yes. :) corrected that! – Marcus Müller Feb 8 '16 at 20:51