How to methodically tune (almost) any multicopter using ArduCopter 4.4.x

Hello @amilcarlucas , awsome work!
One more question, maybe regarding larger drones: Is Magfit and Large Vehicle MagCal enough? How about compass mot? I have seen improvements with compass_mot, and also large changes at the reading of the compasses when the ampers get high

I am also reminding you that you wanted to post the S900 tune!
Thanks!

1 Like

In-flight mag fit is, if done properly, a superset of all others.
But on vehicles with high currents flowing close to the compass, it is better to do a compass mot, before the inflight magfit.

2 Likes

After Magfit calibration (or maybe arducopter compass calibration) the drone can be deployed in different regions , do you just use COMPASS_LEARN 1 or do you redo the magfit? I never understood why to use magfit if location of UAV can be 100km apart .

2 Likes

Do not change COMPASS_LEARN=0 and do not redo magfit. It just works fine, it uses GPS to get the local magnetic declination. No need for anything else.

1 Like

We’ve added parameters and respective documentation for 4.3.8, 4.4.4 and 4.5.0-DEV ArduCopter versions to the diatone_taycan_mxc.zip file.

Enjoy

2 Likes

One more question I have is, if the users run a second autotune immediately or 30 minutes later after the first successful autotune, what will the users expect from the second autotune? I mean about the tuned values. Are they going to be close? I did try before but a few weeks apart, their values are not close. I am just curious.

1 Like

Are you asking about the second roll-pitch autotune?
The tuned values will be close to the first roll pitch values, yes.
The resulting values are in the files, why are you asking this?

It makes no difference 30 minutes or 30 days as long as the wind conditions are the same.

1 Like

What overall affect does wind have on the autotune? Will the PIDs be over-tuned (ie: too high and overly sensitive) or under-tuned? Thanks.

Loiter flight mode.

After Autotune, I like to know if there is a graph or methodology to confirm a good calibration or better control flying machine especially loiter flight mode. How do the experienced UA pilots confirm it? How each loiter parameter affect the flying and control.

1 Like

See Section 8 in the first post.

1 Like

No, the PIDs will just be plain wrong. Might be over-tuned, might be under-tuned, might be anything.

1 Like

Thanks for this it looks really great. I will try following.

I think this is important. Ardupilot carries the natural caveats of being multipurpose/multitargeted.
It’s so easy to miss a important parameter, or step, or detail.
I experienced this after I started my second setup configuration. My conclusion was I need a cheklist for this. It sure needs to be methodological.

2 Likes

That is nice table explain A lot… Thanks…

Section 8 mentioned it is for Alt-hold flight mode. Does it apply to Loiter flight mode?
what is a good transient response value? less than 60ms. 0msec is the best. Is my understanding correct?
If the transient response is above 60ms, how do users tune the Loiter parameters to bring the transient response nearer to 0sec?

For clarity’s sake I’m oversimplifying here:

  • AltHold uses a 2 level cascading of PID control loops:
    • angle rate - the inner most control loop
    • angle - the second control loop, wraps around the angle rate control loop
  • Loiter adds a 3rd cascading outer PID control loop on top for position. And the inner angle and angle rate loops are still used.

Diagrams are on the ArduCopter’s System Identification documentation page

So yes, Section8 does apply to Loiter and Auto and all other modes. The inner loops need to be tuned (fast-transient response, good noise rejection, low overshoot, stable, etc) for the outer loop to even have a chance of getting tuned and do its work.

A good transient response depends on the size of your vehicle. A 300g vehicle will potentially be more agile than a 300Kg one. There is no one value fits all. But yes, the smaller the better.

To improve the loiter response, you first need to make sure the innermost angle rate control loop is performing correctly, after that the second level angle control loop is doing OK. And only after that you tune the outermost position control loop.

This process is explained in Section 11, and we wrote an entire Blog post on the topic and also wrote some of ArduPilot’s system identification documentation there are depictions of the three control loops explained above. We also contributed a simulink model of ArduCopter’s inner control loops.

All of that information is on Section 11.

1 Like

The extract_param_defaults.py inside the diatone_taycan_mxc.zip gives a different extract result from the previous version.

For example, ACRO_RP_EXPO can take floating number.

1 Like

Are you using the latest diatone_taycan_mxc.zip file?

1 Like

Apologies for the false alarm, the update was as fast as the stock market. Yes. the one with 4.3.8, 4.4.4, and 4.5.0-dev version settle very well for comparison software. Thank you for the great effort.

2 Likes

New version:

  • added eCalc multirotor example screenshot
  • updated diatone_taycan_mxc.zip file
    • added estimation example on 14_pid_adjustment.param file
    • added support for ArduCopter 4.5.0-beta1 version
    • added more unittests to the python scripts
  • improved BL Heli settings to reduce the probability of ESC de-sync
  • fixed wind estimation units
1 Like

@MartyMcFly the estimation example on 14_pid_adjustment.param file is for your particular use. It should reduce the time you need in autotune.

1 Like