displacement measurement using mpu6050?

By morten_tychsen , 23 September 2011

Hello,
Is it possible to use a mpu6050 for the vertical displacement measurement? I know that there is a great drift when the acceleration is integrated over time. Can this drift be eliminated?
Please help. Thanks.
Yijun

do_seoung

14 years 5 months ago

At this time consumer grade accelerometers cannot produce reliable data over any significant amount of time when double integrated. I suggest you look into pressure sensors for this type of application.

phpbb Post ID
18051

safi_hafasha

14 years 4 months ago

The simpliest way is just to use barometer. That can be used for high altitude changes with not that good accuracy in small vertical movements and nasty errors due to fast pressure changes if not filtered properly.

If you need to measure only small differences in position (like in hand-held game controllers) you can just add a high pass filter at a little bit higher that the maximum drift from double integral. So after a time the measurement goes back to zero displasement (not suitable for long term changes).

Third option is a simple complementary filter with both barometer and double integral of vertical acceleration: Lowpass the barometer and highpass the double integral. Long term drift is caused only by pressure changes but it still works with pretty small vertical movements.

phpbb Post ID
18054

tutthermannon

14 years 4 months ago

I have direct experience in tracking height movement using complementary filtering with 3-axis accelerometers and barometer. And I can say that it works.

In order to implement this, you have to know the orientation of your MARG board, as you need compensate your accelerometer readings from gravity (this can be of help).

The idea is:
get the acccelerometer readings in the sensor frame (affected by both static and dynamic accelerations)
express them in the Earth frame by using the 9DOM sensor fusion result
subtract gravity from those readings (gravity would be 1G on Earth frame Z axis) obtaining dynamic acceleration
intagrate and complementary filtering such dynamic acceleration

Current MultiWii code (function getEstimatedAltitude(), IMU.pde file), has a nice example of such complementary filtering.

phpbb Post ID
18057
phpbb Topic ID
13524