probnum.problems.zoo.filtsmooth.pendulum(measurement_variance=0.1024, timespan=(0.0, 4.0), step=0.0075, initrv=None)[source]

Filtering/smoothing setup for a (noisy) pendulum.

A non-linear, discretized state space model for a pendulum with unknown forces acting on the dynamics, modeled as Gaussian noise. See e.g. Särkkä, 2013 1 for more details.

\[\begin{split}\begin{pmatrix} x_1(t_n) \\ x_2(t_n) \end{pmatrix} &= \begin{pmatrix} x_1(t_{n-1}) + x_2(t_{n-1}) \cdot h \\ x_2(t_{n-1}) - g \sin(x_1(t_{n-1})) \cdot h \end{pmatrix} + q_n \\ y_n &\sim \sin(x_1(t_n)) + r_n\end{split}\]

for some step size \(h\) and Gaussian process noise \(q_n \sim \mathcal{N}(0, Q)\) with

\[\begin{split}Q = \begin{pmatrix} \frac{h^3}{3} & \frac{h^2}{2} \\ \frac{h^2}{2} & h \end{pmatrix}\end{split}\]

\(g\) denotes the gravitational constant and \(r_n \sim \mathcal{N}(0, R)\) is Gaussian mesurement noise with some covariance \(R\).

  • measurement_variance (Real) – Marginal measurement variance.

  • timespan (Tuple[Real, Real]) – \(t_0\) and \(t_{\max}\) of the time grid.

  • step (Real) – Step size of the time grid.

  • initrv (Optional[RandomVariable]) – Initial random variable.


  • regression_problemRegressionProblem object with time points and noisy observations.

  • statespace_components – Dictionary containing

    • dynamics model

    • measurement model

    • initial random variable



Särkkä, Simo. Bayesian Filtering and Smoothing. Cambridge University Press, 2013.