After reading many researches and papers beside to many forums about how to measure the distance based on the acceleration data I found the double integration method, but the error related to this method is big and increases by time. In addition I found some people who suggested Kalman filter I read some references about it but it was not clear to me how to use it. also some were talking about the fusion sensors ... but after reading them I did not get any new ideas. so I am still confused and I did not find the right answer to follow .... sorry for this long introduction.
Question
Let us consider that I hold 9-axis sensor in my hand and I move my hand in some direction, how I can find the new position of my hand in the space? how to obtain motion vector from the initial point to the new point I mean how to know the passed distances on three axes?
If there is no direct answer ... some advises or references would be great or some algorithms that give an accurate answers and I can study and use it by myself. thank you very much
The sensors that are used to measure distance are accelerometer and GPS. For measuring distance, accelerometer will provide more details or information than GPS, in the other hand, GPS has some restrictions, such as points, signals, data resolution and sampling rate.
dl=sqrt(dx*dx + dy*dy + dz*dz); Gyroscope is not necessary for this, but if you are measuring linear distances, you can use the gyroscope reading to control that rotation of the device was not too large. If rotation was too strong, make the user re-do the measurement.
You need the initial speed, and then you can measure how the speed change. If you know the initial speed ( for example 0m/s), then you calculate the speed as v = at + inital speed.
The short answer to your question is you can't do it.
The double integration method is really the only way to get the information you are looking for using only an accelerometer. You found the problem with this method. The error increases over time and generally doesn't give the accuracy many are looking for.
Kalman filtering usually requires 2 devices and basically takes the best of both devices and filters out the bad. See example below.
Kalman filtering is a really tough subject that I tried to dive into for senior design, but never found any meaningful results with my limited testing. A great place to start understanding this subject is with this youtube video series .
This is the guy that won the DARPA challenge with Stanford and explains the topic in an easy to understand way. The whole course is a 6 unit video series about programming robots to move and understand their location in an unknown environment. Worth a watch if you have the time and interest.
It sounds like you're trying to do something similar to what I did for senior design in give really specific relative location information.
Another great Kalman filtering read this (if this link doesn't work google Kalman filter balance bot and click the TKJ blog link). Basically this guy uses an accelerometer and gyroscope to track orientation in the real world.
Something else to look into wiki Real Time Kinematic. This goes on tractors and combines to provide really accurate location information. John Deere sells a system, but it's like $20,000. Here is the poor man's version using GPS and beagleboard
By a 9-Axis sensor I am assuming that means:
Getting a practical position estimate from this type of 9-axis sensor is not possible without the use of another sensor that uses an external reference such as GPS.
Theoretically, if you know the accelerations of an object in space and its initial position and velocity you will be able to calculate the objects new position by propagating the information about its acceleration and velocity back on to the initial position (i.e. integrating the acceleration twice). The reason that it is not possible in practice is that the accelerometer has noise. This noise will have a non-zero mean, so when integrating the acceleration signal the non-zero mean noise is continuously added and accumulates in the resulting velocity signal. This is seen as sensor drift. The velocity estimate starts out fairly correct but quickly drifts off due to this accumulated noise. Integrating a second time to get the position only worsens the situation by repeating the process.
By using an external reference such as a GPS, the Kalman filter can be used to combine the slow-updating GPS signal, and the fast-updating acceleration signal together to produce a reliable estimate of the position. The GPS has the effect of zeroing the drift that would be accumulated by performing the integration on the acceleration signal.
I would suggest taking a look at the Udacity Youtube videos that Khamey suggested. When learning the Kalman filter it helps to get a clear general overview of what the objective is and what the kalman filter is doing. Then the math and the actual steps of the algorithm will be much easier to understand. Another thing that is helpful when learning the Kalman filter is doing it for one state variable at a time instead of a whole state vector. This just helps focus your attention on what the Kalman filter is actually doing so that you don't get bogged down by the matrix algebra.
Without considering the rotation:
Let's consider that at time t=t0
you are at position [ x0 , y0 , z0 ]
and a velocity vector of [ vx0 , vy0 , vz0 ]
.
At t=t1
you read an acceleration vector of [ ax1 , ay1 , az1 ]
(The average acceleration from t0
and t1
).
Then, the velocity vector at t=t1
will be:
[ vx1 , vy1 , vz1 ] = [ vx0 + ax1 * (t1 - t0) , vy0 + ay1 * (t1 - t0) , vz0 + az1 * (t1 - t0) ]
The average speed between t0
and t1
will be
[ vx01 , vy01 , vz01 ] = [ (vx0 + vx1) / 2 , (vy0 + vy1) / 2 , (vz0 + vz1) / 2 ]
And the position at t=t1
will be:
[ x1 , y1 , z1 ] = [x0 + vx01 * (t1 - t0), y0 + vy01 * (t1 - t0), y0 + vy01 * (t1 - t0) ]
As you can see, the error propagates with t^2
, so that's why the inertial systems need to be compensated by an external reference like a GPS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With