Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring on pid iterm #9215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

shota3527
Copy link
Contributor

@shota3527 shota3527 commented Aug 5, 2023

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:

  1. Stronger iterm_windup, enhances the effectiveness when the value is set below the default value(50), no accumulation occurs when iterm_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.
  2. combine itermLimitActive with itermFreezeActive to itermFreezeActive. Because the actual itermLimitActive implementation has the same result as itermFreezeActive
  3. remove fw_iterm_throw_limit and introduce pid_iterm_limit_percent
  4. pid_iterm_limit_percent limit the accumulated iterm by percentage of pidsum_limit or pidsum_limit. This iterm limit is also applied to MR pid controller. The default value is set to 33%, which behaves the same as fw_iterm_throw_limit default 165.
  5. add option to enable tpa on yaw axis
  6. I term back caculation anti-windup can not push the I iterm to opposite direction

Have done some tests with SITL in the real flight simulator, The flight performance was terrible but become acceptable with vtol platforms

@shota3527
Copy link
Contributor Author

e6e9ee1e33a2cfb8585e9bc2e2fc8da1e3e009e8
we need something equivalent to IMAX

@DzikuVx
Copy link
Member

DzikuVx commented Aug 10, 2023

Ah, I thought it's for MR and wanted to test it today :)

@shota3527
Copy link
Contributor Author

after some study, i have found this pr
#6387

thinking about revert this

combine itermLimitActive with itermFreezeActive to itermFreezeActive. Because the actual itermLimitActive implementation has the same result as itermFreezeActive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants