The joint's true dynamics depend on its moment of inertia J, which grows with the unknown payload mass m clamped in the gripper — the controller is never told m. Simplified to a first-order angular-velocity plant:
plant: ẋ = -a·x + b·u, b = 1/J(m) (unknown, m-dependent)
reference: ẋm = -am·xm + bm·r(t) (fixed, designed target behaviour)
control: u = θₓ·x + θᵣ·r
θₓ and θᵣ are not fixed like a PID gain — they are themselves state variables, adapted online from a Lyapunov function V = e² + (θₓ−θₓ*)²/γ + (θᵣ−θᵣ*)²/γ, where e = x − xm is the tracking error. Differentiating V and forcing V̇ ≤ 0 gives the MIT-rule-style adaptation law actually driving this simulation:
θ̇ₓ = -γ · e · x · sign(b)
θ̇ᵣ = -γ · e · r · sign(b)
Since b = 1/J is always positive, sign(b) = +1 here, so the law only needs the sign, never the true magnitude of b. As the payload changes, e briefly grows, then θₓ and θᵣ drift to new values that cancel the new b — the arm re-converges onto the reference model without ever being told the mass changed. Switch adaptation off to see the same fixed gains mistrack as soon as the payload moves away from the value they were tuned for.
- Payload mass — changes the true plant gain b = 1/J the controller must compensate for.
- Command frequency / Sine / Square — the reference signal r(t) driving the ideal reference model.
- Adaptation rate γ — how fast θₓ, θᵣ are allowed to move; too high and they oscillate, too low and they lag.
- Adaptation ON/OFF — freezes θₓ, θᵣ at their current value so you can compare adaptive vs. fixed-gain control on the same plant.
This 2D companion renders the same control law as the 3D version but replaces the orbit-camera arm with a flat side view plus a live tracking-error strip chart, so the divergence and re-convergence of the actual arm (solid) against the reference model (dashed ghost) reads at a glance.