You are on page 1of 39

Lagrange-dAlembert integrators for constrained systems in mechanics

Lagrange-dAlembert integrators for constrained systems in mechanics


Conference on Scientic Computing in honor of Ernst Hairers 60th birthday, Geneva, Switzerland

Laurent O. Jay
Dept. of Mathematics, The University of Iowa, USA

June 17-20, 2009

Lagrange-dAlembert integrators for constrained systems in mechanics

Lagrangian systems with nonholonomic constraints


Coordinates and velocities: (q , v ) Lagrangian: L(q , v ) Nonholonomic constraints: k (q , v ) = 0 Lagrange equations of the second kind: d q = v dt d v L(q , v ) = q L(q , v ) K (q , v )T dt 0 = k (q , v ) They form a system of dierential-algebraic equations (DAEs) Index 2 assumption: T 2 vv L(q , v ) K (q , v ) nonsingular J (q , v ) := kv (q , v ) O Ideal nonholonomic constraints when K (q , v ) = kv (q , v )

Lagrange-dAlembert integrators for constrained systems in mechanics

Applications with nonholonomic constraints

Rolling balls, wheels, and disks Skating and sleighs Trajectory planning for vehicles, e.g., car trailer Robotic mechanisms, e.g., wheeled robots Molecular dynamics simulations with constant kinetic temperature Missile pursuit etc.

Lagrange-dAlembert integrators for constrained systems in mechanics

The underlying forced Lagrangian system


d q = v dt d v L(q , v ) = q L(q , v ) + fL (q , v ) dt where fL (q , v ) := K (q , v )T (q , v ) and (q , v ) := is the solution with a := linear equations J (q , v ) a =
d dt v

of the system of

2 qv L(q , v )v + q L(q , v ) kq (q , v )v

The nonholonomic constraints 0 = k (q , v ) are strong invariants of the underlying forced Lagrangian system.

Lagrange-dAlembert integrators for constrained systems in mechanics

The Lagrange-dAlembert principle

The index 2 DAEs can be derived from the Lagrange-dAlembert principle d Lv (q , q ) + Lq (q , q ) q = 0 dt and the nonholonomic constraints 0 = k (q , q ) where q are virtual displacements satisfying the Maurer-Appell-ChetaevJohnsen-Hamel rule kv (q , q ) q = 0

Lagrange-dAlembert integrators for constrained systems in mechanics

Equivalence to a skew critical problem when k (q , v ) = K (q )v


Dene the action
tN

A(q ) :=
t0

L(q (t ), q (t ))dt

For nonholonomic constraints linear in v 0 = K (q )v the Lagrange-dAlembert principle is equivalent to a skew critical problem A(q )(q ) = 0 This motivates. . .
1 q C0

| K (q )q 0

Lagrange-dAlembert integrators for constrained systems in mechanics

Cort es discrete Lagrange-dAlembert principle (2001)


Assume that 0 = c (qk , qk +1 ) where c (qk , qk +1 ) := K (qk +1 ) vk +1 (qk , qk +1 ) | {z }
v (tk +1 )

for k = 0, . . . , N 1

Consider a discrete Lagrangian

Ld (qk , qk +1 )

tk +1

L(q (t ), q (t ))dt

tk

where q (tk ) = qk , q (tk +1 ) = qk +1 . Cort es discrete Lagrange-dAlembert principle is dened as follows: the discrete action sum
N 1 X k =0

Ld (qk , qk +1 )

n is stationary with respect to variations {qk }N k =0 | qk Ker(K (qk )) R (K (qk )qk = 0) and q0 = 0 = qN . This leads to Cort es discrete Euler-Lagrange equations

2 Ld (qk 1 , qk ) + 1 Ld (qk , qk +1 ) = K (qk )T k

Lagrange-dAlembert integrators for constrained systems in mechanics

Example of a LDA method


For 1 T v Mv U (q ), 2 k (q , v ) := K (q )v + b (q ) L(q , v ) := M sym. pos. def.,

