124
1 1 Example System: Predator Prey Model s://www.math.duke.edu/education/webfeatsII/Word2HTML/Predator-prey.d

1 Example System: Predator Prey Model

Embed Size (px)

Citation preview

Page 1: 1 Example System: Predator Prey Model

11

Example System: Predator Prey Model

https://www.math.duke.edu/education/webfeatsII/Word2HTML/Predator-prey.doc

Page 3: 1 Example System: Predator Prey Model

3

Chapter 3Lyapunov Stability – Autonomous Systems

System of differential equations

Question: Is this system “well behaved”?Follow Up Question: What does well behaved mean?• Do the states go to fixed values?• Do the states stay bounded ?• Do we know limits on the size of the states?

Bottom line in this chapter is that we want to know if a differential equation, which we can’t solve, is “well behaved”?

If we could “solve” the system then theses questions may be easy to answer.• We are assuming we can’t solve our

systems of interest.

Page 4: 1 Example System: Predator Prey Model

4

Preview

x1

x2

x(0)

System stops moving, “stable”

How can we know which way our system behaves?

Answer: Design a function ( ( )) 0

with the property ( ( )) 0

V x t

V x t

x1

x2

x(0)

System state grows, “unstable”

This can be an open- or closed-loop system.

For a closed-loop system it provides a tool:

design to mak

( ( ) 0e )V xg t tu x

Page 5: 1 Example System: Predator Prey Model

5

No explicit time dependence.The solution will evolve with time, i.e. x(t)

Open or closed-loop system

We will work to quantify “well behaved”

Can have multiple equilibrium points

Three main issues:• System is nonlinear• f is a vector• Can’t find a solution

Page 6: 1 Example System: Predator Prey Model

6

Khalil calls this the “Challenge and answer form to demonstrate stability”• Challenger proposes an ε bound for the

final state• The answerer has to produce a bound on

the initial condition so that the state always stays in the ε bound.

• Answerer has to provide an answer for every ε proposed

Bottom line: If we start close enough to xe we stay close to xe

x1

x2

may depend on

the value of

Starting time (typically 0)

Evolution of the state

Page 7: 1 Example System: Predator Prey Model

7

x1 ' = x2 x2 ' = - a sin(x1)

a = 10

-4 -3 -2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

3

4

x1

x2 x1 ' = x2 x2 ' = - a sin(x1)

a = 10

-6 -4 -2 0 2 4 6

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

t

x1

Pendulum without friction.Is (0,0) a stable equilibrium point in the sense of Definition 2?

YesInitial condition is ,0

6

Give me an

We can find a

Page 8: 1 Example System: Predator Prey Model

8

A equilibrium point could be Stable and not ConvergentAn equilibrium point could be Convergent and Not Stable

x(t) goes to xe as t goes to

Page 9: 1 Example System: Predator Prey Model

9

x1 ' = x2 x2 ' = - a sin(x1)

a = 10

-4 -3 -2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

3

4

x1

x2 x1 ' = x2 x2 ' = - a sin(x1)

a = 10

-6 -4 -2 0 2 4 6

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

t

x1

Pendulum without friction.Is (0,0) convergent?Is (0,0) asymptotically stable?

NoNo

Page 10: 1 Example System: Predator Prey Model

10

x1 ' = x2 x2 ' = - a sin(x1) - 5 x2

a = 10

-4 -3 -2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

3

4

x1

x2

x1 ' = x2 x2 ' = - a sin(x1) - 5 x2

a = 10

0 0.5 1 1.5 2 2.5 3

0

0.1

0.2

0.3

0.4

0.5

0.6

t

x1

Pendulum with friction.Is (0,0) a stable equilibrium point in the sense of Definition 2?Is (0,0) convergent?Is (0,0) asymptotically stable?

Yes

YesYes

Page 11: 1 Example System: Predator Prey Model

11

Includes a sense of “how fast” the system converges.

Exponential is “stricter” than asymptotic

Page 12: 1 Example System: Predator Prey Model

12

Can perform this shift to any equilibrium point of interest (a system may have multiple equilibrium points)

Page 13: 1 Example System: Predator Prey Model

13

V is a scalar function

x1

V(x1)

Could be x1(t)

Could be V(x1(t))

x1

V(x1)

x1

V(x1)

x1

V(x1)

Example: Are each of these PSD, PD, ND, or NSD?

PSD PD

None

ND

Notation:PSD write as V0PD write as V>0NSD write as V0 ND write as V<0

Page 14: 1 Example System: Predator Prey Model

14

x1

V(x1)

Example: T

211 1

Example: V(x)=x Qx where x

then Q (i.e. a scalar)

we can write a general example as V(x)=q x

11PSD or NSD if q 0

11PD if q 0

11ND q 0

2 T

2=x x x

"if and only if"

