|
state-observation 1.7.0
|
Defines the base class of online zero delay observers. Zero delay observers are the classical state observers where input and state values at instant k and the measurement value at instant k+1 are enough to provide the estimation of the state at instant k+1. This class mostly defines the data structures for storing the vectors, it describes the set routines and the observation loop mechanism. It requires to be derviated to implement the new oneStepEstimation_() method. More...
#include <state-observation/observer/zero-delay-observer.hpp>


Public Member Functions | |
| ZeroDelayObserver (Index n, Index m, Index p=0) | |
| ZeroDelayObserver () | |
| Default constructor (default values for n,m,p are zero) | |
| virtual | ~ZeroDelayObserver () |
| Destructor. | |
| virtual void | setState (const ObserverBase::StateVector &x_k, TimeIndex k) |
| Set the value of the state vector at time index k. | |
| virtual void | setCurrentState (const ObserverBase::StateVector &x_k) |
| Modify the value of the state vector at the current time. | |
| virtual void | clearStates () |
| Removes the state estimation. | |
| bool | stateIsSet () const |
| Returns if the state is set or not. The state being set is mandatory to start the estimator. | |
| virtual void | setMeasurement (const ObserverBase::MeasureVector &y_k, TimeIndex k) |
| virtual void | pushMeasurement (const ObserverBase::MeasureVector &y_k) |
| Sets the measurement value at the next time index. | |
| virtual void | clearMeasurements () |
| Remove all the given values of the measurements. | |
| virtual void | setInput (const ObserverBase::InputVector &u_k, TimeIndex k) |
| virtual void | pushInput (const ObserverBase::InputVector &u_k) |
| Set the input value at the next time indext. | |
| virtual void | clearInputs () |
| virtual void | clearInputsAndMeasurements () |
| Remove all the given values of the inputs and measurements. | |
| virtual TimeIndex | estimateState () |
| run the observer until the measurement vector is depleted. | |
| virtual ObserverBase::StateVector | getEstimatedState (TimeIndex k) |
| getestimated State | |
| virtual ObserverBase::StateVector | getCurrentEstimatedState () const |
| Get the Current Estimated State. | |
| virtual TimeIndex | getCurrentTime () const |
| Get the value of the time index of the current state estimation. | |
| Vector | getInput (TimeIndex k) const |
| Get the value of the input of the time index k. | |
| virtual TimeSize | getInputsNumber () const |
| Get the number of available inputs. | |
| virtual TimeIndex | getInputTime () const |
| Get the time index of the last given input. | |
| 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 TimeSize | getMeasurementsNumber () const |
| Gets the number of regitered measurements. | |
| virtual void | setStateSize (Index n) |
| changes the size of the state vector: resets the stored state vector | |
| virtual void | setMeasureSize (Index m) |
| changes the size of the measurement vector: reset the stored measurement vectors | |
| virtual void | setInputSize (Index p) |
| changes the size of the input vector: reset the stored input vectors | |
Public Member Functions inherited from stateObservation::ObserverBase | |
| ObserverBase (Index n, Index m, Index p=0) | |
| ObserverBase () | |
| default constructor (default values for n,m,p are zero) | |
| virtual | ~ObserverBase () |
| Destructor. | |
| virtual Index | getStateSize () const |
| gets the size of the state vector | |
| virtual Index | getMeasureSize () const |
| gets the size of the measurement vector | |
| virtual Index | getInputSize () const |
| gets the size of the input vector | |
| 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. | |
| virtual InputVector | inputVectorConstant (double c) const |
| Gives a vector of input vector size having duplicated "c" value. | |
| virtual InputVector | inputVectorRandom () const |
| Gives a vector of input vector size having random values. | |
| virtual InputVector | inputVectorZero () const |
| Gives a vector of input vector size having zero values. | |
| virtual bool | checkInputVector (const InputVector &) const |
| Tells whether or not the vector has the dimensions of a input vector. | |
Protected Member Functions | |
| virtual StateVector | oneStepEstimation_ ()=0 |
Protected Attributes | |
| IndexedVector | x_ |
| while the measurements and iputs are put in lists | |
| IndexedVectorArray | y_ |
| Container for the measurements. | |
| IndexedVectorArray | u_ |
| Container for the 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 | |
| Index | p_ |
| inputSize is the size of the input 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. | |
| typedef Vector | InputVector |
| InputVector is the type of the input vector. | |
Defines the base class of online zero delay observers. Zero delay observers are the classical state observers where input and state values at instant k and the measurement value at instant k+1 are enough to provide the estimation of the state at instant k+1. This class mostly defines the data structures for storing the vectors, it describes the set routines and the observation loop mechanism. It requires to be derviated to implement the new oneStepEstimation_() method.
The constructor
|
inline |
Default constructor (default values for n,m,p are zero)
|
inlinevirtual |
Destructor.
Remove all the given values of the inputs If there is no input, this instruction has no effect
Implements stateObservation::ObserverBase.
Remove all the given values of the inputs and measurements.
Reimplemented from stateObservation::ObserverBase.
Remove all the given values of the measurements.
Implements stateObservation::ObserverBase.
Removes the state estimation.
inherited from ObserverBase
Implements stateObservation::ObserverBase.
Reimplemented in stateObservation::KalmanFilterBase.
run the observer until the measurement vector is depleted.
the observer has to be able to reconstruct all the state values from the current time to the last measurement time. That means all the input values reauired have to be provided before.
|
virtual |
Get the Current Estimated State.
Get the value of the time index of the current state estimation.
|
virtual |
getestimated State
| k | The time index of the expected state value |
If k is equal to the current time k_0, this will give the value of the last state/estimate.
If k is larger than the current time k_0, this will run the observer loop and get the state estimation of the state at instant k.
In order to estimate the state k, two conditions have to be met:
That means generally (for most zero delay observers) that when current time is k_0 (we know an estimation of x_{k_0}) and we want to reconstruct the state at time k>k_0 we need to have the values of y_{k_0+1} to y_{k} and u_{k_0} to u_{k-1} (or u_{k} depending on the measure dynamics)
This method sets the current time to k
Implements stateObservation::ObserverBase.
Get the value of the input of the time index k.
Get the number of available inputs.
Get the time index of the last given input.
Get the measurement of the time index k.
Gets the number of regitered measurements.
Get the time index of the last given measurement.
|
protectedpure virtual |
This method describes one loop of the observer (from k_0 to k_0+1) it has to be implemented in derived classes.
Implemented in stateObservation::KalmanFilterBase, and stateObservation::TiltEstimator.
|
virtual |
Set the input value at the next time indext.
| u_k | Value of the next input |
|
virtual |
Sets the measurement value at the next time index.
| y_k | Value of the next measurement |
|
virtual |
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
|
virtual |
Set the value of the input vector at time index k. The inputs have to be inserted in chronological order without gaps. If there is no input in the system (p==0), this instruction has no effect
Implements stateObservation::ObserverBase.
changes the size of the input vector: reset the stored input vectors
Reimplemented from stateObservation::ObserverBase.
Reimplemented in stateObservation::LinearKalmanFilter.
|
virtual |
Set the value of the measurements vector at time index k. The measurements have to be inserted in chronological order without gaps.
Implements stateObservation::ObserverBase.
Reimplemented in stateObservation::TiltEstimator.
changes the size of the measurement vector: reset the stored measurement vectors
Reimplemented from stateObservation::ObserverBase.
Reimplemented in stateObservation::KalmanFilterBase, and stateObservation::LinearKalmanFilter.
|
virtual |
Set the value of the state vector at time index k.
This replaces the current state estimate. If k < current time then the measurements and the inputs are also cleared. Otherwise only past measurements and inputs are removed.
| x_k | |
| k |
Implements stateObservation::ObserverBase.
changes the size of the state vector: resets the stored state vector
Reimplemented from stateObservation::ObserverBase.
Reimplemented in stateObservation::KalmanFilterBase, and stateObservation::LinearKalmanFilter.
| bool stateObservation::ZeroDelayObserver::stateIsSet | ( | ) | const |
Returns if the state is set or not. The state being set is mandatory to start the estimator.
|
protected |
Container for the inputs.
|
protected |
while the measurements and iputs are put in lists
The state estimation of the observer (only one state is recorded)
|
protected |
Container for the measurements.