fundamentals of dynamical systems / discrete-time...

Post on 25-Jul-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Dr. Dylan McNamarapeople.uncw.edu/

mcnamarad

Fundamentals of Dynamical Systems / Discrete-Time Models

Dynamical systems theory

• Considers how systems autonomouslychange along time– Ranges from Newtonian mechanics tomodern nonlinear dynamics theories

– Probes underlying dynamical mechanisms,not just static properties of observations

– Provides a suite of tools useful forstudying complex systems

What is a dynamical system?

• A system whose state is uniquelyspecified by a finite set of variablesand whose behavior is uniquelydetermined by predetermined "rules"

– Simple population growth– Simple pendulum swinging– Motion of celestial bodies– Behavior of two “rational” agents in anegotiation game

Mathematical formulations of dynamical systems

• Discrete-time model:xt = F(xt-1, t)

• Continuous-time model: (differential equations) dx/dt = F(x, t) xt: State variable(s) of the system at time t F: Some function that determines the rule

that the system’s behavior will obey

(difference/recurrence equations; iterative maps)

Discrete-Time Models

Discrete-time model

• Easy to understand, develop andsimulate– Doesn’t require an expression for the rateof change (derivative)

– Can model abrupt changes and/or chaoticdynamics using fewer variables

– Directly translatable to simulation in acomputer

– Experimentally, we often have samples ofsystem states at specific points of time

Difference equation and time series

• Difference equationxt = F(xt-1, t)

produces series of values of variable x starting with initial condition x0:

{ x0, x1, x2, x3, … } “time series”

– A prediction made by the above model(to be compared to experimental data)

Linear vs. nonlinear

• Linear:– Right hand side is just a first-orderpolynomial of variablesxt = a xt-1 + b xt-2 + c xt-3 …

• Nonlinear:– Anything else

xt = a xt-1 + b xt-22 + c xt-1 xt-3 …

1st-order vs. higher-order

• 1st-order:– Right hand side refers only to theimmediate pastxt = a xt-1 ( 1 – xt-1 )

• Higher-order:– Anything else

xt = a xt-1 + b xt-2 + c xt-3 …

(Note: this is different from the order of terms in polynomials)

Autonomous vs. non-autonomous

• Autonomous:– Right hand side includes only statevariables (x) and not t itselfxt = a xt-1 xt-2 + b xt-3

2

• Non-autonomous:– Right hand side includes terms thatexplicitly depend on the value of txt = a xt-1 xt-2 + b xt-3

2 + sin(t)

Things that you should know (1)

• Non-autonomous, higher-orderequations can always be convertedinto autonomous, 1st-order equations– xt-2 → yt-1, yt = xt-1

– t → yt, yt = yt-1 + 1, y0 = 0

• Autonomous 1st-order equations cancover dynamics of any non-autonomoushigher-order equations too!

Things that you should know (2)

• Linear equations– are analytically solvable– show either equilibrium, exponentialgrowth/decay, periodic oscillation (with>1 variables), or their combination

• Nonlinear equations– may show more complex behaviors– do not have analytical solutions in general

Simulating Discrete-Time Models

Simulating discrete-time models

• Simulation of a discrete-time modelcan be implemented by iteratingupdating of the system’s states

– Every iteration represents one discretetime step

Exercise

• Implement simulators of the followingmodels and produce time series for t= 1~10

xt = 2 xt-1 + 1, x0 = 1

xt = xt-12 + 1, x0 = 1

Exercise

• Simulate the following set ofequations and see what happens if thecoefficients are varied

xt = 0.5 xt-1 + 1 yt-1

yt = -0.5 xt-1 + 1 yt-1

x0 = 1, y0 = 1

Building Your Own Model Equation

Mathematical modeling tips

• Grab an existing model and tweak it

• Implement each assumption one by one

• Find where to change, replace it by afunction, and design the function

• Adopt the simplest form

• Check the model with extreme values

Example: Saturation of growth

• Simple exponential growth model:xt = a xt-1

• Problem: How can one implement thesaturation of growth in this model?

• Think about a new nonlinear model:

xt = f(xt-1) xt-1

– Coefficient replaced by a function of x

Modeling saturation of growth

xt = f(xt-1) xt-1

• f(x) should approach 1 (no netgrowth) when x goes to a carrying capacity of the environment, say K

• f(x) should approach the originalgrowth rate a when x is very small (i.e., with no saturation effect)

What should f(x) be?

f(x)

x K

1

a

0

f(x) = – x + aa – 1 K

A new model of growth

xt = f(xt-1) xt-1

= ( – (a – 1) xt-1 / K + a ) xt-1

• Using r = a – 1:

xt = ( – r xt-1 / K + r + 1 ) xt-1

= xt-1 + r xt-1 ( 1 – xt-1 / K ) Net growth

Example: Logistic growth model

• N: Population• r: Population growth rate• K: Carrying capacity

• Discrete-time version:Nt = Nt-1 + r Nt-1 ( 1 – Nt-1/K )

• Continuous-time version:dN/dt = r N ( 1 – N/K )

Nonlinear terms

• Problem: Develop a nonlinear model ofa simple ecosystem made of predatorand prey populations

Modeling with multiple variables

Think about how variables behave in isolation

Naturally grows to carrying capacity

if isolated

+ Naturally decays

if isolated

-

Rabbit Population : x

Fox Population : y

Initial assumptions

• Rabbits will grow based on the logisticgrowth model, with carrying capacity= 1 for simplicity

• Foxes will decay exponentially

Rabbit: xt = xt-1 + a xt-1 (1 – xt-1) Fox: yt = b yt-1

(0<a, 0<b<1)

Naturally grows to carrying capacity

if isolated

Naturally decays if isolated

Think about how variables interact with each other

+ -

Positive influence Foxes’ growth rate

increases with increasing rabbits +

Negative influence Rabbits’ survival rate

decreases with increasing foxes

- Rabbit Population : x

Fox Population : y

Revised model • Introduced coefficient (1 – c yt-1) (0<c) to

the first term of x – Negative influence of foxes on rabbits’ survival

rate• Replaced b with (b + d xt-1) (0<d)

– Positive influence of rabbits on foxes’ growthrate

Rabbit: xt = (1 – c yt-1) xt-1+ a xt-1 (1 - xt-1)

Fox: yt = (b + d xt-1) yt-1 (0<a, 0<b<1, 0<c, 0<d)

FYI: Lotka-Volterra model

• This model can be rewritten as:xt – xt-1 = α xt-1 (1-xt-1) – β xt-1 yt-1 yt – yt-1 = - γ yt-1 + δ xt-1 yt-1

– Known as the “Lotka-Volterra” equations (ofdiscrete-time version with carrying capacity)

– Models predator-prey dynamics in a generalform

– One of the most famous nonlinear systems withmultiple variables

Analysis of Discrete-Time Models

Equilibrium point

• A state of the system at which statewill not change over time– A.k.a. fixed point, steady state

• Can be calculated by solving

xt = xt-1

Exercise

• Calculate equilibrium points in thefollowing models

Nt = Nt-1 + r Nt-1 ( 1 – Nt-1/K )

xt = 2xt-1 – xt-12

xt = xt-1 – xt-22 + 1

Phase Space Visualization

Geometrical approach

• Developed in the late 19Cby J. Henri Poincare

• Visualizes the behavior ofdynamical systems astrajectories in a phase space

• Produces a lot of intuitive insights ongeometrical structure of dynamicsthat would be hard to infer usingpurely algebraic methods

Phase space (state space)

• A theoretical space in which everystate of a dynamical system ismapped to a spatial location

Phase space (state space)

• Created by “orthogonalizing” statevariables of the system

• Its dimensionality equals # ofvariables needed to specify thesystem state (a.k.a. degrees offreedom)

• Temporal change of the system statescan be drawn in it as a trajectory

Attractor and basin of attraction

• Attractor:A state (or a set of states) fromwhich no outgoing edges or flowsrunning in phase space– Static attractors (equilibrium points)– Dynamic attractors (e.g. limit cycles)

• Basin of attraction:A set of states which will eventuallyend up in a given attractor

• E.g. a simple vertical spring oscillator• State can be specified by two realvariables (location x, velocity v)

v

x Trajectory

(orbit)

Dynamics of continuous models can be depicted as “flow” in a continuous phase space

Phase space of continuous-state models

Cobweb plot

• A visual tool to study the behavior of1-D iterative maps

• Take xt-1 and xt for two axes• Draw the map of interest (xt=F(xt-1))and the “xt=xt-1” reference line– They will intersect at “equilibrium points”

• Trace how time series develop froman initial value by jumping betweenthese two curves

Cobweb Plot

Cobweb Plot

Rescaling Variables

Rescaling variables

• Dynamics of a system won’t changequalitatively by linear rescaling ofvariables (e.g., x → α x’)

• You can set arbitrary rescalingfactors for variables to simplify themodel equations

• If you have k variables, you mayeliminate k parameters

Exercise

• Simplify the logistic growth model byrescaling x → α x’

xt = xt-1 + r xt-1 (1 - xt-1/K)

Linear Systems

Dynamics of linear systems

• Some systems can be modeled aslinear systems– Their dynamics is described by a productof matrix and state vector

– Either in continuous or discrete time

• Dynamics of such linear systems canbe studied analytically

Linear systems

• Linear systems are the simplest caseswhere states of nodes are continuous-valued and their dynamics aredescribed by a time-invariant matrix

• Discrete-time: xt = A xt-1

– A is called a “coefficient” matrix

– We don’t consider constants (as they canbe easily converted to the above forms)

Asymptotic Behavior of Linear Systems

xt = A xt-1

This equation gives the following exact solution:

xt = At x0

Where will the system go eventually?

xt = A xt-1

• What happens if the system startsfrom non-equilibrium initial states andgoes on for a long period of time?

• Let’s think about their asymptoticbehavior lim t->∞ xt

Where will the system go eventually?

Considering asymptotic behavior (1)

• Let { vi } be n linearly independenteigenvectors of the coefficient matrix (They might be fewer than n, but here we ignore such cases for simplicity)

• Write the initial condition usingeigenvectors, i.e.x0 = b1v1 + b2v2 + ... + bnvn

Considering asymptotic behavior (2)

• Then:

xt = At x0 = λ1

t b1v1 + λ2t b2v2 + … + λn

t bnvn

Dominant eigenvector • If |λ1| > |λ2|, |λ3|, …,

xt = λ1t { b1v1 + (λ2/λ1)t b2v2 + ... + (λn/λ1)t bnvn }

lim t->∞ xt ~ λ1t b1v1

If the system has just one such dominant eigenvector v1, its state will be eventually along that vector regardless of where it starts

What eigenvalues and eigenvectors can tell us

• An eigenvalue tells whether aparticular “state” of the system(specified by its correspondingeigenvectors) grows or shrinks byinteractions between parts

– | λ | > 1 -> growing– | λ | < 1 -> shrinking

Example • Phase space of a two-variable linear difference

equation with (a, b, c, d) = (1, 0.1, 0.1, 0.9)

x

y

Along these lines (called

invariant lines), the dynamics

can be understood as

simple exponential

growth/decay

|λ1|>1

|λ2|<1 v1

v2

Example

x

y

This could be regarded as a very simple form of self-organization (though completely predictable); Order spontaneously emerges in

the system as time goes on

Linear Stability Analysis of Nonlinear Systems

Stability of equilibrium points

• If a system at its equilibrium point isslightly perturbed, what happens?

• The equilibrium point is called:– Stable (or asymptotically stable) ifthe system eventually falls back to the equilibrium point

– Lyapunov stable if the system doesn’tgo far away from the equilibrium point

– Unstable otherwise

Question

• What is the stability of each of thefollowing equilibrium points?

Linear stability analysis

• Studies whether a nonlinear system isstable or not at its equilibrium pointby locally linearizing its dynamicsaround that point

Linearization

Linearization

Local linearization (1)

• Let ∆x be a small difference betweenthe system’s current state x and itsequilibrium point xe, i.e. x = xe +∆x

• Plug x = xe + ∆x into differentialequations and ignore quadratic or higher-order terms of ∆x (hence the name “linearization”)

Local linearization (2)

• This operation does the trick toconvert the dynamics of ∆x into aproduct of a matrix and ∆x

• By analyzing eigenvalues of the matrix,one can predict whether xe is stableor not – I.e. whether a small perturbation (∆x)grows or shrinks over time

Mathematically speaking…

• This operation is similar to “linearapproximation” in calculus

Taylor series expansion: F(x) = Σn=0~∞ F(n)(a)/n! (x-a)n

Let x → xe+∆x and a→xe , then F(xe+∆x) = F(xe) + F’(xe) ∆x

+ O(∆x2)Ignore

Linearizing discrete-time models

• For discrete-time models:xt = F(xt-1)Left = xe + ∆xt

Right = F(xe + ∆xt-1) ~ F(xe) + F’(xe) ∆xt-1

= xe + F’(xe) ∆xt-1

Therefore, ∆xt = F’(xe) ∆xt-1

First-order derivative of vector functions

• Discrete-time: ∆xt = F’(xe) ∆xt-1

This can hold even if x is a vector What corresponds to the first-order derivative in such a case:

F’(xe) = dF/dx(x=xe) =

∂ F1 ∂ F1 ∂ F1 ∂ x1 ∂ x2 ∂ xn

∂ F2 ∂ F2 ∂ F2 ∂ x1 ∂ x2 ∂ xn

∂ Fn ∂ Fn ∂ Fn ∂ x1 ∂ x2 ∂ xn

… … …

Jacobian matrix at x=xe

(x=xe)

Eigenvalues of Jacobian matrix

• A Jacobian matrix is a linearapproximation around the equilibriumpoint, telling you the local dynamics:“how a small perturbation will grow,shrink or rotate around that point”– The equilibrium point serves as a localorigin

– The ∆x serves as a local coordinate– Eigenvalue analysis applies

With real eigenvalues

• If all the eigenvalues indicatethat ∆x will shrink over time-> stable point

• If all the eigenvalues indicatethat ∆x will grow over time-> unstable point

• If some eigenvalues indicateshrink and others indicate growof ∆x over time-> saddle point (this is also unstable)

With two complex conjugate eigenvalues (for 2-D systems) • If both eigenvalues indicate that

∆x will shrink over time-> stable spiral focus

• If both eigenvalues indicate that∆x will grow over time-> unstable spiral focus

• If both eigenvalues indicateneither shrink nor growth of ∆x-> neutral center (but this may or maynot be true for nonlinear models; furtheranalysis is needed to check if nearbytrajectories are truly cycles or not)

• Each eigenvalue (or a pair of complexconjugate eigenvalues) tell you distinctdynamics simultaneously seen at theequilibrium point:

With real and complex eigenvalues mixed (for higher-dimm. systems)

All real eigenvalues (1 indicates growth; other 2 indicates shrink)

1 real eigenvalue indicates growth; other 2 indicates rotation (complex conjugates with no growth or shrink)

Exercise

• Find all equilibrium points of thefollowing model, and study theirstability

xt = xt-1 yt-1

yt = yt-1 (xt-1 – 1)

87

top related