Вы находитесь на странице: 1из 22

Dynamic Simulation:

Lagrangian Multipliers

Objective

 The objective of this module is to introduce Lagrangian multipliers


that are used with Lagrange’s equation to find the equations that
control the motion of mechanical systems having constraints.

 The matrix form of the equations used by computer programs such as


Autodesk Inventor’s Dynamic Simulation are also presented.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Basic Problem in Multi-body Dynamics Module 7 – Lagrangian Multipliers


Page 2

In the previous module (Module 6) Lagrange’s Equation


we developed Lagrange’s equation
and showed how it could be used to d  L  L
   0
determine the equations of simple dt  qi  qi
motion systems.

The examples we considered were for systems in which there


were no constraints between the generalized coordinates.

The basic problem of multi-body dynamics is to systematically find


and solve the equations of motion when there are constraints that
bodies in the system must satisfy.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Non-conservative Forces Module 7 – Lagrangian Multipliers


Page 3

 The derivation of Lagrange’s equation in the previous module (Module


6) considered only processes that store and release potential energy.
 These processes are called conservative because they conserve energy.
 Lagrange’s equation must be modified to accommodate non-
conservative processes that dissipate energy (i.e. friction, damping, and
external forces).
 A non-conservative force or moment acting on generalized coordinate
qi is denoted as Qi.
 The more general form of Lagrange’s equation is

d  L  L
    Qi
dt  qi  qi

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Simple Pendulum Module 7 – Lagrangian Multipliers
Page 4

 The pendulum shown in the


Simple
figure will be used as an Pendulum
example throughout this
module.
Y

 The position of the pendulum y x


is known at any instance of Ycg
θ
c.g.
time if the coordinates of the
c.g., Xcg,Ycg, and the angle q
are known.
X
 Xcg,Ycg and q are the Xcg
generalized coordinates.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Module 7 – Lagrangian Multipliers
Kinetic and Potential Energies
Page 5

The kinetic energy (T) and potential


Y
energy (V) of the pendulum are
y x
1 2 1  2 1
T  Iq  mX cg  mYcg
2
Ycg
θ
2 2 2 c.g.
V  mgYcg

These equations also give the


kinetic and potential energy of the X
unconstrained body flying through Xcg
the air.
Unconstrained
There needs to be a way to include Body
the constraints to differentiate
between the two systems.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Constraint Equations Module 7 – Lagrangian Multipliers
Page 6

 In addition to satisfying
Lagrange’s equations of motion, Y X1,Y1
the pendulum must satisfy the y x
constraints that the Ycg
θ
displacements at X1 and Y1 are c.g.
zero.

 The constraint equations are X



X cg  sin q  X 1  0 Xcg
2
 The c.g. lies on the y-
Ycg  cos q  Y1  0
2 axis halfway along the
length  .

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Lagrangian Multipliers Module 7 – Lagrangian Multipliers
Page 7

 The kinetic energy is augmented by Y1


adding the constraint equations X1
Y
multiplied by parameters called
Lagrangian Multipliers.

 Note that since the constraint


equations are equal to zero, we have
not changed the magnitude of the θ
kinetic energy. X
1 2 1  2 1  2
T Iq  mX cg  mYcg
 The Lagrangian multipliers are 2 2 2
treated like unknown generalized   
 l1  X cg  sin q  X 1 
coordinates.  2 
  
 l2  Ycg  cos q  y1 
What are the units of l1 and l2?  2 

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Governing Equations
Module 7 – Lagrangian Multipliers
Page 8

 In the following slides, Lagrange’s


equation will be used in a systematic Lagrange’s Equation
manner to determine the equations of
motion for the pendulum. d  L  L
    Qi
dt  qi  qi
 The governing equations that will be
used are shown here. Lagrangian
n
 There are no non-conservative forces
L   Ti  Vi
acting on the system ( Qi  0 ). i 1

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Equation for 1st Generalized Coordinate Module 7 – Lagrangian Multipliers
Page 9

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Lagrange’s Equation Mathematical Steps


d  L  L L
 mX cg
    Qi q1
dt  qi  qi
d  L 
Generalized Coordinates    mXcg
dt  q1 
q1  X cg L
 l1
q1
q2  Ycg
1st Equation
q3  q
q4  l1 mXcg  l1  0
q5  l2
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Equation for 2nd Generalized Coordinate Module 7 – Lagrangian Multipliers
Page 10

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Lagrange’s Equation Mathematical Steps


d  L  L L
    Qi  mYcg
q 2
dt  qi  qi
d  L 
   mYcg
Generalized Coordinates dt  q 2 
q1  X cg L
 l2  mg
q2
q2  Ycg
2nd Equation
q3  q
q4  l1 mYcg  l2  mg  0
q5  l2
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Equation for 3rd Generalized Coordinate Module 7 – Lagrangian Multipliers


Page 11

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Lagrange’s Equation Mathematical Steps


d  L  L L
    Iq
 Qi q3
dt  qi  qi
d  L 
   Iq
Generalized Coordinates dt  q3 
q1  X cg L  
 l1 cos q  l2 sin q
q3 2 2
q2  Ycg
3rd Equation
q3  q
 
q4  l1 
Iq  l1 cos q  l2 sin q  0
2 2
q5  l2
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Equation for 4th Generalized Coordinate Module 7 – Lagrangian Multipliers
Page 12

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Lagrange’s Equation Mathematical Steps


d  L  L L
    Qi 0
dt  qi  qi q 4
d  L 
Generalized Coordinates    0
dt  q 4 
q1  X cg L 
 X cg  sin q  X 1
