Question 5.18: A Cart–Inverted-Pendulum System (Energy Method) Reconsider t...
A Cart–Inverted-Pendulum System (Energy Method)
Reconsider the mechanical system, as shown in Figure 5.79. Derive the equations of motion of the system by using Lagrange’s equations.

Learn more on how we answer questions.
As shown in Figure 5.88a, the motion of the cart is purely translational and
T_\text{cart} = \frac{1}{2}m\dot{x}^2
The inverted pendulum undergoes both translation and rotation and
T_\text{pendulum} = \frac{1}{2}M\upsilon_C^2 + \frac{1}{2}I_C\dot{θ}^2
where the velocity at the center of mass can be found by
\upsilon_C^2= \left\lgroup \dot{x} + \frac{L}{2}\dot{θ} \text{cos}θ \right\rgroup^2 + \left\lgroup \frac{L}{2}\dot{θ} \text{sin}θ \right\rgroup^2 = \dot{x}^2 + L\dot{x}\dot{θ}\text{cos}θ + \frac{1}{4}L^2 \dot{θ}^2
and the mass moment of inertia I_C = \frac{1}{12} ML^2. Thus, the kinetic energy of the system is
T = T_\text{cart} + T_\text{pendulum} = \frac{1}{2}(m + M)\dot{x}^2 + \frac{1}{6}ML^2 \dot{θ}^2 + \frac{1}{2}ML\dot{x}\dot{θ}\text{cos}θ
Note that no spring elements are involved in the system. This implies that V_e = 0 and V = V_\text{g}. Using the datum defined in Figure 5.88b, we can obtain the gravitational potential energy
V_\text{g} = M\text{g}h = M\text{g}\frac{L}{2}\text{cos}θ
As shown in Figure 5.88c, the system is subjected to a horizontal force f, by which the work done is not zero. Thus, it is a nonconservative system. Same as Example 5.14, the displacement of the cart, x, and the angular displacement of the pendulum, θ, are chosen as the generalized coordinates. We then apply Lagrange’s equations
\frac{d}{dt}\left\lgroup \frac{∂T}{∂\dot{q}_i}\right\rgroup – \frac{∂T}{∂q_i} + \frac{∂V}{∂q_i}=Q_i, i = 1,2
For i = 1, q_1 = x, \dot{q}_1 = \dot{x},
\frac{∂T}{∂\dot{x}} = (m + M)\dot{x} + \frac{1}{2}ML\dot{θ}\text{cos}θ
\frac{d}{dt}\left\lgroup \frac{∂T}{∂\dot{x}}\right\rgroup = (m + M)\ddot{x} + \frac{1}{2}ML\ddot{θ}\text{cos}θ – \frac{1}{2}ML\dot{θ}\text{sin}θ\dot{θ}
\frac{∂T}{∂x} = 0
\frac{∂V}{∂x} = 0
Applying Equation 5.51 gives the generalized force
Q_i = \sum\limits_{j=1}^{N}\mathbf{F}_j \frac{∂\mathbf{r}_j}{∂q_i} j = 1,2,…,N (5.51)
Q_1 = \mathbf{F}\frac{∂\mathbf{r}}{∂x} = (f\mathbf{i})\frac{∂}{∂x}(x\mathbf{i}) = f
Substituting into Lagrange’s equation results in
(m + M)\ddot{x} + \frac{1}{2}ML\ddot{θ}\text{cos}θ – \frac{1}{2}ML\dot{θ}^2\text{sin}θ = f
Similarly, for i = 2, q_2 = θ, \dot{q}_2 = \dot{θ},
\frac{∂T}{∂\dot{θ}} = \frac{1}{3}ML^2\dot{θ} + \frac{1}{2}ML\dot{x}\text{cos}θ
\frac{d}{dt}\left\lgroup \frac{∂T}{∂\dot{θ}}\right\rgroup = \frac{1}{3}ML^2\ddot{θ} + \frac{1}{2}ML\ddot{x}\text{cos}θ – \frac{1}{2}ML\dot{x}\text{sin}θ\dot{θ}
\frac{∂T}{∂θ} = – \frac{1}{2}ML\dot{x}\dot{θ}\text{sin}θ
\frac{∂V}{∂θ} = – \frac{1}{2}M\text{g}L\text{sin}θ
Applying Equation 5.51 gives the generalized force
Q_2 = \mathbf{F}\frac{∂\mathbf{r}}{∂θ} = (f\mathbf{i})\frac{∂}{∂θ}(x\mathbf{i}) = 0
Note that the external force f does not generate a moment on the pendulum. Substituting into Lagrange’s equation gives
\frac{1}{3}ML^2\ddot{θ} + \frac{1}{2}ML\ddot{x}\text{cos}θ – \frac{1}{2}M\text{g}L\text{sin}θ = 0
The result is the same as the one obtained previously in Example 5.14.
