Lecture18 Introduction to Dynamical...
Transcript of Lecture18 Introduction to Dynamical...
Lecture 18: Introduction to D i l S tDynamical Systems
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
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
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
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???
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!!
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
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
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.
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
Example
A simple model for growth
N
N
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)
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 ( )
Equilibria: nodes
Ws Wu
Stable node Unstable node
Node has two (un)stable manifoldsNode has two (un)stable manifolds
Equilibria: saddle
Wu
Ws
Saddle point
Saddle has one stable & one unstable manifoldSaddle has one stable & one unstable manifold
Equilibria: foci
Ws Wu
Stable spiral Unstable spiral
Spiral has one (un)stable (complex) manifoldSpiral has one (un)stable (complex) manifold
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
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.
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).
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
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:
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
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
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(
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
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)(
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
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
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)
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
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
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
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
Phase Portrait of the Lotka-Volterra systemsystem
xStable Manifold=Basin Boundary=SeparatrixSeparatrix
Sheep
Basin of (3,0)
yRabbits
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.
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.
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
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
Readingg
• S Haykin, Neural Networks: A Comprehensive y , pFoundation, 2007 (Chapter 14).