Table of Contents
Problem Description
Say we are given an inverted point mass on a cart as shown above.
The mass of the cart is mc.
The mass of the point at the end of the rod is mp.
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 ap is the pendulum acceleration.
First we look in horizontal direction.
∑F^Tsin(Θ)=mpap,^=mpap,^
Now we can look at the vertical direction on the pendulum.
∑F^−Tcos(Θ)−mpg=mpap,^=mpap,^
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^−Tsin(Θ)+F=mcac,^=mcx¨
Now we have equations describing the motion of the cart and pendulum.
However the equations are not written in terms of the system states, Θ 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.
ap=ac+ap/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.
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 Θ coordinates with simple trigonometry.
apap=ac+ap/c=x¨^+[lΘ¨e^Θ−lΘ˙2e^r]
These new coordinates can be transformed in terms of Θ through the use of some simple trigonometry.
If you are confused recall that 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.
apapap=ac+ap/c=x¨^+[lΘ¨e^Θ−lΘ˙2e^r]=x¨^+lΘ¨(−cos(Θ)^−sin(Θ)^)−lΘ˙2(−sin(Θ)^+cos(Θ)^)
We can take this new expression for ap and substitute it into our equations for the horizontal and vertical forces on the pendulum.
Note that we only add the ^ to the horizontal equations and only add the ^ terms to the vertical equations.
First look at the horizontal.
Tsin(Θ)Tsin(Θ)=mpap,^=mp[x¨−lΘ¨cos(Θ)+lΘ˙2sin(Θ)]
Now look at the vertical.
−Tcos(Θ)−mpg−Tcos(Θ)−mpg=mpap,^=mp[−lΘ¨sin(Θ)−lΘ˙2cos(Θ)]
Now we have everything written in terms of Θ and x.
However we have two system states and three unknown quantities: x, Θ, 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.
cos(Θ)[∑F^+sin(Θ)[∑F^=mpap,^]=mpap,^]
Tsin(Θ)cos(Θ)−Tsin(Θ)cos(Θ)−mpgsin(Θ)=mpx¨cos(Θ)−mplΘ¨cos2(Θ)+mplΘ˙2sin(Θ)cos(Θ)−mplΘ¨sin2(Θ)−mplΘ˙2cos(Θ)sin(Θ)
−mpgsin(Θ)gsin(Θ)=mpx¨cos(Θ)−mplΘ¨=x¨cos(Θ)−lΘ¨
lΘ¨−x¨cos(Θ)−gsin(Θ)=0
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 Tsin(Θ) that we found while rewriting Newton's second law for the pendulum.
Recall.
Tsin(Θ)=mp[x¨−lΘ¨cos(Θ)+lΘ˙2sin(Θ)]
This can be substituted into the cart equation to eliminate T.
∑F^−Tsin(Θ)+F−mp[x¨−lΘ¨cos(Θ)+lΘ˙2sin(Θ)]+F=mcac,^=mcx¨=mcx¨
Which after some rearranging can be made to look like the following.
x¨(mc+mp)−mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)=F
So our two equation of motion for this system are as follows.
x¨(mc+mp)−mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)=F
lΘ¨−x¨cos(Θ)−gsin(Θ)=0
Lagrangian
Similar to the Newtonian F=ma, the fundamental equations in Lagrangian mechanics are the Lagrange equations.
dtd∂qi˙∂L−∂qi∂L=Qi
Each qi is a coordinate of the system which in this case corresponds with q1=x and q2=Θ.
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.
V=mpgh=mpglcos(Θ)
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.
TTTTTTT=Tc+Tp=21mcx˙2+21mpvp2=21mcx˙2+21mp(vp,x2+vp,y2) By The Pythagorean Theorem=21mcx˙2+21mp[(x˙−lΘ˙cos(Θ))2+(−lΘ˙sin(Θ))2]=21mcx˙2+21mp[x˙2−2lx˙Θ˙cos(Θ)+l2Θ˙2cos2(Θ)+l2Θ˙2sin2(Θ)]=21x˙2(mc+mp)+21mp[−2lx˙Θ˙cos(Θ)+l2Θ˙2]=21x˙2(mc+mp)−mplx˙Θ˙cos(Θ)+21mpl2Θ˙2
Therefore the total Lagrangian can be expressed as follows.
LL=T−V=(21x˙2(mc+mp)−mplx˙Θ˙cos(Θ)+21mpl2Θ˙2)−(mpglcos(Θ))
Now we only need to solve the Lagrange equations for each of the two coordinates, x and Θ.
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.
FFF=dtd∂x˙∂L−∂x∂L=dtd(x˙(mc+mp)−mplΘ˙cos(Θ))−(0)=x¨(mc+mp)−mplΘ¨cos(Θ)+mplΘ˙2sin(Θ)
Now we can do it again with the Θ coordinate.
dtd∂x˙∂L−∂x∂L=0
dtd(−mplx˙cos(Θ)+mpl2Θ˙)−(mplx˙Θ˙sin(Θ)+mpglsin(Θ))=0
−mplx¨cos(Θ)+mplx˙Θ˙sin(Θ)+mpl2Θ¨−(mplx˙Θ˙sin(Θ)+mpglsin(Θ))=0
lΘ¨−x¨cos(Θ)−gsin(Θ)=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
lΘ¨−x¨cos(Θ)−gsin(Θ)=0