Inverted Point Mass Equations of Motion

2023/11/10 7:11 AM PST

Table of Contents

Problem Description

Pendulum On A Cart

Say we are given an inverted point mass on a cart as shown above. The mass of the cart is mcm_{c}. The mass of the point at the end of the rod is mpm_{p}. The rod is length ll, rigid, and massless. And external force FF is applied in the positive xx direction. The system coordinates are shown. We wish to find the equations of motion describing this system. There are two commonly used approaches: Newtonian Mechanics and Lagrangian Mechanics.

Note: This problem is different from an inverted pendulum in that it does not consider the mass or moment of inertia of the rod. The approach for an inverted pendulum is very similar.

Newtonian

Pendulum FBD Cart FBD

Newtonian mechanics is all about summing the forces acting on an object. Therefore we need to make two free body diagrams (FBDs). One for the point mass and one for the cart.

Now we can apply Newton's second law to the point mass. Here apa_{p} is the pendulum acceleration. First we look in horizontal direction.

Fı^=mpap,ı^Tsin(Θ)=mpap,ı^ \begin{align} \sum F_{\hat{\imath}} &= m_{p}a_{p,\hat{\imath}}\\\\ T\sin(\Theta) &= m_{p}a_{p,\hat{\imath}} \end{align}

Now we can look at the vertical direction on the pendulum.

Fȷ^=mpap,ȷ^Tcos(Θ)mpg=mpap,ȷ^ \begin{aligned} \sum F_{\hat{\jmath}} &= m_{p}a_{p,\hat{\jmath}}\\\\ -T\cos(\Theta) - m_{p}g &= m_{p}a_{p,\hat{\jmath}} \end{aligned}

We can also do an analysis on the cart. Because the cart is constrained to move in the horizontal direction, no useful information is gained from summing the vertical forces. Therefore we will only do an analysis on the horizontal forces.

Fı^=mcac,ı^Tsin(Θ)+F=mcx¨ \begin{aligned} \sum F_{\hat{\imath}} &= m_{c}a_{c,\hat{\imath}}\\\\ -T\sin(\Theta) + F &= m_{c}\ddot{x} \end{aligned}

Now we have equations describing the motion of the cart and pendulum. However the equations are not written in terms of the system states, Θ\Theta and xx. Recall from physics that the acceleration of a point can be written in terms of relative acceleration. That is, the acceleration of the pendulum can be written as the acceleration of the cart plus the acceleration of the pendulum relative to the cart.

ap=ac+ap/c a_{p} = a_{c} + a_{p/c}

Now recall that the pendulum is fixed to the cart by a rigid rod. Therefore the pendulum can only move in a perfect circle around the cart as shown below.

Pendulum Motion

Now we can write the acceleration of the pendulum relative to the cart in terms of the tangential and centripetal accelerations. Here is a link to the Wikipedia page showing how the this relates to normal x,yx,y coordinates. This centripetal acceleration can be easily changed back to the Θ\Theta coordinates with simple trigonometry.

ap=ac+ap/cap=x¨ı^+[lΘ¨e^ΘlΘ˙2e^r] \begin{aligned} a_{p} &= a_{c} + a_{p/c}\\\\ a_{p} &= \ddot{x}\hat{\imath} + [l\ddot{\Theta}\hat{e}_{\Theta} - l \dot{\Theta}^{2}\hat{e}_{r}] \end{aligned}

These new coordinates can be transformed in terms of Θ\Theta through the use of some simple trigonometry. If you are confused recall that e^r\hat{e}_{r} is the same as the with the line drawn from the pivot on the cart to the point mass and that unit vectors have length 1. The above equation can be rewritten as the following.

ap=ac+ap/cap=x¨ı^+[lΘ¨e^ΘlΘ˙2e^r]ap=x¨ı^+lΘ¨(cos(Θ)ı^sin(Θ)ȷ^)lΘ˙2(sin(Θ)ı^+cos(Θ)ȷ^) \begin{aligned} a_{p} &= a_{c} + a_{p/c}\\\\ a_{p} &= \ddot{x}\hat{\imath} + [l\ddot{\Theta}\hat{e}_{\Theta} - l\dot{\Theta}^{2}\hat{e}_{r}] \\\\ a_{p} &= \ddot{x}\hat{\imath} + l\ddot{\Theta}(-\cos(\Theta)\hat{\imath} - \sin(\Theta)\hat{\jmath}) - l\dot{\Theta}^{2}(-\sin(\Theta)\hat{\imath} + \cos(\Theta)\hat{\jmath}) \end{aligned}

