Ruprecht Altenburger
/
mirror_actuator_V1
Mirror actuator for RT2 lab
Diff: Library_Cntrl/PI_Cntrl.h
- Revision:
- 16:28b6bb8a4b7f
- Parent:
- 15:9f32f64eee5b
diff -r 9f32f64eee5b -r 28b6bb8a4b7f Library_Cntrl/PI_Cntrl.h --- a/Library_Cntrl/PI_Cntrl.h Sun May 02 08:17:06 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -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); - -};