2

Possible Duplicate:
Fourier data with non-integer periods, correcting for phase bias

I have a not perfectly but quit periodic signal, with a length of only a few periods. What methods are available for automatically measuring its period?

I tried using the maximum of the Fourier transform, but this essentially only tells me how many integer periods are there in the full length of the signal. If I only have a few repetitions, this will give me an inaccurate estimate of the period.

Let me illustrate: suppose we have a perfectly periodic function $sin(x)$ sampled at intervals of 0.01 between 0 and 30. The Fourier transform will tell me that the signal is about 5 periods long, which gives an inaccurate period length of 30/5 = 6, instead of the true one which is $2\pi \approx 6.28$. Since this example signal is almost perfectly periodic and sampled at a high density, it is possible to do much better than this.

What robust ways are there for period detection that might work in this scenario?

EDIT: Here is an example signal of 1000 sample points to test on. I am expecting a period of around ~150, by manual measurement (i.e. 6 repetitions in a length of ~898). You may argue that it should be double that value if you look closely at the alternating height of the small humps, but as the signal is not perfectly periodic, for this application I need ~150.

Szabolcs
  • 1,388
  • Fast'n' dirty idea is to supersample the data with a spline or smoothing and run DFT on this to get "denser" spectrum. –  Dec 13 '11 at 14:06
  • @mbq But the problem actually isn't the sampling rate. In my $sin(x)$ example above, DFT will always tell me that I have 5 repetitions, regardless of how dense the sampling is. Simply because it will always give an integer number of repetitions. – Szabolcs Dec 13 '11 at 14:15
  • Per @SEngstrom's answer on SO, looking at the autocorrelation function seems a simple way to do this. For your example data, the first maximum away from zero occurs around a lag of 76, with a bigger maximum around 149. – onestop Dec 14 '11 at 12:00
  • @onestop That is actually what I am using now, or something similar. The messy part is trying to pick out the correct peaks. – Szabolcs Dec 14 '11 at 12:31

0 Answers0