modeling physics with differential algebraic equations
play

Modeling Physics with Differential-Algebraic Equations Lecture 1 - PowerPoint PPT Presentation

Modeling Physics with Differential-Algebraic Equations Lecture 1 General Introduction to Differential Equations COMASIC (M2) December 4th, 2019 Khalil Ghorbal k halil.ghorbal@inria.fr K. Ghorbal (INRIA) 1 COMASIC M2 1 / 21 Ordinary


  1. Modeling Physics with Differential-Algebraic Equations Lecture 1 General Introduction to Differential Equations COMASIC (M2) December 4th, 2019 Khalil Ghorbal k halil.ghorbal@inria.fr K. Ghorbal (INRIA) 1 COMASIC M2 1 / 21

  2. Ordinary Differential Equations Intuitions Functional equation with derivatives � dx dt , dy � ( x ′ , y ′ ) = = (˙ x , ˙ y ) = ( − y , x − y ) dt Local description of motion K. Ghorbal (INRIA) 2 COMASIC M2 2 / 21

  3. Ordinary Differential Equations Intuitions Functional equation with derivatives � dx dt , dy � ( x ′ , y ′ ) = = (˙ x , ˙ y ) = ( − y , x − y ) dt Local description of motion K. Ghorbal (INRIA) 2 COMASIC M2 2 / 21

  4. Ordinary Differential Equations Very Useful Ordinary (or Total) vs Partial ( ∂ ∂ u ) K. Ghorbal (INRIA) 3 COMASIC M2 3 / 21

  5. Ordinary Differential Equations Very Useful Ordinary (or Total) vs Partial ( ∂ ∂ u ) Sophus Lie “Among all of the mathematical disciplines the theory of differential equations is the most important(...) It furnishes the explanation of all those elementary manifestations of nature which involve time.” K. Ghorbal (INRIA) 3 COMASIC M2 3 / 21

  6. Ordinary Differential Equations Very Useful Ordinary (or Total) vs Partial ( ∂ ∂ u ) Sophus Lie “Among all of the mathematical disciplines the theory of differential equations is the most important(...) It furnishes the explanation of all those elementary manifestations of nature which involve time.” Convenient modeling language • Continuous dynamics (vs discrete) • No Boundary conditions (entire space) • No memory (next state completely determined from the current) K. Ghorbal (INRIA) 3 COMASIC M2 3 / 21

  7. Langton’s ant Conway’s Game of Life An ant starts somewhere on a black and white squared plane • if the square is white, the ant turns right then move forward • if the square is black, the ant turns left then move forward • the ant flips the color of its square before moving 30 20 20 10 10 - 20 - 10 10 20 - 20 - 10 10 20 30 - 10 - 10 - 20 - 20 - 30 K. Ghorbal (INRIA) 4 COMASIC M2 4 / 21

  8. Solving Differential Equations Analytical/Symbolic • Cauchy-Lipschitz theorem: Local existence and unicity theorem (assuming Lipschitz continuity) f : R → R is Lipschitz continuous in X ⊂ R if and only if there exists K ≥ 0 such that | f ( y ) − f ( x ) | ≤ K | y − x | , ∀ x , y ∈ X • Solutions often involve transcendental functions (sine, exp, etc.) For instance the first-order homogeneous equation y ′ = ay : y = y 0 exp( at ) • Liouville theorem: No closed form solutions in general x ′ = exp( − t 2 ) then � x 2 exp( − t 2 ) dt x ( t ) = √ π 0 K. Ghorbal (INRIA) 5 COMASIC M2 5 / 21

  9. Solving Differential Equations Analytical/Symbolic • Cauchy-Lipschitz theorem: Local existence and unicity theorem (assuming Lipschitz continuity) f : R → R is Lipschitz continuous in X ⊂ R if and only if there exists K ≥ 0 such that | f ( y ) − f ( x ) | ≤ K | y − x | , ∀ x , y ∈ X • Solutions often involve transcendental functions (sine, exp, etc.) For instance the first-order homogeneous equation y ′ = ay : y = y 0 exp( at ) • Liouville theorem: No closed form solutions in general x ′ = exp( − t 2 ) then � x 2 exp( − t 2 ) dt x ( t ) = √ π 0 K. Ghorbal (INRIA) 5 COMASIC M2 5 / 21

  10. Solving Differential Equations Analytical/Symbolic • Cauchy-Lipschitz theorem: Local existence and unicity theorem (assuming Lipschitz continuity) f : R → R is Lipschitz continuous in X ⊂ R if and only if there exists K ≥ 0 such that | f ( y ) − f ( x ) | ≤ K | y − x | , ∀ x , y ∈ X • Solutions often involve transcendental functions (sine, exp, etc.) For instance the first-order homogeneous equation y ′ = ay : y = y 0 exp( at ) • Liouville theorem: No closed form solutions in general x ′ = exp( − t 2 ) then � x 2 exp( − t 2 ) dt x ( t ) = √ π 0 K. Ghorbal (INRIA) 5 COMASIC M2 5 / 21

  11. Finite Time Explosion Problems • x ′ = x 2 , x (0) = x 0 (Only locally Lipschitz) 1 • x ( t ) = 1 x 0 − t • Singularity at t = 1 x 0 , maximum interval ( −∞ , 1 x 0 ) 4 3 2 1 - 2.0 - 1.5 - 1.0 - 0.5 0.5 1.0 K. Ghorbal (INRIA) 6 COMASIC M2 6 / 21

  12. Solving Differential Equations Numerical Numerical Integration Euler Integration Schemes x ′ = f ( x ) x • = x + f ( x ) δ Explicit x • = x + f ( x • ) δ Implicit Other similar Integration Schemes: the Runge-Kutta family K. Ghorbal (INRIA) 7 COMASIC M2 7 / 21

  13. Solving Differential Equations Numerical Numerical Integration Euler Integration Schemes x ′ = f ( x ) x • = x + f ( x ) δ Explicit x • = x + f ( x • ) δ Implicit Other similar Integration Schemes: the Runge-Kutta family Picard Iterations � δ x • = x + f ( x ) dt 0 It boils down to approximate the integral term K. Ghorbal (INRIA) 7 COMASIC M2 7 / 21

  14. Numerical Integration:Convergence and Stability Numerical Analysis • Convergence : does the numerical scheme approximates the solution when the discrete step goes toward zero ? The order gives the local quality of convergence. • Stability : the propagation of errors (stiffness). K. Ghorbal (INRIA) 8 COMASIC M2 8 / 21

  15. Numerical Integration:Convergence and Stability Numerical Analysis • Convergence : does the numerical scheme approximates the solution when the discrete step goes toward zero ? The order gives the local quality of convergence. • Stability : the propagation of errors (stiffness). ( x ′ , y ′ ) = ( − y , x ) Euler (order 1) Runge-Kutta (order 4) K. Ghorbal (INRIA) 8 COMASIC M2 8 / 21

  16. Other Methods • Geometrical Integration : invariant-aware integration (e.g. Symplectic Methods) • Quantized State Systems (QSS) Methods: efficient when simulating sparse systems K. Ghorbal (INRIA) 9 COMASIC M2 9 / 21

  17. Other Methods • Geometrical Integration : invariant-aware integration (e.g. Symplectic Methods) • Quantized State Systems (QSS) Methods: efficient when simulating sparse systems ( x ′ , y ′ ) = ( − y , x ) Symplectic Integration K. Ghorbal (INRIA) 9 COMASIC M2 9 / 21

  18. Qualitative Analysis x 2 ) = ( x 1 − x 3 1 − x 2 − x 1 x 2 2 , x 1 + x 2 − x 2 1 x 2 − x 3 ( ˙ x 1 , ˙ 2 ) ��� ��� Algebraic ��� � � Invariant Equation - ��� - ��� - ��� - ��� ��� ��� ��� � � The solution for x 0 = (1 , 0) respects x 1 ( t ) 2 + x 2 ( t ) 2 − 1 = 0 ∀ t K. Ghorbal (INRIA) 10 COMASIC M2 10 / 21

  19. Why Are Invariants Important ? Numerical Integration & Qualitative Analysis • More precise numerical integration (Geometrical Integration) • Better understanding of the dynamics without solving the problem (some invariants represent conserved quantities like momentum or energy) Formal Verification • Formal verification for dynamical and hybrid systems • Static Analysis (as templates to statically analyze an implementation) • Safety, Reachability, Stability K. Ghorbal (INRIA) 11 COMASIC M2 11 / 21

  20. Problem I. Checking Invariance of Algebraic Equations x = ( − 2 x 2 , − 2 x 1 − 3 x 2 Given ˙ 1 ), p ( x 0 ) = 0, is p ( x ( t )) = 0 for all t ? ��� ��� ��� ��� ��� ��� � � � � - ��� - ��� - ��� - ��� - ��� - ��� ��� ��� ��� - ��� - ��� ��� ��� ��� � � � � p ( x 1 , x 2 ) = x 2 1 + x 3 1 − x 2 p ( x 1 , x 2 ) = x 1 − x 2 2 2 K. Ghorbal (INRIA) 12 COMASIC M2 12 / 21

  21. Problem I. Checking Invariance of Algebraic Equations x = ( − 2 x 2 , − 2 x 1 − 3 x 2 Given ˙ 1 ), p ( x 0 ) = 0, is p ( x ( t )) = 0 for all t ? ��� ��� ��� ��� ��� ��� � � � � - ��� - ��� ���� ����� - ��� - ��� - ��� - ��� ��� ��� ��� - ��� - ��� ��� ��� ��� � � � � p ( x 1 , x 2 ) = x 2 1 + x 3 1 − x 2 p ( x 1 , x 2 ) = x 1 − x 2 2 2 K. Ghorbal (INRIA) 12 COMASIC M2 12 / 21

  22. Problem II. Generate Algebraic Invariant Equations x = ( − x 1 + 2 x 2 Given ˙ 1 x 2 , − x 2 ), how to generate p such that p ( x ( t )) = 0 ? ��� ��� � ��� � � - ��� - ��� - ��� - ��� ��� ��� ��� � � K. Ghorbal (INRIA) 13 COMASIC M2 13 / 21

  23. Problem II. Generate Algebraic Invariant Equations x = ( − x 1 + 2 x 2 Given ˙ 1 x 2 , − x 2 ), how to generate p such that p ( x ( t )) = 0 ? ��� ��� ��� � � - ��� - ��� - ��� - ��� ��� ��� ��� � � p ( x 1 (0) , x 2 (0)) ( x 1 , x 2 ) = ( x 2 (0) − x 1 (0) x 2 (0) 2 ) x 1 − x 1 (0) ( x 2 − x 1 x 2 2 ) = 0 K. Ghorbal (INRIA) 13 COMASIC M2 13 / 21

  24. Problem II. Generate Algebraic Invariant Equations x = ( − x 1 + 2 x 2 Given ˙ 1 x 2 , − x 2 ), how to generate p such that p ( x ( t )) = 0 ? ��� ��� ��� � � - ��� - ��� - ��� - ��� ��� ��� ��� � � p ( x 1 (0) , x 2 (0)) ( x 1 , x 2 ) = ( x 2 (0) − x 1 (0) x 2 (0) 2 ) x 1 − x 1 (0) ( x 2 − x 1 x 2 2 ) = 0 x 1 2 is an invariant rational function . x 2 − x 1 x 2 K. Ghorbal (INRIA) 13 COMASIC M2 13 / 21

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend