Skip to main content

Theory and Modern Applications

The computation of the viability kernel for switched systems

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:

$$ \textstyle\begin{cases} \mathcal{L}(x(t)) = f_{\sigma (t)}(x(t),u(t)), \\ u(t) \in U, \end{cases} $$
(2.1)

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:

$$ \mathrm{Viab}_{T}(K) = \bigl\{ x_{0} \in K\vert \exists u_{0}:T \to U,\forall t \in T,x(t) \in K \bigr\} . $$
(2.2)

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:

$$ \operatorname{Reach}_{t}(K) = \bigl\{ x_{0} \in \mathrm{R}^{n} \vert \exists u_{0} \in U,x(t) \in K \bigr\} . $$
(2.3)

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:

$$ x(t + 1) = f_{\sigma (t)}\bigl(x(t),u(t)\bigr), $$
(3.1)

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}}_{ +} \):

$$ \textstyle\begin{cases} K_{0} = K, \\ K_{n + 1} = \{ x \in K_{n}| K_{n} \cap F(x) \ne \emptyset \}, \end{cases} $$
(3.2)

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:

$$ \textstyle\begin{cases} K_{0} = K, \\ K_{n + 1} = K_{0} \cap \operatorname{Reach}_{1}(K_{n}). \end{cases} $$
(3.3)

Proof

System (3.1) can be written as the difference inclusion

$$x(t + 1) \in F\bigl(x(t)\bigr),\quad t = 0,1,\ldots,n, $$

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

$$ \mathrm{Viab}_{T}(K) = K_{n} \cap \operatorname{Reach}_{1}(K_{n}). $$
(3.4)

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

$$\mathrm{Viab}_{T}(K) = K_{n} \cap \operatorname{Reach}_{1}(K_{n}). $$

Therefore, we only need to prove that

$$K_{n} \cap \operatorname{Reach}_{1}(K_{n}) = K_{0} \cap \operatorname{Reach}_{1}(K_{n}). $$

According to (3.4), we have

$$K_{n + 1} = K_{n} \cap \operatorname{Reach}_{1}(K_{n}), $$

which implies that

$$K_{n + 1} \subseteq K_{n} \subseteq\cdots \subseteq K_{1} \subseteq K_{0} $$

and

$$\operatorname{Reach}_{1}(K_{n}) \subseteq \operatorname{Reach}_{1}(K_{n - 1}) \subseteq\cdots \subseteq \operatorname{Reach}_{1}(K_{1}) \subseteq \operatorname{Reach}_{1}(K_{0}). $$

Thus, we get

$$\begin{aligned} K_{n + 1} &= K_{0} \cap \operatorname{Reach}_{1}(K_{0}) \cap \operatorname{Reach}_{1}(K_{1}) \cap\cdots \cap \operatorname{Reach}_{1}(K_{n}) \\ & = K_{0} \cap \operatorname{Reach}_{1}(K_{n}). \end{aligned} $$

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

$$\operatorname{Reach}_{1}(K) = \bigcup_{i = 1}^{N} \operatorname{Reach}_{1}^{i}(K). $$

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
figure a

The viability kernel of discrete-time switched systems

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:

$$ x(t + 1) = A_{\sigma} x(t) + B_{\sigma} u(t), $$
(3.5)

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

$$x(t + 1) = A_{\sigma} x(t) - v(t), $$

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:

$$ \operatorname{Reach}(K) = A_{1}^{ - 1}(K \oplus V_{1}). $$
(3.6)

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

$$ \operatorname{Reach}(K) = A_{l}^{ - 1}(K \oplus V_{l}). $$
(3.7)

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

$$ \begin{aligned}[b] \operatorname{Reach}(K) &= A_{1}^{ - 1}(K \oplus V_{1}) \cup\cdots \cup A_{N}^{ - 1}(K \oplus V_{N}) \\ & = \bigcup_{i = 1}^{N} A_{i}^{ - 1}(K \oplus V_{i}), \end{aligned} $$
(3.8)

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

$$ \begin{gathered} K = \bigl\{ x \in \mathrm{R}^{n} \vert H_{1}x \le b_{1} \bigr\} , \\ V = \bigl\{ x \in \mathrm{R}^{n} \vert H_{2}x \le b_{2} \bigr\} . \end{gathered} $$
(3.9)

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

$$A_{i}^{ - 1}K = \bigl\{ x \in \mathrm{R}^{n} \vert H_{1}A_{i}^{ - 1}x \le b_{1} \bigr\} . $$

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

K ∩ V = { x ∈ R n | [ H 1 H 2 ] x ≤ [ b 1 b 2 ] } , K ∪ V = { x ∈ R n | H 1 x ≤ b 1  or  H 2 x ≤ b 2 } .

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])

$$P = \mathrm{co}\{ v_{1},\ldots,v_{s}\} = \Biggl\{ \sum _{i = 1}^{s} \lambda_{i}v_{i} \bigg\vert \lambda_{i} \ge 0,\sum_{i = 1}^{s} \lambda_{i} = 1 \Biggr\} , $$

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

$$ \begin{gathered} K = \mathrm{co}\{ w_{1}, \ldots,w_{m}\}, \\ V = \mathrm{co}\{ v_{1},\ldots,v_{n}\}, \end{gathered} $$
(3.10)

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]:

$$K \oplus V = \mathrm{co}\bigl\{ w_{i} + v_{j} \vert i = 1,\ldots,m; j = 1,\ldots,n\bigr\} . $$

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).

Algorithm 2
figure b

The viability kernel of discrete-time switched linear systems

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 kth (\(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 kth (\(k > l\)) step of the algorithm, we have

$$ K_{k} = K_{l}. $$
(3.11)

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:

$$ \dot{x}(t) = f_{\sigma (t)}\bigl(x(t),u(t)\bigr), $$
(4.1)

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:

$$ d_{S}(x) = \inf_{s \in S} \Vert x - s \Vert . $$
(4.2)

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} = \bigl\{ x \in K|d_{K^{c}}(x) \ge \delta M\bigr\} . $$
(4.3)

\(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}) \).

$$\bigl\Vert x(t_{k}) - x(t) \bigr\Vert \le \int_{t_{k}}^{t} \bigl\Vert \dot{x}(\tau ) \bigr\Vert d\tau \le M(t - t_{k}) \le \delta M. $$

Thus, we define the recursive formula as follows:

$$ \textstyle\begin{cases} K_{0}(\delta ) = K_{\delta}, \\ K_{n + 1}(\delta ) = K_{0}(\delta ) \cap \operatorname{Reach}_{\delta} (K_{n}(\delta )). \end{cases} $$
(4.4)

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

$$ K_{n}(\delta ) \subseteq \mathrm{Viab}_{[0,n\delta ]}(K). $$
(4.5)

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

$$ \mathrm{Viab}_{[0,\tau ]}\bigl({\mathop{\mathrm{int}}} (K)\bigr) \subseteq \bigcup_{n \in N} K_{n}(\delta ) \subseteq \mathrm{Viab}_{[0,\tau ]}(K). $$
(4.6)

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
figure c

The viability kernel of continuous-time switched systems

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:

$$ \dot{x}(t) = A_{\sigma} x(t) + B_{\sigma} u(t), $$
(4.7)

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:

$$ d_{H}(X,Y) = \max \Bigl\{ \sup_{x \in X}\inf _{y \in Y} \Vert x - y \Vert ,\sup_{y \in Y}\inf _{x \in X} \Vert x - y \Vert \Bigr\} . $$
(4.8)

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

$$ \textstyle\begin{cases} \tilde{x}(t_{i + 1}) = \tilde{x}(t_{i}) + \delta (A_{\sigma} \tilde{x}(t_{i}) + B_{\sigma} \tilde{u}(t_{i})), \\ \tilde{u}(t_{i}) \in U,\quad i = 0,1,\ldots,n - 1. \end{cases} $$
(4.9)

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

$$ d_{H}\bigl(\operatorname{Reach}_{[0,\delta n]}(K_{l}), \tilde{\mathrm{R}}\mathrm{each}_{[0,\delta n]}(K_{l})\bigr) \le C \delta, $$
(4.10)

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:

$$ \tilde{x}(t + 1) = (I + \delta A_{\sigma} )\tilde{x}(t) + \delta B_{\sigma} \tilde{u}(t). $$
(4.11)

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:

$$ \tilde{\mathrm{R}}\mathrm{each}_{[0,\delta n]}(K_{l}) = (I + \delta A_{\sigma} )^{ - 1}(K_{l} \oplus V_{\sigma} ). $$
(4.12)

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

$$ \delta < \min \biggl\{ \frac{1}{\lambda_{1}},\ldots,\frac{1}{\lambda_{nN}} \biggr\} , $$
(4.13)

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
figure d

The viability kernel of continuous-time switched linear systems

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:

A 1 = ( 0 1 − 1 0 ) , A 2 = ( − 1 1 0 1 ) , B 1 = ( 1 0 0 1 ) , B 2 = ( 0 1 1 0 ) ,
(5.1)

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

$$ U = \bigl\{ u = (u_{1},u_{2})^{\mathrm{T}} \vert {-} 0.3 \le u_{i} \le 0.3,i = 1,2 \bigr\} , $$
(5.2)

and the state constraint set

$$ K = \bigl\{ x = (x_{1},x_{2})^{\mathrm{T}} \vert {-} 0.5 \le x_{i} \le 0.5,i = 1,2 \bigr\} . $$
(5.3)

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
figure 1

Viability constraint (5.3) (red) and the corresponding viability kernel (green) for (5.1) by using Algorithm 2

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:

