An algorithmic approach to stability verification of polyhedral switched systems Pavithra Prabhakar 1 and Miriam Garc´ ıa Soto 2 Abstract—We present an algorithmic approach for analyzing Lyapunov and asymptotic stability of polyhedral switched systems. A polyhedral switched system is a hybrid system in which the continuous dynamics is specified by polyhedral differential inclusions, the invariants and guards are specified by polyhedral sets and the switching between the modes do not involve reset of variables. The analysis consists of first constructing a finite weighted graph from the switched system and a finite partition of the state space, which represents a conservative approximation of the switched system. Then, the weighted graph is analyzed for certain structural properties, satisfaction of which implies stability. However, in the event that the weighted graph does not satisfy the properties, one cannot, in general, conclude that the system is not stable due to the conservativeness of the graph. Nevertheless, when the structural properties do not hold in the graph, a counter- example indicating a potential reason for the failure is returned. Further, a more precise approximation of the switched system can be constructed by considering a finer partition of the state- space in the construction of the finite weighted graph. We present experimental results on analyzing stability of switched systems using the above method. I. INTRODUCTION In this paper, we focus on the problem of automatic sta- bility verification of polyhedral switched systems. Switched systems [1] are a special class of hybrid systems [2] - systems exhibiting mixed discrete continuous behaviors - in which the continuous state of the system does not change during a mode switch. Switched systems are a natural model in supervisory control, wherein the plant consists of a finite number of operational modes, and the supervisor continu- ously observes the state of the system and takes decisions regarding the mode switches. Stability has been extensively investigated in the context of switched systems, and several sufficient conditions on the system and the switching behav- ior which ensure stability have been proposed (see [1], [3] and references therein). One of the widely used approaches to stability verification of switched system is based on the notions of common and multiple Lyapunov functions [4], [5], [6]. In the former, a common function which acts as a Lyapunov function for every mode is sought, and in the latter, a set of Lyapunov functions one for each mode is sought such that together they satisfy some consistency conditions on the switch- ing. Automated verification of stability based on Lyapunov function can be characterized as deductive verification in 1 Pavithra Prabhakar is with the Faculty of IMDEA Software Institute, Madrid, Spain. Email: pavithra.prabhakar@imdea.org 2 Miriam Garc´ ıa Soto is a PhD student with the IMDEA Software Institute and ETSIINF, Universidad Polit´ ecnica de Madrid, Madrid, Spain Email: miriam.garcia@imdea.org the formal methods terminology. It encompasses a search for a Lyapunov function based on a template, such as a polynomial with coefficients as parameters, which serves as a candidate function. The requirements of Lyapunov function are encoded as a sum-of-squares programming problem over the template, which can be efficient solved using tools such as SOSTOOLS [7], [8], [9]. One of the major limiting factors of this approach is the ingenuity required in providing the right templates; and automatically learning the templates is a challenge which has not been adequately addressed. Moreover, if a template fails to satisfy the conditions of Lyapunov function, then it does not provide insights into the potential reasons for instability or towards the choice of a better template. To overcome these limitations, we propose an algorithmic approach. Our approach consists of constructing a finite weighted graph which represents a conservative approximation of the switched systems, and inferring stability by analyzing certain properties of the graph. We focus on the class of polyhedral switched systems (PSS) and present a detailed algorithm for analyzing both Lyapunov and asymptotic stability. These are systems in which the invariants for the modes and the guards on the switching are convex polyhedral sets; further, the dynamics in each mode is specified as a polyhedral differential inclusion ˙ x ∈ P , where P is a compact convex polyhedral set. The algorithm takes as input a PSS H and a finite partition of the state-space into convex polyhedral sets P , and outputs a finite weighted graph G (H, P ). The vertices of the graph correspond to pairs consisting of a mode of the system and an element of the partition. An edge between two mode- element pairs indicates the existence of an execution starting from the first mode and a point on the first element to the second mode and a point on the second element such that it remains in a single element at all the intermediate time instances. And the weight on the edge corresponds to the maximum scaling - ratio of the final state to the initial state - over all such executions. Hence, corresponding to every execution of the system, there exists a path in the graph which tracks the scalings associated with various time points in the execution. We present efficiently verifiable conditions on the graph, such that the satisfaction of the conditions implies Lyapunov and asymptotic stability. For instance, if the graph has no edges with weight +∞ and no cycles in the graph with the product of weights on the edges greater than 1, then the system is Lyapunov stable. However, if the graph does not satisfy the properties, then, in general, one cannot