public abstract class AbstractKalmanFilter extends AbstractBatchAndIncrementalLearner<Vector,MultivariateGaussian> implements RecursiveBayesianEstimator<Vector,Vector,MultivariateGaussian>
Modifier and Type | Field and Description |
---|---|
protected Vector |
currentInput
Current input to the model.
|
protected Matrix |
measurementCovariance
Covariance associated with the measurements.
|
protected Matrix |
modelCovariance
Covariance associated with the system's model.
|
Constructor and Description |
---|
AbstractKalmanFilter(Vector currentInput,
Matrix modelCovariance,
Matrix measurementCovariance)
Creates a new instance of AbstractKalmanFilter
|
Modifier and Type | Method and Description |
---|---|
AbstractKalmanFilter |
clone()
This makes public the clone method on the
Object class and
removes the exception that it throws. |
void |
computeMeasurementBelief(MultivariateGaussian belief,
Vector innovation,
Matrix C)
Updates the measurement belief by computing the Kalman gain and
incorporating the innovation into the estimate
|
Matrix |
computePredictionCovariance(Matrix A,
Matrix beliefCovariance)
Computes the prediction covariance from the Jacobian and believe
covariance
|
Vector |
getCurrentInput()
Getter for currentInput
|
Matrix |
getMeasurementCovariance()
Getter for measurementCovariance
|
Matrix |
getModelCovariance()
Getter for modelCovariance
|
abstract void |
measure(MultivariateGaussian belief,
Vector observation)
Integrates a measurement into the system, refining the current
belief of the state of the system
|
abstract void |
predict(MultivariateGaussian belief)
Creates a prediction of the system's next state given the current
belief state
|
void |
setCurrentInput(Vector currentInput)
Setter for currentInput
|
void |
setMeasurementCovariance(Matrix measurementCovariance)
Setter for measurementCovariance
|
void |
setModelCovariance(Matrix modelCovariance)
Setter for modelCovariance
|
void |
update(MultivariateGaussian belief,
Vector observation)
The
update method updates an object of ResultType using
the given new data of type DataType , using some form of
"learning" algorithm. |
learn, learn, update
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
learn
createInitialLearnedObject, update
protected Vector currentInput
protected Matrix modelCovariance
protected Matrix measurementCovariance
public AbstractKalmanFilter(Vector currentInput, Matrix modelCovariance, Matrix measurementCovariance)
currentInput
- Current input to the model.modelCovariance
- Covariance associated with the system's model.measurementCovariance
- Covariance associated with the measurements.public AbstractKalmanFilter clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.clone
in interface CloneableSerializable
clone
in class AbstractBatchAndIncrementalLearner<Vector,MultivariateGaussian>
public abstract void predict(MultivariateGaussian belief)
belief
- Current belief statepublic Matrix computePredictionCovariance(Matrix A, Matrix beliefCovariance)
A
- System Jacobian, which is estimated in the case of the EKF.beliefCovariance
- Covariance of the current state belief.public abstract void measure(MultivariateGaussian belief, Vector observation)
belief
- Current belief of the state of the systemobservation
- Measurement to integrate.public void computeMeasurementBelief(MultivariateGaussian belief, Vector innovation, Matrix C)
belief
- Current belief of the state.innovation
- Innovation, which is the observation minus the predicted observationC
- Output-selector matrix, the partial derivative of the output with
respect to the current estimated state.public void update(MultivariateGaussian belief, Vector observation)
IncrementalLearner
update
method updates an object of ResultType
using
the given new data of type DataType
, using some form of
"learning" algorithm.update
in interface IncrementalLearner<Vector,MultivariateGaussian>
belief
- The object to update.observation
- The new data for the learning algorithm to use to update
the object.public Matrix getModelCovariance()
public void setModelCovariance(Matrix modelCovariance)
modelCovariance
- Covariance associated with the system's model.public Vector getCurrentInput()
public void setCurrentInput(Vector currentInput)
currentInput
- Current input to the model.public Matrix getMeasurementCovariance()
public void setMeasurementCovariance(Matrix measurementCovariance)
measurementCovariance
- Covariance associated with the measurements.