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.
control_theory/pid.hpp@2:e7b09385d197, 2022-03-27 (annotated)
- Committer:
- yootee
- Date:
- Sun Mar 27 04:39:16 2022 +0000
- Revision:
- 2:e7b09385d197
- Parent:
- pid.hpp@0:1456b6f84c75
- Child:
- 11:20418879650b
arrc?
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 | 0:1456b6f84c75 | 11 | private: |
yootee | 0:1456b6f84c75 | 12 | double max_val; |
yootee | 0:1456b6f84c75 | 13 | double minimum_val; |
yootee | 0:1456b6f84c75 | 14 | double Kp; |
yootee | 0:1456b6f84c75 | 15 | double Ki; |
yootee | 0:1456b6f84c75 | 16 | double Kd; |
yootee | 0:1456b6f84c75 | 17 | double e_o; |
yootee | 0:1456b6f84c75 | 18 | double e_c; |
yootee | 0:1456b6f84c75 | 19 | double Operation_amount; |
yootee | 0:1456b6f84c75 | 20 | double target; |
yootee | 0:1456b6f84c75 | 21 | double Give_P; |
yootee | 0:1456b6f84c75 | 22 | double Give_I; |
yootee | 0:1456b6f84c75 | 23 | double Give_D; |
yootee | 0:1456b6f84c75 | 24 | double plusminus; |
yootee | 0:1456b6f84c75 | 25 | }; |
yootee | 0:1456b6f84c75 | 26 | |
yootee | 0:1456b6f84c75 | 27 | #endif |