Control foundations: stability and Lyapunov reasoning

Shared student reference for Marine Robotics and Multi-Robot Systems

Important

English draft for technical review; not approved for teaching. This is an optional prerequisite reference within existing lectures, not a new scheduled lecture or graded laboratory.

Purpose and learning outcomes

A robot can remain near a desired state without reaching it. A trajectory can converge in one demonstration while the equilibrium is unstable. A positive quadratic function can accompany either behavior. Lyapunov reasoning separates these possibilities by relating a scalar candidate to the actual dynamics.

After studying this reference, you should be able to:

  1. distinguish stability, attraction, asymptotic stability and exponential stability;
  2. calculate a candidate’s derivative and state what its sign establishes;
  3. explain the invariant-set step needed for the damped oscillator;
  4. derive a stabilizing feedback threshold for a simple fully actuated plant; and
  5. identify which assumptions a simulation, gain change or disturbance violates.

Prerequisites are first-order differential equations, state-space models, eigenvalues, gradients, quadratic forms and elementary feedback. The examples require no specialist marine dynamics. The maintained Lyapunov visualization at html/lyapunov.html provides an optional illustration; all essential models and arguments are given here. Open it from the simulation collection’s landing page. The theoretical framework follows the direct-method and invariance treatments in Tedrake’s author-hosted MIT notes and the Kellett–Braun stability slides.

State, time and units

Throughout the five examples, 𝒙=(x1,x2)βŠ€βˆˆβ„2\mathbf x=(x_1,x_2)^\top\in\mathbb R^2 contains dimensionless normalized states. They are illustrative mathematical states; the same symbol does not assert that all five models describe the same robot. Let tt be physical/display time, choose a stated reference time T0=1sT_0=1\,\mathrm{s}, and define normalized time Ο„=t/T0\tau=t/T_0. A prime denotes d/dΟ„d/d\tau; consequently

d𝒙dt=1T0𝒙′,dVdt=1T0Vβ€².(1) \frac{d\mathbf x}{dt}=\frac{1}{T_0}\mathbf x',\qquad \frac{dV}{dt}=\frac{1}{T_0}V'. \qquad(1)

The browser uses seconds and the same numerical coefficients, corresponding to this choice of T0T_0. A normalized coefficient such as aa has physical decay rate a/T0a/T_0; normalized angular coefficient Ο‰\omega corresponds to the physical angular rate Ο‰/T0\omega/T_0, expressed in radsβˆ’1\mathrm{rad\,s^{-1}}. The damping parameter cc and gain KK below are normalized coefficients. VV is dimensionless and dV/dtdV/dt has units sβˆ’1\mathrm{s^{-1}}.

For the oscillator only, a physical interpretation can be obtained by choosing displacement scale q0>0q_0>0, setting x1=q/q0x_1=q/q_0 and x2=T0qΜ‡/q0x_2=T_0\dot q/q_0. This explains why its normalized displacement and velocity can appear in one weighted quadratic. Its VV is proportional to mechanical energy for a suitable physical mass/stiffness model; the other models’ bowls are not mechanical energy by default. In an actual robot model, supply state scales or a weight matrix with compatible units before adding squared distance, velocity or heading errors.

Precise stability questions

Consider the autonomous system 𝒙′=f(𝒙)\mathbf x'=f(\mathbf x) on an open domain DβŠ†β„nD\subseteq\mathbb R^n containing the origin. Assume ff is locally Lipschitz and f(𝟎)=𝟎f(\mathbf 0)=\mathbf 0, so local solutions are unique and the origin is an equilibrium. Statements below concern forward solutions while they exist; global conclusions also require forward existence, established here directly for the linear examples or through invariant compact sets.

The origin is Lyapunov stable if, for every Ξ΅>0\varepsilon>0, there is a Ξ΄>0\delta>0 such that

βˆ₯𝒙(0)βˆ₯<Ξ΄β‡’βˆ₯𝒙(Ο„)βˆ₯<Ξ΅for all Ο„β‰₯0.(2) \|\mathbf x(0)\|<\delta \quad\Longrightarrow\quad \|\mathbf x(\tau)\|<\varepsilon\quad\text{for all }\tau\geq0. \qquad(2)

