Dynamical Systems 3
Dynamical Systems 3
Dynamical systems, 3
Mihaela Cistelecan, UT Cluj-Napoca
has two equilibrium points: (0, 0) and (π, 0). We study the stability of the
equilibrium point at the origin. The energy of the pendulum E(x) as the sum
of its potential and kinetic energies, with reference of the potential energy
chosen such that E(0) = 0, is:
Z x1
g 1 g 1
E(x) = sin y dy + x22 = (1 − cos x1 ) + x22 (2)
0 l 2 l 2
When friction is neglected (k = 0):
dE g g g
= ẋ1 sin x1 + x2 ẋ2 = x2 sin x1 − x2 sin x1 = 0 (3)
dt l l l
1
Since for k = 0 the derivative dE dt
= 0, it follows that the system is conserva-
tive, that is there is no dissipation of energy. Hence, E(x)=const. during the
motion of the system or, dE dt
= 0 along the trajectories of the system. Since
E(x) = c forms a closed contour around x = 0, for small c, we can arrive at
the conclusion that x = 0 is a stable equilibrium point.
When friction is accounted for (k > 0), the energy is as follows:
dE g k
= ẋ1 sin x1 + x2 ẋ2 = − x22 ≤ 0 (4)
dt l m
Therefore, the energy will dissipate during the motion of the system, that
is dE
dt
≤ 0 along the trajectories of the system. Due to friction, E cannot
remain constant indefinitely while the system is in motion. Hence, it keeps
decreasing until it eventually reaches zero, showing that the trajectory tends
to x = 0 as t tends to ∞.
Thus, by examining the derivative of E along the trajectories of the system,
it is possible to determine the stability of the equilibrium point. In 1892,
Lyapunov showed that certain other functions could be used instead of en-
ergy to determine the stability of an equilibrium point.
The eigenvalues of this system are ±i, which have zero real parts. To analyze
the behaviour of the nonlinear system (5) we compute the derivative of the
square of the distance of a solution from the origin:
d 2
(x + x22 ) = 2λ(x21 + x22 )2 (7)
dt 1
2
If λ < 0, then kx(t)k2 approaches zero monotonically as t → +∞. Thus, the
equilibrium at the origin is asymptotically stable. However, if λ > 0, then
all solutions of (5) with initial data x(0) 6= 0 escape to ininity. Therefore, in
this case, the origin is unstable.
Linear systems
Theorem 1: If all the eigenvalues of the coefficient matrix A in the linear
system ẋ = Ax have negative real parts, then its equilibrium point x̄ = 0 is
asymptotically stable. Moreover, there are positive constants K and α such
that:
3
1.3 Lyapunov stability
When linearization fails we may apply the Lyapunov’s Method.This is a
method that helps us decide whether an equilibrium is stable, asymptotically
stable or unstable. It was given by Lyapunov in 1892. The idea is to find
a function whose properties determine the nature of equilibrium. Unfortu-
nately, there is no algorithm for finding the desired function. Lyapunov’s
method only ensures that if such a function exists, we can draw the right
conclusion. The right function should be guessed.
4
The condition V̇ ≤ 0 implies that when a trajectory crosses a Lyapunov
surface V (x) = c, it moves inside the set Ωc = {x ∈ Rn |V (x) ≤ c} and can
never come out again. When V̇ < 0, the trajectory moves from one Lyapunov
surface to an inner Lyapunov surface with a smaller c. As c decreases, the
Lyapunov surface V (x) = c shrinks to the origin, showing that the trajectory
approaches the origin as time progresses.
5
Example: Linear system stabilityFor a linear autonomous system ẋ = Ax
we can choose the Lyapunov function as V (x) = xT P x where P = P T . Then,
V̇ (x) = xT (AT P + P A)x = −xT Qx. If we can find P > 0 and Q ≥ 0 so that
AT P + P A = −Q, then the system ẋ = Ax is stable. If, Q > 0 then the
system is asymptotically stable.
Example: Control law designFor a linear control system ẋ = Ax + Bu
we can use the Lyapunov function to design the control law u = F x (state
feedback control). We can choose the Lyapunov function as V (x) = xT P x
where P = P T . Then, V̇ (x) = xT (AT P +P A+F T B T P +P BF )x = −xT Qx.
If we can find the matrices F , P > 0 and Q ≥ 0 so that AT P +P A+F T B T P +
P BF = −Q, then the system ẋ = (A + BF )x is stable. If, Q > 0 then the
system is asymptotically stable.
Conclusion: Important
• Lyapunov’s theorem can be applied without solving the diff. eq. ẋ =
f (x)
• There is no systematic method for finding Lyapunov functions. In
some cases, there are natural Lyapunov functions like energy functions
in electrical or mechanical systems. In other cases, it is a matter of
trial and error.
• The Lyapunov’s Theorem conditions are only suffficient. Failure of a
Lyapunov function to satisfy the conditions for stability or asymptotic
stability does not mean that the equilibrium is not stable or asymp-
totically stable. It only means that such stability property cannot be
established by using this Lyapunov function... further investigation is
necessary.
The variable gradient method
6
For the quadratic form to be positive definite, the elements of the matrix
P must satisfy
p11 > 0, p22 > 0, p11 p22 − p212 > 0 (14)
The derivative V̇ (x) is as follows:
g g k k
V̇ (x) = (1−p22 )x2 sin x1 − p12 x1 sin x1 +(p11 −p12 )x1 x2 +(p12 −p22 )x22
l l m m
(15)
We can choose p11 , p12 and p22 such that V̇ (x) < 0. Since the terms
x2 sinx1 and x1 x2 are sign indefinite, we will cancel them by taking p22 = 1
and p11 (k/m)p12 . With these choices, from (14), p12 must satisfy 0 < p12 <
(k/m). Let us take p12 = 0.5(k/m). Then, V (x) is given by:
1g k 1k 2
V̇ (x) = − x1 sinx1 − x (16)
2lm 2m 2
The term x1 sinx1 > 0 for all 0 < |x1 | < π. Taking D = {x ∈ R2 | |x| < π}
we see that V (x) is positive definite and V̇ (x) is negative definite over D.
Thus, we conclude that the origin is asymptotically stable.
The procedure that exploits the idea given in the above example (we
investigated the expression for V (x) and went back to choose the parameters
of V (x) so as to make V̇ (x) negative) is known as the variable gradient method
. We briefly describe this procedure in the following.
Let’s denote g(x) = ∇V = (∂V /∂x)T . The derivative V̇ (x) along the
trajectories of ẋ = f (x) is given by:
∂V
V̇ (x) = f (x) = g T (x)f (x) (17)
∂x
The idea now is to try to choose g(x) such that it would be the gradient
of a positive definite function V (x), and at the same time, V̇ (x) would be
negative definite.
See the literature for further information...
3.4. Domain / region of attraction
The domain / region of attraction (or basin, or region of asymptotic sta-
bility) is defined as follows.
7
Finding the exact region of attraction analytically might be difficult or even
impossible. Still, a conservative approximation may be found using the Lya-
punov function, that is: if there is a Lyapunov function that satisfies the con-
ditions of asymptotic stability over a domain D, and if Ωc = {x ∈ Rn |V (x) ≤
c} is bounded and contained in D, then every trajectory starting in Ωc re-
mains in Ωc and approaches the origin as t → ∞. Thus, Ωc is an estimate
of the region of attraction. This estimate may be conservative - it may be
much smaller than the actual region of attraction.
Example: Consider the second-order dif. eq. :
z̈ + 2aż + z + z 3 = 0 (18)
where a is a constant satisfying 0 < a < 1, which is equivalent to the
system:
ẋ1 = x2
(19)
ẋ2 = −x1 − 2ax2 − x31
The origin is the only equilibrium point and
√ the eigenvalues of the liniariza-
tion at the origin are −a ± iβ, where β = 1 − a2 . Consequently, it follows
that the origin is asymptotically stable. Let us now try to estimate the basin
of attraction of the origin by using a Lyapunov function. With the intent of
determining a quadratic Lyapunov function, we first put the linear part of
the vector field into Real Jordan Normal Form. If we use the new variables
y defined by:
· ¸ · ¸
1 0 −1 1 β 0
y = P x, P = P =β (20)
−a β a 1
then the system becomes:
8
Now, the main task is to determine the largest subset of R2 containing
the origin where −V̇ is positive definite. This is a difficult task, so let us
settle for the largest such disk. Observe that the level sets of the function
1 3
y12 + y22 are circles about the origin and the level sets of the function aβ y1 y2
are similar to hyperbolas. From the symmetry of −V̇ , it is evident that the
radius r0 of the largest circle inside which −V̇ is positive definite must satisfy:
1 4
r02 − r =0 (24)
aβ 0
√
that is, r0 = aβ.
Thus, every solution of (19) with initial value y(0) satisfying ky(0)k < r0
approaches the origin as t → +∞.
V (x) = xT P x ≤ c (25)
where the first term is negative when Q > 0 and the second term is in general
indefinite.
Since for a matrix M the following inequalities are true:
where
kxk2 = xT x
,
and the function g(x) satisfies:
kg(x)k
→ 0 as kxk → 0 (28)
kxk
9
we may reason as follows:
ẋ1 = x2
(32)
ẋ2 = −h(x1 ) − ax2
10
V̇ (x) = −aδ(1 − k)x22 − aδkx1 h(x1 ) (34)
is negative definite for all x ∈ R2 since 0 < k < 1. Therefore, the origin
is globally asymptotically stable.
Remark: If the origin x = 0 is a GLOBALLY asymptotically stable equi-
librium point of a system, then it must be the unique equilibrium point of the
system. For if there was another equilibrium point x̄, the trajectory starting
at x̄ would remain at x̄ for all t ≥ 0; hence, it would not approach the origin
which contradicts the claim that the origin is globally asymptotically stable.
Therefore, global asymptotic stability is not studied for multiple equilibria
systems like the pendulum equation.
2 Home-works
1. For each of the following systems, use a quadratic Lyapunov function
candidate to show that the origin is asymptotically stable:
11
nates:
(ṙ = r(r − 4); θ̇ = 1)
(ṙ = ar2 + br3 ; θ̇ = 1)
(ṙ = r(λ − r); θ̇ = 1) (37)
(ṙ = ar2 ; θ̇ = 1)
(ṙ = ar(r − 1)(r − λ); θ̇ = 1)
where a, b are constants and λ(t) is time-variant.
5. Consider the following system of diff. eq.
ẋ1 = x2
(40)
ẋ2 = −x1 − x32
What is the stability type of the equilibrium point at the origin ?
8. Discuss the stability properties of the origin for the system:
12
9. Discuss the stability and instability of the equilibrium points of the
system:
ẋ1 = −x2 + x32
(42)
ẋ2 = −x1 + x31
3 Lab-works
1. Draw the Lyapunov function for the systems given in the lecture notes, in
3-D as the function V (x1 , x2 ) and in 2-D as the function V (t).
2. Draw the phase portraits and the Lyapunov functions for the problems
given in the above section (Home-works).
4 Matlab
Study the Matlab functions lyap, contour, mesh.
Example: Given the nonlinear system
½
ẋ1 = x2
(43)
ẋ2 = −x1 + (x21 − 1)x2
compute the domain of attraction of its equilibrium point (0, 0).
Method 1: We choose the Lyapunov function as the quadratic function
V (x1 (t), x2 (t)) = x(t)T P x(t), P > 0, P = PT > 0
and compute its time-derivative as follows:
dV
V̇ = = 2(−xT Qx + p12 x31 x2 + p22 x21 x22 ) (44)
dt
where: · ¸
p12 0.5(p22 + p12 − p11 )
Q= (45)
0.5(p22 + p12 − p11 ) p22 − p12
Note that we should require p22 > 0 (P > 0). On the other hand, if
p12 = 0 it turns out that det(Q) = −0.52 (p22 − p11 )2 ≤ 0 which forbids
Q > 0.
We may compute the worst case scenario for V̇ < 0 as follows:
x21 x22 < (x21 + x22 )(x21 + X22 ) = kxk2 kxk2 = r4
p p (46)
|x31 x2 | < x21 |x1 ||x2 | < (x21 + x22 ) (x21 + x22 ) (x21 + x22 ) 4
= kxk = r 4
13
where r2 = kxk2 = x21 + x22 . Thus, we should find a conservative (small)
approximation of the domain of attraction from:
or
−λmin (Q) + (p12 + p22 )r2 < 0 (48)
Therefore:
λmin (Q)
r2 < (49)
p12 + p22
is an approximation of the radius of the region of attraction.
It might be possible to find combinations of matrices P and Q which
shows a bigger domain of attractions than others. In order to find the best
matrices P and Q we must reason as follows:
By denoting the eigenvalues of the matrix Q: λ1 = λ and λ2 = λ + α,
λ, α > 0, from (45) we get:
2λ + α = p22
λ(λ + α) = p12 (p22 − p12 ) − 0.52 (p22 + p12 − p11 )2
or, equivalently:
Since:
p22 1 √
λ1,2 = ± ∆
2 2
∆ = p222 − 4p12 (p22 − p12 ) + (p22 + p12 − p11 )2
we require a positive great minimum eigenvalue by ∆ = 0. In addition, from
the positivity of P and Q we should require: p22 > 0, p11 > 0, p11 p22 > p212 ,
p12 > 0, p22 > p12 ,
We may choose:
· ¸ · ¸
1 0 3 1
Q= ; P = (51)
0 1 1 2
14
2
25 20
24
10
5
10
1.5 22
30
15
1 20
25
5
20 18
0.5
10
15 16
5
0
10
10 14
5 −0.5
12
0
5
−1 10
2
10
2 8
5
−1.5
20 25
15
10
0
0 6
−2
−2 −2 −2 −1 0 1 2
15
0.6 0.
0.4
0
2 2 0.8
0.5
1
0.6 0.8
0.2 0.6
0.4
0
0.8 0.6
0 0.4
0.4
0.2
−2
−0.5 0 0.2
1 .2 0
1 0.4
1
0 0 0.6
0
−1 −1 −0.5 0 0.5
0.6
0.5
0.70.8
0.4
0.3
1 0.3 0.7
0.5 0.2
0.6
0.1
0.06.5 .4
0
0.4 0.05.6
0.5 0.5
0
0.4
0.3
0.1
0 0.3
0.3
1 −0.5 0.2
0..87
1 0.2
0.3
0.4
0
0 0 0.5
0.6
−1 −1 −0.5 0 0.5
where
∂f
A= |(0,0)
∂x
16
8
−2
−4
−6
−8
−4 −3 −2 −1 0 1 2 3 4
is the Jacobian of the system in the equilibrium point (0, 0). Note that:
q q
kg(x1 , x2 )k = 0 + (x1 x2 ) < (x1 + x2 ) x21 + x22 = kxk3
2 2 2 2
Using the Matlab lyap function for Q chosen as the identity matrix:
>> P = lyap([0, 1; −1, −1]0 , [1, 0; 0, 1])
we get:
P =[ 1.5000 , 0.5000 ; 0.5000 , 1.0000 ]
>> eig(P )
ans =
1.8090, 0.6910
Thus, using (30):
λmin (Q) 1
γ = r2 < =
2 ∗ λmax (P ) 2 ∗ 1.8090
r < 0.5257
We show a phase portrait in Fig 3.
17
35
30
25
20
V(t)
15
10
0
0 2 4 6 8 10
t
Figure 4: The time history of the energy for different initial conditions
18
4.5
3.5
2.5
V(t)
1.5
0.5
0
0 2 4 6 8 10
t
Figure 5: The time history of the energy versus the time history of the state
vector norm for the same initial condition
19