Control Library by altb
Dependents: My_Libraries IndNav_QK3_T265
Diff: DT1_Cntrl.h
- Revision:
- 7:cb1492f4f2c6
- Child:
- 9:074f4f94b584
diff -r 694fe8894215 -r cb1492f4f2c6 DT1_Cntrl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DT1_Cntrl.h Wed Sep 18 09:56:35 2019 +0000 @@ -0,0 +1,34 @@ + +#ifndef DT1_CNTRL_H_ +#define DT1_CNTRL_H_ + +class DT1_Cntrl +{ +public: + + DT1_Cntrl(float D, float tau_f, float Ts, float uMin, float uMax); + + float operator()(float error) { + return doStep(error); + } + + virtual ~DT1_Cntrl(); + + void reset(float initValue); + float doStep(float error); + void set_limits(float ,float ); + void setCoeff_D(float); + +private: + + float eold,yold; + float uMax; + float uMin; + float Ts,tau_f; + float D_; + float D__init; + float p; + void setCoefficients(float D, float tau_f, float Ts); +}; + +#endif // #DT1_CNTRL_H \ No newline at end of file