Ouro
  • Docs
  • Blog
Join for freeSign in
  • Teams
  • Search
Assets
  • Quests
  • Posts
  • APIs
  • Data
  • Teams
  • Search
Assets
  • Quests
  • Posts
  • APIs
  • Data
2mo
117 views

On this page

  • Double Pendulum
    • 2. The Physics & Math
    • 3. Things to Try in the Simulation
    • 4. Why It’s Cool
Loading compatible actions...

Double Pendulum

A double pendulum is just two pendulums attached end-to-end — but this simple setup hides a treasure chest of chaotic motion.

Interactive Double Pendulum Simulation

.html file

Interactive double pendulum demo: explore chaos theory, adjust parameters, and see how tiny changes lead to unpredictable motion.

2mo
  • The first pendulum swings freely from a pivot.

  • The second pendulum hangs from the end of the first.

  • When you start them swinging, the motion quickly becomes unpredictable — tiny differences in starting conditions can lead to vastly different results.
    This is a textbook example of deterministic chaos: the system follows the laws of physics exactly, but predicting it for long periods is nearly impossible without extreme precision.


2. The Physics & Math

We’ll assume:

  • m1,m2m_1, m_2m1​,m2​ = masses of the first and second pendulum bobs

  • l1,l2l_1, l_2l1​,l2​ = lengths of the first and second rods

  • θ1,θ2\theta_1, \theta_2θ1​,θ2​ = angles from vertical

  • ggg = acceleration due to gravity

The dynamics are derived from Lagrangian mechanics, which considers the difference between kinetic and potential energy:

Kinetic Energy:

T=12m1v12+12m2v22T = \frac{1}{2} m_1 v_1^2 + \frac{1}{2} m_2 v_2^2T=21​m1​v12​+21​m2​v22​

with v1,v2v_1, v_2v1​,v2​ from rotational motion.

Potential Energy:

V=−m1gl1cos⁡θ1−m2g(l1cos⁡θ1+l2cos⁡θ2)V = -m_1 g l_1 \cos\theta_1 - m_2 g \left( l_1 \cos\theta_1 + l_2 \cos\theta_2 \right)V=−m1​gl1​cosθ1​−m2​g(l1​cosθ1​+l2​cosθ2​)

The Lagrangian is:

L=T−VL = T - VL=T−V

Applying the Euler–Lagrange equations yields the coupled nonlinear ODEs:

θ¨1=−g(2m1+m2)sin⁡θ1−m2gsin⁡(θ1−2θ2)−2sin⁡(θ1−θ2)m2(θ˙22l2+θ˙12l1cos⁡(θ1−θ2))l1[2m1+m2−m2cos⁡(2θ1−2θ2)]\ddot{\theta}_1 = \frac{-g (2 m_1 + m_2) \sin\theta_1 - m_2 g \sin(\theta_1 - 2\theta_2) - 2 \sin(\theta_1 - \theta_2) m_2 \left( \dot{\theta}_2^2 l_2 + \dot{\theta}_1^2 l_1 \cos(\theta_1 - \theta_2) \right)} {l_1 \left[ 2 m_1 + m_2 - m_2 \cos\left( 2\theta_1 - 2\theta_2 \right) \right]}θ¨1​=l1​[2m1​+m2​−m2​cos(2θ1​−2θ2​)]−g(2m1​+m2​)sinθ1​−m2​gsin(θ1​−2θ2​)−2sin(θ1​−θ2​)m2​(θ˙22​l2​+θ˙12​l1​cos(θ1​−θ2​))​θ¨2=2sin⁡(θ1−θ2)[θ˙12l1(m1+m2)+g(m1+m2)cos⁡θ1+θ˙22l2m2cos⁡(θ1−θ2)]l2[2m1+m2−m2cos⁡(2θ1−2θ2)]\ddot{\theta}_2 = \frac{ 2 \sin(\theta_1 - \theta_2) \left[ \dot{\theta}_1^2 l_1 (m_1 + m_2) + g (m_1 + m_2) \cos\theta_1 + \dot{\theta}_2^2 l_2 m_2 \cos(\theta_1 - \theta_2) \right]} {l_2 \left[ 2 m_1 + m_2 - m_2 \cos\left( 2\theta_1 - 2\theta_2 \right) \right]}θ¨2​=l2​[2m1​+m2​−m2​cos(2θ1​−2θ2​)]2sin(θ1​−θ2​)[θ˙12​l1​(m1​+m2​)+g(m1​+m2​)cosθ1​+θ˙22​l2​m2​cos(θ1​−θ2​)]​

That’s the complete set of equations — they’re messy, but they describe every twist and turn.


3. Things to Try in the Simulation

Initial Conditions:

  • Start both pendulums in the same direction and give them a gentle nudge.

  • Start one pendulum vertical and the other horizontal — watch how energy transfers.

  • Change the starting angles by just 0.001 radians — observe how quickly they diverge.

Parameters:

  • Change m1m_1m1​ or m2m_2m2​ — heavier lower mass often makes motion wilder.

  • Try different rod lengths l1,l2l_1, l_2l1​,l2​ — longer rods swing slower.

  • Set gravity to lower values — you can simulate “Moon pendulums.”

Energy Checks:

  • Track total energy E=T+VE = T + VE=T+V to see if your simulation conserves energy.


4. Why It’s Cool

  • Chaos in action: The double pendulum is a beautiful intro to chaotic dynamics.

  • Physics + math synergy: Lagrangian mechanics is more elegant than Newton’s laws here.

  • Practical applications: Understanding coupled oscillators shows up in robotics, structural engineering, and even molecular vibrations.

Loading comments...