← Robotics Test Bench

Experiment #03 · Resolved

Model-based control

Give a two-link arm its gravity and planned-motion torque before error has to grow, then deliberately give the controller the wrong mass.

01 · Question

What does knowing the dynamics buy?

Can an internal model reduce the corrective work left to feedback, and what happens when that internal model is wrong?

02 · Prediction

Support torque should arrive before visible error.

Gravity compensation should remove a pose-dependent load from feedback. Inverse dynamics should also use the desired acceleration. If the controller underestimates link-2 mass, it should first supply too little model torque and leave feedback with a structured residual.

03 · Experiment

Hold the physical arm fixed.

The same two-link MuJoCo plant, target, gains, and timestep ran under PD, gravity compensation, accurate computed torque, and computed torque with a controller-only link-2 mass error. The physical link remained 0.7 kg; the faulty controller assumed 0.35 kg.

Measured overlay · target reversal

The model changes where the torque comes from.

At t = 1.963 s, the desired acceleration is [−0.224, −0.288] rad/s². The gray arm is the target; the colored arms are recorded states.

Playback uses precomputed MuJoCo keyframes. The marked frame is the reversal used in the evidence.

Four measured two-link arm states at one target reversal PD is far from the gray target. Gravity compensation and accurate computed torque are close to it. The wrong-mass controller is displaced and needs more feedback torque. PDq₁ .006 · q₂ −.364τfb₁ 12.75 N·mτff₁ 0.00 N·m Gravity compensationq₁ .737 · q₂ −.240τfb₁ −.52 N·mτff₁ 11.14 N·m Computed torqueq₁ .715 · q₂ −.247τfb₁ −.25 N·mτff₁ 10.96 N·m Wrong massq₁ .388 · q₂ −.326τfb₁ 5.49 N·mτff₁ 7.32 N·m Gray = desired pose · blue = feedback carries the load · orange/green = model feedforward · red = model shortfall
One measured snapshot from the canonical headless run. Bar lengths are scaled within each panel; labels carry the values.

04 · What happened

Accurate feedforward left almost nothing for feedback.

Over the final target cycle, gravity compensation reduced per-joint RMS position error [J1, J2] from [0.679127, 0.082077] rad to [0.019344, 0.004964] rad. Accurate computed torque reduced it further to [0.000414, 0.000519] rad. Its feedback-torque RMS was only [0.000536, 0.000149] N·m.

Measurement note: These vectors are per-joint RMS values, not confidence intervals. This deterministic simulation reads MuJoCo state directly and has no sensor-noise model. The matched-model position residual is also near the scale introduced by the 2 ms telemetry timing convention: the state is sampled after the simulation step while its comparison target was evaluated before it. Treat the tiny residual as a timing-limited simulation measurement, not a physical sensing-precision claim. The controller comparison is unchanged.

05 · Model update

Feedback reacts; a model can prepare.

Higher feedback gain acts after error. Gravity compensation supplies pose-dependent support before that error must appear. Computed torque also includes the torque implied by desired acceleration and motion. A wrong model creates a specific feedforward shortfall and restores feedback work; that is different from a controller that is merely poorly tuned.

Worth noting: The useful comparison was not “which trace looks cleaner.” It was whether the same physical arm moved work from error-driven feedback into a model term, and whether one wrong parameter brought that burden back.

06 · Stop boundary

The mechanism is clear enough to move on.

A later acceleration overshoot was predicted but not isolated as a separate time-resolved event. That would be a different question. This experiment established the model-based-control distinction and stops here.

Source

Canonical evidence