Skip to content

Centrifugal Force Compensation IMU #43

@brightproject

Description

@brightproject

I am developing a prototype attitude indicator.
I use a board LSM6DS3 as accel + gyro sensors + STM32 as microcontroller for mathematics and ESP32 for graphics generation.
I do not enter the values of the magnetometer axes, and according to the library code

if((mx == 0.0f) && (my == 0.0f) && (mz == 0.0f)) {

in the case of mx = 0, my = 0, mz = 0 the filter will only take the value of accelerations and angular velocities of the gyroscope.
On the ground this filter works great.
photo1692643955 (2)
https://disk.yandex.ru/i/vr-5XOem67E0WQ
But in flight it behaves like a glass of water - i.e. useless.
left_turn
https://disk.yandex.ru/i/w4hdS5hw0NJngw
What is being measured is not gravity, but centripetal acceleration.
Accordingly, you need to compensate for this somehow.
I found only theoretical materials, but no one implemented it in code, except perhaps iNavFlight.
What do these coefficients give?

#define sampleFreqDef   512.0f          // sample frequency in Hz
#define betaDef         0.1f            // 2 * proportional gain

#define sampleFreqDef 512.0f // sample frequency in Hz

My knowledge of programming is not very good, and I cannot implement any ideas in the program, although there are many different options for solving the problem.
As far as I understand this process - it is necessary, at the beginning of a right or left roll, to give priority to the data from the gyroscope, and “mute” the accelerometer data, when the turn ends, the data from the accelerometer again takes priority over the angular velocity data from the gyroscope.
Can anyone explain whether it is possible to implement compensation for centrifuge forces in MadgwickAHRS or is this filter not capable of working in flight?
I found and use a more “advanced” filter, which adds the magnetometer signal.
I haven't tested it in flight yet.
I wanted to refine and test the
MadgwickAHRS filter.
After all, even filtering only using an accelerometer and magnetometer gives the roll, pitch and yaw angles.

Metadata

Metadata

Assignees

Labels

type: supportOT: Request for help using the project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions