0

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) }$$ – robert bristow-johnson Oct 14 '21 at 03: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 – Hybridslinky Oct 14 '21 at 08: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? – robert bristow-johnson Oct 14 '21 at 08: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 – Hybridslinky Oct 14 '21 at 08: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. – robert bristow-johnson Oct 14 '21 at 08:53
  • That was my understanding too, but that does not work, and I have to apply the correction to both amplitude and phase – Hybridslinky Oct 14 '21 at 08:59
  • I agree that you have to apply that correction to both amplitude and phase (correcting the phase means a negative delay of half of $T_1$) and correcting the amplitude means dividing by $\operatorname{sinc}(fT_1)$ in the frequency range $-\frac1{2 T_1} < f < +\frac1{2 T_1}$ – robert bristow-johnson Oct 14 '21 at 09:05
  • But that correction is not sufficient, and I have to correct also for $ T_2 $ in order to get the result I expect and that I know is true. Indeed, let us suppose $ T_2 = T_1 $ and that you sample sincronously with the DAC. In this case you are practically sampling the original sine signal, removing the ZOH effect introduced by the DAC, and no correction is needed. Indeed, in this case $ \exp[i\pi f (T_1-T_2)]\frac{\mbox{sinc}(fT_2)}{\mbox{sinc}(fT_1) }$ is exactly $ 1 $. – Hybridslinky Oct 14 '21 at 09:25

1 Answers1

1

I found the solution and added it as an appendix to a paper that has just been published.

I add the explanation here too.

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.