variation al

37
Discrete Variational Mechanics Benjamin Stephens J.E. Marsden and M. West, “Discrete mechanics and variational integrators,” Acta Numerica, No. 10, pp. 357-514, 2001 M. West “Variational Integrators,” PhD Thesis, Caltech, 2004 1

Upload: jasonbuer

Post on 07-Dec-2015

6 views

Category:

Documents


0 download

DESCRIPTION

Variational Methods for solid mechanics

TRANSCRIPT

Page 1: Variation Al

Discrete Variational Mechanics

Benjamin Stephens

J.E. Marsden and M. West, “Discrete mechanics and variational integrators,” Acta Numerica, No. 10, pp. 357-514, 2001

M. West “Variational Integrators,” PhD Thesis, Caltech, 2004

1

Page 2: Variation Al

About My Research

• Humanoid balance using simple models

• Compliant floating body force control

• Dynamic push recovery planning by trajectory optimization

)(tC

)(tLP

C

LP

RP

2http://www.cs.cmu.edu/~bstephe1

Page 3: Variation Al

3http://www.cs.cmu.edu/~bstephe1

Page 4: Variation Al

But this talk is not about that…

Page 5: Variation Al

The Principle of Least Action

The spectacle of the universe seems all the more grand and beautiful and worthy of its Author, when one considers that it is all derived from a small number of laws laid down most wisely.

-Maupertuis, 1746

5

Page 6: Variation Al

The Main Idea

• Equations of motion are derived from a variational principle

• Traditional integrators discretize the equations of motion

• Variational integrators discretize the variational principle

6

Page 7: Variation Al

• Physically meaningful dynamics simulation

Motivation

Stein A., Desbrun M. “Discrete geometric mechanics for variational time integrators” in Discrete Differential Geometry. ACM SIGGRAPH Course Notes, 2006

7

Page 8: Variation Al

Goals for the Talk

• Fundamentals (and a little History)

• Simple Examples/Comparisons

• Related Work and Applications

• Discussion

8

Page 9: Variation Al

The Continuous Lagrangian

• Q – configuration space• TQ – tangent (velocity) space• L:TQ→R

)(),(),( qUqqTqqL

Kinetic Energy Potential EnergyLagrangian

9

Page 10: Variation Al

Variation of the Lagrangian

• Principle of Least Action = the function, q*(t), minimizes the integral of the Lagrangian

TT

dttqtqtqtqLdttqtqL00

))()(*),()(*())(*),(*(

0))(),((0

T

dttqtqL Variation of trajectory with endpoints fixed

“Hamilton’s Principle” ~183510

“Calculus of Variations” ~ Lagrange, 1760

Page 11: Variation Al

Continuous Lagrangian

0

q

L

dt

d

q

L

“Euler-Lagrange Equations”11

Page 12: Variation Al

Continuous Mechanics)(),())(),(( qUqqTtqtqL

)( UTqdt

d

qq

L

dt

d

q

L

q

T

dt

d

q

U

q

T

qqq

Tqqq

T

q

U

q

T

22

0)(),()( qGqqCqqM 12

Page 13: Variation Al

The Discrete Lagrangian

• L:QxQ→R

13

hqqLdttqtqL kkd

hT

T

,,)(),( 1

L

kqh

1kq

hh

qqqLhqqL kkkkkd

11 ,,,

Page 14: Variation Al

Variation of Discrete Lagrangian

0,,,, 1112 tqqLDtqqLD kkdkkd

“Discrete Euler-Lagrange Equations” 14

Page 15: Variation Al

Variational Integrator

• Solve for :

0,,,, 1112 hqqLDhqqLD kkdkkd

0,, 111

hh

qqqL

qh

h

qqqL

qkk

kk

kkk

k

0,,,, 1111

11

h

qqq

q

Lh

h

qqq

q

L

h

qqq

q

Lh

h

qqq

q

L kkk

kkk

kkk

kkk

1kq

15

Page 16: Variation Al

Solution: Nonlinear Root Finder

)(

)(

1

11

11 i

k

iki

kik qDf

qfqq

0,,,,)( 11121 hqqLDhqqLDqf kkdkkdk

16

Page 17: Variation Al

Simple Example: Spring-Mass

• Continuous Lagrangian:

• Euler-Lagrange Equations:

• Simple Integration Scheme:

22

2

1

2

1, kxxmqqL

0

xmkxq

L

dt

d

q

L

kkk

kkkk

xm

khxx

xm

khxhxx

1

21 2

1

17

Page 18: Variation Al

Simple Example: Spring-Mass

• Discrete Lagrangian:

• Discrete Euler-Lagrange Equations:

• Integration:

18

22

11 2

1

2

1,, k

kkkkd kx

h

xxmhxxL

0,,,, 1112 hxxLDhxxLD kkdkkd

02 112 kkkk kxxxx

h

m

1

2

1 2

kkk xxm

khx

Page 19: Variation Al

Comparison: 3 Types of Integrators

• Euler – easiest, least accurate

• Runge-Kutta – more complicated, more accurate

• Variational – EASY & ACCURATE!

19

Page 20: Variation Al

0.97 0.98 0.99 1 1.01 1.02 1.03 1.04 1.05 1.06

-0.08

-0.06

-0.04

-0.02

0

0.02

0.04

position

velo

city

Euler h=0.001

Runge-Kutta (ode45)Variational h=0.001

20

Page 21: Variation Al

Notice:

•Energy does not dissipate over time

•Energy error is bounded

0 10 20 30 40 50 60 70 80 90 100

0.498

0.5

0.502

0.504

0.506

0.508

0.51

time (s)

Ene

rgy

Euler h=0.001

Runge-Kutta (ode45)Variational h=0.001

21

Page 22: Variation Al

Stein A., Desbrun M. “Discrete geometric mechanics for variational time integrators” in Discrete Differential Geometry. ACM SIGGRAPH Course Notes, 2006

Variational Integrators are “Symplectic”

• Simple explanation: area of the cat head remains constant over time

22

Page 23: Variation Al

Forcing Functions

• Discretization of Lagrange–d’Alembert principle

23

Page 24: Variation Al

Constraints

)(

)(

1

11

11 i

k

iki

kik zDf

zfzz

0

)(

)(,,,,)(

1

11121

k

kT

kkkdkkdk

qg

qghqqLDhqqLDzf

k

kk

qz

1

1

24

Page 25: Variation Al

Example: Constrained Double Pendulum w/ Damping

1

2

),( yx

0)(

y

xqg

2

1

0

0

)(

K

KqF

2

1

y

x

q

25

Page 26: Variation Al

Example: Constrained Double Pendulum w/ Damping

• Constraints strictly enforced, h=0.1

26No stabilization heuristics required!

Page 27: Variation Al

Complex Examples From Literature

E. Johnson, T. Murphey, “Scalable Variational Integrators for Constrained Mechanical Systems in Generalized Coordinates,”

IEEE Transactions on Robotics, 2009

a.k.a “Beware of ODE”

27

Page 28: Variation Al

Complex Examples From Literature

Variational Integrator

ODE

28

Page 29: Variation Al

Complex Examples From Literature

29

Page 30: Variation Al

Complex Examples From Literaturelo

g

Timestep was decreased until error was below threshold, leading to longer runtimes. 30

Page 31: Variation Al

Applications

• Marionette Robots

E. Johnson and T. Murphey, “Discrete and Continuous Mechanics for Tree Represenatations of Mechanical Systems,” ICRA 2008

31

Page 32: Variation Al

Applications

• Hand modeling

E. Johnson, K. Morris and T. Murphey, “A Variational Approach to Stand-Based Modeling of the Human Hand,” Algorithmic Foundations of Robotics VII, 2009

32

Page 33: Variation Al

Applications

• Non-smooth dynamics

Fetecau, R. C. and Marsden, J. E. and Ortiz, M. and West, M. (2003) Nonsmooth Lagrangian mechanics and variational collision integrators. SIAM Journal on Applied Dynamical Systems 33

Page 34: Variation Al

Applications

• Structural Mechanics

Kedar G. Kale and Adrian J. Lew, “Parallel asynchronous variational integrators,” International Journal for Numerical Methods in Engineering, 2007

34

Page 35: Variation Al

• Trajectory optimization

Applications

O. Junge, J.E. Marsden, S. Ober-Blöbaum, “Discrete Mechanics and Optimal Control”, in Proccedings of the 16th IFAC World Congress, 2005 35

Page 36: Variation Al

Summary

• Discretization of the variational principle results in symplectic discrete equations of motion

• Variational integrators perform better than almost all other integrators.

• This work is being applied to the analysis of robotic systems

36

Page 37: Variation Al

Discussion

• What else can this idea be applied to?– Optimal Control is also derived from a variational

principle (“Pontryagin’s Minimum Principle”).

• This idea should be taught in calculus and/or dynamics courses.

• We don’t need accurate simulation because real systems never agree.

37