Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some pid refactoring mainly addresses the accumulation of iterm.
I believe this will improve flight performance on low-authority multirotor, such as vtol platform.
Changes:
iterm_windup
, enhances the effectiveness when the value is set below the default value(50), no accumulation occurs wheniterm_windup+50
of motor correction range is reached. When value is set to equal or above 50, remain the same behaviors as the current master.combineitermLimitActive
withitermFreezeActive
toitermFreezeActive
. Because the actualitermLimitActive
implementation has the same result asitermFreezeActive
fw_iterm_throw_limit
and introducepid_iterm_limit_percent
pid_iterm_limit_percent
limit the accumulated iterm by percentage ofpidsum_limit
orpidsum_limit
. This iterm limit is also applied to MR pid controller. The default value is set to 33%, which behaves the same asfw_iterm_throw_limit
default 165.Have done some tests with SITL in the real flight simulator, The flight performance was terrible but become acceptable with vtol platforms