![]() |
Documentation
Tools for embedded systems
|
A numerical derivative class. More...
#include <numa.hpp>
Public Member Functions | |
virtual | ~derivative () |
derivative (const real_t timeStep, const real_t initialCondition=0.0_re) | |
Constructs a derivative block with a given timeStep and optional initial condition. | |
real_t | operator() (const real_t xt) |
Computes the numerical derivative based on the current input value. | |
![]() | |
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 derivative class.
A numerical derivative class that can be used to compute in real-time the numerical approximations of derivatives for data values sampled periodically.
|
inlinevirtual |
Constructs a derivative block with a given timeStep and optional initial condition.
[in] | timeStep | The fixed time step (dt) used to compute the derivative. |
[in] | initialCondition | The initial input value. Default is 0.0 |
Computes the numerical derivative based on the current input value.
[in] | xt | The current input value. |