Characterizing Algebraic Invariants by Differential Radical - - PowerPoint PPT Presentation

characterizing algebraic invariants by differential
SMART_READER_LITE
LIVE PREVIEW

Characterizing Algebraic Invariants by Differential Radical - - PowerPoint PPT Presentation

Characterizing Algebraic Invariants by Differential Radical Invariants Khalil Ghorbal Carnegie Mellon university Joint work with Andr e Platzer CMACS AVACS November 21st, 2013 K. Ghorbal (CMU) CMACS AVACS 1 CMACS 1 / 31 Introduction


slide-1
SLIDE 1

Characterizing Algebraic Invariants by Differential Radical Invariants

Khalil Ghorbal Carnegie Mellon university

Joint work with Andr´ e Platzer

CMACS AVACS November 21st, 2013

  • K. Ghorbal (CMU)

CMACS AVACS 1 CMACS 1 / 31

slide-2
SLIDE 2

Introduction

Context: ODE in Computer Science/Formal Verification

Goal. Automated Formal Reasoning about Ordinary Differential Equations. Formal Reasoning: Global Properties of All solutions. Applications to the Formal Verification of Hybrid Systems

  • Reachability Analysis
  • Proof Rules
  • Synthesis

Useful in many other fields: Control Theory, Stability Analysis, Numerical Integration, Integrability of ODE.

  • K. Ghorbal (CMU)

CMACS AVACS 2 CMACS 2 / 31

slide-3
SLIDE 3

Introduction

Algebraic Differential Equations

Example xι = (1, 0, 0, 1) ˙ x1 = −x2 ˙ x2 = x1 ˙ x3 = x2

4

˙ x4 = x3x4 Formally, we study the Initial Value Problem: dxi(t) dt = ˙ xi = pi(x), 1 ≤ i ≤ n, x(0) = xι ∈ Rn . ⊕ Parameters are allowed ⊕ Many analytic functions can be encoded (sin, cos, ln, . . . ) ⊕/⊖ The initial value (xι) are not restricted ⊖ Evolution domain abstracted (still sound)

  • K. Ghorbal (CMU)

CMACS AVACS 3 CMACS 3 / 31

slide-4
SLIDE 4

Introduction

Approach

Algebraic Invariant Expression ∀t, h(x(t)) = 0, for all x(t) solution of the Initial Value Problem. Tools

  • Classical Algebraic Geometry: Polynomial Ring, Ideals, Varieties
  • Symbolic Linear Algebra
  • K. Ghorbal (CMU)

CMACS AVACS 4 CMACS 4 / 31

slide-5
SLIDE 5

Time Abstraction

Outline

1

Introduction

2

Time Abstraction

3

Characterization of Invariant Expressions

4

Automated Generation

5

Conclusion

  • K. Ghorbal (CMU)

CMACS AVACS 5 CMACS 5 / 31

slide-6
SLIDE 6

Time Abstraction

Orbits

Definition O(xι) def = {x(t) | t ∈ Ut} ⊆ Rn Ut domain of definition of the maximal solution of the Initial Value Problem (˙ x = p(x), x(0) = xι). Example Solar System Galileo Orbit

  • K. Ghorbal (CMU)

CMACS AVACS 6 CMACS 6 / 31

slide-7
SLIDE 7

Time Abstraction

Orbits: Issues

Example

1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0

Lissajous Curve

1.0 0.5 0.5 1.0 1.0 0.5 0.5 1.0

Cornu Spiral Solutions → Exact Orbit

  • Computation issues
  • Decidability issues
  • Idea: Time Abstraction
  • K. Ghorbal (CMU)

CMACS AVACS 7 CMACS 7 / 31

slide-8
SLIDE 8

Time Abstraction

Affine Varieties and Ideals

Polynomials h def = x4

1 + x2 2 − 2

What about the polynomials ph ? Roots of h

2 1 1 2 2 1 1 2

Ideal: stable set of polynomials under external multiplication I = h1, . . . , hr def = {r

i=1 gihi | g1, . . . , gr ∈ R[x]}

Affine Variety: common roots of all polynomials in I V (I) def = {x ∈ Rn | ∀h ∈ I, h(x) = 0}

  • K. Ghorbal (CMU)

CMACS AVACS 8 CMACS 8 / 31

slide-9
SLIDE 9

Time Abstraction

Affine Varieties and Ideals

Polynomials h def = x4

1 + x2 2 − 2

What about the polynomials ph ? Roots of h

2 1 1 2 2 1 1 2

