- Research
- Open access
- Published:

# The computation of the viability kernel for switched systems

*Advances in Difference Equations*
**volumeÂ 2018**, ArticleÂ number:Â 297 (2018)

## Abstract

The computation of the viability kernel provides the guarantee for the security evolution of the systems. In this paper, we focus on the computation of the viability kernel for discrete-time and continuous-time switched systems. A connection between the backward reachable set and the viability kernel for switched systems is established. The methods of computing the viability kernel for switched systems are constructed by using this connection. First, a method of computing the viability kernel for discrete-time switched systems is proposed. Then, taking into account the special structure of switched linear systems, a simple algorithm that is easy to implement is developed. Moreover, the methods of dealing with the discrete systems are extended to the continuous systems, and the algorithms of computing the viability kernel for continuous-time switched systems and switched linear systems are proposed. Finally, examples are listed to illustrate the effectiveness of the main results.

## 1 Introduction

The problem of viability [1] concerns the dynamic evolutions governed by complex systems under uncertainty that are found in many domains involving living beings, from biological evolution to economics [2], from environmental sciences to financial markets [3, 4], from control theory to cognitive sciences [5â€“7]. It aims at controlling dynamical systems with the goal to maintain the state of the systems inside a given set which we called the constraint set or safe region. Determining the viability on a constraint set has been researched in the references [8â€“12]. When faced with the constraint set that is not viable, one would like to establish a subset of the constraint set that is viable. This subset is said to be the viability kernel (or the maximal invariant set).

Computation of the viability kernel for dynamical systems is a fundamental problem in the viability theory. It has traditionally been computed using the viability kernel algorithm [13] and level set approach [14]. However, these methods require gridding the state space, and hence their time and memory complexity grow exponentially with the state dimension. Thus, these methods are feasible only for dynamical systems with low dimension. To overcome this limitation, researchers considered the same problem by using dynamic programming [15] and support vector machines [16]. Recently, Maidens in [17] proposed an algorithm of computing the viability kernel by using backward reachable set for dynamical systems. Since there are some efficient techniques for computing the maximal reachable set in [18, 19], these methods can be used to compute the viability kernel [17].

Switched systems, which consist of two or more subsystems and a switching signal orchestrating switching between these subsystems, have attracted a growing interest in recent years. The viability kernel for switched systems has been largely studied, and several results have been reported in [20â€“28]. Aubin and Lygeros introduced a notion of hybrid strategy and proved convergence of the iterative algorithm by using non-smooth analysis tools in [23]. Margellos and Lygeros proposed a method of computing the viable set for hybrid systems [24] in the context of optimal control, and a complete characterization of the computation of the viable set was provided based on dynamic programming. Haimovich et al. in [25] also developed a method of computing the invariant set for continuous-time switched linear systems with disturbances and arbitrary switching. Abate and Prandini in [26] studied probabilistic reachability over a finite horizon for a class of discrete time stochastic hybrid systems. Lygeros et al. in [27] presented some simple properties of the invariant sets for hybrid automata, and the invariance principle was extended to hybrid automata. By establishing a link between reachability, viability, and invariance problems and viscosity solutions of a special form of the Hamiltonâ€“Jacobi equation, the numerical algorithm developed for the approximation of viscosity solutions to partial differential equations was extended to viability and invariance computation in [28].

It should be noted that all the methods in [23â€“25, 28] have certain limitations when they are executed. The first is that many conditions must be satisfied in the implementation of the algorithms. In order to guarantee the convergence of these algorithms, we need to compute the maximal fixed point of a monotone operator on a complete lattice of closed sets in [24] and determine the transformation matrix satisfying certain properties in [25]. The given set must be open and the partial differential equation must have a special form (standard Hamiltonâ€“Jacobi form, continuity of the Hamiltonian, and simple boundary conditions) in [28]. Thus, the convergence conditions are too strong. Moreover, because of the large amount of computation and considerable time consumption, the implementation of the algorithms is difficult. To overcome these limitations, we restrict our attention to switched linear systems. Since they have a special structure, the limitations of [23â€“25, 28] can be solved effectively. Thus, we try to design a simple method of computing the viability kernel for switched linear systems.

The organization of the paper is as follows. In Sect. 2 we introduce some necessary preliminaries. Section 3 discusses the computation of the viability kernel for discrete-time switched systems and develops a simple algorithm for discrete-time switched linear systems. Furthermore, we compute the viability kernel for continuous-time switched systems and propose an algorithm for switched linear systems in Sect. 4. We provide several examples in Sect. 5.

## 2 Preliminaries

Consider the following switched system:

