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

make the pid_loop more stateless #175

Open
wcpettus opened this issue Feb 21, 2019 · 0 comments
Open

make the pid_loop more stateless #175

wcpettus opened this issue Feb 21, 2019 · 0 comments

Comments

@wcpettus
Copy link

Currently the PID loop caches the cell heater current value and uses it to calculate the new current setpoint. This violates the design of stateless systems (if it wants to know the old current value, just provider.get), and makes it more involved to tune over the PID loop.

Simple correction:

  • go through the code for all instances of self._old_current, find what they do, and replace as appropriate
  • we already have a __get_current method which queries it

A consideration:

  • when we start the pid_loop, we use __get_current to start the self._old_current, this is a get on the cell_heater_current_output
  • all future updates are using the new set value we have just attempted to apply to cell_heater_current_limit
  • given the known difference between the output and limit setting, should consider which of those makes more sense to use when updating
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

No branches or pull requests

1 participant