Altitude and Throttle Oscillation

Hi there!

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:

Here’s how roll and desired roll are behaving:

Pitch and desired pitch:

p.s we tried flying in FBWA, in FBWA the oscillations were greatly reduced in throttle and hence altitude. here’s the FBWA portion:

Here’s the parameter file for plane v4.4.4:
ayk350_plane4.4.4.param (21.3 KB)

Can anyone please take a look and identify the problem?

Hard to say without a log, but just looking at the parameters I would say the min speeds are too fast.

Try:

TRIM_ARSPD_CM,2000
ARSPD_FBW_MIN,18

Could also be a C of G issue but can’t see that with just params.

Use a share drive (dropbox, google, etc) to share the .bin log file. Then we can maybe give you better advice.

@Allister please take a look at the logs attached:

thanks!!

Update the firmware to the latest stable.

Do the full TECS tuning.TECS (Total Energy Control System) for Speed and Height Tuning Guide — Plane documentation

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.

also i found another user facing almost the same issue:
VTOL Quadplane AUTO Flight Failing to Maintain Desired Altitude - ArduPlane / VTOL Plane - ArduPilot Discourse

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.

1 Like

yeah, i’ll try lowering the cruise airspeed (TRIM_airspeed) to 20, right now it’s set to 23.

min speed ( arspd_fbw_min) and max speed (arspd_fbw_max) are 20 and 35 respectively right now.

Thank you!

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.

1 Like