#include <pid.h>
Public Member Functions | |
PID (double KP=100, double KI=2.0, double KD=0.3) | |
KP is used as a general koefficient. KI and KD can be tuned without dependence of KP. | |
void | setKP (double KP) |
void | setTargetPosition (double newpos) |
double | getTargetPosition () |
double | step (double newsensorval) |
double | stepWithD (double newsensorval, double derivative) |
Public Attributes | |
double | position |
double | lastposition |
double | last2position |
double | error |
double | lasterror |
double | targetposition |
double | KP |
double | KD |
double | KI |
double | alpha |
double | P |
double | D |
double | I |
double | force |
|
KP is used as a general koefficient. KI and KD can be tuned without dependence of KP.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|