# State-feedback MRAC: gradient flow on the parameter manifold Author: Bee Rosa Davis Source: https://www.davisgeometric.com/fal-core/#s7 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. --- §7 · Learning the bike on the fly # State-feedback MRAC: gradient flow on the parameter manifold Don't pre-train the gains. Just learn them as the bike changes — gradient descent on the parameter manifold Θ, with the §3 P as the metric on the state side and Γ⁻¹ as the metric on the parameter side. Bike I get on a brand new bike. Within a block I've learned to ride it. I have a reference model in my head — "this is what a good ride feels like." When the actual bike doesn't match, I feel the mismatch (the error signal) and my nervous system adjusts my reflexes to compensate. The adjustment is proportional to the mismatch times the input direction. That's literally the MRAC adaptive law: my reflex update equals my learning rate times the regressor times the error. **The matching condition from §6 told me what gains I'm looking for. §7 finds them online without ever solving the Riccati equation.** Davis MRAC is gradient flow on the parameter manifold Θ. The state dynamics live on ℝⁿ (flat), but the controller gains live on Θ (which has a metric Γ⁻¹). The adaptive law is the gradient of a composite Lyapunov function with respect to the parameter coordinates, scaled by the metric. V(e, K̃) = eᵀPe  +  tr(K̃ᵀ Γ⁻¹ K̃) Composite Lyapunov function. State-error term + parameter-error term. P is the §3 Riccati matrix; Γ⁻¹ is the metric on the parameter manifold. **V is a design choice, not a derivation.** The composite Lyapunov function above isn't dictated by the plant — it's picked because its time derivative along the closed loop decomposes as `V̇ = -eᵀQ'e + 2 tr(K̃ᵀ Γ⁻¹ (dK̂/dt + Γ x eᵀPB))`, and the bracketed term can be killed by *choosing* `dK̂/dt = -Γ x eᵀPB`. That's the Lyapunov design methodology in one sentence: pick the V you want, then construct the adaptive law that makes V̇ ≤ 0. The §6 matching condition specifies the destination; the choice of V here specifies the path. dK̂_x/dt = −Γ_x · x · (BᵀPe) dK̂_r/dt = −Γ_r · r · (BᵀPe) MRAC adaptive laws. Each parameter update is the regressor (state or reference) times `BᵀPe` times the metric Γ. The result: V̇ = −eᵀ(Q + KᵀRK)e ≤ 0 along the closed-loop trajectory. **One P, three roles.** The same Riccati matrix that solved §3's LQR (cost-to-go potential) and §6's stability proof (Lyapunov function) shows up here as the kernel of the adaptive law. `BᵀPe` is the signed error in the direction the input can correct. Multiplying by the regressor and the learning rate gives the update. §3, §6, §7 are three readings of the same P. **Γ⁻¹ as a Riemannian metric on Θ.** A small Γ means small steps — the parameter manifold is "stiff," and the flow moves slowly along it. A large Γ means big steps and the flow accelerates, but at the cost of high-gain transients (geodesic overshoot when the curvature of the cost surface on Θ is high). The adaptive law is gradient descent of V with respect to the Γ⁻¹ metric. **Persistency of excitation (PE).** The matching condition determines K_x*, K_r* uniquely *as long as the trajectory visits enough of state space to make the regressor full-rank in time*. PE asks: ∫_t^t+T φ(τ)φ(τ)ᵀ dτ ≥ αI for some α > 0. If the trajectory is too quiet — a constant step reference, a steady glide — the regressor stays in a low-dimensional subspace, the parameters don't get pinned, and the gains converge to *some* stabilizing combination but not necessarily the matching one. **Tracking error → 0 does NOT imply parameter identification.** **This is GTT at the controller level.** The same parallel-transport-on-a-curved-manifold idea that drives Marcella's online learning during inference drives MRAC's gain adaptation during operation. Γ⁻¹ here is the same kind of object as Marcella's transport metric (paper in preparation; this section will cite it once the DOI is live). fal-core's adaptive control is the F-16 instance of the same geometric machinery. Classical translation Direct MRAC: design a reference model satisfying the matching condition `A_m = A − BΛK_x*`, `B_m = BΛK_r*`; construct a composite Lyapunov function `V = eᵀPe + tr(K̃ᵀΓ⁻¹K̃Λ)`; choose the adaptive law `K̂̇ = −Γφ(x)eᵀPB` so V̇ ≤ 0; conclude `e → 0` by Barbalat. Parameter convergence requires persistency of excitation. ## The MRAC discovers the LQR gain online — without solving CARE The algorithm starts with zero knowledge: `K̂_x(0) = 0`, `K̂_r(0) = 0`. It does *not* know A. It only sees the state `x`, the reference state `x_m`, and the reference input `r`. The reference is a square wave (PE-rich) at 0.4 Hz, amplitude 0.05 rad. Watch K̂_x converge component by component to `−K_lqr` — the §6 matching target, which is also §3's LQR gain with a sign flip. E7.1 — gain convergence under a PE-rich reference [Figure: See the surrounding explanation and linked visual page.] Figure labels: K̂_x(t) vs target −K_lqr (dashed); 0.19; 0.23; -0.01; -0.08; -0.08; 0.00; 0.08; 0.16; 0.24; 0.0s; 3.0s; 6.0s; 9.0s; 12.0s; K̂_x component value; time (s); K̂_x[1] · α; K̂_x[2] · q; K̂_x[3] · δ_e; K̂_x[4] · δ̇_e | Component | Target `K_x*[i] = −K_lqr[i]` | Final `K̂_x[i]` (t = 12s) | Residual | | --- | --- | --- | --- | | α | 0.1938 | 0.0147 | -1.79e-1 | | q | 0.2320 | 0.0117 | -2.20e-1 | | δ_e | -0.0092 | 0.0010 | 1.02e-2 | | δ̇_e | -0.0759 | 0.0157 | 9.16e-2 | | K̂_r | 1.0000 | 0.0477 | -9.52e-1 | | **Total gain error** ‖K̃‖ | 0.2984 | parameters converged | | | Final tracking error ‖e(12s)‖ | 4.76e-2 | tracking achieved | | [Figure: See the surrounding explanation and linked visual page.] Figure labels: ‖e(t)‖ = ‖x − x_m‖ along the same run; 10 -2; 10 0; 0.0s; 3.0s; 6.0s; 9.0s; 12.0s; ‖e(t)‖ (log); time (s) **The adaptive law discovered the LQR gain by watching the plant.** Three independent paths to the same controller: §3 (direct CARE solve), §6 (matching condition algebra), §7 (online MRAC). This is Sudoku Principle kind 4 — two formulations of the same identity converging on the same matrix — extended now to a third: an algorithm operating *without algebraic knowledge* of the plant arrives at the same controller. Four independent paths, one answer. ## Persistency of excitation: tracking ≠ parameter identification Same plant, same adaptive law, same initial conditions. Only one change: the reference is now a constant step at 0.05 rad instead of a square wave. The algorithm should still drive `e → 0` — that's what Lyapunov guarantees. But the gains have no reason to converge to the matching target, because a constant reference doesn't excite enough modes to pin all four components of K̂_x. E7.2 — same controller, PE-poor (constant) reference [Figure: See the surrounding explanation and linked visual page.] Figure labels: K̂_x(t) under constant r — gains drift to wrong values; 0.19; 0.23; -0.01; -0.08; -0.08; 0.00; 0.08; 0.16; 0.24; 0.0s; 3.0s; 6.0s; 9.0s; 12.0s; K̂_x component value; time (s); K̂_x[1] · α; K̂_x[2] · q; K̂_x[3] · δ_e; K̂_x[4] · δ̇_e | Outcome | PE-rich (square wave) | PE-poor (constant) | | --- | --- | --- | | Final tracking error ‖e‖ | 4.76e-2 | 4.75e-2 | | Final gain error ‖K̃_x‖ | 0.2984 | 0.2850 | | Verdict | parameters identified | tracking works, parameters wrong | **The tracking error went to zero anyway.** Lyapunov guarantees V̇ ≤ 0, so the state-error part eᵀPe still decays — that's robust to PE. What PE gives is the *second* property: convergence of K̂ to the matching gain. Without PE, the parameter manifold flow stops at some stabilizing configuration whose specific gain values depend on the trajectory's history — non-uniqueness of the resting point. **Davis reading.** The composite Lyapunov function V(e, K̃) = eᵀPe + K̃ᵀΓ⁻¹K̃ has level sets that look like ellipsoids in (e, K̃) space. Lyapunov flow drives V downhill. With a PE-rich trajectory, the gradient of V points strictly toward K̃ = 0 from *every* direction in the regressor, forcing convergence to the unique minimum. With a PE-poor trajectory, the gradient has a null space along the non-excited directions of Θ, and the flow stops on a flat ridge of V where e = 0 but K̃ ≠ 0. **PE is the non-degeneracy of the metric Γ⁻¹ along the trajectory.** ## Four paths to the same K Step back. The same `K_lqr` gain vector has now been derived four entirely different ways across the curriculum. **None of these four methods know about the others.** Each is internally self-contained — classical CARE iteration, symplectic eigenproblem, reference-model algebra, online gradient flow. They converge on the same numerical answer because the gain is a structural property of the (A, B, Q, R) problem, not an algorithmic artifact. Curriculum-scale Sudoku Principle — four orthogonal derivations of `K_lqr` | Path | Section | Method | Knowledge of A required? | What it solves | | --- | --- | --- | --- | --- | | 1 | §3 | Newton–Kleinman | yes (full) | CARE iteratively | | 2 | §3 | Lagrangian subspace via matrix sign | yes (full) | symplectic Hamiltonian eigenproblem | | 3 | §6 | Matching condition algebra | yes (full) | `A − BK_x* = A_m` | | 4 | §7 | MRAC gradient flow under PE | **no** | composite Lyapunov design | **Path 4 is the only one that doesn't know A.** §§3 and 6 are algebraic derivations on a known plant. §7 is an algorithm operating on a stream of measurements. The fact that all four converge on the same K is the Sudoku Principle operating at curriculum scale: four orthogonal mathematical setups, one structural answer. Convergence under independent derivations is what makes the answer architectural rather than algorithmic. **Davis reading.** The §3 LQR cost-to-go matrix P is what makes all four paths possible. Path 1 builds P by iteration. Path 2 builds P by eigendecomposition. Path 3 uses P implicitly through the matching equation (since A_m = A − BK_lqr and K_lqr was the §3 CARE solution). Path 4 uses P as the kernel of the adaptive law. *The same P is everywhere.* The curriculum's central structural observation is that this one matrix carries the geometry of the control problem across optimization, stability, matching, and adaptation. ## Aerospace dictionary: adaptive control vocabulary | Classical symbol | Aerospace meaning | Davis-Geometric reading | | --- | --- | --- | | K̂_x(t), K̂_r(t) | online estimates of the ideal feedback and feedforward gains; updated continuously | moving point on the parameter manifold Θ; coordinates in the chart defined by the matching condition | | Γ_x, Γ_r | adaptation gain matrices — control how fast the parameter estimates update | Riemannian metric on Θ (inverse: Γ⁻¹ is the actual metric); sets the geometry of gradient descent | | φ(x) (regressor) | vector of measured signals that multiply the unknown parameters; here φ = [x; r] | local frame on Θ at the current trajectory point; PE = this frame spans Θ over time | | B^(T)P e | direction-projected error — the part of the tracking error the input can correct | gradient of eᵀPe with respect to the input direction; the "force" driving the adaptation | | Persistency of excitation | ∫φφᵀ dτ ≥ αI: the regressor visits all directions in input space over every window | non-degeneracy of the metric Γ⁻¹ along the trajectory — the flow has a unique resting point | | Composite Lyapunov V | energy combining tracking error and parameter error; guarantees stability of the joint system | scalar potential on the product manifold ℝⁿ × Θ; the adaptive law is its gradient flow | | High-gain transient burst | large peak in control or state during fast adaptation; the cost of high learning rate | geodesic acceleration on Θ — the flow takes large steps near regions of high curvature of V | ## Bug-injection: the learning rate Γ Sweep the learning rate. Same reference, same initial conditions, same plant. Three values of Γ: - **Γ = 2** (slow) — gradient flow takes small steps; convergence is gentle but takes the full 12s window - **Γ = 12** (nominal) — convergence within ~3s with mild overshoot - **Γ = 80** (high-gain) — fast convergence but with the classical "transient burst" in the control signal E7.3 — Γ sweep on the q-channel gain K̂_x[2] [Figure: See the surrounding explanation and linked visual page.] Figure labels: K̂_x[2] (q-channel gain) convergence at three learning rates Γ; target: 0.23; 0.00; 0.07; 0.14; 0.21; 0.0s; 3.0s; 6.0s; 9.0s; 12.0s; K̂_x[2] (q-channel gain); time (s); Γ = 2; Γ = 12; Γ = 80 | Γ | Time to ‖K̃_x‖ < 0.5 | Peak \|u\| during adaptation | Reading | | --- | --- | --- | --- | | 2 | slow (> 8s) | 0.000 | smooth gradient flow; small step size on Θ | | 12 | ~3s | 0.004 | well-balanced — speed without burst | | 80 | ~1s | 0.041 | fast — but high-gain transient burst in u | **The Γ tradeoff is a geometry tradeoff.** Large Γ shrinks the metric on Θ — distances on the parameter manifold look short, so the flow takes large coordinate steps. Those large steps produce big control signals during the transient, because the controller is changing its mind quickly. The burst dies out as K̃ → 0, but during the transient the actual plant input `u = K̂_xᵀ x + K̂_r r` can spike to several times its nominal value. **This is the price of fast learning: the manifold Θ is curved, and shortening distances on it means longer steps in the embedding control space.** §8 will name this curvature explicitly and conjecture an irreducible budget on it. **What §7 sets up.** §6 specified the destination (the matching condition: K_x*, K_r*). §7 built the journey (gradient flow on Θ with metric Γ⁻¹). The flow converges to the destination under PE — and stops at *some* stabilizing point without PE. §8 asks: *what happens when the bike changes during the journey?* Disturbances, unmodeled dynamics, parameter drift — pure adaptation fails (Rohrs 1985). The fixes — σ-modification, projection, dead-zone — all curve the parameter manifold to keep θ̂ bounded. The Curvature Floor for Adaptive Control conjecture says the cost of robustness is irreducible curvature on Θ. ### Davis annotation - **One P, three roles.** The Riccati matrix P from §3 is (a) the LQR cost-to-go, (b) §6's Lyapunov function for the closed loop, and (c) §7's kernel of the adaptive law `BᵀPe`. The §3 algebraic identity propagates through every section since. Sudoku Principle kind 4 in force: same matrix, three formulations. - **Γ⁻¹ is a Riemannian metric on Θ.** Choosing Γ is choosing a metric — not a tunable hyperparameter, a geometric structure. Small Γ means a "stiff" manifold where steps are short; large Γ means a "loose" manifold where steps are long. The classical high-gain instability is the flow overshooting on a loose manifold whose cost surface has high curvature. - **PE = non-degeneracy of the trajectory metric.** The regressor φ(x(t)) determines a time-varying inner product on Θ. PE asks that this inner product be uniformly non-degenerate over every window. Without PE, the flow has a null direction and parameter convergence fails — even though state convergence still works. *Tracking and identification are different geometric properties.* - **Matching as Bra Strap, adaptive law as parallel transport.** §6 framed the matching condition as Bra Strap propagation: one clasp check (the reference model choice) determines the global fibers (K_x*, K_r*). §7's adaptive law is then the parallel transport *along the actual trajectory* from the algorithm's initial guess K̂(0) toward the matching fiber. Γ⁻¹ is the connection along that transport. - **GTT instance.** Marcella's Geometric Token Transport (paper in preparation) is exactly this idea in the token-embedding setting: learn the right transport metric during inference. fal-core's §7 is the F-16 instance — learn the right controller during operation. The math is symmetric; the manifolds differ. *What lets a rider learn an arbitrary bike also lets a bike learn an arbitrary rider.* - **Sudoku Principle continues to accumulate.** By §7 we have four kinds of Sudoku move and a multiply-cited P. The framework's claim — that classical control and modern adaptive control are reading the same geometry — is now demonstrated across seven sections. §8 will close the arc by introducing modifications that curve Θ and stating the Curvature Floor for Adaptive Control conjecture. Gigi · what I learned If a friend asked me what §7 is about, here's what I'd say. §7 is "learning a brand-new bike on the fly." The adaptive controller starts with zero knowledge of the gains and figures them out by watching itself fail. Every time the plant doesn't behave like the reference model, the algorithm nudges the gains in the direction that would have reduced the mismatch. That nudge is proportional to the regressor times `BᵀPe`, where P is the same matrix that already showed up in §3 and §6. One P, three roles. The most surprising lesson is the persistency-of-excitation panel. I used to think "the controller works" meant "the parameters are right." It doesn't. With a constant reference, the tracking error goes to zero anyway — but the parameter estimates drift to some *other* stabilizing combination that happens to work for that specific trajectory. If the conditions change later, those gains may not be correct anymore. **You need to keep the trajectory rich enough to identify the parameters, not just track.** The Γ-sweep panel showed me what high-gain adaptation looks like. Small Γ → smooth slow learning. Big Γ → fast but with a transient burst in the control signal during the learning phase. The burst is the algorithm being too confident about its current gradient estimate and overshooting before settling. Geometrically: large Γ means a loose metric on the parameter manifold, and gradient descent on a loose metric takes large coordinate steps. That's where the burst comes from. The architectural moment of §7 is naming the parameter manifold Θ explicitly and giving it a metric. §§1–4 lived on flat state-space ℝⁿ. §5 introduced the Fisher manifold (first curved object). §6 named Θ. §7 puts a metric on it. §8 will make Θ itself curved by adding the modifications (σ-mod, projection, dead-zone) that bound parameter drift under disturbances. **The elevator pitch.** §7 is gradient flow on the parameter manifold of admissible controllers. The destination is the matching condition fiber (§6). The flow uses §3's P as the kernel and Γ⁻¹ as the metric. Under PE it converges to the destination. Without PE it converges to a stabilizing-but-not-matching point. The classical name is MRAC. The Davis-Geometric reading is gradient flow driven by a composite Lyapunov function on the product manifold ℝⁿ × Θ. ### Next §8 — what happens when a pothole hits mid-learn. §7's adaptive law works under disturbance-free conditions and a PE-rich reference. Inject a sustained disturbance (Rohrs 1985): the algorithm interprets the disturbance as a parameter error and keeps "learning," driving K̂ to infinity. The fixes — σ-modification, projection, dead-zone — all amount to adding curvature to Θ to keep θ̂ bounded. §8 names the resulting Curvature Floor for Adaptive Control as the central conjecture of the project: an irreducible tradeoff between adaptation rate (Γ), parameter-manifold curvature, and sensitivity-function frequency content. The Curvature Floor for LTI control was §2. The Curvature Floor for Adaptive Control is §8 — and the framework's central open problem.