AUTOTUNE resulted in twitchy control surfaces

I have done a lot of flying in auto tune in have read the wiki pages on it. I’ve analyzed the logs and the PID values gradually oscillate up and down, so I don’t think they are still evolving to particular destination values. The result has been that the control services are twitchy now. Even with the plane on the ground I can put it in stabilize, tilt it over and observe the ailerons flutter. Picking up the tail results in the elevator fluttering as well. What is the simplest remedy for this condition?

Which AUTOTUNE_LEVEL?

can you post a log? I adjusted some of the filters that impact AUTOTUNE for beta3. I’m working on a larger update of AUTOTUNE at the moment and want logs from different aircraft to help with that.

log

(I uploaded the log in the previous post.) What can I do in the meantime to get optimal PID values?

I had similar issues, though haven’t flown too much in Autotune. The aircraft is a 4+1 VTOL and I do have the very sensitive control surfaces at low speed, as well as significant pitch oscillations during transition from VTOL to fixed wing (low to intermediate airspeed). With the aircraft level on the ground, FBWA mode will hold full nose-down elevator.

I’m wondering if old versions of Plane did something to limit how much scaling (now logged as AETR.SS, can’t find in old logs) was applied at low speeds. It also might be too simple to apply “full” scaling with the inverse of the dynamic pressure (SS = scaling airspeed squared / current airspeed squared). The control surfaces do become more effective with increasing airspeed, but so so the horizontal and vertical stabilizers. I’m not an expert in in aircraft dynamics and have never flown RC in manual mode, so take this assessment with a grain of salt.

Autotune was done at level 7. I believe I then did manual FF tuning, then did autotune again at level 0, but don’t have good records of what all was done on what day.

Tuning Logs

Logs with pitch oscillation

Logs from the same aircraft flying a similar mission running Plane 4.0.6.

I think I have seen exactly the problem described here on 4.1 beta 1. A Volantex Ranger EX that was VERY unstable on first flight with 4.1 beta 1 - almost unflyable in FBWA, until about 1 minute into AutoTune. it became flyable but still very unstable.

Rather than upload logs on a now-outdated version, I will update to beta 3 (or later if released) and do some flights in autotune mode in the next few days. I’ll upload flight logs and video. Thanks!

just to be clear, what autotune_level would be expected to give the most stable FPV footage in windy conditions in Cruise mode - level 1, or level 9? I’ve always left it at the default of 6 (under various versions of v4, before 4.1), but when I installed 4.1 beta 1 I made a poor choice to also increase it to 8 before the first flight and found it very twitchy, so I lowered it to 7 and still find it too twitchy. but I’m now realizing it’s probably a problem with 4.1 beta 1, so I’m going to provide detailed logs after updating to 4.1 beta 3. should I stick with level 6 to start with? my goal is rock steady FPV footage.

@tridge in my situation as i see, autotune find good P. But D calculating from current P. May be problem in this? Can you confirm my assumptions? If i plot P and D graphs, D must be smaller than P if good tuned? I review @David82 logs and see same problem as i have with my binary 1200.


Too much D after autotune. I lowered D twice and it fly good.
here my latest flight on 4.3 beta1 after autotune roll


i again have twiches. Again lower D twice and here how it fly. Maybe you need to change the formula by which D is calculated?

@Alexey_Degterev How did you lower the derivative (D)? What parameter is that specifically?


this is screenshot from sitl. not actual plane. I simply lower this values two times.
May be resulting pids not perfect… but it fly good, as you can see on a video

These values have always been greyed out for me, just like they show on your screen. How do we enable them so that they can be adjusted?

update to beta MP

@Alexey_Degterev Can you turn the PID while plane in the air.?

Thanks! Yea, AUTOTUNE had the D value set to .035. I lowered it to .033 and the twitchiness has stopped while the plane is on the ground. I’ll test later today to see if the twitchiness goes away in the air as well.

No, that not work. Now it’s constantly twitchy in the air. On the ground, the slightest movement results in full deflections, instead of the expected small corrections.

What are the default PID values? Maybe I can just start with those.

I updated to 4.1 beta 3 today and flew. autotake off was good. autotune seemed to be very effective. FBWA and Cruise were quite good. landing in FBWA was safe. I am copying video and .bin and will upload this weekend. Thanks for all the hard work that’s gone into this build!

1 Like

Two times means 0.035/2 =0.017. try this value

here is the log and video from a lengthy 25 minute flight using 4.1 Beta 3 and autotune. no manual tuning was done. I think the results are pretty good - it snaps to the requested 50 degree bank angle quickly and accurately.

I think whatever was changed between beta 1 and beta 3 has made a huge improvement to autotune on this plane.

There are a few problems with the flight though - on auto-takeoff, it can’t hold the desired 30 degree climb. Maybe the plane is incapable of this, or maybe it’s a tuning problem. In flight, climbing performance is poor - much less than 30 degrees. In FBWA it constantly pulls to the right. In CRUISE it tilts about 10 degrees to the left. I think both of these may be because I’m probably using the wrong prop - a tractor prop rather than a pusher prop. Or, it may be more tuning problems.

Very appreciative of advice on anything I can do to improve my setup or configuration.

Volantex Ranger EX with pixhawk 2.4.8, airspeed sensor, lidar and dji goggles. The plane is quite heavy with two 5000 mah 4s lipo in parallel.

https://drive.google.com/file/d/1feSxWO6PY2EUlR87BQ9OQ6q9QeqmlkG0/view?usp=sharing

Update - seems the FLIGHTMODE widget is stuck on RTL. If it’s waggling back and forth, it’s in autotune. if it’s veering to the right, it’s in FBWA. Leaning to the left 10 degrees? CRUISE.

@tridge There is some sort of scaling that is applied relative to speed. PID values that are fine at cruising speed are causing oscillations that increase as speed reduces. I have resorted to manual tuning which has been going well so far.

A good way to analyze this is just to graph aileron RCIN.C1 vs RCOU.C1 (and elevator RCIN.C2 vs RCOU.C2) instead of roll and desired roll. The oscillations become very obvious when just looking at servo output. In the example image below, as speed decreases in green, the oscillations magnify.