Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I have a periodic signal generated by accelerometer sensor and I need to count the number of peaks. However, I can't predict when the periodic sequence starts and ends. What would be the best way to do this if expected frequency of the useful signal is between 0.2Hz - 5Hz?

Here is the example of the signal - five squats. enter image description here

share|improve this question
1  
Are you sampling the sequence? If so, at what rate? That is, how many samples per second? Does the signal repeat periodically (if so, do you know the period?) or does periodic signal mean that the signal "looks" like a (possibly decaying) sinusoidal signal of frequency between $0.2$ and $5$ Hz preceded by a brief start-up transient, (and you don't know when it starts up)? And what you would like to detect and count the number of peaks in the signal? –  Dilip Sarwate Nov 26 '12 at 12:47
    
Do you mean that you don't know how long the period is? –  Jim Clay Nov 26 '12 at 13:15
    
The sampling rate is 50Hz and I'm trying to calculate the repetitions in pushups, squats etc... That's why I'm assuming periodic signal with this kind of frequency. Yes. There is a transient period at the start and at the end, that I can't control, i.e. when person activates the sensor and lays down on the floor. –  Nikolay Pavlov Nov 26 '12 at 13:20
    
@JimClay I can't control the duration of overal process. However, the frequency of useful signal is limited to the nature of the physical exercises. I'm assuming that 0.2 to 5 Hz is more than enough. –  Nikolay Pavlov Nov 26 '12 at 13:25
    
@NikolayPavlov Okay, so you are counting push-ups and the like. I would call that "sort of" periodic because the period between push-ups can change. I would call this a straightforward peak detection problem where you have to detect multiple peaks. This thread might help- dsp.stackexchange.com/questions/1302/peak-detection-approach –  Jim Clay Nov 26 '12 at 14:36

1 Answer 1

The autocorrelation function of a sliding window of data may change by a significant amount when the window is slid past the first or last cycle of your burst of periodic events. You may have to play with the width of the autocorrelation window depending on the estimated frequency of your cyclic/periodic events.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.