I try to use my Smartphonesensor to check if the theoretical speed of the Roboter ist the same like the real speed.
So I installed the Matlab App and used the acceleration sensor to check it. Because i didn´t mounted the smartphone totally zero in every direction (x,y,z) i needed to subtract an offset. I took the offset from the resting time bevore the movement, here i took the values from 300-500 (100hz) and calculated the average. Because i had sensor noice i also added a gauß filter. At the End i had two plots one in x-direction the over in y-direction.
So the plot for the Acceleration in the x-Direction looks very good and seems to be right.
And the Velocity of the x-direction, which i calculated with this code, doesnt look right:
velocity_y = cumtrapz(t_LP,y_ac');
How you can see there is an rising chart, which in the end has an velocity of 0.5 m/s but i the velocity should be zero.
I think the offset is not totally exact and after the integration i get an big mistake so the chart ist frequently rising. Does anyone knows how to erease this mistake?