I am trying to make program in matlab that counts the number of times the accelerometer was lifted up and down (a rep counter for exercise). Basically my phone is getting accelerometer data on all three axes and then i import this data into matlab. I have tried to filter the data using a simple filter
a = [1 -0.9]
filter(b,a,data) but that doesn't really get rid of all the high frequency noise.
Another problem i am running into is that when i apply certain filters to the data the data gets shifted so i can no longer integrate it to get velocity (my original plan was to simple filter out high frequencies and then integrate the data to get velocity and then count the number of times it crosses zero and divide by two (which would correspond to the number of times it was at a peak and trough - divided by two for number of cycles).
But the data is so noisy that when i apply a filter not only does it get shifted away from the x axis making it impossible to integrate it, it also still has noise which would give me incorrect zero-crossings.
Is there a good beginner introduction to signal processing and accelerometer data processing? What techniques should i be aware of?
If you want to try to give the data a go here is some sample data, the rep count should be 5, The data was all taken at a 50Hz sample rate. I have to put data in the comments because SE doesnt allow posting multiple links a new poster