Modeling Physics with Differential-Algebraic Equations
Lecture 1
General Introduction to Differential Equations
COMASIC (M2) December 4th, 2019
Khalil Ghorbal khalil.ghorbal@inria.fr
- K. Ghorbal (INRIA)
1 COMASIC M2 1 / 21
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
Modeling Physics with Differential-Algebraic Equations
Lecture 1
General Introduction to Differential Equations
COMASIC (M2) December 4th, 2019
Khalil Ghorbal khalil.ghorbal@inria.fr
1 COMASIC M2 1 / 21
Ordinary Differential Equations
Intuitions
Functional equation with derivatives
(x′, y′) = dx dt , dy dt
x, ˙ y) = (−y, x − y)
Local description of motion
2 COMASIC M2 2 / 21
Ordinary Differential Equations
Intuitions
Functional equation with derivatives
(x′, y′) = dx dt , dy dt
x, ˙ y) = (−y, x − y)
Local description of motion
2 COMASIC M2 2 / 21
Ordinary Differential Equations
Very Useful
Ordinary (or Total) vs Partial ( ∂
∂u)
3 COMASIC M2 3 / 21
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.”
3 COMASIC M2 3 / 21
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
3 COMASIC M2 3 / 21
Langton’s ant
Conway’s Game of Life
An ant starts somewhere on a black and white squared plane
4 COMASIC M2 4 / 21
Solving Differential Equations
Analytical/Symbolic
(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
instance the first-order homogeneous equation y′ = ay: y = y0 exp(at)
then x(t) = 2 √π x exp(−t2)dt
5 COMASIC M2 5 / 21
Solving Differential Equations
Analytical/Symbolic
(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
instance the first-order homogeneous equation y′ = ay: y = y0 exp(at)
then x(t) = 2 √π x exp(−t2)dt
5 COMASIC M2 5 / 21
Solving Differential Equations
Analytical/Symbolic
(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
instance the first-order homogeneous equation y′ = ay: y = y0 exp(at)
then x(t) = 2 √π x exp(−t2)dt
5 COMASIC M2 5 / 21
Finite Time Explosion Problems
1
1 x0 −t
x0 , maximum interval (−∞, 1 x0 )
6 COMASIC M2 6 / 21
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
7 COMASIC M2 7 / 21
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 It boils down to approximate the integral term
7 COMASIC M2 7 / 21
Numerical Integration:Convergence and Stability
Numerical Analysis
when the discrete step goes toward zero ? The order gives the local quality of convergence.
8 COMASIC M2 8 / 21
Numerical Integration:Convergence and Stability
Numerical Analysis
when the discrete step goes toward zero ? The order gives the local quality of convergence.
(x′, y′) = (−y, x) Euler (order 1) Runge-Kutta (order 4)
8 COMASIC M2 8 / 21
Other Methods
Symplectic Methods)
simulating sparse systems
9 COMASIC M2 9 / 21
Other Methods
Symplectic Methods)
simulating sparse systems (x′, y′) = (−y, x) Symplectic Integration
9 COMASIC M2 9 / 21
Qualitative Analysis
( ˙ x1, ˙ x2) = (x1 − x3
1 − x2 − x1x2 2, x1 + x2 − x2 1x2 − x3 2)
Invariant Equation
The solution for x0 = (1, 0) respects x1(t)2 + x2(t)2 − 1 = 0 ∀t
10 COMASIC M2 10 / 21
Why Are Invariants Important ?
Numerical Integration & Qualitative Analysis
(some invariants represent conserved quantities like momentum or energy)
Formal Verification
11 COMASIC M2 11 / 21
Problem I. Checking Invariance of Algebraic Equations
Given ˙ x = (−2x2, −2x1 − 3x2
1), p(x0) = 0, is p(x(t)) = 0 for all t ?
1 + x3 1 − x2 2
p(x1, x2) = x1 − x2
2
12 COMASIC M2 12 / 21
Problem I. Checking Invariance of Algebraic Equations
Given ˙ x = (−2x2, −2x1 − 3x2
1), p(x0) = 0, is p(x(t)) = 0 for all t ?
1 + x3 1 − x2 2
p(x1, x2) = x1 − x2
2
12 COMASIC M2 12 / 21
Problem II. Generate Algebraic Invariant Equations
Given ˙ x = (−x1 + 2x2
1x2, −x2), how to generate p such that p(x(t)) = 0 ?
13 COMASIC M2 13 / 21
Problem II. Generate Algebraic Invariant Equations
Given ˙ x = (−x1 + 2x2
1x2, −x2), how to generate p such that p(x(t)) = 0 ?
2) = 0
13 COMASIC M2 13 / 21
Problem II. Generate Algebraic Invariant Equations
Given ˙ x = (−x1 + 2x2
1x2, −x2), how to generate p such that p(x(t)) = 0 ?
2) = 0 x1 x2−x1x2
2 is an invariant rational function.
13 COMASIC M2 13 / 21
So far ...
1 Ordinary Differential Equations:
2 Next: Differential-Algebraic Equations (Examples)
14 COMASIC M2 14 / 21
Pendulum
(Photo source: Wolfram)
15 COMASIC M2 15 / 21
Pendulum
(Photo source: Wolfram)
¨ x = −λx ¨ y = −λy − g (Newton’s law) = L2 − x2 − y2 (Algebraic constraint)
15 COMASIC M2 15 / 21
Pendulum
(Photo source: Wolfram)
¨ x = −λx ¨ y = −λy − g (Newton’s law) = L2 − x2 − y2 (Algebraic constraint) State variables: (x, y, ˙ x, ˙ y): x, y differential variables λ algebraic variable
15 COMASIC M2 15 / 21
Analytical Mechanics
Lagrange Equations
Lagrange Equations
d dt ∂L ∂ ˙ q
∂q = Q + F tλ
16 COMASIC M2 16 / 21
RLC Circuit
17 COMASIC M2 17 / 21
RLC Circuit
˙ VC = I
C
˙ I = VL
L
= VR − RI Ohm’s Law = VS − VR − VL − VC Algebraic Constraint State variables: (VR, VC, VL, I)
17 COMASIC M2 17 / 21
Tracking Control Problems
Inverted Pendulum - Segway
(Photo source: Wikipedia)
State variables: (θ, x) L = 1 2Mv2
1 + 1
2mv2
2 − mgℓ cos(θ)
v1 = d dt x, 0
d dt (x − ℓ sin(θ)), d dt (ℓ cos(θ))
18 COMASIC M2 18 / 21
Inverted Pendulum, Continued
Lagrange Equations
F = (M + m)¨ x − mℓ¨ θ cos(θ) + mℓ ˙ θ2 sin(θ) ¨ x cos(θ) = ℓ¨ θ − g sin(θ)
19 COMASIC M2 19 / 21
Inverted Pendulum, Continued
Lagrange Equations
F = (M + m)¨ x − mℓ¨ θ cos(θ) + mℓ ˙ θ2 sin(θ) ¨ x cos(θ) = ℓ¨ θ − g sin(θ) Control Problem: Find F such that θ ∈ [θr − ǫ, θr + ǫ] for some given reference value θr
19 COMASIC M2 19 / 21
Some Forms of DAEs
f (˙ x, x, t) = 0, (f nonlinear)
A(t)˙ x + B(t)x + c(t) = 0 .
˙ x = f (x, y, t) = g(x, y, t) .
20 COMASIC M2 20 / 21
Some Forms of DAEs
f (˙ x, x, t) = 0, (f nonlinear)
A(t)˙ x + B(t)x + c(t) = 0 .
˙ x = f (x, y, t) = g(x, y, t) .
20 COMASIC M2 20 / 21
Some Forms of DAEs
f (˙ x, x, t) = 0, (f nonlinear)
A(t)˙ x + B(t)x + c(t) = 0 .
˙ x = f (x, y, t) = g(x, y, t) .
20 COMASIC M2 20 / 21
To conclude
Next Lecture: More on DAEs
Some References
1998
European Mathematical Society, 2006
21 COMASIC M2 21 / 21