Electronic – Which is give better result for find angular position of device using 9-axis IMU snesor.

accelerometergyroscopeimumagnetometerstm32

I'm Using LSM9DSO 9 axis Sensor Which gives output of Accelerometer , gyroscope , Magnetometer Output data. i want to find the angular position of the device using this sensor.

currently i'm trying to find an angle of device of x-axis but data is fluctuate so , i have refer some websites and documents which show that it is find using Accelerometer data also but i have little confuse about to which is better solution to find angular position of device.

Best Answer

Generally you determine angle by using the accelerometer readings. This only works is the unit is not accelerating at the time but you can do a quick sanity check that sqrt(x*x + y *y + z *z) = 1g +/- some error margin. If that is true then you probably aren't accelerating.

For any given axis the amount it is away from pointing straight up will be given by angle = cos-1(reading in g).

If you know how far each axis is from vertical then you can work out your orientation relative to the ground.

If you are accelerating then assuming you knew your orientation before hand you can calculate your current orientation by using the gyro readings to measure the change in orientation. However anything calculated this way will drift away from the correct answer so you will need to correct it once you stop accelerating.

You can use the magnetometer as a sanity check and a method of tracking rotation but it's not very reliable for calculating absolute heading without first being calibrated for your current environment.

All of the readings from an IMU will be very noisy unless you are using a very expensive one, expect to have to average and filter a lot to get smooth results out. In this situation expensive means the price has at least 4 digits before the decimal point.