A predictor is used to predict a new State given a prior
State and a TransitionModel. In addition, a
ControlModel may be used to model an external influence on the
state.
where \(\mathbf{x}_{k-1}\) is the prior state,
\(f_k(\mathbf{x}_{k-1})\) is the transition function,
\(\mathbf{u}_k\) the control vector, \(b_k(\mathbf{u}_k)\) the
control input and \(\mathbf{\nu}_k\) and \(\mathbf{\eta}_k\) the
transition and control model noise respectively.
A predictor class which forms the basis for the family of Kalman
predictors. This class also serves as the (specific) Kalman Filter
Predictor class. Here transition and control models must be linear:
control_model (LinearControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
An implementation of the Extended Kalman Filter predictor. Here the
transition and control functions may be non-linear, their transition and
control matrices are approximated via Jacobian matrices. To this end the
transition and control models, if non-linear, must be able to return the
jacobian() function.
Parameters:
transition_model (TransitionModel) – The transition model to be used.
control_model (ControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
The predict is accomplished by calculating the sigma points from the
Gaussian mean and covariance, then putting these through the (in general
non-linear) transition function, then reconstructing the Gaussian.
Parameters:
transition_model (TransitionModel) – The transition model to be used.
control_model (ControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
alpha (float, optional) – Primary sigma point spread scaling parameter. Default is 0.5.
beta (float, optional) – Used to incorporate prior knowledge of the distribution. If the true distribution is Gaussian, the value of 2 is optimal. Default is 2
kappa (float, optional) – Secondary spread scaling parameter. Default is calculated as 3-Ns
The version of the Kalman predictor that operates on the square root parameterisation of
the Gaussian state, SqrtGaussianState.
The prediction is undertaken in one of two ways. The default is to work in exactly the same
way as the parent class, with the exception that the predicted covariance is
subject to a Cholesky factorisation prior to initialisation of the SqrtGaussianState
output. The alternative, accessible via the qr_method=True flag, is to predict via a
modified Gram-Schmidt process. See [1] for details.
If transition and control models are possessed of the square root form of the covariance (as
sqrt_covar in the case of the transition model and sqrt_control_noise for
control models), then these are used directly. If not then they are created from the full
matrices using the scipy.linalg sqrtm() method. (Unlike the Cholesky decomposition
this works on positive semi-definite matrices, as well as positive definite ones.
control_model (ControlModel, optional) – control model
kalman_predictor (KalmanPredictor, optional) – Kalman predictor to use. Default None where a new instance of:class:~.ExtendedKalmanPredictor will be created utilising thesame transition model.
An implementation of a Particle Filter predictor utilising multiple models.
Parameters:
transition_models (Sequence[TransitionModel]) – Transition models used to for particle transition, selected by model index on particle. Models dimensions can be subset of the overall state space, by using model_mappings.
transition_matrix (numpy.ndarray) – n-model by n-model transition matrix.
model_mappings (Sequence[Sequence[int]]) – Sequence of mappings associated with each transition model. This enables mapping between model and state space, enabling use of models that may have different dimensions (e.g. velocity or acceleration). Parts of the state that aren’t mapped are set to zero.
control_model (ControlModel, optional) – control model
Transition models used to for particle transition, selected by model index on particle. Models dimensions can be subset of the overall state space, by using model_mappings.
Sequence of mappings associated with each transition model. This enables mapping between model and state space, enabling use of models that may have different dimensions (e.g. velocity or acceleration). Parts of the state that aren’t mapped are set to zero.
An implementation of a Particle Filter predictor utilising multiple models, with per
particle model probabilities.
Parameters:
transition_models (Sequence[TransitionModel]) – Transition models used to for particle transition, selected by model index on particle. Models dimensions can be subset of the overall state space, by using model_mappings.
transition_matrix (numpy.ndarray) – n-model by n-model transition matrix.
model_mappings (Sequence[Sequence[int]]) – Sequence of mappings associated with each transition model. This enables mapping between model and state space, enabling use of models that may have different dimensions (e.g. velocity or acceleration). Parts of the state that aren’t mapped are set to zero.
control_model (ControlModel, optional) – control model
An implementation of a particle filter predictor utilising the Bernoulli
filter formulation that estimates the spatial distribution of a single
target and estimates its existence, as described in [2].
The EnKF predicts the state by treating each column of the ensemble matrix
as a state vector. The state is propagated through time by applying the
transition function to each member (vector) of the ensemble.
\[\hat{X}_k = [f(x_1), f(x_2), ..., f(x_M)]\]
Parameters:
transition_model (TransitionModel) – The transition model to be used.
control_model (LinearControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
A predictor class which uses the information form of the Kalman filter. The key concept is
that ‘information’ is encoded as the information matrix, and the so-called ‘information state’,
which are:
where the symbols have the same meaning as in the description of the Kalman filter
(see e.g. tutorial 1) and the prediction equations can be derived from those of the Kalman
filter. As it stands the ControlModel must be capable of returning a (perhaps
linearised) control matrix and a control noise covariance matrix. In order to cut down on
the number of matrix inversions and to benefit from caching these can be recast as [4]
The prior state must have a state vector \(\mathbf{y}_{k-1}\) corresponding to
\(P_{k-1}^{-1} \mathbf{x}_{k-1}\) and a precision matrix, \(Y_{k-1} = P_{k-1}^{-1}\).
The InformationState class is provided for this purpose.
The TransitionModel is queried for the existence of an
inverse_matrix() method, and if not present, matrix() is inverted. This gives
one the opportunity to cache \(F_k^{-1}\) and save computational resource.
control_model (LinearControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
A linear predictor for accumulated state densities, for processing out of
sequence measurements. This requires the state is represented in
ASDGaussianState multi-state.
References
W. Koch and F. Govaers, On Accumulated State Densities with Applications to
Out-of-Sequence Measurement Processing in IEEE Transactions on Aerospace and
Electronic Systems,
vol. 47, no. 4, pp. 2766-2778, OCTOBER 2011, doi: 10.1109/TAES.2011.6034663.
F. Govaers and W. Koch, Generalized Solution to Smoothing and Out-of-Sequence
Processing in IEEE Transactions on Aerospace and Electronic Systems,
vol. 50, no. 3, pp. 1739-1748, JULY 2014, doi: 10.1109/TAES.2014.130009.
control_model (LinearControlModel, optional) – The control model to be used. Default None where the predictor will create a zero-effect linear ControlModel.
A composition of ordered sub-predictors (Predictor). Independently predicts each
sub-state of a CompositeState forward using a corresponding sub-predictor.
Parameters:
sub_predictors (Sequence[Predictor]) – Sequence of sub-predictors comprising the composite predictor. Must not be empty.
control_model (ControlModel, optional) – control model