Struct Pid::Gains
Defined in File pid.hpp
Nested Relationships
This struct is a nested type of Class Pid.
Struct Documentation
-
struct Gains
Store gains in a struct to allow easier realtime buffer usage.
Public Functions
-
inline Gains(double p, double i, double d, double i_max, double i_min)
Optional constructor for passing in values without antiwindup.
- Parameters:
p – The proportional gain.
i – The integral gain.
d – The derivative gain.
i_max – Upper integral clamp.
i_min – Lower integral clamp.
-
inline Gains(double p, double i, double d, double i_max, double i_min, bool antiwindup)
Optional constructor for passing in values.
- Parameters:
p – The proportional gain.
i – The integral gain.
d – The derivative gain.
i_max – Upper integral clamp.
i_min – Lower integral clamp.
antiwindup – Antiwindup functionality. When set to true, limits the integral error to prevent windup; otherwise, constrains the integral contribution to the control output. i_max and i_min are applied in both scenarios.
-
inline Gains()
Public Members
-
double p_gain_
Proportional gain.
-
double i_gain_
Integral gain.
-
double d_gain_
Derivative gain.
-
double i_max_
Maximum allowable integral term.
-
double i_min_
Minimum allowable integral term.
-
bool antiwindup_
Antiwindup.
-
inline Gains(double p, double i, double d, double i_max, double i_min)