Non-constant airspeed during loiter

I fly a TwinStar airframe with a Pixhawk 4 Mini, ArduPlane 4.0. I use an airspeed sensor, and the system works very well overall. I flew an auto mission on a day with moderate wind (~5 m/s) with ARSPD_FBW_MIN = 10 m/s and TRIM_ARSPD_CM = 1150 cm/s.

Suddenly during straight and level flight, the airspeed became very (dangerously) low, lowest reading was 6 m/s, and the aircraft stalled. I switched away from the auto mission to guided mode and entered a loiter to stabilize and monitor the situation. I noticed that in the loiter, the throttle noise level would vary drastically with position along the circle (tailwind / headwind). The rest of the flight progressed normally. Here is a plot of the airspeed over the flight, showing the dangerous stall event around t=200s.

In analysis, I found that the airspeed during loiter in wind is not constant at all, but instead seems anticyclic to the ground speed:

To me, it seems like the aircraft somehow tries to control ground speed rather than airspeed, or a mix of both. In the loiter circle, as ground speed increases, the aircraft decreases the airspeed, and vice versa. But from my understanding, it should attempt to maintain a constant airspeed (TRIM_ARSPD_CM) at all times.

  • Did I get my settings wrong so that the plane controls ground speed rather than airspeed?
  • Could this also be the reason for the dangerous stall event at t=200s?

Here is the dataflash .bin file:
https://www.dropbox.com/s/mj6blyvoi8udhof/2020-10-24%2016-00-18.bin?dl=1

Sounds like the FC is using ground speed not air speed in the control loop, do you have the ‘use airspeed’ box ticked in the hardware setup?

you’ve disabled the whole arming process:
ARMING_REQUIRE = 0
any good reason for that?

in loiter circles, your average airspeed and groundspeed diverge by only ~ 1 m/s, 13,3 vs 12,2 m/s respectively at ~36% average throttle, with an average of ~ 7° up elevator applied though.

i’d say your speed / height controller needs some tuning. while you’ve likely performed an autotune on the PIDs, i see all SERVOn_TRIMs at default as well as your pitch.I constantly positive (elevator trim? CG?). a max throttle of 100% with a slewrate of 100% imho might add room for overshoot too.

i’d suggest to fly a longer straight leg in CRUISE at desired airspeed with SERVO_AUTO_TRIM = 1 to check average throttle demand, pitch angle and elevator trim, then adjust trims and limits accordingly.

1 Like

Besides what basti @vierfuffzig said, the thrust controller is still poorly parameterized. One has the impression that the thrust controler is working far outside the control range and the whole system is resonating. At least that was the reason for the stall.


One reason is certainly that you already reach the cruise speed (TRIM_ARSPD_CM,1150) with 35% throttle and not with 45% as set (TRIM_THROTTLE,45).
In view of the speed range (ARSPD_FBW_MAX,22 ARSPD_FBW_MIN,10) the Cruising Speed (TRIM_ARSPD_CM,1150) is also selected very low.

A good help is the TECS Wiki https://ardupilot.org/plane/docs/tecs-total-energy-control-system-for-speed-height-tuning-guide.html

Rolf