![](/media/cache/profiles/altb_JGUSAOG.jpg.50x50_q85.jpg)
Mirror actuator for RT2 lab
Diff: Library_Cntrl/PID_Cntrl.h
- Revision:
- 16:28b6bb8a4b7f
- Parent:
- 15:9f32f64eee5b
--- a/Library_Cntrl/PID_Cntrl.h Sun May 02 08:17:06 2021 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -#ifndef PID_CNTRL_H_ -#define PID_CNTRL_H_ - -class PID_Cntrl -{ -public: - - PID_Cntrl(float P, float I, float D, float tau_f, float Ts, float uMin, float uMax); - - float operator()(float error) { - return doStep((double)error); - } - - virtual ~PID_Cntrl(); - - void reset(float initValue); - float doStep(double error); - void set_limits(double ,double ); - float get_ulimit(void); - -private: - - double Iold; - double eold,yold,del; - double uMax; - double uMin; - double Ts; - double P,I,D; - double p, Ka; - void setCoefficients(float P, float I, float D, float tau_f, float Ts); - -}; - -#endif \ No newline at end of file