You are on page 1of 8

Lecture notes 2009/2010

Dynamical Systems, 1
Mihaela Cistelecan, UT Cluj-Napoca

1 Motivation
Definition:
Process Modeling - addresses the following two related problems:
(1) - how to obtain the equations (= MODEL) describing certain phe-
nomena / process
(2) - how to interpret the results of analyzing the phenomena within the
framework of the model.
We will focus only on the second part of the definition (often called the
theory of dynamical systems) - see the motivation below.
Process Modeling is rather used as a book title than a title for a subject
of study in Control Engineering Departments. This is because building
the mathematical model of a dynamical system (in particular, process) is
possible in the following two ways: 1). using the laws of physics or 2). using
different algorithms classified under the name of ”System Identification”.
The first way of modeling is the mission of people with expertise in physics
(scientists). The second way of modeling is the responsibility of control
engineers.
For the following two reasons:
1). I do not have expertise in physics and, besides, there are no typical
rules to guide us in writing the physical laws;
2). ”System Identification” is a subject you will study later because it
requires as a prerequisite the ”Systems Theory” - subject that you will study
in the next semester;
the lecture notes will deal with problems concerning the ”Dynamical
systems” not ”Process Modeling” (in the sense of ”System Identification”).
Still, we will use the keyword ”process model” very often. More often
than ”process model” we will use the more general concept of (dynamical)
”system model”.

1
We emphasize the fact that we assume the model as being given. We
then study the behavior of the given mathematical model and identify the
important phenomena it faces.
Several models for dynamical systems taken from the literature will be
provided.

2 Oportunity
Mathematical models are only approximations of reality. It is well-known
that the keyword ”dynamical systems” is an alias for differential and dif-
ference equations. However, a dynamical system may be a model for a real
physical system (or process model) only if it fulfills certain conditions. You
will learn about these conditions (and more) from my lecture notes.
Which is the difference between the ”Dynamical Systems” lecture and
the ”System Theory” lecture ? - We have chosen to proceed by low dimen-
sional nonlinear dynamical systems equations, and not linear high-dimensional
systems. Equations in dimension one and two constitute the majority of the
text. We explain the basic notions of stability and bifurcations of vector
fields using scalar and second-order autonomous equations.

3 How to learn and understand the concepts of


this lecture
Do not try to memorize anything from the notes I give you. Instead, try
to understand each new concept introduced by notes. I will be happy to
answer your questions (related to my notes) in the lab-classes.
Each of the given Home- and Lab- work assignment has as final goal the
writing of an essay, which will contribute to the final grade.
For the year 2009/ 2010 the final grade is computed as follows:
(oral + written exam) /2
or, for those presenting a case study (completed by individual analysis)
(oral + written exam + case study) / 3
The oral examination is based on the mini-projects I give you every two
or three weeks. You are required to submit your reports at the specified
deadline. If you miss the deadline your mark is automatically decreased
each week by one. A five-week delay for at least one report means you are
not qualified (eligible) to be examined in the first legal examination session.
There are only two legal examination sessions per year. I do not organize

2
special sessions or examinations, please do not pay for special examinations
!!!!!! That exams are not legal.

4 Dynamical systems
4.1 u/x/y - input/ state/ output representation (model)
For control engineers a dynamical system is often modeled by a finite number
of coupled first-order ordinary differential equations:

ẋ1 = f1 (t, x1 , ..., xn , u1 , ..., up )


... (1)
ẋn = fn (t, x1 , ..., xn , u1 , ..., up )
where ẋi denotes the derivative of xi with respect to the time variable t, and
u1 , u2 , ...,un are specified input variables. We call the variables x1 , x2 , ...,
xn the state variables.
We usually use vector notation to write the above equations in a compact
form, as follows:

ẋ = f (t, x, u); t ∈ R; x ∈ Rn ; u ∈ Rp (2)


where:
     
x1 u1 f1 (t, x, u)
 x2   u2   f2 (t, x, u) 
     
x=  u=  f (t, x, u) =   (3)
 ...   ...   ... 
xn un fn (t, x, u)
We call (2) the state equation, and refer to x as the state and u as the
input.
Sometimes, with (2) we associate the output equation

y = h(t, x, u); y ∈ Rq (4)

Remark: The output vector comprises variables of particular interest


in
(a). the analysis of the dynamical system, like variables which are phys-
ically measured or,
(b). variables which are required to behave in a specified manner
(a) and (b) will be investigated in the following semesters in the ”Systems
theory”, ”Control Theory”, ”Optimal / robust / adaptive control” classes.

3
The state equation (2) together with the output equation (4) gives the
so-called ”STATE-SPACE MODEL” of the dynamical process / system.
Mathematical models of finite-dimensional physical systems do not always
come in the form of a state-space model. However, more often than not,
we can model physical systems in this form by carefully choosing the state
variables.
We will often use the unforced state equation:

ẋ = f (t, x) (5)

Working with an unforced state equation does not necessarily mean that
the input to the system is zero. It could be that the input has been specified
as:
1. a given function of time, u = γ(t), or
2. a given feedback function of the state, u = γ(x), or
3. both, u = γ(t, x)
Substitution of u = γ in (2) eliminates u and yields an unforced state
equation.
The order of the dynamical system (3) is n.
We aims at studying differential equations with emphasis on some spe-
cific problems, such as:
1. special dynamics modeling some real, physical phenomena/ systems
/ plants/ benchmarks;
2. special dynamics that could help us find a good control (feedback)
law u = γ.

4.2 u/y - input/output models (representation)


In order to keep the exposition simple, we assume that the p = q = 1.
A mathematical model that describes a wide variety of physical nonlinear
systems is the n-th order differential equation:
dn y dy dn−1 y dm u
= g(t, y, ... , u , ... ) (6)
dtn dt dtn−1 dtm
The order of the system is n.
————————————————————————————-
Example: Pendulum equation: Using Newton’s second law of motion we
can write the equation of motion in the tangential direction as:

mlθ̈ = −mgsin θ − klθ̇ (7)

where:

4
• l - denotes the length of the rod (the rod is rigid and has zero mass)
• m - denotes the mass of the bob
• g - the acceleration due to gravity
• k - coefficient of friction
• θ - the angle subtended by the rod and the vertical axis through the
pivot point

Equation (7) is the u/y unforced model of the pendulum (with u = 0).
The deviation (angle) θ is the output.
To obtain a state-space model of the pendulum, let us take the state
variables as x1 = θ and x2 = θ̇. Then, the state equation is:
ẋ1 = x2
(8)
ẋ2 = − gl sin x1 − k
m x2

and the output equation is y = x1 .


If we can apply a torque T to the pendulum, this torque may be viewed
as a control input in the equation:
ẋ1 = x2
(9)
ẋ2 = − gl sin k
x1 − m x2 + 1
ml2
T

4.3 equivalence u/y → u/x/y


For a dynamical system the representations u/y and u/x/y are equivalent.
It is possible to transform one representantion into the other - this will be
studied in the ”Systems theory” class.
Remark: Note that (7) and (8) describe the same dynamical system -
the pendulum.
—————————————————————————-

4.4 Linear vs. Nonlinear Dynamical Systems


The definition of a linear system is based on the the superposition principle,
see.
http : //en.wikipedia.org/wiki/Superposition principle, which will be
studied in the Systems Theory class. Still, you may recognize a nonlinear
system when you see nonlinearities, for example: x2 , x1 x2 , sin(x), sign(x),
sat(x) (saturation), etc.
———————————————————–

5
4.5 Autonomous vs. Nonautonomous Dynamical Systems
When the function f does not depend explicitly on t, that is:

ẋ = f (x) (10)
the system is called autonomous or time-invariant . The behavior of an
autonomous system is invariant to shifts in the time origin, since changing
the time variable from t to τ = t − a does not change the right-hand side of
the state equation. If the system is not autonomous - see eq. (2) - then it
is called nonautonomous or time varying .
Note that sin(t) in f (x) denotes an non-autonomous system

4.6 Parameter-dependent dynamics, Bifurcations


Many times the model of a physical system depends on some parameters, λ:

ẋ = f (x, λ), λ̇ = g(t, λ) (11)


The bifurcation theory is the study of possible changes in the structure of
the orbits of a differential equation as parameters are varied. Bifurcation
behaviour of specific differential equations can be encapsulated in certain
pictures called bifurcation diagrams.

5 First order dynamical systems (given by first


order differential eq.)
The solutions of the differential equations/ systems are important because
they say everything about the systems behavior. Some differential equations
have analytical solutions. If an analytical solution cannot be found there
are two possibilities: 1. the equation is integrated using the Euler or Runge-
Kutta method - what we get is the solution particularized by an initial state;
2. we make a qualitative analysis of the system/ equation dynamics basically
by studying the direction of change of the solution in different points.
In the following, we study:
1. Chapter 1 from:
Hirsch, Smale, Devaney - ”Differential Equations, Dynamical Systems
and An Introduction to Chaos”
2. The Euler integration method from:
http : //en.wikipedia.org/wiki/Euler0 s method

6
6 Home-works
From the studied chapter Exercises: 1, 2, 3, 4, 5, 7, 10

7 Lab-works
1. Solve some ordinary differential equations using ”dsolve” from Matlab.
2. Integrate the equations given in Chapter 1 using: 1). the Euler
method, 2) the function ode23 from Matlab, (Runge-Kutta method), 3) the
Runge-Kutta method explicitly written, see
http : //en.wikipedia.org/wiki/Runge − Kutta method
3. Draw the slope field for the equations give in Chapter 1 using the
function quiver from Matlab.
4. Simulate the following first-order scalar difference equation:

xn+1 = λxn (1 − xn ) (12)


where λ is a positive real parameter

8 MATLAB
1. To solve the linear nonhomogeneous equation ẋ = 5x + t3 type
>>eq=’Dx=5*x+t3 ’ and use the command dsolve as follows:
>>dsolve(eq)
To solve an initial value problem for the above equation, specify the
initial condition:
>> dsolve(eq,’x(1)=1’)
——————————-
2. Numerical solutions: we will apply Euler’s method to solve the initial
2
value problem ẋ = 2tx + et , x(0) = 1, in the interval [0, 1.5], with step size
h = 0.1. First create the file called f1.m and type into it
function xp=f1(t,x)
xp=2 .*t .*x+ exp( t .* t);
Then, create another file called f2.m and type into it
t0=0;x0=1;
h=0.1;
n=15;
t=t0; x=x0; T=t; X=x;
for i=1:n
x=x+h*f1(t,x);

7
t=t+h; T=[T;t]; X=[X;x];
end
[T,X]
pause
plot(T,X)
Return to Matlab and type f2.
———————————————————
3. To draw the solution of the following equation

ẋ = x(1 − x) (13)

for initial condition x(0) = 0.2 we proceed as follows. In a file called, say
f.m write the above equation as follows:
function xp=f(t,x)
xp=x - x .*x;
Then type in Matlab command window (or write in another file and
invoke the file name):
[t,x]=ode23(’f’,[0, 20],[0.2]);
plot(t,x)
We have taken the variable t from 0 to 20.
4. In order to draw the slope field for the system:

ẋ = x ∗ (1 − x); (14)

use the Matlab code:


t1=0; t2=10; x1=-2; x2=2;
axis([t1 t2 x1 x2]);
[t,x]=meshgrid(t1:0.5:t2, x1:0.5:x2);
dt=t;
dx=2 *x .*(1-x);
quiver(t,x,dt,dx)

You might also like