![]() |
Documentation
Tools for embedded systems
|
A numerical integration class. More...
#include <numa.hpp>
Public Member Functions | |
virtual | ~integrator () |
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. | |
bool | setSaturation (const real_t minV, const real_t maxV) noexcept |
Sets the saturation limits for the integrator output. | |
real_t | operator() (const real_t xDot) |
Performs one step of numerical integration. | |
![]() | |
virtual | ~nState () |
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. | |
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.
|
inlinevirtual |
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. |
Performs one step of numerical integration.
[in] | xDot | The input value to be integrated |
Sets the saturation limits for the integrator output.
[in] | minV | The minimum value the output can reach. |
[in] | maxV | The maximum value the output can reach. |
true
if the limits are valid and applied; false
otherwise (e.g., minV > maxV).