Numerical Construction of Viable Sets for Autonomous Conﬂict Control Systems

: A conﬂict control system with state constraints is under consideration. A method for ﬁnding viability kernels (the largest subsets of state constraints where the system can be conﬁned) is proposed. The method is related to differential games theory essentially developed by N. N. Krasovskii and A. I. Subbotin. The viability kernel is constructed as the limit of sets generated by a Pontryagin-like backward procedure. This method is implemented in the framework of a level set technique based on the computation of limiting viscosity solutions of an appropriate Hamilton–Jacobi equation. To fulﬁll this, the authors adapt their numerical methods formerly developed for solving time-dependent Hamilton–Jacobi equations arising from problems with state constraints. Examples of computing viability sets are given.


Introduction
In many technical control problems, it is necessary to keep a controlled system within prescribed state constraints in the presence of disturbances. Such a control process is usually considered on a large (infinite) time interval, and no performance index is used. One approach to such problems is given by robust control theory [1] based on the methods of stability theory. Viability theory [2] can be considered as an alternative approach. Namely, a viable subset of the state constraint determines a feedback strategy that can keep the state vector within this subset. One can design such a feedback strategy, using the extremal aiming procedure described in [3]. A method for constructing the viability kernel (the maximal viable subset of the state constraint) is proposed in [4]. This method is based on the necessary and sufficient viability conditions formulated in terms of contingent cones. The book [5] considers a wide range of questions related to the analysis and construction of viability sets. A procedure for constructing viability kernels for control systems (without any conflict controls) is proposed in [6].
The present paper extends the short communication [7] and the report [8]. A constructive method for finding viability kernels is described and theoretically analyzed. The approach used is related to the theory of differential games (see [3,9]). The viability kernel is constructed as the limit of sets generated by a Pontryagin-like backward procedure (see [9]). The idea of such a passage to the limit was proposed in [10] for linear systems with discrete time. In the paper presented, an approximation scheme for finding the solvability kernel for a general class of nonlinear autonomous controlled system is proposed. This algorithm is numerically implemented in terms of level sets. The idea consists in the computation of the limit in the time of viscosity solutions (see [11,12]) of an appropriate Hamilton-Jacobi equation.
To implement this idea, the authors adapt their numerical methods formerly developed for solving time-dependent Hamilton-Jacobi equations arising from problems with state constraints. Examples of computing viability sets are given.

Differential Game and Viability Kernels
Consider a differential game with the autonomous dynamics: Here, x is the state vector, u and v are control parameters of the first and second players, respectively, and P and Q are compacts of the corresponding dimensions. We suppose that f satisfies standard requirements: continuity in x, u and v; the Lipschitz condition in x; and a growth condition that provides the continuability of the solutions to any time interval.
Based on the conflict control system (1), consider for any v ∈ Q the differential inclusion: Definition 1 (u-stability property [3]). Let T be an arbitrary time instant. A set W ⊂ (−∞, T ] × R n is said to be u−stable on the interval (−∞, T ] if for any initial position, (t * , x * ) ∈ W , for any time instant, t * (t * ≤ t * ≤ T ), for any v ∈ Q, there exists a solution, x(·), to the differential inclusion (2) with the initial state x(t * ) = x * , such that (t * , x(t * )) ∈ W .
Definition 2 (viability property [2]). A set K ⊂ R n is said to be viable if for any x * ∈ K, for any v ∈ Q there exists a solution x(·) to the differential inclusion (2) with the initial state x(0) = x * such that x(t) ∈ K, t ≥ 0.
Definition 3 (viability kernel [2]). For a given compact set G ⊂ R n denote by V iab(G) the largest subset of G with the viability property. This subset is called the viability kernel of G.
The following assertions follow from Definitions 1-3: (1) The closure of a u-stable (viable) set is a u-stable (viable) set.
(2) The union of any family of u-stable (viable) sets is a u-stable (viable) set.
(3) If W ⊂ (−∞, T ] × R n is a u-stable closed set, then for any initial position, (t * , x * ) ∈ W , for any v ∈ Q, there exists a solution, x(·), to the differential inclusion (2) with the initial state x(t * ) = x * such that (t, x(t)) ∈ W, t * ≤ t ≤ T.
The first assertion follows from the compactness and semi-continuity of solution sets of differential inclusions; see e.g., [13], and notice that the solution set of Equation (2) depends, even Lipschitz continuous, on the initial state. The second assertion follows from the definition of u-stability (viability). The third assertion can be proven by considering ever finer subdivisions of the interval [t * , T ], step-by-step constructing solutions of Equation (2) that satisfy the assertion at nodes of the subdivisions and using the compactness of the solution sets of Equation (2).
Assertion (3) shows that Definition 2 is a special case of Definition 1 with T = ∞ and W = R × K. Assertions (1) and (2) provide the existence of the viability kernel, V iab(G), for any compact set, G, if there exists at least one viable subset of G. Thus, the following problem can be considered.
Problem. Given a compact set G ⊂ R n it is required to construct the viability kernel, V iab(G).
To solve this problem, fix an arbitrary T ∈ R and introduce the set N = (−∞, T ] × G. Due to Assertions (1) and (2), there exists a closed maximal u-stable on the interval (−∞, T ] set W ⊂ N . For any time instant, t ≤ T , denote The family {W (t) : t ≤ T } has the property of monotonicity: W (t 1 ) ⊂ W (t 2 ) for t 1 ≤ t 2 ≤ T . Really, if W is a u-stable set, then the setŴ defined by the cross-sectionŝ W(t) = ∪ τ ≤t W(τ ) is also u-stable. Therefore, the maximal u-stable set, W , must have the required monotonicity property.
These facts immediately follow from the above definitions, and they are left to the reader to prove.
i=0 be a sequence of nonempty compact sets such that X j ⊂ X i if j > i, and let X = ∞ i=0 X i , then X = and X i converge to X in the Hausdorff metric.
Proof. First, X is nonempty as the intersection of embedded compacts. Second, assume that the convergence is absent. Then, there exists an > 0, such that A k := X k cl(X 0 \ X ) = for all k ≥ 0. Here, the upper index, , denotes the -neighborhood of sets, and the symbol "cl" denotes the closure operation. The sets A k , k ≥ 0, are compact and embedded. Therefore, there exists x ∈ k≥0 A k = X cl(X 0 \ X ), which is a contradiction.
Theorem 1. If W (t) = for any t ≤ T , then there exists the Hausdorff limit lim Proof. Denote K := t≤T W (t) for brevity. If for any t ≤ T , the set, W (t), is nonempty, then K is also nonempty as the intersection of nonempty embedded compacts. Show that K is viable in the sense of Definition 2. Choose arbitrary x * ∈ K, v ∈ Q and δ > 0. By Proposition 1, for any ε > 0, there exists t ε , such that: The condition, x * ∈ K, implies the inclusion, x * ∈ W (t ε − δ). By virtue of u-stability of the set W , there exists a solution, x(·), of Equation (2) with the initial state With the autonomy of the differential inclusions (2), we conclude the existence of a solution, x(·), of Equation (2), such that x(0) = x * and x(δ) ∈ K ε .
Thus, for arbitrarily small ε > 0, there exists a solution, x(·), of Equation (2) that satisfies the relations, x(0) = x * and x(δ) ∈ K ε . Since the solution set of Equation (2) is compact, this gives a solution, x(·), such that x(0) = x * and x(δ) ∈ K. Thus, we have proven the viability property of K, and relation (3) proves the Hausdorff convergence of W (t) to K as t → −∞.
Assume now that K ⊂ G is a viable set, such that K ⊂ K . As was noticed in the comment to Definition 2, the viability property of K means the u-stability property of the set for all t ≤ T , and therefore, K ⊂ t≤T W (t) = K. This proves Theorem 1.