q2  Ycg q4 2
4th Equation
q3  q

q4  l1 X cg  sin q  X 1  0
2
q5  l2
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Equation for 5th Generalized Coordinate Module 7 – Lagrangian Multipliers


Page 13

1 2 1  2 1  2      
L  Iq  mX cg  mYcg  l1  X cg  sin q  X 1   l2  Ycg  cos q  Y1   mgYcg
2 2 2  2   2 

Lagrange’s Equation Mathematical Steps


d  L  L L
0
    Qi q5
dt  qi  qi
d  L 
   0
Generalized Coordinates dt  q5 
q1  X cg L 
 Ycg  cos q  Y1
q5 2
q2  Ycg
5th Equation
q3  q

q4  l1 Ycg  cos q  Y1  0
2
q5  l2
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Summary of Equations Module 7 – Lagrangian Multipliers
Page 14

 There are five unknown generalized


coordinates including the two
mXcg  l1  0
Lagrangian Multipliers. There are
also five equations. mYcg  l2  mg  0
 Three of the equations are   
Iq  l1 cos q  l2 sin q  0
differential equations. 2 2


 Two of the equations are algebraic X cg  sin q  X 1  0
2
equations.

Ycg  cos q  Y1  0
 Combined, they are a system of 2
differential-algebraic equations
(DAE).

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Free Body Diagram Approach Module 7 – Lagrangian Multipliers
Page 15
Summation of Forces in the X-direction

mXcg  l1  0
λ2
Summation of Forces in the Y-direction

mYcg  l2  mg  0 λ1

 mY
Summation of Moments about the c.g. cos q q 2 cg
2
mX cg
  

Iq  l1 cos q  l2 sin q  0 sin q
2 2 2 Iθcg

The application of Lagrange’s mg


equation yields the same
equations obtained by drawing a Free Body Diagram with
free-body diagram. Inertial Forces

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Module 7 – Lagrangian Multipliers
Physical Significance of Lagrangian Multipliers
Page 16

Newton’s 2nd Law in x-direction

mXcg  l1  0
Force required to impose
the constraint that X1 is a
constant.

Lagrangian Multipliers are simply the forces (moments) required to


enforce the constraints. In general, the Lagrangian Multipliers are a
function of time, because the forces (moments) required to enforce
the constraints vary with time (i.e. depend on the position of the
pendulum).

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation
Matrix Format Module 7 – Lagrangian Multipliers
Page 17

 The computer implementation of Lagrange’s equation is


facilitated by writing the equations in matrix format.

 Separating the Lagrangian into kinetic and potential


energy terms enables Lagrange’s equation to be written as

d  T  T V
    Qi 
dt  qi  qi qi

 In this format, the conservative and non-conservative


forces are lumped together on the right hand side of the
equation.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Matrix Format Module 7 – Lagrangian Multipliers


Page 18

The kinetic energy augmented with Lagrangian Multipliers can be


written in matrix format as
T  q M q l  q, t 
1 T T
 
2

q Column array containing generalized coordinate


velocities.
Inertia Matrix
q, t  Column array containing the constraint equations m A 0 0 0
(refer to Module 3 in this section).  
mA
M    0 0 0
I cgA 0 
l Column array containing the Lagrangian multipliers. 
0
 0
0
0 0 

M  Matrix containing the mass and mass moments of


inertia associated with each generalized coordinate.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Matrix Format Module 7 – Lagrangian Multipliers


Page 19

Lagrange’s equation for a mechanical system becomes

  i 
M q l    Q T

 q j 
  i 
  Is the constraint equation Jacobian matrix introduced in Module 4
 q j  in this section.

Q Column array containing both conservative and non-conservative


forces.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Matrix Format Module 7 – Lagrangian Multipliers


Page 20

 Another equation for acceleration Matrix Form of Equations


was obtained in Module 4 based   i 
M 
on kinematics and the constraint q j   q Q 
     
equations.   i 0  l    
 q j 
 
  i 
 q   
 q j   This equation can be solved
to find the accelerations
and constraint forces at an
 Combining this equation with instant in time.
Lagrange’s equation from the
previous slide yields:  The accelerations must
then be integrated to find
the velocities and positions.
Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Solution of Differential-Algebraic Section 4 – Dynamic Simulation
Module 7 – Lagrangian Multipliers
Equations (DAE)
Page 21

 The solution of even the simplest system of DAE requires


computer programs that employ predictor-corrector type
numerical integrators.

 The Adams-Moulton method is an example of the type of


numerical method used.

 Significant research has led to the development of efficient and


robust integrators that are found in commercial computer
programs that generate, assemble, and solve these equations.

 Autodesk Inventor’s Dynamic Simulation environment is an


example of such software.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community
Section 4 – Dynamic Simulation

Module Summary Module 7 – Lagrangian Multipliers


Page 22

 This module showed how Lagrangian Multipliers are used in


conjunction with Lagrange’s equation to obtain the equations that
control the motion of mechanical systems.

 The method presented provides a systematic method that forms the


basis of mechanical simulation programs such as Autodesk Inventor’s
Dynamic Simulation environment.

 The matrix format of the equations were presented to provide insight


into the computations performed by computer software.

 The Jacobian and constraint kinematics developed in Module 4 of this


section are an important part of the matrix formulation.

Freely licensed for use by educational institutions. Reuse and changes require a note indicating
© 2011 Autodesk
that content has been modified from the original, and must attribute source content to Autodesk. www.autodesk.com/edcommunity
Education Community

Вам также может понравиться