IMU Roll Angle: Correct when Stopped, Wrong when Moving
Chrisau
Posts: 3
Hi,
I have been using an MPU6050 (3 axis gyro, 3 axis accel, built in motion filter called DMP) with an Arduino on a car axle to measure axle angle when driving. On a long banked corner (2 degrees) the sensor reads 0 degrees while moving (~40km/hr), but when stopped it reads correctly (2 degrees). The physical axle angle is the same though in both scenarios.
I believe the lateral force from going through the corner is affecting the sensors interpretation of which way gravity is, and is adjusting the roll angles accordingly. See image;
Can anyone comment on how this might be solved?
For example;
-Using a sensor with a magnetometer?
-Using a sensor with a different filter?
-Is this solveable at all or just an inherent factor of MEMS sensors?
Thanks in advance for your input.
I have been using an MPU6050 (3 axis gyro, 3 axis accel, built in motion filter called DMP) with an Arduino on a car axle to measure axle angle when driving. On a long banked corner (2 degrees) the sensor reads 0 degrees while moving (~40km/hr), but when stopped it reads correctly (2 degrees). The physical axle angle is the same though in both scenarios.
I believe the lateral force from going through the corner is affecting the sensors interpretation of which way gravity is, and is adjusting the roll angles accordingly. See image;
Can anyone comment on how this might be solved?
For example;
-Using a sensor with a magnetometer?
-Using a sensor with a different filter?
-Is this solveable at all or just an inherent factor of MEMS sensors?
Thanks in advance for your input.
Comments
Gravity is an external reference, as is the magnetic field of earth, but they only provide pieces of information, and aren't easily measured by themselves - The accelerometer sees gravity, but also any other accelerations acting on your sensor, and the magnetometer has the same issue - any local magnetic fields will interfere with your compass readings.
If you have a GPS, it's possible to compute the amount of centrifugal force you're experiencing, and remove that from the accelerometer readings before running the sensor fusion algorithm. If you're using the MPU6050, I'm guessing that all happens internally, so you might be stuck with it - I'm not sure if they allow modification of the sensor readings before fusion.
It'd be worth taking a look at what ArduPilot does in their code - they account for centrifugal force in long banked turns (called a coordinated turn in an airplane), so there's code available to do it.
I was making a race data logger a couple of months ago with a BNO055, and had a lot of issues with lean angle when moving.
Here's a PDF that breaks down the math, although I haven't much desire to go back to getting the math to work. - http://acl.kaist.ac.kr/thesis/2013partd_OJW.pdf
The gyro is good for determining orientation but will drift.
This can be compensated for by using "sensor fusion" algorithms. It helps to have a compass to mix in there as well. You might want to look at Sebastian Madgwicks sensor fusion:
http://x-io.co.uk/open-source-imu-and-ahrs-algorithms/ It shows some impressive stability despite lateral accelerations and such.
xanadu,
Interesting. I presume you were using the BNO055's internal algorithms. I have been itching to get hold of one of those to try out.
The Microcenter in St. Louis had an Adafruit board with the BNO055 on it in stock for $35. When you arrive in the US next, see if you can find one.
Some further research is giving me more insight into how others solve the problem (which has been suggested in the replies above, thank you). Primarily using a method to calculate the centrifugal acceleration, and then compensating for it.
These solutions come from William Premerlani in the fixed-wing UAV community.
Using GPS;
http://diydrones.com/profiles/blogs/acceleration-compensation-flight-testing
Using only Accel and Gyro;
http://diydrones.com/forum/topics/centrifugal-compensation-with-only-gyros-and-accelerometers
This solution coming from a research paper for fixed-wing UAV;
http://users.cecs.anu.edu.au/~Jonghyuk.Kim/pdf/2008_Euston_iros_v1.04.pdf
I am actually State side just now. Moutain View. But that means I don't have the time or wherewithal to do anything much with a BNO055, to busy. I'll order one from Adafruit or somewhere and it will be waiting when I get home.
You should have a good suntan and dual citizenship by now.
I'm more like a sun dried tomato!
I don't think Trump will go for the dual citizenship idea
Sure he will.
New policy: It's not who you know, it's what you know. We'll just kick a dozen dumb people out.
Moderator Edit:
Careful, we don't do politics here.