McLachlan-Perlmutters 2-stage (Lobatto IIIB-A) LDA method (2006): 1 Q 1 = q0 + h v 0 2 Mv1 = Mv0 h(U (Q1 ) + K (Q1 )T 1 ) 1 1 q1 = q0 + h (v0 + v1 ) = Q1 + h v1 2 2 0 = K (q1 )v1 + b (q1 )

Lagrange-dAlembert integrators for constrained systems in mechanics

Quote from McLachlan and Perlmutter (2006)

. . . much work remains to be done to clarify the nature of discrete nonholonomic mechanics and to pinpoint the correct discrete analog of the Lagrange-dAlembert principle.

Lagrange-dAlembert integrators for constrained systems in mechanics

Forced Lagrangian systems


d q = v dt d v L(q , v ) = q L(q , v ) + fL (q , v ) dt the integral Lagrange-dAlembert principle is
tN

A(q )(q ) +
t0

fL (q (t ), q (t ))T q (t )dt = 0

1 q C0

Idea: For nonholonomic Lagrangian systems take fL (q , v ) := K (q , v )T (q , v ) and consider the nonholonomic constraints 0 = k (q , v ) as strong invariants of the underlying forced Lagrangian system.

Lagrange-dAlembert integrators for constrained systems in mechanics

Notation
Let q (t ) satisfy q (tk ) = qk , q (tk +1 ) = qk +1 . Consider a discrete Lagrangian Ld (qk , qk +1 ) approximating the exact discrete Lagrangian LE d (qk , qk +1 ) :=
tk +1

L(q (t ), q (t ))dt
tk

Consider discrete forces fd (qk , qk +1 ), fd+ (qk , qk +1 ) approximating the exact discrete forcing terms fdE (qk , qk +1 )T := fdE + (qk , qk +1 )T :=
tk +1 tk tk +1 tk

fL (q (t ), q (t ))T qk q (t )dt fL (q (t ), q (t ))T qk +1 q (t )dt

Lagrange-dAlembert integrators for constrained systems in mechanics

The discrete Lagrange-dAlembert principle of C. Kane, Marsden, Ortiz, and West (2000) for forced Lagrangian systems

N 1 k =0

Ld (qk , qk +1 )+

N 1 k =0

fd (qk , qk +1 )T qk + fd+ (qk , qk +1 )T qk +1 = 0

n {qk }N k =0 | qk R and q0 = 0 = qN . This leads to the forced discrete Euler-Lagrange equations

2 Ld (qk 1 , qk ) + 1 Ld (qk , qk +1 ) + fd+ (qk 1 , qk ) + fd (qk , qk +1 ) = 0 for k = 1, . . . , N 1 and which are satised by the exact discrete Lagrangian and the exact discrete forcing terms.

Lagrange-dAlembert integrators for constrained systems in mechanics

A discrete Lagrange-dAlembert principle for Lagrangian systems with nonholonomic constraints


Combine the forced discrete principle Lagrange-dAlembert principle with fL (q , v ) := K (q , v )T (q , v ) and the constraints 0 = c (qk , qk +1 ) = k (qk +1 , vk +1 (qk , qk +1 ))
v (tk +1 )

for k = 0, . . . , N 1

This leads to the nonholonomically constrained discrete Euler-Lagrange equations 2 Ld (qk 1 , qk ) + 1 Ld (qk , qk +1 ) + fd+ (qk 1 , qk ) + fd (qk , qk +1 ) = 0 c (qk 1 , qk ) = c (qk , qk +1 ) for k = 1, . . . , N 1 where c (q0 , q1 ) = 0 or c (qN 1 , qN ) = 0.

Lagrange-dAlembert integrators for constrained systems in mechanics

The exact discrete forcing terms


One can show that
E 1 LE d (qk , qk +1 ) = pk fd (qk , qk +1 ) E+ 2 LE d (qk , qk +1 ) = pk +1 fd (qk , qk +1 )

where pk := v L(qk , vk (qk , qk +1 )), pk +1 := v L(qk +1 , vk +1 (qk , qk +1 )) and fdE (qk , qk +1 )T := fdE + (qk , qk +1 )T :=
t1 t0 t1 t0

