You are on page 1of 39

Dynamical system

It’s worth to stress that for every dynamical system the time evolution is
unambiguously defined by the initial conditions. That is:

DYNAMICAL SYSTEM DETERMINISTIC SYSTEM

A dynamical system is a system which state is not constant but change


with time.
Generally after a transient the state of the system reach an asymptotic behavior
generally described by limited function.

116 130

125
114
Temperature (°C)

temperature 120
112

115

110
110

108
105

106 100 0
0 1 2 3 4 5 0 5 10 15 20

time time
Outline
General concepts
Dynamical systems;
Discrete systems;
Fixed points (equilibrium solutions)
Stability
Taylor series

1-D systems:
a) Flows on the line.
-)Fixed point and stability: A geometric approach
-)Linear stability analysis;
-)Impossibility of oscillations for a 1D flow.

21/03/2011 2
Dynamical systems

First of all we need to introduce some terminology and make some


distinctions. There are two main types of dynamical systems:

1) Ordinary differential equations

Is one whose state evolves (changes) with time t. The evolution is governed
by a set of rules (not necessarily equations) that specifies the state of the
system for continuous values of t.

2) Discrete time systems or difference systems

A discrete-time evolution is usually described by a system of algebraic


equations (map) and arise in problems where time is discrete

21/03/2011 3
Ordinary differential equations (ODEs)
For our purpose we will deal with purely temporal behavior. That is we
will focus our attention to the dynamical behavior of physical systems.
So we deal with ordinary differential equations almost exclusively.

Now confining our attention to differential equations, the main distinction


is between ordinary (ODEs) and partial differential equations (PDEs). For
instance, the equations for a cooled CSTR is an ordinary differential
equation system because it involves ordinary derivatives:
dC A dT
,
dt dt

That is, there is only one independent variable, the time t.


( C Ai − C A ) + k exp  −  C A
dC A F E
=
dt V  RT 
( −∆H ) k exp  − E  C − UA T − T
dT F
=
dt V
(i )
T − T +
ρ cP 
 RT
 A
 V ρ c
( j)
P

21/03/2011 4
Partial differential equations (PDEs)
In contrast the non-stationary reaction system in a Plug Flow Reactor (PFR)
is an example of partial differential equation (PDE):

∂C A ∂C
−v A + r ( C A )
=
∂t ∂x
Plug Flow Reactor
A (t
C= x ) C A,o ( x )
0,=
C A ( t, = ) C A,IN ( t )
x 0= x

It has both time t and space x as independent variables.


In order to transform the PDE in a set of ordinary differential equations
(ODEs) in time the space domain can be discretized. Among classical
numerical approaches, finite difference methods is rather simple.
All the PDEs can be reformulate as a ser of ordinary deferential equations
(ODEs).

21/03/2011 5
A very easy example: finite difference
method
To use a finite difference method to attempt to solve (or, more generally,
approximate the solution to) a problem, one must first discretize the problem's
domain. This is usually done by dividing the domain into a uniform grid (see
image to the right). Note that this means that finite-difference methods produce
sets of discrete numerical approximations to the derivative, often in a "time-
stepping" manner.
C − C Ai −1
( )
dC A,i
=
−v Ai + r C Ai for i =
1,..., N
dt h
C A ( x, t )

dC A,1 C A,1 − C A,in


=
−v + r ( C A,1 ) i=
1
dt h
dC A,2 C − C A,1
=
− v A,2 + r ( C A,2 ) i=
2
dt h
...
dC A, N C − C A, N −1
=
− v A, N + r ( C A, N ) i =
N
dt h
21/03/2011 6
Second order differential equations

Here we report the equation for a damped harmonic oscillator:

d 2x dx
m 2 +b + kx =
0
dt dt

This equation can be rewritten as a system of two differential equations
x thanks
to the trick: we introduce new variables x1=x and x2=dx/dt
Hence the equivalent system is:

 x• = x
 1 2
• b k
x2 = − x2 − x1
 m m
This system is said to be linear, because all the state variables on the right hand
side appear to the first power only. Otherwise the system would be non linear.

21/03/2011 7
Non-autonomous systems
You might worry that (1) is not general enough because doesn’t include
any explicit time dependence. How do we deal with time-dependent or
nonaoutonomous equations ?

d 2x dx
Let: m 2 +b F cos ( t )
+ kx =
dt dt

x1 = x x 1 = x2
• • b k F
x2 = x − x2 − x1 + cos ( x3 )
x2 =
m m m
x3 = t •
x3 = 1
Similarly, an nth-order non-autonomous dynamical system can be
transformed in a (n+1)-dimensional autonomous dynamical system.

By this trick, we can always remove any time dependence by adding an


extra dimension to the system.

21/03/2011 8
Differential equations: Systems
A very general framework for ordinary differential equations is provided by
the systems:


x1 = f1 ( x1 ,.... xn , p1 ,...... pm )
 (1)

xn = f n ( x1 ,.... xn , p1 ,...... pm )

Here the overdots denote differentiation respect to time. The state variables
x1,….,xn might represent concentrations in a chemical reactor, in a distillation
column, populations of different species in an ecosystem, or the position and
velocities of the planets in the solar systems……. The parameters p1,….,pm
represent free parameters of the systems …mass, density, cooling
temperature… The functions f1,….,fn are determined by the problem at hand
and represent the right hand side (rhs) .

The system (1) is a autonomous dynamical system of order n!


21/03/2011 9
Example

dC A  E 
V = F ( C Ain − C A ) + k exp  −  CA
dt  RT 
dT  E 
ρ cP
V= F ρ cP ( Tin − T ) + ( −∆H )k exp  −  C A − UA(T − Tc )
dt  RT 

It is a second order dynamical system autonomous.

(CA,T) is the state of the system.


F,V,k, E, UA,….. are the parameters.


CA f1 ( C A , T , F ,V , k , E ,UA, ∆H , ρ , c p , Tc , Tin , Cin )

T f 2 ( C A , T , F ,V , k , E ,UA, ∆H , ρ , c p , Tc , Tin , Cin )

10
Non linearity: some example

Typical non linear terms are products, powers, and functions of the state
variables. This could be the case of a chemical reaction of second order

r (C ) = K C 2

or the dependence of the reaction term by the temperature in


Arrhenious fashion.
 −E 
r ( C , T ) = exp  C
 RT 

The dependences of parameters such as thermal conductivity and/or


capacity …etc make the problem non linear.

∂T ∂ 2T
ρ c p (T ) = K (T ) 2
∂t ∂x

21/03/2011 11
Non linearity….

An easy adsorption problem if the isothermal adsorption is non linear became a


non linear problem.

∂C Da ∂  ∂C  ∂C (1 − ε ) ∂q
=  r +
 r v − .
∂t r ∂r  ∂r  ∂r ε ∂t

∂q
= k1 ( q* − q ) .
∂t

 Freundlich isotherm q=KC1/ n



q* ( C ) = NON LINEAR FUNCTION  KC
=

Langmuir isotherm q
1 + KC

21/03/2011 12
Transient
……

15

dimensioless temperature

10 From a mathematical point


of view:

Initial conditions
Steady state x= 0λ= F ( x, )
5

0
0 5

dimensionless time

13
Differential equations: asymptotic
behavior
The asymptotic behavior of a dynamical system as t� � is called the regime of
the system. Often, this regime may correspond to a bounded set, which may
be either a static solution or a dynamic solution. The behavior
of the dynamical system prior to reaching the regime is called the transient
state, and the corresponding solution of the dynamical system is called the
transient solution.

Fixed points, equilibrium solutions, and stationary solutions are other names
for constant solutions, while dynamic solutions is another name for time-
varying solutions , periodic regimes or limit cycle.

We explore fixed points solutions in first part of the course and dynamic
solutions in second one.

21/03/2011 14
Example: dynamical regimes

( C Ai − C A ) + k exp  −  C A
dC A F E
=
dt V  RT 
( −∆H ) k exp  − E  C − UA T − T
dT F
=
dt V
(Ti − T ) +
ρ cP 
 RT 
 A
V ρ cP
( j)

Fixed Point Periodic Regime


116 130

125
114
Temperature (°C)

120

temperature
112

115

110
110

108
105

106 100 0
0 1 2 3 4 5 0 5 10 15 20

time time

21/03/2011 15
Phase space and Phase portrait
Phase space (also called state space) is the set of all possible states of a dynamical
system; each state of the system corresponds to a unique point in the state space.
For example, the state of the previously described CSTR dynamcal system is
uniquely defined by its CA and temperature T, so the state space is the set of all
possible pairs (CA,T).
The number of degrees of freedom of a dynamical system is the dimension of its
phase space, i.e., the number of variables the modeler feels is needed to completely
describe the system

Dynamical regimes, such as a fixed points or periodic oscillation, correspond to


geometric objects, such as a point or a closed curve, in the phase space. Evolution of
a dynamical system corresponds to a trajectory (or an orbit) in the phase space.
Different initial states result in different trajectories. The set of all trajectories forms
the phase portrait of a dynamical system, though in practice, only representative
trajectories are considered. Since it is usually impossible to derive an explicit
formula for the solution of a nonlinear equation, the analysis of phase portraits
provides an extremely useful way for visualizing and understanding qualitative
features of solutions.

21/03/2011 16
Phase portrait 2D system
Suppose that we are able to know a solution of a 2D-system (the CSTR one
for example), for a particular initial condition (CA(0), T(0)). This solution
would be a pair of time function CA(t) and T(t) representing the state of
the system. If we construct a space with coordinates (CA,T), then the
solution (CA(t), T(t)) corresponds to a point moving along a curve in this
space. This curve is called a trajectory, and the space is called phase space.

(CA(0),T(0))
116 1.0

0.8
114
Fixed point
Temperature (°C)

Temperature
0.6
112

0.4

110
(CA(t),T(t))
0.2

108
0.0

106
0 1 2 3 4 5 xA
time
21/03/2011 17
Phase portrait 2D system:periodic
regime

130

(CA(0),T(0))
1.0

125
0.8
Red line periodic regime
120

Temperature
temperature

0.6

115

0.4
110

0.2
(CA(t),T(t))
105

100 0.0
0 5 10 15 20

time XA

21/03/2011 18
Fixed point: Equilibrium Solutions

Consider a general autonomous vector field:



=x f ( x) x ∈ n
A fixed point is a point x*, such that:

= f ( x *) 0 x* ∈  n
That is, x* a solution which does not change in time. Other
terms often substituted for the term "equilibrium solution"
are "fixed point," "stationary point,” "rest point,"
"singularity," "critical point," or "steady state.
Once we find any solution x* it is natural to try to determine
If the solution is stable or not.

21/03/2011 19
Taylor series: 1D case
Taylor series give approximation of a function using derivatives of this
function. 2 n

f ( x ) ≈ f ( x0 ) + f ' ( x0 )( x − x0 ) +
f ( x0 ) f ( x0 )
( x − x0 ) + ... + ( x − x0 ) + ...
2 n

2! n!
In general the Taylor series gives approximation of a function using
polynomial of infinite degree. For example:
2 3
x x
e ≈ 1+ x + + + O ( x) x0 =
x 4
0
2 6
The most simple type of approximation is a linear approximation (which is
closely connected to the definition of the derivative):
f ( x ) ≈ f ( x0 ) + f ' ( x0 )( x − x0 ) =a + b ( x − x0 )

Special case of Tayor series approximation of a function around the point


x0=0 is the so called Maclaurin series:
f 2 (0) 2 f n (0) n
f ( x ) ≈ f (0) + f ' (0) x + x + ... + x + ...
2! n!

21/03/2011 20
Taylor series: 2D case

Taylor series for a function of two variables is:


∂ 2 f ( x − x0 ) ∂ 2 f ( y − y0 )
2 2
∂f ∂f ∂2 f
f ( x, y ) ≈ f ( x0 , y0 ) + ( x − x0 ) + ( y − y0 ) + 2 + 2 + ( x − x0 )( y − y0 ) + ...
∂x ∂y ∂x 2 ∂y 2 ∂xy

In such a case the simplest approximation of the function f(x,y) is the following
planar function, that is the equivalent of the linear function of the 1D case previously
discussed:
∂f ∂f
f ( x, y ) ≈ f ( x0 , y0 ) + ( x − x0 ) + ( y − y0 ) =a + b ( x − x0 ) + c ( y − y0 )
∂x ∂y

Maclaurin series which gives approximation of a function around the point x0=0,
y0=0 is :
∂f ∂f ∂2 f x2 ∂2 f y2 ∂2 f
f ( x, y ) ≈ f ( 0,0 ) + x+ y+ 2 + + xy + ...
∂x ∂y ∂x 2 ∂y 2 2 ∂xy

The main idea behind the Taylor series: we try to approximate our function of two
variables by polynomials of x,y in such a way, that the approximation and our
function have the same value and the same partial derivatives at the given point

21/03/2011 21
Implicit function theorem

Consider a function
F(x, y)
where
F : Rn×Rm → Rn,
is a smooth function defined in a neighborhood of (x, y)=(0,0) and such that F(0,0)= 0.
Let Fx(0,0) denote the matrix of first partial derivatives of F with respect to x
evaluated at (0, 0):
 ∂Fi ( x, y ) 
Fx ( 0,0 ) = 
 ∂x j 
 
( x , y ) =(0,0)

Implicit Function Theorem: If the matrix Fx(0, 0) is nonsingular, then there is a smooth
locally defined function x = f(y),
f: Rn → Rm,
Such that
F( f(y),y) = 0,
for all x in some neighborhood of the origin of Rn.

Note: y could be a parameter!

21/03/2011 22
Dynamical systems: 1D system

Previously we have discussed a generic n-dimensional dynamical system



x1 = f1 ( x1 ,.... xn , p1 ,...... pm )


xn = f n ( x1 ,.... xn , p1 ,...... pm )
and mentioned that its solutions could be visualized as trajectories flowing
through an n-dimensional phase space with coordinates. At the moment, this
idea probably strikes you as a mind-bending abstraction. So let's start slowly,
beginning here on earth with the simple case n=1 . Then we get a single equation
of the form

x = f ( x)

Here x(t) is a real-valued function of time t , and f(x) is a smooth real-valued


function of x. We'll call such equations one-dimensional or first-order systems.
We do not allow f to depend explicitly on time. Time-dependent or
nonautonomous equations of the form dx/dt =f(x,t) are more complicated,
because one needs two pieces of information, x and t, to predict the future state
of the system. Thus dx/dt = f(x,t) should really be regarded as a two-dimensional
or second-order system.
21/03/2011 23
Flow on the line: A Geometric Way of Thinking

Pictures are often more helpful than formulas for analyzing nonlinear systems.
Here we illustrate this point by a simple example. Along the way we will introduce
one of the most basic techniques of dynamics: interpreting a differential equation as
a vector field.
dx
= sin( x )
dt
x ( 0 ) = x0
This equation could be solved in a closed form:
 csc ( x 0 ) + cot ( x 0 ) 
t = ln  
 csc ( x ) + cot ( x ) 
This result is exact but headache to interpret. For example, we can try to answer to
the following questions:

For an arbitrary initial condition x0what is the behavior of the trajectory x(t), in
particular for t� � ????

Think about these questions for a while, to see that formula is not transparent.
21/03/2011 24
Flow on the line: A Geometric Way of Thinking
Then the differential equation represents a vector field on the line: it dictates the
velocity vector dx/dt at each x . To sketch the vector field, it is convenient to plot
dx/dt versus x , and then draw arrows on the x-axis to indicate the corresponding
velocity vector at each x. The arrows point to the right when dx/dt > 0 and to the left
when dx/dt < 0.

As shown in figure, the flow is to the right when dx/dt> 0 and to the left when dx/dt<
0. At points where x = kπ, there is no l flow; such points are therefore called fixed
points. You can see that there are two kinds of fixed points in figure : solid black dots
represent stable fixed points (often called attractors or sinks, because the flow is
toward them) and open circles represent unstable fixed points (also known as
repellers or sources).

21/03/2011 25
Flow on the line: A Geometric Way of Thinking

This approach allows us to answer the questions above as follows:


Previous Figure shows that a particle starting at x0 = π/4 moves to the right faster
and faster until it crosses x = π/2 (where sin(x) reaches its maximum). Then the
particle starts slowing down and eventually approaches the stable fixed point x= π
from the left. Thus, the qualitative form of the solution is as shown:
Note that the curve is concave up at first, and then concave down; this corresponds
to the initial acceleration for x < π /2 followed by the deceleration toward x = π.

In all honesty, we should admit that a picture can't tell us certain quantitative
things: for instance, we don't know the time at which the speed dx/dt is greatest.

21/03/2011 26
Fixed points and stability 1
The ideas previously developed can be extended to any one-dimensional system
dx/dt=f(x). We just need to draw the graph of f(x) and then use it to sketch the
vector field on the real line (the x-axis).
As before, we imagine that a fluid is flowing along the real line with a local velocity
f (x). This imaginary fluid is called the phase fluid, and the real line is the phase
space. The flow is to the right where f (x) >0 and to the left where f (x) < 0.

21/03/2011 27
Fixed points and stability 2

The appearance of the phase portrait is controlled by the fixed points x *, defined
by f(x*) = 0 ; they correspond to fixed points of the flow. In figure, the solid black
dot is a stable fixed point (the local flow is toward it) and the open dot is an
unstable fixed point (the flow is away from it).
In terms of the original differential equation, fixed points represent equilibrium
solutions (sometimes called steady, constant, or rest solutions, since if x=x* initially,
then x(t) = x* for all time).
An equilibrium is defined to be asymptotically stable if all sufficiently small
disturbances away from it damp out in time. Thus stable equilibria are represented
geometrically by stable fixed points. Conversely, unstable equilibria, in which
disturbances grow in time, are represented by unstable fixed points.

21/03/2011 28
Locally stable and globally stable
Note that the definition of stable fixed point is based on small disturbances:
certain large disturbances may fail to decay.

dN  N dx  x  x 2
= rN  1 −  = rx  1 −  −
dt  K dτ  k  1+ x
2

Globally Stable Locally Stable


The system approach this point for The system approach this point for a finite
ALL initial conditions. set of initial conditions.
The effect of the initial conditions: Basin of
Attraction
The basin of attraction of a stable fixed point x* is the set of values of x such that, if
x is initially somewhere in that set, it will subsequently move to the fixed point x*

1 dx  x x FIXED POINTS
 x x
= r 1 −  − ⇒ r 1 −  − = 0
 k  1+ x   +
2 2
x dt k 1 x

x (=
t 0 ) ∈ [0,2[ x ( t = 0 ) ∈ [2, ∞[
dx/dt

-0

0 1 2 3 4

21/03/2011 30
The effect of the initial conditions: Basin of
Attraction
dx/dt

-0

0 1 2 3 4

x
4

3
N

0
0 50 100 150 200 250
time

21/03/2011 31
Change of variables

We will use Taylor series for qualitative study of differential equations. Our main
method will be to expand the right hand sides of our equation close to equilibrium
point into a Taylor series and study it. We have also seen, that Maclaurin series are
simpler that Taylor series.
We can understand it from the following simple consideration. Assume that we have
a differential whit an equilibrium point (x*,c*) which is not located at the origin (0,0)
dx
= f ( x, c ) f ( x*, c *=) 0 x* ≠ 0, c* ≠ 0
dt
In turns out, that we can always shift the equilibrium point to the point (0,0) by a
linear change of the variables. To this aim we introduce a new variable and a new
parameter:
y (t ) =
x (t ) − x*, d =c − c*
Such that:

dx d ( y + x*) dy
= = = f ( y + x*, d + c*) = F ( y , d )
dt dt dt
THEN:
dy
= F=( y, d ) F ( 0,0 ) 0
dt
21/03/2011 32
Linear stability analysis

So far we have relied on graphical methods to determine the stability of fixed


points. Frequently one would like to have a more quantitative measure of stability,
such as the rate of decay to a stable fixed point. This sort of information may be
obtained by linearizing about a fixed point, as we now explain.
Let x* a fixed point and let y(t) = x(t) - x* be a small perturbation away from x*. To
see whether the perturbation grows or decays, we derive a differential equation for
y(t).
dy d ( x − x *) dx
= =
dt dt dt
dy
= f (x *+ y)
dt

Now using Taylor's expansion we obtain:

y ) f ( x *) + f '( x*) y + 0 ( y
f ( x * += 2
)
21/03/2011 33
Linear stability analysis

Finally, note that f(x*) = 0 since x * is a fixed point. Hence

dy
= f ( x * + y ) ≈ f ' ( x *) y ⇒ y ( y=
) yt =0 Exp ( f '( x*) t )
dt

Now if f(x*)� 0 , the 0(y2) terms are negligible and we may write the approximation.

This is a linear equation in y, and is called the linearization about x*. It shows that the
perturbation y(t) grows exponentially if f'(x*)>0 and decays if f'(x*)<0.

If f'(x*)= 0, the 0(y2) terms are not negligible and a


nonlinear analysis is needed to determine stability.

21/03/2011 34
Hyperbolic equilibrium: definition

Let be (x*,c*) an equilibrium point of the system


dx
= f ( x, c )
dt
∂f ( x*, c*)
a) (x*,c*) is called HYPERBOLIC equilibrium if ≠0
∂x
∂f ( x*, c*)
b) (x*,c*) is called NON-HYPERBOLIC if =0
∂x

Implicit Function Theorem Revisited:

Suppose that: dx
= f ( x, c )
dt
Has a stable (non stable) fixed point at x=0, c=0 whit:
∂f (0,0)
≠0
∂x
Then there is a neighborhood of c=0 in which our equation has an equilibrium point
with the same stability.
21/03/2011 35
Simplified Proof
The fact that the system has an equilibrium point (fixed point) in (0,0) means that
f(0,0)=0. We also assumed that:
∂f (0,0)
≠0
∂x
Let now approximate our function using Maclaurin series
∂f
a=
dx ∂f ∂f ∂x
=f ( x, c ) ≈ f ( 0,0 ) + x+ c= ax + bc
dt ∂x ∂c ∂f
b=
∂c
To proof the theorem we need to show that the last equation has a fixed point at c
close to c=0, and the stability of this equilibrium is the same as stability of equilibrium
at c=0.
1) Find fixed points:
b
x= − c
a
Since a� 0 we can always find one equilibrium of our system close to c=0

2) Stability ∂ ( ax + bc ) ∂f
= a=
∂x ∂x
21/03/2011 36
Impossibility of Oscillations

Fixed points dominate the dynamics of first-order systems. In all our examples all
trajectories either approached a fixed point, or diverge. In fact, those are the only
things that can happen for a vector field on the real line. The reason is that
trajectories are forced to increase or decrease monotonically, or remain constant .To
put it more geometrically, the phase point never reverses direction.

Thus, if a fixed point is regarded as an equilibrium solution, the approach to fixed


point is always monotonic-overshoot and damped oscillations can never occur in a
first-order system. For the same reason, undamped oscillations are impossible.

Hence there are no periodic solutions to dx/dt = f (x) .

These general results are fundamentally topological in origin. They reflect the fact that
dx/dt = f(x) corresponds to flow on a line. If you flow monotonically on a line, you'll
never come back to your starting place-that's why periodic solutions are impossible.

21/03/2011 37
Exercise
1) Use the linear stability analysis to classify the fixed points of the following systems. If linear
stability analysis fails because f’(x*)=0, use a graphical argument to decide the stability.

dx
(a ) = x2
dt
dx
(b)= x 2 (1 − x )
dt
dx
(c) = x − x 3
dt

2) For the dynamical equation:

dx
= cos( x )
dt
a) Find all the fixed points of the flow in the range [0,2π]
b) In the plane x-t trace the time history of x for x(t=0)=π/4 and x(t=0)=π

21/03/2011 38
Exercise
1)Consider the model chemical reaction:
k1
A + X 2X
k−1
in which one molecule of X combines with one molecule of A to form two molecules of X. This
means that the chemical X stimulates its own production, a process called autocatalysis. This
positive feedback process leads to a chain reaction, which eventually is limited by a "back
reaction" in which 2X returns to A + X.
According to the law of mass action of chemical kinetics, the rate of an elementary reaction is
proportional to the product of the concentrations of the reactants. We denote the
concentrations by lowercase letters x = [X] and a = [A]. Assume that there's an enormous surplus
of chemical A, so that its concentration can be regarded as constant. Then the equation for the
kinetics of x is where k1, and k-1, are positive parameters called rate constants.

dx
= k1ax − k −1 x 2
dt

a) Find all the fixed points of this equation and classify their stability.
b) Using the linear stability analysis, classify the fixed points.
c) Sketch the graph of x(t) in the plane x-t for various initial values x0.

21/03/2011 39

You might also like