Control Library by altb

Dependents:   My_Libraries IndNav_QK3_T265

Committer:
altb2
Date:
Wed Sep 18 09:56:35 2019 +0000
Revision:
7:cb1492f4f2c6
Child:
9:074f4f94b584
Addet DT1 Controler

Who changed what in which revision?

UserRevisionLine numberNew contents of line
altb2 7:cb1492f4f2c6 1
altb2 7:cb1492f4f2c6 2 #ifndef DT1_CNTRL_H_
altb2 7:cb1492f4f2c6 3 #define DT1_CNTRL_H_
altb2 7:cb1492f4f2c6 4
altb2 7:cb1492f4f2c6 5 class DT1_Cntrl
altb2 7:cb1492f4f2c6 6 {
altb2 7:cb1492f4f2c6 7 public:
altb2 7:cb1492f4f2c6 8
altb2 7:cb1492f4f2c6 9 DT1_Cntrl(float D, float tau_f, float Ts, float uMin, float uMax);
altb2 7:cb1492f4f2c6 10
altb2 7:cb1492f4f2c6 11 float operator()(float error) {
altb2 7:cb1492f4f2c6 12 return doStep(error);
altb2 7:cb1492f4f2c6 13 }
altb2 7:cb1492f4f2c6 14
altb2 7:cb1492f4f2c6 15 virtual ~DT1_Cntrl();
altb2 7:cb1492f4f2c6 16
altb2 7:cb1492f4f2c6 17 void reset(float initValue);
altb2 7:cb1492f4f2c6 18 float doStep(float error);
altb2 7:cb1492f4f2c6 19 void set_limits(float ,float );
altb2 7:cb1492f4f2c6 20 void setCoeff_D(float);
altb2 7:cb1492f4f2c6 21
altb2 7:cb1492f4f2c6 22 private:
altb2 7:cb1492f4f2c6 23
altb2 7:cb1492f4f2c6 24 float eold,yold;
altb2 7:cb1492f4f2c6 25 float uMax;
altb2 7:cb1492f4f2c6 26 float uMin;
altb2 7:cb1492f4f2c6 27 float Ts,tau_f;
altb2 7:cb1492f4f2c6 28 float D_;
altb2 7:cb1492f4f2c6 29 float D__init;
altb2 7:cb1492f4f2c6 30 float p;
altb2 7:cb1492f4f2c6 31 void setCoefficients(float D, float tau_f, float Ts);
altb2 7:cb1492f4f2c6 32 };
altb2 7:cb1492f4f2c6 33
altb2 7:cb1492f4f2c6 34 #endif // #DT1_CNTRL_H