lecture18 introduction to dynamical...

39
Lecture 18: Introduction to D i lS t Dynamical Systems

Upload: others

Post on 14-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lecture 18: Introduction to D i l S tDynamical Systems

Page 2: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Dynamical systemsy y

• Dynamics is the study of systems that evolve with time.• The same framework of dynamics can be applied to

biological, chemical, electrical, mechanical systems.• Typically expressed as differential equation(s) (or yp y p q ( ) (

discrete difference equation but we will focus on ODEs)• Systems that evolve with time and they have a “memory”• State at time t depends upon the state at a slightly• State at time t depends upon the state at a slightly

earlier time • They are therefore inherently deterministic: state is

determined by the earlier statedetermined by the earlier state

dWhere x is going in future time

dxdt

f (x)g g

Is determined by where x is now

Page 3: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linear vs Nonlinear terms

• Linear Terms: one that is first degree in its dependent variables and derivatives▫ x is 1st degree and therefore a linear term▫ xt is 1st degree in x and therefore a linear termxt is 1 degree in x and therefore a linear term▫ x2 is 2nd degree in x and there not a linear term

• Nonlinear Terms: any term that contains higher powers, products and transcendentals of the dependent variable isproducts and transcendentals of the dependent variable is nonlinear▫ x2, ex, x(x+1)-1 all nonlinear terms▫ sin x nonlinear term

Page 4: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linear vs Nonlinear terms

Linear Nonlinear

dy2dy

2

dtd y i

dtdy

2nd ordernot 2nd degree

2

ydt

dy

sin yxdt

xy

2nd degree

sin dytdt

3

xyx

Page 5: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linear vs Nonlinear equations

linear equation: consists of a sum of linear termsq

y = x + 2y(t) + x (t) = Ny(t) + x (t) = Ndy/dt = x + sin t

nonlinear equation: all other equations

y + x2 = 2x(t) * y(t) = Ndy / dt = xy + sin x

most nonlinear differential equations are impossible to solve analytically!dy / dt = xy + sin x So what do we do???

Page 6: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linear vs Nonlinear equations

system 1 system 2

11 22dy y y

dt 1 2

122dy y

dty y

21 23dy y y

dt 1 2

223d y yy y

dt

linear system: system of linear equations

nonlinear system: system of equations containing at least 1 li t1 nonlinear term

we can use tools such as Laplace transformations to assist in solving linear systems of differential g yequationscan not use for nonlinear systems!!

Page 7: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

So,

Dynamical system A system of one or more variables which evolve in

time according to a given rule Two types of dynamical systems: Two types of dynamical systems:

• Differential equations: time is continuous

• Difference equations (iterated maps): time is discrete

Page 8: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

So,

Linear vs. nonlinear A linear dynamical system is one in which

the rule governing the time-evolution of the t i l li bi ti f llsystem involves a linear combination of all

the variables.• EXAMPLE:EXAMPLE:

A nonlinear dynamical system is simply… … not linear

Page 9: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Trajectoryj y

Usually we study the trajectories of the states in d i l tdynamical systems

Trajectory: The path a moving object follows through space as a function of time.

Page 10: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

1-D ODEs

dx/dt = f(x,t) If the system is time-invariant: dx/dt = f(x) Fixed points: where the derivative is zero (no

variation in the system) → dx/dt = f(x*) = 0variation in the system) dx/dt f(x ) 0 A fixed point can be stable or unstable

stable: f’(t) < 0 unstable: f’(t) > 0 A usual method for analysis is phase portrait: Plotting dx/dt vs x

Page 11: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Example

A simple model for growth

N

N

Page 12: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linearization

Linearization is a technique for analyzing stability of li tnonlinear systems:

x*: fixed point, dy/dt = yf’(x*): linearized version stable: f’(x*) < 0 unstable: f’(x*) > 0stable: f (x ) 0 unstable: f (x ) 0 However, the results are locally valid (around the

fixed point)

Page 13: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

2-D systemsy• Consider 2D ODE:

dx/dt = f (x y)dx/dt = f1(x,y)dy/dt = f2(x,y)

• Different kinds of analysis for 2D ODE systems▫ Equilibria: determine type(s)▫ Transient or long-term behavior

• Different types of equilibriaSt bilit• Stability▫ Stable▫ Unstable▫ Saddle▫ Saddle

• Convergence type▫ Node▫ Spiral (or focus)p ( )

Page 14: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Equilibria: nodes

Ws Wu

Stable node Unstable node

Node has two (un)stable manifoldsNode has two (un)stable manifolds

Page 15: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Equilibria: saddle

Wu

Ws

Saddle point

Saddle has one stable & one unstable manifoldSaddle has one stable & one unstable manifold

Page 16: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Equilibria: foci

Ws Wu

Stable spiral Unstable spiral

Spiral has one (un)stable (complex) manifoldSpiral has one (un)stable (complex) manifold

Page 17: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

In generalg

• Consider a linear 2D continuous-time dynamical system y yas dx/dt = Ax, where A is a 2-by-2 matrix and x = (x1,x2).

• The eigenvalues of A indicate stability of the system:• stable node: two negative real eigenvalues stable• stable node: two negative real eigenvalues stable• unstable node: two positive real eigenvalues unstable• stable spiral: complex eigenvalues with negative real value

stablestable• unstable node: complex eigenvalues with positive real value

unstableSaddle: one negative real eigenvalue and one positive real• Saddle: one negative real eigenvalue and one positive real eigenvalues unstable

Page 18: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Asymptotic stabilityy y

• Consider a general continuous-time dynamical system g y yas dx/dt = Ax, where A is state-space matrix.

• The system is called asymptotic stable if starting from any initial condition as t ∞ then x 0 (the fixedany initial condition, as t ∞, then x 0 (the fixed point of the above dynamical system)

• It can be shown that linear continuous-time dynamical systems are asymptotic stable, iff, the eigenvalues of A have negative real part.

Page 19: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Asymptotic stability in discrete-time

• for discrete-time dynamical systems with equations as y y qx(n+1) = Ax(n), where A is state-space matrix:

• The system is asymptotic stable, iff, the eigenvalues of A are inside the unit circle (i e have absolute value lessare inside the unit circle (i.e., have absolute value less than 1).

Page 20: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linear Stability Analysisy y• For nonlinear systems, we study the qualitative behavior

near the fixed pointsnear the fixed points▫ 1) Finding the fixed points▫ 2) Linearizing the system near the fixed points

3) Cl if i th fi d i t▫ 3) Classifying the fixed points

Page 21: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Equilibria: determination

• How do we determine the type of equilibrium?yp q• Linearization of point• Eigenfunction

Li i ti f ilib i i th di i• Linearisation of equilibrium in more than one dimension partial derivatives

• Jacobian:

Page 22: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Eigenfunctiong

• Determine eigenvalues (λ) and eigenvectors (v) from g ( ) g ( )Jacobian

Of course there are two solutions for a 2D system• Of course there are two solutions for a 2D system

If λ 0 t bl λ 0 t bl• If λ < 0 stable, λ > 0 unstable• If two λ complex pair spiral

Page 23: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Finding the fixed pointsFinding the fixed points

dx ),(

dy

yxfdtdx

),( yxgdtdy

• NullClines:0),( :nullcline yxf

dtdxx

0),( :nullcline yxgdtdyy

dt

The intersections of nullclines are the fixed points

Page 24: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Example: Lotka-Volterra competition

• Rabbits x(t) vs. Sheep y(t) :growth logisticRabbits x(t) vs. Sheep y(t)

xx

dkxxr

dtdx

)1( Rabbits reproduce

yy

kkrr

kxxr

dtdy

)1(more Sheep reproduce less

yxyx kkrr ,

:ncompetitiogrowth logisticSheep are stronger

yx

x

xdy

yckxxr

dtdx

)1( Sheep are stronger Rabbits are weaker

xy

xy

y

cc

xckxyr

dtdy

)1(

Page 25: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lotka-Volterra competitiono a o e a co pe o

• Numerical example:d • Numerical example:)1(

xdy

yckxxr

dtdx

yx

x )33( yxx

dtdx

)1( xckxyr

dtdy

xy

y )2( yxy

dtdy

x :nullclines x Fixed points

yx

xyxx

dtdx

x

330

0)33(0

:nullclines x Fixed points

ydy

y0

0)2(0

:nullclines

yxy

yxydtdy

20)2(0

y

Page 26: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linearizationea a o

• Equations: ),( txfdxEquations:

),(

),(

txgdtdy

txfdt

• Fixed point:▫ Intersection of nullclines

dt

)dtdy

dtdx(yx 0,0 ),( 00

00

• Perturbation: 0xx

• Stability: 0yy

tt 0)(0)(

tttt 0)(,0)(

Page 27: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linearization

xx 0

yxfdtdx

dtxxd

dtd

xx

),()( 0

0

Oy

yxfx

yxfyxfyxfyxfdtd

dtdtdt

)2(),(),( ),(),(),( 00000000

Si ill ly

yxfx

yxfdtd

),(),( 0000

yyxg

xyxg

dtdSimillarly

),(),(

:

0000 y

Page 28: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Linearization

),(),( 0000 yxfyxfd

),(),(

0000

yyxg

xyxg

dtd

yxdt

ff

y

)0

,0

(

.

yxy

g

x

g

yx

derivit ive of equivalent 2D :MatrixJacobian T he

gg

y

f

x

f

A

)0

,0

(

yxy

g

x

g

Page 29: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Example: Lotka-Volterra competitionExample: Lotka Volterra competition

dx

)2(

)33(

yxydy

yxxdtdx

t iJ biP i tFi d

)2( yxydt

(0,0)

:matrixJacobian :Points Fixed

(1 5 0 5)2y -x-2 y -

2x- 2y -2x-3A (0,2)

)0,3((1.5,0.5)

Page 30: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lotka-Volterra competitionLotka Volterra competition

i liJ biP iFi d

2,3 200 3

A (0,0)

seigenvalue :matrixJacobian :PointFixed

2 0

x

Unstable nodeUnstable node

y

Page 31: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lotka-Volterra competitionLotka Volterra competition

i liJ biP iFi d

2,1 22

0 1-A (0,2)

seigenvalue :matrixJacobian :PointFixed

2- 2-

x

St bl N dStable Node

y

Page 32: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lotka-Volterra competitionLotka Volterra competition

i liJ biP iFi d

1,3 106- 3-

A (3,0)

seigenvalue :matrixJacobian :PointFixed

1- 0

x

St bl N dStable Node

y

Page 33: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lotka-Volterra competitionLotka Volterra competition

i liJ biP iFi d

21 112- 1-

A (1,1)

seigenvalue :matrixJacobian :PointFixed

1- 1-

x

S ddl P i tSaddle Point

y

Page 34: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Phase Portrait of the Lotka-Volterra systemsystem

xStable Manifold=Basin Boundary=SeparatrixSeparatrix

Sheep

Basin of (3,0)

yRabbits

Page 35: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lyapunov methody

Basic idea:If h l f h i l ( l i l) i• If the total energy of a mechanical (or electrical) system is continuously dissipated, then the system, where linear or nonlinear, must eventually settle down to an equilibrium , y qpoint.

Definition: A scalar continuous function V(x) is said to be locally positive definite if V(0) = 0 and

0)( x 0x V• If V(0) and the above property holds over the whole state

space, then V(x) is said to be globally positive definite.

Page 36: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Lyapunov methody

• V(x) represents an implicit function of time t.A i h V( ) i diff i bl• Assuming that V(x) is differentiable:

(x) f(x)dV V VV x

• Definition: If, the function V(x) is positive definite and has

f(x)x x

V xdt

continuous partial derivatives, and if its time derivative along any state trajectory of system is negative definite, i. e.,

( )

• then V(x) is said to be a Laypunov function for the system.If L f ti b f d f t it i

(x) 0V

• If a Lyapunov function can be found for a system, it is globally asymptotically stable.

Page 37: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Example

A simple pendulum with viscous damping

Consider a locally positive definite

sin 0

y p

:total energy of the pendulum2

(x) (1-cos )2

V

–The origin is a stable equilibrium point2(x) sin 0V -(x) sin 0V

Page 38: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Chaos (or strange attractor)( g )

• Do not confuse chaotic with random:R dRandom:▫ irreproducible and unpredictable

Chaotic:C▫ deterministic - same initial conditions lead to same final state…

but the final state is very different for small changes to initial conditions

▫ difficult or impossible to make long-term predictions

Page 39: Lecture18 Introduction to Dynamical Systemsce.sharif.edu/courses/92-93/1/ce957-1/resources/root/Lectures/Lectu… · dV V V Vx • Definition: If, the function V(x) is positive definite

Readingg

• S Haykin, Neural Networks: A Comprehensive y , pFoundation, 2007 (Chapter 14).