2nd Library
Dependents: cuboid_balance_ros cuboid_balance mirror_actuator_V1
PI_Cntrl.h
- Committer:
- altb2
- Date:
- 2019-03-07
- Revision:
- 0:a201a6cd4c0c
File content as of revision 0:a201a6cd4c0c:
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); };