Abstract visualization of latency pipeline stages in robotics safety middleware
Runtime Safety

A 50 ms Safety Loop, Line by Line

A common round-trip target for the sense-decide-act loop in a safety-rated collaborative cell is 50 milliseconds. That window has to cover several jobs at once: the sensing layer acquires and processes workspace data, the safety system judges the incoming command against policy, the command travels to the drive, and the drive starts to respond. Add communication overhead and scheduling jitter, and the parts still have to fit inside the total. Many initial designs skip this arithmetic until integration. The first serious measurement then shows 70 to 80 percent of the budget disappearing into stages nobody had classified as safety-relevant.

What the 50 ms Actually Covers

Pipeline latency is broader than the evaluator's processing time. Start the clock when an unsafe condition first exists, and stop it when the arm begins to decelerate or halt. Five segments sit between those points:

  • Sensing latency: From a physical event, such as a worker stepping into a zone or a force limit being approached, until a valid measurement reaches the processing system.
  • Communication latency: Sensor data moving to the host, and commands moving from the host to the robot controller.
  • Evaluation latency: The evaluator comparing an incoming command with current sensor state and returning a pass or block decision.
  • Controller response latency: From the controller receiving a stop or modify instruction to the drive acting on it.
  • Scheduling jitter: Variation in execution time caused by operating system scheduling, interrupt handling, and contention on shared hardware.

Jitter is usually the first item left out of a latency analysis. A general-purpose host under normal load can see 5 to 15 ms of it even for a high-priority process, which eats a large slice of a 50 ms budget before any functional component has done its work.

How the Budget Splits

A well-characterized collaborative arm cell often lands near this allocation:

  • Sensing latency: 10 to 15 ms, set mostly by the area scanner's cycle time; wrist force-torque and joint encoder contributions usually sit under 2 ms.
  • Communication latency: 2 to 5 ms from field bus to controller, with sensor data over Ethernet; the figure depends on network layout and protocol.
  • Evaluation latency: 0.5 to 2 ms with the evaluator on a local host configured for real-time work.
  • Controller response latency: 2 to 5 ms from stop receipt to a change in drive current, for the stop category in use.
  • Margin for scheduling jitter: 10 to 15 ms.

That leaves 10 to 15 ms unassigned, and non-ideal implementations consume it fast. A sensing component running long, a network path with unexpected delay, or a controller that stops slower than its datasheet claims can erase the margin. The actual total then exceeds the number used to calculate stopping distance for the installation.

Sensing: Fusion Costs and Transport

An AI safety setup usually reads several sensor types at once: a wrist force-torque sensor, joint position encoders, and one or more workspace monitors. Their update rates and transport delays differ. Where a rule depends on fused readings, effective sensing latency is the slowest input plus whatever the fusion step costs.

Cameras that run object detection onboard add far more delay than laser-based area scanners. Depending on the detection model and hardware, a camera can contribute 20 to 40 ms to sensing alone. A rule that triggers on camera detection may therefore consume the entire safety budget through that one input. Before anyone can claim the budget is achievable, each input to each rule needs its own measured sensing latency.

Evaluation: The Evaluator's Share

The evaluator itself is usually allotted 1 to 2 ms of a 50 ms budget. Rule sets of 100 to 500 rules can hold that figure when memory layout and real-time scheduling are handled well, as covered in the policy evaluation loop architecture. Keeping it there as rules accumulate over the life of a deployment, and as new sensors feed new rule types, is the harder part.

Instrumentation has to log the distribution of evaluation times, not just a running average. The 99th percentile is what the safety case rests on, because real-time worst-case behavior lives in the tail. If p99 stays inside the allocation, the evaluator is doing its job. If it drifts outside, the total budget no longer holds and the stopping-distance margins built on it may be too small.

Stops, Drives, and Command Propagation

Controller response from stop receipt to drive reaction depends on architecture and stop category. A category 2 controlled stop, which keeps power on and ramps to zero velocity, takes longer to act than category 0, which removes power at once, because the controller has to run the deceleration profile. Use the latency for the stop category named in the safety case, not a datasheet nominal value that may describe a different category.

ISO 13855 and ISO/TS 15066 describe how to derive required safety distances from total system response time. If the real response time exceeds the figure used in that calculation, protective field boundaries end up closer to the hazard than the safety case assumed. The remedy is to measure and document the whole budget under realistic conditions and use validated worst-case values instead of nominal specifications.

What Certification Frameworks Ask

ISO 10218-2 calls for the safety-related control system response time to be documented and carried into the stopping distance calculations for the installation. It does not name a latency number. It asks that the measured or calculated figure justify the distances set out in the risk assessment. When safety middleware joins the chain in an AI-driven system, its share of total response time has to be measured and entered in the SRCS documentation.

Leaving evaluation latency out of the original stopping-distance calculation is a systematic error, not a conservative assumption. The safety case can only be as sound as the budget beneath it. Measuring sensing, evaluation, and actuation end to end on real hardware, then feeding measured worst-case values into the calculations, is what turns a planning estimate into a defensible safety argument.

Back to The Safety Brief
Get Started

Put the checkpoint in the loop

Evaluation sits inside the control path, not beside it. Commands wait for a verdict, and the planner never learns the outcome.

Request Early Access