A data-driven method for computing polyhedral invariant sets of black-box switched linear systems
aa r X i v : . [ ee ss . S Y ] S e p A data-driven method for computing polyhedral invariant sets ofblack-box switched linear systems
Zheming Wang and Rapha¨el M. Jungers
Abstract — In this paper, we consider the problem of invariantset computation for black-box switched linear systems usingmerely a finite set of observations of system simulations. Inparticular, this paper focuses on polyhedral invariant sets. Wepropose a data-driven method based on the one step forwardreachable set. For formal verification of the proposed method,we introduce the concept of almost-invariant sets for switchedlinear systems. The convexity-preserving property of switchedlinear systems allows us to conduct contraction analysis onalmost-invariant sets and derive an a priori probabilistic guar-antee. In the spirit of non-convex scenario optimization, we alsoestablish a posteriori the level of violation on the computed set.The performance of our method is then illustrated by a switchedsystem under arbitrary switching between two modes.
I. I
NTRODUCTION
Switched linear systems consist of a finite set of lineardynamics (called modes) and a switching rule that indicatesthe current active mode of the system. They constitute animportant family of hybrid systems. While the system isgoverned by linear dynamics dwelling in the same mode, thejump from one mode to another causes interesting hybridphenomena distinct from the behaviors of the individuallinear dynamics. For instance, despite the simplicity of thedynamics, stability analysis for a switched linear system isstill complicated due to the switching signal, see [1] and thereferences therein.Invariant set theory is widely used in system analysis andhas been successfully generalized to study the propertiesof switched systems, see, e.g., [2]. One typical techniquefor invariant set characterization is to construct Lyapunovfunctions of the switched system, see, e.g., [1], [3], [4]. Inthe presence of state constraints, more complications arisebecause invariant sets have to be constraint admissible, see[5] for the case of polyhedral constraints. While handlinggeneral nonlinear constraints is still an open problem, thereexist algorithms for computing invariant sets for certainclasses of nonlinear constraints, see, e.g., [6], [7]. In [8],combinatorial methods have been introduced for switchedsystems where the switching signals are restricted by alabeled directed graph or an automaton.The aforementioned algorithms are all based on theknowledge of a hybrid model of the switched system,
The authors are with the ICTEAM Institute, UCLouvain, Louvain-la-Neuve,1348, Belgium. Email addresses: [email protected](Zheming Wang), [email protected] (Rapha¨el M. Jungers)Rapha¨el M. Jungers is a FNRS honorary Research Associate. This projecthas received funding from the European Research Council (ERC) under theEuropean Union’s Horizon 2020 research and innovation programme undergrant agreement No 864017 - L2C. Rapha¨el M. Jungers is also supportedby the Walloon Region and the Innoviris Foundation. which is usually obtained by hybrid system identification[9]. However, except for simple systems with very lowdimensions, hybrid system identification is often computa-tionally demanding. In fact, identifying a switched linearsystem is known to be NP-hard [10]. Data-driven analysisunder the framework of black-box systems has been anactive area of research in recent years, see [11]–[13]. Forinstance, probabilistic stability guarantees are provided in[12] for black-box switched linear systems, based merely ona finite number of observations of trajectories. Data-drivenanalysis also allows us to study set invariance for black-boxswitched linear systems without performing hybrid systemidentification. The data-driven stability analysis technique in[12] essentially attempts to compute an invariant ellipsoid.However, ellipsoidal invariant sets are often conservative forswitched linear systems, because they rely on a commonquadratic Lyapunov function, which may not exist even ifthe system is stable, see [1]. In this paper, we consider thecomputation of polyhedral invariant sets of switched linearsystems under arbitrary switching. Our goal is to developa data-driven method for computing polyhedral invariantsets in the spirit of the scenario optimization approach[14]. The contributions of this paper are threefold. First,inspired by [15], we propose a geometric algorithm basedon a finite set of snapshot pairs of the states. Second, weintroduce the concept of almost-invariant sets for switchedlinear systems and show their connections to λ -contractive sets via contraction analysis. Third, we derive a priori and aposteriori probabilistic guarantees for the proposed geometricalgorithm.The rest of the paper is organized as follows. This sectionends with the notation, followed by the next section on thereview of preliminary results on invariant sets and switchedlinear systems. Section III presents the proposed data-drivenmethod. In Section IV, probabilistic guarantees of the pro-posed method are discussed. Numerical results are providedin Section V. Notation . The non-negative integer set is indicated by Z + .For a square matrix Q , Q ≻ ( (cid:23) ) 0 means Q is positivedefinite (semi-definite). S n − and B n are the unit sphere andunit ball respectively in R n . Let µ ( · ) denote the uniformspherical measure on S n − with µ ( S n − ) = 1 . For anysymmetric matrix P ≻ , we define k x k P := √ x T P x .Given any set S ⊆ R n , conv ( S ) is the convex hull of S andlet k x k S denote min { λ ≥ x ∈ λS } for any x ∈ R n A(bounded) polytope S is called a C-polytope if it is convexand contains the origin in its interior. For any C-polytope S , let V ( S ) denote the set of vertices and F ( S ) denotehe set of facets. Given any u ∈ R n and θ ∈ [0 , π/ , let Cap ( u, θ ) := { v ∈ S n − : u T v ≥ k u k cos( θ ) } denote thespherical cap with the direction u and the angle θ .II. P RELIMINARIES AND PROBLEM STATEMENT
Switched linear systems are described below: x ( t + 1) = A σ ( t ) x ( t ) , t ∈ Z + (1)where σ ( t ) : Z + → M := { , , · · · , M } a time-dependent switching signal that indicates the current activemode of the system among M possible modes in A := { A , A , · · · , A M } . For any given switching sequence σ , let AAA σσσ ( k ) := A σ ( k − · · · A σ (1) A σ (0) , k ∈ Z + (2)with σσσ ( k ) := { σ ( k − , · · · , σ (1) , σ (0) } , σσσ (0) = ∅ , and AAA σσσ (0) = I n . The stability of System (1) can be described bythe joint spectral radius (JSR) of the matrix set A definedby [16] ρ ( A ) := lim k →∞ max σσσ ( k ) ∈M k k AAA σσσ ( k ) k /k (3)Throughout the paper, we assume that ρ ( A ) < . We focuson the computation of invariant sets of System (1) underarbitrary switching, which are formally defined below. Definition 1:
A nonempty set Z ⊆ R n is an invariant setfor System (1) if x ∈ Z implies that Ax ∈ Z for any A ∈ A .From the definition above, invariant sets are inherentlyrelated with the stability of System (1). For instance, the levelset of a common quadratic Lyapunov function, which can beefficiently computed via semidefinite programming when itexists and the dynamics matrices A are known, see, e.g.,[1], is an ellipsoidal invariant set. In this paper, we focus onpolyhedral invariant sets. Under the assumption that ρ ( A ) < , the existence of a polyhedral invariant set is guaranteed,while an ellipsoidal invariant set may not exist because acommon quadratic Lyapunov function does not necessarilyexist. This is one of the reasons why polyhedral invariantsets are often more appealing for switched linear systems,even though the computation may be more expensive.A necessary and sufficient condition for set invariance inthe polyhedral case is given below. Proposition 1:
A C-polytope S ⊆ R n is an invariant setfor System (1) if and only if k A σ x k S ≤ k x k S , ∀ x ∈ S n − , ∀ σ ∈ M . (4)Proof: This proposition is a direct consequence of the homo-geneity property, i.e., for any γ > , k γx k S = γ k x k S and k A σ γx k S = γ k A σ x k S . (cid:3) When the dynamics matrices A are known, classical algo-rithms based on iterative linear programming exist, see, e.g.,[5], [15], allowing to compute such a set efficiently. However,as we have mentioned above, in many cases, approximatingthe model of a switched system is computationally demand-ing, let alone identifying it exactly. This paper considers thecase where the dynamics matrices A are unknown. We callsuch systems black-box switched linear systems.In the black-box case, we sample a finite set of the initialstates and the switching modes. More precisely, we randomly and uniformly generate N initial states on S n − and N modes in M , which are denoted by ω N := { ( x i , σ i ) ∈ S n − × M : i = 1 , , · · · , N } . From this random sampling,we observe the data set { ( x i , A σ i x i ) : i = 1 , , · · · , N } ,where A σ i x i is the successor of the initial state x i . Notethat the switching signal does not have to be observable.For the given data set ω N (or { ( x i , A σ i x i ) } Ni =1 ), we definethe following sampled problem:find S s.t. k A σ x k S ≤ k x k S , ∀ ( x, σ ) ∈ ω N (5)where S is a C-polytope. As we assume asymptotic stabilityunder arbitrary switching, we are interested in invariant setsthat contain the origin in their interiors. For this reason, S in (5) is restricted to be a C-polytope. In this paper, weattempt to solve this sampled problem (5) using a geometricalgorithm by scaling the sampled points and computing theconvex hull of the scaled points iteratively. We will showthat convergence of this algorithm is guaranteed under theassumption that ρ ( A ) < .III. D ATA - DRIVEN COMPUTATION OF POLYHEDRALINVARIANT SETS
This section presents the proposed data-driven method forcomputing polyhedral invariant sets of black-box switchedlinear systems.
A. A geometric algorithm
We first present a geometric algorithm for computinginvariant sets for the case where the matrices A are known.This geometric algorithm is based on the one step forwardreachable set [2], [15]. Given an initial C-polytope X , let usdefine: R k +1 = conv ( R k [ σ ∈M A σ R k ) , R = X, k ∈ Z + . (6)The properties of the algorithm above are stated in thefollowing proposition. Proposition 2 ( [15]):
Suppose ρ ( A ) < , let us define R k as in (6) for all k ∈ Z + with an initial C-polytope X .Then, the following results hold. (i) There exists a finite k such that R k +1 = R k = R ∞ . (ii) The set R ∞ is the smallestinvariant set that contains X .Proof: A sketch of the proof is given here. We refer thereaders to [15] for the detailed proof. (i) It can be shown byinduction that, ∀ k ∈ Z + , R k = conv ( X [ σ ∈M A σ X [ · · · [ σσσ ∈M k AAA σσσ X ) (7)where AAA σσσ is defined in (2). Since ρ ( A ) < and X isbounded and contains the origin in the interior, there alwaysexists a k such that AAA σσσ X ⊆ X for all σσσ ∈ M k +1 , whichimplies that R k +1 = R k = R ∞ . (ii) For any invariant set S containing X , from set invariance, it can be shown that R k ⊆ S for all k ∈ Z + . (cid:3) . The proposed data-driven method With the sample ω N and an initial C-polytope X , we nowpresent a data-driven version of the geometric algorithm (6): ˜ R k +1 ( ω N ) = conv ( ˜ R k ( ω N ) ∪ Ω k ( ω N )) , ∀ k ∈ Z + (8)where ˜ R ( ω N ) = X and Ω k ( ω N ) := { A σ x k x k ˜ R k ( ω N ) : ( x, σ ) ∈ ω N }∪ { − A σ x k − x k ˜ R k ( ω N ) : ( x, σ ) ∈ ω N } . (9)The convergence of the data-driven geometric algorithm isstated in the following lemma. Theorem 1:
Suppose ρ ( A ) < . Given a sample of N points in S n − × M , denoted by ω N , let R k and ˜ R k ( ω N ) be defined as in (6) and (8) respectively for all k ∈ Z + withthe same initial C-polytope X . Then, the following resultshold. (i) For any k ∈ Z + , ˜ R k ( ω N ) ⊆ R k . (ii) The sequence { ˜ R k ( ω N ) } k ∈ Z + is convergent. (iii) ˜ R ∞ ( ω N ) is a feasiblesolution to Problem (5).Proof: (i) The proof goes by induction. Suppose ˜ R k ( ω N ) ⊆ R k for some k ∈ Z + . From the definition in (9), it holds that Ω k ( ω N ) ⊆ S σ ∈M A σ R k . Hence, ˜ R k +1 ( ω N ) ⊆ R k +1 . Thus,the statement is true as ˜ R ( ω N ) ⊆ R . (ii) The convergenceof { ˜ R k ( ω N ) } k ∈ Z + is a direct consequence of (i). (iii) From(8), when { ˜ R k ( ω N ) } k ∈ Z + converges, Ω ∞ ( ω N ) ⊆ ˜ R ∞ ( ω N ) ,which implies that A σ x k x k ˜ R ∞ ( ωN ) ∈ ˜ R ∞ ( ω N ) for any ( x, σ ) ∈ ω N . Hence, k A σ x k ˜ R ∞ ( ω N ) ≤ k x k ˜ R ∞ ( ω N ) for any ( x, σ ) ∈ ω N . (cid:3) The theorem above shows that { ˜ R k ( ω N ) } k ∈ Z + eventuallyconverges to a feasible solution of the sampled problem (5).However, finite-time convergence of (6) may not be pre-served. For the practical implementation, we use a stoppingcriterion as shown in Algorithm 1. Algorithm 1
Data-driven computation of polyhedral invari-ant sets
Input: X , ω N and some tolerance ǫ > Output: ˜ R k ( ω N ) Initialization : Let k ← and ˜ R k ( ω N ) ← X ; Obtain Ω k ( ω N ) from (9); if Ω k ( ω N ) ⊆ (1 + ǫ ) ˜ R k ( ω N ) then Terminate; else Compute ˜ R k +1 ( ω N ) from (8); Let k ← k + 1 and go to Step 1. end if IV. P
ROBABILISTIC SET INVARIANCE GUARANTEES
In this section, we formally discuss probabilistic guaran-tees on the data-driven method proposed in Section III.
A. Contraction analysis
We begin by generalizing the definition of invariant setsfor switched linear systems. In this paper, we consider setsthat are invariant almost everywhere except in an arbitrarilysmall subset. Such a set is referred to as an almost-invariantset, which is formally defined below, adapted from [17].
Definition 2:
Given ǫ ∈ (0 , , a set S ⊆ R n is an ǫ almost-invariant set for System (1) if µ ( { x ∈ S n − : k Ax k S ≤ k x k S , ∀ A ∈ A} ) ≥ − ǫ , where µ ( · ) denotesthe uniform spherical measure.For switched linear systems, we can establish a contractionproperty for almost-invariant sets. To show this, we formalizethe notion of λ -contractive sets, as stated below. Definition 3:
Given λ ≥ , a set S ⊆ R n is a λ -contractive set for System (1) if x ∈ S implies that Ax ∈ λS for any A ∈ A . When λ > , the set can be in fact expansive,but we still call it a λ -contractive set to be consistent.The contraction property becomes obvious when a con-traction rate is computed. To obtain a tight contraction rate,we introduce additional definitions as follows. For any ǫ ∈ (0 , / , let δ ( ǫ ) := r − I − (2 ǫ ; n − ,
12 ) , (10) θ ( ǫ ) := cos − ( δ ( ǫ )) , (11)where I ( x ; a, b ) is the regularized incomplete beta function(see, e.g., [12]) defined as I ( x ; a, b ) := R x t a − (1 − t ) b − dt R t a − (1 − t ) b − dt . (12)For any given C-polytope S ⊆ R n and u ∈ V ( S ) , let γ ( u, S, ǫ ) := max α ≥ { α : αu ∈ conv ( S \ C ( u, θ ( ǫ ))) } (13)where ǫ ∈ (0 , / and C ( u, θ ) is given by C ( u, θ ) := { x ∈ R n : u T x ≤ k x kk u k cos( θ ) } , (14)which is the closure of the complement of the cone C ( u, θ ) with the direction u and the angle θ : C ( u, θ ) := { x ∈ R n : u T x ≥ k x kk u k cos( θ ) } . (15)The geometric interpretation of the definition in (13) isillustrated in Figure 1. Let us define: γ min ( S, ǫ ) := min u ∈V ( S ) γ ( u, S, ǫ ) . (16)With these definitions, we state the contraction propertyof almost-invariant sets in the following proposition. Proposition 3:
Given ǫ ∈ (0 , / , suppose a C-polytope S ⊆ R n is an ǫ almost-invariant set of System (1). Let γ min ( S, ǫ ) be defined as in (16). Then, S is a λ -contractive set of System (1) with λ = 1 /γ min ( S, ǫ ) .The proof of Proposition 3 is given in the appendix.From the definition in (16), to obtain γ min ( S, ǫ ) , we needto compute γ ( u, S, ǫ ) , which requires the computation ofconv ( { x ∈ S : u T x ≤ k x kk u k cos( θ ) } ) for all u ∈ V ( S ) . Ingeneral, computing the convex hull of a nonlinear constraint ( ǫ ) ǫS conv ( S T C ( u, θ ( ǫ )))) u γ ( u, S, ǫ ) Sθ ( ǫ ) ǫ δ ( ǫ ) Fig. 1: Geometric interpretation: the red curve denotes thesubset of measure ǫ on the unit sphere; the gray area denotesconv ( S T C ( u, θ ( ǫ )))) .set is a difficult problem, see [18]. For this reason, weformulate a relaxation of (16), which yields a computationaltractable lower bound which can be computed by solvingconvex problems. Given a C-polytope S and ǫ ∈ (0 , / ,we define: γ ( S, ǫ ) := min u ∈V ( S ) δ ( ǫ ) d min ( u, S, ǫ ) / k u k (17)where δ ( ǫ ) is defined in (10), and d min ( u, S, ǫ ) := min x ∈ ∂S {k x k : x ∈ C ( u, θ ( ǫ )) } . (18)The properties of γ ( S, ǫ ) are given in the following lemma. Lemma 1:
Given any C-polytope S ⊆ R n and any ǫ ∈ (0 , / , let us define γ min ( S, ǫ ) and γ ( S, ǫ ) in (16) and (17)respectively. Then, γ min ( S, ǫ ) ≥ γ ( S, ǫ ) .The proof of Lemma 1 is given in the appendix. We thenshow that γ ( S, ǫ ) can be computed by solving a set of convexoptimization problems. Given any C-polytope, let us definethe following problem, for any u ∈ V ( S ) and f ∈ F ( S ) thatsatisfy f ∩ C ( u, θ ( ǫ )) = ∅ , d f min ( u, S, ǫ ) := min x ∈ f {k x k : u T x ≥ δ ( ǫ ) k x kk u k} (19)This is a convex problem and can be efficiently solved byclassic solvers, see [19]. The following lemma shows that γ ( S, ǫ ) defined in (18) can be computed by solving (19). Lemma 2:
Given any ǫ ∈ (0 , / , C-polytope S ⊆ R n ,and u ∈ V ( S ) , one has: d min ( u, S, ǫ ) = min f ∈F ( S ) d f min ( u, S, ǫ ) , (20)where d min ( u, S, ǫ ) and d f min ( u, S, ǫ ) are defined in (18) and(19) respectively.Proof: To compute d min ( u, S, ǫ ) , we need to check all thepoints on ∂S ∩ C ( u, θ ( ǫ )) . This can be equivalently done bychecking all the facets of S and solving Problem (19). (cid:3) Remark 1:
Suppose ˜ S = { x ∈ S n − : k Ax k S ≤k x k S , ∀ A ∈ A} . From the proof of Proposition 3, theresults above also hold for the case where the violating subset S n − \ ˜ S is the union of a group of disjoint sets whosemeasures are bounded by ǫ . B. A priori guarantee
Now, we conduct a priori analysis to obtain a formalguarantee in which the level of confidence is computed apriori. Let us recall the notions of covering and packingnumbers, see, e.g., Chapter 27 of [20].
Definition 4:
Given ǫ ∈ (0 , / , a set U ⊂ S n − is calledan ǫ -covering of S n − if, for any x ∈ S n − , there exists u ∈ U such that u T x ≥ δ ( ǫ ) . The covering number N c ( ǫ ) is the minimal cardinality of an ǫ -covering of S n − . Definition 5:
Given ǫ ∈ (0 , / , a set U ⊂ S n − is calledan ǫ -packing of S n − if, for any u, v ∈ U , u T v > δ ( ǫ ) . The packing number N p ( ǫ ) is the maximal cardinality of an ǫ -packing of S n − .With these two notions, the following lemma is obtained. Lemma 3:
For any ǫ ∈ (0 , / , let δ ( ǫ ) and θ ( ǫ ) bedefined in (10) and (11) respectively. Then, N c ( ǫ ) ≤ N p ( ǫ ) ≤ I (sin ( θ ( ǫ )2 ); n − , ) . (21)Proof: Suppose U is the ǫ -packing with the maximalcardinality. The first inequality follows from the factthat U is also a ǫ -covering . For any direction u ∈ S n − and any angle θ ∈ [0 , π/ , the spherical cap Cap ( u, θ ) has a measure of I (sin ( θ ); n − , ) (see [12]for details). From the definition of an ǫ -packing , thespherical caps { Cap ( u, θ ( ǫ ) / } u ∈ U are disjoint. Hence, P u ∈ U µ ( Cap ( u, θ ( ǫ ) / ≤ , which leads to the secondinequality. (cid:3) The a priori probabilistic guarantee is then stated in thefollowing theorem. Recall that M is the number of modesin M (or A ). Theorem 2:
Suppose the same conditions as in Theorem3 hold. With the sample ω N and an initial C-polytope X ,the set ˜ R ∞ ( ω N ) is defined as in (8). For any ǫ ∈ (0 , / ,let B ( ǫ ; N ) = 2 M (1 − ǫM ) N I (sin ( θ ( ǫ )2 ); n − , ) . (22)where θ ( ǫ ) is defined in (11). Then, given any ǫ ∈ (0 , / , with probability no smaller than − B ( ǫ ; N ) , ˜ R ∞ ( ω N ) is a λ -contractive set of System (1) with λ =1 /γ ( ˜ R ∞ ( ω N ) , I (sin (2 θ ( ǫ )); n − , ) / , where γ ( · , · ) isdefined in (17).Proof: Consider the maximal ǫ -packing U with the cardinal-ity N p . From Lemma 3, { Cap ( u, θ ( ǫ )) } u ∈ U covers S n − .Suppose ω N is sampled randomly according to the uniformdistribution, then the probability that each spherical cap in { Cap ( u, θ ( ǫ )) } u ∈ U contains M points with M differentmodes is no smaller than − N p M (1 − ǫM ) N ≥ B ( ǫ ; N ) .Hence, the angle of the largest spherical cap that violates thecondition k Ax k ˜ R ∞ ( ω N ) ≤ k x k ˜ R ∞ ( ω N ) , ∀ A ∈ A , is boundedby θ ( ǫ ) . Thus, the measure of the largest violating sphericalcap is bounded by I (sin (2 θ ( ǫ )); n − , ) / . From Proposi-tion 3, and Lemmas 1 & 2, ˜ R ∞ ( ω N ) is a λ -contractive setwith the rate of /γ ( ˜ R ∞ ( ω N ) , I (sin (2 θ ( ǫ )); n − , ) / . (cid:3) Remark 2:
As the dimension increases, the number ofvertices of ˜ R ∞ ( ω N ) also increases. Thus, the computationf γ ( ˜ R ∞ ( ω N ) , M ε ( s ( ω N ))) becomes expensive for high-dimensional systems. C. A posteriori guarantee
We then use the chance-constraint theorem in [14] to de-rive a posteriori guarantees in which the level of confidenceis computed a posteriori. The following definition is alsoneeded.
Definition 6:
Consider a sample of N points in S n − ×M ,denoted by ω N , and the iteration (8) with an initial C-polytope X , ( x, σ ) ∈ ω N is called a supporting point , if ˜ R ∞ ( ω N \ { ( x, σ ) } ) = ˜ R ∞ ( ω N ) . Let s ( ω N ) denote thenumber of supporting points in ω N .With the definitions above, we obtain the following theo-rem, adapted from Theorem 1 in [14]. Theorem 3:
Suppose ρ ( A ) < . Given N ∈ Z + , let ω N be i.i.d. with respect to the uniform distribution P over S n − × M . P N denotes the probability measure inthe N -Cartesian product of S n − × M . Let ˜ R ∞ ( ω N ) beobtained from (8) with an initial C-polytope X . Then, forany β ∈ (0 , P N ( { ω N : P ( V ( ˜ R ∞ ( ω N ))) > ε ( s ( ω N )) } ) ≤ β (23)where V ( ˜ R ∞ ( ω N )) := { ( x, σ ) : k A σ x k ˜ R ∞ ( ω N ) > k x k ˜ R ∞ ( ω N ) } , s ( ω N ) is the number of supporting points asdefined in Definition 6, and ε : { , , · · · , N } → [0 , is afunction defined as: ε ( k ) := if k = N ;1 − N − k r βN ( Nk ) 0 ≤ k < N. (24)Since it is a simple adaptation of Theorem 1 in [14], theproof is omitted. Indeed, this bound is established a posterioribecause it is based on the measured data ω N .With Theorem 3 in hand, we can derive a probabilisticguarantee on set invariance in the following corollary. Corollary 1:
Suppose the same conditions as in Theorem3 hold. Let ˜ R ∞ ( ω N ) be the solution obtained from (8) withan initial C-polytope X and s ( ω N ) be defined in Definition6. Then, with probability no smaller than − β , ˜ R ∞ ( ω N ) is M ε ( s ( ω N )) almost-invariant set for System (1), where ε ( s ( ω N )) is defined in (24).Proof: From Theorem 3, with probability no smaller than − β , P ( V ( ˜ R ∞ ( ω N ))) ≤ ε ( s ( ω N )) . Since { x ∈ S n − : k Ax k ˜ R ∞ ( ω N ) > k x k ˜ R ∞ ( ω N ) } = { x ∈ S n − : ∃ σ ∈M : ( x, σ ) ∈ V ( ˜ R ∞ ( ω N )) } . Hence, µ ( x ∈ S n − : k Ax k ˜ R ∞ ( ω N ) > k x k ˜ R ∞ ( ω N ) ) ≤ M P ( V ( ˜ R ∞ ( ω N ))) ≤ M ε ( s ( ω N )) . (cid:3) Similarly, we can also state the contraction property.
Corollary 2:
Suppose the same conditions as in Theorem3 hold. Let ˜ R ∞ ( ω N ) be obtained from (8). Consider thenumber of supporting points s ( ω N ) and the function ε : { , , · · · , N } → [0 , as defined in Defition 6 and (24)respectively. Then, for any β ∈ (0 , , with probabilityno smaller than − β , ˜ R ∞ ( ω N ) is a λ -contractive set ofSystem (1) with λ = 1 /γ ( ˜ R ∞ ( ω N ) , M ε ( s ( ω N ))) , where γ ( ˜ R ∞ ( ω N ) , M ε ( s ( ω N ))) is defined in (17). Proof: This result is a direct consequence of Proposition 3,and Lemmas 1 & 2. (cid:3) Remark 3:
When the initial C-polytope X is symmetric,it can be shown that ˜ R ∞ ( ω N ) is also symmetric. In thiscase, the contraction bound in Corollary 2 becomes λ =1 /γ ( ˜ R ∞ ( ω N ) , M ε ( s ( ω N )) / .V. N UMERICAL EXAMPLE
We consider a switched linear system with A = { A , A } , A = [0 . − .
8; 0 . . , A = [ − . − .
3; 0 . . . Theinitial C-polytope is set to be X = { x : k x k ∞ ≤ } and points are sampled randomly and uniformly on the unitsphere. We then use Algorithm 1 to compute ˜ R ∞ ( ω N ) witha tolerance of − . The results are given in Figure 2. Whilethe matrices A are unknown, we still show R ∞ for reference.In order to evaluate the difference between ˜ R ∞ ( ω N ) and R ∞ , we compute their volumes, denoted by vol ( ˜ R ∞ ( ω N )) and vol ( R ∞ ) , and show vol ( ˜ R ∞ ( ω N )) /vol ( R ∞ ) for differ-ent sizes of the sample. From Figure 2, we can see that ˜ R ∞ ( ω N ) is already very close to R ∞ with sampledpoints. For rigorous verification, we compute the probabilis-tic bounds derived in Section IV. Let the confidence level β = 0 . . For different values of ǫ , let N ǫ be the N suchthat B ( ǫ ; N ) = β = 0 . . The curve of N ǫ is shown inFigure 3a. We also compute a posteriori the bounds ε ( s ( ω N )) and γ ( ˜ R ∞ ( ω N ) , M ε ( s ( ω N ))) as stated in Theorem 3 andCorollary 2 with the confidence level β = 0 . , and theresults are shown in Figure 3b. Note that ǫ in Figure 3a isnot the measure of the violating subset but the measure ofthe largest disjoint set contained in the violating subset, seeRemark 1. With the a posteriori analysis, we gain additionalinformation on the measure of the whole violating subset. (a) ˜ R ∞ ( ω N ) with N = 50
10 50 100 200 300 4000.60.70.80.91 (b) Difference in volume
Fig. 2: Data-driven invariant set computation. (a) A priori (b) A posterior Fig. 3: Probabilistic guarantees.I. C
ONCLUSIONS
We have presented a data-driven method for computingpolyhedral invariant sets for black-box switched linear sys-tems based on the one step forward reachable set. Theconvergence of this method is guaranteed under the stabilityassumption. Almost-invariant sets have been introduced forswitched linear systems. The convexity-preserving propertyof switched linear systems allowed us to establish a prob-abilistic guarantee a priori via contraction analysis. Withthe chance-constraint theorem for nonconvex problems, wehave also derived an a posteriori guarantee which provides abound on the level of violation of the computed set. Finally,a numerical example was given to illustrate the performanceof the proposed method.A
PPENDIX
Proof of Proposition 3 : Let ˜ S = { x ∈ S n − : k Ax k S ≤k x k S , ∀ A ∈ A} and α ∗ := max α ≥ { α : αS ⊆ conv ( { x ∈ S : x/ k x k ∈ ˜ S } ) } . For any x ∈ { x ∈ S : x/ k x k ∈ ˜ S } and A ∈ A , Ax ∈ S , which implies that A conv ( { x ∈ S : x/ k x k ∈ ˜ S } ) ⊆ S for any A ∈ A . Hence, α ∗ AS ⊆ A conv ( { x ∈ S : x/ k x k ∈ ˜ S } ) ⊆ S for any A ∈ A . That is,for any x ∈ S , Ax ∈ α ∗ S for any A ∈ A . Therefore, S is a α ∗ -contractive set. Now, it suffices to show that γ min ( S, ǫ ) is a lower bound of α ∗ . For any u ∈ V ( S ) , let ¯ α ( u ) := max α ≥ { α : αu ∈ conv ( { x ∈ S : x/ k x k ∈ ˜ S } ) } .Then, it holds that α ∗ = min u ∈V ( S ) ¯ α ( u ) . In the rest ofthe proof, we aim to show that ¯ α ( u ) ≥ γ ( u, S, ǫ ) for any u ∈ V ( S ) . Suppose ˜ θ is the smallest θ such that the set { α ≥ αu ∈ conv ( { x ∈ ∂S : x/ k x k ∈ ˜ S ∩ Cap ( u, θ ) } ) } is non-empty. Let ˜ α ( u ) := max α ≥ { α : αu ∈ conv ( { x ∈ ∂S : x/ k x k ∈ ˜ S ∩ Cap ( u, ˜ θ ) } ) } . Since conv ( { x ∈ S : x/ k x k ∈ ˜ S } ) ⊇ conv ( { x ∈ ∂S : x/ k x k ∈ ˜ S ∩ Cap ( u, ˜ θ ) } ) , ¯ α ( u ) ≥ ˜ α ( u ) . The value of ˜ α ( u ) depends on the shape of theviolating set S n − \ ˜ S . Note that the set ( S n − \ ˜ S ) \ Cap ( u, ˜ θ ) does not affect the value of ˜ α ( u ) . From this observationand the relation between the angel and the measure of thespherical cap (see [12] for details), we can see that ˜ α ( u ) reaches the minimal when Cap ( u, ˜ θ ) = S n − \ ˜ S with ˜ θ = δ ( ǫ ) as defined in (10). It can be verified that ˜ α ( u ) becomes γ ( u, S, ǫ ) in this case. Therefore, ¯ α ( u ) ≥ γ ( u, S, ǫ ) and thus α ∗ ≥ γ min ( S, ǫ ) . (cid:3) Proof of Lemma 1 : (i) Since θ ( ǫ ) ∈ (0 , π/ , conv ( S ∩C ( u, θ ( ǫ )))) = conv ( ∂S ∩C ( u, θ ( ǫ )))) for any u ∈ V ( S ) . It isobvious that ∂S = (cid:0) ∂S ∩ C ( u, θ ( ǫ ))) (cid:1) ∪ ( ∂S ∩ C ( u, θ ( ǫ )))) . Taking convex hull of both sides yields S ⊆ conv ( ∂S ∩C ( u, θ ( ǫ )))) ∪ conv ( ∂S ∩ C ( u, θ ( ǫ )))) , which implies thatconv ( S ∩ C ( u, θ ( ǫ )))) ⊇ S \ conv ( ∂S ∩ C ( u, θ ( ǫ )))) . Thus, γ ( u, S, ǫ ) ≤ sup ≤ α ≤ { α : αu ∈ S \ conv ( ∂S \ C ( u, θ ( ǫ )))) } = sup ≤ α ≤ { α : αu conv ( ∂S \ C ( u, θ ( ǫ )))) } . From the definition in (15), it can be verified that ∂S \ C ( u, θ ( ǫ )) = { x ∈ ∂S : u T x ≥ k x kk u k δ ( ǫ ) } (25) ⊆{ x ∈ ∂S : u T x ≥ k u k d min ( u, S, ǫ ) δ ( ǫ ) } where d min ( v, S, ǫ ) is defined as in (18). Observe thatconv ( { x ∈ ∂S : u T x ≥ k u k d min ( u, S, ǫ ) δ ( ǫ ) } ) = { x ∈ S : u T x ≥ k u k d min ( u, S, ǫ ) δ ( ǫ ) } . This, together with (25),implies that sup ≤ α ≤ { α : αu conv ( ∂S \ C ( u, θ ( ǫ )))) }≥ δ ( ǫ ) d min ( u, S, ǫ ) / k u k . Finally, we arrive at γ ( u, S, ǫ ) ≥ δ ( ǫ ) d min ( u, S, ǫ ) / k u k , which implies that γ min ( S, ǫ ) ≥ γ ( S, ǫ ) . This completes theproof. (cid:3) R EFERENCES[1] H. Lin and P. J. Antsaklis. Stability and stabilizability of switchedlinear systems: a survey of recent results.
IEEE Transactions onAutomatic control , 54(2):308–322, 2009.[2] F. Blanchini and S. Miani.
Set-Theoretic Methods in Control .Birkhauser, 2008.[3] F. Blanchini, S. Miani, and C. Savorgnan. Stability results for linearparameter varying and switching systems.
Automatica , 43(10):1817–1823, 2007.[4] P. Riedinger, M. Sigalotti, and J. Daafouz. On the algebraic charac-terization of invariant sets of switched linear systems.
Automatica ,46(6):1047–1052, 2010.[5] M. Dehghan and C.J. Ong. Discrete-time switching linear system withconstraints: Characterization and computation of invariant sets underdwell-time consideration.
Automatica , 5(48):964–969, 2012.[6] N. Athanasopoulos and R. M. Jungers. Computing the domain ofattraction of switching systems subject to non-convex constraints. In
Proceedings of the 19th International Conference on Hybrid Systems:Computation and Control , pages 41–50. ACM, 2016.[7] Z. Wang, R. M. Jungers, and C.J. Ong. Computation of the maximalinvariant set of discrete-time linear systems subject to a class of non-convex constraints. arXiv preprint arXiv:1912.09727 , 2019.[8] N. Athanasopoulos and R. M. Jungers. Combinatorial methods forinvariance and safety of hybrid systems.
Automatica , 98:130–140,2018.[9] F. Lauer and G. Bloch.
Hybrid system identification: Theory andalgorithms for learning switching models , volume 478. Springer, 2018.[10] F. Lauer. On the complexity of switching linear regression.
Automat-ica , 74:80–83, 2016.[11] A. Kozarev, J. Quindlen, J. How, and U. Topcu. Case studies indata-driven verification of dynamical systems. In
Proceedings of the19th International Conference on Hybrid Systems: Computation andControl , pages 81–86. ACM, 2016.[12] J. Kenanian, A. Balkan, R. M. Jungers, and P. Tabuada. Data drivenstability analysis of black-box switched linear systems.
Automatica ,109:108533, 2019.[13] Z. Wang and R. M. Jungers. Scenario-based set invariance verificationfor black-box nonlinear systems.
IEEE Control Systems Letters ,5(1):193–198, 2020.[14] M. C. Campi, S. Garatti, and F. A. Ramponi. A general scenario theoryfor nonconvex optimization and decision making.
IEEE Transactionson Automatic Control , 63(12):4067–4078, 2018.[15] N. Guglielmi and V. Protasov. Exact computation of joint spectralcharacteristics of linear operators.
Foundations of ComputationalMathematics , 13(1):37–97, 2013.[16] R. M. Jungers.
The joint spectral radius: theory and applications ,volume 385. Springer Science & Business Media, 2009.[17] M. Dellnitz and O. Junge. On the approximation of complicateddynamical behavior.
SIAM Journal on Numerical Analysis , 36(2):491–515, 1999.[18] T. T. Nguyen, J. P. P. Richard, and M. Tawarmalani. Deriving convexhulls through lifting and projection.
Mathematical Programming ,169(2):377–415, 2018.[19] S. Boyd and L. Vandenberghe.
Convex Optimization . CambridgeUniversity Press, 2004.[20] S. Shalev-Shwartz and S. Ben-David.