public class DefaultProcessModel extends java.lang.Object implements ProcessModel
ProcessModel
for the use with a KalmanFilter
.Modifier and Type | Field and Description |
---|---|
private RealMatrix |
controlMatrix
The control matrix, used to integrate a control input into the state estimation.
|
private RealMatrix |
initialErrorCovMatrix
The initial error covariance matrix of the observed process.
|
private RealVector |
initialStateEstimateVector
The initial state estimation of the observed process.
|
private RealMatrix |
processNoiseCovMatrix
The process noise covariance matrix.
|
private RealMatrix |
stateTransitionMatrix
The state transition matrix, used to advance the internal state estimation each time-step.
|
Constructor and Description |
---|
DefaultProcessModel(double[][] stateTransition,
double[][] control,
double[][] processNoise)
Create a new
ProcessModel , taking double arrays as input parameters. |
DefaultProcessModel(double[][] stateTransition,
double[][] control,
double[][] processNoise,
double[] initialStateEstimate,
double[][] initialErrorCovariance)
Create a new
ProcessModel , taking double arrays as input parameters. |
DefaultProcessModel(RealMatrix stateTransition,
RealMatrix control,
RealMatrix processNoise,
RealVector initialStateEstimate,
RealMatrix initialErrorCovariance)
Create a new
ProcessModel , taking double arrays as input parameters. |
Modifier and Type | Method and Description |
---|---|
RealMatrix |
getControlMatrix()
Returns the control matrix.
|
RealMatrix |
getInitialErrorCovariance()
Returns the initial error covariance matrix.
|
RealVector |
getInitialStateEstimate()
Returns the initial state estimation vector.
|
RealMatrix |
getProcessNoise()
Returns the process noise matrix.
|
RealMatrix |
getStateTransitionMatrix()
Returns the state transition matrix.
|
private RealMatrix stateTransitionMatrix
private RealMatrix controlMatrix
private RealMatrix processNoiseCovMatrix
private RealVector initialStateEstimateVector
private RealMatrix initialErrorCovMatrix
public DefaultProcessModel(double[][] stateTransition, double[][] control, double[][] processNoise, double[] initialStateEstimate, double[][] initialErrorCovariance) throws NullArgumentException, NoDataException, DimensionMismatchException
ProcessModel
, taking double arrays as input parameters.stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrixinitialStateEstimate
- the initial state estimate vectorinitialErrorCovariance
- the initial error covariance matrixNullArgumentException
- if any of the input arrays is null
NoDataException
- if any row / column dimension of the input matrices is zeroDimensionMismatchException
- if any of the input matrices is non-rectangularpublic DefaultProcessModel(double[][] stateTransition, double[][] control, double[][] processNoise) throws NullArgumentException, NoDataException, DimensionMismatchException
ProcessModel
, 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.
stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrixNullArgumentException
- if any of the input arrays is null
NoDataException
- if any row / column dimension of the input matrices is zeroDimensionMismatchException
- if any of the input matrices is non-rectangularpublic DefaultProcessModel(RealMatrix stateTransition, RealMatrix control, RealMatrix processNoise, RealVector initialStateEstimate, RealMatrix initialErrorCovariance)
ProcessModel
, taking double arrays as input parameters.stateTransition
- the state transition matrixcontrol
- the control matrixprocessNoise
- the process noise matrixinitialStateEstimate
- the initial state estimate vectorinitialErrorCovariance
- the initial error covariance matrixpublic RealMatrix getStateTransitionMatrix()
getStateTransitionMatrix
in interface ProcessModel
public RealMatrix getControlMatrix()
getControlMatrix
in interface ProcessModel
public RealMatrix getProcessNoise()
KalmanFilter
every
prediction step, so implementations of this interface may return a modified process noise
depending on the current iteration step.getProcessNoise
in interface ProcessModel
KalmanFilter.predict()
,
KalmanFilter.predict(double[])
,
KalmanFilter.predict(RealVector)
public RealVector getInitialStateEstimate()
Note: if the return value is zero, the Kalman filter will initialize the state estimation with a zero vector.
getInitialStateEstimate
in interface ProcessModel
public RealMatrix getInitialErrorCovariance()
Note: if the return value is zero, the Kalman filter will initialize the error covariance with the process noise matrix.
getInitialErrorCovariance
in interface ProcessModel