Approximation
Immediate implementation of Theorem 1 for finding V iab(G) requires precise computing of the sets W (t) for t ∈ (−∞, T ]. If, for example, the step-by-step backward procedure from [9] related to the dynamic programming method is used, then the computational error grows infinitely as t → −∞. The algorithm proposed in the current paper uses the idea of decreasing the step of the backward procedure simultaneously with the passage to the limit as time goes to infinity. The algorithm looks as follows: Here, S is the unit closed ball in R n , β = LM , L is the Lipschitz constant of F v , and M = sup{|f | : for any i > 0, then there exists the Hausdorff limit, lim i→∞ K i , and Otherwise, there is no viable subset of G. Before starting the proof of Theorem 2, we prove three auxiliary lemmas. The first lemma shows a discrete u-stability of the family {K i } generated by Equation (4). Assume just for the simplicity of subsequent calculations that δ j L ≤ 1 for all j > 0. This requirement allows us to avoid the consideration of terms of the form s i=l+1 δ 3 i in the proof of Lemma 1, which reduces the amount of calculations.
Lemma 1. Let l and s be integers such that 0 < l < s. Let v ∈ Q be fixed. If x * ∈ K s , then there exists a solution, x(·), of Equation (2) We first prove the following two auxiliary propositions.
Proof of Proposition 2. The proof immediately follows from the Filippov-Gronwall inequality obtained in [14], Theorem 1.
Using the Lipschitz property of the right-hand side of Equation (2), choose a vector, g * ∈ F v (x * ), to provide the inequality |g * −ḡ| ≤ L|x * −x|. Denotex = x * + δ j g * and calculate: Accounting for the technical assumption δ j L ≤ 1, j > 0, simplifies the last estimate as follows: Let g(x) ∈ F v (x) be the nearest point to g * for every x ∈ R n . Obviously, the function x → g(x) is continuous and satisfies the following inequality, due to the Lipschitz property of F v (·): Suppose x(·) is a solution of the differential equationẋ = g(x) with the initial state x(0) = x * . Then: The last equation and the estimate (6) yield the inequality: and, with Equation (5), it holds that: By Proposition 2, there exists a solution, x 0 (·), of Equation (2) with the initial state x 0 (0) = x 0 , such that: and therefore: Proposition 3 is proven.
Proof of Lemma 1. Let x * ∈ K s be chosen. Setting D = 4M L and applying Proposition 3, we construct a solution, x(·), of Equation (2) that satisfies the conditions: It is easy to estimate α p to obtain the inequality: where σ = s i=l+1 δ i . This proves Lemma 1.

Lemma 2.
If K i = for all i > 0, then the set: is nonempty and possesses the viability property.
Proof. If K i = for all i > 0, then K is nonempty as the intersection of nonempty embedded compacts. Let x * ∈ K, v ∈ Q and δ > 0 be arbitrary. For any ε > 0, one can choose a large integer, k, to satisfy the following conditions: Choose m > k, such that m i=k+1 δ i > δ. Since x * ∈ K, it holds that x * ∈ cl i>m K i . Hence, for any ξ > 0, there exist an integer s > m and a point, x ξ ∈ K s , such that |x ξ − x * | < ξ. Using the Lipschitz continuity of the solution set of Equation (2) (see Proposition 2), one can choose the value of ξ to be so small that for any solution, x ξ (·), with x ξ (0) = x ξ , there exists a solution, x(·), with x(0) = x * , satisfying |x ξ (δ) − x(δ)| < ε. By virtue of Condition (b) and the choice of k, m and s, there exists l ≥ k, such that s i=l+1 δ i − δ < ε Set σ = s i=l+1 δ i and D = 4LM e Lσ . By Lemma 1, there exists a solution, x ξ (·), of Equation (2) Taking into account the obvious inequality |x ξ (δ) − x ξ (σ)| ≤ M ε, we have: Condition (a) implies the inclusion K l ⊂ K ε , and therefore: Using the choice of ξ, we obtain the existence of a solution, x(·), of Equation (2) with x(0) = x * and x(δ) ∈ K D 4 ε , where D 4 = D 3 + 1. Since ε is arbitrary and the solution set of Equation (2) is compact, there exists a solution, x(·), such that x(0) = x * , x(δ) ∈ K. This proves Lemma 2.
Lemma 3. If a set K ⊂ G has the viability property, then K ⊂ K i for all i > 0.
Proof. Define the following sequence: where: One can easily check the following properties of {K i }: (a)K 0 = G,K i ⊂ G, i ≥ 1.
(b) For any point x * ∈K i and any vector v ∈ Q, there is a solution, x(·), of Equation (2), such that x(0) = x * and x(δ i ) ∈K i−1 . (c) If x * ∈ G, but x * ∈K i , then there exists v ∈ Q such that for any solution, x(·), of Equation (2) with Arguing by induction, one can easily prove the maximality of {K i } in the following sense: for any family, {K i }, with Properties (a) and (b), the inclusion K i ⊂K i holds for any i > 0. However, the viability property of K implies that the family obtained by the replication of K has Properties (a), except for K = G, and (b). Hence, K ⊂K i for i > 0. To complete the proof, it remains to check the inclusionK i ⊂ K i for all i > 0. To do this, the following proposition will be proven.
Proposition 4. For arbitrary v ∈ Q, τ > 0, and any solution, x(·), of the differential inclusioṅ x ∈ −F v (x) with the initial state x(0) = x * , there exists a vector, g * ∈ F v (x * ), such that: Proof of Proposition 4. Let g(ξ) ∈ −F v (x * ) be the nearest point toẋ(ξ) for any ξ ∈ [0, τ ]. It is evident that the function ξ → g(ξ) is measurable, and the following inequality holds: This implies the estimate: where: Taking into account the obvious inequality: we obtain the desired estimation, which proves Proposition 4.
Thus, Lemma 3 is also proven.
Proof of Theorem 2. Define K by Formula (4). If K i = for all i > 0, then K is nonempty and viable by Lemma 1.
Show the maximality of K. To this end, consider an arbitrary viable set, K . Lemma 3 says that K ⊂ K i , i > 0, and therefore: This proves the maximality of K. Prove now the Hausdorff convergence. Take an arbitrary ε > 0 and use Proposition 1 to choose an integer, k, such that i>k K i ⊂ K ε . Taking j > k and accounting for Lemma 3 yield the relations: which prove the convergence of K j to K in the Hausdorff metric.
Notice, if there exists a viable set K ⊂ G, then, for every j > 0, the conditionK j = implies that K j+1 = (these sets are defined by Equation (7)). Hence,K i = for all i > 0. As was noticed in the proof of Lemma 3, the inclusionK i ⊂ K i holds for any i > 0. Therefore, K i = for any i > 0. Thus, the case K s = , for some s > 0, contradicts with the existence of viable subsets of G. Theorem 2 is proven.
Remark 2. For a linear differential game with the dynamics: f (x, u, v) = Ax + Bu + Cv relations (4) turn into the following ones: Here, E is the identity matrix, and the sign " * " denotes the geometric difference. If the sets, G, P and Q, are convex polyhedra, and D is the unit cube in R n (any bounded polyhedron containing the unit closed ball is appropriate), then all sets K i produced by Equation (8) are polyhedra, too. These formulas were used as the basis for a computer algorithm. A computer program developed by the authors permits the implementation of Equation (8) for the space dimension up to three.
Consider the case where the right-hand side of Equation (2) does not depend on v. In this case, Definition 2 coincides with the usual definition of viability (see [2]), and the sets W (t) appearing in Theorem 1 can be found as follows: where: Thus, the following theorem holds.
for any τ > 0, then there exists the Hausdorff limit, lim τ →∞ X G −F (τ ), and: Otherwise, there are no viable subsets of G.
The approximation theorem is now formulated as follows.

Theorem 4. Let
where S is the unit ball, β = LM, L is the Lipschitz constant of the right-hand side of differential inclusion (2) and: Suppose the sequence {δ i } satisfies the conditions δ i → 0 and ∞ i=1 δ i = ∞. If K i = for all i > 0, then there exists the Hausdorff limit, lim i→∞ K i , and: Otherwise, there are no viable subsets of G.

Numerical Scheme
The idea of the numerical method consists in the representation of the viability kernel as a level set of an appropriate function. Assume that the constraint set, G, is described by the relation: where g is a Lipschitz continuous function. It is required to construct a function, V , such that: Define the Hamiltonian of the inclusion (2) as follows: Let V be a Lipschitz function satisfying the conditions: for all x ∈ R n ; (ii) for any point y 0 ∈ R n and any function ϕ ∈ C 1 , such that V − ϕ attains a local minimum at y 0 , the following inequality holds: H (y 0 , ∇ϕ(y 0 )) ≤ 0.
Proposition 5. The function: V (x) = inf{V(x) : V satisfies the conditions (i) and (ii)} has the property: Notice that Condition (i) provides the embedding of the level sets of V into the corresponding level sets of g. Condition (ii) provides the u-stability of functions V (see [15,16]), and therefore, the u-stability of the function V . The operation "inf" provides the minimality of the resulting function, i.e., the maximality of its level sets. Thus, Proposition 5 is valid.
Unfortunately, the direct application of this proposition to the computation of V is impossible, because the validation of Condition (ii) is very difficult algorithmically. On the other hand, Theorem 1 shows that the function V can be computed as lim t→−∞ V (t, ·), where V (t, x) is the value function of the differential game with the Hamiltonian H(x, p) and the objective functional J(x(·)) = max τ ∈[t,0] {x(0), g(τ )}; see [16]. This remark allows us to use the numerical methods developed for constructing time-dependent value functions in differential games with state constraints (see [15,16]).
Let us outline the numerical methods of [15,16] and show how they should be adopted to our aims.
Consider the following finite difference scheme. Let δ > 0 be the backward time step and h := (h 1 , ..., h n ) space discretization steps. Set |h| := max{h 1 , ..., h n }. For any continuous function V : Denote by: the restrictions of V and g to the grid. Let L h be an interpolation operator that maps grid functions to continuous functions and satisfies the estimate: for any smooth function, φ. Here, φ h is the restriction of φ to the grid, · the point-wise maximum norm, D 2 φ the Hessian matrix of φ and C an independent constant.
Notice that Estimate (10) is typical for interpolation operators (see, e.g., [17]). Roughly speaking, interpolation operators reconstruct values and gradients of interpolated functions, and therefore, the expected error is given by Equation (10).
As an example, consider a multilinear interpolation operator constructed in the following way (see [15]).
Let m ∈ 1, 2 n be an integer and (j m 1 , ..., j m n ) the binary representation of m, so that j m i is either zero or one. Thus, each multi-index (j m 1 , ..., j m n ) represents a vertex of the unit cube in R n , and m counts the vertices. Introduce the following functions: Notice that the i-th member in the product (11) Let {δ } be a sequence of positive reals, such that δ → 0 and ∞ =0 δ = ∞. Consider the following grid scheme: Notice that F L h [V h ]; δ is a continuous function, which is then restricted to the grid and then compared with the grid function g h .
Relations (9) and (12) can be interpreted as follows. The shift, δf , of the argument of the function V in Equation (9) means the opposite shift of level sets of V; compare with Equation (4). The minimum over f means the union of level sets of V, and the maximum over v results in the intersection of the level sets. The subtraction of the value, δ 2 β 2 , means adding of the ball δ 2 βS to the level sets. Moreover, the maximum in Equation (12) means the intersection of the level sets with the constraint set, G. Therefore, the numerical scheme (12) implements the relation (4) in the language of level sets.
Consider another numerical grid scheme (see [16]) that approximately implements the limit lim t→−∞ V (t, ·). Introduce the following upwind operator: where f i are the components of f , and: Notice that the new operator, F , can be immediately applied to a grid function and returns a grid function.
The numerical scheme is now of the form: Notice that the application of the algorithm (13) requires the relation δ /h ≤ 1/(M √ n) for all (remember that M is the bound of F v ); see [15] and [16]. On the other hand, numerical experiments show a very nice property of this method: the noise usually coming from the boundary of the grid area is absent, so that the grid region may not be too much larger than the region where the solution is searched. The algorithm (12) does not possess such a property, so that larger grid regions are necessary in this case. On the other hand, this algorithm admits larger steps, δ , which can compensate for the necessary extent of the region.

Examples
Example 1. The first example illustrates Theorem 3 (the case of one player). Let the differential inclusion be of the form:ẋ ∈ x + αS where x ∈ R 2 is the state vector, S the unit ball of R 2 and α > 0 a positive real number. Let G = rS, where r > α. According to Theorem 3, consider the differential inclusion in reverse time (utilize the symmetry of S):ẋ ∈ −x + αS Using the function 1 2 (x 2 1 + x 2 2 ) as the Lyapunov function, one can easily see that any solution of Equation (14) does not leave G. Therefore, Example 2. The second example illustrates Theorem 2 and the application of the grid algorithm (13). Consider a pendulum with a moving suspension point. The dynamics of the object is described by the system:θ = ẇ w = 3 ml 2 u − 3(g gr + v 1 ) 2l sin θ − 3 v 2 2l cos θ Here, θ is the deflection angle, l the length, m the mass, g gr the gravity acceleration, u the torque applied to the pendulum at the suspension point (control) and v 1 and v 2 the vertical and horizontal accelerations of the suspension point, respectively, (disturbances). The following values of parameters and bounds on the control and disturbances are chosen: l = 1 m, m = 1 kg, g gr = 9.81 m/s 2 |u| ≤ 0.9 N m, |v 1 | ≤ 3 m/s 2 , |v 2 | ≤ 1.5 m/s 2 The constraint set, G, is the unit circle given by the relation g(θ, w) := √ θ 2 + w 2 ≤ 1, and the sequence {δ } is chosen as δ = 0.001/ ln(3 + ). The grid is formed by dividing the region [−1.2, 1.2] 2 into 100 × 100 square cells.
The run tests of the algorithm (13) show that: which is the stopping criterion. The runtime on a laptop with six threads is approximately 1 min. Figure 1 shows the viability kernel obtained as V iab(G) = {(θ, w) : V h (θ, w) ≤ 1}.

Conclusions
Our experience shows that the grid methods outlined in this paper are appropriate for solving nonlinear problems of the dimension up to four. The next steps will be aimed towards dimensions five and six, which requires the use of sparse representations of grid functions and the supercomputing systems that are available nowadays. Such results will allow us to consider, e.g., aircraft applications related to essentially nonlinear takeoff and landing problems with complex state constraints.