Stability: Linear Systems
Stability: Linear Systems
Linear Systems
The relationship between the input and output of a system is described as linear if the following conditions hold: Additivity: f (x + y) = f (x) + f (y) Homogeneity: f (x) = f (x) Systems which do not obey these rules are call non-linear systems. If the value of an equation, f (x), is not at zero when x is zero, then it needs to be translated rst. Thus, the equation y = mx + c needs to be translated by c rst before the linearity test can be made. Linear systems are much simpler to study and often theoreticians will linearize a system to make it amenable to mathematical analysis. Linear Models A linear dierential equation model is one where the right-hand sides are linear functions of the variables. For example: dx = 2x + 5 dy A convenience of linear dierential equation models is that they can be expressed compactly in matrix form: dx = Ax dt For example if A equals 1 1 4 2 then dx/dt dy/dt = 1 1 4 2 1 x y
or dx/dt = x + y dy/dy = 4x 2y is a linear dierential equation model. A useful property of linear systems is that we can derive the analytical solution, that is we dont have to simulate a linear system on the computer to get the solution. Without going into the math it is possible to show that the solution to a linear dierential equation model is a sum of exponentials:
n
xi (t) =
j=1
ij ej t vj
For a 2 by 2 system the analytical solution would look like x1 (t) = 11 et v1 + 12 et v2 x2 (t) = 11 et v1 + 12 et v2 (1)
The solution for the earlier example and assuming initial conditions x(0) = 2 and y(0) = 3 is: x1 (t) = e2t v1 + e3t x2 (t) = e2t v1 4e3t The solutions contain three kinds of constants, the s the s (or exponents) and the vs. What is interesting is that the eigenvalues of the matrix A are the exponents () that appear in the solution. For example, the eigenvalues of 1 1 4 2 are 2 and 3 and correspond to the exponents in the solution. Note that the eigenvalues can be complex numbers and could therefore have real and imaginary parts, in this example they are simple real numbers.
Stability
Stability is determined by whether a small perturbation in a variable around steady state diverges from the steady state. If a small perturbation diverges 2
then the steady state is considered unstable. If the perturbation returns to the steady state, then the state is considered stable or the eigenvalues of the A matrix. The steady state solution of a linear system can be found by letting t in equation (1), the time, go to innity and evaluating the left-hand side. It should be evident that if all the exponents are negative then the steady state approaches a xed point, whereas if even one of the exponents is positive, the solution will grow without limit. This observation allows us to determine the stability of a system by simply looking at the exponents of the solution. However, most interesting problems are not linear but are instead non-linear. The way to deal with non-linear models is to rst linearize a non-linear system so that we can treat it as a linear system from which we can compute the exponents. Linearization Linearization allows us to approximate a non-linear equation with a linear equation in the vicinity of an operating point. Consider a function, y = f (x). Lets say we know the derivative, f /x of this equation and we know the value of y at some operating point, xo . How can we compute y at a small distance away from xo , say xo + dx? A linear approximation to compute y at xo + dx would use the equation f (xo + dx) = f (xo ) + f dx x
This is termed a Taylor expansion to the rst term. If dx = x xo where x is the new x we wish to compute y at, then f (x) = f (xo ) + f (x xo ) x
Figure 1 portrays the equation f (x) and its linearization for a sin function. Let us investigate the properties of a two dimensional dierential equation model: dx = f (x, y) dt dy = g(x, y) dt 3
Linear Approximation
1 yaxis
sin(x)
0 xaxis
Figure 1: Taylor expansion to the rst term At steady state: f (xs , ys ) = 0 g(xs , ys ) = 0 where xs and ys are the steady state values for the variables, x and y. Consider a small disturbance around the steady state, i.e x = x xs and y = y ys or x = xs + x and y = ys + y Let us investigate the evolution of this disturbance by looking at the rate of change of x and y, i.e d(x)/dt and d(y)/dt. Dierentiating x = x xs and y = y ys with respect to time yields: d(x) dx dxs = dt dt dt d(y) dy dys = dt dt dt 4
But since dxs /dt and dys /dt both equal to zero d(x) dx = = f (x, y) = f (xs + x, ys + y) dt dt d(y) dy = = g(x, y) = f (xs + x, ys + y) dt dt Expand the following equation as a Taylor series around xs , ys . d(x) = f (xs + x, ys + y) dt d(y) = g(xs + x, ys + y) dt to f f d(x) = f (xs , ys ) + ((xs + x) xs ) + ((ys + y) ys ) dt xs ys d(y) g g = g(xs , ys ) + ((xs + x) xs ) + ((ys + y) ys ) dt xs ys But f (xs , ys ) = 0 and g(xs , ys ) = 0, therefore f d(x) = x + dt xs d(y) g = x + dt xs or in matrix form
d(x) dt f x
f y ys g y ys
d(y) dt
f y g y
x y
g x
The above linear dierential equation describes how the disturbance evolves. The 2 by 2 matrix is called the Jacobian matrix. Since this is a linear system, we can check whether the disturbance will grow or shrink by looking at the eigenvalues of the Jacobian. 5
Jarnac Notes To obtain the Jacobian matrix for a model, use the Jarnac command, p.Jac, where p is the name of the model. To compute the eigenvalues for a matrix use the command, eigenvalues (m), where m is the matrix. To determine the eigenvalues of a model, use the command println eigenvalues (p.Jac) Jacobian Matrix Eigenvalues p.Jac eigenvalues (m)
Example
Consider the following set of linear dierential equations: dx = 4x + y + 4 dt dy = 11x 6y dt
(2) (3)
Because this system is linear it admits only one steady state which can be determined by setting dx/dt and dy/dt to zero. x = 2/3 and y = 4/3 The Jacobian for this system is given by 4 1 12 6 The eigenvalues of the Jacobian are (calculated using Jarnac) are 5 and 7. Inspecting the chart (Figure 2), we see that at this steady state the system has a saddle point.
Terminology
Phase Plot and Vector Fields A phase plot is simply one system variable plotted against the other. Most often phase plots are drawn for two-dimensional system. A vector eld (See Figure 3) plots at regular intervals an arrow indicating the direction of change, that is for a change dx in the x direction, what is the change in dy (dx/dy). Nullclines For a 2-dimensional system with equations dx/dt = f (x, y) and dy/dt = g(x, y), the nullclines are the lines dx/dt = 0 and dydt = 0 on a phase plot, x versus y.
Figure 2: Stability of a linear system according to the distribution of eigenvalues for a two dimensional systems 8