Control Library by altb
Dependents: My_Libraries IndNav_QK3_T265
PI_Cntrl.h
- Committer:
- pmic
- Date:
- 2020-01-16
- Revision:
- 15:c70cad2f4e64
- Parent:
- 0:d49418189c5c
File content as of revision 15:c70cad2f4e64:
class PI_Cntrl { public: PI_Cntrl(float Kp, float Tn, float Ts); PI_Cntrl(float Kp, float Tn, float Ts, float uMax); PI_Cntrl(float Kp, float Tn, float Ts, float uMax, float uMin); float operator()(float error) { return doStep((double)error); } virtual ~PI_Cntrl(); void reset(float initValue); float doStep(double error); private: double b0; double b1; double b2; double s; double uMax; double uMin; void setCoefficients(float Kp, float Tn, float Ts); };