How to extract interval lengths (period)? (Using Fourier transform?)

18 Views Asked by At

Imagine I have an event that repeats regularly, every two years.

I can represent it using a series of Dirac Delta functions like so:

$$ f(x) = \delta(x+4)+\delta(x+2)+\delta(x)+\delta(x-2)+\delta(x-4)+\delta(x-6) $$ f(x)

And I can use Fourier transform to tell me what is the interval: $$\hat f(\omega) = FT(f(x))$$ $$\hat f(T) = |2\pi/\hat f(\omega)|$$ |f(T)|

Where the rightmost high peak sits above 2 and, if I change that interval, the peak also moves.

Now suppose the interval changes once: $$ g(x) = \delta(x+4)+\delta(x+)+\delta(x)+\delta(x-3)+\delta(x-5)+\delta(x-7) $$ g(x)

Now, however, the $|\hat g(T)|$ has two equivalent peaks at 1.789 (~ 9/5?) and 2.252 (~ 9/4?), with the function equaling zero at both 2 and 3.

|g(T)|

How could I modify this process, to obtain something that would tell me there is a mix of period 2 and period 3 intervals? Either as two separate peaks or alternatively as a peak that ends up somewhere in between them (although that might be what my current approach already does)?

Also, how would I formalize the "the biggest peak on the right"?

Another application could be to determine (a shifting) heart rate from timestamps of individual heartbeats.

Any insight welcome, thank you.