The SO-101's joint encoder counts 4096 ticks per turn, so the finest angle it can report is 1.534 milliradians (mrad). The joint doesn't move in ticks, though. Spring, damping and inertia carry it smoothly between readings, and we grade the controller on the true angle. So can the controller know the angle better than the sensor that measures it? I think this is the fun part. The sensor gives us rounded snapshots, but the joint has to move continuously between them, and that turns out to be enough.
One reading on its own can't do it. Rounding to the nearest tick leaves an error somewhere in ±½ tick. If the angle is equally likely to sit anywhere inside the tick, that error comes to 0.443 mrad RMS. Tiny, until you ask the readings for more than position. To estimate acceleration you'd look at how much the reading changes between samples, then how much that change changes, and each step divides a tick-sized error by the short sample time. (That's why the model-based controllers take acceleration from the planned path, which has no ticks in it.) A one-step inverse has a second amplifier: it asks which goal will make the slow servo (dead time and lag) reach the target on the next step. Its weak response over that short interval multiplies measurement and model errors. Let's follow one joint, sampled 30 times a second, through both problems and the fix.
Try ②: one tick of rounding adds 1.534 mrad ÷ Δt² to the acceleration estimate. That is about 1.4 rad/s² at 30 Hz and four times as much at 60 Hz.
Predict ②: a reading jumps +1 tick from rounding alone. The one-step inverse moves the goal about 1/0.15 ≈ 7 ticks to chase it.
Try ③: a small α trusts the model and drifts when the model is wrong. α = 1 copies the readings, rounding and all.
Try ④: with fixed Q and R, K approaches a fixed value. This can take more than 12 readings. A larger Q raises K, and a larger R lowers it.
Predict ⑤: 1152 s of fitting data does no better than 24 s, because tick rounding dominates the remaining error.
The same trick finds forces nobody modeled. Suppose the gripper carries a load our model doesn't know about, or the arm sags. Now the readings land on the same side of the prediction, step after step. So we give the filter one more number to estimate: the extra torque d. That torque changes the predicted speed, which changes the predicted angle, and the filter moves d up or down until the readings stop landing on one side. It learns how big the force is, never what causes it. ③ estimates the joint's state (angle and speed), and d is a disturbance estimate. It helps to keep the two apart. In solve and mpc, each 30 Hz step applies Δt/0.3 s (about 11%) of the correction that the latest mismatch suggests, and the controller subtracts the estimate from the goal it sends. mpca runs a Kalman filter with two terms instead: a load that can change fast and sag that changes slowly (how the goal formula uses them).
A smoother angle estimate makes the commanded goal flip between neighboring ticks less often. One kind of chatter stays. The planned path can keep asking the servo to reverse direction by small amounts. Inside the servo's dead band, where small commands produce no motion, those commands rattle back and forth, and a reversal gate holds them off. So give each problem its own fix: fuse model and readings for rounding noise and model error, take acceleration from the planned path, plan around servo lag with the model, and gate the dead-band reversals.