iCub-main
|
#include <pids.h>
Public Member Functions | |
Integrator (const double _Ts, const yarp::sig::Vector &y0, const yarp::sig::Matrix &_lim) | |
Constructor. More... | |
Integrator (const double _Ts, const yarp::sig::Vector &y0) | |
Constructor. More... | |
Integrator (const Integrator &I) | |
Creates a new Integrator from an already existing object. More... | |
Integrator & | operator= (const Integrator &I) |
Copies a Integrator object into the current one. More... | |
const yarp::sig::Vector & | integrate (const yarp::sig::Vector &x) |
Executes one-step integration of input vector. More... | |
void | setSaturation (bool _applySat) |
Sets the saturation status. More... | |
bool | getSaturation () |
Returns the current saturation status. More... | |
void | setTs (const double _Ts) |
Sets the sample time. More... | |
void | setLim (const yarp::sig::Matrix &_lim) |
Sets the output vector constraints matrix. More... | |
double | getTs () |
Returns the sample time. More... | |
const yarp::sig::Matrix & | getLim () |
Returns the constraints matrix. More... | |
void | reset (const yarp::sig::Vector &y0) |
Resets the internal state and sets the output vector to the given value. More... | |
const yarp::sig::Vector & | get () const |
Returns the current output vector. More... | |
Protected Member Functions | |
void | allocate (const Integrator &I) |
yarp::sig::Vector | saturate (const yarp::sig::Vector &v) |
Protected Attributes | |
unsigned int | dim |
yarp::sig::Vector | y |
yarp::sig::Vector | x_old |
yarp::sig::Matrix | lim |
double | Ts |
bool | applySat |
A class for defining a saturated integrator based on Tustin formula: \( 1/s => T_s/2*(z+1)/(z-1) \)
iCub::ctrl::Integrator::Integrator | ( | const double | _Ts, |
const yarp::sig::Vector & | y0, | ||
const yarp::sig::Matrix & | _lim | ||
) |
Constructor.
_Ts | is the integrator sample time. |
y0 | is the initial value of the output vector. |
_lim | is a Nx2 matrix describing for each row i the lower (1st column) and the upper limit (2nd column) of the ith component: _lim(i,1)<=output[i]<=_lim(i,2) |
iCub::ctrl::Integrator::Integrator | ( | const double | _Ts, |
const yarp::sig::Vector & | y0 | ||
) |
Constructor.
_Ts | is the integrator sample time. |
y0 | is the initial value of the output vector. |
|
inline |
Creates a new Integrator from an already existing object.
I | is the Integrator to be copied. |
|
protected |
|
inline |
|
inline |
|
inline |
|
inline |
const Vector & Integrator::integrate | ( | const yarp::sig::Vector & | x | ) |
|
inline |
Copies a Integrator object into the current one.
I | is a reference to an object of type Integrator. |
void Integrator::reset | ( | const yarp::sig::Vector & | y0 | ) |
|
protected |
void Integrator::setLim | ( | const yarp::sig::Matrix & | _lim | ) |
void Integrator::setSaturation | ( | bool | _applySat | ) |
void Integrator::setTs | ( | const double | _Ts | ) |