Test program with the RT black boxes

Dependencies:   mbed

Committer:
pmic
Date:
Wed May 15 13:58:10 2019 +0000
Revision:
43:a577f752dd7a
Parent:
10:a28f393c6716
Add new instantiation option to surpress the printout for rt mbed

Who changed what in which revision?

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