gov.sandia.cognition.statistics.bayesian
Class ExtendedKalmanFilter

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner<Vector,MultivariateGaussian>
          extended by gov.sandia.cognition.statistics.bayesian.AbstractKalmanFilter
              extended by gov.sandia.cognition.statistics.bayesian.ExtendedKalmanFilter
All Implemented Interfaces:
BatchAndIncrementalLearner<Vector,MultivariateGaussian>, BatchLearner<Collection<? extends Vector>,MultivariateGaussian>, IncrementalLearner<Vector,MultivariateGaussian>, BayesianEstimator<Vector,Vector,MultivariateGaussian>, RecursiveBayesianEstimator<Vector,Vector,MultivariateGaussian>, CloneableSerializable, Serializable, Cloneable

@PublicationReference(author="Wikipedia",
                      title="Extended Kalman filter",
                      type=WebPage,
                      year=2010,
                      url="http://en.wikipedia.org/wiki/Extended_Kalman_filter")
public class ExtendedKalmanFilter
extends AbstractKalmanFilter

Implements the Extended Kalman Filter (EKF), which is an extension of the Kalman filter that allows nonlinear motion and observation models. The belief states are still Gaussian and the nonlinear models are approximated using a first-order numerical differentiation approximation. The EKF is not guaranteed to be optimal or converge to the true state.

Since:
3.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Nested Class Summary
protected  class ExtendedKalmanFilter.ModelJacobianEvaluator
          Holds the input constant while perturbing the state to estimate the Jacobian (A) matrix
 
Field Summary
protected  StatefulEvaluator<Vector,Vector,Vector> motionModel
          Model that determines how inputs and the previous state are updated.
protected  Evaluator<Vector,Vector> observationModel
          Model that determines how the state is observed.
 
Fields inherited from class gov.sandia.cognition.statistics.bayesian.AbstractKalmanFilter
currentInput, measurementCovariance, modelCovariance
 
Constructor Summary
ExtendedKalmanFilter()
          Creates a new instance of ExtendedKalmanFilter
ExtendedKalmanFilter(StatefulEvaluator<Vector,Vector,Vector> motionModel, Evaluator<Vector,Vector> observationModel, Vector currentInput, Matrix modelCovariance, Matrix measurementCovariance)
          Creates a new instance of ExtendedKalmanFilter
 
Method Summary
 ExtendedKalmanFilter clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 MultivariateGaussian createInitialLearnedObject()
          Creates a new initial learned object, before any data is given.
 StatefulEvaluator<Vector,Vector,Vector> getMotionModel()
          Getter for motionModel
 Evaluator<Vector,Vector> getObservationModel()
          Getter for observationModel
 void measure(MultivariateGaussian belief, Vector observation)
          Integrates a measurement into the system, refining the current belief of the state of the system
 void predict(MultivariateGaussian belief)
          Creates a prediction of the system's next state given the current belief state
 void setMotionModel(StatefulEvaluator<Vector,Vector,Vector> motionModel)
          Setter for motionModel
 void setObservationModel(Evaluator<Vector,Vector> observationModel)
          Setter for observationModel
 
Methods inherited from class gov.sandia.cognition.statistics.bayesian.AbstractKalmanFilter
computeMeasurementBelief, computePredictionCovariance, getCurrentInput, getMeasurementCovariance, getModelCovariance, setCurrentInput, setMeasurementCovariance, setModelCovariance, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner
learn, learn, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
update
 

Field Detail

motionModel

protected StatefulEvaluator<Vector,Vector,Vector> motionModel
Model that determines how inputs and the previous state are updated.


observationModel

protected Evaluator<Vector,Vector> observationModel
Model that determines how the state is observed.

Constructor Detail

ExtendedKalmanFilter

public ExtendedKalmanFilter()
Creates a new instance of ExtendedKalmanFilter


ExtendedKalmanFilter

public ExtendedKalmanFilter(StatefulEvaluator<Vector,Vector,Vector> motionModel,
                            Evaluator<Vector,Vector> observationModel,
                            Vector currentInput,
                            Matrix modelCovariance,
                            Matrix measurementCovariance)
Creates a new instance of ExtendedKalmanFilter

Parameters:
motionModel - Model that determines how inputs and the previous state are updated.
observationModel - Model that determines how the state is observed.
currentInput - Current input to the model.
modelCovariance - Covariance associated with the system's model.
measurementCovariance - Covariance associated with the measurements.
Method Detail

clone

public ExtendedKalmanFilter clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the 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.

Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractKalmanFilter
Returns:
A clone of this object.

getMotionModel

public StatefulEvaluator<Vector,Vector,Vector> getMotionModel()
Getter for motionModel

Returns:
Model that determines how inputs and the previous state are updated.

setMotionModel

public void setMotionModel(StatefulEvaluator<Vector,Vector,Vector> motionModel)
Setter for motionModel

Parameters:
motionModel - Model that determines how inputs and the previous state are updated.

getObservationModel

public Evaluator<Vector,Vector> getObservationModel()
Getter for observationModel

Returns:
Model that determines how the state is observed.

setObservationModel

public void setObservationModel(Evaluator<Vector,Vector> observationModel)
Setter for observationModel

Parameters:
observationModel - Model that determines how the state is observed.

createInitialLearnedObject

public MultivariateGaussian createInitialLearnedObject()
Description copied from interface: IncrementalLearner
Creates a new initial learned object, before any data is given.

Returns:
The initial learned object.

predict

public void predict(MultivariateGaussian belief)
Description copied from class: AbstractKalmanFilter
Creates a prediction of the system's next state given the current belief state

Specified by:
predict in class AbstractKalmanFilter
Parameters:
belief - Current belief state

measure

public void measure(MultivariateGaussian belief,
                    Vector observation)
Description copied from class: AbstractKalmanFilter
Integrates a measurement into the system, refining the current belief of the state of the system

Specified by:
measure in class AbstractKalmanFilter
Parameters:
belief - Current belief of the state of the system
observation - Measurement to integrate.