Buat test_PID
Dependents: test_PID tune_PID tune_PID
PID.h@0:9a32bd673e7a, 2018-03-06 (annotated)
- Committer:
- alienbernamaihsan
- Date:
- Tue Mar 06 05:05:50 2018 +0000
- Revision:
- 0:9a32bd673e7a
Setelah take video dan boardnya rusak pas dibawa ke avrg
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
alienbernamaihsan | 0:9a32bd673e7a | 1 | #ifndef PID_H |
alienbernamaihsan | 0:9a32bd673e7a | 2 | #define PID_H |
alienbernamaihsan | 0:9a32bd673e7a | 3 | |
alienbernamaihsan | 0:9a32bd673e7a | 4 | #include "mbed.h" |
alienbernamaihsan | 0:9a32bd673e7a | 5 | |
alienbernamaihsan | 0:9a32bd673e7a | 6 | class pid |
alienbernamaihsan | 0:9a32bd673e7a | 7 | { |
alienbernamaihsan | 0:9a32bd673e7a | 8 | public : |
alienbernamaihsan | 0:9a32bd673e7a | 9 | pid(double p , double i , double d , double _N , double _Ts) ; |
alienbernamaihsan | 0:9a32bd673e7a | 10 | double createpwm( double setpoint , double feedback ) ; |
alienbernamaihsan | 0:9a32bd673e7a | 11 | |
alienbernamaihsan | 0:9a32bd673e7a | 12 | private : |
alienbernamaihsan | 0:9a32bd673e7a | 13 | double Kp ; |
alienbernamaihsan | 0:9a32bd673e7a | 14 | double Kd ; |
alienbernamaihsan | 0:9a32bd673e7a | 15 | double Ki ; |
alienbernamaihsan | 0:9a32bd673e7a | 16 | double N ; |
alienbernamaihsan | 0:9a32bd673e7a | 17 | double Ts ; |
alienbernamaihsan | 0:9a32bd673e7a | 18 | double a0; |
alienbernamaihsan | 0:9a32bd673e7a | 19 | double a1; |
alienbernamaihsan | 0:9a32bd673e7a | 20 | double a2; |
alienbernamaihsan | 0:9a32bd673e7a | 21 | double b0; |
alienbernamaihsan | 0:9a32bd673e7a | 22 | double b1; |
alienbernamaihsan | 0:9a32bd673e7a | 23 | double b2; |
alienbernamaihsan | 0:9a32bd673e7a | 24 | double ku1; |
alienbernamaihsan | 0:9a32bd673e7a | 25 | double ku2; |
alienbernamaihsan | 0:9a32bd673e7a | 26 | double ke0; |
alienbernamaihsan | 0:9a32bd673e7a | 27 | double ke1; |
alienbernamaihsan | 0:9a32bd673e7a | 28 | double ke2; |
alienbernamaihsan | 0:9a32bd673e7a | 29 | double e2; |
alienbernamaihsan | 0:9a32bd673e7a | 30 | double e1; |
alienbernamaihsan | 0:9a32bd673e7a | 31 | double e0; |
alienbernamaihsan | 0:9a32bd673e7a | 32 | double u2; |
alienbernamaihsan | 0:9a32bd673e7a | 33 | double u1; |
alienbernamaihsan | 0:9a32bd673e7a | 34 | double u0; |
alienbernamaihsan | 0:9a32bd673e7a | 35 | }; |
alienbernamaihsan | 0:9a32bd673e7a | 36 | #endif |
alienbernamaihsan | 0:9a32bd673e7a | 37 | |
alienbernamaihsan | 0:9a32bd673e7a | 38 |