Control Models

class stonesoup.models.control.base.ControlModel[source]

Bases: Model

Control Model base class

property ndim: int

Number of dimensions of model

abstract property ndim_ctrl: int

Number of control input dimensions

class stonesoup.models.control.linear.LinearControlModel(control_matrix: ndarray, seed: int | None = None, control_noise: ndarray = None)[source]

Bases: ControlModel, LinearModel, GaussianModel

Implements a linear effect to the state vector via,

\[\hat{x}_k = B_k (\mathbf{u}_k + \gamma_k)\]

where \(B_k\) is the control-input model matrix (i.e. control matrix), \(\mathbf{u}_k\) is the control vector and \(\gamma_k\) is sampled from zero-mean white noise distribution \(\mathcal{N}(0,\Gamma_k)\)

Parameters:
  • control_matrix (numpy.ndarray) – Control input model matrix at time \(k\), \(B_k\)

  • seed (Optional[int], optional) – Seed for random number generation

  • control_noise (numpy.ndarray, optional) – Control input noise covariance at time \(k\)

control_matrix: ndarray

Control input model matrix at time \(k\), \(B_k\)

control_noise: ndarray

Control input noise covariance at time \(k\)

property ndim

Number of dimensions of model

property ndim_ctrl

Number of control input dimensions

matrix(**kwargs) ndarray[source]
Returns:

the control-input model matrix, \(B_k\)

Return type:

numpy.ndarray

covar(**kwargs)[source]

Model covariance

function(control_input, noise=False, **kwargs) StateVector[source]

This needs to be overwritten because noise is added before the transformation rather than after it.