00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _PIDCONTROLLER_H
00040 #define _PIDCONTROLLER_H
00041
00042 #include "../basecode/header.h"
00043
00044 class PIDController{
00045 public:
00046 PIDController();
00047
00048 void setCommand( double command );
00049 double getCommand() const;
00050 void setSensed(double sensed );
00051 double getSensed() const;
00052 double getOutput() const;
00053 void setGain(double gain );
00054 double getGain() const;
00055 void setTauI(double tau_i );
00056 double getTauI() const;
00057 void setTauD(double tau_d );
00058 double getTauD() const;
00059 void setSaturation(double saturation );
00060 double getSaturation() const;
00061 double getError() const;
00062 double getEIntegral() const;
00063 double getEDerivative() const;
00064 double getEPrevious() const;
00065 void process(const Eref&e, ProcPtr process );
00066 void reinit(const Eref& e, ProcPtr process );
00067 static const Cinfo * initCinfo();
00068
00069 private:
00070 double command_;
00071 double saturation_;
00072 double gain_;
00073 double tau_i_;
00074 double tau_d_;
00075 double sensed_;
00076 double output_;
00077 double error_;
00078 double e_integral_;
00079 double e_derivative_;
00080 double e_previous_;
00081 };
00082
00083 #endif
00084
00085
00086
00087
00088
00089
00090
00091