Balanced truncation for linear switched systems

We propose a model order reduction approach for balanced truncation of linear switched systems. Such systems switch among a finite number of linear subsystems or modes. We compute pairs of controllability and observability Gramians corresponding to each active discrete mode by solving systems of coupled Lyapunov equations. Depending on the type, each such Gramian corresponds to the energy associated to all possible switching scenarios that start or, respectively end, in a particular operational mode. In order to guarantee that hard to control and hard to observe states are simultaneously eliminated, we construct a transformed system, whose Gramians are equal and diagonal. Then, by truncation, directly construct reduced order models. One can show that these models preserve some properties of the original model, such as stability and that it is possible to obtain error bounds relating the observed output, the control input and the entries of the diagonal Gramians.


Introduction
In recent years, the need for accurate mathematical modeling of physical and artificial processes for simulation and control has been steadily increasing. To cope with it, inclusion of more detail at the modeling stage is required, which inevitably leads to analyzing larger-scale, more complex dynamical systems. Such high dimensional systems are often linked to spatial discretization of underlying time-dependent coupled partial differential equations (PDE).
In broad terms, model order reduction (MOR) is concerned with finding efficient computational prototyping tools to replace such complex and large models by simpler and smaller models that capture their dominant characteristics. Such reduced order models (ROM) could be used as efficient surrogates for the original model, replacing it as a component in larger simulations. For details on different MOR techniques, we refer the readers to the book [2] and to the surveys [5,7].
Hybrid systems are a class of nonlinear systems which result from the interaction of continuous time dynamical subsystems with discrete events. These systems are hence described by both discrete and continuous states, inputs and outputs. The transitions between the discrete states may result in a jump in the continuous internal variable. The discrete dynamics is determined by a finite-state deterministic automaton equipped with outputs (the so-called Moore automaton).
Switched systems constitute a subclass of hybrid systems, in the sense that the discrete dynamics is simplified, i.e. any discrete state transition is allowed and the set of discrete events coincides with the set of discrete states.
A switched system is a dynamical system that consists of a finite number of subsystems and a logical rule that orchestrates switching between these subsystems. These subsystems or discrete modes are usually described by a collection of differential or difference equations. The discrete events interacting with the subsystems are governed by a piecewise continuous function, i.e. the switching signal.
One can classify switched systems based on the dynamics of their subsystems, for example continuous-time or discrete-time, linear or nonlinear and so on. In this work we analyze continuoustime linear switched systems (LSS) with reset maps (or coupling/switching matrices). The latter term refers to matrices that scale the continuous state at the switching times.
Hybrid and switched systems represent useful models for distributed embedded systems design where discrete controls are routinely applied to continuous processes. In particular, switched systems have applications in control of mechanical and aeronautical systems, power converters and also in the automotive industry. In some cases, the complexity of verifying and assessing general properties of these systems is very high so that the use of these models is limited in applications where the size of the state space is large. A useful tool for dealing with such complexity is MOR. For a detailed characterization of theses classes of dynamical systems, we refer the readers to the books [21,37,38,17].
In the past years, hybrid and switched systems have received increasing attention in the scientific community, which can be partly explained by the fast development of the switch control research area (see [26,40,20]). In this context, adaptive control techniques based on switching between different controllers are used to achieve stability and improve transient response.
The study of the properties of hybrid and switched systems includes such topics as stability (see [15,40,37]), realization including observability/controllability (see [29,30]), analysis of switched DAE's (see [23,39]) and numerical solutions (see [19]). Considerable attention has been dedicated in recent years to the problem of MOR for linear switched systems. A class of methods that involves matching of generalized Markov parameters (known also as time domain Krylov methods) has been discussed in [4,3]; H ∞ type of reduction methods were developed in [43,11,44]. We mention some publications that are focused on the reduction of discrete LSS, such as [41] and [12].
A very prolific MOR method that has been continuously developed over the years is balanced truncation (BT). It was initially introduced in the systems and control theory in [25,28]. The main idea behind BT is to transform a dynamical system to a balanced form defined in such a way that appropriately chosen controllability and observability Gramians are equal and diagonal. Then a reduced-order model is computed by truncating the states corresponding to the small diagonal elements of the Gramians. For more details on BT especially from a practical point of view (i.e. application to large scale systems, solution of Lyapunov equations etc.), see [22,8].
For switched and hybrid systems, techniques that are based on balancing (or of Gramian based derivation of it) have been considered in the following: [16,13,10,35,36,24,32,27].
For LSS, it may happen that some state components are difficult to reach and observe in some of the modes yet easy to reach and observe in others. In that case, deciding how to truncate the state variables and obtain a meaningful ROM is not trivial. Under general conditions, there is no basis of the state space so that all modes of the LSS are in balanced form (having equal, diagonal Gramians). This problem was addressed in [24]. There, very restrictive necessary and sufficient conditions are derived for the existence of such basis.
We are interested in the situation for which a common transformation that simultaneously balances all the subsystems of the LSS is either not known or it does not exist. We construct a family of transformations, each for a specific mode, based on appropriately defined Gramians. Concerning stability, this concept extends to the existence of multiple Lyapunov functions (Chapter 3.1 in [21]). Another key factor is that we consider a sufficient slow switching to impose certain properties such as stability, error and energy bounds. Hence the assumption of a minimum dwell time (the duration of time for which the system is active in a particular mode) which is chosen depending on the context or application.
The proposed method is centered around the definition of new type of Gramians for LSS that resemble the definitions previously encountered for the case of bilinear and stochastic systems (see [42,6]). Some of the results presented in this work are extended from [32]. There, the Gramians are defined as solutions of systems of linear matrix inequalities (LMI).
The paper is organized as follows; in the second section, we introduce continuous-time linear switched systems in a formal way. Furthermore, we provide a characterization of input-output mappings in time domain corresponding to such systems. Section 3 describes the procedure of constructing infinite energy Gramians for the simplified case with only two discrete modes. Next, in Section 4 we provide a system theoretic interpretation of such Gramians (for the general case with D modes). Furthermore, we formally introduce the balancing algorithm followed by the MOR step, i.e. the truncation. A measure of the quality of approximation by reduction is provided by means of a error bound. Additionally, we investigate the possibility of preserving system theoretic properties such as stability, for the reduced system. Section 5 is designated for the numerical experiments while a summary of the findings and the conclusion are presented in Section 6.
The restriction of the switching signal σ(t) to a finite interval of time [0, T ] can be interpreted as finite sequence of elements of Ω × R + of the form: where q 1 , . . . , q k ∈ Ω and 0 < t 1 < t 2 < · · · < t k ∈ R + , t 1 + · · · + t k = T , such that for all t ∈ [0, T ] we have: In short, by denoting T i := t 1 + . . .
The linear system which is active in the q th i mode of Σ is denoted with Σ q i and it is described Denote by P C(R + , R n ), P c (R + , R n ), the set of all piecewise-continuous, and piecewise-constant functions, respectively.
is called a solution, if the following conditions simultaneously hold: 1. The restriction of x(t) to (T i−1 , T i ] is differentiable, and satisfies E q iẋ (t) = A q i x(t) + Bu(t).
2. Furthermore, when switching from mode q i to mode q i+1 at time T i , the following holds The switching matrices K q i ,q i+1 allow having different dimensions for the subsystems active in different modes. For instance, the pencil ( where the values n q i and n q i+1 need not be the same. If the K q i ,q i+1 matrices are not explicitly given, it is considered that they are identity matrices. The input-output behavior of an LSS system can be described in time domain using the mapping f(u, σ). This particular map can be written in generalized kernel representation (as suggested in [31]) using the unique family of analytic functions: g q 1 ,...,q k : R k + → R p and h q 1 ,...,q k : R k + → R p×m with q 1 , . . . , q k ∈ Ω, k 1 such that for all pairs (u, σ) and for T = t 1 + t 2 + · · · + t k we can write: where the functions g, h are defined for k 1, as follows, h q 1 ,q 2 ,...,q k (t 1 , t 2 , . . . , t k ) = C q k eÃ q k t kK q k−1 ,q k eÃ q k−1 t k−1K q k−2 ,q k−1 · · ·K q 1 ,q 2 eÃ q 1 t 1B q 1 . (6) Note that, for the functions defined in (5) and (6) we consider the E q i matrices to be incorporated into the A q i and B q i matrices (i.e. . Moreover, the transformed coupling matrices are written accordinglyK q i ,q i+1 = E −1 q i+1 K q i ,q i+1 . By applying the multivariate Laplace transform of the regular kernels in (6), we construct level k generalized transfer functions of the system Σ, as where Φ q (s) = (sE q − A q ) −1 , q j ∈ {1, 2, ..., D}, 1 j k and k 3. Their definition is similar to the ones corresponding to bilinear systems (see [1]). By using their samples, directly construct (reduced) switched models that interpolate the original model, by means of the Loewner framework, as in [18].

Setup and notations
For simplicity of the exposition, we first consider the simplified case D = 2 (the LSS system switches between two modes only). This situation is encountered in most of the numerical examples in the literature we came across. Nevertheless, all the theoretical concepts presented in this section can be generalized for a general number of modes denoted with D (as in Section 4, where the main results are directly presented for the general case). Depending on the values of the switching signal σ(t), the original system Σ switches between the following subsystems, where dim(Σ 1 ) = n 1 (i.e. x 1 ∈ R n 1 and E 1 , A 1 ∈ R n 1 ×n 1 , B 1 , C T 1 ∈ R n 1 ) and also dim(Σ 2 ) = n 2 (i.e. x 2 ∈ R n 2 and E 2 , A 2 ∈ R n 2 ×n 2 , B 2 , C T 2 ∈ R n 2 ). Notice that we allow both the two subsystems to be written in descriptor format (having possibly singular E matrix).
Denote, for simplicity, with K 1 the coupling matrix when switching from mode 1 to mode 2 (instead of K 1,2 ) and, with K 2 , the coupling matrix when switching from mode 2 to mode 1 (instead of K 2,1 ) with K 1 ∈ R n 2 ×n 1 and K 2 ∈ R n 1 ×n 2 .
In the following, for the first two levels we present the generalized kernels, which were previously defined in (6), i.e., . These systems are said to be equivalent if there exist non-singular matrices Z L j , Z R j so that In this configuration, one can easily show that the transfer functions defined above are the same for each LSS and for all sampling points s k . Consider a LSS system Σ as described in (1) with two operational modes, i.e D = 2 and Ω = {1, 2}. Consider dim(Σ k ) = n k for k = 1, 2 and let K 1 ∈ R n 2 ×n 1 and K 2 ∈ R n 1 ×n 2 be the coupling matrices.
Definition 3.2 For ν ∈ {1, 2}, let Ω ν,+ and Ω +,ν be the ordered sets containing all tuples that can be constructed with symbols from the alphabet Ω = {1, 2} and that start (and respectively end) with the symbol ν. Also, no two consecutive characters are allowed to be the same. Hence, explicitly write the new introduced sets as follows: In some contexts we may use the alternative notation e i,k to emphasize its dimension k. The identity matrix I k ∈ R k×k can be written as I k = [e 1,k e 2,k . . . e k,k ]. Also, let 0 k,ℓ ∈ R k×ℓ be an all zero matrix. When k = ℓ, we use the notation 0 k =∈ R k×k or simply 0 when the dimension is clearly inferred.
3.2 Level k switching -an intermediate step Definition 3.4 In the succeeding sections we analyze LSS Σ for which the E matrices corresponding to all of the subsystems Σ q are identity matrices, i.e. E q = I nq , q ∈ Ω. Hence we propose an alternative definition for the dynamics of the LSS, i.e.
If we choose q 1 = 1, then it follows that (q 1 , q 2 , . . . , q k ) ∈ Ω 1,+ . Examples of energy functionals associated to sequences from Ω 1,+ , are for instance the following In general, compute the following level k infinite Gramian corresponding to mode q 1 ∈ {1, 2} by calculating the inner product of the energy functional associated to the length k switching sequence (q 1 , q 2 , . . . , q k ) ∈ Ω q 1 ,+ with itself, as g r q 1 ,q 2 ,...,q k (t 1 , t 2 , . . . , t k ) g r q 1 ,q 2 ,...,q k (t 1 , t 2 , . . . , t k ) T dt 1 dt 2 . . . dt k . (12) By making use of the recurrence relation g r q 1 ,q 2 ,...,q k (t 1 , t 2 , . . . , t k ) = e Aq 1 t 1 K q 2 ,q 1 g r q 2 ,q 3 ,...,q k (t 2 , t 3 , . . . , t k ), it follows that the k th Gramian corresponding to mode 1 (or respectively mode 2) can be written in terms of the (k − 1) th Gramian corresponding to mode 2 (or mode 1), as Proposition 3.1 Next introduce the linear reachability Gramians for the case with no switching. They are denoted with P q , corresponding to mode q ∈ {1, 2}, and can be defined as It is a well known result that P (1) q satisfies the following Lyapunov equation: The level k reachability Gramians corresponding to modes 1 and 2 can be computed by iteratively solving the coupled systems of linear equations: where k > 1 and the starting point is represented by the linear Gramians (with no switching) P (1) q 1 in (15) that correspond to the first level.
Proof of Proposition 2. By multiplying the equality in (13) with A q 1 to the left and with A T q 1 to the right, we write Hence it follows that, for q 1 , q 2 ∈ {1, 2} with q 1 = q 2 , we write K T q 2 ,q 1 = 0, which proves the statements in (16) and (17).
If q 1 = 1 is chosen, then it follows that (q k , q k−1 , . . . , q 1 ) ∈ Ω 1,+ . Examples of energy functionals associated to sequences from Ω +,1 , are the following Compute the following level k infinite Gramian corresponding to mode q 1 ∈ {1, 2} by calculating the inner product of the energy functional associated to the length k switching sequence (q 1 , q 2 , . . . , q k ) ∈ Ω q 1 ,+ with itself, as By using the following recurrence relation, the k th observability Gramian corresponding to mode 1 (or respectively mode 2) can be written in terms of the (k − 1) th observability Gramian corresponding to mode 2 (or respectively mode 1), as Proposition 3.3 The linear observability Gramian (for the case with no switching) Q (1) q which corresponds to mode q ∈ {1, 2}, can be written as It is a well known result that Q (1) q satisfies the following Lyapunov equation: The level k observability Gramians corresponding to modes 1 and 2 can be computed by iteratively solving the coupled systems of linear equations (for k > 1) where the starting point is represented by the linear Gramians (with no switching) Ω (1) (22) that correspond to the first level.
Proof of Proposition 4. By multiplying the identity in (20) with A T q 1 to the left and with A q 1 to the right, we write Hence it follows that, for q 1 , q 2 ∈ {1, 2} with q 1 = q 2 , we write which proves the statements in (23) and (24).

Infinite Gramians and Lyapunov equations
Definition 3.5 Introduce the infinite reachability Gramian P q 1 corresponding to mode q 1 ∈ {1, 2} of the LSS system Σ as in terms of the multivariate functions g r q in (11) or matrices P (k) (12).
Note that P q 1 is computed by taking into account the inner products of energy functionals associated to all possible switching sequences (of any length k) that start in mode q 1 .
Proposition 3.5 The infinite reachability Gramians defined in (25), satisfy the following system of generalizaed coupled Lyapunov equations Proof of Proposition 5. By adding the equalities stated in (16) and (17) for k > 2 as well as the one corresponding to k = 1 (in (14)), it follows that , which shows the validity of the equalities introduced in (26).
Hence, instead of solving the two equations in (30) separately, one can solve one equation and recover the reachability Gramians P 1 and P 2 as block diagonal entries of P D .
Definition 3.6 Introduce the infinite observability Gramian Q q 1 corresponding to mode q 1 ∈ {1, 2} of the LSS system Σ as Note that Q q 1 is computed by taking into account the inner products of energy functionals associated to all possible switching sequences (of any length k) that end in mode q 1 .
Proposition 3.6 The infinite reachability Gramians defined in (29), satisfy the following system of generalizaed coupled Lyapunov equations in terms of the multivariate functions g o q in (11) and matrices Q (k) Proof of Proposition 6. By adding the equalities stated in (23) and (24) for k > 2 as well as the one corresponding to k = 1 (in (21)), it follows that , which shows the validity of the equalities presented in (30). (27), write the matrices {Q q }, q ∈ {1, 2} in block-diagonal format, as

Remark 3.2 Additional to
Hence, instead of solving the two equations in (30) separately, one can solve one equation and recover the observability Gramians as the block diagonal entries of Q D .
Definition 3.7 We assume both A 1 and A 2 matrices have eigenvalues with negative real part, i.e.
The following result from [42] addresses the existence of the new defined Gramians. In a nutshell, it states that this holds if the norm of the coupling matrices is sufficiently small. Proposition 3.7 The reachability and observability Gramians in (25), (29) For high order examples, it is not trivial to solve such generalized Lyapunov equations as (28) and (31). A possible approach is to approximate these solutions with truncated sums of positive definite matrices, where P For practical applications, solving many such Lyapunov equations is expensive. One can compute low rank factors instead of the full solutions to speed up the calculations ad avoid memory problems (for example, by using the toolbox in [33]).

Extension to LSS with D modes
Let Ω = {1, 2, . . . , D}, D 2 and fix the starting mode q 1 ∈ Ω. Introduce the switching scenario (q 1 , q 2 , . . . , q k ) ∈ Ω k . Since we exclude equal neighboring modes, i.e. q j = q j+1 , 1 j k − 1, it follows that there are (D − 1) k−1 ways of choosing such a switching sequence (q 1 , q 2 , . . . , q k ). For D = 2, there was only one possible sequence chosen uniquely. For general number of modes D, we have to take into consideration the inner products corresponding to all sequences; hence adapt the definition of P (k) q 1 from (12) as follows Again, one can write a recurrence relation by fixing the mode indexes q 3 , . . . , q k , Next, it follows that the k th reachability Gramian corresponding to mode q 1 can be written in terms of the (k − 1) th reachability Gramians corresponding to modes Ω \ {q 1 }, as Definition 3.8 When considering the general case with D 2 switching modes, define the infinite reachability Gramian corresponding to mode q 1 ∈ Ω, as Moreover, the equations satisfied by the reachability Gramians P i , for i ∈ {1, 2, . . . , D} can be extended from (26), as follows Definition 3.9 Similarly, we can write the observability Gramians as, Again the the system of generalized Lyapunov equations is satisfied by the matrices Q i , ∈ Ω.
The Gramians introduced in Definition 10 and 11 are mainly going to be used for the original possibly large-scale system. In this case, we would like to avoid computing the Gramians as solutions of LMI's (as in [32]). Additionally, we present a more relaxed definition of Gramians which will turn out to be useful for the reduced low order case.
Definition 3.10 The relaxed reachability Gramians P i > 0 are defined as solutions of the following collection of LMI, for i ∈ {1, 2, . . . , D} and scalar M > 0 Similarly, the relaxed observability Gramians Q i , satisfy the inequalities for i ∈ {1, 2, . . . , D}, Note that a Gramian is also a relaxed Gramian but the converse is not necessarily true. Next, we will generalize the results form Remark 3 and 4 for the case with D modes.
Let τ n k : {1, . . . , n} → {1, . . . , n} be a cyclic permutation of index k where k ∈ {0, 1, . . . , n − 1}. The explicit rule is given by τ n k (ℓ) = mod(k + ℓ, n), ℓ ∈ {1, . . . , n}, while the permutation τ n k can also be written as, Introduce the permutation matrix Φ n k ∈ R n×n corresponding to τ n k , that has the ℓ th row equal to the unit vector e T τ n k (ℓ),n . Note that Φ n k Φ n n−k = I n and (Φ n k ) T = Φ n n−k , k ∈ {0, . . . , n}. For example, write Remark 3.3 One can rewrite the D equations stated in (40) as one equation in the following way, For all X ∈ {A, B, C, P, Q} and k ∈ {1, . . . , D − 1}, consider the notations n i is a block-permutation matrix written in terms of Φ D k , by replacing its one entries with identity matrices I n i of appropriate dimensions. For example, choose D = 3 and k = 2, and write the matrixΦ 3 2 as: Note that, following the definition of Φ n k , we can write thatΦ

Main results
In this section, we will provide a collection of results that involve the new defined infinite Gramians. In particular, these results will correspond to the more general case with D discrete modes, as presented in Definition 10,11 and 12.

Energy bounds relating the input or output signals
First, we present the system theoretic interpretation approach; one can write upper and lower bounds of the energy of observation and respectively, of the energy of control in terms of the quantities Q i and P i .

Observability Gramians
Additionally, one can also find scalars γ i,j > 0 to satisfy the following inequalities Lemma 4.1 Given an LSS Σ as defined in (10), consider that the equations in (41) have positive definite solutions Q q > 0, q ∈ Ω. Then, there exists a dwell time µ > 0 so that for any switching signal in (2), with t i µ, ∀i 1, and zero input u(t) = 0, the following holds where q 1 ∈ Ω represents the index of the first discrete mode in which Σ operates.  (2) and with minimal dwell time µ, we will prove the bound stated in (48). From (41) and (46), it follows that Let x(t) the corresponding solution to (10), and also introduce the functions V, W : where T i = i ℓ=1 t ℓ . By considering the uncontrolled case, the input function is considered to be u(t) = 0, ∀t. Using that dx(t) dt = A q i x(t), write the derivative of V (t) from (50) for t ∈ (T i−1 , T i ], For t ∈ (T i−1 , T i ], compute the time derivative of W (x(t)) as defined in (3) in terms of the one corresponding to V (x(t)), as By substituting the inequality in (49) into the above relation (52), and using that Introduce the following notation By integrating the inequality (53) from From (50) and (51), it follows that and additionally, using that From (47) and (57) and using that γ = min By combining (56) and (58), we can write Since switching signals σ with minimal dwell time µ are considered, it follows that t i µ ⇒ Putting together the inequalities in (55) and (60), it follows that Now using the convention T 0 = 0 and adding all the inequalities in (61), we obtain Now using that W (x(0)) = x(0) T Q q 1 x(0), the result in (48) is hence proven.

Reachability Gramians
Assumption 4.2 Considering that D j=1, j =i K j,i P j K T j,i > 0, ∀i ∈ Ω, one can always find scalars Additionally, for every i = j ∈ Ω, there exist scalars γ i,j for which Lemma 4.2 Given an LSS Σ as defined in (10), consider that the equations in (40) have positive definite solutions Q q > 0, q ∈ Ω. Then, there exists µ > 0 such that for any switching signal in (2), with minimal dwell time µ (i.e. t i µ) and x(0) = 0, the following bound holds Proof of Lemma 2. Consider that the conditions stated in Assumption 42 hold. Introduce γ = min i,j∈Ω, i =j γ i,j and let µ = − ln γ M . For any piecewise continuous switching signal σ : R → Ω satisfying the conditions in (2) and with minimal dwell time µ, we will prove the bound stated in (66). From (40) and (64), it follows that and by denoting M = min i∈Ω M i , the following holds By multiplying the inequality (67) with P −1 i both to the left and to the right, we write Let x(t) be the corresponding solution to (10), and also introduce the function V : Using , and by using the inequality in (68), it follows that Hence, the following inequality holds as, By denoting W (x(t)) = e M (t−T i ) V (x(t)), for t ∈ (T i−1 , T i ], it follows that and by combining (71) and (72) and integrating from T i−1 to t, we obtain Following the same line of thought as in Section 4.1.1, one can show that W (x(T + i )) W (x(T i )). By combining this statement with the inequality in (73), and by using the fact that e M (s−T i ) 1, ∀s ∈ (T i−1 , T i ], one can write Since x(0) = 0, it follows that W (x(0)) = 0. Also, from the definition of the function W, it is clear that W (x(T ℓ )) = V (x(T ℓ )) = x T (T ℓ )P −1 ℓ x(T ℓ ). Hence, from (74), we directly conclude that which proves the result in (66).

Balancing transformation and truncation
In this section, we introduce the procedure for model order reduction by balanced truncation, and we prove a bound of the approximation error. 2. Find square factor matrices U q so that P q = U q U T q . Additionally, compute the eigenvalue decomposition of the symmetric matrix U T q Q q U q , as where Λ q is a diagonal matrix with the real entries sorted in decreasing order.
3. Construct the transformation matrices S q ∈ R nq×nq as follows 4. The matrices corresponding to the balanced realizationΣ are computed in the following way (for any q, q 1 , q 2 ∈ Ω) The reachability and observability transformed GramiansP q and respectivelyQ q , corresponding to mode q, are equal to each other and equal to Λ q To prove these results, proceed as follows and similarly for the observability transformed Gramian. The following result holds for any i ∈ Ω: We will prove only the first equality since the proof for the second is similar. By multiplying the equation in (40) corresponding to mode i with S i to the left and with S T i to the right, we write After the system is rewritten in the equivalent balanced realization, the next step will be to construct a reduced order system by eliminating states similar as to the linear case with no switching. One can partition the balanced realization of the original LSS Σ in the following waȳ The truncation orders are chosen to be less than the dimensions of the subsystems, i.e. r i n i .
Definition 4.1 Consider as given an original LSS Σ and the balanced equivalent systemΣ corresponding to Σ for which the system matrices are split as in (81). LetΣ = (r 1 , r 2 , . . . , r D , {(Â q ,B q ,Ĉ q )|q ∈ Ω}, {K q i ,q i+1 |q i , q i+1 ∈ Ω}, x 0 ), be a reduced linear switched system for which the system matrices are written as followsÂ where r q n q and q, q 1 , q 2 ∈ Ω.
By writing the dynamics of both the original balanced systemΣ and the reduced systemΣ, aṡ and continuing with the transition of the state variable from mode q i to mode q i+1 at time T i again for both systemsx we finally conclude that the original output and the one corresponding to the reduced LSS are written asȳ We also partition the balanced Gramians corresponding to the systemΣ as By plugging in the matrices in (81) and (86), into the equation (79), it follows that Note that the reduced balanced GramiansΛ i do not satisfy the same type of generalized Lyapunov equations as the original balanced Gramians, i.e., the equations in (79) and (80). Instead, conclude that the diagonal GramiansΛ i satisfy the following inequalitieŝ Hence, the reduced-order diagonal matricesΛ i , i ∈ Ω could be also considered as Gramians, but in the relaxed way introduced in Definition 12.

Error bound
In this section we present a bound on the L 2 norm of the difference between the observed outputs corresponding to the original LSS and to the reduced LSS. We will show that this bound depends on the L 2 norm of the chosen control input and on the neglected elements of the balanced reduced Gramians. Some of the derivations presented here are inspired from techniques used prior in the dissertations [34,9] and in the more recent contribution [6], that provides a bound for BT applied to stochastic systems. We assume that all pairs of the original Gramians (P i , Q i ), defined as the solutions of the equations (40) and (41), are transformed through the corresponding balanced transformations By replacing inequalities in (90), into equations (79) and (80), it follows that By multiplying the first inequality in (91) with Λ −1 to the left and to the right, one can again write thatĀ From (92) and the second inequality in (91), it directly follows that the following relations hold for any vectors z and v Next, for all i ∈ {1, 2, . . . , D}, proceed to partition the transformed Gramians Λ i Let β = max i∈Ω β i . By splitting the state variablex(t) asx(t) = x 1 (t)x 2 (t) T , withx 1 (t) ∈ R n−1 ,x 2 (t) ∈ R, introduce real valued vectors Note that the following holds: Define the function V : R n × R n → R as follows The temporal derivative of the function V, as defined in (97), satisfies Proof of Lemma 3. By putting together (81), (82) and (83) and by using the notation in (96), we can write thatẋ By using (99) and the inequality in (94), one can write that where Similarly, by using (100) and the inequality in (93) for z = x c (t) and v = 2u(t) , one can show that where From (102) and (104), observe that α o = β 2 q i α c . Hence, by adding the inequality in (101) with the one in (103) multiplied by β 2 q i , it follows that and by using the definition of V (t) in (97), it automatically proves the result in (98). Introduce the concatenation of the state variables and of the coupling matrices corresponding to the (balanced) original and reduced systems, t ∈ (T ℓ−1 , T ℓ ] From (84) and (105), it follows thatx(T + i ) =K q i ,q i+1x (T i ). Note that the function V : R n ×R n → R defined in (97), can also be written as a function ofx(t), as where the matricesR q ∈ R 2nq−1×2nq−1 are defined for any q ∈ Ω, as Assumption 4.4 SinceR q > 0, one can consider that there exists γ ∈ (0, 1) so that for all q i , q i+1 ∈ Ω, so that First, we present a result for one step reduction. The L 2 norm of the output error computed as the differences between the original output and the output corresponding to the reduced system is bounded by the norm of the input.
x 0 ) be a linear switched system and letΣ be a reduced order system obtained from Σ via the proposed balancing and truncation procedure, Consider any control inputs u(t) ∈ L 2 (R m ) and denote with y(t) andŷ(t) the outputs of the systems Σ and, respectivelyΣ for the zero state case (i.e., x(0) = 0). Then, there exists µ > 0 such that for any switching signal with minimal dwell time µ (i.e. t i > µ, ∀i), so that Proof of Theorem 1. Choose µ = − ln γ M as the minimal dwell time for the switching signal σ(t) (where γ is as in Assumption 44).
Introduce the function W (x(t)) = e M (t−T i−1 ) V (x(t)), for t ∈ (T i−1 , T i ]. It follows that (98) and (110), we write that Repeating the reasoning from the proof of Lemma 2, it follows that SinceR q ℓ > 0, then T ℓ 0 Θ(s)ds 0, ∀ℓ 1. By allowing T ℓ → ∞ and by using the definition of the function Θ, we can write Hence, the result in (109) has been proven.
By partitioning the set of discrete modes in two disjoint subsets, as Ω = {1, 2, . . . , D} = Ω 1 Ω 2 , we emphasize two different cases when reducing the system Σ q ∈ Ω 1 ⇒ perform reduction by 1 of the LTI subsystem in mode q, q ∈ Ω 2 ⇒ do not change the LTI in mode q. (113) Next, introduce the balanced Gramians corresponding to the two subsets, as Remark 4.1 We conclude that the bound in (109) still holds for the setup that was introduced in (113), as follows y −ŷ 2 2β u 2 , β = max Here, the selection of the scalar β is restricted only to diagonal Gramians corresponding to the discrete modes from Ω 1 . The proof is similar to the one just presented and will be skipped for brevity reasons.
Proof of Theorem 2. We start by applying the result of Theorem 1 (for one step reduction) as adapted in Remark 6 (allowing adjustable reduction levels for different modes), toΣ ℓ−1 andΣ ℓ for all ℓ ∈ {1, 2, . . . , ξ}. Consider the following two subsets of Ω, Note thatΣ ℓ is the result of a one-step reduction applied toΣ ℓ−1 . Also, the following inequalities hold for all ℓ ∈ {1, 2, . . . , ξ} where M is chosen as in the proof of Theorem 1 and it does not depend on ℓ. Next, denote withŷ ℓ andŷ ℓ−1 the outputs corresponding to the systemsΣ ℓ and, respectivelyΣ ℓ−1 for input u(t) ∈ L 2 , switching signal σ(t) with minimal dwell time µ ℓ and initial zero states. From (115), it follows that For ℓ = 0, the outputŷ 0 coincides to the output of the original LSS in balanced format, i.e.ŷ 0 = y. Furthermore, when ℓ = ξ, it follows thatŷ ξ =ŷ, withŷ as in Section 4.3, i.e. the output of the reduced-order LSSΣ from Definition 13. By adding the inequalities in (121) for all values of ℓ in {1, . . . , ξ}, it follows that which implies that the result in (120) is thus proven.

Stability preservation
Stability preservation is a very sought after property when devising MOR techniques. As pointed out in [21], a switched system is stable if all individual subsystems are stable and the switching is sufficiently slow to permit the transient effects to vanish after each switching time. In this book, Chapter 3.2 presents stability under slow switching with multiple Lyapunov functions.
We present a definition of stability in a uniformly exponentially sense and with imposing again the condition of a minimal dwell time µ. This definition was initially introduced in [21]. Moreover, we will show that the reduced order models constructed through the proposed balancing reduction technique, satisfy the conditions of this particular type of stability. Definition 4.3 A linear switched system Σ as described in (10), is uniformly exponentially stable with dwell time µ if there exist constants K, M > 0 such that for any solution (x, u, σ, y), the inequality holds for any t 0, for a control input considered to be zero (i.e. u = 0) and the switching signal σ(t) having minimum dwell time µ > 0.
Assumption 4.5 There exist positive definite matrices Q i > 0, i = 1, . . . , D such that Additionally, assume we can always find positive constants M, µ > 0 so that the following inequalities hold for any q 1 , q 2 ∈ Ω, Lemma 4.4 Consider an LSS Σ for which the conditions in Assumption 45 are satisfied. Then it follows that the system Σ is uniformly exponentially stable with dwell time µ.
Proof of Lemma 4. Let (x, u, σ, y) be a solution of the LSS with u = 0 and switching signal and hence, the inequality ∂W (x(t)) ∂t 0 holds. Using the same notations as in (54), we get that Now using that From (124) and (126), we get that By plugging in t = T i in (125) and using (127), it follows that By putting all the relations in (128) together (k ∈ {1, 2, . . . , i}), write that Since t > T i−1 = i−1 k=1 t k and by using the fact that the system has minimum dwell time µ in each operational mode, i.e. t k µ, it follows that t > (i − 1)µ. Furthermore, by putting together (125), (127) and (129), the results hold ∀t ∈ (T i−1 , T i ], Additionally, assume that for all q ∈ Ω, the following inequality holds for ǫ, φ > 0 From (130) and (131), it follows that for all t ∈ (T i−1 , T i ] By choosing K = φ 2 ǫ 2 e M µ , the result of Lemma 4 is proven (from Definition 15).
It follows that the system Σ is uniformly exponentially stable with dwell time 2µ.
Corollary 4.2 Consider an LSS Σ for which the second condition in Assumption 41 is satisfied and, additionally, there exists M > 0 so that A T q Q q + Q q A q + MQ q < 0, ∀q ∈ Ω. Then it follows that the system Σ is uniformly exponentially stable with dwell time 2µ (where µ = − ln γ M for γ = min i,j∈Ω, i =j γ i,j ).  Proof of Corollary 4. Consider that the dwell time µ is constructed in the proof of Lemma 1, i.e. e −M µ K T q 1 ,q 2 Q q 2 K q 1 ,q 2 < Q q 1 and also, the Gramians Q q satisfy A T q Q q + Q q A q + MQ q < 0. By multiplying the first inequality with (S −1 q 1 ) T to the left and with S −1 q 1 to the right, where S q was defined in (76), we write Similarly, by multiplying A T q Q q + Q q A q + MQ q < 0 with (S −1 q ) T to the left and with S −1 q to the right, it follows that By plugging in the partitioned matrices from (81) into (133), it follows e −M µ K 11 whereK q 1 ,q 2 =K 11 q 1 ,q 2 . also, by substituting the partitioned matrices from (81) into (134), write Ā 11 From (135) and (136), the results of Corollary 4 directly follow.
Corollary 4.5 By putting together the results of Corollary 3 and Corollary 4 it follows that, if the original LSS Σ is uniformly exponentially stable with dwell time µ, then the reduced LSSΣ for which the diagonal GramiansΛ q are associated, is also uniformly exponentially stable with dwell time 2µ.

Small system with 3 modes
Consider the case for which D = 3. The reachability Gramians P i , i ∈ {1, 2, 3}, satisfy the following equations which can be compactly written as where A D , B D and P D are as in (27) and also Similarly, the observability Gramians Q i , i ∈ {1, 2, 3}, satisfy the following equations which can also be compactly written as where A D , C D and Q D are block diagonal as in (44) and K D i as in (138) for i ∈ {1, 2}. Choose the following system matrices for Σ, as As for Example 4.1, consider the values of the reduced orders for the three subsystems, as r 1 = 1, r 2 = 3 and r 3 = 2. We recover the system matrices of the reduced LSSΣ as, From Example 4.1, it follows that the following bound holds, i.e. y−ŷ 2 2 max(σ 1,3 , σ 3,3 )+ σ 1,2 u 2 = 2(0.0816 + 0.0419) = 0.2471 u 2 .
By choosing the control input as u(t) = 1/2 sin(20t)e −t/2 + 1/20e −t/2 , and performing a time domain simulation, we display in Fig. 1, the outputs of the original and reduced systems Σ andΣ. The absolute value of the difference between the two outputs is presented in Fig. 2.

Second example
For the next experiment, consider the CD player system from the SLICOT benchmark examples for MOR (see [14]). This linear system of order 120 has two inputs and two outputs. We consider that, at any given instance of time, only one input and one output are active (the others are not functional due to mechanical failure). For instance, consider mode j to be activated whenever the j th input and the j th output are simultaneously failing (where j ∈ {1, 2}).
In this way, we construct an LSS system with two operational modes. Both subsystems are stable SISO linear systems of order 120. This initial linear switched system Σ will be reduced by means of the new balanced truncation procedure to obtainΣ BT 1 and also by means of the balancing method proposed in [24] to obtainΣ BT 2 .
There, it has been shown that, if certain conditions are satisfied, a simultaneous balanced truncation technique can be applied to LSS. In most practical examples, the existence of a global transformation matrix is not guaranteed. Hence, in [24], the authors propose instead a method of balancing the so-called average Gramians, i.e. P avg = 1 The frequency response of each original subsystem is depicted in Fig. 3. Choose the truncation orders k 1 = k 2 = 33 for the reduced systems using both methods. As for the first example, compare the time domain response of the original linear switched system against the ones corresponding to the two reduced models. We use he same signal as in Section 5.1 as control input, i.e. u(t) = 1/2 sin(20t)e −t/2 + 1/20e −t/2 . The switching times t i are randomly chosen within [0,10]s so that t i > 0.5s, ∀i.
The switching signal σ(t) is depicted in the upper part of Fig. 4, while in the lower part of Fig. 4, the outputs of the tree LSS mentined above are displayed. Notice that the output of the original system Σ is well approximated when using any of the two MOR methods.
Finally, by inspecting the time domain error between the original response and the one corresponding to the two reduced models (depicted in Fig. 5), observe that the new proposed method generally produces better results. The error curve corresponding to the BT1 method is below the error curve corresponding to the BT2 method for most of the points on the time axis.
We conclude that the new proposed balancing method produces better results than the one proposed in [24], in the sense that the original output is better approximated for this particular choice of LSS and control input. Moreover, our method can be applied to LSS with subsystems having different dimensions n i , i ∈ Ω and provide reduced order models again with possibly different dimensions r i , i ∈ Ω in different modes. The other method is constrained to having n 1 = . . . = n D so that the computation of the average Gramians P av and Q av is possible. Also, for BT2 it is assumed that a common Lyapunov function exists, which is arguably restrictive. Moreover, another advantage is that one can derive an error bound of the output error for the new proposed method, as presented in Section 4.2.1. This is also true for the second method proposed in [24].

Conclusion
In the current work, we have proposed a balanced truncation procedure for the class of linear switched systems which is based on the computation of infinite energy Gramians. These special matrices can be computed by solving generalized Lyapunov equations instead of solving systems of LMIs. The new balancing method has several advantages.
We provided connections between the new Gramians and system theoretical quantities (observation and controlling energy), by means of lower or upper bounds. Moreover, it turned out that an error bound involving the inputs, outputs and the truncated entries of the Gramians, could be derived. Finally, by applying the proposed procedure, the reduced order LSS can be proven to be uniformly exponentially stable with certain minimum dwell time, given that the original LSS also had this property.