Token Lab検索

← フィジカルAI
PHYSICAL AI / 3 OF 8

03 · Feedback control and receding-horizon planning

Connect learned actions to stable feedback and constrained execution.

Prerequisites: Dynamics, derivatives and linear algebra.

Technical posts currently have English and Chinese editions. This locale displays the English article with localized navigation.

Understand the mechanism

A policy often specifies a target rather than motor torque. A lower-level controller tracks it at a higher rate. Separate planning, tracking and safety responsibilities. Model predictive control optimizes a finite future but executes only the first control before replanning from the next observation. Stability is not implied by low training loss. Latency, saturation and contact can break a controller that looks smooth in a nominal simulation.

Text / 原始公式
u = Kp(x* − x) − Kd v
x_next = x + Δt·v; v_next = v + Δt·u/m
min Σₜ [(xₜ−x*)ᵀQ(xₜ−x*) + uₜᵀRuₜ]
subject to dynamics, state limits and actuator limits
Study guide & lesson outlineLEARNING CONTRACT

Understand → implement → investigate

Goal: explain the mechanism in this lesson, reproduce one example and test a failure case. Reading alone does not mark mastery.

  • Understand: state assumptions, shapes/units and a counterexample.
  • Implement: reproduce a numerical example and inspect boundaries.
  • Investigate: compare one alternative under a matched budget.

Mechanism map & worked derivation

Goal + state estimate → Constrained horizon plan → Execute first control → Observe error → replan
Original schematic; read the steps from top to bottom. SVG ↓
Symbols and assumptions
SymbolMeaning
Kp, KdProportional and derivative gains
Q, RState-error and control-effort cost weights
  1. A 1 kg point mass is at m, target 1 m, m/s. With N/m and Ns/m, N.
  2. If the actuator limit is 5 N, execution uses 5 N. At s, explicit Euler predicts v_ m/s and x_ m.
  3. Compare constrained and unconstrained rollouts. Increasing gain may shorten nominal settling time while increasing saturation or delay-induced oscillation.
Experiment checkpoint

Sweep delay and mass in a toy simulator. Record overshoot, settling time, peak effort and constraint violations; keep integration step fixed. A simulation pass is not hardware certification.

Original interview exercises & analysis

Answer aloud before revealing the analysis. Add assumptions, a counterexample and a test you would run.

Why replan rather than execute the whole trajectory?

New observations reveal model mismatch and disturbances. Replanning trades compute for correction; its deadline must still fit the control budget.

Can an action clamp prove collision safety?

No. Bounded actions can still move into obstacles. Safety depends on state, stopping distance, geometry and the supervisory system.

Read the primary sources

Underactuated Robotics — Russ Tedrake ↗

Original Token Lab explanations and synthetic calculations; not measured robot performance. Source links checked 2026-10-25. Unversioned arXiv links may change; record a version for reproduction.

MATHEMATICAL REVIEW · 2026-10-26

Assumptions, implementation & acceptance

N/m and N·s/m. Quadratic MPC uses Q positive semidefinite and R positive definite; convex optimization additionally needs affine dynamics and convex constraints. The example uses explicit Euler.

Formula conditions, units and worked arithmetic reviewed. The implementation isolates one numerical mechanism; it does not train a policy or control real hardware.

Before running: predict a boundary case

Explicit Euler updates position from old velocity. Changing to new velocity is a different integrator.

Hint: isolate the assumption

Keep the baseline input fixed, change one parameter or boundary, and compare both the numerical result and the claimed units. A passing example verifies this fixture only.

Minimal executable example

Save the example and linked modules in one folder. Use Node.js 22 or newer, then run node feedback-and-planning.mjs. No third-party runtime dependencies.

const solve=()=>{
const x=.2,v=.1,target=1,kp=10,kd=2,mass=2,dt=.1;
const force=kp*(target-x)-kd*v;return [force,x+dt*v,v+dt*force/mass];
};
const actual=solve();
const expected=[7.8,0.21,0.49];
if(JSON.stringify(actual)===JSON.stringify(expected)){console.log('PASS',actual)}else{
const a=[actual].flat(), b=[expected].flat();
if(a.length!==b.length||a.some((v,i)=>!Number.isFinite(v)||Math.abs(v-b[i])>1e-10))throw Error('Numerical mismatch');
console.log('PASS within 1e-10',actual);
}
Reference output — reveal after predicting
[
  7.8,
  0.21,
  0.49
]

Test and transfer

Explicit Euler updates position from old velocity. Changing to new velocity is a different integrator.

Record input, code version, expected result and observed result in the notebook below. Then construct a counterexample that violates the assumption above and explain why the original conclusion no longer follows.

Download complete kit (.tar.gz) · Complete reference kit and regression checks

Predict, test and keep evidence

Before revealing an answer, predict one result. After the exercise, record the discrepancy and a transfer test. Saved locally across language editions.

Open notebook / export / clear →

The mathematical review scope is recorded per lesson. It does not establish empirical paper reproduction; report suspected errors in your notes. Review scope