The quantifiers matter: every sufficiently small perturbation must remain small, not merely one selected initial state. The origin is locally attractive if all solutions starting in some neighborhood converge to it. It is locally asymptotically stable if it is both stable and locally attractive. Global asymptotic stability extends attraction to every initial state in ℝn\mathbb R^n, together with stability and forward existence.

Exponential stability additionally gives a uniform rate bound: in the relevant initial-state domain there are constants Mβ‰₯1M\geq1 and Ξ»>0\lambda>0 such that

βˆ₯𝒙(Ο„)βˆ₯≀Meβˆ’Ξ»Ο„βˆ₯𝒙(0)βˆ₯.(3) \|\mathbf x(\tau)\|\leq M e^{-\lambda\tau}\|\mathbf x(0)\|. \qquad(3)

The physical decay rate is Ξ»/T0\lambda/T_0. A bounded trajectory alone proves none of the equilibrium statements above. Nor does a finite-horizon plot that appears to settle establish a uniform bound for all permitted initial states.

The direct method and what its hypotheses do

Choose a continuously differentiable scalar V:D→ℝV:D\to\mathbb R. It is positive definite near the origin if V(𝟎)=0V(\mathbf0)=0 and V(𝒙)>0V(\mathbf x)>0 at every nearby nonzero state. Its derivative along the specified dynamics is

Vβ€²(𝒙)=βˆ‡V(𝒙)⊀f(𝒙).(4) V'(\mathbf x)=\nabla V(\mathbf x)^\top f(\mathbf x). \qquad(4)

A positive definite VV with V′≀0V'\leq0 in a neighborhood establishes local stability. If Vβ€²<0V'<0 for every nonzero state in that neighborhood, it establishes local asymptotic stability. A nonpositive derivative allows motion along level sets; it does not by itself establish attraction.

For a global direct-method conclusion, require these properties throughout ℝn\mathbb R^n and that VV be proper, here meaning V(𝒙)β†’βˆžV(\mathbf x)\to\infty as βˆ₯𝒙βˆ₯β†’βˆž\|\mathbf x\|\to\infty. Nonincreasing proper sublevel sets prevent finite escape for the locally Lipschitz dynamics; strict global decrease then yields global asymptotic stability. A local candidate cannot justify a global claim simply because its plotted region looks large.

A useful stronger condition is

c1βˆ₯𝒙βˆ₯2≀V(𝒙)≀c2βˆ₯𝒙βˆ₯2,Vβ€²β‰€βˆ’c3βˆ₯𝒙βˆ₯2,c1,c2,c3>0. c_1\|\mathbf x\|^2\leq V(\mathbf x)\leq c_2\|\mathbf x\|^2, \qquad V'\leq-c_3\|\mathbf x\|^2, \qquad c_1,c_2,c_3>0.

Then Vβ€²β‰€βˆ’(c3/c2)VV'\leq-(c_3/c_2)V, and comparison gives

βˆ₯𝒙(Ο„)βˆ₯≀c2/c1eβˆ’c3Ο„/(2c2)βˆ₯𝒙(0)βˆ₯.(5) \|\mathbf x(\tau)\|\leq \sqrt{c_2/c_1}\,e^{-c_3\tau/(2c_2)}\|\mathbf x(0)\|. \qquad(5)

These statements supply a sufficient certificate. If one candidate has an indefinite derivative, that candidate fails to certify stability; a separate argument is needed to establish instability.

Five models in the visualization

All parameters are held fixed for each autonomous-system argument. The table uses the normalized time and state conventions above. The default browser parameters are Ο‰=1.4\omega=1.4, spiral a=0.5a=0.5, oscillator c=0.45c=0.45, saddle a=0.55a=0.55, and controlled gain K=1.6K=1.6.

