<<

Introduction to

Lagrange’s Equations

Siamak G. Faal 1/1 07/29/2016

1

Dynamic equations: • Provide a relation between forces and system accelerations

• Explain rigid body motion and trajectories

Image sources (left to right): https://www.etsy.com/listing/96803935/funnel-shaped-spinning-top-natural-wood https://spaceflightnow.com/2016/06/30/juno-switched-to-autopilot-mode-for-jupiter-final-approach/ https://upload.wikimedia.org/wikipedia/commons/d/d8/NASA_Mars_Rover.jpg 2 http://www.popularmechanics.com/cars/a14665/why-car-suspensions-are-better-than-ever/ Kinematics vs Kinetics

Kinematics Kinetics

Focuses on pure motion of Relationship between the particles and bodies (without motion of bodies and forces considering masses and and torques forces)

Image sources (left to right): https://www.youtube.com/watch?v=PAHjo4DXOjc 3 http://www.timelinecoverbanner.com/facebook-covers/billiard.jpg Dynamic Forces and Reactions

Dynamic analysis are essential to determine reaction forces that are cussed by dynamic forces (e.g. Accelerations)

Image sources (left to right): http://r.hswstatic.com/w_404/gif/worlds-greatest-roller-coasters-149508746.jpg http://www.murraymitchell.com/wp-content/uploads/2011/04/red_aircraft_performing_aerobatics.jpg 4 Differential provide a set of differential equations which allow modeling, simulation and control of dynamic mechanical systems

Why humanoid robots do not walk or act like humans !?

5 Background Information

6 Notations

Throughout this presentation: Parameters Definitions • Vectors are noted with overlines: subscript G The quantity related to (e.g. ) center of mass • The first derivative with respect to𝑎𝑎� Linear velocity 𝑎𝑎𝐺𝐺 Angular velocity time: = 𝑣𝑣 𝑑𝑑𝑑𝑑 Linear Acceleration 𝑥𝑥̇ 𝑑𝑑𝑑𝑑 𝜔𝜔 • The second derivative with respect to Resultant force vector 𝑎𝑎 Gravitational acceleration time: = Σ𝐹𝐹� 2 𝑑𝑑 𝑥𝑥 Generalized coordinate 2 𝑔𝑔 𝑥𝑥̈ 𝑑𝑑𝑡𝑡 𝑞𝑞

7 Time Derivative of a Vector

Time derivative of a vector in rotating coordinate frame is:

= + × 𝑑𝑑 𝐴𝐴 𝐴𝐴̇𝑟𝑟𝑟𝑟𝑟𝑟 𝜔𝜔 𝐴𝐴 𝑑𝑑𝑑𝑑 Angular velocity of the Relative rate of change of frame the vector

𝐴𝐴 𝜔𝜔

8 Newtonian Dynamics

Newton laws of motion:

I. The velocity of a particle can be changed by the application of a force

II. The resultant force is proportional to the acceleration of particle with the factor of mass =

Σ𝐹𝐹� 𝑚𝑚𝑎𝑎� III. The forces acting on a body result from an interaction with another body. The action and reaction forces have the same magnitude, the same line of action but opposite directions

9 Newtonian Equations of Motion

For each rigid body: Linear momentum of the center of mass: = = 𝑝𝑝̅𝐺𝐺 𝑚𝑚𝑣𝑣̅𝐺𝐺 𝑑𝑑 Σ𝐹𝐹� 𝑝𝑝𝐺𝐺̅ = /𝑑𝑑𝑑𝑑× +

Σ𝑀𝑀�𝐴𝐴 𝑚𝑚𝑟𝑟𝐺𝐺̅ 𝐴𝐴 𝑎𝑎�𝐴𝐴 𝐻𝐻�̇𝐴𝐴 Time derivative of the angular momentum of Vector from arbitrary point the object about point A A to G (center of mass) Acceleration of the = + × arbitrary point A 𝐻𝐻�̇𝐴𝐴 𝐼𝐼𝐴𝐴𝜔𝜔�̇ 𝜔𝜔� 𝐼𝐼𝐴𝐴𝜔𝜔� 10 Newtonian Equations of Motion

A simplified form of the equations are achieved by considering the following assumptions:

. Mass of the object is constant . Moment equations are calculated at the center of mass

=

=Σ𝐹𝐹� 𝑚𝑚+𝑎𝑎�𝐺𝐺 × Σ𝑀𝑀�𝐺𝐺 𝐼𝐼𝐺𝐺𝜔𝜔�̇ 𝜔𝜔� 𝐼𝐼𝜔𝜔�

11 Energy

Kinetic energy of a rigid body: 1 1 = , + , 2 2 𝐺𝐺 𝐺𝐺 Potential energy of an object𝑇𝑇 with𝑚𝑚 𝑣𝑣 mass𝑣𝑣 located𝜔𝜔 𝐼𝐼𝐼𝐼 at altitude due to gravity: 𝑚𝑚 ℎ =

Potential energy stored in an spring𝑉𝑉 with𝑚𝑚𝑚𝑚� stiffness :

1 𝑘𝑘 = 2 𝑉𝑉 𝑘𝑘Δ𝑥𝑥 12 Degrees of Freedom

The number of independent parameters that define system configuration

𝜃𝜃 In 3D space 𝜓𝜓 In planar motion

A free object has A free object has 𝜙𝜙 6 3 𝑦𝑦 𝜃𝜃 𝑦𝑦 𝑧𝑧 DOF DOF

𝑥𝑥 𝑥𝑥 13 Mechanical Joints

Revolute joint Planar joint Adds 5 constraints Adds 3 constraints  Relative DOF: 1  Relative DOF: 3

Cylindrical joint Prismatic joint Spherical joint Adds 4 constraints Adds 5 constraints Adds 3 constraints   Relative DOF: 2  Relative DOF: 1 Relative DOF: 3 14

A set of geometrical parameters which uniquely defines the position / configuration of the system

The minimum number of generalized coordinates that required to specify the position of the system is equal to the number of DOF of the system (unconstrained or independent coordinates)

Generalized coordinates do not form a unique set!

Generalized coordinates are commonly notes with

𝑞𝑞 15 Generalized Coordinates

Q) What can be a set of generalized coordinates for a simple rod in on a plane.

A) 𝑦𝑦 𝐵𝐵

𝐴𝐴 𝑦𝑦 𝐿𝐿 𝜃𝜃 𝐴𝐴 𝑥𝑥𝐴𝐴 𝑥𝑥 16 𝑂𝑂 Generalized Coordinates

Q) Can you think about any other generalized coordinates set for the same system?

A) 𝑦𝑦 𝐵𝐵 𝑦𝑦 𝐵𝐵 𝜃𝜃 𝐿𝐿 𝑥𝑥𝐵𝐵 𝐴𝐴

𝑥𝑥 17 𝑂𝑂 Generalized Coordinates

Q) How about another one?

A)

𝑦𝑦 This is an 𝐵𝐵 ambiguous set of coordinates! 𝐴𝐴 𝑦𝑦 𝐿𝐿 𝑥𝑥𝐵𝐵 𝐴𝐴 𝑥𝑥𝐴𝐴 𝑥𝑥 18 𝑂𝑂 Generalized Coordinates

Here we have more coordinates than the digress Q) Let’s do one more of freedom of the system, Thus the coordinates can not have any arbitrary value and they need to satisfy two constrain equations:

= cos A) = sin 𝑥𝑥𝐵𝐵 − 𝑥𝑥𝐴𝐴 𝐿𝐿 𝜃𝜃 𝑦𝑦𝐵𝐵 − 𝑦𝑦𝐴𝐴 𝐿𝐿 𝜃𝜃 𝑦𝑦 𝐵𝐵 𝑦𝑦 𝐵𝐵

𝐴𝐴 𝑦𝑦 𝐿𝐿 𝜃𝜃 𝑥𝑥𝐵𝐵 𝐴𝐴 𝑥𝑥𝐴𝐴 𝑥𝑥 19 𝑂𝑂 Constraints

Any generalized coordinate which can not have any arbitrary value is a constrained coordinate

Relation between constrained generalized coordinates is called constraint equation

: Number of constraint equations

𝑀𝑀 − 𝑁𝑁 Number of constrained Number of degrees generalized coordinates of freedom 20 Virtual Displacement

In a virtual movement, the 𝑞𝑞3 generalized coordinates of the system are considered to be incremented by infinitesimal amount from the values they have at an δ𝑟𝑟̂ arbitraryδ𝑞𝑞𝑗𝑗 instant, with time held constant.

= 𝑀𝑀 𝑞𝑞2

δ𝑟𝑟̂ � δ𝑞𝑞𝑗𝑗𝑒𝑒𝑗𝑗̂ 𝑗𝑗=1 𝑞𝑞1 21 Virtual Displacement

Example: A 𝑥𝑥 B

Generalized coordinate:

𝑥𝑥 𝑙𝑙 C 𝑙𝑙 Q) What are the virtual displacements of pin F and virtual rotation of bar 𝑙𝑙 𝑙𝑙 EF resulting from D E δ𝑥𝑥

𝑙𝑙 F 22 Virtual Displacement

Solution: A 𝑥𝑥 B 𝑥𝑥 = cos 𝜃𝜃 𝜃𝜃 −1 𝑥𝑥 𝜃𝜃 3 𝑙𝑙 C 𝑙𝑙 = +2𝑙𝑙 4 / / 2 2 𝑥𝑥 2 2 1 2 𝑟𝑟𝐹𝐹̅ 𝐴𝐴 𝚤𝚤̅ 𝑙𝑙 − 𝑥𝑥 𝚥𝚥̅ 𝑙𝑙 𝑙𝑙 D E = cos = 4 / 𝑑𝑑 −1 𝑥𝑥 δ𝑥𝑥 δ𝜃𝜃 δ𝑥𝑥 − 2 2 1 2 𝑑𝑑𝑑𝑑 2𝑙𝑙 1 𝑙𝑙 − 𝑥𝑥 = = / / 2 2 4 / 𝑑𝑑 3𝑥𝑥 δ𝑟𝑟𝐹𝐹̅ 𝐴𝐴 𝑟𝑟𝐹𝐹̅ 𝐴𝐴 δ𝑥𝑥 𝚤𝚤̅ − 2 2 1 2 𝚥𝚥̅ 𝛿𝛿𝛿𝛿 𝑙𝑙 𝑑𝑑𝑑𝑑 𝑙𝑙 − 𝑥𝑥 F 23

𝑦𝑦 Virtual Work

When a particle is given a virtual displacement , the forces acting on the particle do virtual work δ𝑟𝑟̅ δ𝑊𝑊

Since is infinitesimal, is infinitesimal as well

δ𝑟𝑟̅ δ𝑊𝑊

Because the change is virtual, time is held constant at an arbitrary value

The virtual work done by constraint or internal forces is zero!

24 Generalized Forces

=

δ𝑊𝑊 � 𝐹𝐹� ⋅ δ𝑟𝑟̅ = 𝑀𝑀 𝜕𝜕𝑟𝑟̅ � 𝑗𝑗 → δ𝑊𝑊 � 𝐹𝐹 ⋅ � 𝑗𝑗 δ𝑞𝑞 𝑗𝑗=1 𝜕𝜕𝑞𝑞

= 𝑀𝑀 𝜕𝜕𝑟𝑟̅ � 𝑗𝑗 δ𝑊𝑊 � � 𝐹𝐹 ⋅ 𝑗𝑗 δ𝑞𝑞 𝑗𝑗=1 𝜕𝜕𝑞𝑞 Generalized force

25 𝑄𝑄𝑗𝑗 Joseph-Louis Lagrange 25 January 1736 – 10 April 1813, Italian Enlightenment Era mathematician and astronomer. Lagrange made significant contributions to the fields of analysis, number theory, and both classical and celestial mechanics.

Lagrange’s Equations

26 Lagrange’s Equations of Motion

+ = , = 1, 2, … , 𝑑𝑑 𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕 𝜕𝜕𝜕𝜕 − 𝑄𝑄𝑗𝑗 𝑗𝑗 𝑀𝑀 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗 Alternative (common) form:

=

ℒ 𝑇𝑇 − 𝑉𝑉 = , = 1, 2, … , 𝑑𝑑 𝜕𝜕ℒ 𝜕𝜕ℒ − 𝑄𝑄𝑗𝑗 𝑗𝑗 𝑀𝑀 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗

27 Lagrange’s Equations of Motion

. Directly provides the differential equations of motion without any need for solving a system of equations.

. Provides a much easier method to solve multi-body systems

. It is very systematic and can be used to automatically generate differential equations of motion for different systems (As long as the derivatives are computed correctly)

28 Example 1

Find differential equations of motion for the following system using both Newtonian mechanics and Lagrange’s equations

𝑥𝑥 𝑘𝑘 𝑚𝑚

29 Example 1 Newtonian approach:

Spring force is equal to: =

𝑠𝑠 0 𝑥𝑥 Assume = 0 𝐹𝐹 −𝑘𝑘 𝑥𝑥 − 𝑥𝑥 𝑘𝑘 𝑚𝑚 𝑥𝑥0 =

𝑠𝑠 Newton’s second law for→ 𝐹𝐹 x-axis:−𝑘𝑘𝑘𝑘 Free-body diagram: =

Since the only force appliedΣ𝐹𝐹 to𝑚𝑚 the𝑥𝑥̈ system is the spring 𝑥𝑥 force: 𝑠𝑠 = = 𝐹𝐹 𝑚𝑚

