kriswiner / EM7180_SENtral_sensor_hub

(Affordable) Ultimate Sensor Fusion Solution
https://www.tindie.com/products/onehorse/ultimate-sensor-fusion-solution/
96 stars 37 forks source link

How do you select Beta and Zeta gains in Madgwicks ahrs? #46

Open XaviLC opened 5 years ago

XaviLC commented 5 years ago

HI @kriswiner

I have a question regarding the value for the beta and zeta of the Magwidck algorithm. Starting in the folliwng line you mentioned the value that should be picked for the beta and the zeta ( gains) that control the drift compensation of the algorithm. You mentioned as well that you increased the beta factor 15 times, thus I was wondering these two questions

  1. The gyroscope error, 40°/s that you are taking, how is it named in the datasheet of the LSM9SD0? In am working with the BMI160 and I would like to have that its respective error too, is this error the so called Zero-rate offset?

  2. How do you know/calculate the time to get an estable output of the Madgwick filtering (aka its convergence)?

Thanks in advance,

Regards!

kriswiner commented 5 years ago

The most important factors for accurate absolute rientation estimation are in rank order:

1) quality sensors 2) calibration 3) data sample rate, high-enough fusion rate ... 9) fusion algorithm ... 99) fusion algorithm parameters.

The beta and zeta are meaningless knobs and I would ignore them.

The time for algorithm iteration is determined by the speed of the processor, so best result can be obtained with an STM32 for example but not with and UNO or a Pro Mini...

Focus on proper sensor selection, or if you are stuck with the sensors you have then focus on calibrating them properly for best results.

On Wed, Dec 12, 2018 at 1:07 AM XaviLC notifications@github.com wrote:

HI @kriswiner https://github.com/kriswiner

I have a question regarding the value for the beta and zeta of the Magwidck algorithm. Starting in the folliwng line https://github.com/kriswiner/EM7180_SENtral_sensor_hub/blob/3923a6a3eda198b053d0f404f16ea19c91778f57/EM7180_BMI160_AK8963C.ino#L261 you mentioned the value that should be picked for the beta and the zeta ( gains) that control the drift compensation of the algorithm. You mentioned as well that you increased the beta factor 15 times, thus I was wondering these two questions

1.

The gyroscope error, 40°/s that you are taking, how is it named in the datasheet of the LSM9SD0? In am working with the BMI160 and I would like to have that its respective error too, is this error the so called Zero-rate offset? 2.

How do you know/calculate the time to get an estable output of the Madgwick filtering (aka its convergence)?

Thanks in advance,

Regards!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kriswiner/EM7180_SENtral_sensor_hub/issues/46, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qi3q7qM0HhfoyZrpGeJObefNu6Fjks5u4MdEgaJpZM4ZPAnw .

XaviLC commented 5 years ago

Thanks for your reply @kriswiner

In my case I am stuck with the sensors that I have, the BMI160 and a ADLX362 for the accelerometer. I think both are good quality sensors.

However I am facing some issue with the ADLX362 regarding to the 0g-bias that its owns, in that I see a range dependency between the configured range and the 0g-bias that I would like to eliminate or compensate through calibration. Have you worked with the ADLX362 before? I was considering including this error as input to the fusion algorithm but I don't know whether that is a good approach or not seeing your factor list.

Thanks again!