HomeRobotics & KinematicsPerception-Action Loop Latency: Phase-Plane & Stability Margin

Perception-Action Loop Latency: Phase-Plane & Stability Margin

A 1-DOF PD-controlled plant tracks a moving setpoint through a real discrete perception delay. Watch the tracking-error phase portrait spiral to the origin when stable, or blow outward once latency crosses a Routh-Hurwitz-derived stability margin — then flip on a Smith predictor that forward-replays its own known dynamics to cancel the delay.

Robotics & Kinematics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-ai-topic-46 ↗ Open standalone

Every real robot's perception-action loop has a delay in it — camera capture, detection and localization all take time before the controller learns the true state. This 2D companion to the 3D chase-robot simulator strips the problem down to its control-theory core: a 1-DOF PD-controlled mass tracks a sinusoidal setpoint through an adjustable round-trip perception latency, implemented as a genuine discrete delay buffer, not a cosmetic slow-down. Rather than re-drawing a top-down chase, it plots the tracking-error phase portrait directly — the classic view control engineers use to diagnose stability — alongside an independently derived analytic prediction: a first-order Padé approximation of the delay turns the closed loop into a cubic characteristic polynomial whose Routh-Hurwitz test predicts the latency at which the spiral should flip from converging to diverging. Enable the Smith predictor to watch the controller forward-replay its own known dynamics through the delay window and collapse the effective lag back toward zero, restoring the tight inward spiral even at latencies that would otherwise blow the loop up.

⚙ Under the hood

A 1-DOF PD-controlled plant tracks a moving setpoint through a real discrete perception delay. Watch the tracking-error phase portrait spiral to the origin when stable, or blow outward once latency crosses a Routh-Hurwitz-derived stability margin — then flip on a Smith predictor that forward-replays its own known dynamics to cancel the delay.

roboticscontrol theoryperception-action loopSmith predictorphase portraitRouth-Hurwitz stabilitysensor latency

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)