Switched Systems Reduction Framework Based on Convex Combination of Generalized Gramians

A general method for model-order reduction of switched linear dynamical systems is presented. The proposed technique uses convex generalized gramian which is a convex combination of the generalized gramians. It is shown that di ﬀ erent classical reduction methods can be developed into the generalized gramian framework for model reduction of linear systems and further for the reduction of switched systems by construction of the convex generalized gramian. Balanced reduction within speciﬁed frequency bound is taken as an example which is developed within this framework. In order to avoid numerical instability and also to increase the numerical e ﬃ ciency, convex generalized gramian-based Petrov-Galerkin projection is constructed instead of the similarity transform approach for reduction. It is proven that the method preserves the stability of the original switched system at least for stabilizing switching signal and it is also less conservative than the method which is based on the common generalized gramian. Some discussions on the coe ﬃ cient of the vertices of the convex variables are presented. The performance of the proposed method is illustrated by numerical examples.


Introduction
The highly complicated models are the response to the ever-increasing need for accurate mathematical modeling of physical as well as artificial processes for simulation and control. This problem demands efficient automatic computational tools to replace such complex models by an approximate simpler models, which are capable of capturing dynamical behavior and preserving essential properties of the complex one, either the complexity appears as highorder describing dynamical system or complex nonlinear structure. Due to this fact model reduction methods have become increasingly popular over the last two decades [1][2][3]. Such methods are designed to extract a reduced-order model that adequately describes the behavior of the system in question.
Most of the studies related to model reduction presented so far have been devoted to linear case and just few methods have been proposed for nonlinear cases which are not strong comparing to linear reduction methods.
On the other hand, most of the methods that are proposed so far for control and analysis in hybrid and switched systems theory are suffering from high computational burden when dealing with large-scale dynamical systems. Because of the weakness of standard model reduction techniques in dealing directly with hybrid structure without sacrificing essential features and also pressing needs for efficient analysis and control of large-scale dynamical hybrid and switched systems, it is necessary to study model reduction of hybrid and switched systems in particular. This fact has motivated the researchers in hybrid systems to study model reduction [4][5][6][7][8][9][10][11][12][13][14][15][16]. Some works have been focused on ordinary model reduction methods that have potential applications in modeling and analysis of hybrid systems [4][5][6][7][8] motivated by reachability analysis and safety verification problem. Some researches address the problem of model reduction of switched and hybrid systems directly [9][10][11][12][13][14][15][16][17][18].
The model reduction problem for switched systems of Markovian type was studied in [17] and further in [18]. The method that has been presented in [9] deals with abstraction of both continuous and discrete parts of hybrid dynamical systems. This framework uses balanced revisualization for reduction of continuous part. There is no guarantee for stability preservation for switched system in the framework that has been proposed in [9] and it might happen that guard approximation and reset maps approximation cause nonelegant behavior due to approximation error or possible overlap. In [10] it is presented that the state set can be affinely reduced due to nonobservability if and only if a subspace of the classical unobservable subspace, characterized using the normal vectors of the exit facets, is nontrivial. This result does not provide strong tool for reduction of affine systems, as it is an exact reduction which is quite restrictive. Exact reduction is very elegant but the class of systems for which this procedure can be applied is quite small. This method only considers observability for investigating the importance of the states to discard. Although this method has been modified in [14] but lots of problems are still open and should be addressed in this context. The paper [11] is concerned with the problem of model reduction for discrete switched system. Two different approaches are proposed to solve this problem. The first approach casts the model reduction into a convex optimization problem, which is the first attempt to solve the model reduction problem by using linearization procedure. The second one, based on the cone complementarity linearization, casts the model reduction problem into a sequential minimization problem subject to linear matrix inequality constraints. Both approaches have their own advantages and disadvantages concerning conservatism and computational complexity. These optimization problems will be very hard if not infeasible to solve for a large-scale system and also they are not always feasible. This method is not only just applicable to discrete time switched systems furthermore it does not provide us with any hints about the number of states which is suitable to keep prior to the reduction. Similar methods have been developed for more general classes of discrete time switched systems in [12,13].
In [15] we proposed the generalized gramian framework for model reduction of switched systems based on common generalized gramians of the subsystems. This framework has been developed for controller reduction in [16]. The framework shows to provide satisfactory approximations and it preserves the stability of the original system under arbitrary switching signal but it is over conservative.
In this paper we propose convex generalized gramianbased framework for model reduction of switched system. This general framework can be categorized as gramianbased model reduction methods. Balanced model reduction is one of the most common gramian-based model reduction schemes. It was presented in [19] for the first time.
To apply balanced reduction, first the system is represented in a basis where the states which are difficult to reach are simultaneously difficult to observe. This is achieved by simultaneously diagonalizing the reachability and the observability gramians, which are solutions to the reachability and the observability Lyapunov equations. Then, the reduced model is obtained by truncating the states which have this property. Balanced model reduction method is modified and developed from different viewpoints [1,2]. One of the methods that are presented based on balanced model reduction is the method based on the generalized gramians instead of gramians [20]. In this method in order to compute the generalized gramians, one should solve Lyapunov inequalities instead of Lyapunov equations. This method is used to devise a technique for structure preserving model reduction methods in [21].
In this paper we first show that the generalized method in [20] can be extended to various gramian-based reduction methods. We also modified the original method in [20] to avoid numerical instability and also to achieve more efficiency by building Petrov-Galerkin projection based on generalized gramians. We propose a method based on the balanced model reduction within frequency bound in this framework. We generalized the framework to model reduction of switched system by constructing Petrov-Galerkin projection based on convex generalized gramian which is a convex combination of generalized gramians. We restrict convex generalized gramian to take stability preservation into account. The feasibility and also stability preservation of the algorithm is studied. It is shown that the proposed framework is less conservative than its previous counterpart in [15].
The paper is organized as follows. In the next section we review balanced reduction method and balanced reduction technique based on the generalized gramian. Section 2 presents how different gramian-based methods can be approximated as generalized gramian-based techniques. Balanced reduction within frequency bound based on generalized gramian is also presented in this section. This section ends up with some remarks on numerical implementation of the algorithm and using projection for generalized gramianbased reduction methods is suggested instead of balancing and truncation. Section 3 is devoted to develop convex generalized gramian-based reduction method for model reduction of switched systems, followed by discussions on stability, feasibility, algorithm parameters, and error bound. Section 4 presents our numerical results. Section 5 concludes the paper.
The notation used in this paper is as follows. M * denotes transpose of matrix if M ∈ R n×m and complex conjugate transpose if M ∈ C n×m . The norm · ∞ denotes the H ∞ , norm of a rational transfer function. The standard notation >, ≥ (<, ≤) is used to denote the positive (negative) definite and semidefinite ordering of matrices.