Ideal: stable set of polynomials under external multiplication I = h1, . . . , hr def = {r

i=1 gihi | g1, . . . , gr ∈ R[x]}

Affine Variety: common roots of all polynomials in I V (I) def = {x ∈ Rn | ∀h ∈ I, h(x) = 0}

  • K. Ghorbal (CMU)

CMACS AVACS 8 CMACS 8 / 31

slide-10
SLIDE 10

Time Abstraction

Variety Embedding of Orbits

Zariski Closure

Vanishing Ideal: all polynomials that vanish on O(xι) I(O(xι)) def = {h ∈ R[x] | ∀x ∈ O(xι), h(x) = 0} Closure: Sound Abstraction O(xι) ⊆ ¯ O(xι) def = V (I(O(xι))) Orbit − → Vanishing Ideal − → Closure ⊇ Orbit Closure is the smallest variety that contains Orbit. Example ˙ x = x x(t) = xιet O(xι) = [xι, ∞[ I = 0 ¯ O(xι) = R

  • K. Ghorbal (CMU)

CMACS AVACS 9 CMACS 9 / 31

slide-11
SLIDE 11

Time Abstraction

Example: Variety Embedding

Zariski Closure (Intuition)

  • K. Ghorbal (CMU)

CMACS AVACS 10 CMACS 10 / 31

slide-12
SLIDE 12

Characterization of Invariant Expressions

Outline

1

Introduction

2

Time Abstraction

3

Characterization of Invariant Expressions

4

Automated Generation

5

Conclusion

  • K. Ghorbal (CMU)

CMACS AVACS 11 CMACS 11 / 31

slide-13
SLIDE 13

Characterization of Invariant Expressions

Hold on ...

Sound Abstraction Orbit ⊆ Closure Goal Explicit Characterization of the Vanishing Ideal I(O(xι))

  • K. Ghorbal (CMU)

CMACS AVACS 12 CMACS 12 / 31

slide-14
SLIDE 14

Characterization of Invariant Expressions

Lie Derivation

Lie derivative along a vector field Lp(h) def =

n

  • i=1

∂h ∂xi pi(x) Properties

  • Algebraic differentiation
  • Applies to the polynomial h (not the function t → h(x(t)))
  • Corresponds to the time derivative when the solution is substituted

back The Vanishing Ideal is a Differential Ideal Lp(h) ∈ I(O(xι)) for all h ∈ I(O(xι)).

  • K. Ghorbal (CMU)

CMACS AVACS 13 CMACS 13 / 31

slide-15
SLIDE 15

Characterization of Invariant Expressions

Differential Radical Invariants

Theorem h ∈ I(O(xι)) if and only if there exists a finite integer N s.t. L(N)

p

(h) ∈ L(0)

p (h), . . . , L(N−1) p

(h) ⊆ I(O(xι)) (ı) L(0)

p (h)(xι) = 0, . . . , L(N−1) p

(h)(xι) = 0 . (ıı) Proof Sketch “⇒” Ascending Chain Condition on ideals (R[x] is Notherian) “⇐” (Global) Cauchy-Lipschitz Theorem

  • K. Ghorbal (CMU)

CMACS AVACS 14 CMACS 14 / 31

slide-16
SLIDE 16

Characterization of Invariant Expressions

Special Case: Invariant (Algebraic) Functions

N = 1 and Lp(h) ∈ 0

  • Lp(h) = 0 ∧ h(xι) = 0 −

→ h = 0 Example

2 1 1 2 2 1 1 2

Vector Field ˙ x1 = −x2, ˙ x2 = x1, xι = (1, 0)

2 1 1 2 2 1 1 2

Roots of h def = x2

1 + x2 2 − 1

2 1 1 2 2 1 1 2

Roots of Lp(h): Whole Space

  • K. Ghorbal (CMU)

CMACS AVACS 15 CMACS 15 / 31

slide-17
SLIDE 17

Characterization of Invariant Expressions

Special Case (N = 1) Darboux Invariants

a.k.a. λ-Invariant, Exponential Invariants, P-Consecution,

  • Lp(h) = ph ∧ h(xι) = 0 −

→ h = 0 ˙ x1 = −x1 + 2x2

1x2

h = (xι2 − xι1xι2

2)x1 − xι1(x2 − x1x2 2)

˙ x2 = x2 Lp(h) = (−1 + 2x1x2)h Example

1.0 0.5 0.0 0.5 1.0 1.0 0.5 0.0 0.5 1.0

Vector Field

10 5 5 10 10 5 5 10

Roots of h

10 5 5 10 10 5 5 10

Roots of Lp(h)

  • K. Ghorbal (CMU)

CMACS AVACS 16 CMACS 16 / 31

slide-18
SLIDE 18

Characterization of Invariant Expressions

Decidability

Corollary It is decidable whether a polynomial h with real algebraic coefficients is an algebraic invariant of an algebraic differential system with real algebraic coefficients and real algebraic initial values. Related Work Generalizes the decidability of invariant functions [A. Platzer ITP’12]

  • K. Ghorbal (CMU)

CMACS AVACS 17 CMACS 17 / 31

slide-19
SLIDE 19

Characterization of Invariant Expressions

Sound Approximation of the Closure ¯ O(xι)

Differential Radical Ideals Jj

def

= L(i)

p (hj)0≤i≤N−1

Underapproximation of I(O(xι))

  • j∈ℑ

Jj = I(O(xι)), ℑ finite Overapproximation of ¯ O(xι) ¯ O(xι) ⊆

  • 1≤i≤r

V (Ji)

  • K. Ghorbal (CMU)

CMACS AVACS 18 CMACS 18 / 31

slide-20
SLIDE 20

Characterization of Invariant Expressions

Example

System ˙ x1 = −x2 ˙ x2 = x1 ˙ x3 = x2

4

˙ x4 = x3x4 Differential Radical Invariants h1 = x3 − x2x4 and h2 = x2

4 − x2 3 − 1

Orbit Roots of h1 Roots of h2

  • K. Ghorbal (CMU)

CMACS AVACS 19 CMACS 19 / 31

slide-21
SLIDE 21

Characterization of Invariant Expressions

Example: cont’d

Overapproximation of ¯ O(xι)

  • K. Ghorbal (CMU)

CMACS AVACS 20 CMACS 20 / 31

slide-22
SLIDE 22

Automated Generation

Outline

1

Introduction

2

Time Abstraction

3

Characterization of Invariant Expressions

4

Automated Generation

5

Conclusion

  • K. Ghorbal (CMU)

CMACS AVACS 21 CMACS 21 / 31

slide-23
SLIDE 23

Automated Generation

So ...

Sound Abstraction Orbit ⊆ Closure Characterization of I(O(xι)) Explicit Characterization of I(O(xι)) by Differential Radical Invariants Goal Automate the generation of Differential Radical Invariants

  • K. Ghorbal (CMU)

CMACS AVACS 22 CMACS 22 / 31

slide-24
SLIDE 24

Automated Generation

Matrix Representation: Intuition

invariant of degree 1 ˙ x1 = a1x1 + a2x2 h = α1x1 + α2x2 + α3x0 ˙ x2 = b1x1 + b2x2 Lp(h) = α1(a1x1 + a2x2) + α2(b1x1 + b2x2) Lp(h) ∈ h if and only if ∃β ∈ R s.t. Lp(h) = βh (−a1 + β)α1 + (−b1)α2 = 0 (−a2)α1 + (−b2 + β)α2 = 0 (β)α3 = 0 ↔   −a1 + β −b1 −a2 −b2 + β β     α1 α2 α3   = 0

  • K. Ghorbal (CMU)

CMACS AVACS 23 CMACS 23 / 31

slide-25
SLIDE 25

Automated Generation

Matrix Representation

Explicit Ideal Membership L(N)

p

(h) ∈ L(0)

p (h), . . . , L(N−1) p

(h) ↔ L(N)

p

(h) =

N−1

  • i=0

giL(i)

p (h)

Polynomial ↔ n+d

d

  • Coefficients (up to monomial order)

h ↔ α = (α1, α2, . . . , αr) gi ↔ βi = (β1, β2, . . . , βsi) Matrix Representation L(N)

p

(h) =

N−1

  • i=0

giL(i)

p (h) ↔ M(β)α = 0

α lies in the Kernel of M(β) def = {α ∈ Rr | M(β)α = 0}

  • K. Ghorbal (CMU)

CMACS AVACS 24 CMACS 24 / 31

slide-26
SLIDE 26

Automated Generation

Initial Value Constraints

xι in the Differential Radical Ideal L(0)

p (h)(xι) = 0 ∧ · · · ∧ L(N−1) p

(h)(xι) = 0 L(i)

p (h)(xι) = 0 ↔ α ∈ Hi def

= {α ∈ Rr | L(i)

p (h)(xι) = 0}

α lies in a hyperplane parametrized by the initial value xι ∀i, 0 ≤ i ≤ N − 1, L(i)

p (h)(xι) = 0 ↔ α ∈ H(xι) def

=

  • 0≤i≤N−1

Hi

  • K. Ghorbal (CMU)

CMACS AVACS 25 CMACS 25 / 31

slide-27
SLIDE 27

Automated Generation

Summary

Differential Radical Invariants h ∈ I(O(xι)) if and only if there exists a finite positive integer N s.t. L(N)

p

(h) ∈ L(0)

p (h), . . . , L(N−1) p

(h) ⊆ I(O(xι)) (ı) L(0)

p (h)(xι) = 0, . . . , L(N−1) p

(h)(xι) = 0 . (ıı) Symbolic Linear Algebra Formulation (ı) and (ıı) if and only if α ∈ ker(M(β)) ∩ H(xι)

  • K. Ghorbal (CMU)

CMACS AVACS 26 CMACS 26 / 31

slide-28
SLIDE 28

Automated Generation

Example: n = 2, d = 1, N = 1

invariant of degree 1 ˙ x1 = a1x1 + a2x2 h = α1x1 + α2x2 + α3x0 ˙ x2 = b1x1 + b2x2 Lp(h) = α1(a1x1 + a2x2) + α2(b1x1 + b2x2) |M(β)| = β(β2 − (a1 + b2)β − a2b1 + a1b2)

  • ker(M(0)) = (0, 0, 1)
  • α ∈ (0, 0, 1) ∩ xι⊥

... and ... 0 = 0 Ha .. Ha ..

Ha ..

  • K. Ghorbal (CMU)

CMACS AVACS 27 CMACS 27 / 31

slide-29
SLIDE 29

Automated Generation

Example: n = 2, d = 1, N = 1

invariant of degree 1 ˙ x1 = a1x1 + a2x2 h = α1x1 + α2x2 + α3x0 ˙ x2 = b1x1 + b2x2 Lp(h) = α1(a1x1 + a2x2) + α2(b1x1 + b2x2) |M(β)| = β(β2 − (a1 + b2)β − a2b1 + a1b2)

  • ker(M(0)) = (0, 0, 1)
  • α ∈ (0, 0, 1) ∩ xι⊥

... and ... 0 = 0 Ha .. Ha ..

Ha ..

  • K. Ghorbal (CMU)

CMACS AVACS 27 CMACS 27 / 31

slide-30
SLIDE 30

Automated Generation

Enforcing Invariants

δ def = (a1 − b2)2 + 4a2b1 ≥ 0

  • β ∈ {0, 1

2(a1 + b2 +

√ δ), 1

2(a1 + b2 −

√ δ)}

  • If xι ∈
  • a1 − b2 ±

√ δ, 2a2, 0 ⊥ then α =

  • a1 − b2 ±

√ δ, 2a2, 0

  • α is an Eigenvector

If a2 = 0, β ∈ {0, a1, b2} . . .

  • K. Ghorbal (CMU)

CMACS AVACS 28 CMACS 28 / 31

slide-31
SLIDE 31

Automated Generation

Case Study: Longitudinal Dynamics of an Airplane

6th Order Longitudinal Equations ˙ u = X m − g sin(θ) − qw u : axial velocity ˙ w = Z m + g cos(θ) + qu w : vertical velocity ˙ x = cos(θ)u + sin(θ)w x : range ˙ z = − sin(θ)u + cos(θ)w z : altitude ˙ q = M Iyy q : pitch rate ˙ θ = q θ : pitch angle

  • K. Ghorbal (CMU)

CMACS AVACS 29 CMACS 29 / 31

slide-32
SLIDE 32

Automated Generation

Case Study: Generated Invariants

Automatically Generated Invariant Functions Mz Iyy + gθ + X m − qw

  • cos(θ) +

Z m + qu

  • sin(θ)

Mx Iyy − Z m + qu

  • cos(θ) +

X m − qw

  • sin(θ)

− q2 + 2Mθ Iyy

  • K. Ghorbal (CMU)

CMACS AVACS 30 CMACS 30 / 31

slide-33
SLIDE 33

Conclusion

Conclusion

Ongoing work

  • Upper Bounds for the order N and the degree d
  • Injecting evolution domain constraints
  • Global Invariants for the (whole) Hybrid System
  • Semialgebraic Invariants (Inequalities h ≥ 0)
  • contact kghorbal@cs.cmu.edu
  • K. Ghorbal (CMU)

CMACS AVACS 31 CMACS 31 / 31