Test program with the RT black boxes

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PI_Cntrl.h Source File

PI_Cntrl.h

00001 class PI_Cntrl
00002 {
00003 public:
00004 
00005     PI_Cntrl(float Kp, float Tn, float Ts);
00006     PI_Cntrl(float Kp, float Tn, float Ts, float uMax);
00007     PI_Cntrl(float Kp, float Tn, float Ts, float uMax, float uMin);
00008 
00009     float operator()(float error) {
00010         return doStep((double)error);
00011     }
00012 
00013     virtual     ~PI_Cntrl();
00014 
00015     void        reset(float initValue);
00016     float       doStep(double error);
00017 
00018 private:
00019 
00020     double b0;
00021     double b1;
00022     double b2;
00023     double s;
00024     double uMax;
00025     double uMin;
00026     
00027     void        setCoefficients(float Kp, float Tn, float Ts);
00028 
00029 };