<<

CDS 101 Precourse Analysis and Stability Melvin Leok

Control and Dynamical Systems California Institute of Technology

Pasadena, CA, 26 September, 2002.

[email protected] 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 and Stability ¥ Equilibrium Points • Consider a , 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 ex- amples of equilibria. 4 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, g θ¨ + sin θ = 0, L which is a second-order linear differential equation without damp- ing. • We can rewrite this as a system of first-order differential equations by introducing the velocity variable, v. θ˙ = v, g v˙ = − sin θ. L 5 Equilibrium and Stability ¥ Equilibria of Dynamical Systems • The dynamics of the pendulum can then be visualized by plotting the vector field, (θ˙, v˙).

• The equilibrium points correspond to the positions at which the vector field vanishes. 6 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. 7 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. 8 Types of Stability ¥ • An equilibrium point is Lyapunov Stable if whenever we start sufficiently close to the equilibrium, we will stay close to the equi- librium.

Examples of Lyapunov stable and unstable behavior 9 Types of Stability ¥ Asymptotic Stability • An equilibrium point is Asymptotically Stable if it is Lya- punov stable, and for any solution that starts sufficiently close to the equilibrium point will converge to the equilibrium point. 10 Tools for Analyzing Stability ¥ 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.

Energy minimum Energy maximum Stable Unstable • More generally, such stability analysis methods are known as Lya- punov Function methods. 11 Tools for Analyzing Stability ¥ Eigenvalue Analysis • An analytic method of analyzing stability is related to Eigenvalue Analysis in linear algebra. • As an example, consider the following scalar linear differential equa- tion, x˙ = ax, Which we readily verify to have the solution, at x(t) = x0e . • Notice that the behavior of the equilibrium at the origin, x = 0, depends on the value of the parameter a. 12 Tools for Analyzing Stability ¥ Eigenvalue Analysis • If a > 0, we see that the solution diverges from 0, and the origin is unstable.

25

20

15

10

5

0 0 0.5 1 1.5 2 2.5 3 13 Tools for Analyzing Stability ¥ Eigenvalue Analysis • If a < 0, we see that the solution converges to 0, and the origin is stable.

1

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 14 Tools for Analyzing Stability ¥ Eigenvalue Analysis • In general, if we are given a system of coupled first-order linear differential equations of the form, x˙ = Ax, where x ∈ Rn is a n-vector, and x ∈ Rn×n is a n × n matrix, the stability of an equilibrium can be analyzed by determining the eigenvalues of the matrix A. 15 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 hap- pens 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 by a linear system. Eigenvalue Analysis: We evaluate the eigenvalues of the lin- earization to obtain information about the stability of the nonlinear system. 16 Visualizing Dynamical Systems ¥ Hamiltonian (Energy) Methods • The pendulum example we considered is special in that it is con- servative, and hence, by looking at level sets of the energy, we can also get a sense of how the system behaves.

0.5 y y−cos(x)

10

8

6

4

2

0

−2 4

2

0

−2 4 6 0 2 −4 −2 y −6 −4 x 17 Visualizing Dynamical Systems ¥ Phase Portraits • Instead of plotting position or velocity against time, in a time- series 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, 18 Visualizing Dynamical Systems ¥ Phase Portraits • 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 . • In the pendulum example, we clearly see the distinction between oscillating modes, and whirling modes. 19 Visualizing Dynamical Systems ¥ Phase Portraits

• It might seem to you that the whirling motion of a pendulum is a periodic or- bit, 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. 20 Visualizing Dynamical Systems ¥ More Phase Portraits • Consider the more complicated example of a damped pendulum. The phase portrait is more complicated, and is shown below,

θ ' = ω D = 0.1 ω ’ = − sin(θ) − D ω

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 θ ' = ω D = 0.1 damped pendulum is more ω ’ = − sin(θ) − D ω interesting. 90 • We can combine time-series 80 70 plots and phase portraits, by 60 50 t looking at the Extended 40 30 Phase Portrait, which is 20 10

a parametric plot of posi- 0 tion, velocity and time. 2 1 3 0 2 1 −1 0 • −1 The time-series and phase −2 −2 ω portrait are projections of θ the extended phase portrait. 22 Computational Tools ¥ MATLAB and PPLANE6 • A good program for phase plane analysis is PPLANE6, which is written for MATLAB. The homepage is, http : //math.rice.edu/~dfield/ 23 Computational Tools ¥ MATLAB and PPLANE6 24 Computational Tools ¥ • How does a computer compute the solution of a nonlinear differ- ential equation? • Given the equation, x˙ = 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 x˙ = , ∆t from which we have, xn+1 − xn = ∆x = ∆tf(xn). • This method is known as the Forward . 25 Computational Tools ¥ Numerical Integration • A more accurate and stable numerical integration algorithm is the Runge-Kutta method, which is very popular. It is given by,

k1 = f(xn)∆t k2 = f(xn + k1/2)∆t k3 = f(xn + k2/2)∆t k4 = f(xn + k3)∆t 1 x = x + (k + 2k + 2k + k ) n+1 n 6 1 2 3 4 • Numerical integration algorithms in software like MATLAB are more sophisticated, but are based on algorithms like the Runge- Kutta method above. 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 http : //www.cds.caltech.edu/ • MATLAB Homepage http : //www.mathworks.com • PPLANE6 Homepage http : //math.rice.edu/~dfield/ Control and Dynamical Systems