Professional Documents
Culture Documents
https://www.math.duke.edu/education/webfeatsII/Word2HTML/Predator-prey.doc
Example System: Predator Prey Model
x ax bxy x y
y cy pxy
e ( ) 0
(100,100)
(0,0)
Chapter 3
Lyapunov Stability – Autonomous Systems
Yes
Initial condition is , 0
x1 ' = x2 a = 10 6
x2 ' = - a sin(x1)
1
x2
0 x1 ' = x2 a = 10
x2 ' = - a sin(x1)
-1
0.6
-2 0.4
0.2
-3
x1 0
-4
-0.2
-4 -3 -2 -1 0 1 2 3 4
x1 -0.4
Give me an -0.6
We can find a -6 -4 -2 0 2 4 6
t
x(t) goes to xe as t goes to
x1 ' = x2 a = 10
x2 ' = - a sin(x1)
1
x2
0 x1 ' = x2 a = 10
x2 ' = - a sin(x1)
-1
0.6
-2 0.4
0.2
-3
x1 0
-4
-0.2
-4 -3 -2 -1 0 1 2 3 4
x1 -0.4
-0.6
-6 -4 -2 0 2 4 6
t
Pendulum with friction.
Yes
Is (0,0) a stable equilibrium point in the sense of Definition 2?
Is (0,0) convergent? Yes
Is (0,0) asymptotically stable? Yes
x1 ' = x2 a = 10
x2 ' = - a sin(x1) - 5 x2
1
x2
-1
x1 ' = x2 a = 10
x2 ' = - a sin(x1) - 5 x2
-2
0.6
-3 0.5
0.4
-4
x1
0.3
-4 -3 -2 -1 0 1 2 3 4
x1 0.2
0.1
Notation:
PSD write as V0
PD write as V>0
NSD write as V0
ND write as V<0
Could be V(x1(t)) Example: Are each of these PSD, PD, ND, or NSD?
V(x1) V(x1) V(x1) V(x1)
None
ND
x1 x1 x1 x1
PSD PD
Could be x1(t)
x =x T x
ND q11 0
Substitute original system
x f ( x)
x
V is a general function
x 1 of x1 and x2
x2
i.e., Q symmetric
See chapter 2
t
Can take as many derivatives as
you need
Closeness of x
to x=0 implies
closeness of
V(x) to V(0)
xe 0 V (0) 0
Definition of
stability
q
l
mg
l-h q
l
v
lh
cos(q ) h
l
l h l cos(q ) mg
h l 1 cos(q )
Example 3 (cont)
Note:
•Stable implies that the system (pendulum position and velocity) remains bounded
•Does not mean that the system has stopped moving
•The energy is constant (V=E) but the system continuously moves exchanging kinetic and
potential energy Limit Cycle)
Limit Cycles
Oscillation leads to a closed path in the phase plane, called periodic orbits. For
example, the pendulum has a continuum of closed paths
If there is a single, isolated periodic orbit such that all trajectories tend to that
periodic orbit then it is called a stable limit cycle.
dv di 1
iC V L i vdt
dt dt L
Differentiate, define x1 v, x2 v
x1 x2
1
x2 x1
LC
iR1 iR2
v=h(i)
x1 v
x2 x1 v
friction
We would expect that the
friction will take energy out
of the system, thus the
system will stop moving.
Note: We will return to this later and fix using the Invariant Set
Theorem.
This is a Local stability result because
we have limited the range of the state
variables for which the result applies.
Have we learned anything useful?
Eq point
0 1 1.1 x x 0
Given control design problem:
x ax bu x , constants a, b 0
input designed to stabilize system as u k p x
x ax bk p x a bk p x f ( x )
V x2
V 2 xx 2 x (a bk p ) x 2(ax k p ) x 2
a
V 0 if 2( a bk p ) 0 k p
b
Global AS: The states will go to zero as time increases from any finite starting state
Now want to address the problem demonstrated in the pendulum with friction example,
couldn’t show function was negative definite using energy arguments.
scalar function
like radially
unbounded
V is PD iif there are class K functions that upper and lower bound the Lyapunov function.
Raleigh-Ritz Theorem.
class functions
Summary: If the state starts within some ball, then the state remains within some other ball
for all times.
Now want to address the problem demonstrated in the pendulum with friction example,
couldn’t show function was negative definite using energy arguments.
An oscillator has a limit cycle
ii) NSD
Suggests the
Lyapunov Function Candidate: possibility of adding in V
1 2 1 2 1 2 1 2
V x1 x2 V x1 x2
2 2
2 2
V x1 x1 x2 x2 x2 x12 ax12 x12 x2
1 x2 x12 ax12
V 0 (PD),V 0 ??? (no)
Can we change the It would be
Lyapunov function to yield a nice of this
better derivative? was a “1”
Example of LaSalle’s Theorem (cont)
Lyapunov Function Candidate:
1 2 1 2
Can we change the V x1 x2
Lyapunov function to 2 2
yield a better
derivative?
V x1 x1 x2 x2 x2 x12 ax12 x12 x2
1 x2 x12 ax12
V 0 (PD),V 0 ??? (no)
Would be nice if we could turn into bx12
where the bx12 is more negative than ax12 is positive
Suggests the
possibility of changing V further
1
V ... x2 b
2
2
1 1 1
V ... x2 b x2 .. x2 x2 bx2
V .. x2 x12 bx12
Example of LaSalle’s Theorem (cont)
"Checklist"
We have enough
information to Set D 2
conclude the system is
“stable” in some region
i ) M D invariant wrt system
-> set is invariant wrt ii ) V 0 in M
the system
iii ) E where V 0
iv ) N largest invariant set in E
Example of LaSalle’s Theorem (cont)
Lyapunov Function Candidate:
"Checklist"
x2 (t ) constant as t Set D 2
i ) M D invariant wrt system
ii ) V 0 in M
iii ) E where V 0
iv ) N largest invariant set in E
?
x1 ' = 3 x2
x2 ' = - 5 x1 + x13 - 2 x2 D
4
1
x2
-4 -3 -2 -1 0 1 2 3 4
x1
Define Region of Attraction (RA):
We are assuming we know
there is a bound on x2
Sub
Original assumption , V is
Sub
decreasing
Sub
k 0 Solve differential
Sub inequality
k
Find RA for k=2:
2
k x(0) system is ES
RA for the specific case of k 2 :
2
x(0) 2
x(0) 2
x ' = - k x + x3 k=1
2 x(0) 2
y '=0
This is our RA:
1
0.8
0.6
k=2
Phase portrait:
0.4
0.2
0
y
-0.2 1 0 x
2 2
-0.4
Estimate Region of Attraction (RA) Using LaSalle’s Theorem:
Finish Example 14
Finish Example 14 (cont)
V(x)
150
100
50
0
4
2 4
0 2 x1 ' = 3 x2
x2 0 x2 ' = - 5 x1 + x13 - 2 x2
-2
-2
-4 -4 x1 4
-1
-2
-3
-4
-4 -3 -2 -1 0 1 2 3 4
x1
Proven the “If” part of the Theorem. If Q>0 and found P
then AS real part of eigenvalues is >0
x1 0 1 x1 0 2 0 p1 1
x 1 1 x 1 1 1 p 0
2 2 2
0 2 2 p3 1
p p2 x1
V x1 x2 1 p1 1.5
p2 p3 x2 p 0.5
2
Q ( AT P PA) p3 1
Choose an arbitrary Q that is PD and symetric 1.5 0.5
P
1 0 0.5 1
easy pick Q I 2 x 2
0 1 1 0.6910, 2 1.8090
1 0 0 1 p1 p2 p1 p2 0 1 Found a PD, symmetric P from an arbitrary Q
p p p
0 1
1 1 2 3 2 p3 1 1 eigenvalues of A satify e(i ) 0
the origin of the system is AS
1 0 p2 p3 p2 p1 p2
0 1 p p p
1 p p2 p2 p 3 3 2 3 In MATLAB: >> P=lyap([0 -1;1 -1],[1 0;0 1])
1 0 2 p2 p3 p1 p2
0 1 Wouldn’t it be easier just to find the
p 3 p1 p2 2 p2 2 p3 eigenvalues of A? Yes, but having P (and
solve 3 equations with 3 unknowns hence a Lyapunov function) will be useful
later.
Linearization of a Nonlinear System
x22 x1 cos( x2 )
f
2 1 1
x x x 1 x1 sin( x )
2
f cos( x2 ) 2 x2 x1 sin( x2 )
x 2 x1 1 sin( x2 ) 1 x1 cos( x2 )
f 1 0
x x [0,0]T 1 1
Eigenvalues = 1,1
Origin is unstable
Example : Linearize System (cont)
Original System
x1 ' = x22 + x1 cos(x2)
x2 ' = x2 + (x1 + 1) x1 + x1 sin(x1) x1 ' = x1
Linearized
x2 ' = x1 + x2
0.1
0.1
0.08
0.08
0.06
0.06
0.04
0.04
0.02
0.02
x2
x2
0
-0.02
-0.02
-0.04
-0.04
-0.06
Compare favorably -0.06
-0.08
close to the equilibrium
-0.08
-0.1 -0.1
2
2
1
1
0
0
x2
-1
x2
-1
-2
-2
-3
May compare less
favorably further away
-3
-4
from equilibrium point -4
-2 -1 0 1 2 3 4
-2 -1 0 1 2 3 4
x1
x1
xe
x0
In general, proving a system is
unstable is not very
“constructive” in designing
control systems.
Unstable equilibrium
V ()( 2 x )
2
V 0 if x
Example
x1 x2
x2 x2 x1
1 2
V x1 x22
2
V 2 x1 x2 x22
convergent
2 3
1
x=0 stable
x=0 asymptotically stable
Locally, NSD dV/dt x=0 asymptotically stable
Locally, state could grow
while V shrinks globally
V is class K
8
7
Linearization
11
1
1
0
0
x2
-1
x2
-1
-2
-2
-3
system -3
Linear approximation
-4
-4
-2 -1 0 1 2 3 4
x1 -2 -1 0 1 2 3 4
x1
Summary
u
f(x)
x f ( x) u
if we use feedback of the state i.e. u( x ) g ( x ) then
x f2 ( x)
is still autonomous
Example System: Predator Prey Model
https://www.math.duke.edu/education/webfeatsII/Word2HTML/Predator-prey.doc
Example System: Predator Prey Model
x ax bxy x y
y cy pxy
e ( ) 0
(100,100)
(0,0)
Homework #3-1
• Find all of the equilibrium points for the
pendulum without friction.
– Plot the phase portrait from -3<x1<3 and -
10<x2<10.
– From inspection of the phase portrait , does it
appear that the equilibrium points are stable?
– Use the Lyapunov function candidate from the
notes to examine stability at x1= and 2
0 x2
Homework (sol)
0 a sin( x1 )
Equilibrium points at (0,0), ( n ,0) for n 1, 2,3...
Pendulum spins
Pendulum swings
Pendulum
doesn’t move
(stable EQ point)
Pendulum doesn’t
move at exactly that
point
(Unstable EQ point)
Is EQ at x1 stable? Homework (sol)
Change of variable Shifted system
y1 x1 then y1 x1 y1 y2
y2 x2 then y2 x2 g
y2 sin( y1 )
l
1 2 2
V ml y2 mgl (1 cos( y1 )) Same Lyapunov function candidate that we used in notes
2
y
y y y y
V V f1 ( y )
V ( y)
y2 f 2 ( y )
,
y1 V ( y) 0 ? No
y2
mgl sin( y1 ) , ml y2 g
2 Is the EQ point No
sin( y1 ) stable or conclusion
l
unstable? can be made
mgly2 sin( y1 ) mgly2 sin( y1 )
2mgly2 sin( y1 )
Is EQ at x1 2 stable? Homework (sol)
Change of variable Shifted system
y1 x1 2 then y1 x1 y1 y2
y2 x2 then y2 x2 g
y2 sin( y1 2 )
1 2 2 l
V ml y2 mgl (1 cos( y1 )) Same Lyapunov function candidate that we used in notes
2
y
y y y y
V V f1 ( y )
V ( y) V ( y) 0 ?
y2 f 2 ( y )
, Yes
y1
y2
mgl sin( y1 ) , ml y2 g
2 Is the EQ point
sin( y1 2 ) stable or
l Stable
unstable?
mgly2 sin( y1 ) mgly2 sin( y1 2 )
0
Homework #3-2
Find the equilibrium points for each of the following and use a quadratic
Lyapunov function candidate to determine stability of each equilibrium point.
1) x x 3) x1 x2 5) x1 x2 x3 x1
2) x x 5 x2 x1 x2 x2 x1 x3 x2
4) x1 x2 x3 x1 x2 x3
x2 x1 1 x12 x2
Using a quadratic Lyapunov function, find u=f(x) such that the system is stable at
x=0 6) x x u
specify u f ( x)
Using a quadratic Lyapunov function, find the conditions on a,b,c,d such that the
system is stable at x=0
7) x1 ax1 bx2
x2 cx1 dx2
Homework (sol)
1) x x
Eq pt at x 0
1 2
V x
2
V xx x x x 2
V 0 (PD), V 0 (ND) AS (at x=0)
Homework (sol)
2) x x 5
Eq pt at x 5
Define change of variables y x 5 then y x
New system y y
1 2
V y
2
V yy y y y 2
V 0 (PD), V 0 (ND) AS at y=0 AS at x=-5
Homework (sol)
3) x1 x2
x2 x1 x2
Eq pt at x1 x2 0
1 1 0 x1 1 2 1 2
V [ x1 x2 ] x1 x2
2 0 1 x2 2 2
V x1 x1 x2 x2 x1 x2 x2 x1 x2
x2 2
V 0 (PD), V 0 (NSD) Stable
Homework (sol)
4) 4) x1 x2
x2 x1 1 x12 x2
Eq pt at x1 x2 0
1 2 1 2
V x1 x2
2 2
V x1 x1 x2 x2 x1 x2 x2 x1 1 x12 x2
x1 x2 x1 x2 x2 2 x12 x2 2 x2 2 1 x
2
1
Since this is a linear system, compare to finding conditions for positive eigenvalues:
a b 0
A I 0 a d bc
c d
2 (a d ) ad bc 0
Homework 3.3
Chapter 3 - Problems 3.1, 3.3, 3.6, 3.7
Homework 3.3 (sol)
x1 0 x2
x1 0 x1 x13 x2 x1 1 x12 0 x1 0,1, 1
equilibrium points at (0,0), (1,0), and (-1,0)
Notation means the second eq point, not the square of the eq point
Solve for conditions on v (note that this is the voltage on the coil not a
Lyapunov function candidate) so that x1=yo and the system is at rest, i.e. solve
v so that there is an equilibrium point at x1=yo. Approach: set derivatives to
zero, x1 to the contant yo solve for v.
Emphasizing that we
are looking for a
Homework 3.3 (sol) constant x3
x1=yo
Homework 3.3 (sol)
This is why
linearization can be so
powerful tool - you
get to use all of the
linear analysis tools.
Homework 3.3 (sol)
1 1
Homework 3.3 (sol) Test this first
For small x2
Because we
assumed small x2
Homework 3.4 (Sol)
Homework 3.4 (Sol)
b) The set defines a relationship between x1 and x 2 as: 1 (3 x12 2 x22 ) 0 3 x12 1 2 x22 x1
1
3
1 2 x22 ;
i.e. points (
1
3
1 2 x22 , x2 )
d
Invariance implies that there is no deviation from the set over time, ie ( set ) 0
dt
x
d
1 (3 x12 2 x22 )
x
1 (3 x12 2 x22 ) x 6 x1 4 x2 1 6 x1 x1 4 x2 x2
dt x2
2
3
Sub from system: = 6 x1 x2 4 x2 x1 x2 1 3 x12 2 x22 4 x 1 3x
2
2
2
1 2 x22
Sub from our set definition (using 3 x12 1 2 x22 ): =0
Thus the set is invariant w.r.t the system.
Homework 3.4 (Sol)