![]() |
Documentation
Tools for embedded systems
|
A numerical integration class. More...
#include <numa.hpp>
Public Member Functions | |
| virtual | ~integrator ()=default |
| integrator (const real_t timeStep, const real_t initialCondition=0.0_re) | |
| Constructs an integrator block with a given timeStep time and optional initial condition. | |
| real_t | operator() (const real_t xDot) |
| Performs one step of numerical integration. | |
| real_t | operator() () const |
| Retrieve the current value of the integration. | |
Public Member Functions inherited from qlibs::nState | |
| virtual | ~nState ()=default |
| nState (const real_t x0=0.0_re, const real_t sn_1=0.0_re, const real_t sn_2=0.0_re) noexcept | |
| Constructor for the state object. | |
| void | init (const real_t x0=0.0_re, const real_t sn_1=0.0_re, const real_t sn_2=0.0_re) noexcept |
| Initialize the state object. | |
| real_t | integrate (const real_t s, const real_t dt, const bool bUpdate=true) noexcept |
| Perform a numerical integration step by using the specified integration method. | |
| real_t | derive (const real_t s, const real_t dt, const bool bUpdate=true) noexcept |
| Perform a numerical derivation step by using the specified derivation method. | |
| void | setIntegrationMethod (integrationMethod m) noexcept |
| Sets the numerical integration method. | |
| void | setDerivationMethod (derivationMethod m) noexcept |
| Sets the numerical derivation method. | |
| bool | setSaturation (const real_t minV, const real_t maxV) noexcept |
| Sets the saturation limits for the integrator output. | |
| real_t | operator() (void) const noexcept |
| Get the value of the state. | |
A numerical integration class.
A numerical integration class that can be used to compute in real-time the numerical approximation of an integral for data values sampled periodically. It supports optional output saturation limits.
|
virtualdefault |
Constructs an integrator block with a given timeStep time and optional initial condition.
| [in] | timeStep | The fixed time step (dt) used to compute the integration. |
| [in] | initialCondition | The initial output value of the integrator. Default is 0.0. |
| real_t integrator::operator() | ( | void | ) | const |
Retrieve the current value of the integration.
Performs one step of numerical integration.
| [in] | xDot | The input value to be integrated |