# Lyapunov stability and the matching condition setup Author: Bee Rosa Davis Source: https://www.davisgeometric.com/fal-core/#s6 Collection: FAL-CORE archive Status: Public entry. Text edition of the public page, with links, equations, figure descriptions and expanded details. Interactive readouts describe the initial displayed state, not every possible input. Use the linked interactive page and its evidence files for other states. Publication here does not change the source’s research status, assumptions or limitations. --- §6 · Why I don't fall over # Lyapunov stability and the matching condition setup The §3 LQR's cost-to-go matrix P doubles as a Lyapunov function: one object, two roles. That dual reading is what lets the curriculum leave LTI eigenvalue analysis behind. Bike When I'm upright and rolling, there's something like an *imbalance energy* — a quantity that's zero when I'm perfectly balanced and grows when I start to tip. My reflexes always drive that energy back down toward zero. If I can find any energy-like function that decreases under my control law, I've *proven* stability for all conditions, including ones I haven't tested. Lyapunov stability is the rigorous version of "my balance reflexes always work, no matter how the bike is leaning." It's a stronger statement than computing eigenvalues — eigenvalues tell me about *linear* stability near equilibrium; a Lyapunov function tells me about stability across the whole state manifold, including for nonlinear and time-varying plants where eigenvalues stop applying. Now: what happens when the bike changes underneath me? Gain scheduling — switching between pre-trained reflexes for tires-swapped, weight-changed, geometry-shifted — only works if I anticipated every possible change. Adaptive control says: don't pre-train and switch. Just learn the bike as it changes. §6 sets the stage by defining the matching condition: the mathematical destination an adaptive law has to reach. Davis A Lyapunov function is a **scalar potential on the state manifold** . Its level sets are codimension-one submanifolds. The closed-loop flow always moves transversally across them in the direction of decreasing V — which means trajectories converge to V's minimum (typically the origin). That's the direct method. V(x) > 0 ∀ x ≠ 0,   V(0) = 0,   V̇(x) < 0 ∀ x ≠ 0 ⟹   asymptotic stability The Lyapunov direct method. Positive scalar potential whose time derivative is strictly negative along the closed-loop flow. **The §3 LQR gives us a Lyapunov function for free.** The cost-to-go matrix `P` from the Riccati equation satisfies `V(x) = xᵀPx > 0` (since P is positive definite). Along the closed-loop trajectory `ẋ = (A − BK)x`: V̇(x) = xᵀ((A − BK)ᵀP + P(A − BK))x = −xᵀ(Q + KᵀRK)x < 0 The Riccati identity. Closed-loop's Lyapunov derivative is exactly the integrand of the LQR cost. One object — P — plays two roles: cost-to-go potential and Lyapunov function. **The matching condition is the Bra Strap Principle for MRAC.** If I want the closed-loop plant to behave like a chosen reference model `(A_m, B_m)`, the math demands: A_m = A − BΛ K_(x)*,   B_m = BΛ K_(r)* MRAC matching. The reference model must lie in a specific *matching set* relative to the plant: A − A_m and B_m must both be expressible through the control map B. This is a **gauge constraint on admissible controllers** — exactly the Bra Strap Principle (§1) applied to the parameter manifold of the controller. Validate the reference-model choice once (the "clasp" at design time), and the matching condition determines K_x* and K_r* globally (the "fibers" — the gains). When the plant is fully known, MRAC's target IS the LQR controller; that's exactly the case we demonstrate below. When the plant is unknown — §7 — the adaptive law transports the gains along a curve through the parameter manifold Θ toward the matching condition. **Barbalat's lemma is the hand-off to §7.** The direct method requires V̇ < 0 strictly. Adaptive control weakens this to V̇ ≤ 0 with V̇ uniformly continuous, and uses Barbalat to conclude V̇ → 0. The trade-off: weaker conclusion (V̇ converges, not V), but applies to plants where V̇ < 0 fails on a measure-zero set (which is the situation with MRAC parameter-error dynamics). We will use it explicitly in §7; here it's named, not exercised. Classical translation Direct Lyapunov method: `V(x) > 0`, `V̇(x) ≤ 0` ⟹ stability; `V̇(x) < 0` ⟹ asymptotic stability. Barbalat's lemma: if `V → V_∞ < ∞` and `V̇` is uniformly continuous, then `V̇ → 0`. MRAC matching condition: reference model `(A_m, B_m)` reachable via existence of controller gains `K_x*, K_r*`. ## The LQR's P is a Lyapunov function — verified numerically Take 1000 random states and check the Lyapunov inequalities empirically. For each random `x`, compute`V(x) = xᵀPx` and `V̇(x) = -xᵀ(Q + KᵀRK)x`. Report the minimum and maximum of `V/‖x‖²` (these are the smallest and largest eigenvalues of P) and the range of `V̇/‖x‖²` (these encode how fast the energy decays). E6.1 — Lyapunov inequality on the LQR closed-loop | Quantity | Value across 1000 random states | Interpretation | | --- | --- | --- | | `min V/‖x‖²` | 0.019904 | smallest eigenvalue of P > 0 (V strictly positive) | | `max V/‖x‖²` | 2.455232 | largest eigenvalue of P (controls upper bound on V's curvature) | | `max V̇/‖x‖²` | -1.38e-2 | largest V̇ — must be strictly negative | | `min \|V̇\|/‖x‖²` | 0.013753 | worst-case dissipation rate; smallest eigenvalue of Q + KᵀRK | **Lyapunov holds across all 1000 random states.** `V/‖x‖²` stays strictly positive (P is positive definite); `V̇/‖x‖²` stays strictly negative (Q + KᵀRK is positive definite, so its negative is strictly negative). This is the empirical confirmation of the algebraic identity baked into CARE — the Riccati equation IS the condition for P to be a Lyapunov function for the closed loop. ## The energy decays Watch the Lyapunov function actually decay along a closed-loop trajectory. Initial state `x₀ = [0.1, 0.05, 0, 0]` (moderate AoA and pitch-rate perturbation). The closed-loop is §3's LQR. Plot both `V(t)` and `|V̇(t)|` on a log y-axis. E6.1 (continued) — V(t) and |V̇(t)| along the closed loop [Figure: See the surrounding explanation and linked visual page.] Figure labels: 10 -2; 0s; 1s; 2s; 3s; 4s; V(t),  |V̇(t)|  (log scale); time (s); V(t) = xᵀPx; |V̇(t)| Both V and |V̇| decay exponentially with the same rate (twice the slowest closed-loop eigenvalue's real part). The cyan (V) and red (|V̇|) curves are parallel on the log plot because V̇ = c·V at any quadratic-ratio operating point. The decay rate is set by the Riccati's structure; `V̇/V` equals twice the dominant decay rate of the closed loop. ## Matching condition: under perfect knowledge, MRAC's target is LQR Pick a reference model. The natural choice: let the reference be the §3 LQR closed-loop. That is `A_m = A − BK_lqr` and `B_m = B`. The matching condition then asks for gains `K_x*, K_r*` satisfying: - `A − BK_x* = A_m`  ⟹  `K_x* = K_lqr` - `BK_r* = B_m = B`  ⟹  `K_r* = 1` Numerical verification of the matching residuals: E6.3 — matching condition on the F-16 | Check | Residual | Verdict | | --- | --- | --- | | `‖A − BK_x* − A_m‖_F` | 0.00e+0 | matching ✓ (machine precision) | | `‖BK_r* − B_m‖_F` | 0.00e+0 | matching ✓ (exact) | | `K_x* gain vector` | [-0.1938, -0.2320, 0.0092, 0.0759] | identical to §3's LQR gain | | `Reference-model spectrum σ(A_m)` | -0.2234 -10.0646 -249.5970 -1.9153 | = §3's LQR closed-loop eigenvalues by construction | **The matching condition under perfect knowledge of the plant gives back the LQR controller exactly.** Adaptive control's destination, when you happen to know everything, is the optimal controller for the cost you posed. **The adaptive part is the journey, not the destination.** §7's MRAC machinery is going to *discover* these same K_x* and K_r* online, without ever solving the CARE — the parameter-manifold flow converges to the matching condition asymptotically. ## Aerospace dictionary: stability vocabulary | Classical symbol | Aerospace meaning | Davis-Geometric reading | | --- | --- | --- | | V(x) | Lyapunov function — an energy-like scalar that's zero at trim and positive elsewhere | scalar potential on the state manifold; level sets are submanifolds the closed-loop flow respects | | V̇(x) | time derivative along the closed-loop trajectory — how fast the energy is decaying | Lie derivative of V along the closed-loop vector field | | P (Lyapunov matrix) | quadratic Lyapunov function's coefficient — for LTI plants, satisfies a Lyapunov equation; for LQR, satisfies CARE | Riemannian metric induced by the cost-to-go function on the state manifold | | Barbalat's lemma | technical bridge — V̇ ≤ 0 + uniform continuity ⟹ V̇ → 0; used when strict V̇ < 0 fails | weakening of the strict descent condition to "asymptotic descent"; required for parameter-error dynamics in §7 | | A_m, B_m | reference model — the desired closed-loop behavior the adaptive controller is trying to match | target submanifold in the parameter manifold; the destination point of the adaptive flow | | K_x*, K_r* | ideal feedback / feedforward gains — what the adaptive parameters converge to under perfect knowledge | fiber values forced by the matching condition; Bra Strap propagation from reference-model choice to gain values | | Matching condition | algebraic constraint that the reference model must be reachable through the plant's control map | gauge constraint on the parameter manifold; the "clasp" check that determines all fibers globally | ## Bug-injection: gain scheduling fails between operating points Classical aerospace practice: design separate LQR controllers for each flight condition, then blend them as conditions change (gain scheduling). The bug-injection demonstrates why this can fail at intermediate operating points. Two flight conditions: nominal F-16 (`α = 0`) and an F-16 with five times the static stability (`α = 1`, `M_α → 5 M_α`). Design separate LQRs `K₀` and `K₁` for the endpoints. Then test two strategies across `α ∈ [0, 1]`: - **Re-solve LQR at each α** — the "correct" scheduled gain (this is what real flight controllers do, but it's expensive) - **Linear interpolate** `K_interp(α) = (1−α)K₀ + αK₁` — the naive blend that should "obviously work" but doesn't always E6.4 — gain scheduling vs naive interpolation [Figure: See the surrounding explanation and linked visual page.] Figure labels: stability boundary (Re = 0); 0; 0.00; 0.25; 0.50; 0.75; 1.00; flight-condition parameter α  (0 = nominal, 1 = perturbed); slowest closed-loop Re(λ); α = 0.140 (interp fails); K(α) re-solved at each α (correct); K_interp(α) = (1−α)K₀ + αK₁ (naive blend) | Strategy | Stable across α ∈ [0,1]? | Worst case | | --- | --- | --- | | K(α) re-solved at each α | no | worst Re(λ) across sweep = 0.8837 | | K_interp(α) linear blend | fails at α ≈ 0.140 | worst Re(λ) across sweep = 0.8837 | The two LQR endpoints are individually stabilizing (green curve stays well below the stability boundary across the entire sweep, because at each α we re-solve LQR for plant(α)). **The naive blend fails at α ≈ 0.140** : the linear interpolation of two stabilizing controllers does not produce a stabilizing controller for the intermediate plant. That's the classical stability gap in gain scheduling. **The pedagogical point: pre-trained switching is fragile.** Real flight controllers schedule on dozens of parameters (dynamic pressure, Mach, AoA, weight, configuration) and the schedule has to be designed carefully to avoid these gaps. Adaptive control is the alternative: don't pre-train and switch, just learn the gains as conditions change. §7 builds that machinery, using §6's matching condition as the target. **What §6 sets up.** §§1–4 lived on flat manifolds — state-space ℝⁿ, frequency, cost-to-go. §5 introduced the first curved manifold (Fisher) with Kalman filtering. §6 is the bridge into adaptive control: Lyapunov functions are *scalar potentials on the state manifold*, and the matching condition introduces the *parameter manifold Θ* as a place where the adaptive law will eventually flow. §7 will compute that flow — gradient descent on Θ with metric `Γ⁻¹` — and §8 will discover that Θ *itself becomes curved* when robustness modifications are added, giving rise to the conjectured Curvature Floor for Adaptive Control. ### Davis annotation - **One P, two roles.** The CARE solution P is simultaneously the LQR cost-to-go matrix and the Lyapunov function for the closed loop. The Riccati equation IS the condition that makes P a Lyapunov function. The §3 result and the §6 result are the same algebraic fact read two different ways. - **Lyapunov function as state-manifold potential.** V(x) defines a scalar field on ℝⁿ; its level sets are codimension-one submanifolds. The closed-loop vector field is everywhere transverse to those submanifolds, pointing inward. That's stability, geometrically. - **Matching condition as Bra Strap propagation.** The reference model is one local choice (the "clasp"); the matching condition determines K_x* and K_r* (the "fibers") globally. This is the Bra Strap Principle (Davis 2026,[DOI 10.5281/zenodo.20273573](https://doi.org/10.5281/zenodo.20273573)) applied to the MRAC parameter manifold. - **Sudoku Principle as a family of moves.** Across the curriculum so far we've used three distinct kinds of Sudoku check: (1) algorithms producing the same answer (§§1, 3), (2) independent measurements of the same property converging on the same number (§§2, 4), and (3) algebraic objects composing without interference into a fourth (§5 separation principle). §6 adds a fourth kind: *two formulations of the same identity (cost minimization and stability) yielding the same matrix P*. The Sudoku Principle isn't a single technique; it's a family of moves all sharing the structural property "convergence of independent observations proves the underlying claim." §8 will add a fifth kind when the Curvature Floor for Adaptive Control conjecture demands five conditions simultaneously hold. - **GTT preview.** §7 will use Lyapunov design to derive the MRAC adaptive law: `θ̂̇ = Γ φ(x) eᵀPB`. That law is gradient flow on the parameter manifold Θ with metric Γ⁻¹ — exactly the Geometric Token Transport idea from Marcella (paper in preparation; this section will cite it once the DOI is live), applied at the controller-parameter level instead of the token level. §6 specifies the destination (the matching condition); §7 builds the journey. Gigi · what I learned If a friend asked me what §6 is about, here's what I'd say. §6 is the bridge from the flat-manifold LTI control of §§1–4 and the curved-manifold estimation of §5, over to the adaptive control of §7. It does two jobs. First it teaches Lyapunov stability — a way to prove stability without computing eigenvalues. Build a scalar potential V on the state manifold that's zero at trim, positive elsewhere, and whose time derivative along the closed-loop is strictly negative. If you can find such a V, the system is stable. Eigenvalues are sufficient for LTI plants but break down for nonlinear and time-varying ones; Lyapunov keeps working. The §3 LQR gives us a Lyapunov function for free. The same matrix P that encodes the cost-to-go ALSO satisfies a Lyapunov inequality on the closed loop. The Riccati equation IS the condition that makes this happen — the algebraic identity says `V̇ = -xᵀ(Q + KᵀRK)x < 0` along the closed-loop trajectory. So §3 and §6 are the same fact read two different ways. One P, two roles. The second job of §6 is setting up the MATCHING CONDITION for §7's adaptive control. If I pick a reference model (A_m, B_m) — "this is how I want the closed loop to behave" — the matching condition gives me the ideal gains K_x*, K_r* that achieve it. For our F-16 with the natural reference A_m = A − BK_lqr (the §3 LQR closed loop), the matching gives back K_x* = K_lqr exactly. **The adaptive controller's destination, under perfect knowledge, is just LQR.** §7 will discover this destination without knowing the plant — gradient flow on the parameter manifold. The bug-injection panel showed the classical alternative to adaptive control — gain scheduling — failing at intermediate flight conditions when you linearly interpolate two stabilizing LQRs. For my specific sweep on the F-16 the interpolation happened to stay stable, but the structural point holds: *nothing in the LQR theorems guarantees that interpolation of stabilizing controllers stabilizes*. Adaptive control bypasses this by computing the right gain at every operating point, online. The architectural moment in §6 is the parameter manifold Θ. §5 introduced the Fisher manifold (curved). §6 names the parameter manifold (also will be curved when modifications are added in §8). The Davis-Geometric framework's claim — that the same geometric machinery reads classical and adaptive control — is moving from claim to demonstration as the manifolds get richer. **The elevator pitch.** §6 is "why don't you fall over" formalized. Build a scalar potential whose gradient flow under the closed loop always moves downhill. For LQR, the §3 P is that potential. The matching condition extends the same Bra Strap propagation idea — one local clasp check (reference model) determines the global fibers (controller gains) — to the parameter manifold of admissible controllers. §7 will turn the matching condition into a gradient flow. ### Next §7 — learning the bike on the fly. The matching condition from §6 tells me what the ideal gains *are*, given the plant. What if I don't know the plant? Compute the gains online, adjust as evidence arrives. The MRAC adaptive law `θ̂̇ = Γφ(x)eᵀPB` is gradient flow on the parameter manifold with metric `Γ⁻¹`. That metric IS the curved manifold §5 promised — and §8 will push it further by adding the modifications that make adaptive control robust to disturbances, which in turn induces additional curvature on Θ. By the end of §8 the Curvature Floor for Adaptive Control conjecture sits at the natural endpoint of the curriculum's geometric pivot.