Finding period of pendulum through interpolation

95 Views Asked by At

I’m looking for finding an efficient answer to this problem, which is to find the period time of a pendulum using interpolation.

The pendulum behavior was given using the equations $\phi’’+\frac g L \sin(\phi)$, $\phi(0)=\frac{6\pi}{7}$, $\phi’(0)=0.8$,$0\leq t \leq T$ I’ve rewritten this to a system of first order differential equations and solved it using Runge-Kutta 4.

You can find an image of the plotted solution below, where the blue graph shows the pendulum movement: graph

I want to find an interpolation over a subset of the two periods I’ve plotted to find the period time, but I’m a little stuck trying to pick what to do. Particularly which points I’m supposed to interpolate over and also what degree of polynomial I should pick. I’ve heard that you could get away with a low (1st, 2nd) degree polynomial, but I really can not figure out how.

2

There are 2 best solutions below

3
On BEST ANSWER

If I understand correctly, you want to compute the zero crossings from known data points on the curve.

An easy solution is to identify the two points on both sides of a change of sign and perform linear interpolation between them.

For better precision, as the derivatives are also available at these points, you can resort to inverse Hermite interpolation (interpolate $t$ as a cubic function of $\phi$).

Example with a much exaggerated step.

enter image description here

0
On

This is not an answer. The figure below is shown as an addition to my previous comments.

enter image description here

The calculus was done with time increment dt= 0.00001 If more accuracy is needed one have to use a smaller dt.

For example with $dt= 0.00001$ the result found above for the period was $T= 7.59686$ . With $dt= 0.000001$ the result becomes $T= 7.596946$ which is closer to the value computed with WolframAlpha $T= 7.59696...$

Note : The initial angle 6*pi/7 is large. The usual formula to compute an approximate of the period are not convenient in this case because the too large deviation.

THEORY :

The analytical solving leads to $$t(\phi)=\sqrt{\frac{2L}{g\,(B+1)}}\left(EllipticF\left(\frac{\phi}{2}\:\Bigg|\:\frac{2}{B+1} \right) - EllipticF\left(\frac{\phi_0}{2}\:\Bigg|\:\frac{2}{B+1} \right)\right)$$ $$B=\frac{L}{2g}(\phi'_0)^2-\cos(\phi_0)$$ $EllipticF$ is the function "Elliptic Integral of the first kind".

The maximum of $\phi$ (i.e.: amplitude) is : $$\phi_{max}=\cos^{-1}(-B)$$ The period is : $$T=4\:\:\sqrt{\frac{2L}{g\:(B+1)}}EllipticF\left(\frac{\phi_{max}}{2}\:\Bigg|\:\frac{2}{B+1} \right)$$ This formula comuped with WolframAlpha gives $\quad T= 7.59696...$