enhanced functionality in V01 vs. V00, V02 finished, conversion to double precsision in V03

Dependencies:   mbed

Committer:
pmic
Date:
Mon Apr 09 17:50:45 2018 +0000
Revision:
22:c895fa4d7319
Parent:
12:e54941459353
all in float!

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmic 12:e54941459353 1 class PI_Cntrl
pmic 12:e54941459353 2 {
pmic 12:e54941459353 3 public:
pmic 12:e54941459353 4
pmic 12:e54941459353 5 PI_Cntrl(float Kp, float Tn, float Ts);
pmic 12:e54941459353 6 PI_Cntrl(float Kp, float Tn, float Ts, float uMax);
pmic 12:e54941459353 7 PI_Cntrl(float Kp, float Tn, float Ts, float uMax, float uMin);
pmic 12:e54941459353 8
pmic 12:e54941459353 9 float operator()(float error) {
pmic 12:e54941459353 10 return doStep((double)error);
pmic 12:e54941459353 11 }
pmic 12:e54941459353 12
pmic 12:e54941459353 13 virtual ~PI_Cntrl();
pmic 12:e54941459353 14
pmic 12:e54941459353 15 void reset(float initValue);
pmic 12:e54941459353 16 float doStep(double error);
pmic 12:e54941459353 17
pmic 12:e54941459353 18 private:
pmic 12:e54941459353 19
pmic 12:e54941459353 20 double b0;
pmic 12:e54941459353 21 double b1;
pmic 12:e54941459353 22 double b2;
pmic 12:e54941459353 23 double s;
pmic 12:e54941459353 24 double uMax;
pmic 12:e54941459353 25 double uMin;
rtlabor 0:15be70d21d7c 26
pmic 12:e54941459353 27 void setCoefficients(float Kp, float Tn, float Ts);
pmic 12:e54941459353 28
rtlabor 0:15be70d21d7c 29 };