ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange

# Reading from an IMU (single axis)

How do I use the single axis accelerometer (one in the single axis IMU) to measure linear velocity (and hence linear distance covered)?

edit retag close merge delete

Sort by » oldest newest most voted

The relation from acceleration to space is a double integral, this means the second integral is integrating the error in the first which you can't eliminate.

Accelerometers are never used alone to measure space. You could obtain a decent estimate for around 100m, no farther than that.

All of this is valid for MEMS, other technologies (like ICP) respond differently, but the double integration error is inherent in the math behind it all.

If you simulate it in matlab by moving a point by its speed, deriving acceleration and then integrating acceleration two times to obtain space, you'd see the estimate will drift hugely over time.

It would drift even if you'd use the acceleration instead of the speed, only the simulation would appear much more reliable than the real thing because you would not have all the noise that affect the various processes in a real system. Unless you simulate it that is...

Detailed explanation as to why this is the truth about MEMS sensors.

Every sensor has its pros and cons. MEMS accelerometers are misleadingly named: they don't really measure accelerations, rather they measure the direction of the gravity vector. This measure is often used to correct the bias of MEMS gyros which tend to accumulate during integration.

A proper IMU, as those found in military systems or civilian passenger jets, is a bulky, powerthirsty thing using huge sensors like mechanical gyroscopes (real rotating mass) or laser ones and real accelerometers made with displaced masses (check wikipedia).

MEMS accelerometers on the contrary are way too small and subject to noise, just like MEMS gyros: if you blindly integrate a gyro's signal, you'll end up with a big accumulated error very fast. Should you do the same with a MEMS accelerometer, integrating to get the speed, you'd also get to an unrecoverable error very fast.

This is due to the inherent nature of the mechanics involved: these kind of sensors are accurate in the transients, but have very noisy steady state ouputs. Such sensors are, by design, suitable for instantaneous measurement rather than accumulated data.

So in 6dof system the Kalman filter family greatly benefits from the fusion of accelerometers and gyroscopes because this fusion yields a very accurate 6dof estimation but don't let the names mislead you: 6dof system means it has 6 degrees of freedom, it doesn't mean it gives you accurate measurements on 6 degrees of movements. Actually what you end up with is a pretty noisy and rough estimate on 4 (the 3 translations and the z rotation) and a very accurate one on 2 (the x and y rotation).

This is much akin to human capability: if I put you in a desert and tell you where you are, than wait some time while you walk and then ask you for your estimation of your position, the degree to which you diverge from the actual position depends utterly on the ...

more

Then what use is the IMU in measuring distance? Does it only measure angular twist (using the gyro) and nothing else? Then, of what use is the accelerometer present in the IMU. Please explain.

How does an EKF improve drastically when you include an IMU?

( 2013-04-21 06:07:02 -0600 )edit

I've extended the answer, hope it helps you understand the problem.

( 2013-04-30 00:48:46 -0600 )edit

Wow, great answer, Claudio! Maybe to add one more thing: Since MEMS IMUs alone are very bad at estimating traveled distance, you need to add other sources of information to your EKF, such as wheel odometry (which is typically rather good at estimating distance, and rather bad at estimating rotation)

( 2013-04-30 01:14:36 -0600 )edit

Great idea Martin, although I didn't envision an answer as a comprehensive tutorial on position estimation ;)

Well maybe if i find the time...

( 2013-04-30 04:28:25 -0600 )edit

( 2013-06-02 20:57:22 -0600 )edit

Why is the z rotational (yaw) error noisy?

( 2017-05-09 04:32:31 -0600 )edit