Skip to content
Physical AI
All experiments

Multi-rate timing: 200 Hz physics and IO, 50 Hz policy

How Asimov's documented rates fit together: physics and IO-side state handling every 5 ms, the policy every 20 ms, so each policy action is held for four physics steps.

Loading simulation…

What it demonstrates

How Asimov's documented rates fit together: physics and IO-side state handling every 5 ms, the policy every 20 ms, so each policy action is held for four physics steps.

How it works

A step counter advances in 5 ms physics steps. Physics and IO tasks run on every step. The policy task runs on the first physics step at or after each of its ideal release times, i / f_policy. For 50 Hz this is exactly every fourth step.

The bottom trace shows a joint target produced at each policy step and held constant (zero-order hold) until the next one. Choosing a rate that does not divide 200 Hz, such as 60 Hz, shows the uneven 4-3-3 pattern that results.

Adjustable parameters

  • Policy rate (50 Hz documented; 40, 60, 100 Hz hypothetical)
  • Playback speed

Known limitations

  • The relative order of IO, policy and physics inside one step is a modelling choice; Menlo does not document it.
  • Rates other than 50 Hz are hypothetical.

Equations

Δtphys=1200 Hz=5 ms,Δtpolicy=150 Hz=20 ms\Delta t_{phys} = \tfrac{1}{200\,\text{Hz}} = 5\,\text{ms},\qquad \Delta t_{policy} = \tfrac{1}{50\,\text{Hz}} = 20\,\text{ms}
N=Δtpolicy/Δtphys=4N = \Delta t_{policy} / \Delta t_{phys} = 4
policy runs on step k  ⟺  ⌊kfpolfphys⌋>⌊(k−1)fpolfphys⌋\text{policy runs on step } k \iff \left\lfloor \tfrac{k f_{pol}}{f_{phys}} \right\rfloor > \left\lfloor \tfrac{(k-1) f_{pol}}{f_{phys}} \right\rfloor

Core update rule

for (let k = 0; ; k++) {
  ioSample(state);                         // 200 Hz
  if (runsOnStep(k, 50, 200)) action = policy(observation()); // every 4th step
  applyHeld(action);                       // zero-order hold
  physicsStep(state, 0.005);               // 200 Hz
}

Explained in Chapter 6: Asimov Simulation