I'm always working on the localisation of my robot (http://sourceforge.net/apps/phpbb/mindb ... f=3&t=1795).
But after the odometer using, I'm trying to use the accelerometer (from Hi Technic).
For the moment I simply memories the accelerometer output and the I try to plot the position on Matlab.
For my tests, I only move the accelerometer on x-axis. I see some noise on the other axis when my accelerometer is moving (along x).
I use the trapezoidal method to Integrate my datas, example of Matlab code :
Code: Select all
for i=2:length(Ax3(:,1))-1
% Trapezoidal Integration
Vx(i,1) = Vx(i-1,1) + ( 15.5/2000 )*9.81*( Ax(i-1,1) + Ax(i,1) )/(200); % delta_t = 15.5 and I convert the acceleration from g to m/s²
end
When I plot the second integration, I see a "derivation" of my position, that means that I have my position + an error (varying with time - In attached file).
I suppose this error is due to my integration, at each step i add an error so this error is increasing.
For this test, my sampling rate is about 70hz (1 data each 15ms), I try to Integrate after a median filter or without filter (integration already filter my noise). (as you know HT accelerometer have a 200hz frequency)
What is you suggestion ? Is there an Integration problem or something else ? If yes, Is trapezoidal method is the best real time numerical integration method ?
I try my experiments with two different accelerometer and i get the same results.
Thanks for your help