𝑠𝑠 So the differential equationΣ𝐹𝐹 𝐹𝐹 of motion−𝑘𝑘𝑘𝑘 for the system is: + = 0 30 𝑥𝑥̈ 𝑘𝑘𝑘𝑘 Example 1 Lagrangian approach:

The kinetic energy of the system is: = 1 2 𝑥𝑥 𝑇𝑇 2 𝑚𝑚𝑥𝑥̇ 𝑘𝑘 The potential energy of the system is: = 𝑚𝑚 1 2 𝑉𝑉 2 𝑘𝑘𝑥𝑥 Since there is no force acting on the system, the generalized Calculations: force is zero: = 0

Lagrangian of𝑄𝑄 the system is: = 𝜕𝜕ℒ 1 1 𝑚𝑚𝑥𝑥̇ = 𝜕𝜕𝑞𝑞̇ 2 2 = 2 2 ℒ 𝑚𝑚𝑥𝑥̇ − 𝑘𝑘𝑥𝑥 𝑑𝑑 𝜕𝜕ℒ Thus, the differential equation of motion is: 𝑚𝑚𝑥𝑥̈ 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇ = = 0 = 0 𝜕𝜕ℒ −𝑘𝑘𝑘𝑘 𝑑𝑑 𝜕𝜕ℒ 𝜕𝜕ℒ 𝜕𝜕𝑞𝑞 − → 𝑚𝑚𝑥𝑥̈ − 𝑘𝑘𝑘𝑘 31 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗 Example 2

Find differential equations of motion for the following system using both Newtonian mechanics and Lagrange’s equations

𝑥𝑥 𝑘𝑘 𝑚𝑚 𝑢𝑢

32 Example 2 Newtonian approach:

Spring force is equal to: = 𝑥𝑥 𝑠𝑠 0 Assume = 0 𝐹𝐹 −𝑘𝑘 𝑥𝑥 − 𝑥𝑥 𝑘𝑘 𝑚𝑚 𝑢𝑢 𝑥𝑥0 = → 𝐹𝐹𝑠𝑠 −𝑘𝑘𝑘𝑘 Newton’s second law for x-axis: Free-body diagram: =

The summation of forcesΣ𝐹𝐹 along𝑚𝑚 x𝑥𝑥̈ axis is: 𝑥𝑥 = 𝐹𝐹𝑠𝑠 𝑚𝑚 𝑢𝑢 So the differential equationΣ𝐹𝐹 of𝑢𝑢 −motion𝑘𝑘𝑘𝑘 for the system is: + =

𝑥𝑥̈ 𝑘𝑘𝑘𝑘 𝑢𝑢 33 Example 2 Lagrangian approach:

The kinetic energy of the system is: = 1 2 𝑥𝑥 𝑇𝑇 2 𝑚𝑚𝑥𝑥̇ The potential energy of the system is: = 𝑘𝑘 1 2 𝑚𝑚 𝑉𝑉 2 𝑘𝑘𝑥𝑥 The generalized force acting on the system is: Calculations: = = 𝜕𝜕𝑟𝑟̅ 𝜕𝜕𝜕𝜕 Σ𝐹𝐹� ⋅ 𝑢𝑢 ⋅ 𝑢𝑢 = 𝜕𝜕𝑞𝑞𝑗𝑗 𝜕𝜕𝜕𝜕 Lagrangian of the system is: 𝜕𝜕ℒ 𝑚𝑚𝑥𝑥̇ 1 1 𝜕𝜕𝑞𝑞̇ = 2 2 = 2 2 𝑑𝑑 𝜕𝜕ℒ ℒ 𝑚𝑚𝑥𝑥̇ − 𝑘𝑘𝑥𝑥 𝑚𝑚𝑥𝑥̈ Thus, the differential equation of motion is: 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇ = = + = 𝜕𝜕ℒ −𝑘𝑘𝑘𝑘 𝑑𝑑 𝜕𝜕ℒ 𝜕𝜕ℒ 𝜕𝜕𝑞𝑞 − 𝑢𝑢 → 𝑚𝑚𝑥𝑥̈ 𝑘𝑘𝑘𝑘 𝑢𝑢 34 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗 Example 3

Find differential equations of motion for the following system using both Newtonian mechanics and Lagrange’s equations

𝑦𝑦 𝑙𝑙 , 𝑔𝑔 𝜏𝜏 𝑚𝑚 𝐼𝐼 𝜃𝜃 𝑥𝑥

