I read a noisy signal from an accelerometer which is attached to the pedal of a stationary bike and need to find the frequency of the signal/ speed of the person cycling. I taught of the following solutions and would like to know if I overlooked any or made some incorrect assumptions.

Currently the working solution is a low pass (10-30 point moving average) and then a peak detection with a minimum amplitude requirement and minimum time requirement. However this solution doesn't work very well when nearing 0.33Hz (20 RPM)

I tried using an fft but the result was never accurate enough for the small differences in frequency I am looking for.

I taught about using autocorrelation but how I understand it, I would have to wait atleast a period and then some before I could detect the frequency.

Any other ideas are welcome, or if anybody knows what is used in the commercial version it would be great to know.

  • $\begingroup$ If you know that the signal is band limited to 0.33 to 3 Hz, I would sample it at a rate of 10 Hz for 6.4 seconds and than use the furrier transform. If you are interested in getting a pick exactly at 0.33 Hz use a sampling rate of 10/1.1 and the third bin will provide you with the power in the 3.3 frequency. $\endgroup$ – Moti May 23 '15 at 4:23
  • $\begingroup$ Peak detection of two peaks also requires collecting at least "one period and then some", so why not use autocorrelation? $\endgroup$ – hotpaw2 May 23 '15 at 5:58
  • $\begingroup$ @Moti: I'll see what this give, however the signal is not band limited at those values, I just don't have to detect the frequency anymore when it is outside this range. However it is a really big downside that I have a delay of 6.4 seconds. Is there any way to get accurate information faster? $\endgroup$ – YetAnotherStudent May 23 '15 at 9:07
  • $\begingroup$ @hotpaw2 I detect both minima and maxima so I get can recalculate the frequency 2 times each period. $\endgroup$ – YetAnotherStudent May 23 '15 at 9:10
  • $\begingroup$ You can compute an autocorrelation every new sample, which is even more often, thus potentially with less latency, than waiting for just 2 times per period. $\endgroup$ – hotpaw2 May 23 '15 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.