I have a series of measurements of a signal source, which emits a periodic signal at an unknown interval time of
p seconds. Detecting the signal is not easy so I am missing quite a few signals in the data. Data is also noisy so there are errors in the data of up to +/- 10% per signal.
x might look like this:
72.3, 185.1, 364.2, 570.2, 679.2, 1060.7
The result I am looking for, is the period hidden in the measurments,
p = ~100 in this example case and possibly the best offset
c = ~70.
Typically I have 4-7 measurements in a series I would like to analyse, so it seems an analytic answer is more appropriate than a sound analysis (FFT).
Ideas I have considered:
- Non-linear optimization such that we optimize for
x = n * p + c. Levenberg-Marquart should do the trick.
- Building a histogram of difference between consecutive measurements and picking the average of the fullest bin.
- Floating point GCD https://stackoverflow.com/questions/445113/approximate-greatest-common-divisor
But I am very unsure whether I might have missed an obvious solution from the sound analysis camp (autocorrelation, Harmonic Spectrum Product, DFT, e.g. https://stackoverflow.com/questions/4716620/algorithm-to-determine-fundamental-frequency-from-potential-harmonics).
So I am turning to the wisdom of SO. How would you go about solving this problem most elegantly? Library suggestions are fine (C++).