CDS 101 Precourse Phase Plane Analysis and Stability Melvin Leok Control and Dynamical Systems California Institute of Technology Pasadena, CA, 26 September, 2002. mleok@cds.caltech.edu http://www.cds.caltech.edu/ mleok/ Control and Dynamical Systems
2 Introduction Overview Equilibrium points Stability of equilibria Tools for analyzing stability Phase portraits and visualization of dynamical systems Computational tools
3 Equilibrium Points Equilibrium and Stability Consider a pendulum, under the influence of gravity. An Equilibrium Point is a state that does not change under the dynamics. The fully down and fully up positions to a pendulum are examples of equilibria.
Equilibrium and Stability Equilibria of Dynamical Systems To understand what is an equilibrium point of a dynamical systems, we consider the equation of motion for a pendulum, 4 θ + g L sin θ = 0, which is a second-order linear differential equation without damping. We can rewrite this as a system of first-order differential equations by introducing the velocity variable, v. θ = v, v = g sin θ. L
Equilibrium and Stability Equilibria of Dynamical Systems The dynamics of the pendulum can then be visualized by plotting the vector field, ( θ, v). 5 The equilibrium points correspond to the positions at which the vector field vanishes.
Equilibrium and Stability Stability of Equilibrium Points A point is at equilibrium if when we start the system at exactly that point, it will stay at that point forever. Stability of an equilibrium point asks the question what happens if we start close to the equilibrium point, does it stay close? If we start near the fully down position, we will stay near it, so the fully down position is a stable equilibrium. 6
Equilibrium and Stability Stability of Equilibrium Points If we start near the fully up position, the pendulum will wander far away from the equilibrium, and as such, it is an unstable equilibrium. 7
Lyapunov Stability Types of Stability An equilibrium point is Lyapunov Stable if whenever we start sufficiently close to the equilibrium, we will stay close to the equilibrium. 8 Examples of Lyapunov stable and unstable behavior
Asymptotic Stability Types of Stability An equilibrium point is Asymptotically Stable if it is Lyapunov stable, and for any solution that starts sufficiently close to the equilibrium point will converge to the equilibrium point. 9
Tools for Analyzing Stability Potential Energy near the Equilibrium When the system only experiences forces that can be expressed in terms of a potential energy, looking at the potential energy near the equilibrium can give one information about the stability of that point. 10 Energy minimum Energy maximum Stable Unstable More generally, such stability analysis methods are known as Lyapunov Function methods.
Eigenvalue Analysis Tools for Analyzing Stability An analytic method of analyzing stability is related to Eigenvalue Analysis in linear algebra. As an example, consider the following scalar linear differential equation, ẋ = ax, Which we readily verify to have the solution, x(t) = x 0 e at. Notice that the behavior of the equilibrium at the origin, x = 0, depends on the value of the parameter a. 11
Tools for Analyzing Stability Eigenvalue Analysis If a > 0, we see that the solution diverges from 0, and the origin is unstable. 12 25 20 15 10 5 0 0 0.5 1 1.5 2 2.5 3
Eigenvalue Analysis Tools for Analyzing Stability If a < 0, we see that the solution converges to 0, and the origin is stable. 1 13 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.5 1 1.5 2 2.5 3
Eigenvalue Analysis Tools for Analyzing Stability In general, if we are given a system of coupled first-order linear differential equations of the form, ẋ = Ax, where x R n is a n-vector, and x R n n is a n n matrix, the stability of an equilibrium can be analyzed by determining the eigenvalues of the matrix A. 14
Tools for Analyzing Stability What about nonlinear systems? We can do this analysis for linear systems of differential equations, but what happens in the case of nonlinear systems of differential equations, which we may not be able to solve exactly? Notice that the notion of stability is only concerned with what happens in a small neighborhood of the equilibrium point, and as we zoom in closer and closer, the vector field starting looking like that of a linear system, so we do the obvious thing: Linearization: We approximate the nonlinear system by a linear system. Eigenvalue Analysis: We evaluate the eigenvalues of the linearization to obtain information about the stability of the nonlinear system. 15
Visualizing Dynamical Systems Hamiltonian (Energy) Methods The pendulum example we considered is special in that it is conservative, and hence, by looking at level sets of the energy, we can also get a sense of how the system behaves. 16 0.5 y y cos(x) 10 8 6 4 2 0 2 4 2 0 y 2 4 6 4 2 x 0 2 4 6
Visualizing Dynamical Systems Phase Portraits Instead of plotting position or velocity against time, in a timeseries plot, we can often gain insight by a Phase portrait, where we plot velocity against position as a parametric plot. Returning to the pendulum example, we have the following phase portrait, 17
Phase Portraits Visualizing Dynamical Systems Periodic solutions show up as closed orbits. We can see from the nearby trajectories whether a equilibrium point is stable or unstable. Phase portraits allow us to get a sense of the different types of behavior which may occur in a dynamical system. In the pendulum example, we clearly see the distinction between oscillating modes, and whirling modes. 18
19 Phase Portraits Visualizing Dynamical Systems It might seem to you that the whirling motion of a pendulum is a periodic orbit, but how do we see that from the phase portrait? If we recall that we need to make the identification θ = π = π, we can wrap the phase plane into a cylinder, and the whirling modes become closed curves as expected of periodic orbits.
More Phase Portraits Visualizing Dynamical Systems Consider the more complicated example of a damped pendulum. The phase portrait is more complicated, and is shown below, 20 θ = ω ω = sin(θ) D ω D = 0.1 4 3 2 1 ω 0 1 2 3 4 10 8 6 4 2 0 2 4 6 8 10 θ
21 Visualizing Dynamical Systems Extended Phase Portraits The time evolution of a damped pendulum is more interesting. We can combine time-series plots and phase portraits, by looking at the Extended Phase Portrait, which is a parametric plot of position, velocity and time. The time-series and phase portrait are projections of the extended phase portrait. t 90 80 70 60 50 40 30 20 10 0 2 1 ω 0 1 2 2 1 θ 0 1 2 3
MATLAB and PPLANE6 Computational Tools A good program for phase plane analysis is PPLANE6, which is written for MATLAB. The homepage is, http : //math.rice.edu/~dfield/ 22
23 MATLAB and PPLANE6 Computational Tools
Computational Tools Numerical Integration How does a computer compute the solution of a nonlinear differential equation? Given the equation, ẋ = f(x), we could think of computing the solution at a discrete set of time intervals, spaced at t = 0.1. We could then make the approximation, ẋ = x t, from which we have, x n+1 x n = x = tf(x n ). This method is known as the Forward Euler method. 24
Numerical Integration Computational Tools A more accurate and stable numerical integration algorithm is the Runge-Kutta method, which is very popular. It is given by, k 1 = f(x n ) t k 2 = f(x n + k 1 /2) t k 3 = f(x n + k 2 /2) t k 4 = f(x n + k 3 ) t x n+1 = x n + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ) Numerical integration algorithms in software like MATLAB are more sophisticated, but are based on algorithms like the Runge- Kutta method above. 25
26 Resources Related Courses at Caltech CDS 140 Introduction to Dynamics CDS 201 Applied Operator Theory ACM 110 Introduction to Numerical Analysis Webpages Control and Dynamical Systems Homepage MATLAB Homepage PPLANE6 Homepage http : //www.cds.caltech.edu/ http : //www.mathworks.com http : //math.rice.edu/~dfield/
Control and Dynamical Systems