where the state \(x \in \mathrm{R}^{n} \), the control \(u \in U\), \(U \subset \mathrm{R}^{m} \), the function \(f_{\sigma}:\mathrm{R}^{n} \times U \to \mathrm{R}^{n} \), and the time *t* ranges over a time domain *T*, which can be either continuous (\(T\ = [0,\tau ] \cap \mathbb{\mathbf{R}}_{ +} \)) or discrete (\(T\ = [0,\tau ] \cap \mathbb{\mathbf{Z}}_{ +} \)). If \(0 < \tau < \infty \), problem (2.1) is said to have a finite horizon; if \(\tau = \infty \), it is said to have an infinite horizon. \(\mathcal{L}( \cdot ) \) denotes the derivative operator for continuous-time switched systems or the difference operator for the case of discrete-time. \(\sigma (t):[t_{0}, + \infty ) \to \Lambda \) is a switching signal that is a piecewise constant function of time *t* and takes values at the sampling times in a finite set \(\Lambda = \{ 1,\ldots,N\} \), where \(N > 1 \) is the number of subsystems. \(\sigma (t) = i\) (\(i \in \Lambda \)) denotes that the subsystem \(f_{i} \) is activated. We assume that the functions \(f_{i}\) (\(i \in \Lambda \)) are sufficiently smooth to guarantee the existence and uniqueness of solutions to the corresponding initial value problems. We refer to the sequence \(t_{0},t_{1},\ldots,t_{s} \) as a switching time sequence, and the sequence \(\sigma (t_{0}),\sigma (t_{1}),\ldots,\sigma (t_{s}) \) as a switching index sequence. It is clear that these two sequences can uniquely determine the switching path, and vice versa.

In order to discuss the method of computing the viability kernel conveniently, we present some important features of switched systems. Switched systems are dynamical systems that consist of a finite number of subsystems and a logical rule that orchestrates switching between these subsystems. Therefore, one of the features of switched systems is multi-subsystem. In addition, switched systems could not be guaranteed to be stable even if all subsystems are stable. Switching rule may be designed to stabilize switched systems even if all subsystems are unstable. According to the discussion above, the computation of the viability kernel is affected by the switching rules and subsystems.

We start with some notions, which will be used later on.

### Definition 1

Let \(K \subset \mathrm{R}^{n} \). The viability kernel of system (2.1) on the set *K* over the time horizon *T* is defined as follows:

Obviously, \(\mathrm{Viab}_{T}(K) \) contains all initial states in *K* for which there exists an input such that the trajectories starting from those states remain within *K* for all time \(t \in T \).

### Definition 2

The backward reachable set from *K* at time *t* is defined as follows:

In fact, the backward reachable set contains all initial states for which there exists an input such that the trajectories emanating from those states reach *K* exactly at time *t*.

The viability theory is concerned with ensuring that the state of a system remains within the given set for the duration of a known (possibly infinite) time horizon. Any trajectory of a system that leaves the given set at some point in time is considered to be no longer viable. The reachability analysis provides us a method of simulating all possible trajectories of a dynamical system under all possible inputs. In fact, the reachability is concerned with determining if any trajectories of a system that begin in a set of initial conditions can reach a set of terminal states. Both of them study the evolution of dynamical systems under the inputs and the state constraints. Thus, there is a close connection between the viability theory and the constrained reachability. The connection was used to compute the viability kernel for dynamical systems in [17]. In the rest of the paper, we extend the method to switched systems for approximating the viability kernel.

## 3 The viability kernel of discrete-time switched systems

In this section, we establish a connection between the viability kernel and the reachable set for discrete-time switched systems. Then, we discuss algorithms of computing the viability kernel in terms of the reachable set.

### 3.1 Discrete-time switched systems

We consider the discrete-time switched systems as follows:

where the time \(t \in T\ = [0,\tau ] \cap \mathbb{\mathbf{Z}}_{ +} \) and switching signal \(\sigma \in \Lambda \ = \{ 1,\ldots,N \} \). We next discuss how to compute the viability kernel on the given region *K* by using the maximal reachable set. As we know, the viability kernel for discrete-time dynamical systems can be computed using Saint-Pierreâ€™s viability kernel algorithm (see [13]). In the light of Saint-Pierreâ€™s viability kernel algorithm, we give an iterative formula of the viability kernel \(K_{n + 1}: = \mathrm{Viab}_{T}(K) \) for system (3.1) on the finite horizon \(T\ = [0,n + 1] \cap \mathbb{\mathbf{Z}}_{ +} \):

where \(F(x) = \{ f_{\sigma} (x,u) \vert u \in U,\sigma \in \Lambda \} \). We replace the finite horizon viability kernel \(K_{n} \) in (3.2) by the backward reachable set. Then we obtain the following theorem.

### Theorem 1

*The viability kernel over a finite horizon*
\(T\ = [0,n + 1] \cap \mathbb{\mathbf{Z}}_{ +} \)
*for system* (3.1) *on the set*
*K*
*can be computed by the following recursive formula*:

### Proof

System (3.1) can be written as the difference inclusion

where \(F(x) = \{ f_{\sigma} (x,u) \vert u \in U,\sigma \in \Lambda \} \). First, we prove the following formula:

By the definition of \(\mathrm{Viab}_{T}(K) \) and (3.2), we have \(x \in K_{n} \) and \(K_{n} \cap F(x) \ne \emptyset \) when \(x \in \mathrm{Viab}_{T}(K) \). It means that there exists *y* such that \(y \in K_{n} \) and \(y \in F(x) \). Then there exist \(u \in U \) and \(\sigma \in \Lambda \) such that \(y = f_{\sigma} (x,u) \). Thus, we have \(u \in U \) and \(\sigma \in \Lambda \) such that \(f_{\sigma} (x,u) \in K_{n} \). According to (2.3) and \(x \in K_{n} \), we have \(x \in \operatorname{Reach}_{1}(K_{n}) \). Moreover, we obtain that \(x \in K_{n} \cap \operatorname{Reach}_{1}(K_{n}) \). Similarly, we concluded that \(x \in \mathrm{Viab}_{T}(K) \) form \(x \in K_{n} \cap \operatorname{Reach}_{1}(K_{n}) \). This means that

Therefore, we only need to prove that

According to (3.4), we have

which implies that

and

Thus, we get

This completes the proof of the theorem.â€ƒâ–¡

Theorem 1 gives us a method of constructing a finite horizon viability kernel for discrete-time switched systems (3.1). In (3.3), we compute the viability kernel by \(K_{0} \cap \operatorname{Reach}_{1}(K_{n}) \) instead of \(K_{n} \cap \operatorname{Reach}_{1}(K_{n}) \), though they are equivalent when the reachable set and the operation of intersections can be computed exactly. In fact, \(K_{0} \) is simpler and more precise in implementation than \(K_{n} \). Thus, we construct the viability kernel by recursive formula (3.3). In what follows, the key problem we need to solve is the computation of the reachable set for switched systems.

The computation of the reachable set for dynamical systems is given in [17]. The reachable states of dynamical systems are affected by the system and the control input. Since switched systems have many subsystems, the trajectories of switched systems are restricted by multiple subsystems and the reachability is also affected by the switching rules. Different switching rules lead to different reachable states. Thus, the computation of the reachable set for switched systems is more complex than for dynamical systems. We assume that the switching rules are arbitrary switches. In this case, we need to compute the possible reachable region for every subsystem. Then the reachable set for switched systems is obtained by taking the union of all the reachable regions.

We next illustrate the computation process of the reachable set \(\operatorname{Reach}_{1}(K) \) for system (3.1) on the set *K* over a unit time step in detail. First, we need to compute the reachable set of *K* for every subsystem \(f_{\sigma} (x,u)\), \(\sigma \in \Lambda \), and the obtained set is denoted by \(\operatorname{Reach}_{1}^{\sigma} (K)\), \(\sigma \in \Lambda \). So we get *N* reachable sets. Then the set \(\operatorname{Reach}_{1}(K) \) can be got by intersecting these *N* reachable sets

The amount of the computation is proportional to the number of the subsystems. When the number of the subsystems is higher, the amount of the computation is greater.

According to Theorem 1, an algorithm of computing the viability kernel for system (3.1) over a finite horizon \(T\ = [0,n] \cap \mathbb{\mathbf{Z}}_{ +} \) is proposed (see Algorithm 1).

Algorithm 1 transforms the computation of the viability kernel on a finite horizon into the computation of the reachable set for finite times. The main advantages of Algorithm 1 are as follows: The first is that the key problem in the iteration is the computation of the reachable set. Many researchers are devoted to the computation of the reachable set for dynamical systems, and many methods of computing the reachable set are proposed. Since the methods of computing the reachable set for dynamical systems are extended to switched systems, Algorithm 1 is available in practice. The second is that the set obtained from Algorithm 1 is the exact viability kernel of system (3.1) on the given set.

### 3.2 Discrete-time switched linear systems

Algorithm 1 can be applied to switched nonlinear systems in theory. However, the computation process of nonlinear systems is rather complex and troublesome. The complexity of computing the reachable set lies in the part of nonlinear continuous evolution. Thus, we consider the viability kernel for switched linear systems. Due to the special structure of linear systems, which have some special properties, we discuss a simple algorithm of computing the viability kernel for switched linear systems. In this subsection, we consider the following discrete-time switched linear systems:

where the state \(x \in \mathrm{R}^{n} \), the time \(t \in T\ = [0,n] \cap \mathbb{\mathbf{Z}}_{ +} \), the control input \(u \in U \), *U* is a compact set, and switching signal *Ïƒ* takes values in a finite set \(\Lambda = \{ 1,\ldots,N\} \). \(A_{\sigma} \in \mathrm{R}^{n \times n} \) is an invertible matrix and \(B_{\sigma} \in \mathrm{R}^{n \times m} \). As we know, any region can be approximated by a polytope. Thus, we suppose that both the sets *K* and *U* are polytopes. In the following, we develop an efficient algorithm of computing the backward reachable set for system (3.5) on the constraint set *K*.

Due to the special structure of linear systems, (3.5) can be rewritten as

where \(v(t) \in V_{\sigma} = \{ - B_{\sigma} u \vert u \in U \} \). In the case of discrete-time, the backward reachable set of subsystem \(A_{1} \) over a unit time step is computed as follows:

The operator âŠ• means the Minkowski sum of two sets. \(A_{1}^{ - 1}( \cdot ) \) denotes the preimage of a set under the map \(A_{1} \). Similarly, the backward reachable set of subsystem \(A_{l}(l = 2,\ldots,N) \) over a unit time step is obtained by

According to the discussion above, we get the reachable set of system (3.5) on the set *K* as follows:

where \(V_{i} = \{ - B_{i}u \vert u \in U \},i \in \Lambda \).

Formula (3.8) gives us a method of computing the reachable set in the case of linear systems. In this method, the computation of the reachable set is transformed into several operations on the sets. As long as the matrices of all the subsystems are invertible, the reachable set can be expressed by (3.8). It is true for linear systems, but not for nonlinear systems. From (3.8), the computation of the reachable set involves the operations performed on sets including Minkowski sum, linear transformation, and union. In addition, it is easy to see that the operation of intersection on sets is required in the computation of the viability kernel. In the following, we illustrate the processes of these operations performed on sets of polytopes.

Let

We can compute the preimage of *K* under the linear transformation \(A_{i} \) as follows:

The intersection and union of *K* and *V* can also be easily computed, respectively.

However, the Minkowski sum is difficult to compute using the representations as (3.9). We need to convert them to another form. In fact, a polytope can also be expressed by its vertices (see [29])

where \(v_{1},v_{2},\ldots,v_{s} \) are vertices of *P*. Similarly, *K* and *V* have the following representations:

where \(w_{1},\ldots,w_{m} \) and \(v_{1},\ldots,v_{n} \) are vertices of *K* and *V*, respectively.

In fact, (3.10) is equivalent to (3.9). This is a well-studied problem, and many algorithms have been proposed to solve it. Then the Minkowski sum of *K* and *V* is given as follows [29]:

Moreover, the set \(K \oplus V \) is also a polytope.

According to the discussion above, we can give a method of computing the reachable set on the polyhedral constraint set and the polyhedral input set. Applying (3.8) to Algorithm 1, we obtain an algorithm of computing the viability kernel for system (3.5) on the finite horizon *T* (see Algorithm 2).

It should be noted that the formula of computing the reachable set can be expressed by the operations on the constraint set and the control input set. Moreover, we get the viability kernel by implementing the operations on sets including intersection, union, linear transformation, and Minkowski sum. These operations are easy to implement when both the constraint set and the control input set are polytopes. Therefore, the algorithm has a small amount of computation.

### 3.3 Analysis of the algorithms

We next give some basic properties of Algorithms 1, 2.

### Theorem 2

*If Algorithm *1 *terminates with*
\(l < n \)
*and*
\(K_{l} = \emptyset \), *then*
\(\mathrm{Viab}_{[0,n] \cap \mathbb{\mathbf{Z}}_{ +}} (K) = \emptyset \)
*and*
\(\mathrm{Viab}_{[0,\infty ) \cap \mathbb{\mathbf{Z}}_{ +}} (K) = \emptyset \). *If Algorithm *1 *terminates with*
\(l < n \)
*and*
\(K_{l} = K_{l - 1} \), *then*
\(\mathrm{Viab}_{[0,n] \cap \mathbb{\mathbf{Z}}_{ +}} (K) = K_{l} \)
*and*
\(\mathrm{Viab}_{[0,\infty ) \cap \mathbb{\mathbf{Z}}_{ +}} (K) = K_{l} \).

### Proof

The viability kernel over a finite horizon \(T = [0,n] \cap \mathbb{\mathbf{Z}}_{ +} \) is empty when Algorithm 1 terminates with \(l < n \) and \(K_{l} = \emptyset \). It means that all the trajectories of system (3.1) starting at the given region *K* will leave *K* at the *k*th (\(k \ge l\)) step of the algorithm. Thus, the viability kernel over an infinite horizon is also empty, that is, \(\mathrm{Viab}_{[0,\infty ) \cap \mathbb{\mathbf{Z}}_{ +}} (K) = \emptyset \).

If Algorithm 1 terminates with \(l < n \) and \(K_{l} = K_{l - 1} \), according to Theorem 1, the viability kernel over a finite horizon *T* is \(\mathrm{Viab}_{[0,n] \cap \mathbb{\mathbf{Z}}_{ +}} (K) = K_{l} \). In fact, at the *k*th (\(k > l\)) step of the algorithm, we have

Equation (3.11) still holds when *k* tends to infinity. This tells us that \(\mathrm{Viab}_{[0,\infty ) \cap \mathbb{\mathbf{Z}}_{ +}} (K) = K_{l} \). This completes the proof of the theorem.â€ƒâ–¡

Algorithm 2 is a special case of Algorithm 1, thus it has the same conclusion.

## 4 The viability kernel of continuous-time switched systems

In this section, we discuss the computation of the viability kernel for continuous-time switched systems. By discretizing continuous-time systems, two efficient algorithms of approximating the viability kernel are developed by using the result of Sect. 3.

### 4.1 Continuous-time switched systems

Consider the following system:

where the function \(f_{\sigma} \) is bounded by \(M > 0 \) on the constraint set \(K \subseteq \mathrm{R}^{n} \). It means that for all \(x \in K \) and \(u \in U \), we have \(\Vert f_{\sigma} (x(t),u(t)) \Vert \le M,\sigma \in \Lambda \). We define a distance of a point \(x \in \mathrm{R}^{n} \) from a nonempty set \(S \subset \mathrm{R}^{n} \) as follows:

In the following, we compute an under-approximation of the viability kernel for system (4.1) on the finite horizon \(T\ = [0,\tau ] \). Given a discretization time step *Î´*, define an under-approximation of the viability constraint set

\(K_{\delta} \) approximates to *K* by the distance *Î´M* because we only consider the state at discrete times \(t_{k} = k\delta \). For any interval \([ t_{k},t_{k + 1} ]\), the solution of (4.1) does not leave *K* at any time \(t \in [t_{k},t_{k + 1}] \). In fact, a solution \(x(t) \) of (4.1) can travel a distance of at most *Î´M* from its initial state \(x(t_{k}) \).

Thus, we define the recursive formula as follows:

At each step, we compute the set of states from which \(K_{n}(\delta ) \) is reachable, and then intersect this set with \(K_{0}(\delta ) \). Each computed set \(K_{n}(\delta ) \) is an approximation of the finite horizon viability kernel \(\mathrm{Viab}_{[0,\tau ]}(K) \) for \(\tau = n\delta \).

### Theorem 3

*Assume that*
\(f_{\sigma} \)
*is bounded by*
\(M > 0 \)
*on the set*
*K*
*for all*
\(\sigma \in \Lambda \). *For any time step*
*Î´*, *the set*
\(\{ K_{n}(\delta ) \} \)
*produced by* (4.4) *satisfies*

### Proof

In order to obtain the reachable set of \(K_{n}(\delta ) \) for system (4.1), we first compute the reachable set of \(K_{n}(\delta ) \) for every subsystem \(f_{\sigma} (x,u)\), \(\sigma \in \{ 1,\ldots,N\} \). Thus, we get *N* reachable sets. So the reachable set \(\operatorname{Reach}_{\delta} (K_{n}(\delta )) \) can be obtained by intersecting these *N* reachable sets. The rest of the proof is similar to that of Theorem 2 in [17]. This completes the proof of the theorem.â€ƒâ–¡

### Theorem 4

*Suppose that*
\(f_{\sigma} \)
*is bounded by*
\(M > 0 \)
*on the set*
*K*
*for all*
\(\sigma \in \Lambda \). *For any time step*
*Î´*, *the set*
\(\{ K_{n}(\delta ) \} \)
*produced by* (4.4) *satisfies*

### Proof

According to (4.5) and Theorem 3 in [17], the set \(\{ K_{n}(\delta ) \} \) produced by (4.4) satisfies (4.6). This completes the proof of the theorem.â€ƒâ–¡

According to (4.5) and (4.6), the set \(K_{n}(\delta ) \) produced by (4.4) is an under-approximation of the finite horizon viability kernel \(\mathrm{Viab}_{[0,\tau ]}(K) \) for \(\tau = n\delta \). Then we get an algorithm of computing a finite horizon viability kernel for system (4.1) on the constraint set *K* (see Algorithm 3).

Algorithm 3 gives us a method of computing the viability kernel over a finite horizon for continuous-time switched systems. The main iterative process of the algorithm is as follows. First, we define an under-approximation \(K_{0}(\delta ) \) of the given set and compute the set of backward reachable states from \(K_{0}(\delta ) \). Next, we intersect the backward reachable set with \(K_{0}(\delta ) \) to get \(K_{1}(\delta ) \) and compute the reachable set from \(K_{1}(\delta ) \). Then, we intersect the reachable set with \(K_{0}(\delta ) \) to get a new set \(K_{2}(\delta ) \). By repeating this process, we eventually reach an under-approximation of the viability kernel.

### 4.2 Continuous-time switched linear systems

Since linear systems have special structure and some special properties, it is more convenient to compute the reachable set. Thus, we consider a simple algorithm of approximating the viability kernel for switched linear systems. Let us restrict our attention to the following system:

where the state \(x \in \mathrm{R}^{n} \), the time \(t \in T\ = [0,\tau ] \cap \mathbb{\mathbf{R}}_{ +} \), the control input \(u \in U \), *U* is a compact and convex set, and switching signal *Ïƒ* takes values in a finite set \(\Lambda = \{ 1,\ldots,N\} \). \(A_{\sigma} \in \mathrm{R}^{n \times n} \) is an invertible matrix and bounded by *M* and \(B_{\sigma} \in \mathrm{R}^{n \times m} \). Before computing the backward reachable set of system (4.7) on the constraint set *K*, we introduce a notion of Hausdorff distance.

### Definition 3

Let *X*, *Y* be nonempty compact convex subsets of \(\mathrm{R}^{n} \). The Hausdorff distance of *X* and *Y* is defined as follows:

We next compute an approximation of the reachable set by discretizing system (4.7). By choosing a time step *Î´*, the number of time steps is \(n = \frac{\tau}{\delta} \). Suppose that the control \(u(t) = \tilde{u}(t_{i}) \) is constant over the time interval \([t_{i},t_{i + 1}]\), \(i = 0,1,\ldots,n - 1 \). We discretize system (4.7) by using Eulerian method, then we have

Applying Theorem 1 of [30] to system (4.7) and the corresponding discretization system (4.9), we obtain the following result.

### Theorem 5

*Suppose that*
\(\operatorname{Reach}_{[0,\delta n]}(K_{l}) \)
*and*
\(\tilde{\mathrm{R}}\mathrm{each}_{[0,\delta n]}(K_{l}) \)
*are the backward reachable sets of systems* (4.7) *and* (4.9) *on the set*
\(K_{l} \)
*over the time interval*
\([ t_{l},t_{l + 1} ]\), *respectively*. *Then there exists a constant*
*C*
*such that*

*where*
*Î´*
*is a discretization time step*.

### Proof

The conclusion can be established by following Theorem 1 in [30]. This completes the proof of the theorem.â€ƒâ–¡

Theorem 5 shows us that the Hausdorff distance between the reachable sets \(\operatorname{Reach}_{[0,\delta n]}(K_{l}) \) and \(\tilde{\mathrm{R}}\mathrm{each}_{[0,\delta n]}(K_{l}) \) has an upper bound, and the distance is proportional to the size of *Î´*. Moreover, when *Î´* is smaller, the upper bound of the associated Hausdorff distance is smaller. Theorem 5 provides us a theoretical basis for using \(\tilde{\mathrm{R}}\mathrm{each}_{[0,\delta n]}(K_{l}) \) approximating to \(\operatorname{Reach}_{[0,\delta n]}(K_{l}) \), that is, we can obtain an approximation of the reachable set for a continuous-time system by computing the reachable set for the corresponding discretization system. Thus, we only need to compute the reachable set for system (4.9), which is equivalent to the following system:

*I* is an identity matrix. Setting \(V_{\sigma} = - \delta B_{\sigma} U = \{ - \delta B_{\sigma} \tilde{u}(t) \vert \tilde{u}(t) \in U\} \), the reachable set over a single time step can be computed as follows:

Since \(A_{\sigma} \) is non-singular, we assume that \(\lambda_{1},\ldots,\lambda_{nN} \) are the eigenvalues of the matrices \(A_{1},\ldots,A_{N} \), respectively. When the time step *Î´* satisfies the following condition

