Time to make that specification a bit more formal—and complete—by writing unit tests that describe the desired behavior.
gains, and a
setpoint. The controller has three components: proportional, integral and derivative (hence the name PID). Each
gainis a number that determines how much one of the three parts of the controller has on the final result. The
setpointdetermines what the goal of the controller is; in other words, to where it's trying to move the controlled variable. Looking at all that, we decide that the constructor should just store the