Iterm Relax explained
I term relax aims to inhibit I during fast manoeuvres by preventing it to further accumulate. Simply put I term relax will keep I constant during fast manoeuvres.
I term is relax rely on setpoint or gyro (iterm_relax_type) to detect such manoeuvres and preventing I term to accumulate further. To tune when I term accumulation should be suppressed a cutoff value (iterm_relax_cutoff) can be set. The lower the cutoff value the earlier I term accumulation is suppressed.
- In setpoint mode this suppression is based on the speed of the change in setpoint.
- In gyro mode this suppression is based on [TBD].
The following log traces demonstrate how different cutoff value affect I term relax (I value in green and setpoint in red).
For smooth flying such as freestyle when extremely fast and aggressive turns are rare I term can be relaxed as far as completely inhibit it during manoeuvres. Freestyle tuning might requires lower cutoff values, typically about 10-15.
Ideally I term should be 'locked' as the moves starts and come back on shortly after the sticks stop moving as illustrated in the log trace below.
When racing shorter I term accumulation suppression allows the quad to better track aggressive turns and quick blips. Racing tuning might requires higher cutoff values, typically about 20-30. For example, in the above log trace a higher cutoff value allows for better setpoint tracking on quick twitch inputs.
Bacause I is 'locked' to the pre-existing value before entering a fast manoeuvre, when it comes back on the old I offset takes a little while to resolve.
Such effect is even more prominent with gyro mode, since the I term locking is slightly delayed compared to setpoint.
How to fix this? Increasing modes
This can be fixed using the INCREASING modes of the Iterm Relax. The Iterm Relax can be configured in RP, RPY, RP_INC and RPY_INC modes. The two modes that have the _INC in the name only lock the I accumulation from INCREASING, letting it to reduce if the I accumulation is not needed anymore.
By default Betaflight uses the RP mode, so if you want to remove this accumulation you can change it to RP_INC.