(q (t ), v (t ))T K (q (t ), v (t ))qk q (t )dt (q (t ), v (t ))T K (q (t ), v (t ))qk +1 q (t )dt

E E+ The exact terms LE d , fd , fd satisfy the new principle do not satisfy Cort es principle

Lagrange-dAlembert integrators for constrained systems in mechanics

Specialized Partitioned Additive Runge-Kutta (SPARK) methods for index 2 DAEs (J., BIT, 2003; Math. Comput., 2006)
Qi = q0 + h
s X j =1

aij Vj

i = 1, . . . , s

q1

q0 + h

s X j =1

bj Vj
s X j =1 s X j =1

v L(Qi , Vi ) v L(q1 , v1 ) 0 0

v L(q0 , v0 ) + h v L(q0 , v0 ) + h
s X j =1

s X j =1

b aij q L(Qj , Vj ) h b bj q L(Qj , Vj ) h i = 1, . . . , s 1

s X j =1

e bj K (Qj , Vj )T j

e aij K (Qj , Vj )T j

i = 1, . . . , s

= =

bj cji 1 k (Qj , Vj )

k (q1 , v1 )

Lagrange-dAlembert integrators for constrained systems in mechanics

Examples of SPARK methods


For L(q , v ) := 1 v T Mv U (q ), M sym. pos. def., k (q , v ) := K (q )v + b(q ) 2 The 1-stage Gauss SPARK (midpoint) method: q1 Mv1 0 = = = q0 + h (v0 + v1 ) 2 q0 + q1 q0 + q1 T Mv0 hU 1 hK 2 2 K (q1 )v1 + b(q1 )

The 2-stage Lobatto IIIA-B SPARK (Verlet) method: 1 Mv0 h (U (q0 ) + K (q0 )T 1 ) 2 q1 = q0 + hV1 1 1 (K (q0 )V1 + b(q0 )) + (K (q1 )V1 + b(q1 )) 0 = 2 2 h h or modied 0 = K q0 + V1 V1 + b q0 + V1 but no more SPARK 2 2 h 1 Mv1 + K (q1 )T 2 = MV1 h U (q1 ) 2 2 K (q1 )v1 = b(q1 ) MV1 =

Lagrange-dAlembert integrators for constrained systems in mechanics

Main Theorem
Let t0 , q0 , t1 , q1 be given. If bi = bi , bi aij + bj aji bi bj = 0 for i , j = 1, . . . , s ,

then we have a nonholonomically constrained discrete Lagrange-dAlembert integrator in the new sense with
s

Ld (q0 , q1 ) = h
i =1

bi L(Qi , Vi )
s

fd (q0 , q1 )T =

h
i =1 s

bi h bi h

s j =1 s j =1

aij T j K (Qj , Vj ) q0 Vi

fd+ (q0 , q1 )T = h
i =1

(bj aij )T j K (Qj , Vj ) q1 Vi

Lagrange-dAlembert integrators for constrained systems in mechanics

Main Theorem (cont.)


Moreover, if cs +1i + ci = 1

as +1i ,s +1j + aij = bs +1j = bj as +1i ,s +1j + aij = bs +1j = bj as +1i ,s +1j + aij = bs +1j = bj for i , j = 1, . . . , s then the SPARK method is symmetric and Ld (q1 , q0 ) = Ld (q0 , q1 ) fd (q1 , q0 ) = fd+ (q0 , q1 ) fd+ (q1 , q0 ) = fd (q0 , q1 )
E E+ as for the exact solution q (t0 ), q (t1 ) and exact terms LE d , fd , fd .

Lagrange-dAlembert integrators for constrained systems in mechanics

The exact discrete forcing terms


From q (t ) = q1
E fd (q0 , q1 )T

R t1
t

v (s )ds we have q0 q (t ) = Z
t1

R t1
t

q0 v (s )ds . Hence, Z
t1 t

= = = =

(q (t ), v (t ))T K (q (t ), v (t )) Z
t1

t0 Z t1 t0

t0 Z t1 t0 Z t1

q0 v (s )ds

t s

