Lagrangian mechanics can be used to extract the equations of motion for this system with two degrees of freedom:
, the angular displacement of the pendulum rod from the vertical,
, the angular displacement of the frame around its axis.
The Lagrangian of the system is the difference between its total kinetic and potential energies:
are the masses of the frame rods, the pendulum bob, and the pendulum rod, respectively,
is the length of pendulum rod, and
is the distance from the frame rods to the axis of the frame.
The equations of motion can be derived from the Euler–Lagrange equations
, resulting in:
is the driving torque of the motor at the base of the frame. Friction between the frame and its axis and the pendulum and its suspension is neglected.
See also a similar, real physical pendulum constructed at SPENDULAB at Rice University .
 A. Ertas and S. Garza, "Experimental Investigation of Dynamics and Bifurcations of an Impacting Spherical Pendulum," Experimental Mechanics
(5), 2009 pp. 653–662.