The Dynamics of Hybrid Systems by John C. Eckalbar Department of Economics CSU, Chico February 2009 This paper is concerned with the dynamic properties of what have come to be called “hybrid” or “switching” systems. Without getting overly specific yet, a hybrid system often has the following general properties: The dynamic variables are given by the vector z R n , and z (t) is the vector giving dz/dt. Define a switching surface S = {z | s(z) = 0}, where s(z): Rn → R is a continuous function which divides Rn into regions Sa = {z | s(z) < 0}, Sb = {z | s(z) > 0}, and S. In a hybrid system, z (t) is governed by one set of equations when z (t) Sa and by a different set when z (t) Sb , and there is often a discontinuity in the vector field at S. We will leave aside for the moment the value of z (t) on S. Figure 1 illustrates a sample hybrid. If the initial point z(0) is in Sa, the positive semi-path from z(0) will be governed by fa, where z (t) f a (z (t)), f a : Sa R n . Suppose that fa drives z(t) onto S at t = t1, then fb (defined similarly) may take over and drive the system back onto S at t = t2 > t1. And so on. Exploring a system of this sort raises a number of interesting questions. Is stability of the fa and fb subsystems sufficient to ensure stability of the hybrid? Is subsystem stability necessary? Could two stable systems form an unstable hybrid? Can the hybrid exhibit more exotic behavior (like limit cycles or chaos) than either subsystem individually? 1 Among economists, the original motivation for study of switching systems came from disequilibrium and monetary theorists. Imagine, for example, that we build a model that allows trading outside equilibrium, and that output, Q, is a function, F, of the actual quantity of labor hired, L. Suppose that labor demand, Ld, is given by F-1(e), where e is the firm’s expected sales, and labor supply, Ls, is a function of the real wage, G(w). If the actual quantity of labor hired is the minimum of labor supply and labor demand, we S Sb z(t1) z(t2) Sa S z(0) Figure 1 have Q = F(min{ F-1(e), G(w)}) = min{e, F(G(w))}. Thus, changes in Q would be governed either by changes in e or by changes in w, depending upon whether Ls is greater or less than Ld. In a simple model such as this, the switching line would be {(e, w) | F-1(e) = G(w)}. (See Varian 1977, Eckalbar 1981, and Ito 1980.) Similarly, if we modeled a liquidity constrained, cash on demand, economy, we would have different 2 dynamics according to whether or not cash constraints are binding at our current position in the phase space. (See Caballe, Jarque, and Michetti, 2006.) Other disciplines are also actively involved in the study of hybrid systems. In physics, Murry Milgrom has offered an alternative to the dark matter hypothesis used to explain the observed anomaly in the rotation of galaxies. Under Milgrom’s theory, Newtonian dynamics (F = m a) is replaced by F = m μ(a/a0) a, where |a| = a and μ(a/a0) = 1 if a > a0 and μ(a/a0) = a/a0 otherwise. Hence, the classical equation is revised at low accelerations. (Milgrom, 1983.) And in mathematics, engineering and control theory, the study of systems with friction encounter similar problems. (Stewart and Anitescu, 2005 or di Bernardo, et al., 2003.) In this paper we initially study the stability properties of a two-dimensional switching system composed of two linear subsystems with a common equilibrium and a linear switching surface that passes through the equilibrium. We explore a number of issues, among them the following: if A and B are stable matrices, i.e., have eigenvalues with negative real parts, is that sufficient for stability of the patched together hybrid system, or is there something in the interplay as the governing systems switch that can lead to instability? We are able to show that stability of the A and B subsystems separately is sufficient, but not necessary, for stability of the hybrid system. And further, we are for the first time able to identify the necessary and sufficient conditions for stability. Our method of proof, following Poincare, involves transformation of the patched together differential equation switching system in R2 into a companion difference equation system on S. 3 We later explore the effect of alternative assumptions regarding S. The most interesting and novel feature of this analysis is that we model a process where switching takes place gradually throughout a two-dimensional switching region, so that the effect from one subsystem gradually diminishes while the effect of the other grows as the path transitions from the domain of one subsystem, through the switching region, and into the domain of the next subsystem. This is no doubt quite plausible in certain applications, and it has the advantage of producing a continuous vector field. It can also give rise to fascinating dynamics, including multiple locally stable equilibria and limit cycles. The layout of the paper is as follows. In section I, we organize notation, establish some definitions, give preliminary assumptions, and review some basics regarding solutions for two-dimensional linear autonomous systems. In section II, we review some pertinent facts regarding simple non-hybrid two dimensional linear dynamical systems, and we investigate the manner in which each subsystem can be transformed from a differential equation to a companion difference equation system, which provides a “strobe-like” view of the path of the differential system over a succession of fixed time intervals. In section III we show that by carefully selecting the unit time interval, we can create a single continuous difference system from the hybrid switching system. Once this is accomplished, our main theorem is easily established. In section IV, we explore alternative assumptions on the nature of the switching line. And in section V we consider a system which has a two dimensional switching surface with gradual transition from one regime to another. 4 I. Preliminaries We will model a two dimensional linear system, where our variables are x and y. For ease of notation, we will sometimes use z = (x, y) and z (x , y ) . We begin with the specification of the switching surface, S, Definition S: Let S = {(x, y}| s(x, y) = - k ∙ x + y = 0, (x, y) ≠ (0, 0)}, Sb = {(x, y)| s(x,y) = - k ∙ x + y > 0}, and Sa = {(x, y)| s(x, y) = - k ∙ x + y < 0}, k R. We will shortly have occasion to use s (s/x, s/y) (k, 1), which is the gradient of s. The gradient of the function s(x, y) is a vector orthogonal to S and pointing into the half-space Sb . Assumption M: We assume that z (t) A z (t) z (t) Sa, and z (t) Bz(t) z (t) Sb. A and B are real, distinct 2 × 2 matrices with constant coefficients. We now discuss the behaviour on S, beginning with a few definitions: Definition AP: We will say that two subsystems, A and B, “agree perfectly” on S if x x A i B i for all (x i , y i ) S or equivalent ly Az i Bz i for all z i S. yi yi Under AP, at every point z in S the vectors Az and Bz have the same direction and magnitude. Assumption AP may seem quite strong, but it is sensible in a wide class of economic models. (For more elaborate models where AP holds, see Eckalbar 1981 and 1985.) An obvious advantage of AP is that it results in a continuous vector field everywhere in R2. A less stringent assumption might be that two systems “weakly agree directionally,” which we define as follows: 5 Definition WAD: Two subsystems, A and B, will be said to “weakly agree directionally” at point z i S if sgn s Az i sgn s Bz i , where the term in square brackets is the scalar product of a vector normal to S, i.e. the gradient of S or (-k, 1), with the vector giving the motion of the A or B subsystem at zi. When two subsystems satisfy WAD, then they both point across S to the same side of S, i.e., either both flow into Sa or both into Sb. Under WAD, the two vectors do not have the same exact direction and magnitude, and as a result the hybrid may have a vector field which lacks continuity at S. Note that if the two vectors Azi and Bzi point into Sb, then under WAD sgn s Az i sgn s Bz i 1, and if they both point into Sa, sgn s Az i sgn s Bz i 1. Let us pause to consider those facts. Figure 2 gives the sense of Definition WAD. The figure shows a subset of S near the origin. s is a vector normal to S, with coordinates (-k, 1). The vector (1, k) is shown along S, since S is defined by y = k x. Note that these two vectors are orthogonal and that their scalar product is zero. The vector s is also translated to point zi = (xi, yi). The vectors Azi and Bzi give the flow of the A and B subsystems (respectively) from point zi. Both systems flow into the domain of the B subsystem, Sb, i.e., they agree directionally. The angle between vector Azi and s is δ, and the angle between Bzi and s is γ. Note that if the angles are acute, both systems must point toward Sb. Also, both the angles are acute if and only if both Cos(δ) and Cos(γ) are positive. The scalar product of the vectors s and Azi is given by | s | |Azi | Cos (δ), so the sgn[ s ∙ Azi] = sgn[Cos(δ)] = 1. Hence, if both scalar products s ∙Azi and s ∙Bzi are positive, they both point into Sb, i.e., they agree directionally. 6 Similarly, if both had negative sign, they would agree directionally and point into Sa. If the signs of the two scalar products are opposite, then the two systems “disagree” on the direction of flow on S. s Sb s Bz S 1 Az zi = (xi , yi) (1, k) s) S -k- 1 Sa Figure 2 The next result shows that if two subsystems have AP or WAD at any point on S, then they have those properties at every point on S. Theorem A: If A and B are matrices with fixed real coefficients and S is as defined by Definition S, then if there is any point on S at which the two subsystems weekly agree directionally, then they weakly agree directionally at all points on S. Proof: We assume that we have a single point (xi, yi) in S with x x sgn ( k ,1) A i sgn ( k ,1) B i . But since (xi, yi) is in S, we can wright yi yi 1 1 sgn (k ,1) A xi sgn (k ,1) B xi , which could be written k k 7 1 1 sgn (k ,1) A sgn[ xi ] sgn (k ,1) B sgn[ xi ]. k k But then it is obvious from inspection that if the above holds for some xi, it will also hold for any xj, j ≠ i. Hence, if the subsystems weakly agree directionally anywhere on S, they weakly agree everywhere on S. q.e.d. Corollary A: If WAD is violated at (xi, yi) S, then WAD is violated at all other points in S. Proof: Suppose not. Then there is a (xi, yi) S not satisfying WAD and another (xj, yj) S, i ≠ j, which satisfies WAD. But by Theorem A, if (xj, yj) satisfies WAD, so do all other points in S. A contradiction. q.e.d. Since systems satisfying AP are a subset of all systems satisfying WAD, the Theorem A and Corollary A also apply when WAD is replaced by AP. There are two types of directional disagreement: Type I. Near S, Az points toward Sa, while Bz points toward Sb. In the case of Type I disagreement, all points off S but near the point of disagreement on S flow away from S. Thus, we would never observe a point on S with Type I disagreement except as an initial condition. Systems are sometimes said to “branch” in this case. Type II. Az points toward Sb, while Bz points toward Sa. In this case points on S will have the neighboring vector field pointing toward S from both sides. This is likely to lead to “sliding” along S. In fact if there is Type I 8 disagreement on the side of S where x > 0 (x < 0), there will be Type II S Sb 0 Sa S Figure 3. disagreement on S when x < 0 (x > 0). See Figure 3. The upshot of the above is that if WAD holds, trajectories will cross S, while if WAD does not hold, paths will not cross S. If WAD does not hold, a path beginning in Sa (Sb) will stay in Sa (Sb), and there will be no switching from one regime to another. Hence, stability will be completely determined by the initial condition and the stability properties of the host sub-system. Since we are interested here in switching, we make the following: Assumption WAD: The two subsystems weakly agree directionally. 9 1 y S 0.75 θ 0.5 0.25 -1 -0.5 θ θ 0.5 1 1.5 x -0.25 -0.5 -0.75 Figure 4 The above results follow critically from the linearity of the A and B subsystems together with the linearity of S and the fact that S passes through the origin. Consider Figure 4. Notice trajectories passing through the right side of S, where x > 0. It is easy to verify that all paths leave this segment of S at the same angle and that the magnitude of the vectors diminishes toward zero as x drops toward zero. At the other end of S, where x < 0, the vectors are directed 180 degrees from the right-hand side vectors, and their magnitudes increase as x → -∞. We are now ready to specify our hybrid dynamic system: 10 x (t) x(t) A if (x, y) Sa {(x, y) | y k x} , y (t) y(t) x (t) x(t) B if (x, y) Sb {(x, y) | y k x}, and y (t) y(t) (W) x (t) x(t) B if (x, y) S and sgn s Az i sgn s Bz i 1 y (t) y(t) x (t) x(t) A if (x, y) S and sgn s Az i sgn s Bz i 1 y (t) y(t) System (W) has the property that when a trajectory reaches S, its flow is instantly handed over to the subsystem toward which it is heading. In other words, the “receiving” system determines the flow at z on S. We turn now to a brief review of results from the theory of isolated linear systems which are essential to establishing our first main finding. II. Simple Linear Non-hybrid Systems We begin by defining some notation and exploring the means by which a conventional (non-switching) linear autonomous differential equation system in R2 can be transformed into a companion difference equation system. For the moment, assume that the domain of A is all of R2. Thus we have system (1): (1) a a x (t ) x(t ) A , where A 11 12 . y (t ) y(t ) a21 a22 The aij are assumed to be real with at least one non-zero entry. Assume for the moment that the eigenvalues of A are real, and consider a line, L, which contains the origin and an eigenvector of A. In this case, all trajectories beginning from points on L will remain on L, and no points originating off L will ever cross L. In 11 contrast, if the eigenvalues of A are complex or complex conjugates, then trajectories on the non-hybrid, stand alone A subsystem spiral around the origin and cross L infinitely many times. Though we are not yet adding a B subsystem and exploring regime switching, it should be clear that the opportunities for switching are quite limited when the eigenvalues of A are real. Thus, switching is much more problematic and interesting when the eigenvalues contain imaginary parts. In the interest of studying the more interesting case, we will assume: Assumption R: The eigenvalues of A (and, with suitable changes in notation, later B) are complex conjugates, λA1 = αA + βA·i and λA2 = αA - βA·i (with βA > 0 and i = 1 ). (Where clarity is not compromised, we will simplify our notation in this section by dropping the A subscript as long as it is clear that we are referring to matrix A and its associated eigenvalues, eigenvectors, and other related terms and parameters.) Define the real matrix V such that 1 v V 11 i v12 v21 1 v22 i is an eigenvector of A corresponding to λ1 = α + β i. Be sure to note that all vij are real numbers. Now define the real and imaginary parts of the eigenvector by v v V1 Re( V) 11 and V2 Im( V) 21 . v12 v22 Then the general solution for the system is given by: (2) x(t ) [(c1 V1 c 2 V 2)Cos( t ) (c 2 V1 c1 V 2) Sin ( t )]et , y (t ) 12 where the scalars c1 and c2 are determined by the initial values of x and y, denoted x0 and y0. In some applications, it is more convenient to write equation (2) as: (2' ) x(t ) c11 c12 [ Cos( t ) Sin ( t )]et , y (t ) c 21 c 22 where c11 c1 v11 c 2 v 21 c 21 c1 v12 c 2v 22 c12 c 2 v11 c1 v 21 c 22 c 2 v12 c1 v 22. The system is asymptotically stable if α < 0, unstable if α > 0, and has closed elliptical orbits when α = 0. While still limiting ourselves to the behavior of a single system (A) without switching, let us establish a useful fact about the time required to complete a 180 degree (π radians) revolution about the origin. We will look at the time required to move from one point on the line L = {(x, y)| g x – y = 0} at time t = 0, to the next point where the path hits the line. Whenever (x(t), y(t)) is on L, we have y(t) = g·x(t), which is equivalent to (4) [(c1 v12 c 2 v 22 )Cos( t ) (c 2 v12 c1 v 22 ) Sin ( t )]et g[(c1 v11 c 2 v 21 )Cos( t ) (c 2 v11 c1 v 21 ) Sin ( t )]et , or (5) [(c1 v12 c 2 v 22 ) g (c1 v11 c 2 v 21 )]Cos( t ) [(c 2 v12 c1 v 22 ) g (c 2 v11 c1 v 21 )]Sin ( t ) 0. Without loss of generality, suppose that (x0, y0) is on L. Now since, x0 = c1 v11 c2 v21 , and y0 = c1 v12 c2 v22 , it follows that the first term in equation (5), [(c1 v12 c2 v22 ) g(c1 v11 c2 v21)] , equals zero. Thus we can simplify (4) and conclude that a trajectory emanating from (x0, y0) crosses L whenever 13 (5) [(c2 v12 c1 v22 ) g(c2 v11 c1 v21)]Sin( β t) 0. This implies that a path crosses L when Sin(βt) = 0. Since Sin(h π) = 0 for all integer values of h, we see that the trajectory coming from (x0, y0) crosses L when t = 0, π/β, 2π/β, 3π/β,… It follows that the path (x(t), y(t)) always takes the same amount of time as it spirals from one side of L to another. If the path “ticked” every time it crossed L, it would sound like a metronome. Consider the path of x(t): x(t ) [(c1 v11 c2 v21 )Cos( t ) (c2 v11 c1 v21 )Sin( t )]e t . As t advances from 0 to π/β to 2π/β to 3π/β, Cos(βt) alternates from 1 to -1 to 1, so the value of x(t) at successive crossings of L is given by x(t ) [(c1 v11 c2 v21)( 1) t/ ]e t x0(1) t/ e t t 0, / , 2 / , 3 / , ... If we change our time unit from t to T = tβ/π, then (x(t), y(t)) re-crosses L whenever T = 0, 1, 2, 3,… Following Poincare’s idea of a “section,” this fact can be utilized to derive a difference equation on L for x which takes the form (6) απ β x(T) e x(T 1) (1) e T απT β x0 T 1, 2, 3... This difference equation yields successive values of x(.) as the trajectory crosses and recrosses L. Clearly, with β > 0, α < 0 means that x(T) → 0 as T → ∞, which is the same as the stability condition for the continuous differential equation system. With obvious changes, it is easy to show that (7 ) απ β y(T) e y(T 1) (1) e T απT β y0 for y(T) on L. Thus, the companion discrete system to (1) is 14 (8) x(T ) e y(T ) 0 T T x ( T 1 ) (1) e 0 y (T 1) e 0 x0 T y 0 . (1)T e 0 Note that the origin is an asymptotically stable equilibrium to the difference system (8) if and only if α < 0, and that the differential equation system defined by A in (1) also has a stable equilibrium at the origin if and only if α < 0. This means that the differential equation system has exactly the same stability requirement as its companion difference equation system. One other point of interest: With β > 0, a system that begins at (x0, y0) with t = T = 0 will complete a 180 degree revolution around the origin at t = π/β (or T = 1) with both x0 and y0 then equal to eαπ/β times their original values. Thus, if α < 0 (α > 0), each 180 degree revolution ends closer to (further from) the origin than its starting point. And the “strength” of the stability (or instability) will be governed by the magnitude of the ratio of α to β. This will be useful later. As an aid to intuition, Figure 5 provides a sketch of the graph of the differential equation solution (x(t), y(t)) together with dots for each point visited by the companion .4 4 and the initial difference equation with initial. The assumption is that A 2 .3 value is (1, 1). As we will see in the next section, these facts are very useful in the analysis of switching systems like (W). The above discussion dealt with repeated crossings of a line L by a single linear autonomous system. In the following section, we return to a discussion of switching on the line S, but now we know how long each subsystem takes between the time it initiates 15 governance of z(t) and the time it surrenders control to the other subsystem. And, more importantly, we know how much closer (further) we are to (from) the equilibrium at each switching time. L t = 0; T = 0 t = 2/b; T = 2 t = /b; T = 1 Figure 5. III. A Necessary and Sufficient Condition for Hybrid Stability The main result now comes easily. Theorem W: Given the WAD and R assumptions, system (W) has a unique asymptotically stable equilibrium at (0, 0) if and only if αB/βB + αA/βA < 0. Proof: Consider the path (x(t), y(t)) from the initial point (x0, y0) on S, and without loss of generality, assume that (x(t), y(t)) initially moves from (x0, y0) into Sa. We know that (x(t), y(t)) remains in Sa and is governed by A until t = π/βA. At this time a A x(.) e A a A x0 and y(.) e A y0. Given our WAD assumption, system B then takes over and drives (x(t), y(t)) through Sb and back onto S, hitting S at time t = π/βA + π/βB, 16 B at which time x( y( ) (e )( e B A B A A ) x0 e M x0, where M B A . B A And ) e M y 0. B A Let T = t /( π /βA + π /βB), which is the period for a complete 360 degree rotation from (x0, y0) on S, then through Sa, across S, through Sb, then back to S. We now have the difference equations x(T ) e M T x0 and y(T ) e MT y0 , T = 0, 1, 2, 3…, which give the x and y co-ordinates of every other point of intersection between the S and the (x, y) trajectory as determined by the switching system (W). Thus, (x(T), y(T)) → (0, 0) as T→ ∞ if and only if M < 0. q.e.d. Thus, since βA and βB are positive, stability of the two subsystems (i.e., αA, αB < 0) is a sufficient condition for the stability of (W). But interestingly, it is not necessary that both subsystems be stable—all that is necessary for stability of W is that M be negative. If, for example, A is “very stable,” meaning αA < 0 with |αA|/βA being “large,” then B can be “weakly” unstable, meaning αB > 0 with αB/βB being “small” in the sense that αB/βB < |αA|/βA. Note that αi/βi plays a role in the stability of the hybrid system, whereas in a nonhybrid system only αi matters for stability. In non-hybrid systems, the imaginary parts of the eigenvalues (the βi) only determine whether or not the solution path rotates around the equilibrium. With the hybrid, the situation is more complex. Recall that the β i term determines the average angular velocity of the solution path, it governs the length of time it takes a subsystem to rotate 180 degrees from a starting point on S at, say, t1 to the next arrival on S, at t2. Specifically, the time required is π/βi, and the system arrives on S at t2 at a distance from (0, 0) which is equal to e i / i times its distance at t1. If αi > 0, the 17 system will be further from the origin when it re-intersects S at time t2. But the smaller βi happens to be (with a given αi), i.e., the more time the system takes between t1 and t2 in the unstable region, the further the path will be from the origin at t2. So a small βi coupled with αi > 0 can lead to hybrid instability, whereas a large βi and resulting quick transition time through the i region may still allow hybrid stability with one αi being positive. (The above implies that W has a unique, continuous solution z(t, z(0)), relying on the fact that linear autonomous differential equations have unique, continuous solutions. See Guckenheimer and Holmes, p. 8. Note that we would run into trouble, however, if Az disagreed directionally with Bz on S. But even then, other plausible assumptions can yield unique continuous solution paths. See Ploycarpou and Ioannou’s discussion of Filippov solutions, 1993.) The above result depends critically upon the assumption that the eigenvalues of A and B are complex conjugates. Suppose, for example, that the eigenvalues of A and B are real and distinct, with the eigenvalues of A given by λA1 and λA2 and for B by λB1 and λB2. Suppose also that λA1 < λA2 < λB1 < 0 < λB2. Then there will be an eigenvector for B associated with λB2 giving a line through the origin with flow away from the origin in two directions which are 180 degrees apart. There is then no possible position for S which prevents the hybrid from being unstable. So with real distinct eigenvalues, stability requires λA1, λA2, λB1, λB2 < 0. IV. Alternative Assumptions on the Nature of the Switching Surface The main result at this point depends critically upon the assumptions regarding S, i.e., that S is linear, that it passes through a unique equilibrium point that is common to 18 the A and B subsystems, and that the systems “agree” on how W should move on S. These assumptions are certainly defensible in many cases (see Eckalbar 1985), but it is interesting to see how the dynamics of the hybrid system are affected by other assumptions. We begin with the alternative assumption that S is piecewise linear. It is known that when our initial assumptions on S are relaxed, two asymptotically stable subsystems can be patched together to form an unstable hybrid system and that two unstable systems can patch to a stable hybrid. (Utkin, 1977.) Many other interesting outcomes are possible. We begin with a pair of examples from Branicky (1998) which illustrate the first two cases. In the following we will assume that S is piecewise linear, with the switching line bounding the first quadrant, running horizontally along the x axis when x > 0 and vertically along the y axis from x = 0 upward. That is, S = {(x, y)| x ≥ 0 and y = 0} U {(x, y)| y ≥ 0 and x = 0}. Furthermore, we will assume that B is the operative subsystem in quadrant 1, while A is operative elseqhere. Let our piecewise linear system be governed by: 1 10 1 100 and B . ( PL1) A 100 1 10 1 Note that on the vertical leg of S, the two subsystems agree that the flow should be into quadrant 1, and on the horizontal leg of S, they agree that the flow should be into quadrant 2. For instance, at (0, 1), the A subsystem has (x , y ) (10, 1) , while the B subsystem has (x , y ) (100, 1) . Thus, both systems “push” from the vertical leg of S into quadrant 1, but there is a discontinuity in the magnitude and exact direction of the push at the border. The details of the process being modeled should dictate whether the 19 instantaneous flow on S should be governed by A, B, or some combination of the two. As before we assume that the “receiving” system takes over on S. The eigenvalues for both A and B are λ = -1 ± 101.5∙i, so both systems have asymptotically stable spiral points at (0, 0). Also, both systems have ellipse-like orbits, but the orbit on A has its “major axis” oriented vertically, while B’s is oriented horizontally, as you see in Figure 6. A Sub-system B Sub-system Figure 6. The resulting hybrid system together with the switching boundary is shown in Figure 7. The hybrid is unstable in spite of the fact that the two subsystems are stable. Speaking loosely, this is due to: (i) the degree of eccentricity of the ellipse-like orbits, (ii) the difference in the orientation of the “major axes” of the two systems, and (iii) the locations and dimensions of the domains of the two subsystems. We will take these points up in a moment, but first let us note that it is also possible to create an example in 20 which two unstable systems patch together to form an asymptotically stable hybrid system. This would be the case, for example, if we reversed the flow used in the previous example (by using –A in place of A and –B in place of B). This will yield trajectories like those shown in Figure 7, except that the direction of flow is reversed. The reader can verify that the –B subsystem operating in quadrant 1 now forces the hybrid ever closer to the origin with each revolution. Now let us consider the factors (i) through (iii) mentioned above. S -2 2 4 6 8 S -5 -10 -15 -20 -25 Hybrid System Figure 7 (i) When an orbit is strongly “eccentric,” there are intervals during which the distance to the equilibrium is increasing substantially. That is true for subsystem A in quadrants 2 and 4, for example. If the subsystem is stable, then these periods of increasing distance to the equilibrium are overcome by subsequent periods of decreasing distance, so that the subsystem is always closer to the equilibrium after 180 degrees of 21 revolution. By contrast, a less eccentric, more circular, orbit does not have periods where it moves strongly away from the equilibrium. (ii) Part of the reason for the instability of the hybrid system in our example is that the “major axes” of the two subsystems are orthogonal. If you combine this with the eccentricities, you see that the source of the problem is that switching causes the convergent motion of the A subsystem to shut off in quadrant 1, substituting the divergent motion of the B subsystem. The result is that with each rotation through the horizontal axis, the hybrid system is further from the origin. If the major axes were more closely aligned, or if the eccentricities were less, this problem would be less serious. (iii) If we continue to assume for the moment that the switching border is piecewise linear, then the smaller the angle between the two legs of the switching border in quadrant 1, i.e., the smaller the domain of applicability of the troublesome B subsystem, the lower the likelihood that it can produce instability in the hybrid when both subsystems are stable. Consider the hybrid system in our current example, Figure 7. The angle between the two legs of S is 90 degrees, and this gives the B subsystem maximum opportunity to displace the trajectory away from the equilibrium. If we reduce the angle between the two legs gradually by rotating the horizontal leg of S counterclockwise through the origin, we will reach an angle where the phase space of the hybrid system becomes dense with closed orbits, one of which is shown in Figure 8. This figure is drawn in the following way: System B is given initial point (0, 1) and it is run forward in time from t = 0 to t = (π/2βB), where the semi-path strikes the horizontal axis at x = 3. Then the A system is run backward in time from the point (0, 1) to t = -2(π/βA), where the path hits the y-axis again. Since A is stable, this occurs above (0, 1), where (x, y) ≈ (0, 22 1.22). Also, the path of the A subsystem (running backward) crosses the horizontal axis at (x, y) ≈ (0, .367). Given the continuity of the paths, they must cross somewhere in quadrant 1, as shown by point W in Figure 8. Thus, if the lower leg of the switching line, labeled S1, runs through point W as depicted, if B operates in the narrow wedge between S0 and S1, and if the A subsystem operates elsewhere, then there is a closed orbit running under B from (0, 1) to W and thence under A back to (0, 1). In fact, for any μ > 0, there will be a closed orbit running under B from (x, y) = (0, μ), switching to A on S1, and returning to (0, μ). If it were possible to control the location of S1, one could make the hybrid system asymptotically stable by rotating S1 slightly counterclockwise from the position shown in Figure 8. S0 S1 W B sub-system A sub-system Figure 8. The conclusion is that with piecewise linear switching borders almost anything can happen, even when the two subsystems are individually stable and share a common equilibrium. V. When Switching Happens Gradually Throughout a Region Up to this point we have considered one-dimensional switching lines, where one subsystem is fully operative on one side of the line, and the other subsystem is fully 23 operative on the other side. In some applications it may be more appropriate to consider two-dimensional switching regions within which both subsystems simultaneously influence the path. Consider an epidemic model of the spread of a newly mutated virus. If policy makers and health officials fail to take action and the general population fails to change its behavior, the dynamics of the system may drive it to an endemic equilibrium. But if the spread of the virus causes a sufficient level of alarm, society may wage all-out war on the virus, and this may give rise to a dynamic that yields an equilibrium rate of infection which is quite low. And between these extremes of passivity and extreme mobilization, intermediate levels of effort may be dedicated to fighting the spread of the virus. Thus we might model this viral epidemic dynamical system using two subsystems (one with no social mobilization to fight the spread of the virus and one with maximal effort) and a switching region within which the quantity of resources devoted to fighting the epidemic is a function of the present state of the system. Or one can imagine an analogous economic model, wherein policymakers, businesses and households behave according to one set or rules when the system is near a full-employment equilibrium, follow another set of rules when there is a serious recession, and behave in an intermediate fashion when conditions are neither dire nor ideal. The range of possible models is, of course, immense, but we can learn a great deal by careful examination of an example. Consider the following Switching Region (SR) system: 24 ( SR) ( A) x (t ) .4 4 x(t ) 10 if ( x, y ) Sa {( x, y ) | x 24}, y (t ) 2 .3 y (t ) 20 B x (t ) .4 3 x(t ) 40 if ( x, y ) Sb {( x, y ) | x 28}, and y (t ) 2 .5 y (t ) 8 x (t ) .4 4 x(t ) 10 .4 3 x(t ) 40 k (t ) (1 k (t )) y (t ) 2 .3 y (t ) 20 2 .5 y (t ) 8 if ( x, y ) S {( x, y ) | 24 x 28}, where k (t ) 7 .25 x(t ). Note that k(t) varies from 1 when x(t) = 24 to 0 when x(t) = 28. This means that inside the switching region, subsystem A dominates toward the left, B dominates toward the right, and the relative influence of the A subsystem versus the B subsystem varies continuously across the switching region according to the distance between x(t) and the left and right switching region borders Sl and Sr, respectively. Furthermore, x (t) and y (t) are continuous as a path moves between Sl and Sr, which insures continuity of the vector field. Continuity can be seen easily if we define the continuous function k(t) such that: 1 k (t ) 7 .25 x(t ) 0 if x(t) 24 if 24 x(t) 28 28 x(t) and then re-write (SR) as x (t ) .4 4 x(t ) 10 .4 3 x(t ) 40 k (t ) (1 k (t )) , y (t ) 2 .3 y (t ) 20 2 .5 y (t ) 8 ( SR' ) since the right side of (SR') is seen to be merely the sum and product of continuous functions. Figure 8 is offered to help fix ideas. The switching region is a vertical column 25 bounded by x = 24 on the left and x = 28 on the right. These lines are marked Sl and Sr. On the left side of the switching region, the A subsystem is operative. The A subsystem has a unique, locally asymptotically stable, spiral point, with a clockwise flow toward the equilibrium Ea = (x, y) = (10, 20). The B subsystem operates to the right of the switching region, and it too has a unique locally asymptotically stable equilibrium at (40, 8), which is a spiral point with surrounding counterclockwise flow. There is also a saddle point, Es, in the “mixing region” S, i.e., between Sl and Sr, at x ≈ 26.44 and y ≈ -58.25, and an unstable limit cycle shown as the closed path running from Sb to S and back to Sb. Paths which originate inside the limit cycle spiral into the B subsystem equilibrium, Eb, with the force on the trajectories sometimes coming from B alone and sometimes oscillating from B to the mixed system in S. Figure 9 26 The interior of the limit cycle constitutes the basin of attraction of the equilibrium Eb. All paths other than those paths which originate on or inside the limit cycle, at the saddle point, or on the stable manifold of the saddle point approach the A subsystem equilibrium, Ea. The existence of the unstable limit cycle can be verified by a careful examination of the trajectories in the neighborhood of the cycle. Figure 10 shows a dashed Poincare section line Σ, which drops vertically from the Eb equilibrium. The local flow at points on Σ is everywhere left to right as time increases. Also shown are segments of two trajectories that originate on Σ: one starting at b0, spiraling inward toward Eb, and making its first return to Σ at b1, and the other starting at c0, spiraling through Sb, crossing into S, re-entering Sb, and then returning to Σ at c1. We define set P to be the set enclosed by the trajectory from b0 to b1 together with the line segment on Σ from b0 to b1. Set Q is a “disjointed annulus” bounded on the inside by P and on the outside by the trajectory from c0 to c1 and the line segment on Σ from c0 to c1. We let set Q include its borders. Let z0 = (x0, y0) be any point in Q, and set t such that z(t) = z0 when t = 0. z(t) is the path through z0, where t (-∞, ∞). Consider this path as t runs backward from 0 toward - ∞. First, notice that the path z(t) cannot wander backward in time from set Q into set P, since this would require either crossing the trajectory from b0 to b1 or crossing left to right on the line segment from b0 to b1 as time decreases. But we have already seen that the flow is everywhere left to right on Σ as time increases. Hence, paths cannot move backward in time from set Q to set P. Similarly, no path beginning at a point in Q can move backward in time to 27 cross the outer boundary of Q, since that would imply either that trajectories cross or that there is a violation of the known flow on the line segment from c0 to c1. The upshot of this is that Q is shown to be a negatively invariant set, i.e., if z0 Q, then z(t) Q for all t (-∞, 0]. Since set Q is closed, bounded, and negatively invariant, we can apply Theorem 1 from Hirsch and Smale (p.251): A non-empty compact set K that is positive or negative invariant contains either a limit cycle or an equilibrium. And finally, since there is no equilibrium in A, there must be a limit cycle, which in this case is an α-limit cycle. Models of this type could have novel economic applications. For example, Axel Leijonhufvud has proposed that economic systems might exhibit “corridor phenomena,” y Eb P b1 x Q b0 Q c0 c1 Figure 10. 28 which might be interpreted as a set of conditions wherein the system has two equilibria, one “better” than the other under some metric. According to Leijonhufvud, small displacements from the good equilibrium would be followed by convergence back to the good equilibrium. These displacements were said to leave the system within its “corridor,” where the system is self-adjusting. Large shocks on the other hand would send the system on a path to the inferior equilibrium. Under Leijonhufvud’s argument, liquidity constraints played a role in the corridor phenomena. If traders hold liquid balances in accordance with the anticipated strengths and durations of disruptions to their ability to sell commodities, they may maintain effective demand in the face of normal shocks to the demands for the things they sell. This will help the system self-correct back to the good equilibrium. But if the shock is large or long enough to exhaust liquid buffer stocks for traders who cannot effectuate their intended sales, then this will push the system outside its corridor, and it will move off to an inferior equilibrium. Leijonhufvud did not propose an analytical model, and the above summary of his ideas does not constitute a model either, but the bi-stability displayed in our example has a certain resonance with his idea. If Eb is the good equilibrium, it is easy to see that small displacements from Eb give rise to paths back toward Eb, while larger displacements (those outside the limit cycle or a stable manifold of the saddle) lead to Ea instead. VI. Conclusion We have established necessary and sufficient conditions for the stability of linear autonomous hybrid differential equation systems in R2. Though several sufficient conditions have been known for years (Ito 1980, Eckalbar 1981, Branicky 1997), our 29 finding here is novel. We have also created an example that explores some features of hybrids with two-dimensional switching regions rather than one-dimensional switching lines. This has the twin advantages of having a continuous vector field plus plausible (but as yet unexplored) structure. To this author, the last point seems to be the most interesting for further research. References di Bernardo, M., P. Kowalezyk, and A. Nordmark, “Sliding Bifurcations: A Novel Mechanism for the sudden Onset of Chaos in Dry-Friction Oscillators,” International Journal of Bifurcation and Chaos, 13(10), pp.2935-2948, October 2003. Bignami, F., Luca, C., Weinrich, “Complex Business Cycles and Recurrent Unemployment in a Non-Walrasian Macroeconomic Model,” Journal of Economic Behavior & Organization, Vol. 53, Issue 2, pp. 173-191, February, 2004. Branicky, Michael S., “Stability of Hybrid Systems: State of the Art,” Proceedings of the 36th Conference on Decision & Control, San Diego, 1997. Branicky, Michael S., “Multiple Lyapunov Functions and Other Analysis Tools for Switched and Hybrid Systems,” IEEE Transaction on Automatic Control, Vol. 42, No. 4, pp. 475-482, April 1998. 30 Caballe, J., Jarque, X., and E. Michetti, “Chaotic Dynamics in Credit Constrained Emerging Economies,” Journal of Economic Dynamics and Control, Vol. 30, Issue 8, pp. 1262-1275, August, 2006. Eckalbar, J., "Stable Quantities in Fixed Price Disequilibrium," Journal of Economic Theory, Vol. 25, No. 2, pp. 302-313. 1981. Eckalbar, J., “Inventory Fluctuations in a Disequilibrium Macro Model,” The Economic Journal, Vol. 95, pp. 976-991, December 1985. Guckenheimet, J, and P. Holmes, Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields, Springer-Verlag, New York, 1983. Ito, Takatoshi, "Disequilibrium Growth Theory," Journal of Economic Theory, vol. 23, pp. 380409, 1980. Leijonhufvud, A., “Effective Demand Failures,” The Swedish Journal of Economics, Vol. 75, No. 1, Stabilization Policy, pp. 27-48, March 1973. Milgrom, M., “A Modification of the Newtonian Dynamics as a Possible Alternative to the Hidden Mass Hypothesis,” The Astrophysical Journal, 270, pp. 365-370, July, 1983. 31 Polycarpou, M. and P. Ioannou, “On the Existence and Uniqueness of Solutions in Adaptive Control Systems,” IEEE Transactions on Automatic Control, Vol. 38, No. 3, pp. 474-479, 1993. Stewart, D. and M. Anitescu, “Optimal Control of Systems with Discontinuous Differential Equations,” Preprint ANL/MCS-P1258-0605, Math and Comp. Sci. Division, Argonne Natl. Lab., 2005. Utkin, V., “Variable Structure with Sliding Modes,” IEEE Transactions Automatic Control, 22(2), pp. 212-222, 1977. Varian, H., “The Stability of a Disequilibrium IS-LM Model,” Scandinavian Journal of Economics, 1977. 32