Model Dynamics Candidate and derivative
Center, Ο‰>0\omega>0 x1β€²=βˆ’Ο‰x2x_1'=-\omega x_2, x2β€²=Ο‰x1x_2'=\omega x_1 V=(x12+x22)/2V=(x_1^2+x_2^2)/2; Vβ€²=0V'=0
Spiral, aβ‰₯0a\geq0 x1β€²=βˆ’ax1βˆ’1.25x2x_1'=-a x_1-1.25x_2, x2β€²=1.25x1βˆ’ax2x_2'=1.25x_1-a x_2 V=(x12+x22)/2V=(x_1^2+x_2^2)/2; Vβ€²=βˆ’a(x12+x22)V'=-a(x_1^2+x_2^2)
Oscillator, cβ‰₯0c\geq0 x1β€²=x2x_1'=x_2, x2β€²=βˆ’1.4x1βˆ’cx2x_2'=-1.4x_1-cx_2 V=(1.4x12+x22)/2V=(1.4x_1^2+x_2^2)/2; Vβ€²=βˆ’cx22V'=-c x_2^2
Saddle, a>0a>0 x1β€²=ax1x_1'=a x_1, x2β€²=βˆ’0.8x2x_2'=-0.8x_2 V=(x12+x22)/2V=(x_1^2+x_2^2)/2; Vβ€²=ax12βˆ’0.8x22V'=a x_1^2-0.8x_2^2
Controlled plant x1β€²=x1+u1x_1'=x_1+u_1, x2β€²=0.5x2+u2x_2'=0.5x_2+u_2, 𝒖=βˆ’K𝒙\mathbf u=-K\mathbf x V=(x12+x22)/2V=(x_1^2+x_2^2)/2; Vβ€²=(1βˆ’K)x12+(0.5βˆ’K)x22V'=(1-K)x_1^2+(0.5-K)x_2^2

Center: stable without attraction

The cross terms cancel:

Vβ€²=x1(βˆ’Ο‰x2)+x2(Ο‰x1)=0. V'=x_1(-\omega x_2)+x_2(\omega x_1)=0.

Thus βˆ₯𝒙(Ο„)βˆ₯=βˆ₯𝒙(0)βˆ₯\|\mathbf x(\tau)\|=\|\mathbf x(0)\| for all time. Choosing Ξ΄=Ξ΅\delta=\varepsilon proves stability. Every nonzero initial state stays on a circle of nonzero radius, so it does not converge to the origin. This is a global example of stability without attraction, not a slowly converging case.

Spiral: a quantitative exponential bound

For a>0a>0,

Vβ€²=βˆ’aβˆ₯𝒙βˆ₯2=βˆ’2aV,V(Ο„)=eβˆ’2aΟ„V(0),βˆ₯𝒙(Ο„)βˆ₯=eβˆ’aΟ„βˆ₯𝒙(0)βˆ₯.(6) V'=-a\|\mathbf x\|^2=-2aV, \qquad V(\tau)=e^{-2a\tau}V(0), \qquad \|\mathbf x(\tau)\|=e^{-a\tau}\|\mathbf x(0)\|. \qquad(6)

The rotation coefficient 1.25 changes the direction of motion but cancels from the radial energy derivative. At a=0a=0 this becomes a center; strict negativity and attraction disappear. The fixed a>0a>0 model is globally exponentially stable, with physical norm time constant T0/aT_0/a.

Oscillator: the missing invariant-set step

Its weighted candidate is essential for cancellation:

Vβ€²=1.4x1x1β€²+x2x2β€²=1.4x1x2+x2(βˆ’1.4x1βˆ’cx2)=βˆ’cx22.(7) V'=1.4x_1x_1'+x_2x_2' =1.4x_1x_2+x_2(-1.4x_1-cx_2)=-cx_2^2. \qquad(7)

For c>0c>0, zero derivative occurs on the entire line E={x2=0}E=\{x_2=0\}, not only at the origin. At (x1,0)(x_1,0) with x1β‰ 0x_1\ne0, however, x2β€²=βˆ’1.4x1β‰ 0x_2'=-1.4x_1\ne0: the trajectory immediately leaves EE. The only trajectory that remains in EE for all future time is the origin.

