pendulum

probnum.problems.zoo.filtsmooth.pendulum(rng, measurement_variance=0.1024, timespan=(0.0, 4.0), step=0.0075, initrv=None, initarg=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\).

Parameters
  • rng (Generator) – Random number generator.

  • measurement_variance (FloatLike) – Marginal measurement variance.

  • timespan (Tuple[<sphinx.util.inspect.TypeAliasForwardRef object at 0x7f92c41445b0>, <sphinx.util.inspect.TypeAliasForwardRef object at 0x7f92c4144f40>]) – \(t_0\) and \(t_{\max}\) of the time grid.

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

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

  • initarg (Optional[float]) – Initial time point of the prior process. Optional. Default is the left boundary of timespan.

Returns

  • regression_problemTimeSeriesRegressionProblem object with time points and noisy observations.

  • info – Dictionary containing additional information like the prior process.

References

1

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