|
state-observation 1.8.0
General implementation of observers.
|
Public Member Functions | |
| 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 Types | |
| typedef boost::circular_buffer< IndexedVector >::iterator | StateIterator |
Protected Member Functions | |
| virtual StateVector | oneStepEstimation_ (StateIterator it)=0 |
| Runs one loop of the estimator. | |
| virtual void | startNewIteration_ ()=0 |
| const boost::circular_buffer< IndexedVector > & | getStateVectorBuffer () const |
| bool | stateIsSet () const |
Protected Attributes | |
| 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. | |
Definition at line 77 of file delayed-measurements-observer.hpp.
|
protected |
Definition at line 203 of file delayed-measurements-observer.hpp.
| 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 ) |
The constructor
|
inlinevirtual |
Destructor.
Definition at line 98 of file delayed-measurements-observer.hpp.
| const ObserverBase::StateVector & stateObservation::DelayedMeasurementObserver::getCurrentEstimatedState | ( | ) |
Get the Current Estimated State.
|
virtual |
initializes the state vector.
| x | The initial state vector |
|
overridevirtual |
Set the value of the state vector at time index k.
This replaces the current state estimate and discards the stored past states: the estimation restarts from x_k.
| x_k | |
| k |
Implements stateObservation::ObserverBase.
|
overridevirtual |
getestimated State
| k | The time index of the expected state value |
Implements stateObservation::ObserverBase.
|
overridevirtual |
sets the measurement
| y | the measurement vector |
| k | the time index |
Implements stateObservation::ObserverBase.
|
overridevirtual |
Remove all the given values of the measurements.
Implements stateObservation::ObserverBase.
|
overridevirtual |
Set the value of the input vector at time index k. The inputs have to be inserted in chronological order without gaps.
Implements stateObservation::ObserverBase.
|
overridevirtual |
Remove all the given values of the inputs If there is no input, this instruction has no effect
Implements stateObservation::ObserverBase.
|
virtual |
Remove all the given values of the delayed inputs If there is no input, this instruction has no effect
| void stateObservation::DelayedMeasurementObserver::setCurrentState | ( | const ObserverBase::StateVector & | x_k | ) |
Modify the value of the state vector at the current time.
| x_k | The new state value |
This method should NOT be used for first initialization Use setState() instead.
Calling this function will not affect the measurements nor the input vectors. It will only replace the current state/estimate with a new one
|
overridevirtual |
Removes the state estimation.
inherited from ObserverBase
Implements stateObservation::ObserverBase.
|
inlinevirtual |
set the sampling time of the measurements
Definition at line 182 of file delayed-measurements-observer.hpp.
|
inline |
set the sampling time of the measurements
Definition at line 188 of file delayed-measurements-observer.hpp.
|
inline |
Definition at line 192 of file delayed-measurements-observer.hpp.
|
protectedpure virtual |
Runs one loop of the estimator.
| it | Iterator that points to the updated state. Points to x_{k} = f(x_{k-1}, u_{k-1}) |
Implemented in stateObservation::DelayedMeasurementComplemFilter.
|
inlineprotected |
Definition at line 210 of file delayed-measurements-observer.hpp.
|
protected |
Sampling time.
Definition at line 219 of file delayed-measurements-observer.hpp.
|
protected |
The state estimation of the observer (only one state is recorded).
Definition at line 221 of file delayed-measurements-observer.hpp.
|
protected |
Container for the measurements.
Definition at line 223 of file delayed-measurements-observer.hpp.
|
protected |
Container for the inputs.
Definition at line 225 of file delayed-measurements-observer.hpp.
|
protected |
Definition at line 229 of file delayed-measurements-observer.hpp.
|
protected |
Container for the asynchronous measurements.
Definition at line 231 of file delayed-measurements-observer.hpp.
|
protected |
Container for the asynchronous inputs.
Definition at line 233 of file delayed-measurements-observer.hpp.