A class for defining a saturated integrator based on Tustin formula: \( 1/s => T_s/2*(z+1)/(z-1) \).
More...
#include <pids.h>
A class for defining a saturated integrator based on Tustin formula: \( 1/s => T_s/2*(z+1)/(z-1) \).
Definition at line 47 of file pids.h.
◆ Integrator() [1/3]
iCub::ctrl::Integrator::Integrator |
( |
const double |
_Ts, |
|
|
const yarp::sig::Vector & |
y0, |
|
|
const yarp::sig::Matrix & |
_lim |
|
) |
| |
Constructor.
- Parameters
-
_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) |
- Note
- The saturation here is on by default
◆ Integrator() [2/3]
iCub::ctrl::Integrator::Integrator |
( |
const double |
_Ts, |
|
|
const yarp::sig::Vector & |
y0 |
|
) |
| |
Constructor.
- Parameters
-
_Ts | is the integrator sample time. |
y0 | is the initial value of the output vector. |
- Note
- The saturation here is off by default.
◆ Integrator() [3/3]
iCub::ctrl::Integrator::Integrator |
( |
const Integrator & |
I | ) |
|
|
inline |
Creates a new Integrator from an already existing object.
- Parameters
-
Definition at line 89 of file pids.h.
◆ allocate()
◆ get()
const yarp::sig::Vector& iCub::ctrl::Integrator::get |
( |
| ) |
const |
|
inline |
Returns the current output vector.
- Returns
- the current output vector.
Definition at line 154 of file pids.h.
◆ getLim()
const yarp::sig::Matrix& iCub::ctrl::Integrator::getLim |
( |
| ) |
|
|
inline |
Returns the constraints matrix.
- Returns
- the constraints matrix.
Definition at line 141 of file pids.h.
◆ getSaturation()
bool iCub::ctrl::Integrator::getSaturation |
( |
| ) |
|
|
inline |
Returns the current saturation status.
- Returns
- current saturation status.
Definition at line 117 of file pids.h.
◆ getTs()
double iCub::ctrl::Integrator::getTs |
( |
| ) |
|
|
inline |
Returns the sample time.
- Returns
- the sample time.
Definition at line 135 of file pids.h.
◆ integrate()
const Vector & Integrator::integrate |
( |
const yarp::sig::Vector & |
x | ) |
|
Executes one-step integration of input vector.
To be called each Ts seconds.
- Parameters
-
x | is the input vector to be integrated. |
- Returns
- the current output vector.
Definition at line 115 of file pids.cpp.
◆ operator=()
Copies a Integrator object into the current one.
- Parameters
-
- Returns
- a reference to the current object.
Definition at line 96 of file pids.h.
◆ reset()
void Integrator::reset |
( |
const yarp::sig::Vector & |
y0 | ) |
|
Resets the internal state and sets the output vector to the given value.
- Parameters
-
y0 | is the new value of output vector. |
Definition at line 128 of file pids.cpp.
◆ saturate()
Vector Integrator::saturate |
( |
const yarp::sig::Vector & |
v | ) |
|
|
protected |
◆ setLim()
void Integrator::setLim |
( |
const yarp::sig::Matrix & |
_lim | ) |
|
Sets the output vector constraints matrix.
- Parameters
-
_lim | is the constraints matrix. |
Definition at line 104 of file pids.cpp.
◆ setSaturation()
void Integrator::setSaturation |
( |
bool |
_applySat | ) |
|
Sets the saturation status.
- Parameters
-
_applySat | if true then the saturation is applied (initialized as true). |
Definition at line 87 of file pids.cpp.
◆ setTs()
void Integrator::setTs |
( |
const double |
_Ts | ) |
|
Sets the sample time.
- Parameters
-
Definition at line 96 of file pids.cpp.
◆ applySat
bool iCub::ctrl::Integrator::applySat |
|
protected |
◆ dim
unsigned int iCub::ctrl::Integrator::dim |
|
protected |
◆ lim
yarp::sig::Matrix iCub::ctrl::Integrator::lim |
|
protected |
◆ Ts
double iCub::ctrl::Integrator::Ts |
|
protected |
◆ x_old
yarp::sig::Vector iCub::ctrl::Integrator::x_old |
|
protected |
yarp::sig::Vector iCub::ctrl::Integrator::y |
|
protected |
The documentation for this class was generated from the following files:
- icub-main/src/libraries/ctrlLib/include/iCub/ctrl/pids.h
- icub-main/src/libraries/ctrlLib/src/pids.cpp