![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
Diff: control_theory/pid.hpp
- Revision:
- 2:e7b09385d197
- Parent:
- 0:1456b6f84c75
- Child:
- 11:20418879650b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/control_theory/pid.hpp Sun Mar 27 04:39:16 2022 +0000 @@ -0,0 +1,27 @@ +#ifndef PID_H +#define PID_H +#include"mbed.h" + +class Pid{ + public: + Pid(double get_Kp,double get_Ki,double get_Kd,int plumi); + double returnVal(double get_target,double input_val,double time); + void setGain(double get_Kp,double get_Ki,double get_Kd); + void setMax(double get_max,double get_min); + private: + double max_val; + double minimum_val; + double Kp; + double Ki; + double Kd; + double e_o; + double e_c; + double Operation_amount; + double target; + double Give_P; + double Give_I; + double Give_D; + double plusminus; +}; + +#endif \ No newline at end of file