# Resampling a Zero Order Hold signal

I have a sine signal whose frequency is $$f$$ sampled and then reproduced by a DAC as a zero order hold signal with sampling period $$T_1$$. The DAC signal is then reacquired with a sampling period $$T_2 = T_1 / 10$$.

In my case $$f = 400$$ $$Hz$$, $$T_1 = 1$$ $$ms$$, $$T_2 = 0.1$$ $$ms$$.

In order to estimate the amplitude and phase of the original sine signal, I assumed I had to multiply the acquired spectrum by

$$\frac{\exp(i\pi f T_1)}{\mbox{sinc}(fT_1) }$$

(https://en.wikipedia.org/wiki/Zero-order_hold). What I found, actually, is that I have to multiply the spectrum by

$$\exp[i\pi f (T_1-T_2)]\frac{\mbox{sinc}(fT_2)}{\mbox{sinc}(fT_1) }$$

I tried to use also a lowpass filter after the DAC, but that did not change anything.

Could anyone please provide a formal explanation of this fact?

• where did you get this expression? : $$\exp[i\pi f (T_1-T_2)]\frac{\mbox{sinc}(fT_2)}{\mbox{sinc}(fT_1) }$$ Oct 14 at 3:16
• In practice, empirically. But it works very well, I tried for different signal frequencies and sampling rates. It works too well to be a coincidence Oct 14 at 8:21
• //The DAC signal is then reacquired with a sampling period $T_2=T_1/10$......// --- Does that mean that the output is a constant value for $T_2$ adjacent sampling periods? Oct 14 at 8:35
• Yes, 10 samples are acquired in the period $T_1$, then the DAC changes to another value, and 10 samples are acquired again, and so on Oct 14 at 8:39
• Then resampling imposes no new ZOH. You have the original output DAC with ZOH frequency response of $$\exp(-i\pi f T_1) \mbox{sinc}(fT_1)$$. That is the only ZOH that is affecting your frequency response. Oct 14 at 8:53

Let us recap the problem. We have a continuous-time signal $$x\left(t\right)$$ that is sampled with period $$T_1$$, getting the discrete-time sequence $$x(nT_1)$$. A continuous-time ZOH signal $$x_{T_1}^0(t)$$ with period $$T_1$$ is then produced from the sequence $$x(nT_1)$$. The ZOH signal is then resampled with a period $$T_2$$ such that $$T_1/T_2 = N$$ (integer), getting the sequence $$x_{T_1}^0(nT_2)$$.
Let $$X(f)$$ be the FT of $$x\left(t\right)$$, and $$X_1(f)$$ the DTFT of the sequence $$x(nT_1)$$. It is a well known result that: $$X_1(f) = \frac{1}{T_1}\sum_n X\left(f-nF_1\right),$$ where we assume that $$X(f)$$ is band-limited and the sampling rate $$F_1 = 1/T_1$$ fullfills the Nyquist condition. Let us call $$X_1^0\left(f\right)$$ the FT of $$x_{T_1}^0(t)$$. It is also well known that: $$\tag{1}\label{eq_zoh} X_1^0\left(f\right) = T_1e^{-i\pi f T_1} \mathrm{sinc}\left(fT_1\right) X_1(f) = e^{-i\pi f T_1} \mathrm{sinc}\left(fT_1\right) X(f),$$ where the second equivalence is true only for $$\left|f\right| < F_1/2$$.
If $$X_1^0\left(f\right)$$ is known, $$X(f)$$ can be easily reconstructed by inverting (\ref{eq_zoh}). But in general $$X_1^0\left(f\right)$$ is not immediately known from the data. Our problem is thus how $$X(f)$$ could be reconstructed, given the sequence $$x_{T_1}^0(nT_2)$$ and its respective DTFT $$X_2^0\left(f\right)$$. The sequence $$x(nT_1)$$ (and thus $$X_1\left(f\right)$$) could be simply obtained by decimating $$x_{T_1}^0(nT_2)$$, but we want to keep all the samples, since, in general, when some noise is present, this yields better results due to averaging over the noise.
Let us define the zero-padded sequence: $$x_{zp}\left( {m{T_{2}}} \right) = \left\{ {\begin{array}{*{20}{c}} {{x}\left( {n{T_1}} \right)}&{m = nN}\\ 0&{{\rm{otherwise}}} \end{array}} \right.,$$ and let us call $$X_{zp}\left(f\right)$$ its DTFT. It is well known that $$X_{zp}\left(f\right) = X_{1}\left(f\right)$$ for every value of $$f$$. The sequence $$x_{T_1}^0(nT_2)$$ can be rewritten as a sum of translated zero-padded sequences: $$x_{T_1}^0(nT_2) = \sum_{k=0}^{N-1} x_{zp}\left( {\left(m-k\right){T_{2}}} \right).$$ Thus, $$X_2^0\left(f\right)$$ can be expressed as: $$X_2^0\left(f\right) = X_1\left(f\right) \sum_{k=0}^{N-1} e^{-i 2 \pi f k T_2} = X_1\left(f\right) e^{-i\pi f\left(N-1\right)T_2} \frac{\sin\left(N\pi f T_2\right)}{\sin\left(\pi f T_2\right)}.$$ But: $$e^{-i\pi f\left(N-1\right)T_2} \frac{\sin\left(N\pi f T_2\right)}{\sin\left(\pi f T_2\right)} = e^{-i\pi f\left(T_1-T_2\right)} \frac{T_1}{T_2} \frac{\mathrm{sinc}\left(fT_1\right)}{\mathrm{sinc}\left(fT_2\right)}.$$ Hence, given $$X_2^0\left(f\right)$$, $$X_1\left(f\right)$$ can be reconstructed as: $$X_1\left(f\right) = X_2^0\left(f\right) e^{i\pi f\left(T_1-T_2\right)} \frac{T_2}{T_1} \frac{\mathrm{sinc}\left(fT_2\right)}{\mathrm{sinc}\left(fT_1\right)}.$$ The last result, formally derived, is the same that I had already figured out empirically and intuitively.