utils::LeakyIntegrator Struct Reference

Leaky integrator. More...

#include <lipm_walking/utils/LeakyIntegrator.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW void add (const Eigen::Vector3d &value, double dt)
 Add constant input for a fixed duration. More...
 
const Eigen::Vector3d & eval () const
 Evaluate the output of the integrator. More...
 
double rate () const
 Get leak rate. More...
 
void rate (double rate)
 Set the leak rate of the integrator. More...
 
void saturation (double s)
 Set output saturation. More...
 
void setZero ()
 Reset integral to zero. More...
 

Detailed Description

Leaky integrator.

The output satisfies the differential equation:

yd(t) = x(t) - leakRate * y(t)

A leaky integrator is implemented exactly as an exponential moving average, but it is homogeneous to the integral of the input signal (rather than the signal itself). See https://en.wikipedia.org/wiki/Leaky_integrator.

Definition at line 46 of file LeakyIntegrator.h.

Member Function Documentation

EIGEN_MAKE_ALIGNED_OPERATOR_NEW void utils::LeakyIntegrator::add ( const Eigen::Vector3d &  value,
double  dt 
)
inline

Add constant input for a fixed duration.

Parameters
valueConstant input.
dtFixed duration.

Definition at line 57 of file LeakyIntegrator.h.

const Eigen::Vector3d& utils::LeakyIntegrator::eval ( ) const
inline

Evaluate the output of the integrator.

Definition at line 69 of file LeakyIntegrator.h.

double utils::LeakyIntegrator::rate ( ) const
inline

Get leak rate.

Definition at line 77 of file LeakyIntegrator.h.

void utils::LeakyIntegrator::rate ( double  rate)
inline

Set the leak rate of the integrator.

Parameters
rateNew leak rate.

Definition at line 87 of file LeakyIntegrator.h.

void utils::LeakyIntegrator::saturation ( double  s)
inline

Set output saturation.

Disable by providing a negative value.

Parameters
sOutput will saturate between -s and +s.

Definition at line 97 of file LeakyIntegrator.h.

void utils::LeakyIntegrator::setZero ( )
inline

Reset integral to zero.

Definition at line 105 of file LeakyIntegrator.h.