We can take this new expression for apa_{p} and substitute it into our equations for the horizontal and vertical forces on the pendulum. Note that we only add the ı^\hat{\imath} to the horizontal equations and only add the ȷ^\hat{\jmath} terms to the vertical equations.

First look at the horizontal.

Tsin(Θ)=mpap,ı^Tsin(Θ)=mp[x¨lΘ¨cos(Θ)+lΘ˙2sin(Θ)] \begin{aligned} T\sin(\Theta) &= m_{p}a_{p,\hat{\imath}}\\\\ T\sin(\Theta) &= m_{p}[\ddot{x} - l\ddot{\Theta}\cos(\Theta) + l\dot{\Theta}^{2}\sin(\Theta)] \end{aligned}

Now look at the vertical.

Tcos(Θ)mpg=mpap,ȷ^Tcos(Θ)mpg=mp[lΘ¨sin(Θ)lΘ˙2cos(Θ)] \begin{aligned} -T\cos(\Theta) - m_{p}g &= m_{p}a_{p,\hat{\jmath}}\\\\ -T\cos(\Theta) - m_{p}g &= m_{p}[-l\ddot{\Theta}\sin(\Theta) - l\dot{\Theta}^{2}\cos(\Theta)] \end{aligned}

Now we have everything written in terms of Θ\Theta and xx. However we have two system states and three unknown quantities: xx, Θ\Theta, and TT. This means we can reduce the number of equations we have. We will eliminate T because it isn't a system state.

Eliminating TT from the two pendulum equations is done with an addition trick. See the steps below.

cos(Θ)[Fı^=mpap,ı^]+sin(Θ)[Fȷ^=mpap,ȷ^] \begin{aligned} \cos(\Theta)[\sum F_{\hat{\imath}} &= m_{p}a_{p,\hat{\imath}}]\\\\ +\sin(\Theta)[\sum F_{\hat{\jmath}} &= m_{p}a_{p,\hat{\jmath}}] \end{aligned}

Tsin(Θ)cos(Θ)Tsin(Θ)cos(Θ)mpgsin(Θ)=mpx¨cos(Θ)mplΘ¨cos2(Θ)+mplΘ˙2sin(Θ)cos(Θ)mplΘ¨sin2(Θ)mplΘ˙2cos(Θ)sin(Θ) \begin{aligned} T\sin(\Theta)\cos(\Theta) - T\sin(\Theta)\cos(\Theta) &- m_{p}g\sin(\Theta) \\\\ &= m_{p}\ddot{x}\cos(\Theta) - m_{p}l\ddot{\Theta}\cos^{2}(\Theta) \\\\ &+ m_{p}l\dot{\Theta}^{2}\sin(\Theta)\cos(\Theta) \\\\ &- m_{p}l\ddot{\Theta}\sin^{2}(\Theta) \\\\ &- m_{p}l\dot{\Theta}^{2}\cos(\Theta)\sin(\Theta)\\\\ \end{aligned}

mpgsin(Θ)=mpx¨cos(Θ)mplΘ¨gsin(Θ)=x¨cos(Θ)lΘ¨ \begin{aligned} -m_{p}g\sin(\Theta) &= m_{p}\ddot{x}\cos(\Theta) - m_{p}l\ddot{\Theta}\\\\ g\sin(\Theta) &= \ddot{x}\cos(\Theta) - l\ddot{\Theta}\\\\ \end{aligned}

lΘ¨x¨cos(Θ)gsin(Θ)=0 l\ddot{\Theta} - \ddot{x}\cos(\Theta) - g\sin(\Theta) = 0

And we have our first equation of motion.

Now we have to eliminate TT from the cart equation. Luckily we already have an expression for Tsin(Θ)T\sin(\Theta) that we found while rewriting Newton's second law for the pendulum. Recall.

Tsin(Θ)=mp[x¨lΘ¨cos(Θ)+lΘ˙2sin(Θ)] T\sin(\Theta) = m_{p}[\ddot{x} - l\ddot{\Theta}\cos(\Theta) + l\dot{\Theta}^{2}\sin(\Theta)]

This can be substituted into the cart equation to eliminate TT.

Fı^=mcac,ı^Tsin(Θ)+F=mcx¨mp[x¨lΘ¨cos(Θ)+lΘ˙2sin(Θ)]+F=mcx¨ \begin{aligned} \sum F_{\hat{\imath}} &= m_{c}a_{c,\hat{\imath}}\\\\ -T\sin(\Theta) + F &= m_{c}\ddot{x}\\\\ -m_{p}[\ddot{x} - l\ddot{\Theta}\cos(\Theta) + l\dot{\Theta}^{2}\sin(\Theta)] + F &= m_{c}\ddot{x}\\\\ \end{aligned}

Which after some rearranging can be made to look like the following.

x¨(mc+mp)mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)=F \ddot{x}(m_{c} + m_{p}) - m_{p}l\ddot{\Theta}\cos(\Theta) + m_{p}l\dot{\Theta}^{2}\sin(\Theta) = F

So our two equation of motion for this system are as follows.

x¨(mc+mp)mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)=F \begin{equation} \ddot{x}(m_{c} + m_{p}) - m_{p}l\ddot{\Theta}\cos(\Theta) + m_{p}l\dot{\Theta}^{2}\sin(\Theta) = F \end{equation}

lΘ¨x¨cos(Θ)gsin(Θ)=0 \begin{equation} l\ddot{\Theta} - \ddot{x}\cos(\Theta) - g\sin(\Theta) = 0 \end{equation}

Lagrangian

Similar to the Newtonian F=maF=ma, the fundamental equations in Lagrangian mechanics are the Lagrange equations.

ddtLqi˙Lqi=Qi \frac{d}{dt}\frac{\partial L}{\partial \dot{q_{i}}} - \frac{\partial L}{\partial q_{i}} = Q_{i}

Each qiq_{i} is a coordinate of the system which in this case corresponds with q1=xq_{1}=x and q2=Θq_{2} = \Theta. The Lagrangian, LL, is given by the following.

L=TV L = T - V

Where TT is the kinetic energy of the system and VV is the potential energy of the system.

Because the cart is constrained to move only in the x direction there is no potential energy in the system due to the cart. The potential energy is given by the location of the point mass at the end of the rod.

V=mpgh=mpglcos(Θ) V = m_{p}gh = m_{p}gl\cos(\Theta)

The kinetic energy is a little more complicated because the cart does contribute to the total kinetic energy. Therefore the kinetic energy is given by the following.

T=Tc+TpT=12mcx˙2+12mpvp2T=12mcx˙2+12mp(vp,x2+vp,y2) By The Pythagorean TheoremT=12mcx˙2+12mp[(x˙lΘ˙cos(Θ))2+(lΘ˙sin(Θ))2]T=12mcx˙2+12mp[x˙22lx˙Θ˙cos(Θ)+l2Θ˙2cos2(Θ)+l2Θ˙2sin2(Θ)]T=12x˙2(mc+mp)+12mp[2lx˙Θ˙cos(Θ)+l2Θ˙2]T=12x˙2(mc+mp)mplx˙Θ˙cos(Θ)+12mpl2Θ˙2 \begin{aligned} T &= T_{c} + T_{p}\\\\ T &= \frac{1}{2}m_{c}\dot{x}^{2} + \frac{1}{2}m_{p}v_{p}^{2}\\\\ T &= \frac{1}{2}m_{c}\dot{x}^{2} + \frac{1}{2}m_{p}(v_{p,x}^{2} + v_{p,y}^{2})\text{ By The Pythagorean Theorem}\\\\ T &= \frac{1}{2}m_{c}\dot{x}^{2} + \frac{1}{2}m_{p}[(\dot{x}-l\dot{\Theta}\cos(\Theta))^{2} + (-l\dot{\Theta}\sin(\Theta))^{2}]\\\\ T &= \frac{1}{2}m_{c}\dot{x}^{2} +\frac{1}{2}m_{p}[\dot{x}^{2} - 2l\dot{x}\dot{\Theta}\cos(\Theta) + l^{2}\dot{\Theta}^{2}\cos^{2}(\Theta) + l^{2}\dot{\Theta}^{2}\sin^{2}(\Theta)]\\\\ T &= \frac{1}{2}\dot{x}^{2}(m_{c} + m_{p}) + \frac{1}{2}m_{p}[-2l\dot{x}\dot{\Theta}\cos(\Theta) + l^{2}\dot{\Theta}^{2}]\\\\ T &= \frac{1}{2}\dot{x}^{2}(m_{c} + m_{p}) - m_{p}l\dot{x}\dot{\Theta}\cos(\Theta) + \frac{1}{2}m_{p}l^{2}\dot{\Theta}^{2} \end{aligned}

