Given two signals $f_1(t),f_2(t+dt)$ where $t$ is time and $dt$ is the time delay between the two signals,

  1. is there any closed-form solution with respect to $dt$?
  2. what are the efficient global solutions to this problem?

In my problem, the function is $f\in SO(3)$ but I can reduce it to $f \in R^3$ or just look at only one dimension.

  • 1
    $\begingroup$ Could you explain what you mean by temporal calibration? $\endgroup$
    – user28715
    Apr 10, 2018 at 10:48
  • 1
    $\begingroup$ Are f1 and f2 the same function shifted in time, or similar functions you are trying to match? $\endgroup$ Apr 10, 2018 at 12:39
  • $\begingroup$ Temporal calibration usually means finding $dt$ in my field. $f_1,f_2$ are the signals that have the same physical meaning but from different sensors. For example, the rotational velocity of a drone can be estimated from IMU or Camera. The rotational velocity of each sensor has same physical value but there is a time delay between two velocities. I am trying to figure out this time delay. Currently, I am using non-linear optimization but it does not work when the initial guess is quite far from the true time delay. $\endgroup$ Apr 10, 2018 at 20:24

1 Answer 1


I would do the analyis on your three dimensions separately. If the answers you get agree, then you have your confirmed answer. If processing needs to be minimized, then you can find the delay on one, and confirm with the others.

Since you have sensor data, it probably contains some noise as well. Heavily smoothing your data (I like exponential smoothing for its efficiency) will mitigate the effects of noise, reduce the number of local maxima, and allow you to do a coarser correlation measure.

There is some dispute on the proper definition of correlation. The one you should use for best results is:

$$ c = \frac{\vec x \cdot \vec y}{\| \vec x \| \| \vec y \| } $$

Where $\vec x$ is a subset of the smoothed $f_1$ and $\vec y$ is a subset of the smoothed $f_2$ for the two intervals and sampling density your are comparing. Each vector should be shifted so the elements have a mean value of zero. Take the average of all the element values and subtract it from each value.

First do a coarse brute search. Select every 10th (or whatever spacing you choose) value from your functions to build your vectors. Then calculate the correlation coefficient for a range of delay values, stepping by a coarse amount. This will give you a coarse delay value.

Repeat this process, centered at your coarse delay value, using every sample and stepping by a single sample size. You should only need to slide plus or minus half your coarse spacing side. This will give you a fine delay value.

If you need subsample resolution, use the minimum value you found in the fine search and its two neigbors, model them as a parabola and find the minimum point there.

Hope this helps.


  • $\begingroup$ Thanks for the idea! I will try that and share the result. $\endgroup$ Apr 12, 2018 at 20:52

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.