Control Models

class stonesoup.models.control.base.ControlModel(ndim_state: int, mapping: Sequence[int])[source]

Bases: stonesoup.models.base.Model

Control Model base class

Parameters
  • ndim_state (int) – Number of state dimensions

  • mapping (Sequence[int]) – Mapping between control and state dims

ndim_state: int

Number of state dimensions

mapping: Sequence[int]

Mapping between control and state dims

property ndim: int

Number of dimensions of model

abstract property ndim_ctrl: int

Number of control input dimensions

class stonesoup.models.control.linear.LinearControlModel(ndim_state: int, mapping: Sequence[int], control_vector: numpy.ndarray, control_matrix: numpy.ndarray, control_noise: numpy.ndarray = None)[source]

Bases: stonesoup.models.control.base.ControlModel, stonesoup.models.base.LinearModel

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
  • ndim_state (int) – Number of state dimensions

  • mapping (Sequence[int]) – Mapping between control and state dims

  • control_vector (numpy.ndarray) – Control vector at time \(k\)

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

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

control_vector: numpy.ndarray

Control vector at time \(k\)

control_matrix: numpy.ndarray

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

control_noise: numpy.ndarray

Control input noise covariance at time \(k\)

property ndim

Number of dimensions of model

property ndim_ctrl

Number of control input dimensions

matrix()[source]
Returns

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

Return type

numpy.ndarray

control_input()[source]

The mean control input

Returns

the noiseless effect of the control input, \(B_k \mathbf{u}_k\)

Return type

numpy.ndarray

rvs()[source]

Sample (once) from the multivariate normal distribution determined from the mean and covariance control parameters

Returns

a sample from \(\mathcal{N}(B_k \mathbf{u}_k, \Gamma_k)\)

Return type

numpy.ndarray

pdf(control_vec)[source]

The value of the probability density function (pdf) at a test point

Parameters

control_vec (numpy.ndarray) – The control vector at the test point

Returns

The value of the pdf at control_vec

Return type

float