Therefore the total Lagrangian can be expressed as follows.

L=TVL=(12x˙2(mc+mp)mplx˙Θ˙cos(Θ)+12mpl2Θ˙2)(mpglcos(Θ)) \begin{aligned} L &= T - V\\\\ L &= (\frac{1}{2}\dot{x}^{2}(m_{c} + m_{p}) - m_{p}l\dot{x}\dot{\Theta}\cos(\Theta) + \frac{1}{2}m_{p}l^{2}\dot{\Theta}^{2}) - (m_{p}gl\cos(\Theta)) \end{aligned}

Now we only need to solve the Lagrange equations for each of the two coordinates, xx and Θ\Theta. We will end up with two equations of motion, which is what we should expect for a system with two degrees of freedom. The first is the equation for the xx coordinate.

F=ddtLx˙LxF=ddt(x˙(mc+mp)mplΘ˙cos(Θ))(0)F=x¨(mc+mp)mplΘ¨cos(Θ)+mplΘ˙2sin(Θ) \begin{aligned} F &= \frac{d}{dt}\frac{\partial L}{\partial \dot{x}} - \frac{\partial L}{\partial x}\\\\ F &= \frac{d}{dt}(\dot{x}(m_{c} + m_{p}) - m_{p}l\dot{\Theta}\cos(\Theta)) - (0) \\\\ F &= \ddot{x}(m_{c} + m_{p}) - m_{p}l\ddot{\Theta}\cos(\Theta) + m_{p}l\dot{\Theta}^{2}\sin(\Theta) \end{aligned}

Now we can do it again with the Θ\Theta coordinate.

ddtLx˙Lx=0 \frac{d}{dt}\frac{\partial L}{\partial \dot{x}} - \frac{\partial L}{\partial x} = 0

ddt(mplx˙cos(Θ)+mpl2Θ˙)(mplx˙Θ˙sin(Θ)+mpglsin(Θ))=0 \frac{d}{dt}(-m_{p}l\dot{x}\cos(\Theta) + m_{p}l^{2}\dot{\Theta}) - (m_{p}l\dot{x}\dot{\Theta}\sin(\Theta) + m_{p}gl\sin(\Theta)) = 0

mplx¨cos(Θ)+mplx˙Θ˙sin(Θ)+mpl2Θ¨(mplx˙Θ˙sin(Θ)+mpglsin(Θ))=0 -m_{p}l\ddot{x}\cos(\Theta) + m_{p}l\dot{x}\dot{\Theta}\sin(\Theta) + m_{p}l^{2}\ddot{\Theta} - (m_{p}l\dot{x}\dot{\Theta}\sin(\Theta) + m_{p}gl\sin(\Theta)) = 0

lΘ¨x¨cos(Θ)gsin(Θ)=0 l\ddot{\Theta} - \ddot{x}\cos(\Theta) - g\sin(\Theta) = 0

So our two equations of motion are written below. You can see the match the ones found for the Newtonian formulation exactly. This is what we should expect as they describe the same system.

x¨(mc+mp)mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)=F \begin{equation} \ddot{x}(m_{c} + m_{p}) - m_{p}l\ddot{\Theta}\cos(\Theta) + m_{p}l\dot{\Theta}^{2}\sin(\Theta) = F \end{equation}

lΘ¨x¨cos(Θ)gsin(Θ)=0 \begin{equation} l\ddot{\Theta} - \ddot{x}\cos(\Theta) - g\sin(\Theta) = 0 \end{equation}

There was a problem communicating with the server.

Please check your network connection and try again later.