DUNE: Uniform Navigational Environment
2.4.1
|
Public Member Functions | |
DiscretePID (void) | |
~DiscretePID (void) | |
void | setGains (const std::vector< float > &gains) |
void | setOutputLimits (float lower, float upper) |
void | setIntegralLimits (float value) |
void | enableParcels (Tasks::Task *t, IMC::ControlParcel *p) |
float | step (double timestep, float error) |
float | step (double timestep, float error, float err_derivative) |
void | reset (void) |
DUNE::Control::DiscretePID::DiscretePID | ( | void | ) |
Constructor.
References reset().
DUNE::Control::DiscretePID::~DiscretePID | ( | void | ) |
Destructor.
void DUNE::Control::DiscretePID::enableParcels | ( | Tasks::Task * | t, |
IMC::ControlParcel * | p | ||
) |
Enable debug using control parcels logged using bus dispatch.
[in] | t | pointer to a task object |
[in] | p | pointer to control parcel message |
void DUNE::Control::DiscretePID::reset | ( | void | ) |
Reset pid variables.
Referenced by DiscretePID().
void DUNE::Control::DiscretePID::setGains | ( | const std::vector< float > & | gains | ) |
Set PID gains using vector.
[in] | gains | pid gains vector in order p, i, d |
void DUNE::Control::DiscretePID::setIntegralLimits | ( | float | value | ) |
Set integral bounds (limits)
[in] | value | absolute value of bound, lower bound will be negative |
void DUNE::Control::DiscretePID::setOutputLimits | ( | float | lower, |
float | upper | ||
) |
Set output upper and lower limit.
[in] | lower | lower limit |
[in] | upper | upper limit |
float DUNE::Control::DiscretePID::step | ( | double | timestep, |
float | error | ||
) |
Step forward, using an internal error derivative estimate.
[in] | timestep | amount of time to be used in derivative and integral part |
[in] | error | error between reference and measure |
float DUNE::Control::DiscretePID::step | ( | double | timestep, |
float | error, | ||
float | err_derivative | ||
) |
Step forward, using the supplied error derivative.
[in] | timestep | amount of time to be used in derivative and integral part |
[in] | error | error between reference and measure |
[in] | err_derivative | error derivative |
References DUNE::IMC::ControlParcel::d, DUNE::Tasks::Task::dispatch(), DUNE::IMC::ControlParcel::i, DUNE::IMC::ControlParcel::p, and DUNE::Math::trimValue().