- #1
Vikrant Mohanty
- 3
- 0
Hi All,
I am a beginner in embedded world. Currently I am working on MPU9250 motion sensor. My objective of project is to calculate the distance in real time using accelerometer. e.g. If I am at point A (i.e located at 5cm on X-axis) and I am willing to move towards point B (i.e. located at 50cm on X-axis) then the movement from A->B should show changes in distance as 5,6,7,---10---50 cm. Similarly movement from B->A should show changes in distance as 50,49,48----30,29,----5 cm.
My project is very generic and it is to be implemented on embedded processor, so I don't need any costlier algorithm like kalmaan etc. I had gone through many forums for accomplishing this task. I am using double Integration and also filtering the noise and managing the drift as well.
The issue I am currently facing is that, I am getting data , which varies even when the sensor stand still. Due to which the final estimated distance is getting change continuously. Also when I move the sensor the overall estimated displacement is coming out to be very low. Also the changes in X,Y & Z are not so simultaneous during changes in position. Please suggest me some direction to eliminate the issue.
Currently my displacement algorithm is -
V[t] = V[t-1] + (A[t]+A[t-1])*T/2-----Where T is my sampling interval set by RTOS. 100msec
Pos[t] = Pos[t-1] + (V[t]+V[t-1])*T/2
Thanks
I am a beginner in embedded world. Currently I am working on MPU9250 motion sensor. My objective of project is to calculate the distance in real time using accelerometer. e.g. If I am at point A (i.e located at 5cm on X-axis) and I am willing to move towards point B (i.e. located at 50cm on X-axis) then the movement from A->B should show changes in distance as 5,6,7,---10---50 cm. Similarly movement from B->A should show changes in distance as 50,49,48----30,29,----5 cm.
My project is very generic and it is to be implemented on embedded processor, so I don't need any costlier algorithm like kalmaan etc. I had gone through many forums for accomplishing this task. I am using double Integration and also filtering the noise and managing the drift as well.
The issue I am currently facing is that, I am getting data , which varies even when the sensor stand still. Due to which the final estimated distance is getting change continuously. Also when I move the sensor the overall estimated displacement is coming out to be very low. Also the changes in X,Y & Z are not so simultaneous during changes in position. Please suggest me some direction to eliminate the issue.
Currently my displacement algorithm is -
V[t] = V[t-1] + (A[t]+A[t-1])*T/2-----Where T is my sampling interval set by RTOS. 100msec
Pos[t] = Pos[t-1] + (V[t]+V[t-1])*T/2
Thanks