Store gains in a struct to allow easier realtime box usage.
More...
#include <pid.hpp>
|
| | Gains (double p, double i, double d, double i_max, double i_min) |
| | Optional constructor for passing in values without antiwindup and saturation.
|
| | Gains (double p, double i, double d, double i_max, double i_min, bool antiwindup) |
| | Optional constructor for passing in values without saturation.
|
| | Gains (double p, double i, double d, double u_max, double u_min, const AntiWindupStrategy &antiwindup_strat) |
| | Constructor for passing in values.
|
|
bool | validate (std::string &error_msg) const |
|
void | print () const |
|
std::string | string () const |
Store gains in a struct to allow easier realtime box usage.
◆ Gains() [1/3]
| control_toolbox::Pid::Gains::Gains |
( |
double | p, |
|
|
double | i, |
|
|
double | d, |
|
|
double | i_max, |
|
|
double | i_min ) |
|
inline |
Optional constructor for passing in values without antiwindup and saturation.
- Parameters
-
| p | The proportional gain. |
| i | The integral gain. |
| d | The derivative gain. |
| i_max | Upper integral clamp. |
| i_min | Lower integral clamp. |
◆ Gains() [2/3]
| control_toolbox::Pid::Gains::Gains |
( |
double | p, |
|
|
double | i, |
|
|
double | d, |
|
|
double | i_max, |
|
|
double | i_min, |
|
|
bool | antiwindup ) |
|
inline |
Optional constructor for passing in values without saturation.
- Parameters
-
| p | The proportional gain. |
| i | The integral gain. |
| d | The derivative gain. |
| i_max | Upper integral clamp. |
| i_min | Lower integral clamp. |
| antiwindup | Anti-windup 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. |
◆ Gains() [3/3]
| control_toolbox::Pid::Gains::Gains |
( |
double | p, |
|
|
double | i, |
|
|
double | d, |
|
|
double | u_max, |
|
|
double | u_min, |
|
|
const AntiWindupStrategy & | antiwindup_strat ) |
|
inline |
Constructor for passing in values.
- Parameters
-
| p | The proportional gain. |
| i | The integral gain. |
| d | The derivative gain. |
| u_max | Upper output clamp. |
| u_min | Lower output clamp. |
| antiwindup_strat | Specifies the anti-windup strategy. Options: 'back_calculation', 'conditional_integration', or 'none'. Note that the 'back_calculation' strategy use the tracking_time_constant parameter to tune the anti-windup behavior. |
◆ antiwindup_
| bool control_toolbox::Pid::Gains::antiwindup_ = false |
◆ antiwindup_strat_
◆ d_gain_
| double control_toolbox::Pid::Gains::d_gain_ = 0.0 |
◆ i_gain_
| double control_toolbox::Pid::Gains::i_gain_ = 0.0 |
◆ i_max_
| double control_toolbox::Pid::Gains::i_max_ |
Initial value:=
std::numeric_limits<double>::infinity()
Maximum allowable integral term.
◆ i_min_
| double control_toolbox::Pid::Gains::i_min_ |
Initial value:=
-std::numeric_limits<double>::infinity()
Minimum allowable integral term.
◆ p_gain_
| double control_toolbox::Pid::Gains::p_gain_ = 0.0 |
◆ u_max_
| double control_toolbox::Pid::Gains::u_max_ = std::numeric_limits<double>::infinity() |
Maximum allowable output.
◆ u_min_
| double control_toolbox::Pid::Gains::u_min_ = -std::numeric_limits<double>::infinity() |
Minimum allowable output.
The documentation for this struct was generated from the following file:
- control_toolbox/control_toolbox/include/control_toolbox/pid.hpp