state-observation 1.8.0
General implementation of observers.
Loading...
Searching...
No Matches
stateObservation::DelayedMeasurementComplemFilter Class Referenceabstract
Inheritance diagram for stateObservation::DelayedMeasurementComplemFilter:
[legend]
Collaboration diagram for stateObservation::DelayedMeasurementComplemFilter:
[legend]

Public Member Functions

 DelayedMeasurementComplemFilter (double dt, Index n, Index dx_size, Index m, unsigned long bufferCapacity, const std::shared_ptr< IndexedInputArrayInterface > input=nullptr, const std::shared_ptr< AsynchronousDataMapBase > async_input=nullptr, const std::shared_ptr< AsynchronousDataMapBase > async_meas=nullptr)
virtual ~DelayedMeasurementComplemFilter ()
 Destructor.
Public Member Functions inherited from stateObservation::DelayedMeasurementObserver
 DelayedMeasurementObserver (double dt, Index n, Index m, unsigned long bufferCapacity, const std::shared_ptr< IndexedInputArrayInterface > input=nullptr, const std::shared_ptr< AsynchronousDataMapBase > async_input=nullptr, const std::shared_ptr< AsynchronousDataMapBase > async_meas=nullptr)
 DelayedMeasurementObserver ()=delete
 Default constructor.
virtual ~DelayedMeasurementObserver ()
 Destructor.
 DelayedMeasurementObserver (const DelayedMeasurementObserver &)=delete
 Not copyable: the copy would share the buffers of inputs and measurements.
DelayedMeasurementObserver & operator= (const DelayedMeasurementObserver &)=delete
const ObserverBase::StateVector & getCurrentEstimatedState ()
 Get the Current Estimated State.
virtual void initEstimator (const Vector &x)
 initializes the state vector.
virtual void setState (const ObserverBase::StateVector &x_k, TimeIndex k) override
 Set the value of the state vector at time index k.
virtual const ObserverBase::StateVector & getEstimatedState (TimeIndex k) override
 getestimated State
void setMeasurement (const Vector &y, TimeIndex k) override
 sets the measurement
void pushAsyncMeasurement (const AsynchronousDataBase &asyncMeas, TimeIndex k)
Vector getMeasurement (TimeIndex k) const
 Get the measurement of the time index k.
virtual TimeIndex getMeasurementTime () const
 Get the time index of the last given measurement.
virtual void clearMeasurements () override
 Remove all the given values of the measurements.
virtual void clearDelayedMeasurements ()
 Remove all the given values of the measurements.
void pushAsyncInput (const AsynchronousDataBase &asyncMeas, TimeIndex k)
virtual void setInput (const InputBase &u_k, TimeIndex k) override
virtual void clearInputs () override
virtual void clearDelayedInputs ()
void setCurrentState (const ObserverBase::StateVector &x_k)
 Modify the value of the state vector at the current time.
virtual void clearStates () override
 Removes the state estimation.
virtual void setStateCapacity (unsigned long stateCapacity)
 set the sampling time of the measurements
void setSamplingTime (const double dt)
 set the sampling time of the measurements
double getSamplingTime ()
TimeIndex getAsynchronousFirstIndex ()
virtual TimeIndex getCurrentTime () const
 Get the value of the time index of the current state estimation.
Public Member Functions inherited from stateObservation::ObserverBase
 ObserverBase (Index n, Index m)
 InputVector is the type of the input vector.
 ObserverBase ()
 default constructor (default values for n,m are zero)
virtual ~ObserverBase ()
 Destructor.
virtual void setStateSize (Index n)
 Changes the size of the state vector.
virtual Index getStateSize () const
 gets the size of the state vector
virtual void setMeasureSize (Index m)
 Changes the size of the measurement vector.
virtual Index getMeasureSize () const
 gets the size of the measurement vector
virtual void clearInputsAndMeasurements ()
 Remove all the given values of the inputs and measurements.
virtual void reset ()
virtual StateVector stateVectorConstant (double c) const
virtual StateVector stateVectorRandom () const
 Gives a vector of state vector size having random values.
virtual StateVector stateVectorZero () const
 Gives a vector of state vector size having zero values.
virtual bool checkStateVector (const StateVector &v) const
 Tells whether or not the vector has the dimensions of a state vector.
virtual MeasureVector measureVectorConstant (double c) const
 Gives a vector of measurement vector size having duplicated "c" value.
virtual MeasureVector measureVectorRandom () const
 Gives a vector of measurement vector size having random values.
