Quick tune produces poor results compared to basic pid params

Hi everybody,

I have tried quick tune script on my 3,5 inch cinewhoop on arducopter 4.6-beta5.
The problem is that after tuning, I experience huge oscillations, especially those visible in the second log file. After tuning PIT_P param, it starts vibrating and proceeds to YAW param.
As a result, I have got much worse tuning than it was before. I set all default parameters for the script.

Attaching logs:

  1. Tuning from start to finish as a result oscillating drone, land, and rollback.
    2025-04-20 19-44-20 - full tune, test in stabilize, revert.bin - Google Drive

  2. all parameters reset from file 16 of ardupilot methodic configurator and attempt to start tuning again, after PIT_P, it already vibrates. Rollback in flight.
    2025-04-20 20-12-47 - basic pid params, tune till yaw, vibrations, revert, test, ok.bin - Google Drive

Quicktune requires low noise to do it’s job.
How good has your notch filter been configured?

1 Like

I have noise less than -60db I guess, it is quite well filtered.

Yes, that looks quite good. I’m not at a PC and can no analise the log now, sorry.

1 Like

Another try after magfit calibration. In loiter, it was a bit windy. Steps 26,27 from AMC.

log:

04.05.2025 13:31:43 : Tuning: DONE
04.05.2025 13:31:43 : YAW_P 0.5000
04.05.2025 13:31:43 : Tuning: YAW done
04.05.2025 13:31:43 : Tuning: YAW_P done
04.05.2025 13:31:41 : YAW_P 0.4533 sr:0.61
04.05.2025 13:31:38 : YAW_D 0.0100
04.05.2025 13:31:37 : Tuning: YAW_D done
04.05.2025 13:31:36 : YAW_D 0.0093 sr:0.66
04.05.2025 13:31:33 : YAW_D 0.0076 sr:0.28
04.05.2025 13:31:30 : YAW_D 0.0062 sr:0.64
04.05.2025 13:31:27 : YAW_D 0.0050 sr:0.78
04.05.2025 13:31:24 : YAW_D 0.0041 sr:0.59
04.05.2025 13:31:21 : YAW_D 0.0033 sr:0.67
04.05.2025 13:31:18 : YAW_D 0.0027 sr:0.50
04.05.2025 13:31:15 : YAW_D 0.0022 sr:0.58
04.05.2025 13:31:12 : YAW_D 0.0018 sr:0.20
04.05.2025 13:31:09 : YAW_D 0.0015 sr:0.29
04.05.2025 13:31:06 : YAW_D 0.0012 sr:0.29
04.05.2025 13:31:03 : YAW_D 0.0010 sr:0.51
04.05.2025 13:31:03 : Starting YAW tune
04.05.2025 13:30:59 : PIT_P 0.2008
04.05.2025 13:30:59 : Tuning: PIT done
04.05.2025 13:30:59 : Tuning: PIT_P done
04.05.2025 13:30:58 : PIT_P 0.4815 sr:2.52
04.05.2025 13:30:55 : PIT_P 0.3931 sr:2.41
04.05.2025 13:30:52 : PIT_P 0.3204 sr:2.93
04.05.2025 13:30:49 : PIT_P 0.2612 sr:1.76
04.05.2025 13:30:46 : PIT_P 0.2129 sr:1.50
04.05.2025 13:30:43 : PIT_P 0.1735 sr:2.67
04.05.2025 13:30:40 : PIT_D 0.0055
04.05.2025 13:30:39 : Tuning: PIT_D done
04.05.2025 13:30:39 : PIT_D 0.0138 sr:4.80
04.05.2025 13:30:36 : PIT_D 0.0113 sr:2.62
04.05.2025 13:30:33 : PIT_D 0.0092 sr:2.53
04.05.2025 13:30:30 : PIT_D 0.0075 sr:2.22
04.05.2025 13:30:27 : PIT_D 0.0061 sr:1.34
04.05.2025 13:30:24 : PIT_D 0.0050 sr:1.49
04.05.2025 13:30:21 : PIT_D 0.0040 sr:0.98
04.05.2025 13:30:18 : PIT_D 0.0033 sr:0.88
04.05.2025 13:30:18 : Starting PIT tune
04.05.2025 13:30:15 : RLL_P 0.2380
04.05.2025 13:30:14 : Tuning: RLL done
04.05.2025 13:30:14 : Tuning: RLL_P done
04.05.2025 13:30:14 : RLL_P 0.5952 sr:5.00
04.05.2025 13:30:11 : RLL_P 0.4851 sr:2.02
04.05.2025 13:30:08 : RLL_P 0.3961 sr:1.90
04.05.2025 13:30:05 : RLL_P 0.3234 sr:1.78
04.05.2025 13:30:02 : RLL_P 0.2636 sr:1.51
04.05.2025 13:29:59 : RLL_P 0.2152 sr:1.90
04.05.2025 13:29:56 : RLL_P 0.1757 sr:1.39
04.05.2025 13:29:53 : RLL_P 0.1434 sr:2.36
04.05.2025 13:29:49 : RLL_D 0.0050
04.05.2025 13:29:49 : Tuning: RLL_D done
04.05.2025 13:29:49 : RLL_D 0.0126 sr:3.90
04.05.2025 13:29:46 : RLL_D 0.0103 sr:2.83
04.05.2025 13:29:43 : RLL_D 0.0084 sr:2.26
04.05.2025 13:29:40 : RLL_D 0.0068 sr:1.59
04.05.2025 13:29:37 : RLL_D 0.0056 sr:1.28
04.05.2025 13:29:34 : RLL_D 0.0045 sr:0.89
04.05.2025 13:29:31 : RLL_D 0.0037 sr:0.88
04.05.2025 13:29:28 : RLL_D 0.0030 sr:0.71
04.05.2025 13:29:25 : RLL_D 0.0024 sr:0.67
04.05.2025 13:29:25 : Starting RLL tune
04.05.2025 13:29:25 : Tuning: starting tune
04.05.2025 13:29:10 : Tuning: reverted
04.05.2025 13:29:08 : RLL_D 0.0024 sr:1.33
04.05.2025 13:29:08 : Starting RLL tune
04.05.2025 13:29:08 : Tuning: starting tune

