Someone posted a question on reddit, asking for the equations of motion for a complicated mechanical system:
At the time of writing, no one actually answered the question and the comments are just variations on "it's ugly and not solvable in closed form". In practice, it's not that ugly after all, and practically no mechanical systems are solvable in closed form, but that doesn't stop us from accurately simulating the system's behavior.
So, in this document, we'll walk through the classical mechanics of how to derive and simulate this system by briefly reviewing the fundamentals of classical mechanic and working up to actual system of interest, one feature at a time.
Classical Mechanics Review
The main idea of Lagrangian mechanics is to derive the equations of motion indirectly, by first thinking about the kinetic energy, and potential energy, of a system. The advantage here is that many systems (like the one we're studying here) would be practically impossible to analyze with Newtonian mechanics. As my classical mechanics professor used to say, someone trying to describe these kinds of systems in the Newtonian way would experience "an algebraic death"!
For coordinates , the Lagrangian is , and the motion makes the action stationary, which gives
Every system below has and . Then
so the equations of motion are
Each stage therefore only needs and .
The rocking-arc pendulum, one body at a time
1. The rocking arc
Start simple by just analyzing how the large arc rocks back and forth.
We assume it rolls on the ground without slipping, and as it does, its potential energy is given by the height of its center of mass:
where . The kinetic energy for this system depends on the arc's own moment of inertia about its center,
but also has a parallel axis theorem contribution from the fact that it's not rotating about that point. When rolling, the arc instantaneously rotates about the contact point , so its effective moment of inertia is . With and, by the law of cosines in the triangle –– (, , angle between them),
so
which, after differentiation gives us the equation of motion
2. Adding the rolling disk
The disk center is with . No slip at the inner contact gives the spin .
The potential contribution of this disk is simple, we just need to add a contribution proportional to its center of mass vertical coordinate:
The kinetic contribution has terms due to its own the translational and rotational energy, as well as a term from the coupling of its position to the rocking arc.
Those two contributions update our equations of motion, giving us a new effective mass matrix
3. Adding the hinged pendulum
The bobs hang from a frictionless hinge at : . With and :
With ,
4. Adding the springs
The side springs run from to shell points , where is a rotation; the center spring runs from to . Their lengths are
and with rest lengths , (unstretched at ),
Just for fun, we also plot the sum of the different kinetic and potential energy terms for the ball, arc, pendulum and springs to verify that the total energy is conserved.