|
SimpleFOClibrary
2.1
|
Go to the documentation of this file.
19 unsigned long timestamp_now =
_micros();
22 if(Ts <= 0 || Ts > 0.5) Ts = 1e-3;
28 float proportional =
P * error;
39 float output = proportional + integral + derivative;
float error_prev
last tracking error value
float operator()(float error)
#define _constrain(amt, low, high)
unsigned long timestamp_prev
Last execution timestamp.
float output_prev
last pid output value
float limit
Maximum output value.
PIDController(float P, float I, float D, float ramp, float limit)
float output_ramp
Maximum speed of change of the output value.
float P
Proportional gain.
float integral_prev
last integral component value