#### Abstract

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 different 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 specified 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 efficiency, 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 coefficient of the vertices of the convex variables are presented. The performance of the proposed method is illustrated by numerical examples.

#### 1. 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 high-order describing dynamical system or complex nonlinear structure. Due to this fact model reduction methods have become increasingly popular over the last two decades [1–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–16]. Some works have been focused on ordinary model reduction methods that have potential applications in modeling and analysis of hybrid systems [4–8] motivated by reachability analysis and safety verification problem. Some researches address the problem of model reduction of switched and hybrid systems directly [9–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 gramian-based framework for model reduction of switched system. This general framework can be categorized as gramian-based 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 gramian-based 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. denotes transpose of matrix if and complex conjugate transpose if . The norm denotes the , norm of a rational transfer function. The standard notation , is used to denote the positive (negative) definite and semidefinite ordering of matrices.

#### 2. 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

where is transfer matrix with associated state-space representation

gramians are given by the solutions of the Lyapunov equations

For stable , they have a unique positive definite solutions and , 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 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 , if we keep all the states associated to , by truncating the rest, the reduced model 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 , they have positive definite solutions and , 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 () which are the diagonal elements of balanced generalized gramians instead of Hankel singular values 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 . Therefore the error bound in balanced reduction based on generalized gramian is greater or equal than the error bound in ordinary balanced model reduction.

#### 3. 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.

##### 3.1. Lyapunov Equations, Lyapunov Inequalities, and Reduction

Lemma 1. *Suppose that is stable, is symmetric and
**
is satisfied, then , that is, is positive semidefinite.*

*Proof. *If , there exists such that
On the other hand, for any stable , there exists the following unique solution for the equation above:
In the above structure , hence

This lemma leads to the following proposition that makes the relation between Lyapunov equations and Lyapunov inequalities evident.

Proposition 2 (see [20]). *Suppose is stable and is the solution of Lyapunov equation
**
where . If a symmetric satisfies
**
then .*

*Proof. *It can be proven easily by subtracting (12) from (11) and applying Lemma 1 with .

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.

##### 3.2. 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–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 and observability gramians within frequency range 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 and

where , , .

Note that since and 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 and then by truncating the states associated to the set of the least generalized Hankel singular values.

##### 3.3. Numerical Issues

Balanced transformation can be ill-conditioned 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 gramian-based 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.

#### 4. Model Reduction of Switched System

##### 4.1. 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:

where is the continuous state, is the continuous output, is the continuous input, and is the switching signal that is a piecewise constant map of the time. is the set of discrete modes, and it is assumed to be finite. For each , , , , 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 , where , , [1].

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
where
is generalized controllability (observability) generalized gramian associated to the th 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 gramian-based 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 is defined as the one-parameter family of matrices , [28].

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 for bimodal systems. In the case of multimodal switched systems a stable 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.

First, we need to find the generalized controllability gramian of each subsystem within frequency domain by solving the system of Lyapunov inequalities

For example in the case of bimodal systems, , we have to solve

The convex controllability gramian within frequency bound is computed according to Definition 4:

In (31), we are free to tune . We can do the same to compute the convex observability gramian within frequency bound :
where is the generalized observability gramian of th subsystem within frequency domain , that is, we have

If stability preservation is of concern we have to choose such that
to be satisfied.

If we plug and 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.

##### 4.2. 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.

Theorem 6. *Switched bimodal dynamical system (22) (i.e., ) for some switching signal is stable if and only if there exists which is stable [29].*

Theorem 7. *Switched dynamical system (22) for some switching signal is stable if there exists which is stable [29].*

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

Proposition 8. *Consider associated to the coefficients and is its reduced-order counterpart using convex generalized gramian.**If is stable then is also stable.*

*Proof. *In the proposed method, we have
which is projected switched system (reduced-order model). The outcome of Square root algorithm for projection [1]: and , where , is diagonal and positive definite. From (34): , which implies

On the other hand,

Hence
where is positive definite. Hence is stable.

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
*

*Proof. *We have

Similarly

Assume that (39) is satisfied, the outcome of Square root algorithm for projection [1]: and , where , is diagonal and positive definite. Since is common controllability generalized gramian
which implies
On the other hand,

Hence
where 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 and using which again proves the existence of the common Lyapunov function. We show that (28) is also satisfied for all in this case.

We have , , , on the other hand, and consequently , knowing that at least one of ’s must be nonzero we have
which implies

Some research has been focused on conditions for finding which leads to stable which is in general an NP-hard problem [31–33].

Let be the induced matrix norm, identity matrix, and the matrix measure of defined as

In Proposition 10 we give a general condition which provides us freedom of choosing anyin our framework.

Proposition 10. *For all associated to 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
*

*Proof. *, , for all . Moreover is convex and [34]. Hence we have

Therefore the sufficient condition for the stability of is (50), hence this is also sufficient condition for the stability of 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 and 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].

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

##### 5.1. Fifth-Order Switched Linear System

Consider a single-input-single output switched linear of the form(22)

In order to reduce the switched system first we construct convex gramians over the frequency domain associated with ,

The resulting third-order switched linear model by applying the presented method is

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

##### 5.2. Bimodal Switched Linear System of Order 25

Consider bimodal switched linear system of order 25. The original system is SISO and it is reduced to 14, 17, 18, and 19 using the proposed reduction method over .

The generalized Hankel singular values are shown in Figure 4.

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 input-output 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.

#### 6. 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 gramian-based 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.