Lagrange-d Alembert integrators for constrained systems in mechanics Conference on Scientific Computing in honor of Ernst Hairer s 6th birthday, Geneva, Switzerland Laurent O. Jay Dept. of Mathematics, The University of Iowa, USA June 7-2, 29
Lagrangian systems with nonholonomic constraints Coordinates and velocities: (q, v) Lagrangian: L(q, v) Nonholonomic constraints: k(q, v) = Lagrange equations of the second kind: d dt q = v d dt vl(q,v) = q L(q,v) K(q,v) T ψ = k(q,v) They form a system of differential-algebraic equations (DAEs) Index 2 assumption: ( 2 J(q,v) := vv L(q,v) K(q,v) T ) nonsingular k v (q,v) O Ideal nonholonomic constraints when K(q,v) = k v (q,v)
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.
The underlying forced Lagrangian system where d dt q = v d dt vl(q,v) = q L(q,v) + f L (q,v) f L (q,v) := K(q,v) T Ψ(q,v) and Ψ(q,v) := ψ is the solution with a := d dt v of the system of linear equations ( ) ( ) a 2 J(q,v) = qv L(q,v)v + q L(q,v) ψ k q (q,v)v The nonholonomic constraints = k(q,v) are strong invariants of the underlying forced Lagrangian system.
The Lagrange-d Alembert principle The index 2 DAEs can be derived from the Lagrange-d Alembert principle ( d ) dt L v(q, q) + L q (q, q) δ q = and the nonholonomic constraints = k(q, q) where δ q are virtual displacements satisfying the Maurer-Appell-Chetaev- Johnsen-Hamel rule k v (q, q)δ q =
Equivalence to a skew critical problem when k(q, v) = K(q)v Define the action A(q) := tn For nonholonomic constraints linear in v t L(q(t), q(t))dt = K(q)v the Lagrange-d Alembert principle is equivalent to a skew critical problem This motivates... δa(q)(δq) = δq C K(q)δq
Cortés discrete Lagrange-d Alembert principle (2) Assume that where Consider a discrete Lagrangian = c(q k,q k+ ) for k =,...,N c(q k, q k+ ) := K(q k+ )v k+ (q k,q k+ ) {z } v(t k+ ) L d (q k, q k+ ) Z tk+ t k L(q(t), q(t))dt where q(t k ) = q k, q(t k+ ) = q k+. Cortés discrete Lagrange-d Alembert principle is defined as follows: the discrete action sum N X L d (q k, q k+ ) k= is stationary with respect to variations {δq k } N k= δq k Ker(K(q k )) R n (K(q k )δq k = ) and δq = = δq N. This leads to Cortés discrete Euler-Lagrange equations 2 L d (q k,q k ) + L d (q k,q k+ ) = K(q k ) T ψ k
Example of a LDA method For L(q,v) := 2 vt Mv U(q), k(q,v) := K(q)v + b(q) M sym. pos. def., McLachlan-Perlmutter s 2-stage (Lobatto IIIB-A) LDA method (26): Q = q + h 2 v Mv = Mv h( U(Q ) + K(Q ) T Ψ ) q = q + h 2 (v + v ) = Q + h 2 v = K(q )v + b(q )
Quote from McLachlan and Perlmutter (26)...much work remains to be done to clarify the nature of discrete nonholonomic mechanics and to pinpoint the correct discrete analog of the Lagrange-d Alembert principle.
Forced Lagrangian systems d dt q = v d dt vl(q,v) = q L(q,v) + f L (q,v) the integral Lagrange-d Alembert principle is tn δa(q)(δq) + f L (q(t), q(t)) T δq(t)dt = δq C t Idea: For nonholonomic Lagrangian systems take f L (q,v) := K(q,v) T Ψ(q,v) and consider the nonholonomic constraints = k(q,v) as strong invariants of the underlying forced Lagrangian system.
Notation Let q(t) satisfy q(t k ) = q k, q(t k+ ) = q k+. Consider a discrete Lagrangian L d (q k,q k+ ) approximating the exact discrete Lagrangian L E d (q k,q k+ ) := tk+ t k L(q(t), q(t))dt Consider discrete forces f d (q k,q k+ ),f + d (q k,q k+ ) approximating the exact discrete forcing terms f E d (q k,q k+ ) T := f E+ d (q k,q k+ ) T := tk+ t k tk+ t k f L (q(t), q(t)) T qk q(t)dt f L (q(t), q(t)) T qk+ q(t)dt
The discrete Lagrange-d Alembert principle of C. Kane, Marsden, Ortiz, and West (2) for forced Lagrangian systems N L d (q k,q k+ )+ N δ k= k= ( f d (q k,q k+ ) T δq k + f + d (q k,q k+ ) T δq k+ ) = {δq k } N k= δq k R n and δq = = δq N. This leads to the forced discrete Euler-Lagrange equations 2 L d (q k,q k ) + L d (q k,q k+ ) + f + d (q k,q k ) + f d (q k,q k+ ) = for k =,...,N and which are satisfied by the exact discrete Lagrangian and the exact discrete forcing terms.
A discrete Lagrange-d Alembert principle for Lagrangian systems with nonholonomic constraints Combine the forced discrete principle Lagrange-d Alembert principle with f L (q,v) := K(q,v) T Ψ(q,v) and the constraints = c(q k,q k+ ) = k(q k+,v k+ (q k,q k+ )) for k =,...,N }{{} v(t k+ ) This leads to the nonholonomically constrained discrete Euler-Lagrange equations 2 L d (q k,q k ) + L d (q k,q k+ ) + f + d (q k,q k ) + f d (q k,q k+ ) = c(q k,q k ) = c(q k,q k+ ) for k =,...,N where c(q,q ) = or c(q N,q N ) =.
The exact discrete forcing terms One can show that L E d (q k,q k+ ) = p k f E d (q k,q k+ ) 2 L E d (q k,q k+ ) = p k+ f E+ d (q k,q k+ ) where p k := v L(q k,v k (q k,q k+ )), p k+ := v L(q k+,v k+ (q k,q k+ )) and t f E d (q k,q k+ ) T := Ψ(q(t),v(t)) T K(q(t),v(t)) qk q(t)dt f E+ d (q k,q k+ ) T := t t The exact terms L E d,f E d,f E+ d satisfy the new principle do not satisfy Cortés principle t Ψ(q(t),v(t)) T K(q(t),v(t)) qk+ q(t)dt
Specialized Partitioned Additive Runge-Kutta (SPARK) methods for index 2 DAEs (J., BIT, 23; Math. Comput., 26) Q i = q + h sx a ij V j i =,...,s j= sx q = q + h b j V j j= sx sx vl(q i,v i ) = vl(q, v ) + h ba ij ql(q j,v j ) h ea ij K(Q j, V j ) T Ψ j i =,...,s j= j= sx sx vl(q, v ) = vl(q, v ) + h b bj ql(q j,v j ) h e bj K(Q j, V j ) T Ψ j j= j= sx = b j c i j k(q j,v j ) i =,..., s j= = k(q,v )
Examples of SPARK methods For L(q, v) := 2 vt Mv U(q), M sym. pos. def., k(q, v) := K(q)v + b(q) The -stage Gauss SPARK (midpoint) method: q = q + h 2 (v + v ) Mv = ««q + q q + q T Mv h U hk Ψ 2 2 = K(q )v + b(q ) The 2-stage Lobatto IIIA-B SPARK (Verlet) method: MV = Mv h 2 ( U(q ) + K(q ) T Ψ ) q = q + hv or modified = K = 2 (K(q )V + b(q )) + 2 (K(q )V + b(q )) q + h «2 V V + b q + h «2 V Mv + K(q ) T h 2 Ψ 2 «= MV h 2 U(q ) K(q )v = b(q ) but no more SPARK
Main Theorem Let t,q,t,q be given. If b i = b i, bi a ij + b j â ji b i b j = for i,j =,...,s, then we have a nonholonomically constrained discrete Lagrange-d Alembert integrator in the new sense with L d (q,q ) = h s b i L(Q i,v i ) i= f d (q,q ) T = h f + d (q,q ) T = h s i= s i= b i b i h h s ã ij Ψ T j K(Q j,v j ) q V i j= s ( b j ã ij )Ψ T j K(Q j,v j ) q V i j=
Main Theorem (cont.) Moreover, if c s+ i + c i = a s+ i,s+ j + a ij â s+ i,s+ j + â ij ã s+ i,s+ j + ã ij = b s+ j = b j = b s+ j = b j = b s+ j = b j for i,j =,...,s then the SPARK method is symmetric and L d (q,q ) = L d (q,q ) f d (q,q ) = f + d (q,q ) f + d (q,q ) = f d (q,q ) as for the exact solution q(t ),q(t ) and exact terms L E E d,fd,f E+ d.
The exact discrete forcing terms From q(t) = q R t v(s)ds we have t q q(t) = R t t q v(s)ds. Hence, Similarly f E d (q, q ) T = = = = f E+ d (q, q ) T = Z t Z t «Ψ(q(t), v(t)) T K(q(t), v(t)) q v(s)ds dt t t Z t Z t «Ψ(q(t), v(t)) T K(q(t), v(t)) q v(s)ds dt t t Z t Z s «Ψ(q(t), v(t)) T K(q(t), v(t)) q v(s)dt ds t t Z t Z s «Ψ(q(t), v(t)) T K(q(t), v(t))dt t t q v(s)ds Z t Z t t s «Ψ(q(t), v(t)) T K(q(t), v(t))dt q v(s)ds
Remark For forced Lagrangians Kane, Marsden, Ortiz, and West (2) originally proposed to take as a reasonable choice f d (q,q ) T = h corresponding here to s b i f L (Q i,v i ) T q Q i i= f d (q,q ) T = h = h s b i Ψ T i K(Q i,v i ) q Q i i= s b i Ψ T i K(Q i,v i ) I + h i= j= s a ij q V j which is not equivalent
Example: The nonholonomic particle L(q,v) = 2 (v2 + v2 2 + v2 3 ) (q2 + q2 2 ) = v 3 q 2 v = ( ) T q v = ( ) T t = h =.2
Example: The nonholonomic particle (cont.) 8 x 3 stage Gauss SPARK 6 E k E 4 2 E k E 5 5 2 25 t x 2 stage Gauss SPARK 5 2 3 5 5 2 25 t 2 x 3 stage Gauss SPARK 7.5 E k E.5 5 5 2 25 t
Example: The skate on an inclined plane L(q,v) = m 2 (v2 + v 2 2) + J 2 v2 3 + mg sin(α)q = cos(q 3 )v 2 sin(q 3 )v m =, J =, g sin(α) = = ( ) T q v = ( ) T t = h =.
Example: The skate on an inclined plane (cont.) x 3 2 stage Lobatto IIIA B SPARK E k E 2 3 2 3 4 5 6 7 8 9 t 8 x 3 stage Lobatto IIIA B SPARK 7 6 E k E 4 2 2 3 4 5 6 7 8 9 t x 4 stage Lobatto IIIA B SPARK E k E.5 2 3 4 5 6 7 8 9 t
Example: A mobile robot L(q,v) = m 2 (v2 + v2 2 ) + J 2 v2 3 + 3 2 J ωv 2 4 sin(q 4) = v lcos(q 3 )v 4 = v 2 lsin(q 3 )v 4 m =, J =, J ω =, l = = ( ) T q v = ( ) T t = h =.2
Example: A mobile robot (cont.). 2 stage Lobatto IIIA B D SPARK E k E..2.3 5 5 t 6 x 3 stage Lobatto IIIA B D SPARK 4 4 E k E 2 E k E 2 5 5 t x 4 stage Lobatto IIIA B D SPARK 6 2 5 5 t
Example: McLachlan and Perlmutter s particles T(v) = 2 v 2 2, n = 2m + (m 2) U(q) = m! q 2 2 2 + q2 m+2 q2 m+3 + X q+i 2 q2 m++i i= nx = v + q i v i t = i=m+2 q j = ` cos(jπ/(2j)).6.4.2 T v j = ` sin(jπ/(2j)) T E = 3.6 h =.5 j =,..., J j =,..., J Let µ((e k E ) 2 ) := (J+) P J j= (E jk E ) 2 and J + =
Lagrange-d Alembert integrators for constrained systems in mechanics.k 2 µ((e E ) )/h 4 Example: McLachlan and Perlmutter s particles (cont.) 2 stage Lobatto IIIA B SPARK 5.5.5 2 2.5 3 3.5 4 4.5 5 4.k 2 µ((e E ) )/h 4 x modified 2 stage Lobatto IIIA B SPARK 5.5.5 2 2.5 3 3.5 4 4.5 5 4.k 2 µ((e E ) )/h 4 x McLachlan Perlmutter 2 stage Lobatto IIIB A 5 We observe.5 h4.5 2 2.5 t 3 µ((e k E )2 ) O(tk ) or equivalently like for a random walk 3.5 4 4.5 5 4 x p µ((e k E )2 ) O(h2 tk )
Constrained systems in mechanics is a system of DAEs where d dt y = v(y,z) d p(y, z) dt = f (y, z, ψ) + r(y, λ) = g(y) y : coordinates v : velocities p : momenta f,r : forces = g y(y)v(y, z) = k(y, z) g : holonomic constraints λ : Lagrange multipliers associated to g k : nonholonomic constraints ψ : Lagrange multipliers associated to k Lagrange s mechanics: v(y, z) z Hamilton s mechanics: p(y, z) z
Constrained systems in mechanics (cont.) This system of DAEs is: overdetermined implicit partitioned additive (split) Manifold of constraints: M := {(y,z) R ny R nz = g(y), = g y(y)v(y, z), = k(y, z)} Assumptions: (q,v ) M, v,p, f,... sufficiently differentiable, and invertibility of pz r λ g yv z O «, = existence and uniqueness of a solution @ pz r λ f ψ g yv z O O k z O O A ()
SPARK methods Y i = y + h sx α ij v(y j,z j ) i =,...,s + j= y = Y s+ sx esx p(y i,z i ) = p(y, z ) + h bα ij f (Y j,z j, Ψ j ) + h eα ij r( Y e j, Λ e j ) i =,..., s + z = Z s+ ey i = y + h j= sx a ij v(y j,z j ) j= i =,,..., es = g( e Y i ) i =,,..., es ( e Y = y ) = g(y ) (y = e Y es ) = g y(y )v(y, z ) = sx b j c i j k(y j,z j ) i =,..., s j= = k(y, v ) j=
Some definitions α := A b T «, bα := ba b b T eq := ` I s s + AM ½ s M := B @ b T b T b T A. b T (s )b T C s 2 A!, eα := b T A C A D(s ) = B @ ea e b T!, ½ s := B @., b T b T C. b T C s C A C A, C := diag(c,..., c s), with simplifying assumption D(s ) : kb T C k A = b T b T C k k =,..., s Q := ˇQ := Q eq γ T!, γ T := γ s+ b T A, Ǎ! a a s s T, Ǎ := B.. s @.... C. A a s a ss where we assume es = s
Equivalent reformulation of SPARK methods p(y,z ) = (Q I nz ) BB. C @@ p(y A ½ s+ p(y,z ) s,z s) p(y,z ) f (Y,Z,Ψ ) r( Y e, e Λ ) B C h(bα I nz ) @. A h(eα I nz ) B @ CC. AA f (Y s,z s,ψ s) r( Y e s, Λ e s) h g y + h P s j= a jv(y j,z j ) = (ˇQ I nλ ). B @ h g y + h P s j= a C sjv(y j,z j ) A g y(y )v(y,z ) k(y,z ) = ( Q e I nψ ) B. C @ k(y A s,z s) k(y, z )
Modified Newton iterations Modified Jacobian of the reformulated SPARK methods B @ I s+ I ny O O O O Q p z hq eα r λ hq bα f ψ O Q g yv z O O O Q e kz O O For the modified Newton iterations to obtain a block diagonal linear system with the 2 matrices () we define the intermediate quantities C A B @ B @ z.. z s z s+ ψ.. ψ s Z C A := (Q Inz ) B. @ Z s z C A := h( Q e bα I nψ ) C A, Ψ B @. Ψ s C A B @ λ.. λ s λ s+ C A := h(q eα In ) λ B @ e Λ e Λ. Λ e s C A
Modified Newton iterations (cont.) We assume and we use B @ Ψ. Ψ s Z B. @ Z s z B @ e Λ e Λ. Λ e s eq bα Q bα = T s «C A = h (( Q e bα) I nψ ) B @ ψ.. ψ s z C A = (Q I nz ) B. C @ z A s z s+ λ C A = h ((Q eα) I nλ ) B @. λ s λ s+ C A C A
Example: The skate on an inclined plane in Cartesian coordinates L(q,v) = m 4 (v2 + v2 2 + v2 3 + v2 4 ) + mg sin(α)(q + q 3 ) 2 = ( (q3 q ) 2 + (q 4 q 2 ) 2 l 2) =: g(q) 2 = (q 3 q )(v 3 v ) + (q 4 q 2 )(v 4 v 2 ) =: g q (q)v = (q 3 q )(v 2 + v 4 ) (q 4 q 2 )(v + v 3 ) =: k(q,v) m =, g sin(α) =, l = 2 q = l ( ) T 2 v = l ( ) T 2 t = h =.
Example: The skate on an inclined plane in Cartesian coordinates (cont.) 3 x 3 stage Gauss Lobatto SPARK 2.5 2 E n E.5.5 2 3 4 5 6 7 8 9 t x 7 2 stage Gauss Lobatto SPARK 2 E n E 3 4 5 6 7 2 3 4 5 6 7 8 9 t
Conclusions We have presented a new discrete Lagrange-d Alembert principle for Lagrangian systems with nonholonomic constraints which is consistent with the discrete Lagrange-d Alembert principle for forced Lagrangian systems of Kane, Marsden, Ortiz, and West Unlike Cortés principle the new discrete Lagrange-d Alembert principle is satisfied 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 efficiently but is not straightforward
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, 25) Backward error analysis Reduction theory Dissipation/friction/impact/contact