PID class with motion profiling.
More...
#include <ProfiledPID.h>
|
virtual double | Update (double dt) |
| updates the PID controller, call on each loop
|
|
virtual void | SetSetpoint (double setpoint) |
| sets the setpoint
|
|
| PID (double p_gain, double i_gain, double d_gain, double ff_gain=1.0, double i_decay=0.5, bool feedforward=true, double filterFreq=7.0) |
| Constructs a PID controller. All gains are in constant (not timebase) form.
|
|
| PID () |
| Constructs a PID controller with no gains set.
|
|
void | SetParameters (double p_gain, double i_gain, double d_gain, double ff_gain=1.0, double i_decay=0.87, bool feedforward=true, double filterFreq=7.0) |
| Sets PID parameters. All gains are in constant (not timebase) form.
|
|
void | SetInput (double input) |
| Sets the feedback input.
|
|
double | GetOutput () |
| Gets the PID output.
|
|
double | GetProportionalGain () |
| Gets the p gain.
|
|
double | GetIntegralGain () |
| Gets the i gain.
|
|
double | GetDerivativeGain () |
| Gets the d gain.
|
|
double | GetFeedForwardGain () |
| Gets the feed forward gain.
|
|
double | GetIntegralDecay () |
| Gets the integral decay rate.
|
|
double | GetInput () |
| Gets the input value.
|
|
double | GetSetpoint () |
| Gets the setpoint value.
|
|
double | GetError () |
| Gets the error value.
|
|
double | GetAccumulatedError () |
| Gets the accumulated running sum.
|
|
double | GetPreviousError () |
| Gets the previous error (one iteration ago).
|
|
bool | IsFeedForward () |
| m_status flag for feed-forward PID.
|
|
void | Reset () |
| Resets PID setpoint, input, error, accumulated error, differential, and output.
|
|
void | DisablePID () |
| Disables PID (output returns setpoint).
|
|
void | EnablePID () |
| Enables PID.
|
|
void | SetIIREnabled (bool enabled) |
| Enables an IIR filter on output.
|
|
void | SetIIRDecay (double decay) |
| Sets the IFR Decay rate.
|
|
PID class with motion profiling.
void ProfiledPID::SetSetpoint |
( |
double |
setpoint | ) |
|
|
virtual |
sets the setpoint
- Parameters
-
Reimplemented from PID.
double ProfiledPID::Update |
( |
double |
dt | ) |
|
|
virtual |
updates the PID controller, call on each loop
- Parameters
-
- Returns
- pid output
Reimplemented from PID.
The documentation for this class was generated from the following files: