Model Reference Adaptive Control Demo

First-order SISO MRAC with Lyapunov-based Gradient adaptation. Adjust plant parameters mid-simulation and watch the controller adapt in real time.

Plant: ẏ = −a·y + b·u  |   Reference: m = −am·ym + bm·r  |   Control: u = θ₁·r + θ₂·y

r y u

Live Adaptive Parameters

θ₁

0.00

θ₂

0.00

Error e

0.00

Plant a

2.00

Plant b

1.00

MIT Rule — Filtered Signals

x₁ = aₘ/(p+aₘ)·r

0.00

x₂ = aₘ/(p+aₘ)·y

0.00

Simulation Controls

Plant (User Fudgeable)

2.0
1.0

Reference Model

1.0
1.0

Adaptation

0.50
0.50

Reference r(t)

10