then the matrix \(I + \delta A_{\sigma} \) is non-singular for any \(\sigma \in \Lambda \). Thus, (4.12) is meaningful.

Based on Algorithm 3 and (4.12), we propose an algorithm of computing an approximation of the viability kernel for system (4.7) (see Algorithm 4).

Algorithm 4 is the development of Algorithm 3 in the case of linear systems. The computation of the reachable set has been simplified. Moreover, an approximation of the viability kernel can be obtained by computing the viability kernel of the corresponding discretization system. The approximation error can be made arbitrarily small by choosing *Î´* small enough.

Algorithms 3 and 4 have the same properties as listed in Theorem 2. The proof is similar to that of Theorem 2, and we do not illustrate it in detail.

## 5 Illustrative examples

### 5.1 Example 1

Consider the following discrete-time switched linear system:

where the state \(x \in \mathrm{R}^{2} \), the time \(t \in T\ = [0,n] \cap \mathbb{\mathbf{R}}_{ +} \), the control input \(u \in U \subset \mathrm{R}^{2} \). We assume that the control input set

and the state constraint set

We next compute the viability kernel for system (5.1) on the state constraint set (5.3) with a horizon of 40 steps. The viability kernel can be obtained by using Algorithm 2, the result shows in Fig. 1.

Figure 1 shows us that the red region is the viability constraint set, and the green region is the viability kernel for system (5.1).

### 5.2 Example 2

Consider the following continuous-time switched linear system:

The control input set and the state constraint set are given by (5.2) and (5.3), respectively. We compute the viability kernel of system (5.4) on the region (5.3) with the time horizon \([ 0,4 ]\). Choosing the time step \(\delta = 0.1 \), we discretize system (5.4). Then we obtain an approximation of the viability kernel by using Algorithm 4. The result shows in Fig. 2.

### 5.3 Example 3

Consider the following discrete-time switched linear system:

where *I* is an identity matrix, the state \(x \in \mathrm{R}^{3} \), the time \(t \in T\ = [0,n] \cap \mathbb{\mathbf{R}}_{ +} \), the control input \(u \in U \subset \mathrm{R}^{3} \). We assume that the control input set

and the state constraint set

We next compute the viability kernel for system (5.5) on the state constraint set (5.7) with a horizon of 10 steps. The viability kernel can be obtained by using Algorithm 2, the result shows in Fig. 3.

## 6 Conclusions

We established a connection between the viability and the reachability, which enables us to compute the viability kernel for switched systems in terms of the backward reachable sets. For the discrete-time switched systems, the viability kernel over a finite horizon can be computed exactly by using the algorithm we proposed. According to the special structure of switched linear systems, we obtained a simple algorithm that is easy to implement. For the continuous-time switched systems, we got an approximation of the true viability kernel by computing the viability kernel of the corresponding discretization system. The approximation error can be made arbitrarily small by choosing the time step small enough. The method is simple when the systems are linear. The effectiveness of the obtained results has been verified through numerical examples.

## References

Aubin, J.P.: Viability Theory. Springer, Berlin (2011)

BÃ©nÃ©, C., Doyen, L., Gabay, D.: A viability analysis for a bio-economic model. Ecol. Econ.

**36**(3), 385â€“396 (2001)Mullon, C., Cury, P., Shannon, L.: Viability model of trophic interactions in marine ecosystems. Nat. Resour. Model.

**17**(1), 71â€“102 (2004)Sanogo, C., RaÃ¯ssi, N., Miled, S.B., et al.: A viability analysis of fishery controlled by investment rate. Acta Biotheor.

**61**(3), 341â€“352 (2013)Liu, L., Gao, Y., Wu, Y.P.: Speed optimization control for wheeled robot navigation with obstacle avoidance based on viability theory. Automatika

**57**(2), 428â€“440 (2017)Spiteri, R.J., Pai, D.K., Ascher, U.M.: Programming and control of robots by means of differential algebraic inequalities. IEEE Trans. Robot. Autom.

**16**(2), 135â€“145 (2000)Jaulin, L., Bars, F.L.: An interval approach for stability analysis: application to sailboat robotics. IEEE Trans. Robot. Autom.

**29**(1), 282â€“287 (2013)Chen, Z., Gao, Y.: Determining the viable unbounded polyhedron under linear control systems. Asian J. Control

**16**(5), 1561â€“1567 (2014)Lou, Z.E., Gao, Y.: The exponential stability for a class of hybrid systems. Asian J. Control

