Fundamentals / Mechanical engineering / Machine dynamics

Energy coordinates and Lagrange’s equation

Derive a coupled translation–rotation equation with a rolling constraint and identify which reaction disappears from the energy balance.

From first principles

Derive the equation of motion using one independent coordinate

An ideal geometric constraint ties several motions together. Choose an independent coordinate \(q\) that automatically satisfies it and express kinetic energy \(T(q,\dot q)\) and potential energy \(V(q)\) in that coordinate. In the principle of virtual work, ideal constraint reactions do no work along admissible small motions. The balance of inertial, conservative and applied virtual work gives Lagrange's equation

\[\frac d{dt}\frac{\partial T}{\partial\dot q}-\frac{\partial T}{\partial q}+\frac{\partial V}{\partial q}=Q_{\rm nc},\]
\[\delta W_{\rm nc}=Q_{\rm nc}\,\delta q .\]

For a rigid cylinder rolling on a stationary surface without slip, take centre displacement \(q=x\) and angular speed \(\dot x/R\). Its translation and rotation contribute to kinetic energy; a horizontal spring attached at the centre supplies the potential.

\[T=\tfrac12(m+I_G/R^2)\dot x^2,\]
\[V=\tfrac12kx^2,\qquad (m+I_G/R^2)\ddot x+kx=Q_{\rm nc}.\]

Static friction supplies the contact reaction required for rolling. The contact point has zero instantaneous velocity, so that reaction contributes zero power here. The solution must still demand no more friction than the surface can supply.

Derivation and applications

Derive the effective stiffness of a pendulum on an accelerating cart

A continuously accelerating support changes both the equilibrium direction and the small-oscillation frequency of a hanging load. Model a point mass \(m\) on a massless rigid link of length \(\ell\) with an ideal hinge. Let the support move horizontally with imposed coordinate \(X(t)\) and measure angle \(\theta\) from the downward vertical towards positive horizontal displacement. Ignore drag. With mass coordinates \(x=X+\ell\sin\theta\) and \(y=-\ell\cos\theta\), the kinetic and potential energies are

\[T=\tfrac12m[\dot X^2+2\dot X\ell\dot\theta\cos\theta+\ell^2\dot\theta^2],\]
\[V=-mg\ell\cos\theta .\]

Differentiate \(\partial T/\partial\dot\theta\) with respect to time and subtract \(\partial T/\partial\theta\). The velocity cross terms involving \(\dot X\dot\theta\) cancel, leaving a forcing term set by support acceleration, independent of support speed.

\[\ell\ddot\theta+g\sin\theta+\ddot X\cos\theta=0 .\]

For constant support acceleration \(a\), a stationary angle obeys \(\tan\theta_0=-a/g\). Choose the hanging equilibrium. Expanding the restoring term about \(\theta_0\) gives the effective gravitational acceleration along this new direction and the frequency of small oscillations.

\[\theta=\theta_0+\eta,\]
\[\ddot\eta+\frac{\sqrt{g^2+a^2}}{\ell}\eta=0,\]
\[\omega_n=\sqrt{\frac{\sqrt{g^2+a^2}}{\ell}}.\]

A positive cart acceleration tips the pendulum backwards. The first correction to angle is linear in \(a/g\), while the first relative correction to frequency is quadratic. The exact equilibrium result holds at finite \(a\); the frequency expression requires small oscillations about it.

Worked example

Predict a suspended sensor's direction

A cart accelerates at 3.00 m/s² carrying a pendulum of length 0.600 m. Its steady angle is

\[-\arctan(3.00/9.81)=-17.0^\circ.\]

The effective acceleration is 10.26 m/s², giving \(\omega_n=4.13\) rad/s and period 1.52 s. A sensor that treats the pendulum direction as vertical during this manoeuvre would carry the full angular bias.

Change the inputs and inspect this calculation below

Second application

Infer acceleration from a steady deflection

In another rig a 0.400 m pendulum settles 8.00° backwards after weak damping removes its initial swing. Constant acceleration is

\[9.81\tan8.00^\circ=1.38\,\mathrm{m/s^2}.\]

The effective gravity is \(9.81/\cos8.00^\circ=9.91\) m/s², predicting a small-oscillation period \(2\pi\sqrt{0.400/9.91}=1.26\) s for weak damping. The angle is much more sensitive to modest acceleration than the period.

Interactive calculation · Change the inputs of this example

Use the adjustable quantities to test the two worked calculations above. The plot recomputes this derivation’s balance or constitutive relation; its numerical readout reports the quantities needed for the forward calculation and the inverse or design question. Keep the fixed assumptions stated in the readout when comparing with the example values.

Let geometry remove a reaction

A cylinder rolls along a horizontal rail while a spring attached at its centre pulls it towards equilibrium. The rail friction is essential for rolling, but an ideal contact point is instantaneously at rest and the friction force does no work. One can write separate translational and rotational equations with an unknown friction force. Alternatively choose a coordinate that satisfies rolling from the beginning. The reduced energy then contains the rotational inertia without introducing a contact reaction.

Take the rightward displacement \(x\) of the cylinder centre as independent coordinate and clockwise angle as positive. On the fixed surface the no-slip condition gives \(x=R\theta\), up to a reference offset. A body of total mass \(m\) and centre inertia \(I_G\) has kinetic energy from both translation and rotation. A centre spring with stiffness \(k\) has elastic potential \(kx^2/2\).

\[T=\tfrac12(m+I_G/R^2)\dot x^2,\]
\[V=\tfrac12kx^2 .\]

Connect energy to a dynamical equation

The virtual work of a horizontal force \(F\) applied at the centre is \(F\delta x\). In this coordinate its generalised force is simply \(F\). A torque \(M\) acting clockwise would do \(M\delta\theta=(M/R)\delta x\) and would enter as a force \(M/R\). With a centre damper \(c\), the dissipative force is \(-c\dot x\). Lagrange’s equation for this system becomes

\[\frac{d}{dt}\frac{\partial T}{\partial\dot x}-\frac{\partial T}{\partial x}+\frac{\partial V}{\partial x}=F-c\dot x,\qquad (m+I_G/R^2)\ddot x+c\dot x+kx=F .\]

For coordinates whose inertia depends on position, retain both derivatives involving \(T\). The differentiation of \(\partial T/\partial\dot x\) then generates a term proportional to \(\dot x^2\), part of which cancels \(\partial T/\partial x\). Simply multiplying a configuration-dependent effective mass by acceleration would miss the remaining term.

Predict a frequency and check rolling

A solid cylinder has \(m=8.0\,\mathrm{kg}\), \(R=0.10\,\mathrm m\), and \(I_G=mR^2/2=0.040\,\mathrm{kg\,m^2}\). The effective mass seen by the spring is

\[8+0.040/0.10^2=12.0\,\mathrm{kg}.\]

With \(k=480\,\mathrm{N/m}\) and negligible damping the natural frequency is

\[\sqrt{480/12}/(2\pi)=1.007\,\mathrm{Hz}.\]

Release it from rest at \(x=+0.060\,\mathrm m\). Its initial acceleration is

\[-480(0.060)/12=-2.40\,\mathrm{m/s^2}.\]

Writing only the centre’s translation and ignoring rotation would overpredict the acceleration magnitude.

Reconstruct the previously eliminated contact force from translation. The spring pulls leftwards with 28.8 N and the centre accelerates leftwards with \(m\ddot x=-19.2\,\mathrm N\). Friction must therefore point rightwards with 9.6 N to supply the appropriate angular acceleration. The coefficient of static friction must be at least \(9.6/(8\times9.81)=0.122\) at release. For a smaller coefficient, the assumed rolling constraint fails and the model needs separate rotational and translational coordinates together with a slipping contact law.

Compare two cylinders with identical mass

A thin-walled hoop of the same mass and rolling radius has \(I_G=mR^2\). With the original spring its effective mass doubles the translational mass, giving natural frequency \(\sqrt{480/16}/(2\pi)=0.872\,\mathrm{Hz}\). A no-slip ring-down can therefore distinguish two bodies whose masses and outer dimensions are identical but whose internal mass distributions differ.

Use a cyclic coordinate to reduce coupled motion

Mount a pendulum on a cart that can roll horizontally on a level frictionless guide. Let cart displacement be \(x\), bob angle \(\theta\) from downward vertical, length \(l\), bob mass \(m\) and remaining cart mass \(M\). The bob position is \((x+l\sin\theta,-l\cos\theta)\). Differentiating and squaring its speed gives a cross term \(2l\dot x\dot\theta\cos\theta\) because cart and pendulum velocities need not be perpendicular. The full energy terms are

\[T=\tfrac12(M+m)\dot x^2+ml\cos\theta\,\dot x\dot\theta+\tfrac12ml^2\dot\theta^2,\]
\[V=mgl(1-\cos\theta).\]

Horizontal position itself does not occur in either expression. It is a cyclic coordinate, so \(\partial T/\partial\dot x=(M+m)\dot x+ml\cos\theta\,\dot\theta\) is conserved if no external horizontal force acts. This is horizontal momentum written in generalised coordinates. The pendulum equation from Lagrange’s equation is

\[l\ddot\theta+\ddot x\cos\theta+g\sin\theta=0.\]

For small swings from rest, differentiate the momentum relation and linearise to obtain

\[\ddot x=-ml\ddot\theta/(M+m).\]

Substituting gives

\[[lM/(M+m)]\ddot\theta+g\theta=0.\]

Free horizontal motion makes the small-swing frequency larger than for a clamped cart, by \(\sqrt{(M+m)/M}\). This result reflects motion about the system’s horizontally constrained centre of mass. The extra degree of freedom also permits uniform horizontal translation at zero frequency. Its presence does not imply an additional oscillatory mode.

Predict opposing cart travel in a release test

Let \(M=3.0\) kg, \(m=1.0\) kg and \(l=0.60\) m. Clamp the cart: the oscillation period would be \(2\pi\sqrt{0.60/9.81}=1.55\,\mathrm s\). Release its horizontal guide and the period becomes

\[2\pi\sqrt{0.60(3)/(9.81\times4)}=1.35\,\mathrm s.\]

At release the bob is at \(\theta_0=10^\circ\) and both bodies are at rest. Because horizontal momentum remains zero, integrate the exact relation to obtain

\[(M+m)x+ml\sin\theta=\text{constant}.\]

As the bob first crosses the vertical, the cart has shifted \(ml\sin10^\circ/(M+m)=0.0260\,\mathrm m\) to the right from its starting point.

At the vertical the potential-energy decrease is

\[mgl(1-\cos10^\circ)=0.0894\,\mathrm J.\]

Substituting \(\dot x=-ml\dot\theta/(M+m)\) into the kinetic energy at this instant gives effective angular inertia \(ml^2M/(M+m)=0.270\,\mathrm{kg\,m^2}\). Thus the angular speed magnitude is \(\sqrt{2(0.0894)/0.270}=0.814\,\mathrm{rad/s}\), and the cart speed magnitude is \(0.15(0.814)=0.122\,\mathrm{m/s}\). The frequency estimate used a small-angle approximation; the centre-of-mass and energy results at the vertical used the actual release angle. A horizontal cable pulling on the cart or measurable wheel friction would change the conserved momentum and should be measured before attributing deviations solely to pendulum nonlinearity.

The two-sensor experiment can measure conservation without estimating acceleration. Track the cart position and bob angle from video, then plot \(x+[ml/(M+m)]\sin\theta\). For the chosen masses its value should stay constant at the initial offset despite the cart and pendulum both moving. A steadily sloping line indicates nonzero initial horizontal momentum; a curved departure suggests an external force or tracking bias. This separation is useful because rolling resistance can be weak enough to leave the first measured period nearly unchanged while producing visible drift over several cycles. The conserved combination is specific to the inertial laboratory coordinate, so a camera fixed on the moving cart needs a separate record of cart displacement.