Section4 Module7 Lagrangian Multipliers (1)

Embed Size (px)

Citation preview

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    1/22

    2011 AutodeskFreely 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 Lagranges 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 asAutodesk Inventors Dynamic Simulation are also presented.

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    2/22

    2011 AutodeskFreely 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 Lagranges equation

    and showed how it could be used to

    determine the equations of simple

    motion systems.

    Lagranges 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 findand solve the equations of motion when there are constraints that

    bodies in the system must satisfy.

    0

    ii q

    L

    q

    L

    dt

    d

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 2

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    3/22

    2011 AutodeskFreely 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 Lagranges equation in the previous module (Module6) considered only processes that store and release potential energy.

    These processes are called conservative because they conserve energy.

    Lagranges equation must be modified to accommodate non-

    conservative processes that dissipate energy (i.e. friction, damping, andexternal forces).

    A non-conservative force or moment acting on generalized coordinate

    qiis denoted as Qi.

    The more general form of Lagranges equation is

    i

    ii

    Qq

    L

    q

    L

    dt

    d

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 3

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    4/22

    2011 AutodeskFreely 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

    Simple

    Pendulum

    c.g.

    X

    Y

    The pendulum shown in thefigure will be used as an

    example throughout this

    module.

    The position of the pendulumis known at any instance of

    time if the coordinates of the

    c.g.,Xcg,Ycg,and the angle q

    are known.

    Xcg,Ycgand qare the

    generalized coordinates.

    xy

    Xcg

    Ycg

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 4

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    5/22

    2011 AutodeskFreely 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 potentialenergy (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

    2222

    1

    2

    1

    2

    1 qc.g.

    X

    Y

    xy

    Xcg

    Ycg

    Unconstrained

    Body

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 5

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    6/22

    2011 AutodeskFreely 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 satisfyingLagranges equations of motion,

    the pendulum must satisfy the

    constraints that the

    displacements at X1and Y1are

    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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 6

    The c.g. lies on they-

    axis halfway along the

    length .

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    7/22

    2011 AutodeskFreely 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 equationsmultiplied 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 1and 2?

    12

    11

    222

    cos2

    sin2

    2

    1

    2

    1

    2

    1

    yY

    XX

    YmXmIT

    cg

    cg

    cgcg

    ql

    ql

    q

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 7

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    8/22

    2011 AutodeskFreely 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

    Lagranges Equation

    Lagrangian

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 8

    i

    ii

    Qq

    L

    q

    L

    dt

    d

    i

    n

    i

    i VTL 1

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    1

    2

    1

    2

    1qlqlq

    In the following slides, Lagranges

    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

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    9/22

    2011 AutodeskFreely 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 1stGeneralized CoordinateSection 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 9

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    121

    21 qlqlq

    i

    ii

    Q

    q

    L

    q

    L

    dt

    d

    Lagranges Equation

    Generalized Coordinates

    25

    14

    3

    2

    1

    l

    l

    q

    q

    q

    qYq

    Xq

    cg

    cg1

    1

    1

    1

    l

    q

    L

    Xmq

    L

    dt

    d

    Xm

    q

    L

    cg

    cg

    1stEquation

    01lcgXm

    Mathematical Steps

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    10/22

    2011 AutodeskFreely 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 2ndGeneralized CoordinateSection 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 10

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    121

    21 qlqlq

    i

    ii

    Q

    q

    L

    q

    L

    dt

    d

    Lagranges Equation

    Generalized Coordinates

    25

    14

    3

    2

    1

    l

    l

    q

    q

    q

    q

    Yq

    Xq

    cg

    cg mgq

    L

    Ymq

    L

    dt

    d

    Ymq

    L

    cg

    cg

    2

    2

    2

    2

    l

    2ndEquation

    02

    mgYm cg l

    Mathematical Steps

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    11/22

    2011 AutodeskFreely 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 3rdGeneralized Coordinate

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    121

    21 qlqlq

    i

    ii

    Q

    q

    L

    q

    L

    dt

    d

    Lagranges Equation

    Generalized Coordinates

    25

    14

    3

    2

    1

    l

    l

    q

    q

    q

    q

    Yq

    Xq

    cg

    cg qlql

    q

    q

    sin2

    cos2

    21

    3

    3

    3

    q

    L

    Iq

    L

    dt

    d

    Iq

    L

    3rdEquation

    Mathematical Steps

    0sin2

    cos2

    21 qlqlq I

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 11

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    12/22

    2011 AutodeskFreely 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 4thGeneralized CoordinateSection 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 12

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    121

    21 qlqlq

    i

    ii

    Q

    q

    L

    q

    L

    dt

    d

    Lagranges Equation

    Generalized Coordinates

    25

    14

    3

    2

    1

    l

    l

    q

    q

    q

    q

    Yq

    Xq

    cg

    cg1

    4

    4

    4

    sin2

    0

    0

    XXq

    L

    q

    L

    dt

    dq

    L

    cg

    q

    4thEquation

    Mathematical Steps

    0sin2

    1 XXcg q

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    13/22

    2011 AutodeskFreely 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 5thGeneralized Coordinate

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 13

    cgcgcgcgcg mgYYYXXYmXmIL

    1211

    222 cos2

    sin22

    121

    21 qlqlq

    i

    ii

    Q

    q

    L

    q

    L

    dt

    d

    Lagranges Equation

    Generalized Coordinates

    25

    14

    3

    2

    1

    l

    l

    q

    q

    q

    q

    Yq

    Xq

    cg

    cg1

    5

    5

    5

    cos2

    0

    0

    YYq

    L

    q

    L

    dt

    d

    q

    L

    cg

    q

    5thEquation

    Mathematical Steps

    0cos2

    1 YYcg q

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    14/22

    2011 AutodeskFreely 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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 14

    01lcgXm

    02 mgYm cg l

    0sin2

    cos2

    21 qlqlq I

    0sin2

    1 XXcg q

    0cos2

    1 YYcg q

    There are five unknown generalizedcoordinates including the two

    Lagrangian Multipliers. There are

    also five equations.

    Three of the equations aredifferential equations.

    Two of the equations are algebraic

    equations.

    Combined, they are a system of

    differential-algebraic equations

    (DAE).

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    15/22

    2011 AutodeskFreely 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

    1

    2

    cgmX

    cgmY

    cgI

    The application of Lagrangesequation yields the same

    equations obtained by drawing a

    free-body diagram.

    Free Body Diagram with

    Inertial Forces

    mg

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 15

    Summation of Forces in the X-direction

    Summation of Forces in the Y-direction

    Summation of Moments about the c.g.

    01lcgXm

    02 mgYm cg l

    0sin2

    cos2

    21 qlqlq I

    q 2

    qcos2

    qsin2

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    16/22

    2011 AutodeskFreely 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 X1is a

    constant.

    Newtons 2ndLaw 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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 16

    01lcgXm

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    17/22

    2011 AutodeskFreely 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

    i

    i

    ii q

    VQ

    q

    T

    q

    T

    dt

    d

    The computer implementation of Lagranges equation isfacilitated by writing the equations in matrix format.

    Separating the Lagrangian into kinetic and potential

    energy terms enables Lagranges 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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 17

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    18/22

    2011 AutodeskFreely 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 bewritten in matrix format as

    tqqMqT TT ,2

    1 l

    Column array containing generalized coordinatevelocities.

    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

    000

    000

    000

    000

    A

    cg

    A

    A

    I

    m

    m

    M

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 18

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    19/22

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    20/22

    2011 AutodeskFreely licensed for use by educational institutions. Reuse and changes require a note indicatingthat content has been modified from the original, and must attribute source content to Autodesk.

    www.autodesk.com/edcommunityEducation Community

    Matrix Format

    Another equation for accelerationwas obtained in Module 4 based

    on kinematics and the constraint

    equations.

    Combining this equation with

    Lagranges equation from the

    previous slide yields:

    qqj

    i

    l

    Qq

    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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 20

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    21/22

    2011 AutodeskFreely licensed for use by educational institutions. Reuse and changes require a note indicatingthat content has been modified from the original, and must attribute source content to Autodesk.

    www.autodesk.com/edcommunityEducation Community

    Solution of Differential-Algebraic

    Equations (DAE)

    The solution of even the simplest system of DAE requirescomputer 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 Inventors Dynamic Simulation environment is an

    example of such software.

    Section 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 21

  • 8/13/2019 Section4 Module7 Lagrangian Multipliers (1)

    22/22

    2011 AutodeskFreely licensed for use by educational institutions. Reuse and changes require a note indicatingthat content has been modified from the original, and must attribute source content to Autodesk.

    www.autodesk.com/edcommunityEducation Community

    Module Summary

    This module showed how Lagrangian Multipliers are used inconjunction with Lagranges 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 InventorsDynamic 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 4Dynamic Simulation

    Module 7Lagrangian Multipliers

    Page 22