Accurate Simulation of Rigid Body Rotation and Extensions to Lie Groups
Total Page:16
File Type:pdf, Size:1020Kb
Accurate Simulation of Rigid Body Rotation and Extensions to Lie Groups Sam Buss Dept. of Mathematics U.C. San Diego Visible Luncheon Gwyddor Cyfrifiador University of Swansea March 3, 2011 Topics: ◮ Algorithms for simulating rotating rigid bodies. ◮ All algorithms preserve angular momentum. ◮ Algorithms can be made energy preserving. ◮ Generalization to Lie group setting. Talk outline: 1. Rigid body rotations. 1st thru 4th order algorithms. Unexpected terms. 2. Generalization to Taylor series methods over Lie groups/Lie algebras. 3. Energy preservation based on Poinsot ellipsoid. 4. Numerical simulations and efficiency. 1 Part I: The simple rotating, rigid body I = Inertia matrix (tensor). ω L = Angular momentum. ω = Rotation axis & rate, L L = Iω (Euler’s equation) ω = I−1L ω˙ = I−1(L˙ ω Iω) − × ω¨ = ω ω˙ + I−1(L¨ ω˙ L 2ω L˙ + ω (ω L)) × − × − × × × ... ... ω = 2ω ω¨ ω (ω ω˙ ) + I−1[L 3ω L¨ 3ω˙ L˙ ω¨ L × − × × − × − × − × + ω˙ (ω L) + 2ω (ω˙ L) + 3ω (ω L˙ ) ω (ω (ω L))] × × × × × × − × × × Wobble: ω˙ = 0 even when no applied torque (L˙ = 0). 6 vL˙ = Rate of change of momentum = Applied Torque. 2 Framework for simulating rigid body motion We assume the rigid body has a known angular momentum, and the external torques are completely known. The orientation (and hence the angular velocity) is updated in discrete time steps, at times t0, t1, t2,.... Update Step: At a given time t , let h = ∆t = t t , and assume i i+1 − i orientation Ωi at time ti is known, and that momentum is known (at all times). Update step calculates a net rotation rate vector, ω¯, and sets Ωi+1 = Rhω¯ Ωi, where Rν performs a rotation around axis ν of angle ν . || || Nearly every rigid body simulation method fits this framework. 3 First-order update method Use ω = I−1L as the estimate for ω¯. First-order algorithm: Set := −1 . ω¯ ωi = Ii Li Set Ωi+1 := Rhω¯ Ωi. This first-order method performs poorly. A wobbling, spinning object quickly gains energy and soon ends up spinning on a principal axis. “Good enough for computer games” (?) 4 Second-order update method h Use ω and ω˙ to estimate ω¯ as ω¯ = ω + 2ω˙ . Second-order algorithm: Set := −1 . ωi Ii Li Set := −1 ˙ . ω˙ i Ii (Li ωi Li) Set := h −. × ω¯ ωi + 2ω˙ i Set Ωi+1 := Rhω¯ Ωi. The second-order method performs substantially better. However, a wobbling, spinning object still steadily gains energy and ends up spinning on a principal axis. 5 False third-order update method h h2 Try using ω, ω˙ and ω¨ to estimate ω¯ as ω¯ = ω + 2ω˙ + 3! ω¨. False third-order algorithm: Set := −1 . ωi Ii Li Set := −1 ˙ . ω˙ i Ii (Li ωi Li) Set := − −1ר ˙ . ω¨ i ωi ω˙i + Ii (Li ω˙ i Li 2ωi Li + ωi (ωi Li)) Set := × 1 1 2−. × − × × × ω¯ ωi + 2ω˙ ih + 6ω¨h Set Ωi+1 := Rhω¯ Ωi. Surprisingly, this however turns out to be slightly worse than the second- order method! In fact, the Taylor series estimate for ω¯ is not second-order accurate. 6 The new third-order term - Motivation A rolling disk - Total rotation ϕ in time t0 (or tall skinny cone): b a′ ϕ ϕ c c′ a b′ 1 p p + 2vt0 p + vt0 ω - at point p, pointing into figure, i.e., away from viewer. ω˙ - pointing to the right. 7 The new third-order term - Motivation A rolling disk - Total rotation ϕ in time t0 (or tall skinny cone): ϕ q b a′ c ′ ϕ/2 ϕ/2 c a b′ 1 p p + 2vt0 p + vt0 ω - at point p, pointing into figure, i.e., away from viewer. ω˙ - pointing to the right. ω¯ - correct value is the point q, since a rotation around q yields the correct net motion. 8 ϕ ω¯ ∞ - ideal rotation center ω¯ ∞ ω¯ 2+ ω¯ 1 ω¯ 2 ω¯ 1 - 1st order update ω¯ 2 - 2nd order update ω¯ 2+ - augmented 2nd order. 2 ω¯ = ω¯ + h ω˙ ω. 2+ 2 12 × 9 Augmented second-order update method 2 Second-order approximation: ω¯ = ω¯ + h ω˙ ω. 2+ 2 12 × Augmented second-order algorithm: Set := −1 . ωi Ii Li Set := −1 ˙ . ω˙ i Ii (Li ωi Li) − ×2 Set ω¯ := ω + hω˙ + h (ω˙ ω ). i 2 i 12 i× i Set Ωi+1 := Rhω¯ Ωi. The augmented second-order method performs substantially better than the second-order method, and has more energy stability, although the energy does drift steadily. Extra computation cost: only one more cross-product than the second- order method. 10 True third-order update method 2 Now include the new h ω˙ ω term in ω¯. 12 × True third-order algorithm: Set := −1 . ωi Ii Li Set := −1 ˙ . ω˙ i Ii (Li ωi Li) Set := − −1ר ˙ . ω¨ i ωi ω˙i + Ii (Li ω˙ i Li 2ωi Li + ωi (ωi Li)) × 2 − 2 × − × × × Set ω¯ := ω + hω˙ + h ω¨ + h ω˙ ω . i 2 i 6 i 12 i× i Set Ωi+1 := Rhω¯ Ωi. As expected, this is third-order correct, and performs better than the augmented second-order method. 11 True fourth-order update method 3 Additional new term: h ω¨ ω . (Pattern does not continue) 24 i× i True fourth-order algorithm: Set := −1 . ωi Ii Li Set ω˙ := I−1(L˙ ω L ). i i i − i× i Set ω¨ := ω ω˙ + I−1(L¨ ω˙ L 2ω L˙ + ω (ω L )). ...i i× i i i − i× i − i× i i× i× i Set ωi := ( equation on earlier slide #2 ). ··· 2 2 3 ... ···3 Set ω¯ := ω + hω˙ + h ω¨ + h ω˙ ω + h ω + h ω¨ ω . i 2 i 6 i 12 i× i 24 i 24 i× i Set Ωi+1 := Rhω¯ Ωi. Performs better than the true third-order method. Experiments confirm fourth-order accuracy. 12 Part II: Generalize to Lie groups/Lie algebras The extra third- and fourth-order terms can be generalized to the Lie group / Lie algebra setting. This gives Taylor series methods over Lie groups. Related to: Runge-Kutta methods on Lie groups by Crouch & Grossman ’93; Marthinsen & Owren ’98; Munthe-Kaas ’98,’99; who give higher order corrector terms for Runge-Kutta algorithms. We write [u, v] for u v. Also, [u, v, w] for [u, [v, w]]. u, v,... are Lie group elements, and [×, ] is a Lie group product. · · We now use “W ” instead of “ω”, etc. These are elements of the associated Lie algebra. For Z is in the Lie algebra, exp(Z) is in the Lie group. z = exp(Z) is analogous to the rotation operation represented by rotation vector Z. So, Z ω¯ and exp(Z) Rω. ∼ ∼ ¯ 13 Suppose W (t) is a time-varying Lie algebra element. Let h > 0. We want to find a Z = Z(h) which is equivalent to applying W (t) over the time interval 0 to h: 0 h ih exp(h Z) = lim exp W . · N→∞ N · N i=YN−1 Analogy: W (t) is time varying instantaneous rotation vector. Z is ω¯. Goal: Find power series for Z in terms of W (0), W˙ (0), W¨ (0),.... Let Y = Y (h)= h Z. Let y(h) = exp(Y ). Now, by defn of Z, Y , y, · y′(t) = W (t). Also, taking first derivative of y(h) = exp(Y ), ′ ′ y (t) = (d exp)Y (t)(Y (t)). 14 Power Series expansions: (W0 = W (0), W˙ 0 = W˙ (0), etc.) 1 1 1 (d exp) = 1+ ad(Y )+ (ad(Y ))2 + (ad(Y ))3 + Y 2 3! 4! ··· (recall (ad(A))(B)=[A, B].) 1 2 1 3 ... W (t) = W0 + tW˙ 0 + t W¨ 0 + t W 0 + , 2 3! ··· Y (t) = tY + 1t2Y + 1 t3Y + 1 t4Y + , 0 2 1 3! 2 4! 3 ··· Y ′(t) = Y + Y t + 1Y t2 + 1 Y t3 + . 0 1 2 2 3! 3 ··· Equating coefficients of powers of t and solving for Yi’s gives: Y0 = W0. Y1 = W˙ 0. 1 Y = W¨ + [W˙ ,W ]. analogous to the “2+” term. 2 0 2 0 0 ... Y3 = W 0 +[W¨ 0,W0]. analogous to the “3+” term. 15 .... 3 ... 1 1 Y4 = W 0 + [W 0,W0]+[W¨ 0, W˙ 0]+ [W˙ 0, W˙ 0,W0] [W0, W¨ 0,W0] 2 2 − 6 1 ˙ 6[W0,W0, W0,W0]. .....− ... .... 5 ˙ ¨ ˙ 1 ˙ ¨ Y5 = W 0 + 2[W 0, W0]+2[W 0,W0]+2[W0, W0,W0]+ 2[W0, W0,W0] 1 ... 1 [W0, W 0,W0] [W0,W0, W¨ 0,W0] [W0, W˙ 0, W˙ 0,W0]. −2 − 2 − Fifth-order accurate formula for Z(h)= h−1Y (h): 2 3 ... 3 h ˙ h ¨ 1 2 ˙ h h ¨ Z(h) = W0 + 2W0 + 6 W0 + 12h [W0,W0]+ 24W 0 + 24[W0,W0] 4 .... 4 ... 4 4 h h h ¨ ˙ h ˙ ˙ +120W 0 + 80[W 0,W0]+ 120[W0, W0]+ 240[W0, W0,W0] 4 4 h [W , W¨ ,W ] h [W ,W , W˙ ,W ] −720 0 0 0 − 720 0 0 0 0 5 ..... 5 ... 5 .... 5 h h ˙ h h ¨ ˙ +720 W 0 + 288[W 0, W0]+ 360[W 0,W0]+ 360[W0, W0,W0] h5 h5 ... h5 + [W˙ 0, W¨ 0,W0] [W0, W 0,W0] [W0,W0, W¨ 0,W0] 1440 − 1440 − 1440 5 5 h [W ,W , W¨ ,W ] h [W , W˙ , W˙ ,W ]+ O(h6). −1440 0 0 0 0 − 720 0 0 0 0 16 Part III: Back to rigid body: Poinsot inertial ellipsoid Inertial ellipsoid Polhode Invariable plane Herpolhode Inertial ellipsoid is attached to the rigid body, and rolls on the plane.