S944 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

S9 · Lesson 44 · Lyapunov stability

Proving stability with an energy-like function: Lyapunov's direct method, the Lyapunov equation for linear systems, energy arguments for nonlinear ones, and estimates of the region of attraction

Poles settle stability for linear systems. For nonlinear ones, linearization (lesson 3) tells you only what happens close to an equilibrium, and nothing about how close is close enough. Lyapunov's idea, from 1892, was to generalize energy: if some positive quantity of the state never increases along every trajectory, the state can't run away, and if it always decreases, the state must settle. Finding such a function proves stability without solving the equations at all, and its level sets give a region from which recovery is guaranteed.

  • The curve is the energy V=12(x2+x˙2) of a damped oscillator x¨+2ζx˙+x=0 started at x = 1 at rest.
  • Its rate of change is V˙=−2ζx˙2: never positive, and zero only at the instants when the velocity passes through zero, which is why the curve descends in steps.
  • That's a Lyapunov function: with ζ > 0 it proves the oscillator settles, without solving for x(t).

Predict

A damped pendulum 1 m long hangs at rest and is struck. With friction, what initial angular speed guarantees, by an energy argument, that it never swings over the top?

Name it

Lyapunov's direct method

For x˙=f(x) with an equilibrium at 0, suppose a function V(x) is

  • positive definite: V(0) = 0 and V(x) > 0 elsewhere, and
  • non-increasing along trajectories: V˙=∇V⋅f(x)≤0.

Then the equilibrium is stable. If V˙<0 everywhere except 0, it's asymptotically stable. If V˙≤0 but V˙=0 only on a set containing no complete trajectory except the equilibrium, LaSalle's principle still gives asymptotic stability, as for the oscillator above, whose V˙ vanishes only at isolated instants.

Linear systems: the Lyapunov equation

For x˙=Ax, try V=xTPx. Then V˙=xT(ATP+PA)x, so choose a positive-definite Q and solve

ATP+PA=−Q

A has all its eigenvalues in the left half-plane exactly when the solution P is positive definite. For one state, x˙=−ax, this is −2aP=−q, so P=q/(2a). For the companion form A=(01−k−c) with Q = I:

p12=12k,p22=1+1/k2c,p11=k+12c+c2k

The same equation gives the LQR cost (lesson 38) and the steady-state covariance of a system driven by noise.

Regions of attraction

Where V˙<0 holds only in part of the state space, the largest level set V(x)<c lying entirely inside that part is a region from which every trajectory converges: an estimate, usually conservative, of the region of attraction. For x˙=−x+x3, V=x2/2 gives V˙=−x2(1−x2), negative for |x| < 1, so every start with |x| < 1 returns to 0. Here that's exact: the system has other equilibria at ±1.

Worked example

Solve the Lyapunov equation ATP+PA=−I for A=(01−2−3), and check it proves stability.

Show the solution
  1. Write out P. P=(p1p2p2p3)
  2. The equation's entries. −4p2=−12p2−6p3=−1p1−3p2−2p3=0
  3. Solve. p2=0.25p3=0.25p1=1.25
  4. Check it's positive definite. p1>0, and det⁡P=0.3125−0.0625=0.25>0
  5. Conclusion. So V=xTPx proves stability, matching A's eigenvalues at −1 and −2.

Answer p1 = 1.25 and p2=p3 = 0.25; P is positive definite, so the origin is stable.

Worked example

A damped pendulum 1 m long hangs at rest. What initial angular speeds are guaranteed never to carry it over the top?

Show the solution
  1. Energy function. V=12θ˙2+gl(1−cos⁡θ)
  2. It never grows. With friction, V˙=−bml2θ˙2≤0
  3. Energy at the top. V=2g/l=19.62s−2
  4. Safe starting speeds. Any start with 12θ˙02<19.62, that is θ˙0<4g/l=6.26rad/s stays in the set V < 19.62 forever and, by LaSalle, settles at the bottom.
  5. Faster starts. They may or may not go over; the energy argument is silent, since friction may remove enough on the way up.

Answer any initial angular speed below 6.26 rad/s is guaranteed never to carry it over the top.

Worked example

For x˙=−2x+0.5x3, estimate the region of attraction of x = 0 with V=x2/2.

Show the solution
  1. Derivative of V. V˙=xx˙=−2x2+0.5x4=−x2(2−0.5x2)
  2. Where it's negative. For x2<4, so every start with |x| < 2 returns to zero.
  3. Check against the equilibria. The other equilibria sit at x2=4, x = ±2, so the estimate is exact; beyond them the cubic term wins and the state escapes.

Answer every start with |x| < 2 returns to zero, and that estimate is exact.

Check

Solve ATP+PA=−I for A=(01−2−1).

(a)

What is p12?

(b)

What is p22?

(c)

What is p11?

Check

The scalar system x˙=−2x has the Lyapunov function V=Px2 with V˙=−1x2.

(a)

What is P?

(b)

At what rate does V decay, in s⁻¹?

Check

A damped pendulum 0.5 m long hangs at rest and is struck.

(a)

What energy per unit ml2, in s⁻², does it need to reach the top?

(b)

Below what initial angular speed is it guaranteed never to go over?

Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.

Check

The system x˙=−2x+0.25x3 is studied with V=x2/2.

(a)

Within what |x| is V˙ negative?

Check

A=(01−2−2) has the Lyapunov function V=xTPx with ATP+PA=−I; the state starts at (3, 0).

(a)

What is V at the start?

(b)

What is ∫0∞xTxdt, the integrated squared state?

Check

A candidate Lyapunov function has V˙≤0 everywhere, but V˙=0 whenever the velocity is zero, as for a damped oscillator's energy. What can be concluded?

Check

The Lyapunov equation ATP+PA=−I for A=(01−k−c).

Step 1

What is p12?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Check

Write lyap2(A, Q): solve ATP+PA=−Q for 2 × 2 lists A and symmetric Q, returning P as a 2 × 2 list, by solving the three linear equations for p11,p12,p22; and is_pos_def(P).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

How can a Lyapunov function prove a nonlinear system stable without solving its equations?

Practice

Keep practicing

8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.