Redundant Sensors


As far as I understand when using more than 1 IMU - Ardupilot runs a separate EKF for every IMU and chooses the best one.
For example: if I have 3 seperate IMUs (with each having a Compass,Accelerometer,Magnetometer) it will calculate the EKF for each IMU seperately, select the IMU that gave the best results and throw away the results from the remaining 2.
Is this correct ?

If so, wouldn’t averaging the data between the IMUs (if we know that an IMU works fine) yield more accurate results ?

You have you answers in here:

This is fundamentally wrong. Why not increasing the weight of measurements on that sensor to results? İf you know that it is working perfectly fine, why you need others, why are you averaging the result?

Intuitively, if you have a million accelerometers taking readings - I would think that taking all the outputs and averaging them out will result in a better estimate than taking the output of only one “fine” accelerometer.

1 Like

IIRC measurement variance is proportional to the inverse of the square root of the number of samples. So the benefits are rather small and one bad sensor can cause significant errors. Running 2 or more EKF lanes makes it possible to switch to a more trustworthy one if something bad happens.

If you have two 9DoF IMU. Primary (used by currently active lane) one starts sending wrong gyro rates. It causes errors in attitude calculation but since magnetometer and gyro give conflicting readings EKF innovation increases causing reasonably prompt switchover to correctly working lane.

If you were averaging, the deviation would be half as big but you would need external algorithm to identify broken sensor, exclude it and preferably rollback and recalculate attitude estimate.

Three IMU are better because they make it quicker to reject bad lane.

So wouldn’t the optimal approach be average while everything is fine and reject when a problem is discovered ?

As long as you can detect failure of one of the sensors, identify when it started giving errorenous data, perform rollback and recalculate (for at least a few seconds it took to detect the failure) then maybe you would get better accuracy. This would require fairly complex failure detectors for each sensor and very large buffers for incoming data. Running 2-3 EKF with distributed affinities is much simpler and provides good enough results with significantly less overhead.

1 Like

This isn’t as simple as you want it to be. For example, an autopilot might have an MPU6000 sampling at 8kHz alongside a BMI270 sampling at 3.2kHz. So, the samples will be taken at different times and different rates. Averaging them will introduce a very small amount of error (maybe not enough to be practical) and also potentially reduce the advantage of the higher sample rate of the BMI6000, since 2-3 of its samples will (potentially) be averaged against a single sample from the BMI270.

It’s possible that averaging this way could have a positive filtering effect, but it’s also entirely possible that the small errors and sort of “deadening” of the higher sample rate sensor will be detrimental. I’ll leave it to those with more depth of knowledge on the subject to draw conclusions regarding the actual impact(s) of such effects.

Consider, also, autopilots like the Cube series, where two of three IMUs are vibration isolated, while one is rigidly mounted. If you simply average them all, the non-damped IMU will almost certainly introduce noise.