Servers by jDrones

Copter 3.6 EKF3 Range beacons : individual beacons' data not fusing for several seconds


(Corentin Giraud) #1

First post here !

I have a question about the fusion of range beacon data in ardupilot with EKF3 for positioning.
I am experimenting with range beacons using UWB beacons, and when I looked into the logs, I found that for periods of several seconds, the measurements of some beacons were not fused alongside the other beacon measurements. This happened consistently, and on average, at least one beacon’s data was not fused into the main filter (not always the same beacon).

I was wondering if someone has an idea why this is happening. I used the EKF3, without the GPS.

Maybe it is linked to the high rate of data (4 distance measurements at 20Hz, so 80 range measurements to fuse per second).
I also thought it might be linked to the logging of the data (so it would be fused but not recorded ? but it looks unlikely).
I do not believe the problem lies with the sensor, because the way our driver is designed, if one distance is received, all 4 are received (at the same time). Also, as I understood the code, if a distance is received, even if it is bad and doesn’t pass the innovation gate test, it is still logged at the end of the EK3 fuseRangeBeacon() method.
To do this test, I carried around a drone in a cross-shaped trajectory (indoors), between 4 UWB beacons. The 4 beacons were placed in a rectangle 7.8m long and 5.1m wide. This was done after the initialization with the fuseRangeBeaconStatic() method was finished.

Here is the plot with the ranges : (plotted with XKF0 from the log file)

Here is a closer look at the ranges :

Here is the trajectory produced :

Here is a link to download the log if needed :

Thank you !

(priseborough) #2

A high data rate can cause data to be overwritten in the FIFO buffer before it falls behind the fusion tine horizon and is retrieved from the buffer within the EKF. Once the range beacon data starts to approach the EKF’s internal update rate of 100Hz, timing jitter can cause data to be overwritten.

However looking at your log and plotting of beacon range innovations and beacon ID’s from the XKF0 log message indicates that regular fusion of each beacon ID is occurring internally to the EKF.

(priseborough) #3

The BCN data message looks OK so data is making it into the code

Looking at the XKF0 message in more detail, the constant XKF0.rng data is also accompanied by constant XKF0.innov

which means that the rngBcnFusionReport[rngBcnDataDelayed.beacon_ID] array is not being updated for that value of rngBcnDataDelayed.beacon_ID. I’m digging through the code to see what could be causing this.

(Corentin Giraud) #4

Exactly, and the ranges that we see with the XKF0.rng message, in the EKF log, match the ones in BCN.DX (if we split them between the relevant beacons), it’s just that they are not always updated.

If we only look at the D0 distance, we see that the distance matches, except when it doesn’t and stays constant for a few seconds.

And the same graph with a zoom

Thank you for looking into this !