Balanced Truncation and Generalized Gramians
Balanced truncation is a well-known method for model reduction of dynamical systems; see, for example, [1,2].The basic approach relies on balancing the gramians of the systems. For dynamical systems with minimal realization Journal of Control Science and Engineering 3 where G(s) is transfer matrix with associated state-space representationẋ gramians are given by the solutions of the Lyapunov equations AP + PA * + BB * = 0, For stable A, they have a unique positive definite solutions P and Q, called the controllability and observability gramians.
In balanced reduction, first the system is transformed to the balanced structure in which gramians are equal and diagonal where σ i > σ i+1 and they are called Hankel singular values. The reduced model can be easily obtained by truncating the states which are associated with the set of the least Hankel singular values. Applying the method to stable, minimal G(s), if we keep all the states associated to σ m (1 ≤ m ≤ r), by truncating the rest, the reduced model G r (s) will be minimal and stable and satisfies [1,2] One of the closely related model reduction methods to the balanced truncation is balanced reduction based on the generalized gramian that is presented in [20]. In this method, instead of Lyapunov equations (3), the following Lyapunov inequalities should be solved: For stable A, they have positive definite solutions P g and Q g , called the generalized controllability and observability gramians. Note that these gramians are not unique. The rest of this model reduction method is the same as the aforementioned balanced truncation method, the only difference is that in this algorithm the balancing and truncation are based on generalized gramian instead of ordinary gramian.
In this method we have generalized Hankel singular values (γ i ) which are the diagonal elements of balanced generalized gramians instead of Hankel singular values σ i which are the diagonal elements of balanced standard gramians. For the error bound also the same result holds but in terms of the generalized Hankel singular values instead of Hankel singular values. It is worth to mention that γ i ≥ σ i . Therefore the error bound in balanced reduction based on generalized gramian is greater or equal than the error bound in ordinary balanced model reduction.

