Control Library by altb

Dependents:   My_Libraries IndNav_QK3_T265

DT1_Cntrl.h

Committer:
altb2
Date:
2019-09-18
Revision:
7:cb1492f4f2c6
Child:
9:074f4f94b584

File content as of revision 7:cb1492f4f2c6:


#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