Author Topic: Absolute angle calculation from gyro and accelerometer  (Read 818 times)

0 Members and 1 Guest are viewing this topic.

Offline AmperTopic starter

  • Frequent Contributor
  • **
  • Posts: 290
  • Country: 00
Absolute angle calculation from gyro and accelerometer
« on: April 28, 2020, 10:36:47 am »
Hi! I hope this is the right category for this post since its not really an electronics question.

Im working on a segway project and have toknow the absolute angle. This works beautifully via two accelerometer axis but this only works in static applications. As soon as there is a linear motion to the sensor, the angle is changing according to the total acceleration vector.

Is there a simple way to correct for it or does newton say no?
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4705
  • Country: au
  • Question Everything... Except This Statement
Re: Absolute angle calculation from gyro and accelerometer
« Reply #1 on: April 28, 2020, 11:01:39 am »
It is usually called "sensor fusion" there are tons of libraries out on the internet for it, basically it is subtracting the effect of one from the other, in your case it would be subtracting the acceleration of the motor * the calculated angle of the gyro from the accelerometer output.

The libraries basically put the accelerometer axis and the gyros rotation in the same space, so that rotation on the gyro rotates the output of the accelerometer to the same orientation, keeping things consistent over rotation, then when you have acceleration with no rotation it can be summed out, (a magnetometer would usually be added to provide a way to fight the drift of the gyro)
« Last Edit: April 28, 2020, 11:09:59 am by Rerouter »
 
The following users thanked this post: ahbushnell


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf