Buat test_PID
Dependents: test_PID tune_PID tune_PID
Diff: PID.h
- Revision:
- 0:9a32bd673e7a
diff -r 000000000000 -r 9a32bd673e7a PID.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PID.h Tue Mar 06 05:05:50 2018 +0000 @@ -0,0 +1,38 @@ +#ifndef PID_H +#define PID_H + +#include "mbed.h" + +class pid +{ +public : + pid(double p , double i , double d , double _N , double _Ts) ; + double createpwm( double setpoint , double feedback ) ; + +private : + double Kp ; + double Kd ; + double Ki ; + double N ; + double Ts ; + double a0; + double a1; + double a2; + double b0; + double b1; + double b2; + double ku1; + double ku2; + double ke0; + double ke1; + double ke2; + double e2; + double e1; + double e0; + double u2; + double u1; + double u0; +}; +#endif + + \ No newline at end of file