Control foundations: stability and Lyapunov reasoning
Shared student reference for Marine Robotics and Multi-Robot Systems
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:
- distinguish stability, attraction, asymptotic stability and exponential stability;
- calculate a candidateβs derivative and state what its sign establishes;
- explain the invariant-set step needed for the damped oscillator;
- derive a stabilizing feedback threshold for a simple fully actuated plant; and
- 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, contains dimensionless normalized states. They are illustrative mathematical states; the same symbol does not assert that all five models describe the same robot. Let be physical/display time, choose a stated reference time , and define normalized time . A prime denotes ; consequently
The browser uses seconds and the same numerical coefficients, corresponding to this choice of . A normalized coefficient such as has physical decay rate ; normalized angular coefficient corresponds to the physical angular rate , expressed in . The damping parameter and gain below are normalized coefficients. is dimensionless and has units .
For the oscillator only, a physical interpretation can be obtained by choosing displacement scale , setting and . This explains why its normalized displacement and velocity can appear in one weighted quadratic. Its 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 on an open domain containing the origin. Assume is locally Lipschitz and , 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 , there is a such that
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 , together with stability and forward existence.
Exponential stability additionally gives a uniform rate bound: in the relevant initial-state domain there are constants and such that
The physical decay rate is . 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 . It is positive definite near the origin if and at every nearby nonzero state. Its derivative along the specified dynamics is
A positive definite with in a neighborhood establishes local stability. If 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 and that be proper, here meaning as . 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
Then , and comparison gives
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 , spiral , oscillator , saddle , and controlled gain .
| Model | Dynamics | Candidate and derivative |
|---|---|---|
| Center, | , | ; |
| Spiral, | , | ; |
| Oscillator, | , | ; |
| Saddle, | , | ; |
| Controlled plant | , , | ; |
Center: stable without attraction
The cross terms cancel:
Thus for all time. Choosing 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 ,
The rotation coefficient 1.25 changes the direction of motion but cancels from the radial energy derivative. At this becomes a center; strict negativity and attraction disappear. The fixed model is globally exponentially stable, with physical norm time constant .
Oscillator: the missing invariant-set step
Its weighted candidate is essential for cancellation:
For , zero derivative occurs on the entire line , not only at the origin. At with , however, : the trajectory immediately leaves . The only trajectory that remains in for all future time is the origin.
To apply LaSalleβs invariance principle, choose any finite . The set
is closed and bounded because is a positive definite quadratic; it is therefore compact. It is positively invariant because . The dynamics are smooth, and the largest invariant subset of 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 , everywhere and the invariant motions are closed ellipses; convergence no longer follows. An instant at which with 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 and . Its exact solutions are
Any arbitrarily small nonzero initial eventually leaves a prescribed small neighborhood; hence the origin is unstable. Initial states on the line 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 alone would not be enough.
A control Lyapunov function and checked feedback gains
For the controlled example,
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 ,
Select the constant feedback . Then
- K > 1: both coefficients are negative. In fact , so globally.
- K = 1: remains constant while decays. The origin is stable because the norm never increases, but is not attractive for initial . An entire line of equilibria remains.
- K < 1: the first eigenvalue is positive, so the origin is unstable. The simulatorβs allowed range is .
For a reproducible analytic comparison, start at , hold each gain fixed, apply no pulses, and compare at , or :
| K | Exact state | State at (rounded) | V at | Conclusion |
|---|---|---|---|---|
| 0.8 | 3.719422 | Unstable | ||
| 1.0 | 0.503369 | Stable, not attractive | ||
| 1.6 | 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 , despite instability. It changes sign at . A short decreasing segment of V therefore does not certify the entire closed loop. For K = 1, the limiting value is , not zero.
Interpreting the animation and transferring the reasoning
The visualization computes analytic 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 does not describe the jump . 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 measured in metres, a scale permits . If the actual error dynamics are with , then 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:
- Why does a center satisfy stability while failing attraction?
- Why does at an oscillator turning point not imply equilibrium?
- What establishes instability of the saddle beyond a failed candidate?
- Why can K = 0.8 initially decrease V from and still be unstable?
- 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.