Example¶
The spherical pendulum¶
Problem description¶
We consider the Lie group setting as in the paper (Celledoni, Çokaj, Leone, Murari and Owren, (2021) International Journal of Computer Mathematics). We limit ourselves to the case of a single spherical pendulum. The equations in this case are:
where \(q \in S^2\) and \(\omega \in T_{q}S^2\) denote the position and the angular velocity, respectively. \(g\) denotes the gravitational constant and \(e_3 = [0, 0, 1]^{\top}.\) This is a mechanical system with preserved energy:
We then slightly modify the system by adding two terms in Equation (2) and obtain the new equations:
The first term, \(-d\omega\), is a damping term, while the term \(k\langle\omega, q\rangle q\) is equal to zero \(\forall (q, \omega)\in TS^2\). This second term is a useful tool to verify that the integrator solves the problem on the manifold. In fact, by performing the integration with a classical integrator, e.g. ode45 on Matlab, the solution does not remain on the manifold and rapidly deviates from the expected trajectory.