(q (t ), v (t ))T K (q (t ), v (t ))q0 v (s )ds

t0 Z s t0

(q (t ), v (t ))T K (q (t ), v (t ))q0 v (s )dt (q (t ), v (t ))T K (q (t ), v (t ))dt

dt dt

ds

q0 v (s )ds

Similarly fdE + (q0 , q1 )T = Z


t1

t0

t1 s

(q (t ), v (t ))T K (q (t ), v (t ))dt

q1 v (s )ds

Lagrange-dAlembert integrators for constrained systems in mechanics

Remark
For forced Lagrangians Kane, Marsden, Ortiz, and West (2000) originally proposed to take as a reasonable choice
s

fd (q0 , q1 )T = h
i =1

bi fL (Qi , Vi )T q0 Qi

corresponding here to
s

fd (q0 , q1 )T

= h
i =1 s

bi T i K (Qi , Vi )q0 Qi bi T i K (Qi , Vi ) I + h


s j =1

= h
i =1

aij q0 Vj

which is not equivalent

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The nonholonomic particle

L(q , v ) =

1 2 2 2 2 2 (v + v2 + v3 ) (q1 + q2 ) 2 1 0 = v 3 q2 v 1 1 0 0 0 1 0
T T

q0 = v0 = t0 = 0

h = 0.2

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The nonholonomic particle (cont.)


8 6 E E
0 k

x 10

1stage Gauss SPARK

4 2 0 0 x 10
5

50

100

150 t 2stage Gauss SPARK

200

250

0 1 2 3
0 k

E E

0 x 10
7

50

100

150 t 3stage Gauss SPARK

200

250

2 1.5 E E
0 k

1 0.5 0 0 50 100 t 150 200 250

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The skate on an inclined plane

L(q , v ) =

m 2 J 2 2 (v1 + v2 ) + v3 + mg sin()q1 2 2 0 = cos(q3 )v2 sin(q3 )v1 J = 1, 0 0 0 0 0 1


T T

m = 1, q0 = v0 = t0 = 0 h = 0.1

g sin() = 1

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The skate on an inclined plane (cont.)


0 Ek E0 1 2 3 x 10
3

2stage Lobatto IIIAB SPARK

0 x 10
7

10

20

30

50 60 t 3stage Lobatto IIIAB SPARK

40

70

80

90

100

8 6 Ek E0 4 2 0

0 x 10
10

10

20

30

40 50 60 t 4stage Lobatto IIIAB SPARK

70

80

90

100

0 Ek E0

0.5

10

20

30

40

50 t

60

70

80

90

100

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: A mobile robot

L(q , v ) =

J 2 3 m 2 2 2 (v + v2 ) + v3 + J v4 10 sin(q4 ) 2 1 2 2 0 = v1 cos(q3 )v4 0 = v2 sin(q3 )v4 J = 1, 0 0 0 0 1 0 0 1 J = 1,


T T

m = 1, q0 = v0 = t0 = 0 h = 0.2

=1

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: A mobile robot (cont.)


2stage Lobatto IIIABD SPARK 0.1 0 E E
0 k

0.1 0.2 0.3 0 x 10


4

50

100 t 3stage Lobatto IIIABD SPARK

150

6 4 E E
0 k

2 0 2 0 x 10
6

50

100 t 4stage Lobatto IIIABD SPARK

150

1 0 1 2
0 k

E E

50 t

100

150

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: McLachlan and Perlmutters particles


1 v 2 1 2 v1 + 0 ` `

T (v ) U (q )

= =

2 2,

n = 2m + 1 (m 2)
2 2

2 2 qm +2 qm+3

0 t0 qj 0 vj 0 E0 h

= = = = = =

i =m+2

n X

m X i =1

2 2 q1+ i qm+1+i

qi vi T

cos(j /(2J )) 0

0.6 0

0.4 0

0.2 0 0

1 0

sin(j /(2J ))

3.06 0.05
1 (J +1)

1 1 T

j = 0, . . . , J

j = 0, . . . , J

Let ((Ek E0 )2 ) :=

PJ

j =0 (Ejk

E0 )2 and J + 1 = 10

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: McLachlan and Perlmutters particles (cont.)

((E E ) )/h

2stage Lobatto IIIAB SPARK 10 5 0

.k

0.5

1.5

2.5

3.5

4.5 x 10

5
4

((E E ) )/h

modified 2stage Lobatto IIIAB SPARK 10 5 0

.k

0.5

1.5

2.5

3.5

4.5 x 10

5
4

((E E ) )/h

McLachlanPerlmutter 2stage Lobatto IIIBA 10 5 0

.k

0.5

1.5

2.5 t

3.5

4.5 x 10

5
4

We observe

1 h4

like for a random walk

((Ek E0 )2 ) O (tk ) or equivalently

p ((Ek E0 )2 ) O (h2 tk )

Lagrange-dAlembert integrators for constrained systems in mechanics

Constrained systems in mechanics


d y dt d p (y , z ) dt 0 0 0 is a system of DAEs where y v p f,r g k : : : : : : : : coordinates velocities momenta forces holonomic constraints Lagrange multipliers associated to g nonholonomic constraints Lagrange multipliers associated to k = = = = = v (y , z ) f (y , z , ) + r (y , ) g (y ) gy (y )v (y , z ) k (y , z )

Lagranges mechanics: v (y , z ) z Hamiltons mechanics: p (y , z ) z

Lagrange-dAlembert integrators for constrained systems in mechanics

Constrained systems in mechanics (cont.)


This system of DAEs is: overdetermined implicit partitioned additive (split) Manifold of constraints: M := {(y , z ) Rny Rnz | 0 = g (y ), 0 = gy (y )v (y , z ), 0 = k (y , z )} Assumptions: (q0 , v0 ) M , v , p , f , . . . suciently dierentiable, and invertibility of pz gy vz r O , 0 pz @ gy vz kz r O O 1 f O A O (1)

= existence and uniqueness of a solution

Lagrange-dAlembert integrators for constrained systems in mechanics

SPARK methods
Yi y1 p (Yi , Zi ) z1 ei Y = = = = = = = = = = y0 + h Ys +1
s X j =1

ij v (Yj , Zj )

i = 1, . . . , s + 1

