Real hardware changes over time: motor resistance drifts with temperature, payload mass varies, actuators age. A fixed controller tuned at the factory cannot maintain performance across this variability. Model Reference Adaptive Control (MRAC) addresses this by continuously adjusting its own gains online, using only the tracking error between the real plant and a designer-specified reference model, until the plant's response matches the desired ideal. No knowledge of the exact plant parameters is needed — only the structure (the equations of motion) and the sign of the input gain.
This makes MRAC the canonical direct-adaptive scheme for the "known structure, unknown numbers" class of problems that appears throughout embedded control: a family of units sharing the same firmware but differing in parameter values, or a single unit whose parameters change slowly during operation.
Given a plant of the form
where
The ideal control law that would make the plant identical to the reference model is
where
Since
Let
The MIT rule minimises
This is a first-order gradient update. It converges when
The Lyapunov method chooses the same update law but derives it from the Lyapunov function candidate
Computing
The continuous-time update is approximated by forward Euler with step
The same structure extends to the multi-input multi-output case using outer products of the error and regressor vectors, yielding matrix parameter estimates.
| Operation | Time | Space | Notes |
|---|---|---|---|
| ComputeControl |
|
Reference model step + two outer products + two matrix-vector products | |
| Memory |
|
Parameter matrices and reference state | All fixed-size; no heap allocation |
Here
First-order scalar example (
- At step
$k=0$ :$x = 2$ ,$r = 1$ ,$x_m = 0$ ,$\hat{\theta}_x = 0$ ,$\hat{\theta}_r = 0$ . - Advance reference model:
$x_m \leftarrow 0 + (-1 \cdot 0 + 1 \cdot 1) \cdot 0.01 = 0.01$ . - Tracking error:
$e = 2 - 0.01 = 1.99$ . - Control output:
$u = 0 \cdot 2 + 0 \cdot 1 = 0$ (initial parameters are zero). - Update
$\hat{\theta}_x$ :$0 - 1 \cdot (+1) \cdot 1.99 \cdot 2 \cdot 0.01 = -0.0398$ . - Update
$\hat{\theta}_r$ :$0 - 1 \cdot (+1) \cdot 1.99 \cdot 1 \cdot 0.01 = -0.0199$ . - At the next step the control becomes
$u = -0.0398 \cdot x - 0.0199 \cdot r$ , already driving the plant toward the reference model. After many steps,$\hat{\theta}_x \to \theta_x^* = 0.25$ and$\hat{\theta}_r \to \theta_r^* = 0.5$ .
-
Adaptation gain too large: with the MIT rule,
$\gamma$ large relative to signal power causes$\hat{\theta}$ to overshoot and the closed-loop to go unstable. The Lyapunov law is more forgiving but still requires reasonable$\gamma$ . -
Wrong sign of
$b$ : if$\text{sgn}(b)$ is set incorrectly, adaptation drives parameters in the wrong direction and the error grows. This is a hard fault — the algorithm is designed around knowing the plant's sign. -
No persistent excitation: if
$r$ is constant or bandlimited,$\hat{\theta}$ converges to some values that achieve tracking but not necessarily to$\theta^*$ . The plant still tracks the reference model; only parameter identification fails. -
Parameter drift: in the presence of noise or unmodelled disturbances,
$\hat{\theta}$ drifts even when$e$ is small. Standard remedies are$\sigma$ -modification ($\dot{\hat{\theta}} = -\gamma,e,\phi - \sigma,\hat{\theta}$ ) and parameter projection onto a compact set. -
Euler discretisation error: the Euler step introduces
$O(\Delta t)$ error in the reference model trajectory and the parameter update. Small$\Delta t$ is needed for accuracy; a higher-order integrator (RK4) can be used for the reference model when$\Delta t$ is large.
- Indirect MRAC: first identifies the plant parameters (via Recursive Least Squares) and then recomputes the matching gains; separates identification from control but requires a plant model structure assumption.
-
$\sigma$ -modification: adds a leakage term$-\sigma,\hat{\theta}$ to the parameter update, bounding parameter drift at the cost of a small steady-state bias. -
e-modification: replaces
$\sigma$ with$\sigma,|e|,\hat{\theta}$ , so leakage is active only when the error is large and vanishes at steady state. -
Parameter projection: constrains
$\hat{\theta}$ to a known compact set, preventing unbounded drift without degrading tracking. - Adaptive backstepping: embeds MRAC-style parameter adaptation inside the Backstepping recursive design for strict-feedback plants with unknown parameters.
-
MRAC with reference model order > 1: the same gradient law extends to any LTI reference model by tracking the full state vector
$x_m \in \mathbb{R}^n$ .
- Motor drives with varying load inertia or resistance: MRAC maintains speed/position bandwidth despite parameter changes.
- Aerospace: autopilot adaptation to changing mass, fuel consumption, or aerodynamic coefficients.
- Robotic manipulators: payload-varying adaptive torque controllers.
- Power electronics: adaptive current controllers for converters with uncertain filter inductance.
- Embedded firmware for a product family: a single binary adapts to unit-to-unit hardware variation at startup.
- Backstepping Control: MRAC handles unknown parameters in a fixed-structure plant; adaptive backstepping merges both, providing recursive stability proofs for uncertain strict-feedback systems.
- Feedback Linearization: cancels nonlinearities via an explicit model; MRAC is model-free in the parameter sense and is more robust when the model is uncertain.
- Recursive Least Squares (RLS): the indirect-MRAC identification step; direct MRAC avoids explicit parameter estimation by updating control gains rather than plant parameters.
- LQR: optimal fixed-gain control for known linear plants; MRAC extends the design to plants with unknown parameters at the cost of the adaptation transient.
- math::LinearTimeInvariant: provides the reference model state-space container; the MRAC controller holds a reference to an LTI instance to step the reference trajectory.
- K. J. Åström, B. Wittenmark, Adaptive Control, 2nd ed., Addison-Wesley, 1995.
- K. S. Narendra, A. M. Annaswamy, Stable Adaptive Systems, Prentice-Hall, 1989; Dover reprint 2005.
- S. Sastry, M. Bodson, Adaptive Control: Stability, Convergence and Robustness, Prentice-Hall, 1989.
- P. A. Ioannou, J. Sun, Robust Adaptive Control, Prentice-Hall, 1996 (free PDF available from the authors).