Hi everyone,
Our 20-kg quadcopter experiences severe oscillations in position-controlled modes (Loiter, PosHold) only when RTK is enabled . The issue persists even after significant tuning and in different environments.
The oscillations seem like this, and if we don’t give any input to correct it, the last 2 cycle continues and sometimes it even gives GPS glitches:
Unfortunately, our normal testing site is next to a big metal building, which affects compass in general. Before these tests, we performed a full compass calibration routine and a MagFit to find the motor compensation values in an open field (away from the metal building) to get the best results.
I tried uploading the logs here but size limit exceeded. Here’s the link to all five logs:
Flight #1:
We first tuned the aircraft with 2 GPS’s, no RTK enabled. PosHold seemed to be holding well and we didn’t get any errors. Here’s the log to that first flight. It was performed next to the building.
Flight #2:
Without changing any setting or location, we enabled the RTK. We experienced some oscillations in pitch, it was also going back and forth.
Flight #3:
As a first tuning effort when RTK enabled, we reduced the POS_XY_P, VEL_XY_P, VEL_XY_I gains.
We never could get the perfect yaw innovations graph next to the building, but after we enabled the RTK, it got even worse. We thought maybe if we increased the EK3_MAG_M_NSE, and decrease EK3_POSNE_M_NSE, EK3_VELNE_M_NSE that would help since GPS is more trustworthy and the compass is sketchy because of the interference. We tried those but didn’t work as expected. I’m not including those logs here but if needed, I can provide them as well.
Since EKF parameters didn’t help, we tried moving to an open field, away from the metal building.
Flight #4:
In an open field, we attempted a flight test with the same gains as flight 1, to check how the metal building affected the performance. It seemed better than the first one, but the oscillations are still there.
Flight #5:
In an open field, we tried the reduced gains, same as flight #3.
While we were trying to find the reason, we noticed that the IMU gyro biases are highly inconsistent. On some flights, they are perfect (under 0.05), while on others—without any hardware changes—they are extremely large (0.2 or even 2.0). We cannot find any trend or correlation for this behavior. Is it related to the issue we’re having, and how can we fix this?
Do we need to change some parameters related to EKF or some tuning parameters when RTK is enabled?
Thank you so much for all your help. I can provide more logs if needed.
System Information
Ardupilot Firmware: Arducopter V4.6.2 (1EBD4D99)
Frame: Quad X
FC: Holybro Pix32 v6
GPS1: Mateksys GNSS M9N-G4-3100
GPS2: WrenMini GNSS
RTK Base Station: H-RTK NEO-F9P w/ Base Station Antenna
Propulsion system: Hobbywing XRotor X6 Plus