p (y0 , z0 ) + h Zs +1 y0 + h ei ) g (Y
s X j =1 s X j =1

s X j =1

bij f (Yj , Zj , j ) + h

e s X j =0

ej , ej ) eij r (Y

i = 1, . . . , s + 1

aij v (Yj , Zj )

0 0

g (y1 )

gy (y1 )v (y1 , z1 )

i = 0, 1, . . . , e s ee (y1 = Y s)

i = 0, 1, . . . , e s e0 = y0 ) (Y

0 0

bj cji 1 k (Yj , Zj )

i = 1, . . . , s 1

k (y1 , v1 )

Lagrange-dAlembert integrators for constrained systems in mechanics

Some denitions
:= ` A bT 0s , b := + AM
1

e Q M

:=

Is

b A b bT

:=

0 B B B B B @

bT bT bT A . . . b T (s 1)b T C s 2 A

e :=

b T A1 1 0 1 C C D (s 1) C = C C A B B B B B @

e A e bT

! ,

bT bT C . . . b T C s 1

1 1 B . C B , s := @ . C . A 1 0 1 C C C C C A

C := diag(c1 , . . . , cs ),

with simplifying assumption D (s 1) : kb C


T k 1

A=b

b C

k = 1, . . . , s 1

:=

e Q T Q

:= s +1 !

b T A1 a11 . . . as 1 . . .

:=

1 A 0T s

0s 1

B := B A @

1 a1s . C . C . A ass

where we assume e s =s

Lagrange-dAlembert integrators for constrained systems in mechanics

Equivalent reformulation of SPARK methods


BB BB (Q Inz ) BB @@ 00 p (Y1 , Z1 ) . . . p (Ys , Zs ) p (y1 , z1 ) 1 C C C s +1 p (y0 , z0 ) A 0

B B In ) B (Q B B @

B e In ) B (Q B @

k (Y1 , Z1 ) . . . k (Ys , Zs ) k (y1 , z1 )

0 1 e1 , e1 ) r (Y f (Y1 , Z1 , 1 ) B C B . . B . h ( e I ) . h( b Inz ) @ A nz @ . . es , es ) f (Ys , Zs , s ) r (Y 1 Ps 1 g y0 + h j =1 a1j v (Yj , Zj ) h C C . . C . C C Ps 1 g y0 + h j =1 asj v (Yj , Zj ) A


h

11 CC CC AA

gy (y1 )v (y1 , z1 ) 1 C C C A

Lagrange-dAlembert integrators for constrained systems in mechanics

Modied Newton iterations


Modied Jacobian of the reformulated SPARK methods 0 Is +1 Iny B O B @ O O O Q pz Q gy vz e kz Q O hQ e r O O 1 O hQ b f C C A O O

For the modied Newton iterations to obtain a block diagonal linear system with the 2 matrices (1) we dene the intermediate quantities 0 B B B @ 1 0 1 z Z1 1 B . C C . . B . C C . C := (Q Inz ) B . C , @ Z A A z s s z z 1 s +1 1 0 1 1 1 C C . . e b In ) B C . . A @ . A := h(Q . s s 0 B B B @ 1 . . . s s +1 1 e0 B e1 C B C e In ) B C := h(Q . B . A @ . es 0 1 C C C C A

0 B B @

Lagrange-dAlembert integrators for constrained systems in mechanics

Modied Newton iterations (cont.)


We assume Q b= 0 1 1 B C . . @ A . s 0 1 Z1 B . C B . C B . C @ Z A s z 1 0 1 e0 B e1 C B C B . C B . C @ . A es e Q b 0T s 0 1 1 C . C . . A s 1 C C C A

and we use

1 e 1 ((Q b) h (Q 1

B In ) B @ 0

B B Inz ) B @

1 ((Q e)1 h

B B In ) B @

z 1 . . . z s z s +1 0

1 . . . s s +1

1 C C C A

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The skate on an inclined plane in Cartesian coordinates


L(q , v ) = m 2 (q1 + q3 ) 2 2 2 (v1 + v2 + v3 + v4 ) + mg sin() 4 2 1 2 2 2 (q3 q1 ) + (q4 q2 ) =: g (q ) 0 = 2 0 = (q3 q1 )(v3 v1 ) + (q4 q2 )(v4 v2 ) =: gq (q )v 0 = (q3 q1 )(v2 + v4 ) (q4 q2 )(v1 + v3 ) =: k (q , v ) m = 1, q0 = 2 v0 = 2 t0 = 0 h = 0.1 g sin() = 1, 1 0 1 0 0 1 0 1 =2
T T

Lagrange-dAlembert integrators for constrained systems in mechanics

Example: The skate on an inclined plane in Cartesian coordinates (cont.)


3 2.5 2 EnE0 1.5 1 0.5 0 0 10 20 30 40 50 t 60 70 80 90 100 x 10
3

1stage GaussLobatto SPARK

0 1 2 EnE0 3 4 5 6 7

x 10

2stage GaussLobatto SPARK

10

20

30

40

50 t

60

70

80

90

100

Lagrange-dAlembert integrators for constrained systems in mechanics

Conclusions

We have presented a new discrete Lagrange-dAlembert principle for Lagrangian systems with nonholonomic constraints which is consistent with the discrete Lagrange-dAlembert principle for forced Lagrangian systems of Kane, Marsden, Ortiz, and West Unlike Cort es principle the new discrete Lagrange-dAlembert principle is satised by both the exact solution and a large class of SPARK methods of arbitrarily high order SPARK methods have strong foundations Implementation of SPARK methods can be done eciently but is not straightforward

Lagrange-dAlembert integrators for constrained systems in mechanics

Further issues

Convergence proof for problems with mixed holonomic/nonholonomic constraints (done for Lobatto IIIA-B-C-C -D methods by Hyounkyun Oh, PhD thesis, U. of Iowa, 2005) Backward error analysis Reduction theory Dissipation/friction/impact/contact

You might also like