I am well aware of the existence of this issue , but mine will be different. I also know that there can be significant errors with this approach, but I also want to theoretically understand the configuration.
I have some basic questions that I find it difficult to answer for myself. There is a lot of information about accelerometers and gyroscopes, but so far I have not found an explanation from the first principles of some basic properties.
So, I have a plate sensor containing an accelerometer and a gyroscope. There is also a magnetometer that I am missing now.
- The accelerometer gives information for each moment of time t about the time acceleration vector a = (ax, ay, az) in m / s ^ 2 according to a fixed coordinate system to the sensor.
- The gyroscope gives a 3D vector in deg / s, which indicates the time rotation speed of the three axes (Ox, Oy and Oz). From this information it is possible to obtain a rotation matrix, which corresponds to an infinitely small rotation of the coordinate system (in accordance with the previous moment). There is some explanation here how to get a quaternion representing R.
So, we know that infinitesimal motion can be calculated, given that the acceleration is the second derivative of the position.
Imagine that your sensor is attached to your arm or leg. At the first moment, we can consider its point in three-dimensional space as (0,0,0), and the initial coordinate system is also attached at this physical point. So, for the first step we will have
r (1) = 0.5 a (0) dt ^ 2
where r is an infinitesimal motion vector, a (0) is the acceleration vector.
In each of the following steps, we will use the calculations
r (t + 1) = 0.5 a (t) dt ^ 2 + v (t) dt + r (t)
where v (t) is the velocity vector that will be somehow estimated, for example, as r (t) - r (t-1)) / dt.
In addition, after each infinitely small movement, we will have to take into account the data from the gyroscope. We will use the rotation matrix to rotate the vector r (t + 1).
Thus, perhaps with a huge mistake, I get some trajectory in accordance with the original coordinate system.
My queries are:
- Am I right in principle with this algorithm? If not, where am I wrong?
- I would really appreciate some resources with a working example where the first principles are not missing.
- How should I use a Kalman filter to get a better path? How do I transfer all IMU data (accelerometer, gyroscope and magnetometer) to the Kalman filter?
kalman-filter accelerometer device-orientation gyroscope
Veliko Feb 11 '17 at 13:48 on 2017-02-11 13:48
source share