Requesting Pixhawk 6X Pro long-duration log

Hi @andyp1per ,
As discussed on your blog post, I was wondering if you could provide me a log generated by a Pixhawk 6X Pro.
I am working on improving the gyro/accel calibration method and accel/gyro bias calculations in the EKF to improve dead-reckoning position control (i.e., if a drone loses GPS during a flight). I am currently using a CUAV X7+ Pro, and I’m wondering if Holybro’s implementation of the ADIS16740 is better than CUAV’s.

One thing I’ve noticed about the gyros in X7+ Pro is that even when averaging the filtered gyro data over 20 seconds, the gyro readings seem to oscillate at a very low frequency (~0.01 Hz). The oscillations looks small, but calibrating the gyros with a bias off by 3 mdeg/s can lead to a position drift of 25 cm in 10 seconds. That’s not bad, but it could be a lot better if the bias values didn’t oscillate.


Obviously, it’s not ideal to use 20 seconds to average out a gyro bias, but if averaging over a smaller period of time, the oscillations are greater.

So I was wondering if you could provide a 2.5 hour long log from a stationary 6X Pro, with RAW and filtered accelerometer and gyro data. Unfortunately, that will generate a roughly 5GB log file, but I can provide a folder for you to drop the file into.

Here are also parameters that I would like the log to be generated with (when starting from the default ArduCopter 4.5.4 parameters):

AHRS_EKF_TYPE,3
INS_ACC_BODYFIX,1
AVOID_ENABLE,0
EK3_IMU_MASK,7
INS_ACCEL_FILTER,20
INS_ENABLE_MASK,127
INS_FAST_SAMPLE,5
INS_GYR_CAL,1
INS_RAW_LOG_OPT,9
LOG_BITMASK,524426
LOG_DISARMED,1

After setting these params, my typical procedure would look like this:

  • Install flight controller (FC) on a rigid frame. I have mine suck to a 25x25cm half-inch plywood. The power module and 3S 1000 mAh battery are fixed to the plywood with velcro.
    • No GPS, no external sensors, no radios are connected.
    • You can use a drone frame, but ideally not something that can wobble (so not a drone on high carbon fiber tube legs).
  • Connect the FC to Mission Planner by USB and perform the usual ArduPilot accel calibration and compass calibration (this can be done via radio if it is easier, but the radio should be removed for the 2.5 hour recording).
  • Disconnect the FC from all power sources (USB, LiPo)
  • Wait 30ish minutes to let the internal temperature reach room temperature
  • Choose a location to leave the FC for the 2.5 hours
    • Ideally as close as possible to firm ground (cement foundation in a basement, outdoor on the lawn).
    • If outdoor, ideally away from the sun.
  • Plug in the battery
  • Leave the FC undisturbed for 2.5 hours.
  • Unplug battery and upload log!

Your time is really appreciated! I’ll also be curious when you test temperature stability of the accel/gyro, and if the 6X Pro can heat up and reach its target temperature when placed in a cold environment. The CUAV X7+ Pro was only able to reach 20C when placed in a -5C environment, while a Cube Orange+ can easily reach 45C. Let me know if you find time to do this, and I can DM you a link to a OneDrive folder.

I could eventually post my findings here or on a blog post if I manage to produce anything interesting.

Thanks!

Is there still the need for this log? I have a currently unused 6X Pro and could do as requested.

If it’s not too much of a hassle, I would appreciate it! Thanks!

Did the logging, private message sent!

Hi. Are you going to share the results from this test at all? Very curious to how the two implementations compare

Yep! I plan to share my findings! I obtained the log from @YupsUAV (thanks again!) and will be looking over them sometime this week.

2 Likes

So, I’ve finally had the time to compare both IMUs. Sorry for the delay. It’s a basic comparison for now, maybe I’ll push it further.

The main thing I’ve been looking at, is Gyro Bias Stability. The ADIS16740 is supposed to have a very good bias stability compared to other IMUs used in drones (an ADIS16740 is more expensive than a complete Cube Orange). Yet I felt something wrong about the ADIS16740 in the CUAV X7+ Pro. Which is why I asked for a log of the Holybro 6X Pro. I wanted to compare if one brand integrated the ADIS16740 better than the other

Short answer: The CUAV X7+ Pro has poor internal temperature control (at least for the two units I have). Our units have been with us for over 1.5 years, so maybe new units have improved temperature control, I don’t know. But the result is, that in regular temperature controlled room, the gyro biases take hours to stabilize, compared to 45 minutes to 1 hour for the Holybro 6X Pro. This causes the X7+ Pro to have more unstable biases than the 6X Pro.

Detailed answer:
I’ve graphed out the temperature of the ADIS IMU over time. While the target temperature wasn’t the same in both trials, we can clearly see the CUAV X7+ Pro having some trouble stabilizing the temperature at the desired target. The figures on the right show a zoomed in look on the temperature over 7 hours (the duration of the trial with the X7+ Pro) and over 2 hours.


I’ve also tested the X7+ Pro outdoors in 0C temperatures, and the IMU temperature could only reach around 20C (with a 40C target) and wasn’t stable. On the other hand, a Cube Orange had no trouble reaching and stabilizing at a 40C target in the same environment.

Here is a graph of the gyro biases. The biases are calculated using the filtered 2 kHz Gyro data from the AP logs, using a 2-second moving window average. I’ve zoomed the figure on the first 2 hours. The displayed biases are aligned to have the same value at the end of the graph (the biases do not converge to 0 deg/s, it’s just an easier way to visualize the variation of the biases, since they all diverge differently during the IMU warmup).

For everyday use, this isn’t a terrible issue. But you wouldn’t be spending $1k on a flight controller for everyday use. I am working on improving IMU calibration and bias estimation to improve dead-reckoning, and high bias variations don’t help.

By integrating the gyro biases, we can look at the angle drift caused by the bias variation.
In these figures, I show the X, Y and Z angle drift for the 6X Pro and the X7+ Pro. In the first figure, I use the biases calculated at boot, and then I look at the angle drift over the next 30 minutes in 1 minute segments. So, the angle might not drift during the first minute by much, but 30 minutes after calibrating the gyro bias, the angle drift by a lot over a minute.


It is normal for both IMUs to drift a lot during the first 30 minutes as the temperature is stabilizing.

If we calibrate the IMUs with the bias at the 20 minute mark, and then look at the angle drift for the next 30 minutes, it is clear that there is lest drift with the Holybro 6X Pro.

And same thing at the 40 minute mark.

Just for an idea of the scale, a constant tilt error of 1 degree, over 10 seconds, corresponds to a position drift of 8.5 m. Thankfully, the EKF uses more than just the gyro for attitude estimation, but the bias estimation can be improved for the ADIS16470.

That’s all I have for now. I attribute the bias variation of the CUAV X7+ Pro to the lacking temperature control, as I do not know what else it could be. Maybe CUAV has addressed this issue in more recent batches of the X7+ Pro.

2 Likes

interesting results, thanks for sharing @bobzwik . Seems like overall if you wait until temps are stable to launch (or at least have a GPS failsafe) you’ll have better results with gyro drift?

as a side note i’d be interested into seeing what the bias drift would look like vs the cube orange/orange+ as well to see if the ADIS makes a considerable enough difference - from what i recall cube intentionally chose not to use the ADIS (i don’t recall the reasoning, should be on the linkedin)

Good stuff, thanks for sharing!