Package org.apache.commons.math3.filter
Class DefaultProcessModel
java.lang.Object
org.apache.commons.math3.filter.DefaultProcessModel
- All Implemented Interfaces:
ProcessModel
Default implementation of a
ProcessModel
for the use with a KalmanFilter
.- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultProcessModel
(double[][] stateTransition, double[][] control, double[][] processNoise) Create a newProcessModel
, taking double arrays as input parameters.DefaultProcessModel
(double[][] stateTransition, double[][] control, double[][] processNoise, double[] initialStateEstimate, double[][] initialErrorCovariance) Create a newProcessModel
, taking double arrays as input parameters.DefaultProcessModel
(RealMatrix stateTransition, RealMatrix control, RealMatrix processNoise, RealVector initialStateEstimate, RealMatrix initialErrorCovariance) Create a newProcessModel
, taking double arrays as input parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the control matrix.Returns the initial error covariance matrix.Returns the initial state estimation vector.Returns the process noise matrix.Returns the state transition matrix.
-
Constructor Details
-
DefaultProcessModel
public DefaultProcessModel(double[][] stateTransition, double[][] control, double[][] processNoise, double[] initialStateEstimate, double[][] initialErrorCovariance) throws NullArgumentException, NoDataException, DimensionMismatchException Create a newProcessModel
, taking double arrays as input parameters.- Parameters:
stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrixinitialStateEstimate
- the initial state estimate vectorinitialErrorCovariance
- the initial error covariance matrix- Throws:
NullArgumentException
- if any of the input arrays isnull
NoDataException
- if any row / column dimension of the input matrices is zeroDimensionMismatchException
- if any of the input matrices is non-rectangular
-
DefaultProcessModel
public DefaultProcessModel(double[][] stateTransition, double[][] control, double[][] processNoise) throws NullArgumentException, NoDataException, DimensionMismatchException Create a newProcessModel
, taking double arrays as input parameters.The initial state estimate and error covariance are omitted and will be initialized by the
KalmanFilter
to default values.- Parameters:
stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrix- Throws:
NullArgumentException
- if any of the input arrays isnull
NoDataException
- if any row / column dimension of the input matrices is zeroDimensionMismatchException
- if any of the input matrices is non-rectangular
-
DefaultProcessModel
public DefaultProcessModel(RealMatrix stateTransition, RealMatrix control, RealMatrix processNoise, RealVector initialStateEstimate, RealMatrix initialErrorCovariance) Create a newProcessModel
, taking double arrays as input parameters.- Parameters:
stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrixinitialStateEstimate
- the initial state estimate vectorinitialErrorCovariance
- the initial error covariance matrix
-
-
Method Details
-
getStateTransitionMatrix
Returns the state transition matrix.- Specified by:
getStateTransitionMatrix
in interfaceProcessModel
- Returns:
- the state transition matrix
-
getControlMatrix
Returns the control matrix.- Specified by:
getControlMatrix
in interfaceProcessModel
- Returns:
- the control matrix
-
getProcessNoise
Returns the process noise matrix. This method is called by theKalmanFilter
every prediction step, so implementations of this interface may return a modified process noise depending on the current iteration step.- Specified by:
getProcessNoise
in interfaceProcessModel
- Returns:
- the process noise matrix
- See Also:
-
getInitialStateEstimate
Returns the initial state estimation vector.Note: if the return value is zero, the Kalman filter will initialize the state estimation with a zero vector.
- Specified by:
getInitialStateEstimate
in interfaceProcessModel
- Returns:
- the initial state estimation vector
-
getInitialErrorCovariance
Returns the initial error covariance matrix.Note: if the return value is zero, the Kalman filter will initialize the error covariance with the process noise matrix.
- Specified by:
getInitialErrorCovariance
in interfaceProcessModel
- Returns:
- the initial error covariance matrix
-