variational time integrators
play

Variational Time Integrators Symposium on Geometry Processing - PowerPoint PPT Presentation

Variational Time Integrators Symposium on Geometry Processing Course 2015 Andrew Sageman-Furnas University of Gttingen 1 Sunday, July 5, 15 Time Integrator Differential equations in time describe physical paths Solve for these paths on


  1. Fundamental Lemma of Variational Calculus if For a continuous function G Z t 2 G ( t ) η ( t ) dt = 0 t 1 η ( t 1 ) = η ( t 2 ) = 0 for all smooth functions η ( t ) , with then G vanishes everywhere in the interval. 26 Sunday, July 5, 15

  2. Fundamental Lemma of Variational Calculus if For a continuous function G Z t 2 G ( t ) η ( t ) dt = 0 t 1 η ( t 1 ) = η ( t 2 ) = 0 for all smooth functions η ( t ) , with then G vanishes everywhere in the interval. ...believable, but why? 26 Sunday, July 5, 15

  3. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. Assume G t 2 t 1 27 Sunday, July 5, 15

  4. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. η t 2 t 1 28 Sunday, July 5, 15

  5. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. G η t 2 t 1 29 Sunday, July 5, 15

  6. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. G η G η t 2 t 1 30 Sunday, July 5, 15

  7. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. G η t 2 t 1 31 Sunday, July 5, 15

  8. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. Z G η dt 6 = 0 t 2 t 1 32 Sunday, July 5, 15

  9. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. t 2 t 1 G must be zero where η is nonzero 33 Sunday, July 5, 15

  10. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. t 2 t 1 must hold for every choice of η 34 Sunday, July 5, 15

  11. Fundamental Lemma of Variational Calculus Z t 2 If for all offsets η ( t ) zero at t 1 , t 2 G ( t ) η ( t ) dt = 0 t 1 then G vanishes on the interval. So G vanishes everywhere in the interval. t 2 t 1 35 Sunday, July 5, 15

  12. Particle Example: Deriving Euler-Lagrange Equations q εη Where were we? ˜ q η Z t 2 t 1 t 2 q ( t ) + U 0 ( q ( t ))) η ( t ) dt δ η S ( q ) = − (¨ t 1 When is for all offsets η ? δ η S ( q ) = 0 36 Sunday, July 5, 15

  13. Particle Example: Deriving Euler-Lagrange Equations Z t 2 q ( t ) + U 0 ( q ( t ))) η ( t ) dt δ η S ( q ) = − (¨ t 1 Apply Fundamental Lemma q ( t ) + U 0 ( q ( t )) = 0 δ η S ( q ) = 0 ⇐ ⇒ ¨ | {z } Euler-Lagrange equations 37 Sunday, July 5, 15

  14. Particle Example: Deriving Euler-Lagrange Equations Z t 2 q ( t ) + U 0 ( q ( t ))) η ( t ) dt δ η S ( q ) = − (¨ Apply the Fundamental Lemma to see t 1 when the derivative vanishes Apply Fundamental Lemma Z δ η S ( q ) = G ( q, ˙ q, ¨ q ) η dt = 0 q ( t ) + U 0 ( q ( t )) = 0 δ η S ( q ) = 0 ⇐ ⇒ ¨ and recover the Euler-Lagrange equations. | {z } Euler-Lagrange Equations 38 Sunday, July 5, 15

  15. Particle Example: Lagrangian Reformulation q ( t ) + U 0 ( q ( t )) = 0 δ S ( q ) = 0 ⇐ ⇒ ¨ | {z } Euler-Lagrange equations 39 Sunday, July 5, 15

  16. Particle Example: Lagrangian Reformulation q ( t ) + U 0 ( q ( t )) = 0 δ S ( q ) = 0 ⇐ ⇒ ¨ | {z } Euler-Lagrange equations Wait... this looks familiar! 39 Sunday, July 5, 15

  17. Particle Example: Lagrangian Reformulation q ( t ) + U 0 ( q ( t )) = 0 δ S ( q ) = 0 ⇐ ⇒ ¨ | {z } Euler-Lagrange equations Wait... this looks familiar! is Newton’s law q ( t ) + U 0 ( q ( t )) = 0 m ¨ (reinserting mass) (force is derivative of potential energy) 39 Sunday, July 5, 15

  18. Lagrangian Reformulation Summary Principle of Stationary Action A path connecting two points is a physical path precisely when the first derivative of the action is zero. Lagrangian L ( q, ˙ q ) = T ( ˙ q ) − U ( q ) Z t 2 Action S = L ( q ( t ) , ˙ q ( t )) dt t 1 Euler-Lagrange δ S ( q ) = 0 ⇐ ⇒ F = m ¨ q Equations Fundamental Lemma 40 Sunday, July 5, 15

  19. (general) Principle of Stationary Action “Variational principles” apply to many systems, e.g., special relativity, quantum mechanics, geodesics, etc. Key is to find Lagrangian L ( t, q ( t ) , ˙ q ( t )) ⇒ d L ( t, q, ˙ q ) dt ( d L ( t, q, ˙ q ) = − d δ S ( q ) = 0 ⇐ ) d ˙ dq q Fundamental Lemma so general Euler-Lagrange equations are the equations of interest 41 Sunday, July 5, 15

  20. (general) Principle of Stationary Action “Variational principles” apply to many systems, e.g., special relativity, quantum mechanics, geodesics, etc. The Euler-Lagrange equations for a general Lagrangian are L ( t, q ( t ) , ˙ q ( t )) Key is to find Lagrangian L ( t, q ( t ) , ˙ q ( t )) d L ( t, q, ˙ q ) dt ( d L ( t, q, ˙ q ) = − d ⇒ d L ( t, q, ˙ q ) dt ( d L ( t, q, ˙ q ) = − d ) . δ S ( q ) = 0 ⇐ ) d ˙ dq q d ˙ dq q Fundamental Lemma so general Euler-Lagrange equations are the equations of interest 42 Sunday, July 5, 15

  21. Noether’s Theorem Continuous symmetries of the Lagrangian imply conservation laws for the physical system. Continuous Symmetry Conserved Quantity Translational Linear momentum Rotational Angular momentum (one dimensional) Time Total energy 43 Sunday, July 5, 15

  22. Lagrangian Paths are Symplectic (mass x velocity) momentum energy levels position 44 Sunday, July 5, 15

  23. Lagrangian Paths are Symplectic (mass x velocity) momentum energy levels position 44 Sunday, July 5, 15

  24. Lagrangian Paths are Symplectic Image from Hairer, Lubich, and Wanner 2006 (mass x velocity) momentum energy levels position in 2D equivalent to area conservation in phase space (in higher dimensions implies volume conservation) 45 Sunday, July 5, 15

  25. Variational Time Integrators Discrete Hamilton’s Principle Discretize Lagrangian Apply Variational Principle Arrive at Discrete Equations of Motion (as opposed to discretizing equations directly) 46 Sunday, July 5, 15

  26. Discrete Noether’s Theorem Discretize Lagrangian Arrive at Discrete Equations of Motion Continuous symmetries of the discrete Lagrangian imply conserved quantities throughout entire discrete motion. (for not too large time steps) 47 Sunday, July 5, 15

  27. Discrete Variational Integrators are Symplectic ... time is now discrete, so total energy is not conserved. But, discrete symplectic structure guarantees bounded oscillation around true energy level (for not too large time steps) energy true conserved energy time 48 Sunday, July 5, 15

  28. LUNCH BREAK image from openclipart.org 49 Sunday, July 5, 15

  29. Part Two: Why Use Variational Integrators? 50 Sunday, July 5, 15

  30. Quick Recap Physical paths are extremal amongst B all paths from A to B of the action integral A Action is the integral of the Lagrangian, kinetic minus potential energy Symmetries of Lagrangian and symplectic structure give rise to conservation laws 51 Sunday, July 5, 15

  31. Variational Time Integrators Discrete Hamilton’s Principle Discretize Action (integral of Lagrangian) Apply Variational Principle Arrive at Discrete Equations of Motion (as opposed to discretizing equations directly) 52 Sunday, July 5, 15

  32. Discrete Noether’s Theorem Discretize Lagrangian Arrive at Discrete Equations of Motion Continuous symmetries of discrete Lagrangian imply conserved quantities throughout entire discrete motion, e.g., conservation of linear and angular momentum (for not too large time steps) 53 Sunday, July 5, 15

  33. Discrete Variational Integrators are Symplectic ... time is now discrete, so total energy is not conserved. But, discrete symplectic structure guarantees bounded oscillation around true energy level (for not too large time steps) energy true conserved energy time 54 Sunday, July 5, 15

  34. Discrete Variational Integrators are Symplectic ... time is now discrete, so total energy is not conserved. But, discrete symplectic structure guarantees bounded oscillation around true energy level (for not too large time steps) Variational integrators are symplectic and vice versa. Both equivalent terms are used. energy true conserved energy time 55 Sunday, July 5, 15

  35. Building a Variational Time Integrator 1. Choose a finite difference scheme for ˙ q , e.g., 56 Sunday, July 5, 15

  36. Building a Variational Time Integrator 1. Choose a finite difference scheme for ˙ q , e.g., forward backward central 56 Sunday, July 5, 15

  37. Building a Variational Time Integrator 1. Choose a finite difference scheme for ˙ q , e.g., forward backward central 2. Choose a quadrature rule to integrate action, e.g., 56 Sunday, July 5, 15

  38. Building a Variational Time Integrator 1. Choose a finite difference scheme for ˙ q , e.g., forward backward central 2. Choose a quadrature rule to integrate action, e.g., rectangular midpoint trapezoid 56 Sunday, July 5, 15

  39. Building a Variational Time Integrator 1. Choose a finite difference scheme for ˙ q , e.g., forward backward central 2. Choose a quadrature rule to integrate action, e.g., rectangular midpoint trapezoid 3. Apply variational principle 56 Sunday, July 5, 15

  40. Discrete Variational Principle Example q k = q k +1 − q k k q ≈ ˙ ˙ ∆ t forward Z t + ∆ t L ( q, ˙ q ) dt ≈ ∆ t L ( q k , ˙ q k ) t rectangular Z t 2 N X L ( q, ˙ q ) dt ≈ L ( q k , ˙ q k ) ∆ t t 1 k =0 57 Sunday, July 5, 15

  41. Discrete Variational Principle Example q k = q k +1 − q k k q ≈ ˙ ˙ ∆ t forward Z t + ∆ t L ( q, ˙ q ) dt ≈ ∆ t L ( q k , ˙ q k ) t N + 1 0 rectangular Z t 2 N X L ( q, ˙ q ) dt ≈ L ( q k , ˙ q k ) ∆ t t 1 k =0 57 Sunday, July 5, 15

  42. Discrete Variational Principle Example q k = q k +1 − q k k q ≈ ˙ ˙ ∆ t forward Z t + ∆ t Choose a finite difference scheme L ( q, ˙ q ) dt ≈ ∆ t L ( q k , ˙ q k ) and quadrature rule and write t down the discrete action sum. rectangular Z t 2 N X L ( q, ˙ q ) dt ≈ L ( q k , ˙ q k ) ∆ t t 1 k =0 58 Sunday, July 5, 15

  43. Discrete Variational Principle Example q k = q k +1 − q k k q ≈ ˙ ˙ ∆ t forward Z t + ∆ t Choose a finite difference scheme L ( q, ˙ q ) dt ≈ ∆ t L ( q k , ˙ q k ) and quadrature rule and write t down the discrete action sum. N + 1 0 rectangular Z t 2 N X L ( q, ˙ q ) dt ≈ L ( q k , ˙ q k ) ∆ t t 1 k =0 58 Sunday, July 5, 15

  44. Discrete Variational Principle Example N ⇣ m ⌘ X q 2 S ∆ t = 2 ˙ k − U ( q k ) ∆ t q k = q k +1 − q k ˙ ∆ t k =0 δ η S ∆ t = d � d ε S ∆ t ( q k + εη k ) � � ε =0 0 N + 1 N X η k − U 0 ( q k ) η k ) ∆ t = ( m ˙ q k ˙ k =0 ✓ ◆ η k = η k +1 − η k ˙ ∆ t 59 Sunday, July 5, 15

  45. Discrete Variational Principle Example N ⇣ m ⌘ X q 2 S ∆ t = 2 ˙ k − U ( q k ) ∆ t q k = q k +1 − q k ˙ ∆ t k =0 δ η S ∆ t = d � d ε S ∆ t ( q k + εη k ) � � ε =0 0 N + 1 N X η k − U 0 ( q k ) η k ) ∆ t = ( m ˙ q k ˙ k =0 ✓ ◆ η k = η k +1 − η k ˙ ∆ t 59 Sunday, July 5, 15

  46. Discrete Variational Principle Example N ⇣ m ⌘ X q 2 S ∆ t = 2 ˙ k − U ( q k ) ∆ t q k = q k +1 − q k ˙ ∆ t k =0 δ η S ∆ t = d � d ε S ∆ t ( q k + εη k ) � � ε =0 0 N + 1 N X η k − U 0 ( q k ) η k ) ∆ t = ( m ˙ q k ˙ k =0 ✓ ◆ η k = η k +1 − η k ˙ ∆ t 59 Sunday, July 5, 15

  47. Discrete Variational Principle Example N X η k − U 0 ( q k ) η k ) ∆ t ( m ˙ q k ˙ δ η S ∆ t = k =0 60 Sunday, July 5, 15

  48. Discrete Variational Principle Example N X η k − U 0 ( q k ) η k ) ∆ t ( m ˙ q k ˙ δ η S ∆ t = k =0 get rid of derivates of the offset 60 Sunday, July 5, 15

  49. Discrete Variational Principle Example N X η k − U 0 ( q k ) η k ) ∆ t ( m ˙ q k ˙ δ η S ∆ t = k =0 get rid of derivates of the offset Summation by Parts N N X X η k ∆ t = bdry − q k η k +1 ∆ t q k ˙ ˙ ¨ k =0 k =0 60 Sunday, July 5, 15

  50. Discrete Variational Principle Example N X η k − U 0 ( q k ) η k ) ∆ t ( m ˙ q k ˙ δ η S ∆ t = k =0 get rid of derivates of the offset Summation by Parts N N X X η k ∆ t = bdry − q k η k +1 ∆ t q k ˙ ˙ ¨ k =0 k =0 0 recall offset vanishes at boundary η N +1 = η 0 = 0 60 Sunday, July 5, 15

  51. Discrete Variational Principle Example N N X X U 0 ( q k ) η k ∆ t δ η S ∆ t = m ¨ q k η k +1 ∆ t − − k =0 k =0 N N m ( ˙ q k +1 − ˙ q k X X U 0 ( q k ) η k ∆ t ) η k +1 ∆ t − = − ∆ t k =0 k =0 N ✓ ◆ m ˙ q k +1 − ˙ q k X + U 0 ( q k +1 ) η k +1 ∆ t = − ∆ t k =0 61 Sunday, July 5, 15

  52. Discrete Variational Principle Example N N X X U 0 ( q k ) η k ∆ t δ η S ∆ t = m ¨ q k η k +1 ∆ t − − k =0 k =0 N N m ( ˙ q k +1 − ˙ q k X X U 0 ( q k ) η k ∆ t ) η k +1 ∆ t − = − ∆ t k =0 k =0 N ✓ ◆ m ˙ q k +1 − ˙ q k X + U 0 ( q k +1 ) η k +1 ∆ t = − ∆ t k =0 61 Sunday, July 5, 15

  53. Discrete Variational Principle Example N N X X U 0 ( q k ) η k ∆ t δ η S ∆ t = m ¨ q k η k +1 ∆ t − − k =0 k =0 N N m ( ˙ q k +1 − ˙ q k X X U 0 ( q k ) η k ∆ t ) η k +1 ∆ t − = − ∆ t k =0 k =0 shift index N ✓ ◆ m ˙ q k +1 − ˙ q k X + U 0 ( q k +1 ) η k +1 ∆ t = − ∆ t k =0 61 Sunday, July 5, 15

  54. Discrete Variational Principle Example N N X X U 0 ( q k ) η k ∆ t δ η S ∆ t = m ¨ q k η k +1 ∆ t − − k =0 k =0 N N m ( ˙ q k +1 − ˙ q k X X U 0 ( q k ) η k ∆ t ) η k +1 ∆ t − = − ∆ t k =0 k =0 shift index N ✓ ◆ m ˙ q k +1 − ˙ q k X + U 0 ( q k +1 ) η k +1 ∆ t = − ∆ t k =0 ( η N +1 = η 0 = 0) 61 Sunday, July 5, 15

  55. Discrete Variational Principle Example N ✓ ◆ m ˙ q k +1 − ˙ q k X + U 0 ( q k +1 ) δ η S ∆ t = η k +1 ∆ t − ∆ t k =0 (discrete) Fundamental Lemma of Calculus of Variations ⇒ − U 0 ( q k +1 ) = m ( ˙ q k +1 − ˙ q k ) δ S ∆ t = 0 ⇐ ∆ t | {z } discrete Euler-Lagrange Recall: δ S ( q ) = 0 ⇐ ⇒ F = m ¨ q 62 Sunday, July 5, 15

  56. Discrete Variational Integrator Scheme k q k = q k +1 − q k ˙ ∆ t forward − U 0 ( q k +1 ) = m ( ˙ q k +1 − ˙ q k ) ∆ t Symplectic (variational) Euler q k +1 = q k + ∆ t ˙ q k q k + ∆ t m � 1 ( − U 0 ( q k +1 )) q k +1 = ˙ ˙ ( q k , ˙ q k ) 7! ( q k +1 , ˙ q k +1 ) 63 Sunday, July 5, 15

  57. Discrete Variational Integrator Scheme discrete Euler-Lagrange Use and forward (left) rectangular Semi-implicit Euler Symplectic Euler Method A v k +1 = v k + ∆ t ( − V 0 ( q k +1 )) q k +1 = q k + ∆ t ˙ q k q k +1 = q k + ∆ t v k q k + ∆ t m � 1 ( − U 0 ( q k +1 )) q k +1 = ˙ ˙ ( q k , v k ) 7! ( q k +1 , v k +1 ) ( q k , ˙ q k ) 7! ( q k +1 , ˙ q k +1 ) 64 Sunday, July 5, 15

  58. Discrete Variational Integrator Scheme discrete Euler-Lagrange Use and backward (left) rectangular Semi-implicit Euler Symplectic Euler Method B v k +1 = v k + ∆ t ( − V 0 ( q k +1 )) q k + ∆ t m � 1 ( − U 0 ( q k )) q k +1 = ˙ ˙ q k +1 = q k + ∆ t v k q k +1 = q k + ∆ t ˙ ( q k , v k ) 7! ( q k +1 , v k +1 ) q k +1 ( q k , ˙ q k ) 7! ( q k +1 , ˙ q k +1 ) 65 Sunday, July 5, 15

  59. Time Integration Schemes Great... we know how to derive a variational integrator, but what other integrators are there? Where do they come from? Why are they used? How do they compare? 66 Sunday, July 5, 15

  60. First Order Integration Schemes Explicit Euler Use (forward) first order Taylor approximation of motion q ( t ) ∆ t + ¨ q ( t ) 2 ∆ t 2 + ... q ( t + ∆ t ) = q ( t ) + ˙ ... q ( t ) ∆ t 2 + ... q ( t + ∆ t ) = ˙ ˙ q ( t ) + ¨ q ( t ) ∆ t + 2 67 Sunday, July 5, 15

  61. First Order Integration Schemes Explicit Euler q ( t + ∆ t ) = q ( t ) + ˙ q ( t ) ∆ t q ( t + ∆ t ) = ˙ ˙ q ( t ) + ¨ q ( t ) ∆ t 68 Sunday, July 5, 15

  62. First Order Integration Schemes Explicit Euler q ( t + ∆ t ) = q ( t ) + ˙ q ( t ) ∆ t q ( t + ∆ t ) = ˙ ˙ q ( t ) + ¨ q ( t ) ∆ t use Newton’s law F = − U 0 ( q ) = m ¨ q q ( t ) + ∆ t ( − U 0 ( q ( t )) m ˙ q ( t + ∆ t ) = m ˙ 68 Sunday, July 5, 15

  63. First Order Integration Schemes Explicit Euler q k +1 = q k + ∆ t ˙ q k q k + ∆ t m � 1 ( − U 0 ( q k )) q k +1 = ˙ ˙ Cheap to compute -- explicit dependence of variables but adds artificial driving “unstable” for large time steps (drastically deviates from true trajectories) 69 Sunday, July 5, 15

  64. Explicit Euler 2 − 6 step size in seconds 70 Sunday, July 5, 15

  65. Explicit: Time Step Refinement 2 − 6 2 − 7 2 − 8 step size in seconds 2 − 9 2 − 10 2 − 11 71 Sunday, July 5, 15

Recommend


More recommend