35 Example 3 Newtonian approach: 𝑙𝑙 𝑦𝑦 , Moment of inertia of a rod: 𝑔𝑔 1 1 𝜏𝜏 𝑚𝑚 𝐼𝐼 3 12 𝜃𝜃 2 2 𝑚𝑚𝑙𝑙 𝑚𝑚𝑙𝑙 𝑥𝑥 Free-body diagram:

Moment equation around point O gives us: 𝑦𝑦 𝑚𝑚𝑚𝑚

1 2 = cos 𝑙𝑙 3 2 𝐹𝐹𝑦𝑦 2 𝑙𝑙 𝑚𝑚𝑙𝑙 𝜃𝜃̈ 𝜏𝜏 − 𝑚𝑚𝑚𝑚 𝜃𝜃 𝜃𝜃 𝑥𝑥 36 𝑂𝑂 𝐹𝐹𝑥𝑥 Example 3 Lagrangian approach: 𝑙𝑙 Center of mass position in terms of generalized coordinates 𝑦𝑦 , = cos + sin 𝑔𝑔 2 2 𝑚𝑚 𝐼𝐼 𝑙𝑙 𝑙𝑙 𝑐𝑐𝑐𝑐 𝑐𝑐𝑐𝑐̇ =𝑟𝑟̅ sin 𝜃𝜃 𝚤𝚤̅+ cos𝜃𝜃 𝚥𝚥̅ → 𝑟𝑟̅ 𝜃𝜃 2 2 𝑥𝑥 𝑙𝑙 𝑙𝑙 ̇ ̇ The kinetic energy− 𝜃𝜃 of the𝜃𝜃 𝚤𝚤system̅ 𝜃𝜃 is: 𝜃𝜃 𝚥𝚥̅ 1 1 1 1 = , + , = + 2 2 8 24 2 2 2 2 1 𝑐𝑐𝑐𝑐̇ 𝑐𝑐𝑐𝑐̇ ̇ ̇ =𝑇𝑇 𝑚𝑚 𝑟𝑟̅ 𝑟𝑟̅ 𝜔𝜔� 𝐼𝐼𝜔𝜔� 𝑚𝑚𝑙𝑙 𝜃𝜃 𝑚𝑚𝑙𝑙 𝜃𝜃 6 2 2 The potential𝑚𝑚𝑙𝑙 𝜃𝜃̇ energy of the system is:

= = sin 2 𝑙𝑙 𝑉𝑉 𝑚𝑚𝑚𝑚 𝑟𝑟𝑐𝑐𝑐𝑐̅ ⋅ 𝚥𝚥̅ 𝑚𝑚𝑚𝑚 𝜃𝜃

37 Example 3 Lagrangian approach (cont.): 𝑙𝑙 The generalized force is 𝑦𝑦 , 𝑔𝑔 = = = 𝑚𝑚 𝐼𝐼 𝜕𝜕𝑟𝑟̅ 𝜕𝜕𝜕𝜕 𝜃𝜃 � 𝑄𝑄 Σ𝐹𝐹 ⋅ 𝑗𝑗 𝜏𝜏 𝜏𝜏 𝑥𝑥 Lagrangian of the system𝜕𝜕𝑞𝑞 is: 𝜕𝜕𝜕𝜕 Calculations: 1 = + sin 1 6 2 = 2 2 𝑙𝑙 3 ℒ 𝑚𝑚𝑙𝑙 𝜃𝜃̇ 𝑚𝑚𝑚𝑚 𝜃𝜃 𝜕𝜕ℒ 2 Thus, the differential equation of motion is: 𝑚𝑚𝑙𝑙 𝜃𝜃̇ 𝜕𝜕𝑞𝑞̇ 1 = 3 = 𝑑𝑑 𝜕𝜕ℒ 2 𝑚𝑚𝑙𝑙 𝜃𝜃̈ 𝑑𝑑 𝜕𝜕ℒ 𝜕𝜕ℒ 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇ − 𝜏𝜏 = cos 𝑑𝑑𝑑𝑑 𝜕𝜕𝑞𝑞̇𝑗𝑗 𝜕𝜕𝑞𝑞𝑗𝑗 2 1 𝜕𝜕ℒ 𝑙𝑙 cos = 𝑚𝑚𝑚𝑚 𝜃𝜃 3 2 𝜕𝜕𝑞𝑞 2 𝑙𝑙 38 → 𝑚𝑚𝑙𝑙 − 𝑚𝑚𝑚𝑚 𝜃𝜃 𝜏𝜏 References

[1] Ginsberg, Jerry H. Advanced engineering dynamics. Cambridge University Press, 1998. [2] Greenwood, Donald T. Advanced dynamics. Cambridge University Press, 2006.

39