I have a question about autotune

It is 4.0.5.
I’ve experienced crashes during autotune before and it’s scary.

I’ve already read the Autotune documentation.

I’m asking you guys to be a little more careful.

1.What causes crashes during autotune?

  1. Does autotune really fail with the slightest breeze?

  2. I heard that you modify the pid in stab mode. Can this not modify the pid value of the loiter?

  3. Loiter or poshold, auto pid of auto is not possible to tune?

  4. If 4 is not possible, is there a way to perfectly match the pid of the loiter?

Thanks for your help as always

  1. various hardware reasons, there’s no known software issues that make Autotune cause a crash. Could be ESCs/motors desyncing. Some large prop aircraft can need manual tuning.
  2. no, but less wind makes it quicker and easier for Autotune. You’ll definitely get a better result without wind.
  3. you can do some initial tuning in Stabilise mode if you need to, the tuning process instructions document which params to change and in which order. There’s also links to the descriptions of each param. Simplistically the ATC_ANG_PIT_P and ATC_ANG_RLL_P angle params could be thought of as the “Stabilise” P values, they used to be labeled as such. The ATC_RAT rate PID’s could be thought of as (a bit) about how the motors will respond to flight controller demands.
  4. All flight modes rely on the same basic tune and position controller params. Poshold is a bit outdated and Loiter is much better. Loiter has some limits and that you can set.
  5. If you get the tuning correct as per the guide and logs look good for attitude control, there’s a whole lot of secondary issues that you just dont have to worry about. I find if the basic tune is not so good, you start seeing position controller issues and all sorts of other little problems. Then you spend the rest of your days trying to fix all those things individually.

Correct setting of the initial parameters and reducing vibrations is critical. If you can just do a hover test or two and get the Harmonic Notch filter configured then you’ve got the best chance of Autotune working as planned.

Thank you for answer.

as you say

Do you mean that LOITER will naturally improve if you run Autotune?

I can only fly for about 5 minutes.
The battery capacity is small.
Is it possible to shorten the autotune?

The way to shorten Autotune is to do some manual tuning first and make sure Autotune has the best possible conditions to work from.
You can do one axis at a time.

With 4.0.5 you should not run autotune with loiter. You should run it from alt hold.

If you use 4.1 it may get good results with loiter as well.

So, if i upgrade the firmware to 4.1.0,
is it possible to have a good PID value in Loiter mode when autotune is executed?

It is always better to use Alt Hold in autotune. But yes, autotune in loiter might work in 4.1.0

Thank you for answer.
Please confirm my understanding.

  1. Autotune in Althold is also possible in the past.

  2. Autotune in Loiter is only available in 4.1.0.

2-1) If i do Loiter Autotune, the PID of Loiter flight mode is improved.

  1. I am using 4.0.5 on my existing Pixhawk4.
    If I just upload firmware from MP -> 4.1.0, will the existing settings be maintained? Is it possible to fly immediately after changing the firmware?

  2. Loiter Autotune means that only flight mode is performed with Loiter among existing Autotunes?

Thank you

Stay with stable firmware (4.0.7) unless you wish to test Beta features.
It might be preferable to autotune for ALTHLD if you have a poorly performing aircraft, but you can certainly start from Loiter if the aircraft is already reasonable.
The Autotune/Althold/Loiter bug is about time to return to level ( I think, from memory ) so starting from Loiter doesnt automatically mean Autotune wont work properly.

@xfacta yes that is the issue with autotune while in loiter mode. And I always get worse results when doing it in loiter.

  1. yes

  2. No, it is also available in 4.0.x, but the results are not very good.

  3. Do not use 4.0.5, update to 4.0.7. The settings will be maintained. It is possible to fly immediately after updating the firmware. But it is not possible when downgrading the firmware.

  4. No. Autotune results are valid and used for all flight modes.

Conclusion: update to 4.0.7, and do an autotune in ALTHOLD mode. I assume you already tuned the notch filter