A 1 = ( − 1 − 1 1 − 1 ) , A 2 = ( − 1 − 10 0.1 − 1 ) , B 1 = ( 1 0 0 1 ) , B 2 = ( 0 1 1 0 ) .
(5.4)

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.

Figure 2
figure 2

Viability constraint (5.3) (red) and the corresponding viability kernel (green) for (5.4) by using Algorithm 4

5.3 Example 3

Consider the following discrete-time switched linear system:

A 1 = ( − 1 0 0 0 1 0 1 0 1 ) , A 2 = ( 1 0 1 0 1 0 0 0 1 ) , B 1 = B 2 =I,
(5.5)

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

$$ U = \bigl\{ u = (u_{1},u_{2},u_{3})^{\mathrm{T}} \vert {-}0.03 \le u_{i} \le 0.03,i = 1,2,3 \bigr\} , $$
(5.6)

and the state constraint set

$$ K = \bigl\{ x = (x_{1},x_{2},x_{3})^{\mathrm{T}} \vert {-} 0.5 \le x_{i} \le 0.5,i = 1,2,3 \bigr\} . $$
(5.7)

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.

Figure 3
figure 3

Viability constraint (5.7) (grey) and the corresponding viability kernel (green) for (5.5) by using Algorithm 2

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

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

    Book  MATH  Google Scholar 

  2. Béné, C., Doyen, L., Gabay, D.: A viability analysis for a bio-economic model. Ecol. Econ. 36(3), 385–396 (2001)

    Article  Google Scholar 

  3. Mullon, C., Cury, P., Shannon, L.: Viability model of trophic interactions in marine ecosystems. Nat. Resour. Model. 17(1), 71–102 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. 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)

    Article  Google Scholar 

  6. 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)

    Article  Google Scholar 

  7. Jaulin, L., Bars, F.L.: An interval approach for stability analysis: application to sailboat robotics. IEEE Trans. Robot. Autom. 29(1), 282–287 (2013)

    Article  Google Scholar 

  8. Chen, Z., Gao, Y.: Determining the viable unbounded polyhedron under linear control systems. Asian J. Control 16(5), 1561–1567 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  9. Lou, Z.E., Gao, Y.: The exponential stability for a class of hybrid systems. Asian J. Control 15(2), 624–629 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  10. Dong, X.X., Zhao, J.: Incremental passivity and output tracking of switched nonlinear systems. Int. J. Control 85(10), 1477–1485 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  11. Gao, Y.: Viability criteria for differential inclusions. J. Syst. Sci. Complex. 24(5), 825–834 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  12. 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

  13. Saint-Pierre, P.: Approximation of viability kernel. Appl. Math. Optim. 29(2), 187–209 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  14. 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)

    Article  MathSciNet  MATH  Google Scholar 

  15. 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)

    Chapter  Google Scholar 

  16. Deffuant, G., Chapel, L., Martin, S.: Approximating viability kernels with support vector machines. IEEE Trans. Autom. Control 52(5), 933–937 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Article  MathSciNet  MATH  Google Scholar 

  18. 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)

    Article  MathSciNet  MATH  Google Scholar 

  19. Maidens, J., Arcak, M.: Reachability analysis of nonlinear systems using matrix measures. IEEE Trans. Autom. Control 60(1), 265–270 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  20. 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)

    Google Scholar 

  21. Riedinger, P., Sigalotti, M., Daafouz, J.: On the algebraic characterization of invariant sets of switched linear systems. Automatica 46(6), 1047–1052 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  22. Han, Y., Gao, Y.: The calculation of discriminating kernel based on viability kernel and reachability. Adv. Differ. Equ. 2017, 370 (2017)

    Article  MathSciNet  Google Scholar 

  23. 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)

    Article  MathSciNet  MATH  Google Scholar 

  24. Margellos, K., Lygeros, J.: Viable set computation for hybrid systems. Nonlinear Anal. Hybrid Syst. 10, 45–62 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  25. Haimovich, H., Seron, M.M.: Componentwise ultimate bound and invariant set computation for switched linear systems. Automatica 46(11), 1897–1901 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  26. 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)

    Article  MathSciNet  MATH  Google Scholar 

  27. Lygeros, J., Johansson, K.H., Simic, S.N., et al.: Dynamical properties of hybrid automata. IEEE Trans. Autom. Control 48(1), 2–17 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  28. Lygeros, J.: On reachability and minimum cost optimal control. Automatica 40(6), 917–927 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  29. Kvasnica, M., Grieder, P., Baotić, M., et al.: Multi-parametric toolbox (MPT). In: Hybrid Systems: Computation and Control, pp. 448–462 (2004)

    Chapter  Google Scholar 

  30. Dontchev, A.L., Farkhi, E.M.: Error estimates for discretized differential inclusions. Computing 41(4), 349–358 (1989)

    Article  MathSciNet  MATH  Google Scholar 

Download references

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

Authors

Contributions

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

Corresponding author

Correspondence to Yan Gao.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

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

Keywords