Ultimate Gain method

Dependents:   2016_slave_MD_rorikon 2016_slave_MD_rorikon WRS_mechanamu_test

Committer:
sgrsn
Date:
Fri Sep 30 12:31:16 2016 +0000
Revision:
4:3ca1603fbcda
Parent:
2:405224725072
Child:
5:6949e401a9ad
PID

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sgrsn 0:35a0b92fe34e 1 #ifndef PID_H
sgrsn 0:35a0b92fe34e 2 #define PID_H
sgrsn 0:35a0b92fe34e 3 #include "mbed.h"
sgrsn 0:35a0b92fe34e 4
sgrsn 0:35a0b92fe34e 5 class PID
sgrsn 0:35a0b92fe34e 6 {
sgrsn 0:35a0b92fe34e 7 public:
sgrsn 0:35a0b92fe34e 8 PID(Timer *T);
sgrsn 0:35a0b92fe34e 9 float control(float target, float nowrpm);
sgrsn 4:3ca1603fbcda 10 float PI_lateD(float target, float nowrpm);
sgrsn 0:35a0b92fe34e 11 float control_P(float target, float nowrpm, float new_Kp);
sgrsn 4:3ca1603fbcda 12 float control_PI(float target, float nowrpm);
sgrsn 0:35a0b92fe34e 13 void set_parameter(float new_Ku, float new_Pu);
sgrsn 0:35a0b92fe34e 14 void reset();
sgrsn 2:405224725072 15
sgrsn 2:405224725072 16 float Ku;
sgrsn 2:405224725072 17 float Pu;
sgrsn 2:405224725072 18 float Kp;
sgrsn 2:405224725072 19 float Ti;
sgrsn 2:405224725072 20 float Td;
sgrsn 2:405224725072 21 float Ki;
sgrsn 2:405224725072 22 float Kd;
sgrsn 0:35a0b92fe34e 23
sgrsn 2:405224725072 24 private:
sgrsn 0:35a0b92fe34e 25 Timer timer;
sgrsn 0:35a0b92fe34e 26 float integral;
sgrsn 0:35a0b92fe34e 27 float prev_hensa;
sgrsn 0:35a0b92fe34e 28 float nowtime;
sgrsn 0:35a0b92fe34e 29 float prev_time;
sgrsn 4:3ca1603fbcda 30 float lateD;
sgrsn 0:35a0b92fe34e 31 };
sgrsn 0:35a0b92fe34e 32
sgrsn 0:35a0b92fe34e 33 #endif