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

[wpimath] Add PIDController::GetTotalError and ProfiledPIDController::GetTotalError #6512

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

itsmeft24
Copy link

Adds the ability to retrieve the accumulated error from both PIDController and ProfiledPIDController to allow for the user to monitor the outputs of each individual term.

@itsmeft24 itsmeft24 requested a review from a team as a code owner April 13, 2024 17:27
@calcmogul
Copy link
Member

calcmogul commented Apr 13, 2024

Keep in mind you should avoid the I term. The most common cause of steady-state error is modeled disturbances. Feedforward can compensate for that immediately, whereas pure integral control has to wind up and down. Integral control should only be used for unmodeled/unmodelable disturbances, and even then, it should only integrate the difference between the expected and actual plant state, not the difference between the setpoint and plant state.

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.

None yet

2 participants