dynamic simulation : lagrangian multipliers

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

Upload: nerys

Post on 22-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

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.

Page 2: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Basic Problem in Multi-body Dynamics

In the previous module (Module 6) we developed Lagrange’s equation and showed how it could be used to determine the equations of simple motion systems.

Lagrange’s Equation

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.

0

ii qL

qL

dtd

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 2

Page 3: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Non-conservative Forces

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

iii

QqL

qL

dtd

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 3

Page 4: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Simple Pendulum

SimplePendulum

c.g.

θ

X

Y

The pendulum shown in the figure will be used as an example throughout this module.

The position of the pendulum is known at any instance of time if the coordinates of the c.g., Xcg,Ycg, and the angle q are known.

Xcg,Ycg and q are the generalized coordinates.

xy

Xcg

Ycg

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 4

Page 5: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Kinetic and Potential Energies

The kinetic energy (T) and potential energy (V) of the pendulum are

These equations also give the kinetic and potential energy of the unconstrained body flying through the air.

There needs to be a way to include the constraints to differentiate between the two systems.

cg

cgcg

mgYV

mYXmIT

222

21

21

21 q

c.g.

θ

X

Y

xy

Xcg

Ycg

Unconstrained Body

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 5

Page 6: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Constraint Equations

In addition to satisfying Lagrange’s equations of motion, the pendulum must satisfy the constraints that the displacements at X1 and Y1 are zero.

The constraint equations are

c.g.

θ

X

Y

xy

Xcg

Ycg

X1,Y1

0cos2

0sin2

1

1

YY

XX

cg

cg

q

q

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 6

The c.g. lies on the y-axis halfway along the length .

Page 7: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Lagrangian Multipliers

X1

Y1

θX

Y

The kinetic energy is augmented by adding the constraint equations 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.

The Lagrangian multipliers are treated like unknown generalized coordinates.

What are the units of l1 and l2?

12

11

222

cos2

sin2

21

21

21

yY

XX

YmXmIT

cg

cg

cgcg

ql

ql

q

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 7

Page 8: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Governing Equations

Lagrange’s Equation

Lagrangian

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 8

iii

QqL

qL

dtd

i

n

ii VTL

1

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

In the following slides, Lagrange’s equation will be used in a systematic manner to determine the equations of motion for the pendulum.

The governing equations that will be used are shown here.

There are no non-conservative forces acting on the system ( ).0iQ

Page 9: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Equation for 1st Generalized CoordinateSection 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 9

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

iii

QqL

qL

dtd

Lagrange’s Equation

Generalized Coordinates

25

14

3

2

1

llq

qqq

Yq

Xq

cg

cg1

1

1

1

l

qL

XmqL

dtd

XmqL

cg

cg

1st Equation

01 lcgXm

Mathematical Steps

Page 10: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Equation for 2nd Generalized CoordinateSection 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 10

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

iii

QqL

qL

dtd

Lagrange’s Equation

Generalized Coordinates

25

14

3

2

1

llq

qqq

Yq

Xq

cg

cg mgqL

YmqL

dtd

YmqL

cg

cg

22

2

2

l

2nd Equation

02 mgYm cg l

Mathematical Steps

Page 11: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Equation for 3rd Generalized Coordinate

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

iii

QqL

qL

dtd

Lagrange’s Equation

Generalized Coordinates

25

14

3

2

1

llq

qqq

Yq

Xq

cg

cg qlql

q

q

sin2

cos2 21

3

3

3

qL

IqL

dtd

IqL

3rd Equation

Mathematical Steps

0sin2

cos2 21 qlqlq I

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 11

Page 12: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Equation for 4th Generalized CoordinateSection 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 12

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

iii

QqL

qL

dtd

Lagrange’s Equation

Generalized Coordinates

25

14

3

2

1

llq

qqq

Yq

Xq

cg

cg1

4

4

4

sin2

0

0

XXqLqL

dtd

qL

cg

q

4th Equation

Mathematical Steps

0sin2 1 XX cg q

Page 13: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Equation for 5th Generalized CoordinateSection 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 13

cgcgcgcgcg mgYYYXXYmXmIL

1211

222 cos2

sin22

121

21 qlqlq

iii

QqL

qL

dtd

Lagrange’s Equation

Generalized Coordinates

25

14

3

2

1

llq

qqq

Yq

Xq

cg

cg 15

5

5

cos2

0

0

YYqL

qL

dtd

qL

cg

q

5th Equation

Mathematical Steps

0cos2 1 YYcg q

Page 14: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Summary of EquationsSection 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 14

01 lcgXm

02 mgYm cg l

0sin2

cos2 21 qlqlq I

0sin2 1 XX cg q

0cos2 1 YYcg q

There are five unknown generalized coordinates including the two Lagrangian Multipliers. There are also five equations.

Three of the equations are differential equations.

Two of the equations are algebraic equations.

Combined, they are a system of differential-algebraic equations (DAE).

Page 15: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Free Body Diagram Approach

cgmX

cgmY

cgIθ

The application of Lagrange’s equation yields the same equations obtained by drawing a free-body diagram.

Free Body Diagram with Inertial Forces

mg

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 15Summation of Forces in the X-direction

Summation of Forces in the Y-direction

Summation of Moments about the c.g.

01 lcgXm

02 mgYm cg l

0sin2

cos2 21 qlqlq I

q 2

qcos2

qsin2

Page 16: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Physical Significance of Lagrangian Multipliers

Force required to impose the constraint that X1 is a constant.

Newton’s 2nd Law in x-direction

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

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 16

01 lcgXm

Page 17: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Matrix Format

ii

ii qVQ

qT

qT

dtd

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

In this format, the conservative and non-conservative forces are lumped together on the right hand side of the equation.

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 17

Page 18: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Matrix Format

The kinetic energy augmented with Lagrangian Multipliers can be written in matrix format as

tqqMqT TT ,21

l

Column array containing generalized coordinate velocities.

Column array containing the constraint equations (refer to Module 3 in this section).

Column array containing the Lagrangian multipliers.

Matrix containing the mass and mass moments of inertia associated with each generalized coordinate.

q

tq,

l

M

Inertia Matrix

000000000000

Acg

A

A

Im

m

M

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 18

Page 19: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Matrix Format

Qq

qMj

iT

l

Lagrange’s equation for a mechanical system becomes

j

i

q Is the constraint equation Jacobian matrix introduced in Module 4 in this section.

Q Column array containing both conservative and non-conservative forces.

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 19

Page 20: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Matrix Format

Another equation for acceleration was obtained in Module 4 based on kinematics and the constraint equations.

Combining this equation with Lagrange’s equation from the previous slide yields:

qq ji

lQq

q

qM

j

i

j

i

0

Matrix Form of Equations

This equation can be solved to find the accelerations and constraint forces at an instant in time.

The accelerations must then be integrated to find the velocities and positions.

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 20

Page 21: Dynamic  Simulation : Lagrangian  Multipliers

© 2011 Autodesk Freely licensed for use by educational institutions. Reuse and changes require a note indicating 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 Equations (DAE)

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.

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 21

Page 22: Dynamic  Simulation : Lagrangian  Multipliers

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

Education Community

Module Summary

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.

Section 4 – Dynamic Simulation

Module 7 – Lagrangian Multipliers

Page 22