DoublePendulum¶
Systems / ODEs / Physical systems
Two coupled pendula — the iconic mechanically chaotic system, exquisitely sensitive to initial conditions.
Interactive: drag to rotate
Definition¶
\[
\begin{aligned}
\dot{th1} &= \frac{6 \left(2 p_{1} - 3 p_{2} \cos{\left(th_{1} - th_{2} \right)}\right)}{d^{2} m \left(16 - 9 \cos^{2}{\left(th_{1} - th_{2} \right)}\right)} \\
\dot{th2} &= \frac{6 \left(- 3 p_{1} \cos{\left(th_{1} - th_{2} \right)} + 8 p_{2}\right)}{d^{2} m \left(16 - 9 \cos^{2}{\left(th_{1} - th_{2} \right)}\right)} \\
\dot{p1} &= - 0.5 d^{2} m \left(\frac{29.46 \sin{\left(th_{1} \right)}}{d} + \frac{36 \left(2 p_{1} - 3 p_{2} \cos{\left(th_{1} - th_{2} \right)}\right) \left(- 3 p_{1} \cos{\left(th_{1} - th_{2} \right)} + 8 p_{2}\right) \sin{\left(th_{1} - th_{2} \right)}}{d^{4} m^{2} \left(16 - 9 \cos^{2}{\left(th_{1} - th_{2} \right)}\right)^{2}}\right) \\
\dot{p2} &= - 0.5 d^{2} m \left(\frac{9.82 \sin{\left(th_{2} \right)}}{d} - \frac{36 \left(2 p_{1} - 3 p_{2} \cos{\left(th_{1} - th_{2} \right)}\right) \left(- 3 p_{1} \cos{\left(th_{1} - th_{2} \right)} + 8 p_{2}\right) \sin{\left(th_{1} - th_{2} \right)}}{d^{4} m^{2} \left(16 - 9 \cos^{2}{\left(th_{1} - th_{2} \right)}\right)^{2}}\right)
\end{aligned}
\]
Parameters¶
| Symbol | Default | Role |
|---|---|---|
d |
1 |
arm length (sets the gravitational frequency scale) |
m |
1 |
arm mass (both arms equal) |
State variables: th1, th2, p1, p2
Properties¶
Lyapunov spectrum
TODO — lyapunov_spectrum failed: AttributeError
Kaplan–Yorke dimension
TODO — requires a numeric Lyapunov spectrum
Divergence ∇·f
n/a — too large to display — pathological rational divergence
Equilibria
108 equilibria
0 stable · 108 unstable
0 stable · 108 unstable
Use it in TSDynamics¶
import tsdynamics as ts
system = ts.systems.DoublePendulum()
traj = system.run(final_time=100.0, dt=0.01)
ts.plot(traj)
spectrum = ts.analysis.lyapunov_spectrum(system)
ts.analysis.kaplan_yorke_dimension(spectrum)
Reference¶
Marion (1965), Classical Dynamics of Particles and Systems, Academic Press
doi:10.1016/c2013-0-12598-6