Model-Reference Adaptive Control
MRAC adjusts controller parameters online so the plant output tracks the response of a chosen reference model despite unknown plant parameters.
The reference model idea
In MRAC the designer specifies a reference model that captures the desired closed-loop behavior. An adaptation law then tunes the controller parameters in real time to drive the error between the plant output and the reference-model output toward zero. The plant parameters need not be known; the adaptation infers what feedback and feedforward gains make the plant imitate the model.
The MIT rule and Lyapunov design
Early MRAC used the MIT rule, adjusting each parameter along the negative gradient of the squared tracking error. It is intuitive but can go unstable at high adaptation gains. The Lyapunov approach fixes this: choose a Lyapunov function of the tracking error and parameter error, then pick the adaptation law that makes its derivative negative semidefinite. This guarantees stable tracking by construction.
import numpy as np
# MRAC (Lyapunov) for x_dot = a x + b u tracking x_m_dot = -am x_m + bm r
dt=0.01; a,b=1.0,1.0; am,bm=2.0,2.0; gk,gr=2.0,2.0
x=xm=0.0; kx=kr=0.0; r=1.0
for _ in range(2000):
u=kx*x+kr*r; e=x-xm
x+=dt*(a*x+b*u); xm+=dt*(-am*xm+bm*r)
kx+=dt*(-gk*e*x); kr+=dt*(-gr*e*r)
print(round(x,3),round(xm,3))
Stability caveats
MRAC guarantees tracking but not parameter convergence unless the reference is persistently exciting. Without persistent excitation the gains may drift, and with unmodeled dynamics or disturbances they can drift to instability. Robust modifications, sigma-modification, e-modification, dead zones, and projection, bound the parameter estimates and prevent this.
- Adaptation drives plant output to a reference model
- Lyapunov design guarantees stable tracking
- Parameter convergence needs persistent excitation
- Robust mods prevent gain drift under disturbances
MRAC suits systems whose parameters are unknown or slowly varying but whose structure is known. It is a direct adaptive method, tuning controller gains directly, in contrast to indirect self-tuning regulators that estimate the plant first.