Robotics Library
0.7.0
|
Proportional-Integral-Derivative controller. More...
#include <Pid.h>
Public Member Functions | |
Pid () | |
virtual | ~Pid () |
T | operator() (const T &x, const Real &dt) |
Calculate next step. More... | |
void | reset () |
Public Attributes | |
T | kd |
Derivative gain. More... | |
T | ki |
Integral gain. More... | |
T | kp |
Proportional gain. More... | |
T | x |
Setpoint. More... | |
Private Attributes | |
T | e |
Previous error. More... | |
T | i |
Integral output. More... | |
Proportional-Integral-Derivative controller.
|
inline |
|
inlinevirtual |
|
inline |
Calculate next step.
\[ k_{\mathrm{p}} \, e(t) + k_{\mathrm{i}} \int_{0}^{t} e(\tau) \, \mathrm{d}\tau + k_{\mathrm{d}} \, \frac{\mathrm{d}}{\mathrm{d}t} \, e(t) \]
[in] | dt | \(\mathrm{d}t\) |
|
inline |
|
private |
Previous error.
|
private |
Integral output.
\[ k_{\mathrm{i}} \int_{0}^{t} e(\tau) \, \mathrm{d}\tau \]
T rl::math::Pid< T >::kd |
Derivative gain.
\[ k_{\mathrm{d}} \]
T rl::math::Pid< T >::ki |
Integral gain.
\[ k_{\mathrm{i}} \]
T rl::math::Pid< T >::kp |
Proportional gain.
\[ k_{\mathrm{p}} \]
T rl::math::Pid< T >::x |
Setpoint.