59 PID (
double KP = 100 ,
double KI = 2.0 ,
double KD = 0.3 );
68 double step (
double newsensorval,
double time);
double stepNoCutoff(double newsensorval, double time)
perform one step of the PID controller without cutoffs used for Center-Servos
Definition: pid.cpp:93
double KI
Definition: pid.h:45
void setKP(double KP)
Definition: pid.cpp:50
double I
Definition: pid.h:51
double force
Definition: pid.h:53
double stepVelocity(double newsensorval, double time)
perform one step of the PID controller for velocity control.
Definition: pid.cpp:118
double getTargetPosition()
Definition: pid.cpp:59
double last2position
Definition: pid.h:37
double lasterror
Definition: pid.h:40
double P
Definition: pid.h:49
double position
Definition: pid.h:35
double D
Definition: pid.h:50
double KD
Definition: pid.h:46
double lasttime
Definition: pid.h:54
void setTargetPosition(double newpos)
Definition: pid.cpp:54
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...
Definition: pid.cpp:33
double KP
Definition: pid.h:44
double targetposition
Definition: pid.h:42
double lastposition
Definition: pid.h:36
double derivative
Definition: pid.h:41
double error
Definition: pid.h:39
double step(double newsensorval, double time)
perform one step of the PID controller with cutoff for large forces
Definition: pid.cpp:67
double tau
Definition: pid.h:47