integrates an ODE using a naive Euler integration. TODO: change the integration method. For the moment, the highest derivative of the output signal is computed using the previous values of the other derivatives and the input signal, then integrated n times, which will most certainly induce a huge drift for ODEs with a high order at the denominator. More...
#include <sot/core/integrator-euler.hh>
Public Member Functions | |
virtual const std::string & | getClassName (void) const |
IntegratorEuler (const std::string &name) | |
virtual | ~IntegratorEuler (void) |
sigT & | integrate (sigT &res, int time) |
sigT & | derivative (sigT &res, int time) |
void | setSamplingPeriod (const double &period) |
double | getSamplingPeriod () const |
void | initialize () |
Static Public Member Functions | |
static std::string | getTypeName (void) |
Static Public Attributes | |
static const std::string | CLASS_NAME |
Protected Attributes | |
std::vector< sigT > | inputMemory |
std::vector< sigT > | outputMemory |
dg::SignalTimeDependent< sigT, int > | derivativeSOUT |
double | dt |
double | invdt |
integrates an ODE using a naive Euler integration. TODO: change the integration method. For the moment, the highest derivative of the output signal is computed using the previous values of the other derivatives and the input signal, then integrated n times, which will most certainly induce a huge drift for ODEs with a high order at the denominator.
dynamicgraph::sot::IntegratorEuler< sigT, coefT >::IntegratorEuler | ( | const std::string & | name | ) | [inline] |
References dynamicgraph::Entity::addCommand(), dynamicgraph::sot::IntegratorEuler< sigT, coefT >::derivativeSOUT, docCommandVoid0(), dynamicgraph::sot::IntegratorEuler< sigT, coefT >::getSamplingPeriod(), dynamicgraph::sot::IntegratorEuler< sigT, coefT >::initialize(), makeCommandVoid0(), dynamicgraph::sot::IntegratorEuler< sigT, coefT >::setSamplingPeriod(), and dynamicgraph::Entity::signalRegistration().
virtual dynamicgraph::sot::IntegratorEuler< sigT, coefT >::~IntegratorEuler | ( | void | ) | [inline, virtual] |
sigT& dynamicgraph::sot::IntegratorEuler< sigT, coefT >::derivative | ( | sigT & | res, |
int | time | ||
) | [inline] |
virtual const std::string& dynamicgraph::sot::IntegratorEuler< sigT, coefT >::getClassName | ( | void | ) | const [virtual] |
Implements dynamicgraph::Entity.
double dynamicgraph::sot::IntegratorEuler< sigT, coefT >::getSamplingPeriod | ( | ) | const [inline] |
static std::string dynamicgraph::sot::IntegratorEuler< sigT, coefT >::getTypeName | ( | void | ) | [inline, static] |
void dynamicgraph::sot::IntegratorEuler< sigT, coefT >::initialize | ( | ) | [inline] |
References dynamicgraph::SignalPtr< class, class >::accessCopy(), dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::denominator, dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::numerator, and dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::SIN.
Referenced by dynamicgraph::sot::IntegratorEuler< sigT, coefT >::IntegratorEuler().
sigT& dynamicgraph::sot::IntegratorEuler< sigT, coefT >::integrate | ( | sigT & | res, |
int | time | ||
) | [inline, virtual] |
Implements dynamicgraph::sot::IntegratorAbstract< sigT, coefT >.
References dynamicgraph::SignalPtr< class, class >::access(), dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::denominator, dynamicgraph::sot::IntegratorEuler< sigT, coefT >::dt, dynamicgraph::sot::IntegratorEuler< sigT, coefT >::invdt, dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::numerator, dynamicgraph::sot::IntegratorAbstract< sigT, coefT >::SIN, and sotDEBUG.
void dynamicgraph::sot::IntegratorEuler< sigT, coefT >::setSamplingPeriod | ( | const double & | period | ) | [inline] |
const std::string dynamicgraph::sot::IntegratorEuler< sigT, coefT >::CLASS_NAME [static] |
dg::SignalTimeDependent<sigT, int> dynamicgraph::sot::IntegratorEuler< sigT, coefT >::derivativeSOUT [protected] |
double dynamicgraph::sot::IntegratorEuler< sigT, coefT >::dt [protected] |
std::vector<sigT> dynamicgraph::sot::IntegratorEuler< sigT, coefT >::inputMemory [protected] |
double dynamicgraph::sot::IntegratorEuler< sigT, coefT >::invdt [protected] |
std::vector<sigT> dynamicgraph::sot::IntegratorEuler< sigT, coefT >::outputMemory [protected] |