Ultimate Gain method
Dependents: 2016_slave_MD_rorikon 2016_slave_MD_rorikon WRS_mechanamu_test
Diff: PID.h
- Revision:
- 0:35a0b92fe34e
- Child:
- 1:6939c241c6dc
diff -r 000000000000 -r 35a0b92fe34e PID.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PID.h Sat Aug 06 05:31:34 2016 +0000 @@ -0,0 +1,31 @@ +#ifndef PID_H +#define PID_H +#include "mbed.h" + +class PID +{ + public: + PID(Timer *T); + float control(float target, float nowrpm); + float control_P(float target, float nowrpm, float new_Kp); + void set_parameter(float new_Ku, float new_Pu); + void reset(); + + private: + Timer timer; + float integral; + float prev_hensa; + float nowtime; + float prev_time; + + float Ku; + float Pu; + + float Kp; + float Ti; + float Td; + float Ki; + float Kd; +}; + +#endif \ No newline at end of file