/Double_Pendulum

Lagrangian derivation of double pendulum equations of motion

Primary LanguageJupyter NotebookMIT LicenseMIT

Double Pendulum Equations of Motion

Lagrangian Formulation


img

The above figure shows simple pendulum suspended from another simple pendulum by a frictionless hinge.

  • Both pendulums move in the same plane.
  • In this system, the rods $OP_1$ and $P_1P_2$ are rigid, massless and inextensible.
  • The system has two degrees of freedom and is uniquely determined by the values of $\theta_1$ and $\theta_2$

We solve the Euler-Lagrange equations for $\textbf{q} = [\theta_1, \theta_2]$ such that,

$$ \frac{\text{d}}{\text{d}t}\left(\frac{\partial L}{\partial \dot{\textbf{q}}}\right)-\frac{\partial L}{\partial \textbf{q}}=0 $$

The result is a system of $|\textbf{q}|$ coupled, second-order differential equations


The equations are uncoupled by letting $\omega_i = \frac{\text{d}}{\text{d} t}\theta_i$

So $\omega_i$ for $i=1,2$ represents the angular velocity with $\frac{\text{d}}{\text{d} t}\omega_i \equiv \frac{\text{d}^2}{\text{d} t^2}\theta_i$


Systems illustrating periodic/chaotic behaviour are explored.

The gif below shows chaotic motion with release from rest for large initial angles $[\theta_1=-105 \degree, \theta_2=105 \degree]$

img


The rods $OP_1$ and $P_1P_2$ are now modeled as rigid and inextensible with uniformly distributed mass, $M_1$ and $M_2$. This significantly influences the pendulum dynamics.

The gif below shows release from rest for large initial angles $[\theta_1=-105 \degree, \theta_2=105 \degree]$ as above.

In this simulation, the only difference is the mass distribution - uniform along the length;

  • $M_1=M_2=1\text{kg}$
  • $l_1=l_2=1\text{m}$

img


  • The utilities in this file abstract the complex symbolic derivation tasks.
  • This file defines the DoublePendulum class, encapsulating all aspects of a double pendulum simulation within an object-oriented framework.
  • The class allows for the selection of simple or compound pendulum models

Update 13/01/2024: Dash App deployed

www.double-pendulum.net


Next steps

  • Dynamically creating the trace plot on the animation
    • The method I tried was computational expensive - need workaround
    • Non-functioning work-in-progress code
  • Quantifying chaotic behaviour.
    • This will enable me to choose better example and better quantify the range of dynamics

Licence: MIT Pineapple Bois