pendulum¶
- probnum.problems.zoo.filtsmooth.pendulum(measurement_variance=0.1024, timespan=(0.0, 4.0), step=0.0075, initrv=None, initarg=None, random_state=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
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.initarg (
Optional
[float
]) – Initial time point of the prior process. Optional. Default is the left boundary of timespan.random_state (
Union
[None
,int
,RandomState
,Generator
]) – Random state that is used to generate samples from the state space model. This argument is passed down to filtsmooth.generate_samples.
- Returns
regression_problem –
TimeSeriesRegressionProblem
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.