{'fraction_non_alphanumeric': 0.05290670045936956, 'fraction_numerical': 0.01652674375627013, 'mean_word_length': 3.882701727249291, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Using SOS and Sublevel Set Volume Minimization for Estimation of Forward Reachable Sets

In this paper we propose a convex Sum-of-Squares optimization problem for finding outer approximations of forward reachable sets for nonlinear uncertain Ordinary Differential Equations (ODE's) with either (or both) L2 or point-wise bounded input disturbances. To make our approximations tight we seek to minimize the volume of our approximation set. Our approach to volume minimization is based on the use of a convex determinant-like objective function. We provide several numerical examples including the Lorenz system and the Van der Pol oscillator.


INTRODUCTION
In this paper we consider nonlinear dynamical system described by Ordinary Differential Equations (ODE's) of the forṁ (1) where f : R n × R m u × R m w → R n is a vector field; u : R → R m u and w : R → R m w are inputs; U ⊂ L m u 2 [0, T ] and W ⊂ L m w 2 [0, T ] are the sets of admissible inputs; and x 0 ∈ R n is the initial condition. The objective of this paper is to compute the set of states reachable from uncertain initial conditions contained inside some semialgebriac set under bounded L 2 and point-wise bounded input disturbances.
Computing reachable sets is important practically for certifying systems remain in "safety regions"; regions of the state space that are deemed to have low risks of system failure. Reachable set analysis allows for the possibility of systems to detect impending transitions outside of "safe regions" and then execute control laws to avoid such transitions. Historic examples of system's transitioning outside "safe regions" include: two of the four reaction wheels on the Kepler Space telescope failing, analyzed in Kampmeier et al. [2018]; and the disturbing lateral vibrations of the Millennium footbridge over the River Thames in London on opening day, analyzed in Chen et al. [2018] and Eckhardt et al. [2007]. Such examples can potentially be avoided by modeling the system by an ODE of the Form (1) and analyzing under what input disturbances potential failure can occur.
There are many different approaches to reachability analysis. One such approach is simulation based methods; here solution maps are estimated and algorithms are designed such that the numerical error always results in an over approximation of the reachable set. Such simulation methods are explored in the works of Greenstreet and Mitchell [1999] where nonlinear dynamics are approximated by linear dynamics, where solution ⋆ This research was carried out with the financial support of the NSF Grant CNS-1739990. maps can be analytically found. In Li et al. [2018] solution maps are Taylor expanded to over or under approximate the reachable set of autonomous systems. A further alternative simulation based method can be found in Maidens and Arcak [2015]. Another approach to reachability analysis is to construct a particular Hamilton-Jacobi-Isaac PDE that has a viscosity solution such that its zero sublevel set is the reachable set as shown in Mitchell et al. [2005].
Our approach to reachability analysis is to outer approximate the forward reachable set by the sublevel set of a function satisfying energy like disspataion inequalities. To make the outer approximation tight we would like to minimize the volume of our outer set approximation. This problem formulation is also found in Yin et al. [2018]. However here a heuristic bisection method is proposed where the sublevel set {x ∈ R n : q(x) ≤ α}, where q : R n → R is some hand picked function, is constrained to contain the outer approximation and α > 0 is iteratively minimized. In our previous work, Jones and Peet [2018], it was argued that the volume of a sublevel set of the form {x ∈ R n : z d (x) T Pz d (x) ≤ 1}, where z d (x) is the monomial vector of degree d ∈ N and P is a positive matrix, can be minimized by minimizing the convex objective function − log det P. In this work we will therefore formulate a convex optimization problem who's solution can construct a tight outer approximation of the forward reachable set of an ODE of Form (1) using a log det type objective function. Our reachable set analysis does not require the use of bisection methods or handpicked functions and furthermore is formulated to include both L 2 bounded type input disturbances and point wise bounded type input disturbances.
The rest of this paper is organized as follows. In Section 3 we propose an optimization whose solution can construct an optimal outer set approximation of a forward reachable set of an ODE. In Section 4 we propose a class of functions that satisfy energy like dissipation inequalities and show how such functions can help us characterize sets that contain forward reachable sets. In Section 5 a convex Sum-of-Squares optimization problem, based upon these energy dissipating functions, is then proposed whose solution can construct an outer approximation of the forward reachable set. Here we justify the tightness of the outer approximation by the minimization of a log det objective function. In Section 6 we give several numerical examples of our outer approximations of forward reachable sets. Finally we give our conclusion in 7.

NOTATION
We denote the set L m For a set A ⊂ R n we define vol{A} = R n 1 A (x)dx. We denote the power set of R n by P( We denote S n ++ to be the set of positive definite n × n matrices. For x ∈ R n we denote z d (x) to be the vector of monomial basis in n-dimensions with maximum degree d ∈ N. We say the polynomial p : We denote ∑ SOS to be the set of SOS polynomials.

AN OPTIMIZATION PROBLEM FOR MINIMAL OUTER BOUNDS OF REACHABLE SETS
In this paper we consider systems that can be modeled by nonlinear Ordinary Differential Equations (ODE's) of the forṁ T 0 w(t) T w(t)dt < γ} are the sets of admissible inputs; Y ⊂ R m u ; γ > 0; and x 0 ∈ R n is the initial condition. Typically inputs that are members of the set U Y are thought of as uncertainties and inputs that are members of the set W γ are thought of as disturbances.
Throughout this paper we will assume the existence and uniqueness of solution maps. Definition 1. We say φ f : The goal of this paper is to estimate the set of coordinates in R n that the solution map can attain, at some finite time T ≥ 0, starting in some set of initial conditions; we call this set the forward reachable set and define it formally next. Definition 2. For an ODE of Form (2), X 0 ⊂ R n , T > 0, Y ⊂ R m u , and γ ≥ 0 we define the forward reachable set of X 0 at time T > 0 by and γ ≥ 0, we now propose the following optimization problem to find the optimal outer set approximation, that is an element of some set C, of a reachable set. min When solving the above Optimization Problem (3) there are two challenges.
(2) To select a metric D that can be tractably minimized.
In the next section we tackle the first of these challenges.

SUBLEVEL SETS OF FUNCTIONS SATISFYING DISSIPATION LIKE INEQUALITIES CONTAIN REACHABLE SETS
Reachable sets are implicitly defined using solution maps of ODE's. Therefore the set containment in Optimization Problem (3) must be indirectly constrained. To enforce the set containment constraint we use energy-like dissipation inequalities. In the next theorem we will show that if there exists a function, that has a rate of change along the solution map less than the magnitude of the L 2 bounded input, w T w, for any point wise admissible input, then it has a sublevel set at time T > 0 that must contain the forward reachable set at time T .
for all x 0 ∈ X 0 , u ∈ U, w ∈ W. Thus we deduce from rearranging (6) and using (4) that for all The set X c ⊂ R n can be thought of as the computation region. In general we can select X c = R n and FR(X 0 , f ,t,Y, γ) ⊆ X c will always be satisfied, however setting X c to be some sufficiently large bounded set can result in better numerical results. This is because we will later use Semidefinite Programing (SDP) to find polynomial functions that satisfy the inequalities (4) (5). To the authors knowledge there is no converse theorem that proves the existence of such a polynomial function satisfying these inequalities, however we do know that the Weierstrass approximation theorem states that any continuous function can be uniformly approximated over a closed and bounded set by a polynomial function. In light of this result and from numerical experience the authors recommend the use of bounded computation regions.
We now use Theorem 4 and Optimization Problem (3) to write an optimization problem with a solution that can construct an outer approximation of the reachable set.

PROPOSING A CONVEX SOS OPTIMIZATION PROBLEM FOR REACHABLE SET APPROXIMATION
Currently the objective function of Optimization Problem (8) is said to be a metric that measures the distance between sets and has not yet been defined exactly; we will tackle this problem later. Firstly we consider the problem of enforcing the constraints of this optimization problem, which currently are not tractable.
To solve the Optimization Problem (8) we must find a function, V , that satisfies several inequality constraints. Determining whether a polynomial satisfies an inequality constraint has the same difficulties as proving a polynomial is globally positive ( f (x) > 0 ∀x ∈ R n ); Blum et al. [1998] has shown this problem to be NP-hard. However it can be shown testing if a polynomial is Sum-of-Squares (SOS), and hence positive, is equivalent to solving a semidefinite program (SDP). Although not all positive polynomials are SOS, this gap can be made arbitrarily small, see Hilbert [1888]. We thus propose a tightening of the optimization problem and restrict the decision variable, V , to be an SOS polynomial.
We now propose a tightened SOS optimization problem of Optimization Problem (8). To do this will assume the existence of polynomial functions, g X , g C , and g U , such that X 0 ⊆ {x ∈ R n : g X (x) ≥ 0}, X c ⊆ {x ∈ R n : g C (x) ≥ 0} and Y ⊆ {u ∈ R m u : g U (u) ≥ 0}. To ensure the hypothesis of Theorem 4, FR(X 0 , f ,t,Y, γ) ⊆ X c for all t ∈ [0, T ], is satisfied we typically select g c (x) = R 2 − ||x|| 2 2 where R > 0 can be made sufficiently large. Lastly we denote the function h(t) = t[T − t] and note the problems time interval can be described as To make the above optimization problem (9) tractable we must select a metric D that is convex and hence can be minimized numerically. In our previous work, Jones and Peet [2018], it was shown that in the case where the metric is D V (X,Y ) = vol{(X/Y ) ∪ (Y /X)} a heuristic solution to the above optimization problem can be found by using a log det type convex objective function. We now therefore propose a convex SOS optimization problem; that as shown in Proposition 5 is solved by a feasible, and in general suboptimal, solution to the intractable Optimization Problem (3). The optimization problem is denoted by S 1 (d, T, f , γ, g X , g C , g U , h): Proposition 5. For some X 0 ⊂ R n , f : R n × R m u × R m w → R n , T > 0, Y ⊂ R m u , and γ ≥ 0, suppose there exists functions g X : R n → R, g U : R m u → R, and g C : Proof. We will show V (x,t) = z d (x)P(t)z d (x) satisfies inequalities (4) and (5) in order to use Theorem 4.
From the constraints of S 1 (d, T, f , γ, g X , g C , g U , h) we have k 1 ∈ ∑ SOS and s 1 ∈ ∑ SOS and thus it follows k 1 (x) = (1 −V (x, 0)) − s 1 (x)g X (x) ≥ 0 and s 1 (x) ≥ 0 for all x ∈ R n . Since a positive function multiplied with a positive function is also a positive function we can now deduce V (x, 0) ≤ 1 for all x ∈ {x ∈ R n : g X (x) ≥ 0}. (11) Moreover the above inequality also holds for all x ∈ X 0 as X 0 ⊆ {x ∈ R n : g X (x) ≥ 0}. Furthermore using a similar argument with the remaining constraints of S 1 (d, T, f , γ, g X , g C , g U , h) we can also deduce ∂V ∂t for all x ∈ {y ∈ R n : g C (y) ≥ 0},t ∈ [0, T ], u ∈ {z ∈ R m u : g U (z) ≥ 0}, w ∈ R m w . Moreover the above inequality also holds for all u ∈ Y as Y ⊆ {u ∈ R m u : g U (u) ≥ 0}.
Proposition 5 shows that an outer approximation of the reachable set of an ODE can be constructed from the convex optimization problem found in (10). Furthermore we have argued using the objective function − log det{P(T )} results in an heuristic optimal representation of the forward reachable set under the volume metric.

Reachable Sets of ODE's With No Inputs
We can consider the simpler case of an ODE with no inputs, where f : R n → R n is the vector field and x 0 ∈ R n is the initial condition.
We note that the definitions of solution map and forward reachable set can be slightly altered and easily applied to ODE's with no input of Form (13). In this case for a vector field f : R n → R n , a set X 0 ⊂ R n , and T > 0 we denote Following a similar argument we used to derive the Optimization Problem (10) we now propose a convex SOS optimization problem for outer set approximation of forward reachable sets of ODE's of form (13). The optimization problem is denoted by . Corollary 6. For some X 0 ⊂ R n , f : R n × R m u × R m w → R n , and T > 0, suppose there exists functions g X : R n → R and g C :

NUMERICAL EXAMPLES
In this section we will now compute several forward reachable sets for different dynamical systems. Here constraints from Optimization Problems (10) and (14) were enforced using software such as SOSTOOLS, found in Prajna et al. [2002], that reformulates the problem as an SDP. Using efficient primaldual interior point methods for SDP's we are able to solve such proposed problems, see Prajna et al. [1994].

Computation Of Reachable Sets Of Systems With No Inputs
Example 1. Let us consider the linear ODE:  (14) and is a outer approximation of the reachable sets for 100 evenly spaced time steps between 0 and 5. The red line represents a trajectory path taken.
where A = 0 −1 1 0 . Since the eigenvalues of A are ±i it follows (15) produces non-stable circular trajectories. We now solve the optimization problem S 2 (d, T, f , g X , g C , h), found in (14), for the ODE (15), where d = 3, The results are displayed in Figure 1. Here 24 2 terminal trajectory points, shown in blue, were approximately found by forwardtime integrating (15) starting from initial points, shown in red. We find that FR(X 0 , f , T ) ⊆ {x ∈ R n : z d (x)P(T )z d (x) ≤ 1}; this is demonstrated by the black sublevel set containing the blue circle of points in the figure. Since the dynamics of the ODE (15) are simple it was numerically tractable to solve the Optimization Problem for 100 evenly spaced points between times [0,5]; Figure 2 shows the results. Example 2. Let us now consider the Lorenz system defined by the three dimensional second order nonlinear ODE: We solved optimization problem S 2 (d, T, f , g X , g C , h), found in (14), for the ODE (16) and system parameters σ = 10, β = 8/3, ρ = 28. Using the solution to the optimization problem, P(t), we then constructed the function V (x,t) = z d (x) T P(t)z d (x). In Figure 6 we have plotted our outer approximation of FR(X 0 , f , T ), the set {x ∈ R 2 : V (x, T ) ≤ 1} shown as the gray 3D boundary. As expected initial points contained inside the set X 0 , shown as red points, transition to terminal points, shown as blue points, contained in {x ∈ R 2 : V (x, T ) ≤ 1}. Moreover the boundary of the set {x ∈ R 2 : V (x, T ) ≤ 1} has a similar shape to the Lorenz attractor.

Computation Of Reachable Sets Of Systems With Inputs
Example 3. We next consider a third order nonlinear system with bounded L2 inputs, from Jarvis-Wloszek et al. [2005] and Yin et al. [2018], given in the following ODĖ We solved Optimization Problem S 1 (d, T, f , γ, g X , g C , g U , h), found in (10), for this ODE and the following terms; d = 2; 1 − x 2 2 ; g C (x) = 1.75 2 − x 2 1 − x 2 2 ; g U (x) = 0; and h(t) = t [T − t]. Terms involving u were ignored from the optimization problem as there is no point-wise input in (17).
Using the solution of the optimization problem, P(t), we then constructed the function V (x,t) = z d (x) T P(t)z d (x). In Figure  4 we have plotted the sublevel set {x ∈ R 2 : V (x, T ) ≤ 1 + γ}, shown as the black curve. We have also plotted initial conditions, shown as red points, contained in the set X 0 = {x ∈ R n : g X (x) ≥ 0}. The solution maps at time T generated for randomly generated polynomial inputs of the form w(t) = c T z d (t), shown as the blue points, are also plotted. As expected, since we have shown the set {x ∈ R 2 : V (x, T ) ≤ 1 + γ} is an outer approximation of FR(X 0 , f , T, / 0, γ), the blue points are all contained inside the black line. Example 4. Let us now consider the Van der Pol oscillator with both bounded L 2 and point-wise input disturbances defined by the nonlinear ODE: x 1 (t) = x 2 (t) + w(t) (18) u,ū] for all t ∈ [0, T ]} is a modeling parameter that measures damping strength.
We solved optimization problem S 1 (d, T, f , γ, g X , g C , g U , h), found in (10), for the ODE (18) Using the solution of the optimization problem, P(t), we then constructed the function V (x,t) = z d (x) T P(t)z d (x). To compare our approximation of the forward reachable set with no input disturbances we then also solved S 2 (d, T, f , g X , g C , h), found in (14), for the ODE (18) with w(t) = 0 and µ(t) = 1; that is f (x) = [x 2 , −x 1 + x 2 (1 − x 2 1 )] T is now used. Using the solution of this optimization problem,P(t), we then constructed the functionṼ (x,t) = z d (x) TP (t)z d (x). In Figure 5 we have plotted the outer approximation of the forward reachable set for ODE with input disturbances, the set {x ∈ R 2 : V (x, T ) ≤ 1 + γ} shown as the dotted black curve, and outer approximation of the forward reachable set for ODE with no input disturbances, the set {x ∈ R 2 :Ṽ (x, T ) ≤ 1} shown as the black curve. As expected our approximation of the forward reachable set for the ODE with input disturbances is much larger than without.
Moreover in Figure 6 we have again solved S 2 (d, T, f , g X , g C , h), found in (14), for the ODE (18) with no input disturbances and µ(t) = 1 for a later terminal time of T = 5. Interestingly the boundary of the approximated forward reachable set is very similar to the Van der Pol limit cycle; shown as the red line which was approximately found by forward time integrating (18) at a starting position close to the limit cycle.

CONCLUSION
We have illustrated a method for finding approximations of forward reachable sets by sublevel sets of an SOS polynomials that solve a convex optimization problem. We have used an objective function based on the determinant to heuristically minimizes the volume of these sublevel sets and improve our outer approximations. We have applied our methods to finding reachable of nonlinear systems with both L 2 or point wise bounded input disturbances. Outer approximations for the reachable sets for the Lorenz system and Van der Pol system show a similar shape to the attractor set and limit cycle respectively.