1
\$\begingroup\$

I am working on a project which involves time difference of arrival calculations. I need to calculate the uncertainty of my timing measurements. I am using an ADC to sample the signals who's times of arrival need to be compared.

Right now, I am working under the assumption that sample at fs results in a timing uncertainty of 1/fs. For example, if a signal arrives 1 second after the system starts up, and the sampling frequency is 10Hz, the resulting arrival time would be 1s +- 0.1s. Is this method valid if I am interested in considering sample rate only?

\$\endgroup\$
5
  • 2
    \$\begingroup\$ That’s correct. but instead tell yourself what you need on accuracy for tolerance of measurements then what sampling method and rate suits this requirement and also minimizes amount of data collected. Be specific in specs. \$\endgroup\$
    – D.A.S.
    Commented May 15, 2021 at 19:28
  • \$\begingroup\$ Hopefully you are using an ADC that you are clocking yourself rather than a self-clocked one where you have no real control or knowledge of the clock. \$\endgroup\$
    – DKNguyen
    Commented May 15, 2021 at 19:29
  • \$\begingroup\$ Sauders, you may want to read an old story here. You should want zero variability in your sampling. Zero. I shoot for a quarter of a processor clock tick because that's usually what I can get with an MCU that supports DMA with ADCs. If DMA isn't available, then a timer system with buffered data that I fetch but at least know it was sampled accurately. If the ADC can't be tied to a timer directly then I look for an MCU that has zero variation in interrupt latency. Etc. \$\endgroup\$
    – jonk
    Commented May 15, 2021 at 20:05
  • \$\begingroup\$ If the signal you feed to ADC is bandlimited to less than half of the sampling rate, you have enough information to fully reconstruct the waveform, thus you can work out the exact edge even if it falls between the samples. Is this the case or is the signal not band-limited to half of sampling rate? \$\endgroup\$
    – Justme
    Commented May 15, 2021 at 22:43
  • \$\begingroup\$ It also depends on whether you use a continuous time or discrete time ADC. While the DT takes only a fraction of 1/f_s to take the sample, it will miss some short transients some of the time. \$\endgroup\$
    – tobalt
    Commented May 16, 2021 at 3:47

3 Answers 3

1
\$\begingroup\$

Right now, I am working under the assumption that sample at fs results in a timing uncertainty of 1/fs.

This is not correct unless you are undersampling. Timing uncertainty in a Nyquist sampled signal is determined by SNR, not sampling rate since (per the Sampling Theorem) you have recorded the signal exactly and can reconstruct it with as small of a time step as you like. Thus what really limits you is noise in the measurement, not the sampling rate of the recording.

In general, you should expect to do much, much better than 1/fs.

\$\endgroup\$
10
  • 1
    \$\begingroup\$ "In general, you should expect to do much, much better than 1/fs" - so the general formula is ±t << 1/fs ? \$\endgroup\$ Commented May 15, 2021 at 23:25
  • \$\begingroup\$ Can you link to an application note / paper that goes into more detail on this? \$\endgroup\$
    – Saunders
    Commented May 15, 2021 at 23:26
  • \$\begingroup\$ @Saunders it's literally the Shannon-Nyquist Sampling Theorem, the basic of all modern digital signal processing. You don't need an app note or paper on this, you need a "basics of signal processing book" if the fact that you can exactly reproduce a Nyquist-sampled signal with arbitrary temporal resolution surprises you! \$\endgroup\$ Commented May 15, 2021 at 23:47
  • \$\begingroup\$ @MarcusMüller I am looking for information on what the next limiting factor on the temporal resolution would be. \$\endgroup\$
    – Saunders
    Commented May 15, 2021 at 23:49
  • \$\begingroup\$ @BruceAbbott think about the reconstruction: You know that if the original signal was sufficiently bandlimited, sinc interpolation describes exactly the signal between the sampling instants; now, if I know that, I can calculate the signal with an arbitrarily fine time resolution from the limited time resolution samples. It's really that: you recreate the continuous (as in: smooth) function from the discrete steps! \$\endgroup\$ Commented May 15, 2021 at 23:49
0
\$\begingroup\$

As you do not disclose the scenario and details of your measurement system, I can only consider the ADC role as a discriminator module. Leaving aside the Nyquist, SNR, clock jitter issues that you pass over in your question, I offer you the probabilistic analysis of measurement errors in your scenario with only the information you provided.

You are interested in "the uncertainty of [your] timing measurements" as a result of "time difference of arrival calculations", TDA calculations. The TDA value is calculated as a difference of two individual time measurements, the event start time and the event stop (arrival) time. In your system, the result of each individual time measurement is an estimate of this time event as a uniformly distributed random variable with a value between \$(N-1)·(1/fs)\$ and \$N·(1/fs)\$, where \$N\$ is a registered ordinal number of the ADC readout (not the ADC code value!) that you qualify as a sign that the event happened. You know for sure that at the time indicated as $N·(1/fs)$ the event happened, and that it can happen earlier but not earlier than at the time \$(N-1)·(1/fs)\$, because otherwise it would be noticed in the previous ADC readout -- if only the events are not that volatile as to start and to end in a single ADC measurement cycle. We write down \$T_{event} \sim U((N-1)·(1/fs), N·(1/fs))\$.

Assume you register the ordinal numbers of the ADC readouts in the counter \$\text N\$. Let the start time is registered at the \$N_{start}\$ counter value, the stop (arrival) time is registered at the \$N_{stop}\$ counter value. Then the start time r.v. is \$T_{start} \sim U((N_{start}-1)·(1/fs), N_{start}·(1/fs))\$, and the stop time r.v. is \$T_{stop} \sim U((N_{stop}-1)·(1/fs), N_{stop}·(1/fs))\$. The TOA r.v. (\$T_{start} - T_{stop}\$) is $$ T_{TOA} = \begin{cases} \text {ASCLIN}((N_{stop}-N_{start}-2)·(1/fs), (N_{stop}-N_{start}-1)·(1/fs)) \\ \text {DESCLIN}((N_{stop}-N_{start}-1)·(1/fs), (N_{stop}-N_{start})·(1/fs)) \end{cases} $$ where \$\text {ASCLIN}\$ is an ascending linear distribution, \$\text {DESCLIN}\$ as a descending linear distribution, as shown in the image:

PDFs.png

The total area under curves (total probability) is unity.

Your scenario does not specify even the start time choice of TOA measurements: is it the same for all TOAs or are all of the TOAs composed of individual pairs \$\{T_{start}, T_{stop}\}\$. Also, your question raises the possibility that your task is to compare TOAs: "to sample the signals who's times of arrival need to be compared", in which case, for the differences of TOA's pairs the TOA pdf may become a quadratic function of time (see Irwin–Hall distribution).

This is all that can be said about the estimation of "the uncertainty of [your] timing measurements" within the framework of the information you provided. It is unclear what the system you examine: with the time clock period of 0.1s the task may be the comparison of runner's times in elementary school athletic competitions or what else, in which case it is unclear why the ADC is used in your instrumentation at all.

If your task requires more advanced approaches then stopwatch recording, you may be interested in time-to-digital converters. If the TOA measurement is the secondary task to the other tasks which has to be done with the ADC measurements, pay attention to the other answer and to the comments.

\$\endgroup\$
0
\$\begingroup\$

Consider a pulse waveform with infinitely fast rise time. It is being sampled at a 10 Hz frequency. Assume that the ADC puts out a 00000... reading up to and including the sample at t = 1.0. After that, all readings are 11111...

The total measurement uncertainty is 1/fs, as you indicate, or 0.1 sec. However, the recovered arrival is best described as 1.05 seconds +/- .05 seconds.

This, of course, assumes no low-pass filtering at the input - which is an invitation to low SNR. If you do have an input filter, you should at least consider subtraction the group delay of the filter, which varies with both the cutoff frequency and the filter structure. For lowpass filters, the step response of the filter will be a mirror image of the frequency response, so the lower the cutoff frequency the greater the delay.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.