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

[PID] Add support for saving i-term when PID is reset #180

Open
wants to merge 8 commits into
base: ros2-master
Choose a base branch
from

Conversation

destogl
Copy link
Member

@destogl destogl commented Feb 11, 2024

Saves integral term on reset to maintain steady state offset output.
This is required for controlling of system without integral part to achieve correct steady-state output.
If intergral term is reset for some time there will be incorrect output in steady-state. This features avoids such situations and makes btter performance.

Whalex451 and others added 4 commits February 11, 2024 09:06
Added save_iterm_ to PID gains
Added save_iterm() and clear_saved_iterm() methods to update and clear save integral term
Cleared saved integral term in constructor
Called save_iterm() in reset() method
Added saved integral term to PID output
Simplified saving of integral term
Copy link

@olivier-stasse olivier-stasse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no test if this parameter has the desired effect. Could you please add any? e.g., to gainSettingCopyPIDTest or add a new one..

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 91.17647% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (ros2-master@af713c0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pid.cpp 87.50% 1 Missing and 1 partial ⚠️
src/pid_ros.cpp 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff               @@
##             ros2-master     #180   +/-   ##
==============================================
  Coverage               ?   51.68%           
==============================================
  Files                  ?        9           
  Lines                  ?      503           
  Branches               ?       65           
==============================================
  Hits                   ?      260           
  Misses                 ?      215           
  Partials               ?       28           
Flag Coverage Δ
unittests 51.68% <91.17%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/control_toolbox/pid.hpp 81.81% <100.00%> (ø)
include/control_toolbox/pid_ros.hpp 100.00% <ø> (ø)
src/pid_ros.cpp 72.92% <92.30%> (ø)
src/pid.cpp 92.10% <87.50%> (ø)

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

Successfully merging this pull request may close these issues.

5 participants