yotaro morizumi
/
zoomy_customLibrary
my new gear...
control_theory/pid.hpp@11:20418879650b, 2022-07-02 (annotated)
- Committer:
- yootee
- Date:
- Sat Jul 02 03:05:23 2022 +0000
- Revision:
- 11:20418879650b
- Parent:
- 2:e7b09385d197
ok
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yootee | 0:1456b6f84c75 | 1 | #ifndef PID_H |
yootee | 0:1456b6f84c75 | 2 | #define PID_H |
yootee | 0:1456b6f84c75 | 3 | #include"mbed.h" |
yootee | 0:1456b6f84c75 | 4 | |
yootee | 0:1456b6f84c75 | 5 | class Pid{ |
yootee | 0:1456b6f84c75 | 6 | public: |
yootee | 0:1456b6f84c75 | 7 | Pid(double get_Kp,double get_Ki,double get_Kd,int plumi); |
yootee | 0:1456b6f84c75 | 8 | double returnVal(double get_target,double input_val,double time); |
yootee | 0:1456b6f84c75 | 9 | void setGain(double get_Kp,double get_Ki,double get_Kd); |
yootee | 0:1456b6f84c75 | 10 | void setMax(double get_max,double get_min); |
yootee | 11:20418879650b | 11 | void reset(); |
yootee | 0:1456b6f84c75 | 12 | private: |
yootee | 0:1456b6f84c75 | 13 | double max_val; |
yootee | 0:1456b6f84c75 | 14 | double minimum_val; |
yootee | 0:1456b6f84c75 | 15 | double Kp; |
yootee | 0:1456b6f84c75 | 16 | double Ki; |
yootee | 0:1456b6f84c75 | 17 | double Kd; |
yootee | 0:1456b6f84c75 | 18 | double e_o; |
yootee | 0:1456b6f84c75 | 19 | double e_c; |
yootee | 0:1456b6f84c75 | 20 | double Operation_amount; |
yootee | 0:1456b6f84c75 | 21 | double target; |
yootee | 0:1456b6f84c75 | 22 | double Give_P; |
yootee | 0:1456b6f84c75 | 23 | double Give_I; |
yootee | 0:1456b6f84c75 | 24 | double Give_D; |
yootee | 0:1456b6f84c75 | 25 | double plusminus; |
yootee | 0:1456b6f84c75 | 26 | }; |
yootee | 0:1456b6f84c75 | 27 | |
yootee | 0:1456b6f84c75 | 28 | #endif |