HOME

PDF (letter size)

Finding equations of motion for pendulum on moving cart

Nasser M. Abbasi

January 28, 2024   Compiled on January 28, 2024 at 8:29pm  [public]

Contents

1 Introduction
2 Newton’s Method
2.1 FBD for cart
2.2 FBD for pendulum
3 Lagrange (Energy) method

1 Introduction

This report shows how to determine the equations of motion for a rigid bar pendulum (also called a physical pendulum) on a moving cart as shown in the following diagram. This is done using both Newton’s method and the energy (Lagrangian) method.

It is useful to solve the same problem whenever possible using both methods as this helps verify the results and also adds more understanding to the physics involved.

There are two degrees of freedom. The x coordinate and the θ coordinate. Hence there are two equations of motion, one for each coordinate.

2 Newton’s Method

The first step is to make a free body diagram (FBD). One for the cart and one for the physical pendulum and equate each FBD to the kinematics diagrams in order to write down the equations of motion.

2.1 FBD for cart

Equation of motion along the positive x direction is(1)kxcx˙+F+Px=Mx¨ Equation of motion along positive y is not needed since cart does not move in the vertical direction.  We see that to find the equation of motion for x¨ we just need to determine Px, since that is the only unknown in (1). Px will be found from the physical pendulum equation as is shown below.

2.2 FBD for pendulum

We see now that the equation of motion along the positive x is(2)Px=mx¨+mL2θ¨cosθmL2θ˙2sinθ This gives the Px term needed. Substituting (2) into (1) giveskxcx˙+F(mx¨+mL2θ¨cosθmL2θ˙2sinθ)=Mx¨kxcx˙+FmL2θ¨cosθ+mL2θ˙2sinθ=x¨(M+m)

Hence(3)x¨(M+m)+cx˙+kx+mL2(θ¨cosθθ˙2sinθ)=F The above is the equation of motion for x¨.

To find the equation of motion for θ¨ we apply τ=Icgθ¨, (equivalent to F=ma for linear motion) where τ is the torque.

When taking moments to find the torque, we should always take moments around the center of mass of the rotating body, even though the pendulum is hinged at one of its ends and it is actually rotating about that hinge ofcourse. If we take moments around the hinge instead of center of mass, then we need to account for the inertia forces due to motion of cart around center of mass of the rigid pendulum which complicates the equations. By taking moments around center of mass, these forces do not account, since their moments is now zero. Using counter clock wise as positive gives

Notice the minus sign on Icgθ¨. This is because we choose the pendulum to be rotating clockwise which is negative. Therefore τ=Icgθ¨ is PyL2sinθPxL2cosθ=Icgθ¨(4)PyL2sinθPxL2cosθ=112mL2θ¨

We already know Px from Eq. (2). We know need to find Py. This is found from resolving forces in the vertical direction for the pendulum free body diagram. ThereforePymg=mL2θ˙2cosθmL2θ¨sinθ(5)py=mL2θ˙2cosθ+mL2θ¨sinθmg

Plugging (2) and (5) into (4) to eliminate Px,Py, then Eq. (4) simplifies to(mL2θ˙2cosθ+mL2θ¨sinθmg)L2sinθ+(mx¨+mL2θ¨cosθmL2θ˙2sinθ)L2cosθ=112mL2θ¨mL24θ˙2cosθsinθ+mL24θ¨sin2θmgL2sinθ+mx¨L2cosθ+mL24θ¨cos2θmL24θ˙2sinθcosθ=112mL2θ¨mgL2sinθ+mL24θ¨sin2θ+mx¨L2cosθ+mL24θ¨cos2θ=112mL2θ¨mgL2sinθ+mx¨L2cosθ+mL24θ¨=112mL2θ¨gsinθ+x¨cosθ=23Lθ¨

Therefore(6)θ¨=32(gsinθx¨cosθL) The above is the required equation of motion for θ¨. Equations (3,6) are coupled and have to be solved numerically since they are nonlinear. Another option is to use small angle approximation to linearize them in order to simplify these two equations and to solve them analytically.

3 Lagrange (Energy) method

The first step in using Lagrange method is to make a velocity diagram to each object. These diagrams are given below

From the velocity diagram above we see that the kinetic energy of the system is(7)T=12Mx˙2+12mv2+12Icgθ˙2 Where 12Mx˙2 is K.E. of the cart due to its linear motion, and 12mv2 is K.E. of physical pendulum due to its translation linear motion of its center of mass, and 12Icgθ˙2 is K.E. of physical pendulum due to its rotational motion. Now the velocity v of the center of mass of the physical pendulum is determinedv2=vx2+vy2vx2=(x˙+L2θ˙cosθ)2vy2=(L2θ˙sinθ)2

Therefore the K.E. from (7) becomesT=12Mx˙2cart K.E.+12m((x˙+L2θ˙cosθ)2+(L2θ˙sinθ)2)translation K.E. of physical pendulum+12(112mL2)θ˙2rotation K.E.=12Mx˙2+12m(x˙2+L24θ˙2cos2θ+x˙Lθ˙cosθ+L24θ˙2sin2θ)+124mL2θ˙2=12x˙2(M+m)+12m(L24θ˙2+x˙Lθ˙cosθ)+124mL2θ˙2=12x˙2(M+m)+mL28θ˙2+12mx˙Lθ˙cosθ+124mL2θ˙2=12x˙2(M+m)+12mx˙Lθ˙cosθ+16mL2θ˙2

Taking zero potential energy V as the horizontal level where the pendulum is attached to the cart, then P.E. comes from only spring extension and the change of vertical position of center of mass of pendulum. Hence P.E. isV=mgL2cosθ+12kx2 The Lagrangian Γ becomesΓ=TV=12x˙2(M+m)+12mx˙Lθ˙cosθ+16mL2θ˙2T(mgL2cosθ+12kx2)V

There are two degrees of freedom: x and θ. The generalized force in x direction is Qx=Fcx˙ and the generalized force for θ is Qθ=0. Equation of motions are now found. For x ddtΓx˙Γx=Qxddt(x˙(M+m)+12mLθ˙cosθ)+kx=F(t)cx˙x¨(M+m)+12mLθ¨cosθ12mLθ˙2sinθ+kx=F(t)cx˙x¨(M+m)+cx˙+kx+12mLθ¨cosθ12mLθ˙2sinθ=F(t)

Thereforex¨(M+m)+cx˙+kx+mL2(θ¨cosθθ˙2sinθ)=F(t) Which is the same result as Newton method found above in Eq. (3). Equation of motion for θ is ddtΓθ˙Γθ=0 ButΓθ˙=12mx˙Lcosθ+13mL2θ˙Γθ=12mx˙Lθ˙sinθ+mgL2sinθ

Hence  ddtΓθ˙Γθ=0 becomesddt(12mx˙Lcosθ+13mL2θ˙)(12mx˙Lθ˙sinθ+mgL2sinθ)=0ddt(12mx˙Lcosθ+13mL2θ˙)+12mx˙Lθ˙cosθmgL2sinθ=012mLx¨cosθ12mLx˙θ˙sinθ+13θ¨mL2+12mx˙Lθ˙cosθmgL2sinθ=012mLx¨sinθ+13θ¨mL2mgL2sinθ=0x¨sinθ+23θ¨Lgsinθ=0

Thereforeθ¨=32(gsinθx¨sinθL) Which is the same equation of motion in Eq. (6) above given by Newton’s method.