I am using fast fourier transforms to convert raw acceleration to displacement. I am able to get extremely close to expected results; however, I am having issues at the beginning of the dataset. I believe there may be an issue with the filter I am using.
Here is the code for the butterworth filter I am using
I apply it to the raw data and after conversion.
Here are the results, I move the device +/- 10cm, +/- 7.5cm, and +/- 5cm as seen. The green line represents actual movement and the blue line represents the dataset produced through the conversion algorithm.
Any suggestions for better filtering techniques? I can provide the code and some data upon request.
Here is the code for the butterworth filter I am using
Code:
[B,A] = butter(5,0.5/(Fs/2),'high');
I apply it to the raw data and after conversion.
Here are the results, I move the device +/- 10cm, +/- 7.5cm, and +/- 5cm as seen. The green line represents actual movement and the blue line represents the dataset produced through the conversion algorithm.
Any suggestions for better filtering techniques? I can provide the code and some data upon request.