To apply LaSalle’s invariance principle, choose any finite Rβ‰₯V(𝒙(0))R\geq V(\mathbf x(0)). The set

Ξ©R={𝒙:V(𝒙)≀R} \Omega_R=\{\mathbf x:V(\mathbf x)\leq R\}

is closed and bounded because VV is a positive definite quadratic; it is therefore compact. It is positively invariant because V′≀0V'\leq0. The dynamics are smooth, and the largest invariant subset of {π’™βˆˆΞ©R:Vβ€²=0}\{\mathbf x\in\Omega_R:V'=0\} is the origin. LaSalle establishes convergence to that origin. Combined with the stability certificate, this gives global asymptotic stability since every initial state belongs to such a sublevel set. This is the invariance argument described in MIT’s Lyapunov chapter.

For c=0c=0, Vβ€²=0V'=0 everywhere and the invariant motions are closed ellipses; convergence no longer follows. An instant at which x2=0x_2=0 with x1β‰ 0x_1\ne0 is a turning point, not an equilibrium. Nonincreasing energy is compatible with such isolated zero-derivative instants.

Saddle: a converging trajectory does not rescue stability

The matrix has eigenvalues a>0a>0 and βˆ’0.8<0-0.8<0. Its exact solutions are

x1(Ο„)=x1(0)eaΟ„,x2(Ο„)=x2(0)eβˆ’0.8Ο„.(8) x_1(\tau)=x_1(0)e^{a\tau},\qquad x_2(\tau)=x_2(0)e^{-0.8\tau}. \qquad(8)

Any arbitrarily small nonzero initial x1x_1 eventually leaves a prescribed small neighborhood; hence the origin is unstable. Initial states on the line x1=0x_1=0 converge, but this exceptional stable manifold does not satisfy the β€œevery small perturbation” requirement. The positive eigenvalue and explicit growth establish instability. The indefinite derivative of our chosen VV alone would not be enough.

A control Lyapunov function and checked feedback gains

For the controlled example,

𝒙′=A𝒙+B𝒖,A=diag⁑(1,0.5),B=I2,π’–βˆˆβ„2. \mathbf x'=A\mathbf x+B\mathbf u,\qquad A=\operatorname{diag}(1,0.5),\quad B=I_2, \quad \mathbf u\in\mathbb R^2.

The input is ideal and fully actuated: each normalized state has its own unconstrained input. A control Lyapunov function is a positive definite candidate for which an admissible control can make the derivative strictly negative away from the origin. The existence of such a control does not mean every feedback works. For a full treatment see the author-hosted Braun–Kellett CLF slides; the elementary example here does not require their advanced constructions.

With V=π’™βŠ€π’™/2V=\mathbf x^\top\mathbf x/2,

Vβ€²=x1(x1+u1)+x2(0.5x2+u2). V'=x_1(x_1+u_1)+x_2(0.5x_2+u_2).

Select the constant feedback 𝒖=βˆ’K𝒙\mathbf u=-K\mathbf x. Then

Vβ€²=(1βˆ’K)x12+(0.5βˆ’K)x22,Ξ»(Aβˆ’KI2)={1βˆ’K,0.5βˆ’K}.(9) V'=(1-K)x_1^2+(0.5-K)x_2^2, \qquad \lambda(A-KI_2)=\{1-K,\,0.5-K\}. \qquad(9)

  • K > 1: both coefficients are negative. In fact Vβ€²β‰€βˆ’2(Kβˆ’1)VV'\leq-2(K-1)V, so βˆ₯𝒙(Ο„)βˆ₯≀eβˆ’(Kβˆ’1)Ο„βˆ₯𝒙(0)βˆ₯\|\mathbf x(\tau)\|\leq e^{-(K-1)\tau}\|\mathbf x(0)\| globally.
  • K = 1: x1x_1 remains constant while x2x_2 decays. The origin is stable because the norm never increases, but is not attractive for initial x1β‰ 0x_1\ne0. An entire line of equilibria remains.
  • K < 1: the first eigenvalue is positive, so the origin is unstable. The simulator’s allowed range is 0≀K≀2.50\leq K\leq2.5.

For a reproducible analytic comparison, start at 𝒙(0)=(1,1)⊀\mathbf x(0)=(1,1)^\top, hold each gain fixed, apply no pulses, and compare at t=5st=5\,\mathrm{s}, or Ο„=5\tau=5:

K Exact state State at Ο„=5\tau=5 (rounded) V at Ο„=5\tau=5 Conclusion
0.8 (e0.2Ο„,eβˆ’0.3Ο„)(e^{0.2\tau},e^{-0.3\tau}) (2.718282,0.223130)(2.718282,0.223130) 3.719422 Unstable
1.0 (1,eβˆ’0.5Ο„)(1,e^{-0.5\tau}) (1,0.082085)(1,0.082085) 0.503369 Stable, not attractive
1.6 (eβˆ’0.6Ο„,eβˆ’1.1Ο„)(e^{-0.6\tau},e^{-1.1\tau}) (0.049787,0.004087)(0.049787,0.004087) 0.001248 Globally exponentially stable

These are exact-solution calculations rounded for comparison, not imported browser measurements. For K = 0.8, the initial derivative is Vβ€²(0)=0.2βˆ’0.3=βˆ’0.1V'(0)=0.2-0.3=-0.1, despite instability. It changes sign at Ο„=log⁑(1.5)β‰ˆ0.405465\tau=\log(1.5)\approx0.405465. A short decreasing segment of V therefore does not certify the entire closed loop. For K = 1, the limiting value is Vβ†’1/2V\to1/2, not zero.

Interpreting the animation and transferring the reasoning

The visualization computes analytic Vβ€²V' for the current model and numerically integrates the state with RK4. A displayed derivative is not a finite-difference estimate or a proof about all initial states. Small integration error can create apparent energy drift, especially for a center over long horizons. Record the model, gain, initial condition, step/integration choice and run duration when comparing a CSV with an exact solution.

A pulse changes the state instantaneously. At that instant the smooth-flow formula for Vβ€²V' does not describe the jump V(𝒙+)βˆ’V(π’™βˆ’)V(\mathbf x^+)-V(\mathbf x^-). Changing a gain during a run makes the experiment time varying. The fixed-gain proofs above cannot simply be cited for arbitrary gain schedules. Recovery after one pulse is useful evidence but does not establish an input-to-state stability result for sustained disturbances.

The controlled plant has no actuator bounds, heading dynamics, sampling, measurement noise, bias or latency. A marine vehicle’s commanded Cartesian velocity may not be physically realizable. For a physical error ee measured in metres, a scale L>0mL>0\,\mathrm m permits V=e2/(2L2)V=e^2/(2L^2). If the actual error dynamics are eΜ‡=βˆ’ke\dot e=-ke with k>0sβˆ’1k>0\,\mathrm{s^{-1}}, then VΜ‡=βˆ’2kV\dot V=-2kV is dimensionally consistent. Proving an ideal commanded velocity would produce that equation is only one step; the realized dynamics, constraints and operating domain must still be justified.

Formative questions and reading

Use these ungraded questions to check reasoning before a control or guidance derivation:

  1. Why does a center satisfy stability while failing attraction?
  2. Why does Vβ€²=0V'=0 at an oscillator turning point not imply equilibrium?
  3. What establishes instability of the saddle beyond a failed candidate?
  4. Why can K = 0.8 initially decrease V from (1,1)(1,1) and still be unstable?
  5. Which steps must be revisited if the input saturates or the gain varies?

Core supporting references are Kellett–Braun chapter 2, Tedrake’s Lyapunov chapter, and Braun–Kellett chapter 9. The broader chapters include material beyond this recap; no advanced Sontag, optimization or backstepping method is assumed here. The intake review at review/incoming_control_guidance_2026-10-28.md records simulator provenance and distinguishes checked sources from unverified conversation leads.