dymoesco.estimation.filters.KalmanFilter

class dymoesco.estimation.filters.KalmanFilter(A, B, C, Q, R)

Bases: dymoesco.estimation.filters.Filter

The well-known algorithm for filtering linear dynamical systems.

The KalmanFilter class implements the predict and update abstract methods of Filter for linear dynamical systems

\[\begin{split}x_{k+1} &= Ax_k + Bu_k + v \\ y_k &= Cu_k + w\end{split}\]
Parameters
  • A (numpy matrix or equivalent list of list) – Dynamics matrix from \(x_{k+1}=Ax_k+Bu_k+v\).

  • B (numpy matrix or equivalent list of list) – Control matrix from \(x_{k+1}=Ax_k+Bu_k+v\).

  • C (numpy matrix or equivalent list of list) – Observation matrix from \(y_k=Cu_k\).

  • Q (numpy matrix or equivalent list of list) – Prediction noise covariance matrix for \(v \sim N(0,Q)\).

  • R (numpy matrix or equivalent list of list) – Observation noise covariance matrix for \(w \sim N(0,Q)\).

__init__(A, B, C, Q, R)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(A, B, C, Q, R)

Initialize self.

plot(xs, Ps[, ax, cov_step, color])

predict(x, P, u)

update(x, P, z)