Loiter instability led to crash. Any ideas? Bin attached

I have a Swan K1 converted to Ardupilot 4.2 on a MATEK F765Wing. I have been tuning and getting everything dialed in but one issue that has finally led to a crash is unstable loiter in fixed wing. About half the time it will enter a loiter fine (as an auto mission or just switching to loiter from cruise etc). The other half of the time it will become very unstable and basically wobble towards the ground. So, I tried adjusting the max bank angle, increased the default loiter radius etc hoping to get rid of this issue. In this flight I ran autotune in fixed wing mode and it completed fine. So I went back to cruise mode then tried loiter again to see if it was any better. It did a death dive towards the ground and burned in. I tried switching back to cruise to save it as I have before but it was too late. Thanks for any help.

BIN FILE HERE

It looks to me like you had a stall-spin. As you can see the roll and pitch of the plane diverge drastically from the target roll and pitch of the autopilot during the crash.


This is exacerbated by a poor tune, especially for roll. As you can see the actually roll frequently differs from the desired roll by more than 20°.


Because your motors are often pegged at their upper and lower limits I think this is partially due to the inherently poor roll authority of a control-surface-less tailsitter. In addition to performing the autotune for longer, I’d suggest further limiting your max bank angle and increasing the NAVL1_PERIOD.

I really appreciate the insight. I will look at NAVL1_PERIOD and complete another tune. So far after the loiter radius it seems to be doing better. I flew in 10-15mph winds with no issue and the circle was almost perfect in loiter.

Another flight and crash. EKF and yaw reset errors on this one before the crash. This was a very calm day. No idea what is causing this. Previous flight was perfect. Wondering if it is a hardware issue. Any insight appreciated.

Previous perfect flight HERE

The very next flight. Only change was to re-calibrate compass.

Crash flight HERE

These are really interesting platforms so I’m watching this to see how this works out.

I looked at the two log files you posted. The tuning in fixed wing mode is not good. Even in the “perfect” flight the pitch and roll performance during the loiter wasn’t great. The screen shot is during the loiter and there is a very noticeable oscillation in both axis, especially roll.

I would agree with the previous comment that more tuning is required for fixed wing mode. Either in auto tune or manually. Those oscillations need to be addressed.

Thanks for the feedback. Once I get it back in the air (need new wing spar and pitot) I will get it up and try autotune again. Could this be because it has no control surfaces and uses differential thrust only?
And, would that explain the EKF and yaw reset messages?

I’ve never put my hands on one of these to get a good look, but I bet that has everything to do with it. I don’t know how this will ever have good roll performance since it has very little (if any) control on that axis without significant coupling of pitch and yaw. That coupling may be contributing to the EKF issues.

All that said, I hope somebody figures it out because I think these are pretty cool and I’d like to build one myself.

Hmmm, I may look at adding elevons to this model. Would have to figure out how to mix them in.

We do have a build for the K1 using its stock flight controller:

https://firmware.ardupilot.org/Plane/latest/Swan-K1/

Its default prams are here:

If the rest of the hardware is more or less the same the tune params should just copy across.

1 Like

Thanks. Yes those are the params I started with and experienced these issues initially with. Then tried autotune without much luck.

your key problem is your GPS:


the self-reported accuracy of the GPS (the accuracy that the GPS itself thinks it has) is terrible It looks like it is a M9 GPS, but for some reason it is very unhappy. It is only getting a few satellites (a M9 should be getting 25+ satellites) and it’s speed accuracy (which is the most important thing for ArduPilot) is 20m/s. A “normal” value for a M9 would be 0.25 m/s or better.
Maybe you have some sort of video transmission system interfering with your GPS? Otherwise if there is no obvious cause then replace the GPS.

Is the .HAcc and .VAcc the same as HDOP and VDOP?

Thanks. It is an M9N. Looking at previous flights I was showing 24-28 sats. The first crash posted above had 25 sats. Ok, I guess I need to track down possible interference, Maybe some copper shielding needed, Maybe my DJI system is interfering.
Also wondering if I should be using latest stable as opposed to 4.2 dev.

Thanks tridge and Allister

for Swan-K1 support definitely use the 4.2 dev. It is not supported in 4.1.x

no. HAcc and VAcc are estimated accuracy in meters. HDOP and VDOP are geometric measures of satellite distribution over the sky. They are correlated, but not the same thing

1 Like

the key thing is SAcc, the speed accuracy. horiz and vert pos can be off and ArduPilot can cope. If speed accuracy if badly off then you will likely crash

1 Like

Got it thanks. I will do a good bit of FBWA flying to verify speed accuracy between ground and airspeed before trying loiter etc.

I see the SAcc seems to correlate with the EKF lane switch messages and gets really bad right as it started to spiral. (And at the same time GPS seems to lose its mind)

Interestingly the POS Alt and Baro Alt have a constant offset. The GPS Alt starts off with a similar offiset to baro but then wildly diverges from both Baro and POS. Strange that both crashes were within meters of each other geographically but are literally out in the middle of nowhere. Nothing I could possibly see that would cause interference.

And looking at the first crash, baro, gps and POS alt all look fine.

I have been flying drones/RC for years. Big stuff overseas and now in a a large OEM manufacturer. I have crashed my share and can deal with it as long as I have an idea of what went wrong and how to fix it. I just don’t have that much experience in Ardupilot so I am learning. Such a gutted feeling when it burned in a 2nd time after thinking I had it fixed.