Convex computation of the region of attraction for polynomial control systems Didier Henrion LAAS-CNRS Toulouse & CTU Prague Milan Korda EPFL Lausanne
Region of Attraction (ROA) ẋ = f (x,u), x(t) X, u(t) U t [0,T] x(t ) X T Region of attraction (ROA) a.k.a. Backward reachable set The set of all initial states that can be admissibly steered to the target set at a given time X X T X 0 2
Region of Attraction (ROA) ẋ = f (x,u), x(t) X, u(t) U t [0,T] x(t ) X T 3
Region of Attraction (ROA) Fundamentally difficult to determine!! Long history - typically tackled using non-convex BMIs or gridding Convex formulation Infinite dimensional LP formulation for ROA computation Converging hierarchy of SDP relaxations providing outer approximations! Readily modeled using freely available tools (Gloptipoly, Yalmip, etc.)! No initialization data required! 4
How is it done? 5
Approach Approach Study how ensembles of initial conditions evolve, not single trajectories How to model these ensembles? Using measures.! 6
Measures Mappings from sets to real numbers Measures µ R Integration A g(x) dµ(x) g(x) dµ(x) = A A g(x) ρ(x)dx (x) 1 µ 7
Measures in control µ 0 µ T T µ (t,x(t),u(t)) [0,T] X U x µ T µ 0 0 T t 8
Measures in control µ 0 µ T T µ (t,x(t),u(t)) [0,T] X U x µ T µ 0 0 T t 9
Liouville s equation µ 0 µ µ T X v(t,x) dµ T (x) v C 1 ([0,T] X) X v(0,x) dµ 0 (x) = [0,T ] X U v t + xv f Lv(t,x,u) dµ(t,x,u) Key fact ẋ = f (x,u) Optimization over system trajectories Optimization over measures satisfying Liouville s equation 10
Characterization of ROA using measures 11
Dynamics Dynamics Liouville s equation 12
Constraints Constraints Support constraints Support of a measure Smallest closed set whose complement has zero measure spt µ x(0) X (x(t),u(t)) X U x(t ) X T spt µ 0 X spt µ [0,T] X U spt µ T X T 13
Characterization of ROA using measures Need to µ 0 Non-convex 14
Convex characterization of ROA Key idea µ 0 µ 0 15
Convex characterization of ROA Key idea µ 0 µ 0 X 0 1 X 0 X 16
Convex characterization of ROA Key idea µ 0 µ 0 X 0 1 X 0 X 17
Convex characterization of ROA Key idea µ 0 µ 0 X 0 1 X 0 X 18
Convex characterization of ROA Key idea µ 0 µ 0 X 0 1 X 0 X 19
Convex characterization of ROA Key idea µ 0 µ 0 X 0 1 X 0 X 20
Primal LP The ROA is characterized by the optimization problem sup µ 0 (X) Primal LP s.t. X T vdµ T X vdµ 0 = [0,T ] X U Lvdµ v C 1 µ 0 µ 0, µ 0 0,µ T 0, ˆµ 0 0 spt µ [0,T] X U, spt µ 0 X, spt µ T X T Infinite dimensional linear program in the cone of nonnegative measures 21
Dual LP on continuous functions Decrease along trajectories inf X w(x) dx Dual LP s.t. Lv(t,x,u) 0, (t,x,u) [0,T] X U w(x) v(0,x)+1, x X v(t,x) 0, x X T w(x) 0, x X, v C 1 ([0,T] X) w C(X) {x w(x) Key observation 1} X 0 w Important fact 22
Finite dimensional SDP relaxations SDP! Optimization over measures Optimization over moment sequences Optimization over truncated moment sequences Duality Optimization over nonnegative continuous functions Optimization over nonnegative polynomials SDP! Optimization over SOS polynomials Duality 23
Big picture Infinite dimensional Infinite dimensional 2k 2k k k 24
Convergence results Convergence of primal and dual relaxations Optimal values of the primal and dual SDPs converge to the optimal value of the two infinite dimensional LPs, which is equal to the volume of the ROA X 0 w k (x) k Functional convergence w k I X0 L 1 min i k w i I X0 k X 0k := {x w k (x) 1} Set-wise convergence X 0k X 0 volume(x 0k \ X 0 ) 0 k 25
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 26
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction 27
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction X 0 1.2 1 0.8 d = 10 d = 10 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 28
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction X 0 1.2 1 0.8 d = 12 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 29
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction X 0 1.2 1 0.8 d = 14 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 30
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction X 0 1.2 1 0.8 d = 16 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 1.2 31
Numerical examples Backward Van der Pol oscillator ẋ 1 = 2x 2 ẋ 2 =0.8x 1 + 10(x1 2 0.21)x 2 X =[ 1.2, 1.2] 2 X T = {x x 2 0.01}, T = 100 Stable equilibrium at the origin with a bounded region of attraction 18 I X0 32
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 33
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 V (x) = X 0 = {x : V (x) 1} x 2 +2 x 1 + 1 2 x 2 2 x 1 + 1 2 x 2 x 2 > 0, x 2 +2 x 1 + 1 2 x 2 2. 34
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 V (x) = X 0 = {x : V (x) 1} x 2 +2 x 1 + 1 2 x 2 2 x 1 + 1 2 x 2 x 2 > 0, x 2 +2 x 1 + 1 2 x 2 2. d =6 1.2 0.6 0.4 0.2 0 0.2 0.4 0.6 35
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 V (x) = X 0 = {x : V (x) 1} x 2 +2 x 1 + 1 2 x 2 2 x 1 + 1 2 x 2 x 2 > 0, x 2 +2 x 1 + 1 2 x 2 2. d =8 1.2 0.6 0.4 0.2 0 0.2 0.4 0.6 36
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 V (x) = X 0 = {x : V (x) 1} x 2 +2 x 1 + 1 2 x 2 2 x 1 + 1 2 x 2 x 2 > 0, x 2 +2 x 1 + 1 2 x 2 2. d = 10 1.2 0.6 0.4 0.2 0 0.2 0.4 0.6 37
Numerical examples Double integrator ẋ 1 = x 2 ẋ 2 = u X =[ 0.7, 0.7] [ 1.2, 1.2] U =[ 1, 1] X T = {0}, T =1 1.2 1 0.8 0.6 0.4 0.2 0 0.2 0.4 0.6 0.8 1 V (x) = X 0 = {x : V (x) 1} x 2 +2 x 1 + 1 2 x 2 2 x 1 + 1 2 x 2 x 2 > 0, x 2 +2 x 1 + 1 2 x 2 2. d = 12 1.2 0.6 0.4 0.2 0 0.2 0.4 0.6 38
Numerical examples Brocket integrator ẋ 1 = u 1 ẋ 2 = u 2 ẋ 3 = u 1 x 2 u 2 x 1 X = {x x 1} U = {u u 2 1} X T = {0}, T =1 ROA known semi-analytically d =6 39
Numerical examples Brocket integrator ẋ 1 = u 1 ẋ 2 = u 2 ẋ 3 = u 1 x 2 u 2 x 1 X = {x x 1} U = {u u 2 1} X T = {0}, T =1 ROA known semi-analytically d = 10 40
Numerical examples x 2 u 2 u 1 u 2 x 1 u 1 u 2 d =6 41
Numerical examples x 2 u 2 u 1 u 2 x 1 u 1 u 2 d =8 42
Computational complexity ẋ = f (x,u) n+m+1+d/2 d/2 ẋ = f (x)+g(x)u n+1+d/2 d/2 d n O((n + m + 1) d/2 ) O((d/2) n+m+1 ) d n O((n + 1) d/2 ) O((d/2) n+1 ) Single SDP block of this size + number of smaller blocks Number of blocks of this size linear in the number of inputs [A. Majumdar, et al., 2013] 43
Extensions Reachability Invariance Inner approximations Rational or trigonometric dynamics Uncertain and stochastic systems Piecewise polynomial dynamics defined over semialgebraic partition? 44
Conclusion Convex characterization of the ROA Guaranteed convergence of finite dimensional relaxations Additional properties (e.g. convexity) can be easily enforced Covers a broad class of systems Extremely simple to use! 45
Question time 46