Stanford Online
Parameter estimation accuracy fails to ensure closed-loop control success due to policy threshold effects, requiring adaptive schemes that guarantee tracking through coupled Lyapunov dynamics rather than exact plant models.
AI-assisted summary of Stanford AA203 Optimal and Learning-Based Control | Spring 2026 | Lecture 13: Intro to Learning — original source. Check the original for full context.
Source published:
Key ideas
- Stanford AA203 shifts to learning-based control for uncertain dynamics, categorizing methods by direct policy optimization versus indirect system identification, and by operational experience across zero-episode (offline SysID), one-episode (online adaptation), and multi-episode (reinforcement learning) regimes. (0:00)
- Least-squares system identification provides an unbiased linear model whose covariance vanishes only under persistent excitation; however, minimizing parameter estimation error does not inherently guarantee downstream closed-loop control success due to parameter threshold effects. (30:00)
- Unlike optimal control frameworks that minimize cost functionals, classical adaptive control focuses fundamentally on certifying the stability of the coupled tripartite interaction between the plant dynamics, the feedback controller, and the online parameter adaptation law. (40:00)
- For Model Reference Adaptive Control (MRAC) with an unknown mass, combining a certainty-equivalence control law with a gradient-like parameter update rule yields a negative semi-definite Lyapunov derivative, driving the filtered tracking error to zero along a stable sliding manifold. (65:00)
Detailed notes
## Background Published on YouTube by Stanford Online on August 13, 2026, this video features Lecture 13 of the Stanford AA203 course, 'Optimal and Learning-Based Control', instructed by Dr. Daniele Gammelli. According to the page description, the lecture provides an introduction to learning-based control, system identification, and adaptive control, referencing the companion textbook 'Principles of Robot Autonomy'.
## TL;DR Dr. Daniele Gammelli marks the transition into the second half of the course by shifting from optimal control with known physics to learning-based techniques that handle unknown or uncertain dynamics. The session establishes a taxonomy of learning regimes across zero, one, and multiple episodes, and demonstrates offline system identification through ordinary least squares regression along with conditions for persistent excitation. Transitioning to online one-episode adaptation, Dr. Gammelli presents Model Reference Adaptive Control (MRAC) for a mass system with unknown inertia. Finally, using Lyapunov's direct method and sliding-line phase-plane analysis, the lecture proves that the coupled plant, feedback controller, and gradient adaptation rule achieve global asymptotic tracking.
## Atmosphere & style The lecture delivers a rigorous yet engaging academic atmosphere, balancing formal blackboard-style mathematical derivations with practical engineering intuition. Dr. Gammelli maintains an accessible, conversational, and transparent delivery, frequently validating student confusion around the intricate algebra and candidly joking that discovering valid candidate Lyapunov functions is an art worthy of published papers. The pacing feels disciplined and methodical, building step-by-step from foundational regression formulas to the satisfying algebraic cancellation in the final stability proof.
## Bulletin - [00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=0s) Stanford AA203 shifts to learning-based control for uncertain dynamics, categorizing methods by direct policy optimization versus indirect system identification, and by operational experience across zero-episode (offline SysID), one-episode (online adaptation), and multi-episode (reinforcement learning) regimes. - [30:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1800s) Least-squares system identification provides an unbiased linear model whose covariance vanishes only under persistent excitation; however, minimizing parameter estimation error does not inherently guarantee downstream closed-loop control success due to parameter threshold effects. - [40:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2400s) Unlike optimal control frameworks that minimize cost functionals, classical adaptive control focuses fundamentally on certifying the stability of the coupled tripartite interaction between the plant dynamics, the feedback controller, and the online parameter adaptation law. - [01:05:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3900s) For Model Reference Adaptive Control (MRAC) with an unknown mass, combining a certainty-equivalence control law with a gradient-like parameter update rule yields a negative semi-definite Lyapunov derivative, driving the filtered tracking error to zero along a stable sliding manifold.
## Key takeaways - [00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=0s) Learning-based control relaxes the fundamental optimal control assumption of known, analytical equations of motion by operating over unknown, uncertain, or partially specified dynamical models. - [02:50](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=170s) Engineers handle dynamic uncertainty via three paradigms: basic feedback error compensation, conservative game-theoretic robust min-max control, or data-driven learning from observed trajectories. - [07:44](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=464s) Data-driven control algorithms split into direct methods, which optimize policies directly from data without an explicit model, and indirect methods, which learn an intermediate dynamics model to synthesize controllers. - [10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=600s) The operational modality of experience dictates algorithm choice: zero-episode settings rely on frozen offline datasets, one-episode settings require live online adaptation, and multiple-episode settings rely on repetitive environment resets. - [12:15](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=735s) Physical robotics strongly favors zero-episode offline learning over trial-and-error exploration because deploying uncalibrated initial policies on real hardware risks catastrophic crashes. - [20:10](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1210s) Discrete linear system identification maps directly to ordinary least-squares regression by concatenating states and inputs into feature vectors to predict subsequent states from trajectory rollouts. - [30:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1800s) Under zero-mean uncorrelated noise, the least-squares dynamics estimator is unbiased, but driving its covariance to zero requires persistent excitation through rich, non-trivial exploratory inputs. - [35:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2100s) Model accuracy in system identification can diverge from downstream control success when discontinuous control thresholds cause closer parameter estimates to yield worse closed-loop actions. - [40:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2400s) Adaptive control operates as an online, one-episode learning framework where theoretical guarantees prioritize verifying the stability of the coupled feedback loop over optimizing a performance metric. - [42:47](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2567s) Global asymptotic stability of autonomous and closed-loop systems is certified using Lyapunov's direct method by verifying positive definiteness, negative definite time derivatives, and radial unboundedness. - [50:18](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3018s) Model Reference Adaptive Control replaces traditional objective cost functions with an explicit dynamical reference model, defining tracking performance by the error between plant and model outputs. - [01:00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3600s) With known plant parameters, model-canceling feedback control forces tracking error dynamics into a linear differential equation with repeated negative roots, ensuring exponential convergence. - [01:05:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3900s) When plant parameters are unknown, defining a filtered tracking error metric s couples the plant error dynamics directly to a gradient-based parameter adaptation law. - [01:10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4200s) Constructing a composite Lyapunov function penalizing tracking error and parameter estimation error yields a negative semi-definite derivative, proving asymptotic convergence of the error metric. - [01:10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4200s) Driving the filtered tracking metric s to zero forces error trajectories onto a stable sliding line in the phase plane, guiding position and velocity tracking errors asymptotically to zero. - [01:18:25](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4705s) Synthesizing candidate Lyapunov functions and compatible adaptive control laws remains a system-dependent engineering art designed to ensure clean algebraic cancellations in stability proofs.
## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=0s) Course Roadmap: Bridging Optimal Control to Learning-Based Control
The lecture marks the transition into the second half of the course, shifting focus from classical optimal control to learning-based control. Up to this point, the curriculum explored the lower half of the course roadmap, analyzing methods that presuppose complete, high-fidelity knowledge of the underlying physical system dynamics—typically in the form of analytical differential equations. The journey began with open-loop methods, categorized into direct and indirect methods, designed to compute an optimal trajectory given a specific initial state. While open-loop trajectory optimization is computationally fast and reliable, its fundamental shortcoming is its local nature: solutions remain strictly tied to the initial conditions for which they were optimized.
To overcome this limitation, the course transitioned to closed-loop formulations via dynamic programming and the Hamilton-Jacobi-Bellman (HJB) and Hamilton-Jacobi-Isaacs (HJI) partial differential equations. Closed-loop methods yield full control policies—state feedback maps that determine the optimal control input regardless of where the system finds itself in state space. Although theoretically powerful and globally robust, closed-loop dynamic programming incurs a severe computational burden due to the curse of dimensionality. To achieve a practical compromise, model predictive control (MPC) was introduced as a unifying framework, "which is basically a framework which tries to get the best of these two approaches" by recursively solving open-loop optimal control problems over a receding horizon to emulate closed-loop state feedback.
```mermaid flowchart TD accTitle: Control Methods Roadmap accDescr: Progression from open-loop and closed-loop optimal control to receding horizon MPC and learning-based control. subgraph KnownDynamics["Known Dynamics (Optimal Control)"] OL["Open-Loop Trajectory Optimization<br/>(Direct & Indirect Methods)"] CL["Closed-Loop Control Policies<br/>(Dynamic Programming, HJB, HJI)"] MPC["Model Predictive Control (MPC)<br/>(Recursive Open-Loop for Closed-Loop Behavior)"] OL --> MPC CL --> MPC end subgraph UnknownDynamics["Unknown Dynamics (Learning-Based Control)"] LC["Learning-Based Control & Adaptation<br/>(Relaxing Analytical Dynamics Assumptions)"] end MPC --> LC ```
The second half of the course fundamentally relaxes the assumption that system dynamics are known a priori. Instead of relying entirely on known analytical equations of motion, the learning-based control paradigm assumes the dynamics are unknown, uncertain, or only partially specified. The focus of the current lecture occupies the top-left quadrant of the course roadmap, addressing classical learning approaches: system identification and adaptive control, specifically examining Model Reference Adaptive Control (MRAC) and Model Identification Adaptive Control (MIAC).
[02:50](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=170s) Handling System Uncertainty: Three Paradigms
In a standard closed-loop control architecture, a controller sends control inputs to a physical system, sensors measure the resulting output states, and these measurements are compared against an intended reference behavior to generate error signals that drive subsequent control actions. In real-world engineering, however, systems inevitably suffer from unmodeled dynamics, external disturbances, and environmental parameter shifts. To address these discrepancies, three macro-level engineering strategies exist:
```mermaid flowchart TD accTitle: Three Paradigms for Handling Uncertainty accDescr: Overview of feedback compensation, robust min-max control, and data-driven learning. U["Uncertainty / Unmodeled Effects"] --> P1["1. Standard Feedback Control<br/>(Compensate via Error Tracking, e.g., PID)"] U --> P2["2. Robust Adversarial Control<br/>(Min-Max Optimization over Worst-Case Disturbance)"] U --> P3["3. Data-Driven Learning<br/>(Collect State Transitions to Learn Models/Policies)"] ```
1. **Simple Feedback Compensation:** When unmodeled dynamics exert only minor influences on system behavior—such as a multirotor drone encountering gentle, unmodeled wind gusts—sophisticated adaptation may be unnecessary. A well-tuned feedback controller (such as a PID loop tracking a reference flight trajectory) often provides sufficient corrective authority to counteract the disturbance directly. 2. **Robust and Adversarial Control:** When uncertainties are larger or safety-critical, one can formulate the control task as a game-theoretic min-max optimization problem. Here, the controller seeks to maximize a performance reward or minimize cost with respect to the control input $u$, while an adversary draws disturbances from an uncertainty set $\Gamma$ representing the worst-case scenario. While effective—evoking classic differential games like Rufus Isaacs' "homicidal chauffeur" problem discussed earlier in the semester—this paradigm tends to yield behaviors that are excessively conservative, defensive, and sub-optimal under nominal operating conditions. 3. **Data-Driven and Learning-Based Control:** Instead of preparing for an extreme worst-case adversary, this approach leverages empirical operational data. By logging previous trajectories, state transitions, and flight data from past missions, an agent learns an approximate model of the real dynamics or refines its control laws directly from observed data.
[07:44](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=464s) What to Learn: Direct vs. Indirect Learning Frameworks
When committing to data-driven methods, the primary design choice concerns the target of the learning process. The vast spectrum of learning-based control algorithms splits broadly into two foundational categories:
```mermaid flowchart LR accTitle: Direct vs Indirect Learning accDescr: Contrast between direct policy improvement from data and indirect model learning followed by controller synthesis. subgraph DirectApproach["Direct Control Improvement"] D1["Empirical Data / Transitions"] --> D2["Direct Policy Optimization"] D2 --> D3["Improved Controller"] end subgraph IndirectApproach["Indirect Model-Based Improvement"] I1["Empirical Data / Transitions"] --> I2["System Identification / Model Learning"] I2 --> I3["Approximate Dynamics Model"] I3 --> I4["Synthesize Controller"] end ```
- **Direct Methods:** Empirical observations, state transitions, and rollouts are fed directly into the policy optimization objective to improve control actions without ever constructing an explicit intermediate model of the plant dynamics. This paradigm encompasses direct adaptive control (such as Model Reference Adaptive Control), imitation learning, and model-free reinforcement learning. - **Indirect Methods:** Empirical measurements are first used to solve an intermediate system identification problem, fitting an approximate mathematical model of the system's dynamics. This surrogate model is then provided to an optimal control framework (such as MPC or LQR) to synthesize or update the controller. This family includes indirect adaptive control (such as Model Identification Adaptive Control) and model-based reinforcement learning.
[09:12](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=552s) Learning Regimes: The Zero-Episodes Setting
Beyond what is learned, algorithms differ fundamentally in *how* learning data is gathered and utilized during the system's operational lifecycle. The lecture introduces three prototypical learning regimes, beginning with the **zero-episodes case** (commonly referred to as classical offline system identification).
In the zero-episodes setting, no real-time policy updates or online learning occur while the system executes its live task. Instead, the engineer relies entirely on an offline, pre-collected dataset of state transitions or rollouts gathered under a prior logging policy or through dedicated exploratory experiments. This historical offline dataset is used to identify the underlying dynamics model or to tune a controller before deployment, ensuring that the control policy remains fixed once operational execution begins.
- The zero-episodes regime treats model training as a purely offline prerequisite, eliminating the stability risks associated with updating controllers in real time during execution. - The pre-collected offline dataset forms the basis for either directly optimizing control parameters or fitting state-space matrices and nonlinear dynamics functions via regression.
[10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=600s) Modalities of Experience: Zero, One, and Multiple Episodes
Dr. Daniele Gammelli distinguishes three primary operational settings or "modalities of experience" when integrating learning into control systems: zero-episode, one-episode, and multiple-episode learning. In the zero-episode paradigm, an agent relies on an offline dataset collected beforehand. This fixed collection of past data is used offline to estimate unknown parameters or train predictive dynamical models, which are then frozen and deployed to optimize controller performance.
The one-episode setting represents online adaptation. In this regime, learning and adaptation must occur on the fly while actively controlling the system in real time, with no luxury of prior flight datasets to lean on. To illustrate, Gammelli revisits the quadrotor example: suppose a drone must carry a payload of unknown mass $m$. Under an online adaptation framework, the system cannot estimate this mass from previous flights. Instead, while actively stabilizing and steering the drone in the air, the controller must concurrently estimate the unknown mass $m$ and adapt its control commands before the vehicle destabilizes.
The third category is the multiple-episode framework, which forms the classical foundation of reinforcement learning (RL). Here, an agent interacts with an environment that can be reset indefinitely. Gammelli points to chess as an intuitive analogy: the chess board represents an environment where an agent attempts to learn an optimal policy. The game spawns at an initial state, the agent plays through a full sequence of moves until an episode concludes, the board resets, and the agent uses performance feedback accumulated across successive games to iteratively refine its policy parameters.
While these categories provide a clear taxonomy, Gammelli cautions that the boundaries are not completely rigid: offline reinforcement learning, for instance, technically optimizes RL objectives yet operates entirely within the zero-episode offline dataset regime. The choice of algorithm ultimately hinges on what experience is accessible: an offline dataset collected in advance, real-time closed-loop operation requiring instant adaptation, or an interactive simulator/environment that can be reset repeatedly.
```mermaid flowchart TD accTitle: Modalities of Experience in Learning-Based Control accDescr: Diagram illustrating zero episode, one episode, and multiple episode modalities with examples.
subgraph ZeroEp["Zero Episode (Offline)"] D0["Static Offline Dataset"] --> M0["Train Model / Estimate Params"] M0 --> C0["Deploy Frozen Controller"] end
subgraph OneEp["One Episode (Online Adaptation)"] D1["Real-Time Execution"] -->|"Concurrent Estimation"| M1["Adapt Params (e.g., Unknown Mass m)"] M1 -->|"Immediate Feedback"| D1 end
subgraph MultiEp["Multiple Episodes (Reinforcement Learning)"] E2["Episode Interaction"] -->|"Termination & Reset"| U2["Policy Update Across Games"] U2 --> E2 end ```
[12:15](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=735s) Student Q&A: Exploration, Policy-Driven Data, and Trajectory Chunking
A student asks for clarification on the boundary between one-episode and multiple-episode settings, asking whether the defining factor of multiple episodes is simply the ability to interact with the environment and learn from those interactions. Gammelli clarifies that online one-episode controllers also interact directly with their environment; the critical distinction lies in the *episodic nature* and resets across repeated trials. Returning to the chess analogy, multi-episode learning is akin to playing thousands of separate games to master strategy over time, whereas one-episode learning is equivalent to being thrown into a single ongoing game and trying to learn how to play chess while actively making moves to avoid losing.
Another student observes that multiple episodes allow an agent to reach states that a single run might never explore, and asks how this applies to vehicle trajectory data: if an engineer deploys an instrumented vehicle, records a long time history, and slices that single recording into multiple shorter time horizons, does that count as multiple episodes?
Gammelli explains that slicing up a pre-recorded piloted trajectory actually belongs to the zero-episode (offline) regime:
> "I would probably classify this in the zero episode case, meaning that you have a dataset of trajectories and you're basically chunking this up in order to build a kind of next-state prediction or a forward dynamics problem... because you're not really being necessarily an agent in collecting that data."
In true multiple-episode reinforcement learning, the system's own evolving policy dictates the data collection and exploration path. In physical robotics, this highlights why zero-episode offline learning is so heavily favored over tabular or trial-and-error RL: you cannot deploy a randomly initialized neural network from scratch to drive an autonomous vehicle on open roads because "this will crash for sure." In a simulated game of chess, terrible initial policies carry zero real-world risk, allowing arbitrary exploration that physical hardware cannot tolerate.
[15:45](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=945s) System Identification via Least-Squares Linear Regression
With the taxonomy established, Gammelli transitions to classical approaches in learning-based control, beginning with system identification (SysID). SysID relies on the insight that many real-world control problems do not require online learning during deployment. Instead, engineers can run prior system tests, assemble an offline dataset of historical inputs and responses, fit a data-driven dynamics model, and insert that estimated model directly into standard model-based control synthesis (such as LQR or MPC) as a proxy for the unknown physics.
To formalize the mathematical foundation, Gammelli reviews standard linear regression via least-squares minimization. Consider a data-generating process where an output $y$ relates linearly to an input feature vector $z$ with unknown parameter vector $\theta$ and additive noise $\epsilon$:
$$y = \theta^T z + \epsilon$$
The learning objective is to estimate $\theta$ using an offline dataset $\mathcal{D}$ consisting of $N$ input-output observation pairs:
$$\mathcal{D} = \left\{(z_i, y_i)\right\}_{i=1}^N$$
Stacking the individual observations into target vector $Y \in \mathbb{R}^N$ and data matrix $Z \in \mathbb{R}^{N \times d}$, the least-squares performance criterion penalizes the squared Euclidean norm of prediction errors:
$$\min_{\theta} \|Y - Z\theta\|_2^2$$
Expanding this objective reveals a convex quadratic function in terms of $\theta$:
$$\|Y - Z\theta\|_2^2 = (Y - Z\theta)^T (Y - Z\theta) = Y^T Y - 2 \theta^T Z^T Y + \theta^T Z^T Z \theta$$
Because the objective is unconstrained and strictly convex (assuming $Z^T Z$ is invertible), the necessary and sufficient condition for optimality is that the gradient with respect to $\theta$ must vanish:
$$\nabla_{\theta} \left( Y^T Y - 2 \theta^T Z^T Y + \theta^T Z^T Z \theta \right) = -2 Z^T Y + 2 Z^T Z \theta = 0$$
Setting this gradient to zero yields the standard normal equations:
$$Z^T Z \theta = Z^T Y$$
Solving for $\theta$ gives the closed-form least-squares estimator:
$$\theta^* = (Z^T Z)^{-1} Z^T Y$$
- **Input vector $z_i$**: The regressor or feature vector for data point $i$. - **Output scalar/vector $y_i$**: The ground-truth measured response. - **Data matrix $Z$**: The matrix composed of row-stacked input vectors. - **Target vector $Y$**: The stacked vector of measured outputs. - **Parameter vector $\theta^*$**: The analytical minimum of the least-squares loss.
[20:10](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1210s) Mapping Linear Regression to System Dynamics Identification
Gammelli takes the mathematical machinery of least squares and directly maps it onto the problem of learning unknown physical dynamics. Consider an unknown discrete-time linear dynamical system perturbed by noise:
$$x_{t+1} = A x_t + B u_t + w_t$$
Here, $x_t$ denotes the state at time $t$, $u_t$ represents the control input, and $w_t$ represents process noise or unmodeled disturbances. This relationship can be expressed compactly in linear regression form by concatenating the state and control into a single input vector, and grouping the unknown system matrices into a parameter block:
$$x_{t+1} = \begin{bmatrix} A & B \end{bmatrix} \begin{bmatrix} x_t \\ u_t \end{bmatrix} + w_t$$
Gammelli directly maps each dynamical variable to the regression notation: - The measured output $y$ corresponds to the next state transition $x_{t+1}$. - The regression input $z$ corresponds to the combined state-action pair $\begin{bmatrix} x_t \\ u_t \end{bmatrix}$. - The parameter vector/matrix $\theta$ corresponds to the stacked dynamics matrices $\begin{bmatrix} A & B \end{bmatrix}^T$.
In practice, acquiring this regression data requires running the system (or a human operator piloting it) through a series of rollouts or trajectories over time. Each trajectory is an ordered time history of visited states and applied control commands:
$$\tau = (x_0, u_0, x_1, u_1, \dots, x_T)$$
From these historical trajectories, the dataset $\mathcal{D}$ is constructed by extracting consecutive one-step transition tuples:
$$\mathcal{D} = \left\{ \left( (x_t, u_t), \, x_{t+1} \right) \right\}$$
Each observed pair of current state $x_t$ and applied control $u_t$ serves as the input $z_i$, and the resulting subsequent state $x_{t+1}$ serves as the target label $y_i$. By populating matrices $Z$ and $Y$ with these transition pairs across all available trajectories, the optimal system matrices $\begin{bmatrix} \hat{A} & \hat{B} \end{bmatrix}$ are identified directly via linear regression.
[25:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1500s) Ordinary Least Squares and the Estimator as a Random Variable
Dr. Daniele Gammelli recaps how system dynamics can be approximated directly from data. The process relies on collecting trajectories of the system's evolution and repurposing those observations into a regression problem that maps the current state and control action to the next state. Addressing the practical implementation of the ordinary least squares (OLS) solution, he highlights that the formula involves computing $(Z^\top Z)^{-1}$. When data matrices grow massive, inverting this matrix directly becomes computationally prohibitive. To handle continuous incoming streams of data without performing costly matrix inversions at every time step, one can turn to recursive formulations (such as recursive least squares), which have equivalents in both discrete and continuous time.
```mermaid flowchart LR accTitle: System Identification via Least Squares accDescr: Pipeline showing data collection mapping to regression, OLS parameter estimation, and evaluation via statistical properties. subgraph DataCollection["Data Collection"] D["Trajectories: (x_t, u_t) → x_{t+1}"] Z["Feature Matrix Z"] D --> Z end subgraph Estimation["Parameter Estimation"] OLS["OLS Solution: (Z^T Z)^{-1} Z^T Y"] RLS["Recursive Formulations\n(avoid large inversions)"] Z --> OLS OLS -.-> RLS end subgraph StatisticalAnalysis["Statistical Analysis"] BLUE["BLUE / MLE Properties"] RV["Random Variable: Mean & Covariance"] OLS --> BLUE OLS --> RV end ```
He then reviews classical theoretical guarantees for the least-squares estimator: - Under standard noise assumptions where the noise terms $\epsilon_t$ are zero-mean, uncorrelated, and exhibit identical, finite variance, the estimator is the **Best Linear Unbiased Estimator (BLUE)**. - If the disturbance distribution is specifically Gaussian, the derived least-squares estimator matches the **Maximum Likelihood Estimator (MLE)**.
Moving deeper into the convergence properties, Dr. Gammelli poses the central question: under what sufficient conditions does the parameter estimate $\hat{\theta}$ converge to the true parameter vector $\theta^*$ as the volume of collected data increases? Visualizing data quantity on the x-axis and the estimate $\hat{\theta}$ on the y-axis, the goal is to determine whether the estimate centers on $\theta^*$ and how its spread shrinks. Because the measurement vector depends on additive noise ($Y = Z \theta + \epsilon$), substituting this expression back into the estimator yields:
$$\hat{\theta} = \theta + (Z^\top Z)^{-1} Z^\top \epsilon$$
Because the noise vector $\epsilon$ is stochastic, the parameter estimate $\hat{\theta}$ is itself a random variable. Consequently, evaluating its convergence requires analyzing its statistical moments—specifically its mean and covariance.
---
[30:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=1800s) Convergence Analysis: Expectation, Covariance, and Persistent Excitation
Dr. Gammelli inspects the expected value of $\hat{\theta}$. Applying the expectation operator $\mathbb{E}[\hat{\theta}] = \mathbb{E}[\theta + (Z^\top Z)^{-1} Z^\top \epsilon]$, the deterministic matrices pull outside the expectation. Since the disturbance sequence satisfies the zero-mean assumption ($\mathbb{E}[\epsilon] = 0$), the right-hand error term drops out entirely, leaving:
$$\mathbb{E}[\hat{\theta}] = \theta$$
This confirms that the estimator is strictly unbiased: in expectation, collecting more data centers the estimate precisely on the ground-truth parameter values.
Next, he analyzes the covariance to determine whether estimation uncertainty contracts around the true parameters. Applying the covariance identity $\operatorname{Cov}(Ax) = A \operatorname{Cov}(x) A^\top$, with $A = (Z^\top Z)^{-1} Z^\top$ and $x = \epsilon$, the covariance matrix of $\epsilon$ is simplified. Because the disturbances are assumed to be uncorrelated with equal variance $\sigma^2$, $\operatorname{Cov}(\epsilon)$ reduces to a diagonal matrix $\sigma^2 I$. Pushing the algebra through yields:
$$\operatorname{Cov}(\hat{\theta}) = \sigma^2 \left( \sum_{t=1}^n z_t z_t^\top \right)^{-1}$$
where $z_t$ contains the combinations of observed states and control inputs. For the covariance to diminish toward zero as $n \to \infty$, the summation term inside the inverse must grow unboundedly toward infinity. This condition hinges on operating the system in a non-trivial manner rather than remaining stationary at the origin. Dr. Gammelli formalizes this concept as **persistent excitation**: the inputs must continuously probe the system in rich, informative directions so that the inverted sum vanishes and $\hat{\theta}$ converges with zero variance to $\theta^*$.
---
[35:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2100s) Practical Challenges: Model Accuracy vs. Control Performance
An audience member asks about the distribution support and invertibility regularity conditions. Dr. Gammelli acknowledges that rigorous mathematical treatments include explicit regularity conditions guaranteeing invertibility, but emphasizes that the primary purpose here is establishing the control intuition: under linear assumptions and persistent excitation, system identification yields unbiased estimates that converge with zero asymptotic covariance.
He then steps back to address the core dilemmas of system identification in practical control: - **Data Budget & Sample Complexity**: How many data points are realistically needed to learn a viable dynamics model, and how should parameter estimation quality be quantified? - **Mismatch Between Identification and Control**: In classical statistics, parameter estimation accuracy (e.g., small parameter distance $\|\hat{\theta} - \theta^*\|$) is the sole metric. In robotics and control, however, practitioners only care about controller closed-loop performance: "We do not really care too much about model accuracy. What we care about is that we get a better controller out of this process." - **Threshold Effects**: Dr. Gammelli sketches a scenario where a control law switches discontinuously based on the sign of a parameter $\theta$ (e.g., one control action if $\theta < 0$, a different one if $\theta > 0$). If the ground-truth parameter is slightly positive, an estimate $\hat{\theta}_1$ might be numerically closer to $\theta^*$ but land on the negative side of zero, triggering the wrong control action. Meanwhile, a second estimate $\hat{\theta}_2$ could be further away in Euclidean distance yet share the correct positive sign, yielding vastly superior closed-loop performance. This reveals a fundamental limitation of standard system identification: fitting model parameters acts as an intermediate surrogate objective that is not strictly aligned with downstream control success. - **Active Data Collection & Safety**: Real-world data is collected online while the robot is running. Operating with an incomplete or uncertain model introduces severe risks, necessitating cautious, conservative exploration. - **Model Expressivity vs. Capacity**: The derivations assume the real system matches the linear parameterization. If the underlying dynamics contain nonlinearities outside this hypothesis class, one faces a structural trade-off between model expressivity, sample efficiency, and model misspecification.
[40:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2400s) The Adaptive Control Paradigm: Online Adaptation and Coupled Stability
Dr. Gammelli bridges the transition from system identification to adaptive control by contrasting their learning regimes. While system identification primarily operates in an offline, "zero episodes" setting—where a fixed dataset is collected to estimate dynamics models before synthesizing a controller—adaptive control is inherently a "one episode" problem. In adaptive control, the agent must refine its behavior online in real time while actively operating the physical system. This online learning paradigm bifurcates into two standard methodologies: directly tuning the controller's internal parameters on the fly, or continuously updating an estimated dynamics model and leveraging that updated model to adjust the control policy. This distinction underpins the division between Model Reference Adaptive Control (MRAC), which directly adjusts the controller, and Model Identification Adaptive Control (MIAC), which identifies a model to improve control performance.
```mermaid flowchart TD accTitle: Adaptive Control Taxonomy accDescr: Flowchart contrasting Model Reference Adaptive Control and Model Identification Adaptive Control in an online setting. subgraph OnlineAdaptation["Online One-Episode Adaptive Control"] direction TB A["Online Operating Data"] --> B{"Control Adaptation Strategy"} B -->|"Direct Parameter Update"| C["Model Reference Adaptive Control (MRAC)"] B -->|"Indirect via Dynamics Estimation"| D["Model Identification Adaptive Control (MIAC)"] C --> E["Directly Adjusted Controller"] D --> F["Updated System Model"] --> E end ```
The instructor stresses that classical adaptive control literature, dating back decades, differs fundamentally from modern optimal control. Rather than optimizing an objective cost function or performance metric, traditional adaptive control revolves strictly around certifying the stability of the coupled closed-loop system. When deploying adaptive techniques, three components are inherently linked in a feedback loop: the physical system dynamics, the parameterized feedback controller, and the adaptation law driving parameter updates. Consequently, the primary theoretical mission is not minimizing a cost functional, but designing the controller and adaptation dynamics such that the entire coupled system remains provably stable.
- **Offline vs. Online Learning:** System identification uses pre-collected data (zero episodes) to build a static model, whereas adaptive control adapts within a single continuous operational run (one episode). - **Direct vs. Indirect Approaches:** MRAC tunes controller gains directly; MIAC estimates plant dynamics parameters first and subsequently recalculates control inputs. - **Stability-Centric Objective:** Instead of solving an optimization problem for a cost metric, classical adaptive control focuses on verifying stability guarantees for the coupled triadic interaction: plant dynamics + feedback controller + adaptation rule.
---
[42:47](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2567s) Tool of Choice: Global Asymptotic Stability via Lyapunov's Direct Method
To establish rigorous stability proofs for these coupled systems, the course relies on Lyapunov stability theory. Dr. Gammelli recalls the formulation for an autonomous system $\dot{x} = f(x)$, noting that controlled systems driven by a feedback policy $u = \pi(x)$ fit directly into this framework because the control input can be subsumed into the closed-loop autonomous dynamics $\dot{x} = f(x, \pi(x))$. Assuming an equilibrium point $x^*$ satisfies $f(x^*) = 0$, Lyapunov's direct method provides an analytical shortcut to certify stability without needing to integrate nonlinear differential equations or evaluate trajectories across every possible initial state.
Building on the local stability concepts introduced in previous lectures, Dr. Gammelli details the three rigorous conditions required for a scalar candidate function $V(x)$ to establish *global* asymptotic stability:
1. **Positive Definiteness:** $V(x) > 0$ for all $x \neq x^*$, and $V(x^*) = 0$. 2. **Negative Definiteness of the Derivative:** Along system trajectories, $\dot{V}(x) < 0$ for all $x \neq x^*$. 3. **Radial Unboundedness:** As the state norm grows arbitrarily large, the Lyapunov function must diverge: $$\lim_{\|x\| \to \infty} V(x) = \infty$$
Dr. Gammelli paints a visual picture of this mathematical construct as an open, "ball-shaped" bowl centered at the origin in the state space $(x_1, x_2)$. As the system trajectories unfold, the value of $V(x)$ monotonically dissipates down the contours of the bowl, driving the state inexorably to the minimum at the equilibrium point. Radial unboundedness ensures that the bowl's walls extend to infinity in every direction, preventing trajectories from escaping to infinity along paths where the energy function might otherwise remain bounded.
---
[46:42](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2802s) Tutorial Example: Lyapunov Stability of a Mass-Spring-Damper
Before applying Lyapunov theory to adaptive control architectures, Dr. Gammelli steps through a foundational physics example to demonstrate the mechanics of the proof: an unforced, passive mass-spring-damper system. The system comprises a mass $m$, a spring with stiffness $k$, and a viscous damper with damping coefficient $d$. The state vector consists of position and velocity, $(x, \dot{x})$, with the desired equilibrium located at the origin $(0, 0)$—zero position and zero velocity.
The candidate Lyapunov function is chosen as the total mechanical energy of the physical system, combining elastic potential energy and kinetic energy:
$$E(x, \dot{x}) = \frac{1}{2} k x^2 + \frac{1}{2} m \dot{x}^2$$
By inspection, conditions 1 and 3 are readily satisfied: the quadratic sum is strictly positive everywhere away from the origin, vanishes at $(0,0)$, and grows without bound as the position or velocity approaches infinity. The core analytical task is therefore evaluating the second condition by differentiating the energy candidate with respect to time along the system trajectories:
$$\dot{E}(x, \dot{x}) = k x \dot{x} + m \dot{x} \ddot{x}$$
From Newton's second law, the equation of motion for the system is $m \ddot{x} = -d \dot{x} - k x$. Substituting this relationship into the acceleration term yields:
$$\dot{E}(x, \dot{x}) = k x \dot{x} + \dot{x}(-d \dot{x} - k x) = k x \dot{x} - d \dot{x}^2 - k x \dot{x} = -d \dot{x}^2$$
The conservative spring terms $k x \dot{x}$ cancel out completely, isolating the dissipative effect of the damper: $\dot{E} = -d \dot{x}^2 \le 0$. This confirms that energy dissipates whenever velocity is nonzero, validating the power of Lyapunov analysis to certify system stability directly from the governing physics without explicitly solving the differential equation.
---
[50:18](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3018s) Model Reference Adaptive Control (MRAC) Framework and Setup
Returning to the main focus of the lecture, Dr. Gammelli formalizes the architecture of Model Reference Adaptive Control (MRAC). The MRAC formulation relies on four foundational components:
1. **The Plant:** The underlying physical system to be controlled, containing unknown or uncertain parameters. 2. **The Reference Model:** An idealized dynamical system that outputs the desired reference response $x_m$. Dr. Gammelli emphasizes that the reference model serves as an implicit surrogate for performance: instead of defining a classical cost function to minimize, performance is quantified directly by the tracking error between the actual plant output and this reference trajectory. 3. **The Feedback Controller:** A parameterized control policy designed with tunable, adjustable gains. 4. **The Adaptation Mechanism:** The differential or difference equation that specifies exactly how the controller's adjustable gains evolve over time in response to observed tracking errors.
To make the theoretical analysis concrete, Dr. Gammelli outlines the pedagogical strategy: the class will first study the nominal tracking problem where the plant's physical parameters are assumed to be completely known, deriving a baseline tracking controller. Once this baseline is established, they will strip away the assumption of known parameters, introduce real-time adaptation laws, and re-apply Lyapunov techniques to prove stability for the fully coupled, parameter-adaptive closed-loop system.
The setup begins with a canonical double integrator plant representing a point mass driven by an input force:
$$m \ddot{x} = u$$
To dictate how this mass ought to move, a fictitious reference model state $x_m$ is introduced, driven by an external positioning command to establish the target trajectory that the true state $x$ must track.
[55:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3300s) Reference Model and Nominal Tracking Controller
Dr. Daniele Gammelli introduces the reference model that describes the ideal, target response of the controlled mass. To specify this desired behavior, a fictitious state $x_m$ (where subscript $m$ denotes "model") is introduced, governed by a second-order linear differential equation:
$$\ddot{x}_m + k_d \dot{x}_m + k_p x_m = k_r r(t)$$
Here, $x_m$ is the ideal output, the parameters $k_d$, $k_p$, and $k_r$ are design gains chosen by the control engineer, and $r(t)$ is an externally provided reference positioning command.
Before tackling uncertainty, the ideal baseline case is considered: suppose the mass $m$ is known exactly. In this scenario, perfect tracking of the reference model can be achieved using a model-canceling control law:
$$u = m \left( \ddot{x}_m - 2\lambda \dot{\tilde{x}} - \lambda^2 \tilde{x} \right)$$
where $\tilde{x} = x - x_m$ is defined as the tracking error between the actual system position $x$ and the ideal reference position $x_m$, and $\lambda > 0$ is a strictly positive control gain chosen by the designer.
Gammelli steps back to reflect on the methodology of adaptive control design. Students often wonder where such reference models and control equations come from. In practical engineering, designing these components is an iterative craft: an engineer hypothesizes a reference model suitable for the hardware, tests a candidate control law, checks whether stability can be proven, and refines the design if the proof fails. In the lecture, however, these structures are given up front to demonstrate the rigorous stability analysis that validates them.
```mermaid flowchart LR accTitle: Nominal Reference-Model Tracking Pipeline accDescr: Reference command drives the reference model, and the tracking error between plant output and model output feeds into the nominal control law. subgraph Target["Reference Model"] R["Reference r(t)"] --> RM["Model: x_m, x_m_dot, x_m_ddot"] end subgraph Error["Error Formation"] RM --> DIFF["Tracking Error: x_tilde = x - x_m"] PLANT["Plant Mass m"] --> DIFF end subgraph Control["Nominal Feedback"] DIFF --> U["Control u = m(x_m_ddot - 2*lambda*x_tilde_dot - lambda^2*x_tilde)"] U --> PLANT end ```
[01:00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3600s) Closed-Loop Dynamics and Exponential Convergence Under Known Mass
To prove that the nominal controller guarantees exponential tracking, Dr. Gammelli derives the closed-loop error dynamics starting from the Newton's second law dynamics of the mass:
$$m \ddot{x} = u$$
Substituting the nominal control law into the plant dynamics yields:
$$m \ddot{x} = m \left( \ddot{x}_m - 2\lambda \dot{\tilde{x}} - \lambda^2 \tilde{x} \right)$$
Rearranging all terms onto one side gives:
$$m \left( \ddot{x} - \ddot{x}_m + 2\lambda \dot{\tilde{x}} + \lambda^2 \tilde{x} \right) = 0$$
Since $\ddot{x} - \ddot{x}_m = \ddot{\tilde{x}}$ and $m > 0$, the mass cancels out entirely, leaving a second-order linear ordinary differential equation for the tracking error:
$$\ddot{\tilde{x}} + 2\lambda \dot{\tilde{x}} + \lambda^2 \tilde{x} = 0$$
This ODE has a repeated negative root at $-\lambda$. Its general analytical solution is:
$$\tilde{x}(t) = (c_0 + c_1 t) e^{-\lambda t}$$
Because the designer chooses $\lambda > 0$, the exponential term decays faster than linear growth, meaning $\lim_{t \to \infty} \tilde{x}(t) = 0$. Since $\tilde{x} = x - x_m$, this guarantees that the actual trajectory asymptotically tracks the reference model perfectly over time.
Having established this nominal baseline, Gammelli shifts focus to the core topic of the lecture: the realistic setting where the physical mass $m$ is completely unknown, requiring an online estimate $\hat{m}(t)$. To keep the ensuing algebra clean, three auxiliary variables are introduced: - A filtered tracking error metric: $s = \dot{\tilde{x}} + \lambda \tilde{x}$ - A nominal acceleration command signal: $\nu = \ddot{x}_m - 2\lambda \dot{\tilde{x}} - \lambda^2 \tilde{x}$ - The parameter estimation error: $\tilde{m} = \hat{m} - m$, which implies $\hat{m} = \tilde{m} + m$
Evaluating the plant dynamics $m \ddot{x} = u$ using the certainty-equivalence controller $u = \hat{m}\nu$ yields:
$$m \ddot{x} = \hat{m}\nu = (m + \tilde{m})\nu = m\nu + \tilde{m}\nu$$
[01:05:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=3900s) Error Dynamics with Unknown Mass and the Parameter Adaptation Law
Rearranging the open equation $m \ddot{x} = m \nu + \tilde{m}\nu$ into closed-loop form gives:
$$m (\ddot{x} - \nu) = \tilde{m}\nu$$
Expanding the definition of $\nu$ inside the parenthesis:
$$m \left( \ddot{x} - \ddot{x}_m + 2\lambda \dot{\tilde{x}} + \lambda^2 \tilde{x} \right) = \tilde{m}\nu$$
Noticing that $\ddot{x} - \ddot{x}_m = \ddot{\tilde{x}}$, the term in brackets simplifies directly in terms of the composite variable $s$:
$$\dot{s} + \lambda s = \frac{d}{dt}(\dot{\tilde{x}} + \lambda \tilde{x}) + \lambda(\dot{\tilde{x}} + \lambda \tilde{x}) = \ddot{\tilde{x}} + 2\lambda \dot{\tilde{x}} + \lambda^2 \tilde{x}$$
Thus, the coupled error dynamics can be written compactly as:
$$m(\dot{s} + \lambda s) = \tilde{m}\nu$$
Because $m$ is unknown, an adaptation rule is required to update $\hat{m}$ in real time. Dr. Gammelli introduces the gradient-like parameter adaptation law:
$$\dot{\hat{m}} = -\gamma \nu s$$
where $\gamma > 0$ is a strictly positive adaptation gain chosen by the designer.
With the plant error dynamics and the parameter update law in place, Gammelli sets up a Lyapunov stability analysis to prove that the coupled state converges asymptotically to the desired equilibrium. He introduces the composite Lyapunov candidate function:
$$V(s, \tilde{m}) = \frac{1}{2} m s^2 + \frac{1}{2\gamma} \tilde{m}^2$$
This function penalizes both the tracking error metric $s$ and the parameter estimation error $\tilde{m}$. The first and third Lyapunov conditions ($V(0) = 0$ and $V(z) > 0$ for all $z \neq 0$, along with radial unboundedness) are straightforward to satisfy. The primary challenge is verifying the second condition: ensuring that the time derivative $\dot{V}$ is negative semi-definite along system trajectories.
Differentiating $V$ with respect to time gives:
$$\dot{V} = m s \dot{s} + \frac{1}{\gamma} \tilde{m} \dot{\tilde{m}}$$
Because the true mass $m$ is a constant physical parameter, $\dot{m} = 0$, which implies that the rate of change of the estimation error matches the adaptation rate:
$$\dot{\tilde{m}} = \frac{d}{dt}(\hat{m} - m) = \dot{\hat{m}}$$
[01:10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4200s) Lyapunov Proof and Sliding Line Phase-Plane Convergence
Substituting $\dot{\tilde{m}} = \dot{\hat{m}} = -\gamma \nu s$ into the derivative of the Lyapunov function gives:
$$\dot{V} = m s \dot{s} + \frac{1}{\gamma} \tilde{m} (-\gamma \nu s) = s (m \dot{s} - \tilde{m}\nu)$$
From the derived coupled error dynamics, $m(\dot{s} + \lambda s) = \tilde{m}\nu$, which can be rearranged as:
$$m \dot{s} - \tilde{m}\nu = -m \lambda s$$
Substituting this relation directly back into the expression for $\dot{V}$ produces the result:
$$\dot{V} = s (-m \lambda s) = -m \lambda s^2$$
Because the physical mass satisfies $m > 0$ and the control designer specifies $\lambda > 0$, the product $m \lambda$ is strictly positive. Therefore:
$$\dot{V} = -m \lambda s^2 \le 0$$
This confirms that $\dot{V}$ is negative semi-definite, guaranteeing that the composite error metric $s$ converges asymptotically to zero ($s \to 0$ as $t \to \infty$).
Dr. Gammelli then unpacks the physical and geometric meaning of $s \to 0$ in the error phase plane $(\tilde{x}, \dot{\tilde{x}})$. Recalling the definition $s = \dot{\tilde{x}} + \lambda \tilde{x}$, driving $s$ to zero forces the tracking error onto a stable line:
$$\dot{\tilde{x}} = -\lambda \tilde{x}$$
Gammelli illustrates the phase-plane behavior along this line: - Any arbitrary trajectory first collapses toward the line $\dot{\tilde{x}} = -\lambda \tilde{x}$ as $s \to 0$. - Once constrained to this line, if the position error $\tilde{x}$ is negative, its derivative $\dot{\tilde{x}} = -\lambda \tilde{x}$ is positive, driving the error up toward zero. - Conversely, if $\tilde{x}$ is positive, its derivative $\dot{\tilde{x}}$ is negative, driving the error down toward zero.
Thus, the phase trajectory slides directly into the origin $(0, 0)$. Since $\lim_{t \to \infty} \tilde{x}(t) = 0$, the plant position $x(t)$ successfully tracks the desired reference model $x_m(t)$, proving that the adaptive control scheme achieves model tracking even when the true mass is completely unknown.
[01:15:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4500s) Proving Global Asymptotic Stability via Lyapunov Functions
Dr. Daniele Gammelli clarifies a student's question regarding how Lyapunov stability theory was applied in the preceding derivation to establish equilibrium point stability. He explains that they selected a candidate Lyapunov function formulated primarily in terms of the sliding variable or tracking error metric $s$. While the lecture explicitly verified the second of three core Lyapunov properties on the board, the remaining conditions can be satisfied straightforwardly, often through direct inspection. Once the candidate Lyapunov function satisfies all three requisite conditions, the Lyapunov stability theorem guarantees that the system is globally asymptotically stable with respect to its equilibrium point.
In the context of the robotic manipulator or tracking problem discussed, establishing this stability implies that $s$ converges asymptotically to zero globally. Dr. Gammelli emphasizes that the subsequent step of the analysis connects $s \to 0$ directly to the physical tracking error vanishing ($e \to 0$). Rather than relying on heuristics, the entire derivation operates as a clean, direct application of the classical Lyapunov stability theorem to guarantee asymptotic tracking performance.
[01:16:32](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4592s) The Coupled Architecture of Adaptive Control
Addressing a follow-up question on parameter tuning and how convergence holds both when mass $M$ is known versus when it is unknown, Dr. Gammelli steps back to contextualize the overarching adaptive control framework. Classically, adaptive control requires synthesizing and proving the stability of a coupled tripartite system: the plant dynamics, the feedback controller, and an online adaptation mechanism that continuously tunes adjustable parameter estimates (such as the unknown mass $\hat{M}$).
```mermaid flowchart LR accTitle: Coupled Adaptive Control System Architecture accDescr: Block diagram illustrating the interaction between the plant system, feedback controller, and adaptation mechanism.
subgraph ControlLoop["Adaptive Feedback Loop"] SYS["Plant System<br/>(Unknown Parameter M)"] CTRL["Feedback Controller<br/>(Control Law u)"] ADAPT["Adaptation Mechanism<br/>(Parameter Update Law)"]
CTRL -->|"Control Input"| SYS SYS -->|"Tracking State s"| CTRL SYS -->|"Error Dynamics"| ADAPT ADAPT -->|"Parameter Estimate M̂"| CTRL end ```
The progression in class began with analyzing a baseline system where the parameter $M$ was assumed to be known, demonstrating stability under nominal state feedback. In the adaptive setting, an update law is added to adjust the estimate of $M$ online using dedicated adaptation gains ($\Gamma$ or $\lambda$). In practice, an engineer must tune these adaptation gains directly to achieve the desired transient behavior.
Dr. Gammelli acknowledges that students often find this material dense, intricate, and disorienting because multiple mathematical objects appear almost out of nowhere: - A customized control law designed to cancel out specific nonlinearities. - A virtual reference trajectory formulated to shape error dynamics. - An adaptation update law configured to update unknown mass parameters. - A candidate Lyapunov function crafted specifically to make negative-definiteness fall out cleanly.
He notes that designing these components from scratch is intensely case-specific. For this course, rather than getting bogged down in ad hoc derivations for every possible dynamical system, the pedagogical focus is deliberately placed on understanding the stability analysis that ties all these moving parts together once they are established.
[01:18:25](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4705s) The Art of Finding Lyapunov Functions and Lecture Wrap-Up
A student presses on the core difficulty of this methodology: the entire proof relies entirely on finding that exact, specialized Lyapunov function—how does one actually discover it in real-world engineering? Dr. Gammelli smiles and admits that this is precisely where the lecture is "completely kind of fast tracking." He jokes that in control theory, coming up with a novel Lyapunov function for a complex, non-trivial system and rigorously proving its stability is not just routine homework—"if you have an interesting system and you derive a Lyapunov function and you show that the system is stable, you write a paper about it and you're happy about it."
Deriving candidate Lyapunov functions is famously an art that is heavily system-dependent. Throughout the lecture, they have been operating under the assumption that "either us, a previous version of us, or someone incredibly smart is giving us all of these things, and we just analyze it." He points students to the references listed on the upcoming slide to explore the forward-design synthesis methods used to construct these functions from first principles.
With class time expiring, Dr. Gammelli pauses the remaining discussion on Model Reference Adaptive Control (MRAC), promising to pick it up at the start of the next lecture before signing off.
## Notable quotes > [00:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=0s) which is basically a framework which tries to get the best of these two approaches — Dr. Daniele Gammelli
> [02:50](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=170s) homicidal chauffeur — Dr. Daniele Gammelli
> [10:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=600s) modalities of experience — Dr. Daniele Gammelli
> [12:15](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=735s) I would probably classify this in the zero episode case, meaning that you have a dataset of trajectories and you're basically chunking this up in order to build a kind of next-state prediction or a forward dynamics problem... because you're not really being necessarily an agent in collecting that data. — Dr. Daniele Gammelli
> [12:15](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=735s) this will crash for sure — Dr. Daniele Gammelli
> [35:00](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2100s) We do not really care too much about model accuracy. What we care about is that we get a better controller out of this process. — Dr. Daniele Gammelli
> [42:47](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=2567s) ball-shaped — Dr. Daniele Gammelli
> [01:18:25](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4705s) completely kind of fast tracking — Dr. Daniele Gammelli
> [01:18:25](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4705s) if you have an interesting system and you derive a Lyapunov function and you show that the system is stable, you write a paper about it and you're happy about it. — Dr. Daniele Gammelli
> [01:18:25](https://www.youtube.com/watch?v=RtJSHiqOdgQ&t=4705s) either us, a previous version of us, or someone incredibly smart is giving us all of these things, and we just analyze it. — Dr. Daniele Gammelli
## Mentioned Dr. Daniele Gammelli, Prof. Marco Pavone, Rufus Isaacs, Stanford University, Department of Aeronautics and Astronautics, Stanford University, Italian Institute of Artificial Intelligence (AI4I), Center for Aerospace Autonomy Research (CAESAR), Center for Automotive Research at Stanford (CARS), Technical University of Denmark (DTU), NVIDIA, Principles of Robot Autonomy, AA203 Optimal and Learning-Based Control, Hamilton-Jacobi-Bellman (HJB), Hamilton-Jacobi-Isaacs (HJI), Model Reference Adaptive Control (MRAC), Model Identification Adaptive Control (MIAC), Model Predictive Control (MPC), Linear Quadratic Regulator (LQR), Best Linear Unbiased Estimator (BLUE), Maximum Likelihood Estimator (MLE), Lyapunov stability theory
## Video description Lecture 13 — Intro to Learning, System Identification, and Adaptive Control
Read the companion textbook, Principles of Robot Autonomy, free online: https://porabook.com
To learn more about enrolling in AA203 Optimal and Learning-Based Control, visit: https://online.stanford.edu/courses/aa203-optimal-and-learning-based-control
Follow along with the course schedule and syllabus: https://stanfordasl.github.io/aa203/sp2526/
Lecture slides: https://stanfordasl.github.io/aa203/sp2526/pdfs/lecture/lecture_3.pdf
Speaker: Dr. Daniele Gammelli
Bio: Dr. Daniele Gammelli is the Research Director of the Machine Intelligence for Robot Autonomy Laboratory at the Italian Institute of Artificial Intelligence (AI4I), and a Researcher in the Department of Aeronautics and Astronautics at Stanford University. Since 2022, he has been a Research Fellow at the Center for Aerospace Autonomy Research (CAESAR) at Stanford and, until 2025, at the Center for Automotive Research at Stanford (CARS). He received his Ph.D. in Machine Learning and Mathematical Optimization from the Technical University of Denmark (DTU) in 2022, where his doctoral thesis was nominated for the DTU Best Thesis of the Year Award and the DTU Young Researcher Award. Dr. Gammelli’s research focuses on developing the algorithmic foundations and system-level methodologies that enable AI-powered autonomous systems to operate safely, efficiently, and reliably in high-stakes environments, with an emphasis on aerospace autonomy and next-generation mobility systems.
Instructors: Prof. Marco Pavone, Associate Professor of Aeronautics and Astronautics, Director of Autonomous Vehicle Research at NVIDIA
Dr. Daniele Gammelli, Research Director at the Italian Institute of Artificial Intelligence (AI4I), Researcher at the Department of Aeronautics and Astronautics, Stanford University
Full playlist: https://www.youtube.com/playlist?list=PLa9dmHsLK9dg
#StanfordOnline #OptimalControl #Robotics #PhysicalAI
[Source](https://www.youtube.com/watch?v=RtJSHiqOdgQ)