Generalized Gramian Framework for Gramian-Based Model Reduction Methods
In this section we present a general framework to build generalized gramian version of gramian-based methods. Then we present generalized balanced reduction within frequency bound within this framework following by some words about numerical implementation of the algorithm based on projection.

Lemma 1. Suppose that A is stable, Y is symmetric and
is satisfied, then On the other hand, for any stable A, there exists the following unique solution for the equation above: In the above structure M ≥ 0, hence This lemma leads to the following proposition that makes the relation between Lyapunov equations and Lyapunov inequalities evident.
Proposition 2 (see [20]). Suppose A is stable and X is the solution of Lyapunov equation where Q ≥ 0. If a symmetric X g satisfies Proof. It can be proven easily by subtracting (12) from (11) and applying Lemma 1 with Y = X g − X.
Proposition 2 shows how the generalized gramian could be an approximation for ordinary gramians. Balanced reduction based on generalized gramian which we reviewed in the last section is based on Proposition 2. This method might provide less accurate approximation than its gramian-based counterpart but still the approximation error is bounded.
It is possible to propose generalized version of other gramian-based reduction methods in this framework. The only step that we need to take is to derive associated Lyapunov equations and their Lyapunov inequalities. In the following we propose generalized version of balanced reduction within frequency bound.

Generalized Balanced Reduction within Frequency Bound.
Over the past two decades, a great deal of attention has been devoted to balanced model reduction and it has been developed and improved from different viewpoints. Frequency weighted balanced reduction method is one of the devised gramian-based techniques based on ordinary balanced truncation [1,2,[22][23][24]. In this method by using input and output weights and stressing on certain frequency range more accurate results can be achieved. In many cases the input and output weights are not given and the problem is to reduce the model over a given frequency range [1,2]. This problem can be attacked directly by balanced reduction within frequency bound. This method was first proposed in [25] and then modified in [2] in order to preserve the stability of the original system and to provide an error bound for approximation. In this method, for dynamical system (1) the controllability gramian P(ω 1 , ω 2 ) and observability gramians Q(ω 1 , ω 2 ) within frequency range [ω 1 , ω 2 ] are defined as where In order to show the associated Lyapunov equations, we need some more notations The gramians satisfy the following Lyapunov equations [1,2]: This method is modified in [2] to guarantee stability and to provide a simple error bound. The modified version starts with EVD of W c (ω 1 , ω 2 ) and W o (ω 1 , ω 2 ) where Note that since W c (ω 1 , ω 2 ) and W o (ω 1 , ω 2 ) are symmetric decompositions in the form (17) exist. Let where The modified gramians satisfy the following Lyapunov equations instead of (16): That is all what we need to present the generalized version of this method Then the generalized modified balanced reduction within frequency bound can be obtained by simultaneously diagonalizing P g (ω 1 , ω 2 ) and Q g (ω 1 , ω 2 ) then by truncating the states associated to the set of the least generalized Hankel singular values.

Numerical Issues.
Balanced transformation can be illconditioned numerically when dealing with the systems with some nearly uncontrollable modes or some nearly unobservable modes. Difficulties associated with computation of the required balanced transformation in [26] draw some attentions to alternative numerical methods [27]. Balancing can be a badly conditioned even when some states are much more controllable than observable or vice versa. It is advisable then to reduce the system in the gramianbased framework without balancing at all. Schur method and Square root algorithm provide projection matrices to apply balanced reduction without balanced transformation [1,27]. This method can be easily applied to other gramian-based reduction methods. In our generalized method we use the same algorithm by plugging generalized gramians into the algorithm instead of ordinary gramians.

Model Reduction of Switched Systems Based on Convex
Generalized Gramians. One of the most important subclasses of hybrid systems are linear switched systems. Linear switched system is a dynamical system specified by the following equations: Journal of Control Science and Engineering 5 where x(t) ∈ R n is the continuous state, y(t) ∈ R p is the continuous output, u(t) ∈ R m is the continuous input, and σ : R ≥0 → K ⊂ N is the switching signal that is a piecewise constant map of the time. K is the set of discrete modes, and it is assumed to be finite. For each i ∈ K, A i , B i , C i , D i are matrices of appropriate dimensions. In this section we build a framework for model reduction of switched system described by (22). The aim is to find projection that maps the state-space of a switched system to lower-dimensional subspace. Definition 3 describes the general definition of Petrov-Galerkin projection.
Definition 3. Petrov-Galerkin projection for a dynamical systemẋ is defined as a projection The reduced-order model using this projection is: In our framework we construct the aforementioned projection based on the convex generalized gramian which is defined as follows.

Definition 4. Convex controllability (observability) generalized gramian for the dynamical system (22) is defined as
P gi is generalized controllability (observability) generalized gramian associated to the ith subsystem of (22). One easy way to develop generalized gramian framework to model reduction of switched linear system is to apply the method locally on each subsystem independently, in other words, to reduce each subsystem by generalized gramian reduction method independently. Independent reduction of subsystems poses an extra-computational burden for construction of the independent projection matrices for each subsystem. Therefore it is preferable to construct single projection which is capable of reduction of all subsystems in one shot. Due to this fact, we introduce convex generalized gramian. Building the projection based on the convex generalized gramian enables us to reduce all subsystem in one shot and reduces the extra computational burden which the methods based on independent reduction of subsystems like the one in [9] suffer from. On the other hand, the elegant structure of convex gramian gives us more flexibility to play with the parameters and also to deploy some stability results. At this point it is possible to develop different gramianbased reduction methods into this framework for reduction of switched system finding generalized controllability/observability gramian for each subsystem, constructing convex controllability/observability generalized gramian. The next step can be simultaneous diagonalization of the convex generalized gramian and balancing and reduction of all subsystems based on Hankel singular values of the convex generalized gramian. In order to avoid numerical bad conditioning and also to increase the efficiency we use Schur or square root algorithm instead of balancing and directly Petrov-Galerkin projection matrices can be computed. This procedure is less conservative and provides more accurate results.
In the method that we proposed in [15] the stability of the original switched systems under arbitrary switching signal is guaranteed to be preserved which was the main reason for conservatism. We can also modify the convex generalized gramian-based framework to preserve the stability. We modify the method based on the stability results which are less conservative than their counterpart which we used in [15]. This is a compromise between stability preservation and feasibility. The matrix pencil and the convex hull of matrices which will be used in the algorithm for this purpose need to be defined.

Definition 5. The matrix pencil ξ α (A 1 , A 2 ) is defined as the one-parameter family of matrices αA
In general this is the convex hull of the family of matrices which is defined as The procedure is almost the same as what we mentioned before. The only deference is that we restrict one of the convex gramians to satisfy where A(α) ∈ ξ α (A 1 , A 2 ) for bimodal systems. In the case of multimodal switched systems a stable A(α) is picked from In order to clarify the method we extend generalized balanced reduction within frequency bound that is presented in previous section, for model reduction of switched linear system.

Journal of Control Science and Engineering
The convex controllability gramian within (ω 1 , ω 2 ) frequency bound is computed according to Definition 4: In (31), we are free to tune γ i ∈ [0, 1]. We can do the same to compute the convex observability gramian within (ω 1 , ω 2 ) frequency bound Ψ γ og (ω 1 , ω 2 ): where Q g,i (ω 1 , ω 2 ) is the generalized observability gramian of ith subsystem within frequency domain (ω 1 , ω 2 ), that is, we have If stability preservation is of concern we have to choose to be satisfied. If we plug Ψ γ cg (ω 1 , ω 2 ) and Ψ γ og (ω 1 , ω 2 ) into the square root algorithm, we directly obtain projectors for reduction. Note that the results are same as balancing algorithm. A merit of the Square Root method is that it relies on the Cholesky factors of the gramians rather than the gramians themselves, which has advantages in terms of numerical stability.

Stability, Parameters, and Feasibility.
One of issues in model reduction is preservation of the stability which needs to be studied. We need to recall two stability results in Theorems 6 and 7 which are the generalization of the first one. [29]. ∈ Co(A 1 , A 2 , . . . , A |K | ) which is stable [29].

Theorem 7. Switched dynamical system (22) for some switching signal is stable if there exists A(α)
The proofs for these theorems are by construction, in other words in the proofs the switching signal for which the switched system is stable are constructed based on α and dynamics of the systems [29]. ∈ Co(A 1 , A 2 , . . . , A |K | ) associated to the coefficients α = (α 1 , α 2 , . . . , α |K | ) and A(α) is its reduced-order counterpart using convex generalized gramian.
Proof. In the proposed method, we have which is projected switched system (reduced-order model).
The outcome of Square root algorithm for projection [1]: On the other hand, Hence where This proposition along with the Theorems 6 and 7 shows that at least for stabilizing switching signals which have been used in the proofs of Theorems 6 and 7 the reduced-order dynamical system is stable.
In the particular scenarios the stability of the original switched system is guaranteed to be preserved under arbitrary switching signal. This is shown in Proposition 9.

Proposition 9. The Convex Generalized Gramian framework is stability preserving under arbitrary switching signal if
or Journal of Control Science and Engineering Proof. We have Similarly Assume that (39) is satisfied, the outcome of Square root algorithm for projection [1]: P g W = V Σ 1 and Q g V = WΣ 1 , where Σ 1 ∈ R k×k , is diagonal and positive definite. Since P g is common controllability generalized gramian which implies On the other hand, Hence where Σ 1 ∈ R k×k is positive definite. In stability theory for switched system it is well-known sufficient condition for quadratic stability [30]. Hence, reduced-order model is guaranteed to be quadratic stable.
In the case that (40) is satisfied we can prove in a same way starting with V * (A * σ(t) Q g + Q g A σ(t) ) V < 0 and using Q g V = WΣ 1 which again proves the existence of the common Lyapunov function. We show that (28) is also satisfied for all A(α) ∈ Co(A 1 , A 2 , . . . , A |K | ) in this case. We , on the other hand, A * i Q g + Q g A i < 0 and consequently α i (A * i Q g + Q g A i )α i ≤ 0, knowing that at least one of α i 's must be nonzero we have which implies Some research has been focused on conditions for finding α which leads to stable A(α) which is in general an NP-hard problem [31][32][33].
Let · be the induced matrix norm, I identity matrix, and μ(A i ) the matrix measure of A i defined as In Proposition 10 we give a general condition which provides us freedom of choosing anyαin our framework.

Proposition 10.
For all α associated to A(α) ∈ Co(A 1 , A 2 , . . . , A |K | ) the original switched system described by (22) and its reduced-order counterpart using convex gramian is stable for stabilizing switching signal if there exists a norm such that  [34]. Hence we have

Proof. A(α)
Therefore the sufficient condition for the stability of A(α) is (50), hence this is also sufficient condition for the stability of A(α) according to Proposition 8. On the other hand Theorems 6 and 7 ensure us about the stability of the original and reduced-order switched system under stabilizing switching sequence when A(α) and A(α) are stable.
Our framework is said to be feasible if (28) is satisfied. This cannot be always satisfied; one way to improve the feasibility of the proposed model reduction method is using recently proposed extended notion of generalized gramian which is called extended gramian [35].

Numerical Examples
In this section we have applied the proposed method for reduction of two bimodal switched linear systems. The first example is of order 5 and the second one is of order 25. (54) Figure 1 shows the decay rate of the generalized Hankel singular values. The step response of the original and reduced-order switched systems associated to the switching signal of Figure 2 is presented in Figure 3. Figure 1 shows that most of the input/output information is in three states of the original systems. The proposed method provides accurate results after reduction of 2 states of the original system (40% of the states).   Figure 4.

Bimodal Switched
The step responses of the original and reduced-order switched systems associated to the switching signal of Figure 5 are shown in Figures 6, 7, 8, and 9.
In this example also we represent the infinity norm of transfer function of the original subsystems and the reduced counterpart which is of order 19 in Figures 10 and 11 to show how accurate the approximation works locally. As we expected by reduction of more states we loose more inputoutput information in reduced-order dynamical system and it leads to less accurate approximation. The quality of the approximation is highly dependent of the decay rate of singular values.

Conclusion
A general framework for model order reduction of switched linear dynamical systems has been presented. In this paper we have reformulated the frequency domain balanced reduction method into this scheme but generally various gramianbased reduction methods can be reformulated in the proposed generalized method easily and can be applied for reduction of switched system. The stability issue has been studied in the paper. The method provides single projectors for all subsystems which enable us to reduce all of the subsystems in one step. It is less conservative than the previous method based on common generalized gramian. The method is dependent to selection of parameters. This opens a window toward further modifications in optimization framework.