Skip to content

PIDController atSetpoint thoughts #7155

Answered by calcmogul
narmstro2020 asked this question in Ideas
Discussion options

You must be logged in to vote

Looking at the implementation it requires the error and error derivative to be within default or user defined tolerances. It also requires a measurement to have occurred and a setpoint to have been set.

How is this bad? These are all necessary checks to ensure the PIDController is on target and stays there. Just checking the error is insufficient because the measurement could be oscillating, and we have to check if the setpoint and measurement are valid to avoid spurious trues.

If a user implements the atSetpoint check themselves, they'll have to do the same things if they want it to be correct. Here are some ways I've seen students mess it up:

  1. Didn't have a valid starting measurement …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@narmstro2020
Comment options

Answer selected by narmstro2020
Comment options

You must be logged in to vote
1 reply
@narmstro2020
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants