I’m flying a quadplane, AYK 350, with pixhawk cube orange using the Arduplane 4.4.4 firmware. The plane is not holding altitude in fixed wing mode. The altitude is oscillating in a range of like 10 meters above and below the set point.
I tried with and without the airspeed sensor, the results are almost same.
What I’ve analyzed from the logs is that throttle is varying a lot, in the range of like 20 percent to 100 percent.
Here’s a screenshot of logs showing altitude, throttle percentage, and airspeed:
I do think the speeds are set too high for this plane. The adjustments I suggested above, plus the max speeds will likely need to be reduced. It’s all covered in the TECS tuning. The throttle is going for max to min trying to maintain the speed and altitude, so it’s also possible this plane is on the heavy side.
In the future, use the .bin rather than the .log. It’s easier to work with.
Do you think this issue might be related to “level” calibration? I calibrated the plane by placing it level on the ground but after reading the AHRS level calibration at Tuning Cruise Configuration — Plane documentation (ardupilot.org), it appears we might need to place it 2 or 3 degrees nose up while doing level calibration.
the plane might be trying to maintain zero pitch at cruise while it should be a few degrees nose up?
also, the airspeed min, max, and cruise values are provided by the manufacturer that’s why I went with that blindly.
When the plane is in FBWA the throttle is around 65% and the speed is 20m/s. In Auto mode the plane will try to fly a speed between the min speed (set at 23) and max (30), so about 26-27 m/s. I just don’t think there’s enough throttle to get there and maintain the speed, and that’s why it’s oscillating.
Depending on the manufacturer some times those numbers are a little optimistic, or they are so dependent on specific conditions that they may not apply on reality. If you’ve got a different payload, or the plane is heavier than tested, the manufacturer’s numbers may not work.
For TECS to work properly, the attitude control, especially the pitch, must be well-tuned beforehand. It looks like you haven’t done any autotune at all, because the roll and pitch tuning values are all at the default settings and the Pitch control in FBWA is also very poor.
Another requirement for good TECS tuning is that the speed parameters are set correctly. I recommend updating to the latest stable firmware version. ARSPD_FBW_MIN/MAX is now AIRSPEED_MIN/MAX and TRIM_ARSPD_CM is now AIRSPEED_CRUISE. Setting the cruising speed to AIRSPEED_MIN is not a good idea, especially as it is a VTOL.
For the autotune, you should set SCALING_SPEED from 15 to the actual desired cruising speed and perform the autotune at this speed and parameterise TRIM_TROTTLE and AIRSPEED_CRUISE accordingly. You should think about AIRSPEED_MIN and MAX. AIRSPEED_MIN should be 20% above the stall speed - AIRSPEED_MAX should be the maximum speed in level flight at full throttle with non-full batteries.