Simple PID controller class with output clamp
Diff: PIDcontroller.h
- Revision:
- 2:994ed695c8a5
- Parent:
- 1:946d71f8afc6
diff -r 946d71f8afc6 -r 994ed695c8a5 PIDcontroller.h --- a/PIDcontroller.h Wed Jul 05 20:30:07 2017 +0000 +++ b/PIDcontroller.h Wed Feb 20 22:15:52 2019 +0000 @@ -14,11 +14,13 @@ void setOutputLimits(float min, float max); float processNewValue(float input); float getControllerOutput(void); + float getIntegralTerm(void); private: float target; float kp, ki, kd; + float pout,iout,dout; float integral, derivative; float error, previous_error; float outputMin, outputMax;