This simulation works based on the EDO solution
$$
\ddot{\theta} + \gamma\dot{\theta} + \dfrac{g}{L}\sin\theta = 0
$$
The ODE is solved by the fourth order Runge-Kutta method.
The acceleration due to gravity is assumed as $g = 9.8$ m/s$^2$ and the damping factor as $\gamma = 0.05$ s$^{-1}$.
Furthermore, there is the inclusion of an error $\alpha$ generated by a random variable.
That is, each time the half period of the pendulum is calculated, or its speed, a value $\alpha$
is drawn within the interval $[-\epsilon, \epsilon]$
and added to the half-time or the speed reported on the device.
$\epsilon$ is the amplitude of the noise. The value of $\alpha$ is made up of two parts:
random error (~Gaussian distribution around the calculated value)
and systematic error (offset added to the calculated value).
Read more: