Professional Documents
Culture Documents
Lesson19 Notes
Lesson19 Notes
Robot Control
MECH6324 Fall 2012
Mark W. Spong
Lars Magnus Ericsson Chair and Dean
The Erik Jonsson School of Engineering and Computer Science
The University of Texas at Dallas
800 W. Campbell Rd.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Nonlinear Systems
Consider an n-order homogeneous nonlinear system of the form
ẋ1 = f1 (x1 , x2 , . . . , xn )
ẋ2 = f2 (x1 , x2 , . . . , xn )
.. ..
. .
ẋn = fn (x1 , x2 , . . . , xn )
ẋ = f (x)
f (x) = Ax
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Equilibrium Points
Definition
An Equilibrium or Equilibrium Point of the vector field f (x) is a vector
x0 satisfying f (x0 ) = 0.
The reason that such an x0 is called an equilibrium point is that if
x(0) = x0 is the initial condition for the di↵erential equation ẋ = f (x),
then x(t) = x0 is a solution of the di↵erential equation.
Proof: If x(t) = x0 then we have ẋ(t) = 0 = f (x0 ) = f (x(t)) showing
that x(t) = x0 is a solution.
Other terms for equilibrium point are Equilibrium Solution, Fixed
Point, Critical Point.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Simple Pendulum
Example
The equation for the simple
pendulum is
Simple Pendulum
ẋ1 = x2
g
ẋ2 = sin(x1 )
`
or
ẋ1 x2
= g
ẋ2 ` sin(x1 )
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
x2 = 0
sin(x1 ) = 0
Example
Suppose a vector field f (x) on R3 is
given as Evaluating the Jacobian at this
2 3 equilibrium point yields
x2 2 3
f (x) = 4 x23 5 0 1 0
x1 sin(x2 ) J(0) = 4 0 0 0 5
1 1 0
Then the Jacobian of f (x) is
Since the Jacobian is generally a
2 3
0 1 0 function of x, it’s value will be
J =4 0 0 2x3 5 di↵erent at di↵erent equilibrium
1 cos(x2 ) 0 points. This will become important
when we talk about the linear
Note that the vector approximation of a nonlinear system
[x1 , x2 , x3 ]T = [0, 0, 0]T is an near a given equilibrium point.
equilibrium of the vector field f .
JO
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Linearization
Definition
Suppose that f (x0 ) = 0 and define x = x x0 . Then the Linearization
or Linear Approximation of the system ẋ = f (x) about (x0 ) is the
linear system
ẋ = A x
@fi
aij = (x0 )
@xj
Evaluating the Jacobian at the two equilibrium points (0, 0) and (⇡, 0)
leads to the two linear approximations, each valid near the respective
equilibrium points
0 1 0 1
ẋ = g x ; ẋ = g x
` 0 ` 0
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
✓¨ + ! 2 ✓ = 0
Stability
ẋ = f (x) ; x 2 Rn (1)
Stability Definitions
Definition
The equilibrium point x̄ = 0 is
1. Stable if for any ✏ > 0 there exists
> 0 such that
||x(0)|| < =) ||x(t)|| < ✏, for all t 0
lim x(t) = 0
t!1
Exponential Stability
Definition
The equilibrium x̄ = 0 is Exponentially Stable if trajectories satisfy
t
||x(t)|| ke ||x0 || for some positive constants k > 0, > 0.
Hyperbolic Case
Theorem
Consider the autonomous nonlinear system
ẋ = f (x)
and suppose that x̄ = 0 is a hyperbolic fixed point. Recall that this means that
the Jacobian A = @f
@x
has no eigenvalues with real part equal to zero. Let
ẋ = Ax
Examples
J X 32
ẋ = x3
Examples
2
J x x 13
Next, consider the first-order autonomous nonlinear system
ẋ = x x3
Examples
Examples
ẋ = x + x3
Examples
ẋ = x + x3
Remark
The good news is that for hyperbolic equilibrium points the linearization
tells us everything we need to know to determine local stability properties
of the nonlinear system.
However, the linear theory is not adequate to address the issue of global
stability and it does not tell us much about the stability properties in the
non-hyperbolic case.
Thus we need to develop additional techniques beyond simply computing
eigenvalues of the linearization. The so-called Second Method of
Lyapunov is one such method that is a very powerful tool for analyzing
nonlinear systems.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Motivating Example
mv̇ = bv (2)
where m and b are positive constants.
Now the kinetic energy of the particle E(t) is given by E = 12 mv 2 . If we
compute the rate of change of energy for the particle we obtain
Motivating Example
Therefore, since Ė = bv 2 is always negative, it means that the kinetic
energy of the particle is always decreasing. Since E itself is positive, it
cannot decrease below zero. It follows that
E(t) ! 0 as t ! 1
v(t) ! 0 as t ! 1
Lyapunov Functions
Definition
Let V (x) : Rn ! R be a di↵erentiable scalar function. The derivative
of V along trajectories of (1), denoted V̇ (x) is given by
Xn
@V
V̇ (x) = ẋi xdot=f(x) (1)
i=1
@xi
Xn
@V
= fi (x)
i=1
@xi
V̇ = rV · f
@V
= f (x)
@x
= LfV
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Theorem
Let x̄ = 0 be an equilibrium point of (1) and let V be a continuously
di↵erentiable scalar function such that
(a) V (0) = 0 and V (x) > 0 for x 6= 0. positivedefinitefunction
(b) V̇ (x) 0 negative semi definite
Then x̄ is stable. Moreover, if
(c) V̇ < 0 Vdot(0) = 0 negative definite function
then x̄ is asymptotically stable.
Example
Consider the system ẋ = x and suppose V = x2 . Then
V̇ = 2xẋ = 2x2 < 0. Therefore x̄ = 0 is asymptotically stable.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Lyapunov Function
The function V (x) is called a Lyapunov Function for the system (1).
The intuitive idea behind the notion of Lyapunov stability is shown in the
figure below. V̇ = rV · f is the ‘dot’ product of the vector field f with
the gradient of V
v. If this dot product is negative, then the vector field f
must point inside the level curves of V as shown.
x1 x2
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Example
Consider the first-order system
ẋ = g(x)
where g(x) is any nonlinear function with g(0) = 0 and xg(x) > 0 for
x 6= 0.
Simple Pendulum
We have already seen that if E(t) is the total energy of the pendulum
(kinetic plus potential)
1 2 ˙2
E= m` ✓ + mg`(1 cos(✓))
2
ẋ1 = x2
g
ẋ2 = sin(x1 ) Bx2
`
We know by examining the phase portrait above and also by physics that
the origin is asymptotically stable since the friction will eventually
dissipate all the energy and bring the pendulum to rest.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
V̇ = m`2 Bx22 0
V̇ = m`2 Bx22 0
Lyapunov Functions
Summary so Far
1. We can determine local stability properties for hyperbolic fixed
points of nonlinear systems by examining the eigenvalues of the
linear approximation.
1.1 The fixed point is asymptotically stable for the nonlinear system if it
is asymptotically stable for the linear systems (all eigenvalues have
negative real part)
1.2 The fixed point is unstable for the nonlinear system if it is unstable
for the linear system. (one or more eigenvalues with positive real
part)
1.3 If any eigenvalue of the linear approximation has zero real part
(critical eigenvalues) then the fixed point of the nonlinear system
may be stable or unstable, i.e. the linearization is inconclusive.
2. Lyapunov functions can be used to determine stability in the case of
critical eigenvalues
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Basin of Attraction
Since stability is, in general, a local property, the question arises ‘which
initial conditions give rise to trajectories that converge to the equilibrium,’
Definition
The Basin of Attraction B of a fixed point x̄ is defined as the set
V-1(c)
V̇ < 0 means that the interior of the level set is positively invariant. This
means that any solution starting in this set converges to the equilibrium
and so the set is contained within the basin of attraction.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Global Stability
Question
Under what conditions is the basin of attraction equal to the entire state
space Rn ?
This is called Global Asymptotic Stability.
V (x) ! 1 as ||x|| ! 1
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Theorem
Let x̄ = 0 be an equilibrium point for the autonomous nonlinear system
ẋ = f (x). Let V : Rn ! R be a continuously di↵erentiable function such
that
ẋ1 = x2
g
ẋ2 = sin(x1 ) Bx2
`
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
V̇ = -Bx22 0
LaSalle’s Theorem
LaSalle’s Theorem
Example
Consider the nonlinear system
ẋ1 = x1 (1 + x2 )
ẋ2 = x21
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Example
Let
1 2 1 2
V = x1 + x2
2 2
Then
V̇ = x1ẋ 1 + x2ẋ 2
= x21(1 + x2) + x2x21 = x21 0
Definition
An n ⇥ n matrix P is Positive Definite if and only if
xT P x > 0 for x 6= 0
The matrix P is
• Positive Semi-definite if xT P x 0
• Negative Definite if xT P x < 0
• Negative Semi-Definite if xT P x 0
• P is Indefinite if it is otherwise not one of the above.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Remark
• The matrix P is positive definite if and only if all eigenvalues of P
are positive.
• P is positive semi-definite if all eigenvalues of P are greater than or
possibly equal to zero.
ẋ = Ax
V = xT P x
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
V̇ = ẋT P x + xT P ẋ
= xT AT P x + xT P Ax
= xT (AT P + P A)x
V = xT P x
V̇ = xT Qx
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
V̇ = ẋT P x + xT P ẋ
= xT AT P x + xT P Ax
= xT (AT P + P A)x
V = xT P x
V̇ = xT Qx
Suppose both P and Q are positive definite. What can you conclude?
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
V̇ = ẋT P x + xT P ẋ
= xT AT P x + xT P Ax
= xT (AT P + P A)x
V = xT P x
V̇ = xT Qx
Suppose both P and Q are positive definite. What can you conclude?
The conclusion is that the linear system is (exponentially) stable.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
ATP + P A + Q = 0
where P is the unknown and A and Q are given. Suppose that we solve
Equation (1) for P and find that P is positive-definite. What conclusions
can you draw?
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
ATP + P A + Q = 0
where P is the unknown and A and Q are given. Suppose that we solve
Equation (1) for P and find that P is positive-definite. What conclusions
can you draw?
The equation (1) is called a Lyapunov Equation.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Remark
This gives a way to determine stability of linear systems by solving a
system of linear algebraic equations; in other words, without computing
matrix eigenvalues.
Nonlinear Systems Linearization Stability Lyapunov Theory Basin Global Stability The Invariance Principle Stability of Linear Systems
Example
Remark
The Matlab Control Systems Toolbox has the built-in function lyap,
which solves the Lyapunov equation.
Matlab Script
>> A = [0 1; 2 3];
>> Q = [1 0; 0 1];
>> P = lyap(A, Q)
>> P =
1.0000 0.5000
0.5000 0.5000
>> eig(P )
ans =
0.1910
1.3090