**15**(2), 624â€“629 (2013)Dong, X.X., Zhao, J.: Incremental passivity and output tracking of switched nonlinear systems. Int. J. Control

**85**(10), 1477â€“1485 (2012)Gao, Y.: Viability criteria for differential inclusions. J. Syst. Sci. Complex.

**24**(5), 825â€“834 (2011)Lv, J.F., Gao, Y., Zhao, N.: Viability criteria for a switched system on bounded polyhedron. Asian J. Control (2017, in press). https://doi.org/10.1002/asjc.1719

Saint-Pierre, P.: Approximation of viability kernel. Appl. Math. Optim.

**29**(2), 187â€“209 (1994)Mitchell, I.M., Bayen, A.M., Tomlin, C.J.: A time-dependent Hamiltonâ€“Jacobi formulation of reachable sets for continuous dynamic games. IEEE Trans. Autom. Control

**50**(7), 947â€“957 (2005)Coquelin, P.A., Martin, S., Munos, R.: A dynamic programming approach to viability problems. In: IEEE International Symposium on Approximate Dynamic Programming and Reinforcement Learning, pp.Â 178â€“184 (2007)

Deffuant, G., Chapel, L., Martin, S.: Approximating viability kernels with support vector machines. IEEE Trans. Autom. Control

**52**(5), 933â€“937 (2007)Maidens, J.N., Kaynama, S., Mitchell, I.M., Oishi, M.M.K.: Lagrangian methods for approximating the viability kernel in high-dimensional systems. Automatica

**49**, 2017â€“2029 (2013)Kaynama, S., Mitchell, I.M., Oishi, M., et al.: Scalable safety-preserving robust control synthesis for continuous-time linear systems. IEEE Trans. Autom. Control

**60**(11), 3065â€“3070 (2015)Maidens, J., Arcak, M.: Reachability analysis of nonlinear systems using matrix measures. IEEE Trans. Autom. Control

**60**(1), 265â€“270 (2015)Fribourg, L., Goubault, E., Putot, S., et al.: A topological method for finding invariant sets of switched systems. In: Proceedings of the 19th International Conference on Hybrid Systems: Computation and Control, pp.Â 61â€“70. ACM, New York (2016)

Riedinger, P., Sigalotti, M., Daafouz, J.: On the algebraic characterization of invariant sets of switched linear systems. Automatica

**46**(6), 1047â€“1052 (2010)Han, Y., Gao, Y.: The calculation of discriminating kernel based on viability kernel and reachability. Adv. Differ. Equ.

**2017**, 370 (2017)Aubin, J.P., Lygeros, J., Quincampoix, M., et al.: Impulse differential inclusions: a viability approach to hybrid systems. IEEE Trans. Autom. Control

**47**(1), 2â€“20 (2002)Margellos, K., Lygeros, J.: Viable set computation for hybrid systems. Nonlinear Anal. Hybrid Syst.

**10**, 45â€“62 (2013)Haimovich, H., Seron, M.M.: Componentwise ultimate bound and invariant set computation for switched linear systems. Automatica

**46**(11), 1897â€“1901 (2010)Abate, A., Prandini, M., Lygeros, J., et al.: Probabilistic reachability and safety for controlled discrete time stochastic hybrid systems. Automatica

**44**(11), 2724â€“2734 (2008)Lygeros, J., Johansson, K.H., Simic, S.N., et al.: Dynamical properties of hybrid automata. IEEE Trans. Autom. Control

**48**(1), 2â€“17 (2003)Lygeros, J.: On reachability and minimum cost optimal control. Automatica

**40**(6), 917â€“927 (2004)Kvasnica, M., Grieder, P., BaotiÄ‡, M., et al.: Multi-parametric toolbox (MPT). In: Hybrid Systems: Computation and Control, pp.Â 448â€“462 (2004)

Dontchev, A.L., Farkhi, E.M.: Error estimates for discretized differential inclusions. Computing

**41**(4), 349â€“358 (1989)

## Acknowledgements

This work is supported by the National Natural Science Foundation of China under Grant No.11171221, Doctoral Program Foundation of Institutions of Higher Education of China under Grant No.20123120110004.

## Funding

This work is supported by the National Natural Science Foundation of China under Grant No.11171221, Doctoral Program Foundation of Institutions of Higher Education of China under Grant No.20123120110004.

## Author information

### Authors and Affiliations

### Contributions

All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare that they have no competing interests.

## Additional information

### Publisherâ€™s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Lv, J., Gao, Y. The computation of the viability kernel for switched systems.
*Adv Differ Equ* **2018**, 297 (2018). https://doi.org/10.1186/s13662-018-1756-y

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s13662-018-1756-y