I am using the latest version of arduplane downloaded on Mission Planner, with our school-built wooden plane. It flies well in FBWA mode, but when i switched to auto mode, throttle is immediately cut down. It pitched down although it is supposed to climb up to a higher altitude. the rolling also seems to be reversed.
The deflection of control surfaces in FBWA mode are all correct and self-stabilization worked well also, but in auto mode it seems to be reversed. I have reversed some channels output in Mission Planner for FBWA, and I also reversed some channel in my own transmitter for manual mode flight. Is this the possible reason that things went wrong?
I checked the parameters and found that Trim_throttle was set to zero. Is this the reason that the throttle was cut down when switched to auto mode?
i have attached the log files for your reference, only the last ten percent of the log was the actual flight, the front part are just ground testing.
I noticed the exact same thing. I first thought it was an airspeed sensor problem and was starting to troubleshoot that when I read this thread. This was my first 3.1.1 flight and it was pitching up and down with the throttle sometimes going to 0 and it look as if it would stall. 3.1.1 definitely has a new bug that 3.1.0 did not have.
Attached is the tlog file but unfortunately the rlog file got deleted.
I will load 3.1.0 tomorrow and fly to verify that everything is working correctly.
Hi Mike and Cao,
I’ve had a look a the logs, and it doesn’t look like a bug. You are getting pitch oscillation and throttle changing, but I think that comes from a combination of two other factors:
[ul][li]the introduction of the GLIDE_SLOPE_MIN parameter in 3.1.0[/li]
[li]poor tuning of the pitch controller[/li][/ul]
I know that when you see undesirable behavior and then you find that behavior is gone if you fly an earlier version that it may seem obvious there is a bug in the new version. Unfortunately autopilots aren’t that simple!
For the 3.1.0 release I introduced a new parameter GLIDE_SLOPE_MIN which controls how much discrepancy in altitude there must be between the current altitude and the target altitude for a waypoint before a “glide slope” is used. A glide slope will gradually change altitude over the course of a mission leg. If the altitude discrepancy is below GLIDE_SLOPE_MIN then the target altitude will be immediately set to the altitude of the end of the leg. That was done to give closer altitude tracking for taking accurate mapping photos, but it also tends to cause oscillations like you have seen if your pitch/throttle tuning is not good.
If you want the old behavior then just set GLIDE_SLOPE_MIN to 1. Otherwise you can try running autotune for longer, concentrating on pitch tuning, and also go through the TECS tuning guide.
Cheers, Tridge
I finally figured out what’s doing on and have a solution.
I spent some time doing Autotune and airspeed cal flights. PID’s and airspeed cal did not change so that was not the problem.
I also tried the GLIDE_SLOPE_MIN parameter with no improvement. I have always been flying with a value of 1.
The key was the TECS_SPDWEIGHT parameter. Default was to have pitch attitude control both altitude and airspeed. That’s never going to work for a high performance aircraft (high inertia and high speed). When the airspeed is high it will increase pitch causing it to do a zoom climb. Than the altitude will be way high so it dives back to the target altitude. That’s exactly what it was doing in my aircraft. During long straight and level flight it would be constantly proposing and pumping the throttle.
TECS_SPDWEIGHT of 0 and altitude is controlled by pitch. 2 and pitch controls airspeed. 1 (default) and it tries to use pitch to control both airspeed and altitude. For sailplanes 2 is what you want. For most powered aircraft use 0, then pitch will control altitude and throttle will control airspeed.
The TECS_SPDWEIGHT tuning parameter that needs to be explained much better in the documentation. Also I recommend changing the default or maybe putting it in the setup wizard.
Since it have some weigh points will 5 meter difference I set GLIDE_SLOPE_MIN to 4 and TECS_SPDWEIGHT to 0 I have perfect missions.
I also found that enabling EKF makes for smoother and more accurate missions. AHRS_EKF_USE = 1.