i have been lurking in the forum for some time, paying particular attention to the recent discussion surrounding notch filtering, PID quality and the tuning of larger multirotors as I am building and trying to improve the tune of two almost identical 30” hexacopters.
The two copters have the same parameters and PIDs yet one apears to hesitate halfway through reaching its angle setpoint, not returning to level in one motion. This can be seen in the plot of desired, actual and rate of roll
investigating this issue has raised some questions about phase lag, what do the plots in the filter review tool represent, and how much phase lag is too much phase lag?
First of all, you have notch filters configured incorrectly. You have INS_HNTCH_MODE = 1 which is throttle-based, and INS_HNTCH_OPTS = 2, which is multisource, and which has no effect for throttle-based notch. You also seem to have the FFT machinery configured based on logs, but no ESC telemetry - so you probably should reconfigure to INS_HNTCH_MODE = 3 and also set the values for the other options, such as INS_HNTCH_REF, accordingly.
Second, by a quick look, I can not see that the machines are significantly different: both seem to hold attitude mostly within 1 degree on every axis, both seem to have a comparable PID contribution response, etc. The machine from 00000001.BIN might actually be a bit noisier than one from 00000007.BIN, but that might be up to the non-identical flight envelope.
Now to the main point.
The piece you are showing is the only fragment of the log-7 where the machine was in AltHold and where roll was controlled by sticks directly. Log-1 was all Loiter. By superimposing the roll command, I see that the machine does pretty much what it was commanded to do:
It might be not what you expected to happen if you primarily fly in Loiter. The ±20 seconds around is also the location of the most aggressive roll angles achieved across both flights - so your feelings might be partially attributed to the general sloppiness of the tuning (which seems to be the same for both machines) rather than some deviation in one machine.
Since I had a lot of AltHold/AutoTune flights recently, I can confirm that the feeling on the sticks has been exactly as intended in AltHold for years, nothing like that PosHold refactoring glitch.
Of course if you have more feelings with examples in these and other flights, please share, and we will try to help.
P.S.: if your main concern is slow reaction, it may be just to something like ATC_INPUT_TC set to 0.6, which is really sluggish.
It was my impression, given the docs page on throttle based notch filtering and the tuning tool, that multisource did have an effect on throttle based notches. Though i note that the page refers to bit one of INS_HNTCH_OPTS enabling the filter to track each motor, it doesnt explicitly state multisource and bit one would be the double notch.
Yes, i had dynamic FFT filtering setup previously but i found it unreliable. In future i intend to change over the ESC based filters.
My concern was over the apparent two motion return to level. On releasing the sticks, visually the attitude changed until about half of the remaining angle, slowed breifly before returning to level. I think this can be seen in the following screenshot where there is a twin peak in the rate and a small lump in the angle.
I will go out and gather some more data later in the week, and make some more aggressive manuevres to see if my problem persists! is there anything glaring that you would change about the tune? (I’ve ran Autotune, magfit etc)
Oh, I see. These twin peaks may be due to oscillations you excite with a sharp movement and an imperfect tuning (rates are quite saw-like anyway). Or maybe it is an overly strong D-term response (and you do have quite a big D-term).
@amilcarlucas my fault, I just did not know that multisource works with throttle. Seems not too difficult in the hindsight. Also no surprise I was not keeping an eye on that, as I always do ESC-based filtering.
Even with throttle and multisource, when the noise is too high for whatever reason, the servo outputs are also noisy, which effectively spreads the filter much wider than it needs to be. (Propeller inertia makes RCOU entries look more aggressive than the ESC feedback, and in the case of throttle filters follow the RCOU jumps).