As a result I have got more noisy drone (can hear it) with kind of propwash on throttle and rolls.
Maybe standart quick tune parameters are not ok for whoop 3,5inch, but I can’t guess how to update them.

ardupilot/libraries/AP_Scripting/applets/VTOL-quicktune.md at master · ArduPilot/ardupilot · GitHub has many comments like “will be good for most users” and sometimes recommendend changes for big vehicles… Nothing about whoops… ;,-)

Quicktune doesn’t replace Autotune, it is supposed to automate initial tuning sometimes necessary to get Autotune working.

These are the harmonic notch filter settings you are looking for

1 Like

@xfacta could you please elaborate why =)?

What is the criteria? if less than -50db, we don’t care about any other harmonics peaks? or anything else?

And BIG question about INS_HNTCH_FREQ. It shoult be equal to 1st peak frequency or a half of it as you set? Usually in the documentation/wiki/youtube it set equal.

I did estimated postfilter with your parameters and I still can see noize peak from 2nd, and 3rd harmonics:

Do you mean, I could proceed to autotune with more noisy drone I got, or it better to revert PID values and do autotune without quick tune in my case?

With the original settings in place, the noise is filtered (earlier it looked to me like filtering was ineffective - not sure why that was) and the notch filters are right across a whole lot of the spectrum.

Phase changes could be a problem, not to mention extra load with all the processing required

After:

You can see the post-filter lines are still right across the bottom of the graph, and noise from the 2nd and 3rd harmonics and everything else is not getting through.
It’s not necessary to get every tiny bump of noise knocked down to absolute zero.
Key is that the standard Gyro filter is low pass, so eventually everything above 100Hz (in your case) gets attenuated at least some amount. The notch filters are there just to target whatever peaks get through the Gyro filter. In most cases it’s not necessary to target every peak and bit of noise you see, just the 1st harmonic, sometimes the 2nd.

In this graph the green line is the combined effect of the Gyro low pass filter plus the notch filter

The ESC-based filter will not go lower than INS_HNTCH_FREQ and scales up with RPM. Bandwidth is scaled up with RPM too.
So if you set the frequency too high it will never reach lower frequencies and RPM. You have to set something realistic, where motor RPM might still be valid.
If using just one notch then bandwidth is typically half of the frequency, and if using per-motor notches (Multi-Source) then we use about a quarter of the frequency, as a rule of thumb.
Of course the bandwidth value can be fine tuned, just use the minimum value that does the job.

4 Likes