I’m new with this software and i’m experiencing a curious problem.
TECS_SPDWEIGHT = 2, so DesPitch should depend on the error = SP - SPDEM (TECS airspeed variables).
During climbs (RTL, TKOFF…), the plane climbs nicely to the target altitude, then reduces the throttle when approaching it, but tries to keep the 25° climb pitch, and therefore stalls.
From the logs you see DesPitch remaining constant even after the target altitude is overshooted, and not reacting to SP dropping below SPDEM.
pitch limits are fine…
any idea? thanks
P.S. Autotune has not been executed very well but i don’t think this is the problem.
I’m aware climb rate, airspeed and pitch are not very coherent since actual airspeed is greater than desired, but again i dont’ think this is the real problem.
Rolled back to last stable (4.09), STICK_MIXING=0, same problem.
This log is more readable though, it’s a single takeoff action, then manual recall and landing.
DesPitch tends to rise and max out at LIM_PITCH_MAX.
Trim_throttle is 15, and trim_Airspeed_cm is 833. Those values look very low to me, but I’m not sure what kind of plane you’re flying. What I think is happening is at the end of the takeoff the plane is trying to lower the throttle to 15% and stabilize at 8 m\s, but coming in out of a climb, with an already high AOA it stalls.
Looking at your flight in manual mode After the stall I would suggest turning those values up, maybe 55% throttle and 11 or 12 m/s. Obviously you can fine tune after that.
The plane is a Volantex Phoenix V1, a 1.4 kg , 2 m wingspan foam/plastic glider, so those values are low but not that much.
I can surely try to rise them, let’s say to 30% throttle and 9-10 m/s, anyway in one of the first flights i made i manually climbed and then put it in RTL; the RTL loiter was stable and doing about 10% throttle (with 30% target if i recall correctly) and about 7 m/s, so i don’t think that’s the issue.
In the following image you can see what i described before, in a TAKEOFF event.
27:54-55 should be when it reaches the target takeoff loiter center.
Climb is overspeeding but that could easily be an uncoherent combination of climb pitch, speed and throttle targets.
The target height is 70m, and it starts reducing throttle when approaching it, as expected.
I would expect the DesPitch return to zero accordingly, and loiter mode to start; in contrast, DesPitch remains high and ends up saturating at its limit.
Same result is obtained if, mid climb, i switch to RTL mode.
Here’s my suggestion, but I don’t think you’re going to like it.
Reset TECS_SPDWEIGHT to 1
Set SERVO_AUTO_TRIM to 1
Get the rest of the tune dialled in, either manually or with auto-tune. Make sure the plane is flying well with the autopilot first in a basic, or initial configuration. Once the tune (PID) is set, we can see if the desired pitch and actually pitch are tracking properly under normal conditions. Then it may be easier to figure out why the more automated functions aren’t working properly.
Thank you very much Allister.
Today I managed to make a flight; I’ve done a rather long autotune session, but didn’t have the time to re-test the climb afterwards.
Anyway i’ll try again in the next weeks, i’ll disable SOAR and set those two params as you suggested, then autotune and do other tests.
I’ll keep you updated.
here’s today’s log, if someone’s curious.
there’s a takeoff with the results we know, then the autotune session (progressively reducing sentitivity to the controls, maybe because autotune level was set to 2) , manual landing, disarm/arm, manual climb above RTL height and then RTL, unfortunately interrupted right when it should have initiated a leveled flight.
Here I am, with news.
This is today’s log, with TECS_SPDWEIGHT=1 and SOAR disabled.
Takeoff and subsequent loiter succeeded.
I suspect a little pitch up + throttle behaviour during leveled flight, i’ll study how to calibrate it.
What i’d like to ask you is why it should behave like that with TECS_SPDWEIGHT=2.
As stated, in previous logs the error on airspeed and the desired pitch seem to be unlinked, or even with some inverted gains in the control loop.
I really can’t understand why this issue isn’t getting attention.
TECS_SPDWEIGHT=2 not doing what it should seems a pretty huge problem to me, it’s a basic function being faulty…
Anyway, it eventually succeeded that time, but failed other times.
It keeps flying nose up.
It’s slightly nose heavy and bringing CG forward doesn’t change the behavious very much.
Elevator it’s sligthly trimmed up.
I also sligthly trimmed AHRS to think the plane is more pitched up than it actually is, but nothing changed.
How can i solve this problem? it’s always about to stall and in some more difficult cases it stalls.
The log log_03_10_2021.BIN (which has TECS_SPDWEIGHT=2.0) has poor attitude tuning. TECS is reliant on being able to achieve the pitch that it demands.
Without a well tuned attitude loop it just can’t operate at all well.
I can see you doing an AUTOTUNE in the log, but unfortunately the AUTOTUNE in 4.0 isn’t coping with your aircraft at all well. I’d suggest you switch to plane 4.1.x and run the new AUTOTUNE code to try to get a better tune, especially pitch tune, but the roll could also be improved a lot.
This was your attitude control after the AUTOTUNE when in RTL:
you can see both roll and pitch deviated by a large amount from the desired angles.
I’d also suggest you use AUTOTUNE_LEVEL of at least 5.
Can you give a picture of your aircraft so we understand what you are flying?