Page 15: 1 Example System: Predator Prey Model

15

Don’t loose generality by restricting Q to be symmetric in quadratic form

i.e., Q symmetric

2 2

2 2

2 21 1 2 2

0

0

( ) x x

b c b cT T

b c b c

symmetric asymmetric

aa bV x x x x

dc d

ax b c dx

See chapter 2

i.e. only the symmetric part contributes to the quadratic

Page 16: 1 Example System: Predator Prey Model

16

Page 17: 1 Example System: Predator Prey Model

17

V is a general function of x1 and x2

V(x) is specific to this

system of interest

Substitute original system

( )x f x

1

2

xx

x

Page 18: 1 Example System: Predator Prey Model

18

Where is this going?

x1

V(x)21PD: V=x 0

Let’s say that x1 is the state of our system

x12 could be an abstraction of the

energy stored in the system• Analogy would work for potential

energy of a spring or charge on a capacitor

Now if we find: V(x(t)) 0

How could that happen?

Could be negative

t

V(x1(t))

V(x1(t)) will not increase

1V(x )x

System equations

1(x )f

Gradient

Page 19: 1 Example System: Predator Prey Model

19

Eventually we will perform the control design to make this true

Can take as many derivatives as you need

Recall that we are considering the equilibrium point at the origin; thus, we already know

0

Page 20: 1 Example System: Predator Prey Model

20

Every convergent sequence has a convergent subsequence in Br

Br is a ball about the origin. Our Theorem only applies at the origin

Page 21: 1 Example System: Predator Prey Model

21

Closeness of x to x=0 implies closeness of V(x) to V(0)

(0) 0V 0ex

Definition of stability

By the

Proof of Theorem 1 (cont):

Page 22: 1 Example System: Predator Prey Model

22

Page 23: 1 Example System: Predator Prey Model

23

Page 24: 1 Example System: Predator Prey Model

24

mg

lq

Not required to be able to derive these equations for this class.

Page 25: 1 Example System: Predator Prey Model

25

Example 3 (cont)

mg

lq

h

l-h

cos( )

cos( )

1 cos( )

l h

ll h l

h l

v

Page 26: 1 Example System: Predator Prey Model

26

Example 3 (cont)

Note: open interval that does not include 2 , -p2p

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)

Page 27: 1 Example System: Predator Prey Model

27

Limit CyclesOscillation 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.

Can also have unstable limit cycles.

Khalil, Nonlinear Systems 3rd Ed, p59

Page 28: 1 Example System: Predator Prey Model

28

Example: LC Oscillator

Khalil, Nonlinear Systems 3rd Ed, p59

1div L i vdt

dt L

dvi C

dt

into node

1 2

1 2

2 1

Kirchoff's current law at node 1

10

Differentiate, define ,

1

dvi C vdt

dt L

x v x v

x x

x xLC

1

Page 29: 1 Example System: Predator Prey Model

29

Example: Oscillator

Khalil, Nonlinear Systems 3rd Ed, p59

iR1iR2

i=h(v)

v

vsys

vD

Page 30: 1 Example System: Predator Prey Model

30

Example: Oscillator

1

2 1

x v

x x v

Page 31: 1 Example System: Predator Prey Model

31

ND?

NSD?

We would expect that the friction will take energy out of the system, thus the system will stop moving.

friction

Page 32: 1 Example System: Predator Prey Model

32

Example 4 (cont)

Physically, we know that the system will stop because of the friction but our analysis does not show this (we only show it is Stable but can’t show Asymptotic Stability). We know the system is asymptotically stable even if that is not illustrated by this specific Lyapunov analysis.

Note: We will return to this later and fix using the Invariant Set Theorem.

Page 33: 1 Example System: Predator Prey Model

33

This is a Local stability result because we have limited the range of the state variables for which the result applies.

+

Page 34: 1 Example System: Predator Prey Model

34

Have we learned anything useful?

x , constants , 0

input designed to stabilize system as

( )

p

p p

x ax bu a b

u k x

x ax bk x a bk x f x

Given control design problem:

2

2

What values (if any) of will work?

2 2 ( ) 2( )

0 2( ) 0

p

p p

p p

k

V x

V xx x a bk x a bk x

aV if a bk k

b

Given the actual system a=1, b=2:

1

2pk

Eq point

0 1 1 x x anything

Eq point

0 1 1.1 0x x

Eq point

0 1 0.9 0x x

t(sec)

x

Page 35: 1 Example System: Predator Prey Model

35

There is a missing piece in our original proof that prevents us from applying the result globally:

e0 (PD) and 0 (ND) AS at x

that is, ( ) ( (0))

V V

V x V x

Problem: ( ) might be decreasing (as to the Theorem)but ( ) may not be sufficientto capture the behavior of the states (globablly)

V xV x

( ) decreasingV x

x

Page 36: 1 Example System: Predator Prey Model

36

1 1

1

Not radially unbounded because the term in 1 as

. . small V does not imply small

x V x

i e x

Evolution of the state (green line)

Constant V(x1,x2) contours

State x1 gets large but it is trapped by the constant Lyapunov function

Page 37: 1 Example System: Predator Prey Model

37

Fixes the problem that the Theorem 2 was local.

Add this condition to AS Theorem:

Global AS: The states will go to zero as time increases from any finite starting state

:

Page 38: 1 Example System: Predator Prey Model

38

To be radially unbounded the condition must be verified along any path that results in:

1 2

2 21 2 1 22

is Not radially unbounded because along the

line , 0 but as .

Thus we have a path that does not meet the condition

for radially unbounded.

V x x

x x V x x x x

Page 39: 1 Example System: Predator Prey Model

39

scalar function

like radially unbounded

Page 40: 1 Example System: Predator Prey Model

40

V is PD iif there are class K functions that upper and lower bound the Lyapunov function.

Page 41: 1 Example System: Predator Prey Model

41

Raleigh-Ritz Theorem.

class functions

Page 42: 1 Example System: Predator Prey Model

42

Summary: If the state starts within some ball, then the state remains within some other ball for all times.

We will eventually use t here

Page 43: 1 Example System: Predator Prey Model

43

Page 44: 1 Example System: Predator Prey Model

44

Reminder of Theorem 2 (need on next slide)

Page 45: 1 Example System: Predator Prey Model

45

Solve the differential inequality

Solve rhs and substitute a new upper bound

Solve lhs

Find pth root

2

pVx

K

00

2

( ) pV xx

K

(0) 0

( ) 0

( ) 0

V

V x

V x

( ) is less than an exponential boundx t p

Page 46: 1 Example System: Predator Prey Model

46

Now want to address the problem demonstrated in the pendulum with friction example, couldn’t show function was negative definite using energy arguments.

“What happens in M stays in M”

Now want to address the problem demonstrated in the pendulum with friction example, couldn’t show function was negative definite using energy arguments.

Page 47: 1 Example System: Predator Prey Model

47

An oscillator has a limit cycle

Slotine and Li, Applied Nonlinear Control

Page 48: 1 Example System: Predator Prey Model

48

This is a condition

that we can try to testThe system ( ) defines the trajectory

Use knowledge of the trajectory to test this condition

x f x

Page 49: 1 Example System: Predator Prey Model

49

Page 50: 1 Example System: Predator Prey Model

50

The only place when ( ) 0 is when the system is at the equilibriumV x

Page 51: 1 Example System: Predator Prey Model

51

"vanish identically" -> exactly =0 (vs. approaching zero)

The system ( ) defines the trajectoryx f x

iv)

Page 52: 1 Example System: Predator Prey Model

52

i) PD iv) Radially Unbounded

ii) NSD

Stays at x2=0 forever, i.e. doesn’t move

iii) Doesn’t vanish along a trajectory except x1=0

trajectory

Page 53: 1 Example System: Predator Prey Model

53

Different from Lyapunov Theorem because:1) V does not need to be Positive Definite2) Applies to multiple equilibrium points and limit cycles

Page 54: 1 Example System: Predator Prey Model

54

Example of LaSalle’s Theorem

System:

Equilibrium Points:

, are positive constantsa

2Any point (0, ) is an equilibrium point.x

Page 55: 1 Example System: Predator Prey Model

55

2 21 2

2 2 21 1 2 2 2 1 1 1 2

2 22 1 1

1 1

2 2

1

0 (PD), 0 ??? (no)

V x x

V x x x x x x ax x xx x ax

V V

Lyapunov Function Candidate:

Lyapunov function design is an iterative process!

Can we change the Lyapunov function to yield a better derivative?: It would be nice if this was a “1”

2 21 2

Suggests the possibility of adding in

1 1

2 2

V

V x x

Example of LaSalle’s Theorem (cont)

Page 56: 1 Example System: Predator Prey Model

56

2 21 2

2 2 21 1 2 2 2 1 1 1 2

21

1 1

2 21

0 (PD), 0 ??? (no)

V x x

V x x x x x x ax x x

axV V

Lyapunov Function Candidate:

Can we further change the Lyapunov function to yield a better derivative?

21

2 21 1

Would be nice if we could turn intowhere the is more negative than is positive

bxbx ax

Example of LaSalle’s Theorem (cont)

2

2

2 2 2 2 2

2 22 1 1

Suggests the possibility of changing further

1...

21 1 1

... ..

..

V

V x b

V x b x x x bx

V x x bx

Page 57: 1 Example System: Predator Prey Model

57

Example of LaSalle’s Theorem (cont)

2

"Checklist"

Set

) invariant wrt system

) 0 in

) where 0

) largest invariant set in

D

i M D

ii V M

iii E V

iv N E

We have enough information to conclude the system is “stable” in some region-> set is invariant wrt the system

Is V PD? no

Page 58: 1 Example System: Predator Prey Model

58

Lyapunov Function Candidate:

Example of LaSalle’s Theorem (cont)

M

N

2

"Checklist"

Set

) invariant wrt system

) 0 in

) where 0

) largest invariant set in

D

i M D

ii V M

iii E V

iv N E

Conclusion from Theorem

2( ) constant as x t t

Page 59: 1 Example System: Predator Prey Model

59

Example of LaSalle’s Theorem (cont)

Page 60: 1 Example System: Predator Prey Model

60

x

x

4x2x

Not negative beyond this point

Page 61: 1 Example System: Predator Prey Model

61

-4 -3 -2 -1 0 1 2 3 4-5

0

5

10

15

20

25

30

35

40

( )V x

?

?

Is this correct yes

Why includes sy mV ste

Page 62: 1 Example System: Predator Prey Model

62

x1 ' = 3 x2 x2 ' = - 5 x1 + x13 - 2 x2

-4 -3 -2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

3

4

x1

x2

D

However, it does look like there should be a region such that the system converges.Can we define that region?

Page 63: 1 Example System: Predator Prey Model

63

Define Region of Attraction (RA):

Question we want to answer: Where can the system start (Initial Conditions at t=0) so that we know it will move to the equilibrium point?

Page 64: 1 Example System: Predator Prey Model

64

Original assumption , V is decreasing

We are assuming we know there is a bound on x2

Solve differential inequality

0

k

k

k

We have now shown there is a bound on x2

1x

Page 65: 1 Example System: Predator Prey Model

65

x ' = - k x + x3

y ' = 0 k = 1

-4 -3 -2 -1 0 1 2 3 4

-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

x

y

01

k=2

2

2

(0) system is ES

for the specific case of 2 :

(0) 2

(0) 2

2 (0) 2

A

k x

R k

x

x

x

Find RA for k=2:

22x

Phase portrait:

This is our RA:

Page 66: 1 Example System: Predator Prey Model

66

Estimate Region of Attraction (RA) Using LaSalle’s Theorem:

Doesn’t mean it is the entire RA

Page 67: 1 Example System: Predator Prey Model

67

Finish Example 14

Could be larger,

Page 68: 1 Example System: Predator Prey Model

68

-4-2

02

4

-4

-2

0

2

40

50

100

150

x1 ' = 3 x2 x2 ' = - 5 x1 + x13 - 2 x2

-4 -3 -2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

3

4

x1

x2Contour lines of V(x)

V(x)

x1

x2

Finish Example 14

Page 69: 1 Example System: Predator Prey Model

69

T T Tx Ax x x A

Page 70: 1 Example System: Predator Prey Model

70

PA

Page 71: 1 Example System: Predator Prey Model

71

Proven the “If” part of the Theorem. If Q>0 and found P then AS real part of eigenvalues is >0

Now prove the “only If” part of the Theorem.

Page 72: 1 Example System: Predator Prey Model

72

Page 73: 1 Example System: Predator Prey Model

73

Page 74: 1 Example System: Predator Prey Model

74

Example: Is the following system AS?

1 1

2 2

0 1

1 1

x x

x x

1 2 11 2

2 3 2

p p xV x x

p p x

2 2

1 2 1 2

2 3 2 3

( )

Choose an arbitrary that is PD and symetric

1 0easy pick

0 1

now use Lyapunov equation ( - ( )) to find

1 0 0 1 0 1

0 1 1 1 1 1

T

x

T

Q A P PA

Q

Q I

Q A P PA P

p p p p

p p p p

2 3 2 1 2

1 2 2 3 3 2 3

2 3 1 2

3 1 2 2 3

1 0

0 1

21 0

2 20 1

solve 3 equations with 3 unknowns

p p p p p

p p p p p p p

p p p p

p p p p p

1

2

3

1

2

3

1 2

solve 3 equations with 3 unknowns

0 2 0 1

1 1 1 0

0 2 2 1

1.5

0.5

1

1.5 0.5

0.5 1

with 0.6910, 1.8090

p

p

p

p

p

p

P

In MATLAB: >> P=lyap([0 -1;1 -1],[1 0;0 1])

Found a PD, symmetric P from an arbitrary Q

eigenvalues of A satify e( ) 0

the origin of the system is ASi

Wouldn’t it be easier just to find the eigenvalues of A? Yes, but having P (and hence a Lyapunov function) will be useful later.

Page 75: 1 Example System: Predator Prey Model

7575

Linearization of a Nonlinear System

Assume small= 0 by assumption of equilibrium point

Change of variables to make the origin the equilibrium

Page 76: 1 Example System: Predator Prey Model

76

Page 77: 1 Example System: Predator Prey Model

77

Example: Linearize System

2

12 1 2

22 1 1 1 2

2 2 1 2

1 2 1 2

[0,0]

cos( ),

1 sin( )

cos( ) 2 sin( )

2 1 sin( ) 1 cos( )

1 0

1 1Tx

xx x xf x

xx x x x x

x x x xf

x x x xx

f

x

Eigenvalues = 1,1

Origin is unstable

Reminder of Jacobian:

2x2

Page 78: 1 Example System: Predator Prey Model

78

x1 ' = x1 x2 ' = x1 + x2

-2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

x1

x2

x1 ' = x22 + x1 cos(x2) x2 ' = x2 + (x1 + 1) x1 + x1 sin(x1)

-2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

x1

x2

x1 ' = x22 + x1 cos(x2) x2 ' = x2 + (x1 + 1) x1 + x1 sin(x1)

-0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1

-0.1

-0.08

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.1

x1

x2

x1 ' = x1 x2 ' = x1 + x2

-0.1 -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 0.1

-0.1

-0.08

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

0.08

0.1

x1

x2

Compare favorably close to the equilibrium point

LinearizedOriginal System

May compare less favorably further away from equilibrium point

Example : Linearize System (cont)

Page 79: 1 Example System: Predator Prey Model

79

Page 81: 1 Example System: Predator Prey Model

8181

Example System: Predator Prey Model

( ) 0e

Lost idea of extinction

(100,100)

Lost idea of oscillating populations

(0,0)

Linearization at the equilibrium points

Page 82: 1 Example System: Predator Prey Model

82

ex

0x

Unstable equilibrium

In general, proving a system is unstable is not very “constructive” in designing control systems.

Page 83: 1 Example System: Predator Prey Model

83

22( )( )

0 if

V x

V x

Page 84: 1 Example System: Predator Prey Model

84

1 2

2 2 1

2 21 2

21 2 2

1

2

2

x x

x x x

V x x

V x x x

Example

Can we define a set U V>0 ?

1 2

Doesn't appear possible because in region about the origin

would have to include a point x 0 and x >0

which would make V 0

0x

Not conclusive, doesn’t mean it is stable

Page 85: 1 Example System: Predator Prey Model

85

Summary

x=0 stable

x=0 exponentially stable

x=0 asymptotically stable

convergent

x=0 stable

time

X(t)

time

X(t)

time

X(t)

x=0 asymptotically stable x=0 exponentially stableconvergent

time

X(t)

Page 86: 1 Example System: Predator Prey Model

86

x=0 stablex=0 asymptotically stable

Locally, NSD dV/dtLocally, state could grow while V shrinks

x=0 asymptotically stable

globally

1 2 3

x=0 exponentially stable

global, local depend on conditions

7

V is class K8

x=0 asymptotically stable local

Global, asymptotically stable

Conditions true in entire state space9

10

N is asymptotically stable

Local, global

Summary

Page 87: 1 Example System: Predator Prey Model

87

Summary

Linearization

11

x=0 exponentially stable

Inherently local result since it is an approximation of a nonlinear system at a point

x1 ' = x1 x2 ' = x1 + x2

-2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

x1

x2

x1 ' = x22 + x1 cos(x2) x2 ' = x2 + (x1 + 1) x1 + x1 sin(x1)

-2 -1 0 1 2 3 4

-4

-3

-2

-1

0

1

2

x1

x2

system Linear approximation

Page 88: 1 Example System: Predator Prey Model

88

f2(x)

Summary

( )

if we use feedback of the state i.e. ( ) ( ) then

x f x u

u x g x

the analysis tools in this

chapter will be the basis

for designing the

control u(x)

f(x)u

f(x)u

2( )

is still autonomous

x f x

g(x)

Page 89: 1 Example System: Predator Prey Model

89

Homework

• Set 3.A: Pendulum without friction• Set 3.B: Equilibrium points, quadratic

Lyapunov function candidate to determine stability

• Set 3.C: Book problems 3.1, 3.3, 3.6, 3.7• Set 3.D: Book problems 3.4,3.5,3.13, 3.14• Set 3.E Pendulum with friction AS

Page 90: 1 Example System: Predator Prey Model

90

Homework #3-A

• “Pend w/out friction” - 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

Page 91: 1 Example System: Predator Prey Model

9191

Homework 3-A2

1

0

0 sin( )

Equilibrium points at (0,0), ( ,0) for 1, 2,3...

x

a x

n n

Pendulum spins

Pendulum swings

Pendulum doesn’t move(stable EQ point)

Pendulum doesn’t move at exactly that point(Unstable EQ point)

Pend w/out fric

Page 92: 1 Example System: Predator Prey Model

9292

Homework 3-A

2 22 1

1(1 cos( ))

2V ml y mgl y

1

21 2

22

1 21

2 1 2 1

2 1

( )( ) ,

( )

sin( ) ,sin( )

sin( ) sin( )

2 sin( )

f yV VV y

f yy y

ymgl y ml y g

yl

mgly y mgly y

mgly y

1 1 1 1

2 2 2 2

then

then

y x y x

y x y x

1 2

2 1sin( )

y y

gy y

l

Change of variable Shifted system

1Is EQ at stable?x

( ) 0 ?V y No

Is the EQ point stable or unstable?

No conclusion can be made

yy y y y

Same Lyapunov function candidate that we used in notes

Pend w/out fric (cont)

Page 93: 1 Example System: Predator Prey Model

9393

Homework 3-A

2 22 1

1(1 cos( ))

2V ml y mgl y

1

21 2

22

1 21

2 1 2 1

( )( ) ,

( )

sin( ) ,sin( 2 )

sin( ) sin( 2 )

0

f yV VV y

f yy y

ymgl y ml y g

yl

mgly y mgly y

1 1 1 1

2 2 2 2

2 then

then

y x y x

y x y x

1 2

2 1sin( 2 )

y y

gy y

l

Change of variable Shifted system

1Is EQ at 2 stable?x

( ) 0 ?V y Yes

Is the EQ point stable or unstable?

Stable

Same Lyapunov function candidate that we used in notes

yy y y y

Pend w/out fric (cont)

Page 94: 1 Example System: Predator Prey Model

9494

Homework #3-B

1) x x

Find the equilibrium points for each of the following and use a quadratic Lyapunov function candidate to determine stability of each equilibrium point.

2) 5x x 1 2

2 1 2

3) x xx x x

1 2 3 1

2 1 3 2

3 1 2 3

5) x x x x

x x x x

x x x x

6)

specify ( )

x x u

u f x

1 1 2

2 1 2

7) x ax bx

x cx dx

Using a quadratic Lyapunov function, find the conditions on a,b,c,d such that the system is stable at x=0

Using a quadratic Lyapunov function, find u=f(x) such that the system is stable at x=0

1 2

22 1 1 2

4)

1

x x

x x x x

Page 95: 1 Example System: Predator Prey Model

9595

Homework 3-B

2

2

1)

Eq pt at 0

1

2

0 (PD), 0 (ND) AS (at x=0)

x x

x

V x

V xx x x x

V V

Page 96: 1 Example System: Predator Prey Model

9696

Homework 3-B

2

2

2) 5

Eq pt at 5

Define change of variables

New system

1

2

0 (PD), 0 (ND) AS at y=0 AS at

5 then

x=-5

x x

x

x

y

V y

V yy y y y

V V

y x y

y

Page 97: 1 Example System: Predator Prey Model

9797

Homework 3-B

1 2

2 1 2

1 2

1 2 21 2 1 2

2

1 1 2 2 1 2 2 1 2

22

3)

Eq pt at 0

1 01 1 1[ ]

0 12 2 2

0 (PD), 0 (NSD) Stable

Can we get a "better" result? Probably, let's try Theorem 8

Con

x x

x x x

x x

xV x x x x

x

V x x x x x x x x x

x

V V

1 2 1 2

2 2 2

1 2 1

1 2

sider R=[ , ] ,

0 0 thus 0 t 0

then by the second system equation 0= 0

0 does not vanish identically along any trajectory other than = =0 Asymptotically Stable

Th

Tx x x x

V x x x

x x x

V x x

eorem 9: ince V is also radially unbounded, Origin is Globally Asymptotically Stable (GAS)s

Page 98: 1 Example System: Predator Prey Model

9898

Homework 3-B

1 22

2 1 1 2

1 2

2 21 2

21 1 2 2 1 2 2 1 1 2

2 2 2 2 21 2 1 2 2 1 2 2 1

1

4) 4)

1

Eq pt at 0

1 1

2 2

1

1

0 (PD) , 0 when -1 1 (NSD) Locally Stable ISL

Can we get a "better" r

x x

x x x x

x x

V x x

V x x x x x x x x x x

x x x x x x x x x

V V x

1 2 1 2

2 2 2

21 1 2 1

esult? Probably, let's try Theorem 8

Consider R=[ , ] ,

0 0 thus 0 t 0

then by the second system equation 0= 1 0

0 does not vanish identically along any trajectory o

Tx x x x

V x x x

x x x x

V

1 2ther than = =0 Asymptotically Stable

Theorem 9: since V is also radially unbounded, Origin is Locally Asymptotically Stable (LAS)

x x

Page 99: 1 Example System: Predator Prey Model

9999

Homework 3-B

1 2 3 1

2 1 3 2

3 1 2 3

1 2 3

2 2 21 2 3

1 1 2 2 3 3 1 2 3 1 2 1 3 2 3 1 2 3

2 2 21 2 3

5)

Eq pt at 0

1 1 1

2 2 2

( )

0 (PD), 0 (ND) AS

x x x x

x x x x

x x x x

x x x

V x x x

V x x x x x x x x x x x x x x x x x x

x x x

V V

Page 100: 1 Example System: Predator Prey Model

100100

Homework 3-B

2

2

2

2

2 2 2

6) Eq pt at 0

1

2

would like to get rid of the unhelpful and add a stabilizing termlet -2 (or even - with K>1)

20 (PD), 0 (ND) AS

Note that

x x uAssume x

V x

V xx x xux

xu x u Kx

V x x xV V

x

has an EQ point at zero as we assumed.x

We just designed a feedback control to stabilize the systemWe used the Lyapunov function to design the control.

Page 101: 1 Example System: Predator Prey Model

101101

Homework 3-B

1 1 2

2 1 2

1 2

2 21 2

1 1 2 22 2

1 1 2 1 2 22 2

1 2 1 2

7)

Eq pt at 01 1

2 2

choose and to stabilize the system ie 0 and 0choose and to make the las

x ax bx

x cx dxAssume x x

V x x

V x x x xax bx x cx x dxax dx b c x x

a d a db c

2

t term "go away" ie 0 then

0 (PD), 0 (NSD) Stable

Since this is a linear system, compare to finding conditions for positive eigenvalues:0

0

( ) 0

b c

V V

a bA I a d bc

c d

a d ad bc

Page 102: 1 Example System: Predator Prey Model

102102

Homework #3.CChapter 3 - Problems 3.1, 3.3, 3.6, 3.7

Page 103: 1 Example System: Predator Prey Model

103103

Homework 3.C

1 2

3 21 1 1 2 1 1 1

0

0 1 0 0,1, 1

equilibrium points at (0,0), (1,0), and (-1,0)

x x

x x x x x x x

System doesn’t move, i.e. derivatives are zero

Notation means the second eq point, not the square of the eq point

See that (0,0) which corresponds to (1,0) in the original system is an equilibrium point

Page 104: 1 Example System: Predator Prey Model

104104

Homework 3.C

See that (0,0) which corresponds to (-1,0) in the original system is an equilibrium point

(-1,0)

Page 105: 1 Example System: Predator Prey Model

105105

Homework 3.C

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 constant yo solve for v.

Page 106: 1 Example System: Predator Prey Model

106106

Homework 3.CEmphasizing that we are looking for a constant x3

x1=yo

Page 107: 1 Example System: Predator Prey Model

107107

Homework 3.3 (sol)

This is why linearization can be so powerful tool - you get to use all of the linear analysis tools.

Page 108: 1 Example System: Predator Prey Model

108108

Homework 3.C

a) Verify that the origin is an equilibriumSubstitute (0,0)

1

2

00

thus (0,0) is an equilibrium point

xx

Page 109: 1 Example System: Predator Prey Model

109109

Homework 3.C

Page 110: 1 Example System: Predator Prey Model

110110

Homework 3.C

1 1

0 From pplane8:

Page 111: 1 Example System: Predator Prey Model

111111

Homework 3.CTest this first

V can be zero other than at the origin

Page 112: 1 Example System: Predator Prey Model

112112

Homework 3.C

Page 113: 1 Example System: Predator Prey Model

113113

Homework 3.DChapter 3 - Problems 3.4,3.5,3.13, 3.14

Page 114: 1 Example System: Predator Prey Model

114114

Homework 3.D (Sol)

Page 115: 1 Example System: Predator Prey Model

115115

Homework 3.D (Sol)

For small x2

Because we assumed small x2

Page 116: 1 Example System: Predator Prey Model

116116

Homework 3.D (Sol)

Page 117: 1 Example System: Predator Prey Model

117117

Homework 3.D (Sol)

1 2

1 2

a) Substitute (0,0) in the system, then 0 the system can't move from the point

0 for all time which means in stays in the set (0,0). The equilibrium point is an invariant set.

Note tha

x x

x x

t any equilibrium point is an invariant set.

11 2

2

a) Alternate solution - A more general way to consider this question

Invariance implies that there is no deviation from the set over time, ie ( ) 0

1 1

Sub from system

dset

dtxd

x x x x xxdt x

2 22 1 2 1 2

1

2

2: = 1 3 2

3

Sub from our set definition (using 0): =0

Thus the set is invariant w.r.t the system.

x x x x x

x dx x

x dt

Page 118: 1 Example System: Predator Prey Model

118118

Homework 3.D (Sol)

2 2 2 2 21 2 1 2 1 2 1 2

22 2

1b) The set defines a relationship between x and x as: 1 (3 2 ) 0 3 1 2 1 2 ;

31

i.e. points ( 1 2 , )3

x x x x x x

x x

12 2 2 21 2 1 2 1 2 1 1 2 2

2

1 2 2 1 2

Invariance implies that there is no deviation from the set over time, ie ( ) 0

1 (3 2 ) 1 (3 2 ) 6 4 6 4

2Sub from system: = 6 4 1 3

3

dset

dtxd

x x x x x x x x x x xxdt x

x x x x x

2 2 2 2 21 2 2 1 2

2 21 2

2 4 1 3 2

Sub from our set definition (using 3 1 2 ): =0

Thus the set is invariant w.r.t the system.

x x x x x

x x

Page 119: 1 Example System: Predator Prey Model

119119

Homework 3.D (Sol)

This is a clever way to add a degree of freedom to a quadratic Lyapunov function. a,b don’t change the basic nature of the quadratic function, ie still PD and radially unbounded.

a,b provide the opportunity to cancel these cross terms which might have otherwise stopped our analysis (ie had we chosen a=b=1)

Page 120: 1 Example System: Predator Prey Model

120120

Homework 3.D (Sol)Why choose this? Because someone tried a lot of other V’s that did not work.

Page 121: 1 Example System: Predator Prey Model

121

Homework 4.E

• Pendulum with friction AS

1 2

2 1 2

1

Remember the pendulum with friction?

sin( )

It is possible to prove asymptotic stability without needing the invariant set theorem

using the Layounov function candidate

1 cos( )

x x

g kx x x

l m

gV x

l

11 3 1

3 22 2

211 22 11 22 3

11 22 3

1, with ,

2

and where must be P.D. implies

0, 0, and 0.

Show what additional constraints are needed on , ,and to make N.D.?

T p p xx Px P x

p p x

P

p p p p p

p p p V

Page 122: 1 Example System: Predator Prey Model

122

1 2

2 1 2

1

Remember the pendulum with friction?

sin( )

It is possible to prove asymptotic stability without needing the invariant set theorem

using the Layounov function candidate

1 cos( )

x x

g kx x x

l m

gV x

l

11 3 1

3 22 2

211 22 11 22 3

11 22 3

2 1

1, with ,

2

and where must be P.D. implies

0, 0, and 0.

Show what additional constraints are needed on , ,and to make N.D.?

sin( )

T p p xx Px P x

p p x

P

p p p p p

p p p V

gV x x

l

11 2 3 1 3 2

2 1

3 2 22 1 22 2

23 1 1 2 1 22 2 1 22 3 2 11 3 1 2

11 3 22

sin( )sin( )

sin( )

sin( ) sin( ) sin( )

and 1 (to zero t

T T

g kp x p x p x

g l mx Px x x xg kl

p x p x p xl m

g g g k kp x x x x p x x p p x p p x x

l l l m m

klet p p p

m

23 1 1 22 3 2

3

2 211 22 3 3 3 3

22 3 3

he unfriendly terms)

sin( )

requires 0

from PD requirement 0 0

Now look at the last term in the last : 0 .

At this point a lot of

g kV p x x p p x

l m

p

k kp p p p p p

m mk k

V p p pm m

13 3 2

2

11 3 22 1 12

1 1

will work, we can pick for convenience.

Then , , 1 ensures is ND for : .2 2

(0) 0, is PD and radially unbounded and is ND for :

guarantees that the o

kp p

m

k kp p p V x x

m m

V V V x x

rigin is locally asymptotically stable.

Page 123: 1 Example System: Predator Prey Model

123

Additional Examples

30 1

0 1

1 2

32 2 2 0 1 1 1

1 2

3.AE1: Exam stability at the origin of

0

where , >0.

State space model:

1

eq points: ( , )=(0,0) (only consider the real roots).

Lyapunov function can

mx bx x k x k x

k k

x x

x bx x k x k xm

x x

2 2

2 2 42 0 1 1 1

32 2 0 1 1 1 1 1

2 3 32 2 0 1 2 1 1 2 0 1 2 1 1 2

22 2

3

2

didate

1 1 (P.D., radially unbounded)

2 2 4

(N.S.D.)

x x

mV x k x k x

V x mx k x x k x x

bx x k x x k x x k x x k x x

bx x

b x

Page 124: 1 Example System: Predator Prey Model

124

Additional Examples

1 2 1

32 0 1 1 1 1 2

3.AE1: (cont) Use Invariant Set Theorem

0 for all ( ,0) where .

Look at original dynamics to see for ( ,0) :

0 is constant

1 where (0,0) is only 0

for the othe

p p

p

V x x

x

x x x

x k x k x x xm

1

2

r the system continues to move.

Thus the is only identically zero, meaning it will always stay at 0,

at the origin (0,0).

GAS at origin.

Could use LaSalles Theorem

{ : 0} (not invariant in

x

V V

E x M x

( ,0))

(0,0) is the largest invariant set in .

( ) 0 as

px

N E E

x t t