virtual MeasureVector measureVectorZero () const
 Gives a vector of measurement vector size having zero values.
virtual bool checkMeasureVector (const MeasureVector &) const
 Tells whether or not the vector has the dimensions of a measurement vector.

Protected Member Functions

virtual StateVector oneStepEstimation_ (StateIterator it) override=0
 Runs one loop of the estimator.
virtual StateVector & computeStateDynamics_ (StateIterator it)=0
 Computes the dynamics of the state at the desired iteration.
virtual void integrateState_ (StateIterator it)=0
 Integrates the computed state dynamics.
Protected Member Functions inherited from stateObservation::DelayedMeasurementObserver
virtual void startNewIteration_ ()=0
const boost::circular_buffer< IndexedVector > & getStateVectorBuffer () const
bool stateIsSet () const

Protected Attributes

Vector dx_hat_
Protected Attributes inherited from stateObservation::DelayedMeasurementObserver
double dt_
 Sampling time.
boost::circular_buffer< IndexedVector > xBuffer_
 The state estimation of the observer (only one state is recorded).
IndexedVectorArray y_
 Container for the measurements.
std::shared_ptr< IndexedInputArrayInterface > u_
 Container for the inputs.
TimeIndex currentIterIndex_
std::shared_ptr< AsynchronousDataMapBase > y_asynchronous_
 Container for the asynchronous measurements.
std::shared_ptr< AsynchronousDataMapBase > u_asynchronous_
 Container for the asynchronous inputs.
Protected Attributes inherited from stateObservation::ObserverBase
Index n_
 stateSize is the size of the state vector
Index m_
 measureSize is the size of measurements vector

Additional Inherited Members

Public Types inherited from stateObservation::ObserverBase
typedef Vector StateVector
 StateVector is the type of state vector.
typedef Vector MeasureVector
 MeasureVector is the type of measurements vector.
Protected Types inherited from stateObservation::DelayedMeasurementObserver
typedef boost::circular_buffer< IndexedVector >::iterator StateIterator

Detailed Description

Definition at line 9 of file delayed-measurements-complem-filter.hpp.

Constructor & Destructor Documentation

◆ DelayedMeasurementComplemFilter()

stateObservation::DelayedMeasurementComplemFilter::DelayedMeasurementComplemFilter ( double dt,
Index n,
Index dx_size,
Index m,
unsigned long bufferCapacity,
const std::shared_ptr< IndexedInputArrayInterface > input = nullptr,
const std::shared_ptr< AsynchronousDataMapBase > async_input = nullptr,
const std::shared_ptr< AsynchronousDataMapBase > async_meas = nullptr )
inline

The constructor

  • n : size of the state vector
  • m : size of the measurements vector
  • p : size of the input vector
  • dt : timestep between each iteration
  • bufferCapacity : capacity of the iteration buffer

Definition at line 18 of file delayed-measurements-complem-filter.hpp.

◆ ~DelayedMeasurementComplemFilter()

virtual stateObservation::DelayedMeasurementComplemFilter::~DelayedMeasurementComplemFilter ( )
inlinevirtual

Destructor.

Definition at line 34 of file delayed-measurements-complem-filter.hpp.

Member Function Documentation

◆ oneStepEstimation_()

virtual StateVector stateObservation::DelayedMeasurementComplemFilter::oneStepEstimation_ ( StateIterator it)
overrideprotectedpure virtual

Runs one loop of the estimator.

Calls computeStateDerivatives_ then integrateState_

Parameters
itIterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1})

Implements stateObservation::DelayedMeasurementObserver.

◆ computeStateDynamics_()

virtual StateVector & stateObservation::DelayedMeasurementComplemFilter::computeStateDynamics_ ( StateIterator it)
protectedpure virtual

Computes the dynamics of the state at the desired iteration.

Computes x^{dot}_{k-1}

Parameters
itIterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1})

◆ integrateState_()

virtual void stateObservation::DelayedMeasurementComplemFilter::integrateState_ ( StateIterator it)
protectedpure virtual

Integrates the computed state dynamics.

Computes x_{k} = x_{k-1} + x^{dot}_{k-1} * dt

Parameters
itIterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1})

Member Data Documentation

◆ dx_hat_

Vector stateObservation::DelayedMeasurementComplemFilter::dx_hat_
protected

Definition at line 52 of file delayed-measurements-complem-filter.hpp.


The documentation for this class was generated from the following file: