Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Cntrl_Lib by
PI_Cntrl.h
- Committer:
- pmic
- Date:
- 2019-02-07
- Revision:
- 12:c8ec698c53ed
- Parent:
- 0:e2a7d7f91e49
File content as of revision 12:c8ec698c53ed:
class PI_Cntrl
{
public:
PI_Cntrl(float Kp, float Tn, float Ts);
PI_Cntrl(float Kp, float Tn, float Ts, float uMax);
PI_Cntrl(float Kp, float Tn, float Ts, float uMax, float uMin);
float operator()(float error) {
return doStep((double)error);
}
virtual ~PI_Cntrl();
void reset(float initValue);
float doStep(double error);
private:
double b0;
double b1;
double b2;
double s;
double uMax;
double uMin;
void setCoefficients(float Kp, float Tn, float Ts);
};
