# Inverted Point Mass Equations of Motion

## Problem Description

Say we are given an inverted point mass on a cart as shown above. The mass of the cart is $m_{c}$. The mass of the point at the end of the rod is $m_{p}$. The rod is length $l$, rigid, and massless. And external force $F$ is applied in the positive $x$ 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

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 $a_{p}$ is the pendulum acceleration. First we look in horizontal direction.

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

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.

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 $x$. 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.

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.

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,y$ coordinates. This centripetal acceleration can be easily changed back to the $\Theta$ coordinates with simple trigonometry.

These new coordinates can be transformed in terms of $\Theta$ through the use of some simple trigonometry. If you are confused recall that $\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.

We can take this new expression for $a_{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.

Now look at the vertical.

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

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

And we have our first equation of motion.

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

This can be substituted into the cart equation to eliminate $T$.

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

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

### Lagrangian

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

Each $q_{i}$ is a coordinate of the system which in this case corresponds with $q_{1}=x$ and $q_{2} = \Theta$. The Lagrangian, $L$, is given by the following.

Where $T$ is the kinetic energy of the system and $V$ 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.

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.

Therefore the total Lagrangian can be expressed as follows.

Now we only need to solve the Lagrange equations for each of the two coordinates, $x$ 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 $x$ coordinate.

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

$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.

$\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}$

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