I have some data which looks roughly periodic - is there a nice way to measure this?

enter image description here

This is an example I'm working on and I'd like a metric that I will be able to just threshold to give a decision of yes or no. I was thinking maybe looking into the Fourier domain or looking at correlation. Many thanks.

[NB - I've cross-posted - I've also asked on the stats stack exchange but I think it may be more appropriate here]


1 Answer 1


well, there is always autocorrelation $$ R_x(\tau)=\sum x[n] x[n+\tau] $$ or AMDF $$ Q_x(\tau) = \sum |x[n] - x[n+\tau]| $$ or ASDF $$Q_x(\tau) = \sum (x[n] - x[n+\tau])^2 $$ with the latter there is the relationship between autocorrelation and ASDF $$ R_x(\tau)=R_x(0) - \frac12 Q_x(\tau) $$. a measure of periodicity might be $\frac{R_x(P)}{R_x(0)} $ where $R_x(P)>R_x(\tau)$ for all $\tau\ne 0$. sometimes we call "$P$" the "period". if $\frac{R_x(P)}{R_x(0)} \approx 1 $ we say it's pretty periodic.


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.