Fly-away in position mode

We have tuned PIDs for tailsitter (as multicopter) indoors in manual mode, it performed not ideally, but well. However, when in outdoor test we switched it in position mode, it flied away.
Why did this happen?
GPS seems to be ok. Can it be a problem with compass?
Also, why did yaw setpoint oscillate with increasing magnitude?

1 Like

Changes are high this was due to interference of the magnetometer.

  • Check that compass used is far away from power electronics and wiring. E.g. use a GPS/compass post.
  • Make sure mag calibration is done without interference.

Check that there is no correlation between thrust and mag measurements:

Also note that in master/1.11 there is protection against this kind of problem that recently came in.

When reading about this online it is often described as toilet-bowling.

Thank you for your response.
Yes, compass is near power wires, I hope we’ll fix it in next version.
Do you think this is the main problem? I ask because of three thoughts:

  • We didn’t see such behavior in indoors test, even at fast start.
  • Even when compass was badly calibrated, we saw only slow drift relatively to exact angles from gyros.
  • Why plane had straightforward flight in fixed direction (as one can see from gps track)?

To rule out a basic tuning problem - if you also share a flight where you flew more in stabilized mode and exited all axes a bit I’m happy to have a look at that. It the attiditude/rate controller are not neatly tuned then you will very likely have big issues in position control mode on a tailsitter.
I would also do the first few outdoor flights in stabilized, then altitude and only then move on to position. – outdoor testing (also finished with crash) – one of indoor tests (manual), where plane behaved well according to the pilot’s feelings

Yeah there’s quite a big difference between the indoor and outdoor flights…how windy was it?

Still, also indoor the rate tracking shows some problems, e.g. the yaw rate tracking:

The integrator is filled up for the whole flight, which really shouldn’t be the case. This then leads to a steady yaw actuation:

If the elevons are busy controlling yaw, they have less control authority to control pitch, which is ofc more safety-critical.
How large are your elevons compared to the wing? It looks to me like they in general have rather a bit too little authority - most tailsitters I know of have elevons with an area of roughly 1/3 of the wing area, plus a large possible deflection angle.

In the outdoor flight the attitude tracking is completely off, I wouldn’t try with position control flight until that has massively improved.

Thank you for the detailed analysis!

Wind was weak, at least it doesn’t prevent from fly-away in opposite direction :slight_smile:
Elevons in our case also about 1/3 of the wing area; we’ll try to increase deflection angle.

I don’t understand about integrator: is it an integral of yaw rate estimated or yaw rate error or something else?

One more item. Our drone is heavier and has big moment of inertia. Does this mean that it’s better decrease coefficients like MC_PITCH_P to get smaller rate setpoints and smoother behavior?

Did you try to fly again? Has the problem been solved? I noticed that sometimes your actuator will be saturated, and a good CG position is also very important. Try to re-calibrate the gyroscope and geomagnetism, increase some yaw speed loop gain, and reduce the maximum set rate of yaw (now 200) In addition, according to my experience, the throttle is too small in manual mode will also cause the drone control to diverge

Hi, no, we still repair our plane.

The maximum set rate of yaw – do you mean parameter MC_YAWRATE_MAX? Is it used for tailsitter? And is it used across all modes, or only in manual/stabilized?

And am I right, yaw speed loop gain is FW_YR_P for tailsitter?

Thank you!

No, on the tailsitter it uses always the fixed-wing rate controller for (hover) yaw control, and it’s actually the fixedwing rate controller, so FW_RR_P. For hover pitch it’s FW_PR_R, and for hover roll it’s MC_RR_P. Quite confusing I know, but this way you can use the same rate controllers for hover and fixed wing phase.

Absoultly right, this confuse me for a while! But If we can modify the mixer to user MC PID parmas to tune the tailsitter only if you just fly in the hover mode.