Stability, linearization and control of switched systems Octavian Beldiman and Linda Bushnell1 Department of Electrical and Computer Engineering Box 90291 Duke University Durham, NC 27708-0291
[email protected] and
[email protected] Abstract In this paper we derive Lyapunov stability and linearization properties for a class of switched systems. Based on these properties, we use an LMI method to design stabilizing controllers for switched systems. An example is given to illustrate the theoretical results.
1 Introduction A vast amount of literature about analysis, modeling and control of hybrid systems, i.e., systems with both continuous and discrete parts, can be found in both the eld of control and computer science ([1], [3], [4], [9], [11], [13]). A special class of hybrid systems is the class of switched systems, which can be thought of as a collection of dierential equations together with rules to switch between them [12], [11]. During the switching, the continuous state is assumed to be continuous, but there are some extensions ([1],[3]) that allow for jumps in the continuous state and even for dierent state spaces for dierent vector elds. Examples in real life include car transmission systems, process control systems, mobile robots etc. We are interested in developing a new, general methodology for designing controllers for such systems. One of the most powerful methods for designing controllers for linear systems is the LMI method. This method is based on Lyapunov functions, usually quadratic, and gives sucient conditions for controller matrices in terms of linear matrix inequalities. There are now very ecient methods, based on convex optimization and interior point solvers, to handle these inequalities, and there are many software tools that can be used (the controllers in this paper were designed, for instance, using the LMI toolbox in c 2 ). In [7] and [10], LMIs are used to nd MATLAB Dr. Bushnell is also with the U.S. Army Research Of ce, P.O. Box 12211, RTP, NC 27709-2211. This research was supported in part by the Army Research Oce grant number DAAH04-93-D-0002. 2 MathWorks registered trademark 1
piecewise quadratic Lyapunov functions for switched systems with the switching between the vector elds governed by quadratic regions in the continuous state space. This approach is quite general in the sense that it only requires Lyapunov functions for a domain. The main contribution of this paper is an extension of the linearization principle to the nonlinear switched systems. To illustrate it we shall use an LMI based controller design with a global Lyapunov function. In the next section, we present this method. In section 3, we study the problem of linearization of a nonlinear switched system; we design controllers for the linearizations of the vector elds and use them to stabilize the nonlinear system. We also show that for a special class of switched systems, the sucient conditions can be relaxed. In section 4, we present an example of a modi ed inverted pendulum to show the use of linearization and LMI design. In section 5, we state conclusions and future work plans.
2 LMI-based controllers for linear switched systems We will consider systems such as:
x_ (t) = fi (x);
(1)
together with given rules for switching amongst them. A well-known fact about this kind of systems is the following result, which is a corollary of the multiple Lyapunov function theorem [3], [2].
Corollary 1 If we have a candidate Lyapunov func-
tion V the same for all the vector elds x_ = fi (x), then the system is stable in the sense of Lyapunov. If V is strictly decreasing, then the system is asymptotically stable.
This fact will be used in deriving the LMI-based controllers for linear switched systems, described by the
following dierential equations:
x_ (t) = Ai x(t) + Bi u(t) with i = 1; : : : ; n, and arbitrary rules for switching between them. The switching can be autonomous (governed by some regions in the state space) or can be controlled by some external factor. We will assume that (Ai ; Bi ) is stabilizable for all i. We want to nd a stabilizing state feedback controller, u = Ki x, in discrete state i. The overall control law will be de ned by using each of these controllers for the corresponding discrete state. In order to satisfy the assumption in Corollary 1, we would like to determine the Ki matrices so that in each discrete state, the closed-loop system has the same Lyapunov function V (x) = x0 Px. If we can nd these matrices, then Corollary 1 will ensure that the system is asymptotically stable. The closed-loop systems in the discrete state i will be:
x_ (t) = (Ai + Bi Ki )x(t) Imposing V_ < 0, and denoting Ki Q = Yi , we get the set of n LMIs which can be solved to nd the controller matrices:
QA0i + Ai Q + Yi0 Bi0 + Bi Yi < 0; 8i = 1; : : : ; n: Using these controllers, the system is guaranteed to be asymptotically stable by Corollary 1. Note that it does not matter how the switching rules are de ned: for any sequence of switching, the systems will be asymptotically stable.
3 Linearization of switched systems 3.1 General systems
In this section, we consider switched systems described by the dierential equations (1) with initial condition (x(t0 ); i0 ) at time t0 . The functions fi () are assumed to be globally Lipschitz, so that the theorem of existence and uniqueness of solutions applies to each differential equation individually. In these equations, i is an index which can take values in a nite set I and will be called the discrete state. We are also given rules for changing the discrete state, either due to conditions on the continuous state or due to external commands. During such a switch, the continuous state is assumed to remain continuous. More precisely, if at time t1 the discrete state is changed from i0 to i1 , the systems will evolve according to the
dierential equations x_ = fi1 (x) with initial condition (x(t1 ); i1 ) at time t1 , where x(t1 ) = limt!t1 ;t 0 there is a > 0 so that jx(t) ? x0 j < for any initial state (x(0); i0 ) with jx(0) ? x0 j < and i0 2 I . x0 is said to be
asymptotically stable if it is stable and there is a > 0 so that limt!1 x(t) = x0 for all initial states (x(0); i0 ) with jx(0) ? x0 j < and i0 2 I .
Finally we generalize the notion of linearization to a nonlinear switched system.
De nition 3 The linearization of the system (1)
around the equilibrium continuous state x0 is the system de ned by the following set of equations: i (x) (x )x(t) x_ (t) = @f@x 0
with the same switching rules for the discrete state.
Theorem 1 If the dierential equations corresponding to the linearization of system (1) are (asymptotically) stable in x0 and have the same quadratic Lyapunov function, then system (1) is (asymptotically) stable in x0 . Proof. Let V (x) = x0 Px be the common Lyapunov
function of the linearized dierential equations. Consider the dierential equation corresponding to the discrete state i. According to the linearization theorem for nonlinear system (see [8],p. 127), we know that there exists ri > 0 so that V is a Lyapunov function for the equation x_ = fi (x) for jxj < ri . Then on the ball of radius minfri ji 2 Ig, V is a Lyapunov function for each dierential equation. We can apply Corollary 1 to prove that the system is (asymptotically) stable.
The region of attraction of this stable equilibrium point includes the ball of radius minfri ji 2 Ig.2
Remark. One of the questions often asked about linearization theorems is how large is the region of stability. It is easy to see in this case that the region of attraction for the switched system includes the intersection of the regions of attraction of all the individual dierential equations. A consequence of Theorem 1 is that the method for designing controllers presented in the previous section is justi ed: if we have a nonlinear switched system, we can linearize it. If we are able to nd stabilizing controllers for the linearization, with a common Lyapunov function, then we can apply them to the nonlinear system and have guaranteed local stability.
3.2 Autonomous switched systems
A particular case of switched systems is that where the changes in the discrete state are governed by the continuous state ([11], [12]). A set J of subsets of the continuous state space is de ned, each element having as boundaries some smooth submanifolds (such a subset is called a transition set). A transition function ! : J ! II associates to each transition set a pair of discrete states. If the system is in the rst discrete state and the continuous state goes into that transition set, then the system jumps into the second discrete state. We will call such a system an autonomous switched system. For each discrete set i we can de ne the arrival and departure sets denoted by Ji+ and Ji? :
Ji+ = [fJ 2 J j9j 2 I ; !(J ) = (j; i)g
Ji? = [fJ 2 J j9j 2 I ; !(J ) = (i; j )g
We need the following assumptions on the transitions sets in order to have well-de ned dynamic ([12],[11]): (1) J1 \ J2 = ; for all J1 ; J2 2 J so that 1 (!(J1 )) = 1 (!(J2 )), where 1 (x; y) = x, (2) Ji? is closed for all discrete states i and (3) Ji? \ Ji+ = ; for all discrete states i. For these systems, [11] showed that the system is nonZeno if the distance between the departure set and arrival set corresponding to each discrete state is strictly greater than 0:
d(Ji+ ; Ji? ) > 0; 8i 2 I :
(2)
We prove next that for an autonomous switched system satisfying this condition, we do not need to have the same Lyapunov function for each dierential equation in order to guarantee stability.
Theorem 2 Let x0 be an equilibrium point for an autonomous switched system satisfying condition (2). If x0 is (asymptotically) stable for each of the dierential equations then it is (asymptotically) stable for the entire system. Proof. We have two cases: x0 can be on the boundary of one of the transitions sets or not. Case 1: Suppose rst that x0 is not on a boundary of a transition set. If x0 is in the interior of a departure set Jm? we can ignore the discrete state m since we will have an immediate transition. Thus, we can assume without loss of generality that x0 2= Jm? ; 8m 2 I . Since Jm? is closed for all discrete states m 2 I and there is a nite number of discrete states, we can nd an 1 > 0 such that the ball B (x0 ) does not meet any of the departure sets. Let > 0, and suppose < 1 . If this is not the case, we can prove stability for 1 and this proves stability for . Let m be a discrete state. Since x0 is stable for fm(), we can nd a m such that if the solution starts in the ball Bm (x0 ) it will stay in the ball B (x0 ). Moreover, by the choice of the solution will never meet another transition set. So, taking = minfmjm 2 Ig, all of the solutions starting in B (x0 ) will stay in B(x0 ), which proves stability. Case 2: Now suppose that the equilibrium point is on the boundaries of several of k transition sets Jmi ni , !(Jmi ni ) = (mi ; ni ) with i = 1; : : : ; k. If x0 2 Jmi ni then x0 2 Jn+i and therefore x0 2= Jn?i . This means that in discrete state ni , we can nd an i > 0 such that the ball Bi (x0 ) does not cross the departure set Jn?i , i.e., if the solution stays in the ball Bi (x0 ) it will never switch to another discrete state. Since the system in discrete state ni is stable at x0 , we can nd a i0 > 0 such that all of the solutions starting in the ball Bi (x0 ) will stay in the ball Bmin(;i) (x0 ), never switching. In state mi , the discrete x0 is also stable, so we can nd i such that all of the solutions starting in Bi (x0 ) will stay in the ball Bmin(i ;) (x0 ) and will not cross any other transition set except possible Jmi ni . 0
0
If the initial discrete state is any other than m1 ; : : : ; mk , we can nd a that proves stability, as in the rst case. Then, taking = minf1 ; : : : ; k ; g, all of the solutions starting in B (x0 ) will stay in the ball B (x0 ). Hence x0 is stable. In both cases, the system will remain in a discrete state after a while. If each of the dierential equations is asymptotically stable, then the one corresponding to this nal state is also asymptotically stable, meaning that the solution will tend to the equilibrium point. 2
Remark. It is interesting to compare Theorem 2 with
the multiple Lyapunov function (MLF) theorem [3]. It seems that for the special class of autonomous switched
systems satisfying condition (2), there is no need for the Lyapunov function to decrease on the switching times. The explanation is the following: the MLF theorem is based on the idea of constructing chains of Lyapunov invariant sets (if a trajectory starts in the set, it will always be in the set), included one in another. The conditions imposed on the Lyapunov function are needed to accommodate the in nite switching sequences. But, if we knew that we had a nite sequence of switchings for the initial condition in a neighborhood of the equilibrium point, we could have chosen a corresponding chain of Lyapunov invariants, and no condition on the Lyapunov function would be necessary. This is exactly what Theorem 2 implies: starting close enough to the equilibrium, we have a nite number of transitions (at most one, actually). This is why we do not need additional conditions on the Lyapunov functions. If we do not have condition (2), the equilibrium point can be on the boundary of both the departure and arrival sets for a discrete state. A trajectory may then have an in nite number of switchings. For instance, see the example given in [2] or the rst example in the next section. In the special case of an autonomous switched system that veri es condition (2), we do not need to nd a common Lyapunov function to ensure stability.
Corollary 2 If all of the dierential equations cor-
responding to the linearization of an autonomous switched system satisfying condition (2) are (asymptotically) stable in x0 , then the system is (asymptotically) stable in x0 .
To summarize the main point of this paper: from a controller design point of view, we only need to design stabilizing controllers for the dierential equations of the linearization so that the closed-loop systems have the same Lyapunov functions. Moreover, if the switched system satis es condition (2), we do not have any constraints on the Lyapunov functions.
4 Applications In order to illustrate the LMI control design for a nonlinear switched system, we consider a modi ed version of an inverted pendulum. Consider an inverted pendulum of mass m and length l on a cart of variable mass. Let x 2 < be the dis-
placement of the cart with respect to a given origin, and 2 < the angular displacement of the pendulum with respect to the vertical axis. The cart is acted on with a force u 2 0 then the cart has mass M1 , otherwise it has mass M2 . An interpretation of this situation would be that the cart is moving between two dierent physical media.
This system is an autonomous switched system and does not satisfy condition (2). We will design a stabilizing controller for this system following the procedure described in section 2. The equation of the system is given by (see for example [8]): +l_ sin x = u=m?Mgsincos i =m+sin2 2
?l_ sincos = ?u=mcos+(Ml(Mi +im=m)=mgsin +sin2 ) 2
The system has four continuous states (x, x_ , , _) and two discrete states (corresponding to M1 and M2 ). First we linearize this system around the equilibrium point (0; 0; 0; 0). The matrices of the linearizations are Ai = [0; 1; 0; 0; 0; 0; ?gl=Mi; 0; 0; 0; 0; 1; 0; 0; (Mi + m)g=(ml); 0] and Bi = [0; 1=Mi; 0; ?1=(lMi)]. Now we use the LMI method described in section 2 to design a state feedback controller with the same Lyapunov function for the closed loop system. We then apply these controllers to the nonlinear switched system. In gure 1 we present the trajectory of the uncontrolled zero-input system with initial conditions x = ?0:1 and = 0:1. Note that due to the switching of the mass, the cart will have an overall net motion. In gure 2 we use the designed controller to stabilize the system and plot the trajectory for the same initial condition. Note that the system has only one transition at t = 0:4. In order to see what happens for several transition, we added some white noise to this system. The behavior of the controlled system with this perturbation is shown in gure 3, where we also shown the discrete state. Although there are many transitions, the system does not become unstable, in accordance with Theorem 1.
5 Conclusions In this paper we derived stability and linearization properties for nonlinear switched systems. We established a relationship between Lyapunov stability and topological properties of a special class of switched systems that we called autonomous switched systems. This is based on the idea that if an autonomous switched system satis es certain topological conditions (condition (2)), then any trajectory starting close enough to the equilibrium point will have a nite number of transitions. We extended, for the rst time, the linearization principle to nonlinear switched system, and so justi ed the use of linear analysis and design for the nonlinear case. An example of such a method is the LMI stability analysis, introduced in [7] for switched systems. We used a similar method to design stabilizing controllers and applied it to a switched version of an inverted pendulum.
Most of the work on switched systems to-date is done for time-invariant systems. Future work includes extending this to time-varying systems, with the goal of analyzing limit cycles and trajectory tracking.
0.15
cart pendulum discrete state
0.1
0.05
0
Initial angle (pendulum): 0.1, initial displacement (cart): −0.1 6 pendulum
−0.05
5 −0.1
4
−0.15
3
−0.2
2
0
1
2
3
4
5
6
7
8
9
10
Figure 3: Trajectories for the controlled inverted pendu-
1
lum with white noise input.
cart 0
−1
−2
0
0.5
1
1.5
2
2.5 time
3
3.5
4
4.5
5
Figure 1: Cart and pendulum trajectories for the uncontrolled inverted pendulum.
Initial angle (pendulum): 0.1, initial displacement (cart): −0.1 0.1
0.08
0.06 cart 0.04
0.02 pendulum 0
−0.02
−0.04
−0.06
−0.08
−0.1
0
0.5
1
1.5
2
2.5 time
3
3.5
4
4.5
5
Figure 2: Trajectories for the inverted pendulum with stabilizing controller.
6 Acknowledgement The authors would like to thank the anonymous reviewers for their helpful comments.
References
[1] A. Back, J. Guckenheimer, and M. Myers. A dynamical simulation facility for hybrid systems. In R. L. Grossman, A. Nerode, A. P. Ravn, and H. Rischel, editors, Lecture notes in computer science, volume 736. Springer-Verlag, 1993. [2] M. S. Branicky. Multiple Lyapunov functions and other analysis tools for switched and hybrid systems. IEEE Transactions on automatic control, 43. [3] M. S. Branicky. Studies in hybrid systems: modeling, analysis, and control. PhD thesis, MIT, 1995.
[4] R. W. Brockett. Hybrid models for motion control systems. In H.L. Trentelman and J.C. Willems, editors, Essays in Control: Perspectives in the Theory and its Applications, pages 29{53. 1993. [5] K. X. He and M. D. Lemmon. Lyapunov stability of continuous-valued systems under the supervision of discrete-event transistion systems. In T.A. Henzinger and S. Sastry, editors, Lecture notes in computer science, volume 1386. Springer-Verlag, 1998. [6] A. I_ftar and U . O zguner. Overlapping decompositions, expansions, contractions and stability of hybrid systems. IEEE Transactions on Automatic Control, 43(8):1040{1056, August 1998. [7] M. Johansson and A. Rantzer. Computation of piecewise quadratic lyapunov functions for hybrid systems. Dept. of Automatic Control, Lund Institute of Technology, Tech. Rep. TFRT-7549, June 1996. [8] H. K. Khalil. Nonlinear systems. Prentice Hall, second edition, 1996. [9] A. Nerode and W. Kohn. Models for hybrid systems: Automata, topologies, stability. In A. P. Ravn H. Rischel R. L. Grossman, A. Nerode, editor, Lecture notes in computer science, volume 736. SpringerVerlag, 1993. [10] S. Pettersson and B. Lennartson. Exponential stability analysis of nonlinear sytems using LMIs. Proceedings of the 36th Conference on Decision and Control, December 1997. [11] L. Tavernini. Dierential automata and their discrete simulators. Nonlinear analysis, Theory, Methods and Applications, 11(6):665{683, 1987. [12] H. S. Witsenhausen. A class of hybrid-state continuous time dynamic systems. IEEE Transactions on Automatic Control, 11(2):161{167, 1966. [13] W. S. Wong and R. W. Brockett. Systems with nite communication bandwidth constraints { part i: State estimation problems. IEEE Transactions on Automatic Control, 42(9):1294{1299, 1997.