Why the Ray Tracer Lost Its Veto Over the Simulation Clock

Our co-simulation stack for hardware-in-the-loop benches no longer waits for its slowest federate. If the ray-traced channel model misses its step deadline, a precomputed surrogate supplies the channel values for that step and the frame is tagged as degraded. The traffic microsimulation and the radios under test keep running in real time. This record explains why we gave up global lockstep to get there, and which measurement would make us go back to it.

The option we rejected

The rejected design is conservative lockstep under a global barrier, which co-simulation interface standards such as FMI and HLA support directly. Every federate, from the traffic microsimulation to the network stack, the ray tracer and the bench bridge, advances to step n+1 only after all of them have finished step n. That gives bit-for-bit reproducibility, guaranteed causality and no message ever computed against a stale vehicle position, and any failed run can be replayed exactly from its seed. For pure software-in-the-loop regression over millions of vehicles it is the better architecture, and we keep it there. Its failure behaviour is also honest: when a federate stalls, the whole world stops instead of producing plausible but wrong output.

Where honesty becomes the defect

That honesty breaks the moment a physical on-board unit sits on the bench, because a radio cannot be paused, and a world that stops for the ray tracer leaves the device under test transmitting into silence while its own timers, congestion control and misbehaviour detection keep running against a reality that no longer advances.

What we chose, and how it degrades

The bench bridge is now the clock master, with a fixed co-simulation step of 10 ms, and every federate has a deadline inside that step. The failure mode that drove the decision is the ray tracer in urban canyon geometry: when a dense platoon enters a street lined with reflective facades, the path count explodes and the step time spikes. By our estimate this hits a few tenths of a percent of steps in the downtown scenario, but those steps cluster at exactly the intersections the safety cases care about. On a miss, the bridge substitutes path loss and fading from a lookup surrogate built offline from earlier ray-traced runs of the same geometry, stamps the frame as degraded, and resynchronises on the next step. A stalled traffic federate gets the same treatment, with dead reckoning from the last kinematic state for a bounded number of steps before the run aborts. Isolation therefore lives in the bridge rather than in each federate, and the cost is that reproducibility becomes statistical: replays reuse the logged surrogate decisions instead of recomputing them.

The condition that would reverse this

The decision rule we apply is this: a run counts as valid evidence only if no safety-relevant time window contains more degraded frames than the threshold its scenario owner has set, and any run that breaks that limit is discarded, never averaged in. The answer flips if the ray tracer's worst-case step time across a full downtown run fits within half the step budget on the bench hardware, because at that point lockstep with real radios becomes viable and its determinism is worth more than the bridge logic we had to write. Our estimate is that GPU path tracing gets within reach of that margin for medium-density scenes, but not for the canyon cases, so we expect to run both modes side by side for some time. What remains open before freeze is the per-scenario degraded-frame threshold, and with it the risk that a surrogate trained on yesterday's geometry quietly disagrees with a facade that changed.

Why not give the ray tracer enough hardware to always meet its deadline and keep lockstep?

Because the spike is driven by scene geometry, not average load, so provisioning for the worst canyon intersection means paying for capacity that sits idle almost all of the time and still offers no guarantee when the next scenario adds a denser street. A bounded fallback with explicit tagging fails in a way we can measure, while overprovisioning only moves the point where the world stops.

Back to V2XTwins · Domains

← Back to V2XTwins
Engineering & Architecture Brief

Why the Ray Tracer Lost Its Veto Over the Simulation Clock

Our co-simulation stack for hardware-in-the-loop benches no longer waits for its slowest federate. If the ray-traced channel model misses its step deadline, a precomputed surrogate supplies the channel values for that step and the frame is tagged as degraded. The traffic microsimulation and the radios under test keep running in real time. This record explains why we gave up global lockstep to get there, and which measurement would make us go back to it.

The option we rejected

The rejected design is conservative lockstep under a global barrier, which co-simulation interface standards such as FMI and HLA support directly. Every federate, from the traffic microsimulation to the network stack, the ray tracer and the bench bridge, advances to step n+1 only after all of them have finished step n. That gives bit-for-bit reproducibility, guaranteed causality and no message ever computed against a stale vehicle position, and any failed run can be replayed exactly from its seed. For pure software-in-the-loop regression over millions of vehicles it is the better architecture, and we keep it there. Its failure behaviour is also honest: when a federate stalls, the whole world stops instead of producing plausible but wrong output.

Where honesty becomes the defect

That honesty breaks the moment a physical on-board unit sits on the bench, because a radio cannot be paused, and a world that stops for the ray tracer leaves the device under test transmitting into silence while its own timers, congestion control and misbehaviour detection keep running against a reality that no longer advances.

What we chose, and how it degrades

The bench bridge is now the clock master, with a fixed co-simulation step of 10 ms, and every federate has a deadline inside that step. The failure mode that drove the decision is the ray tracer in urban canyon geometry: when a dense platoon enters a street lined with reflective facades, the path count explodes and the step time spikes. By our estimate this hits a few tenths of a percent of steps in the downtown scenario, but those steps cluster at exactly the intersections the safety cases care about. On a miss, the bridge substitutes path loss and fading from a lookup surrogate built offline from earlier ray-traced runs of the same geometry, stamps the frame as degraded, and resynchronises on the next step. A stalled traffic federate gets the same treatment, with dead reckoning from the last kinematic state for a bounded number of steps before the run aborts. Isolation therefore lives in the bridge rather than in each federate, and the cost is that reproducibility becomes statistical: replays reuse the logged surrogate decisions instead of recomputing them.

The condition that would reverse this

The decision rule we apply is this: a run counts as valid evidence only if no safety-relevant time window contains more degraded frames than the threshold its scenario owner has set, and any run that breaks that limit is discarded, never averaged in. The answer flips if the ray tracer's worst-case step time across a full downtown run fits within half the step budget on the bench hardware, because at that point lockstep with real radios becomes viable and its determinism is worth more than the bridge logic we had to write. Our estimate is that GPU path tracing gets within reach of that margin for medium-density scenes, but not for the canyon cases, so we expect to run both modes side by side for some time. What remains open before freeze is the per-scenario degraded-frame threshold, and with it the risk that a surrogate trained on yesterday's geometry quietly disagrees with a facade that changed.

Technical FAQ: Why not give the ray tracer enough hardware to always meet its deadline and keep lockstep?

Because the spike is driven by scene geometry, not average load, so provisioning for the worst canyon intersection means paying for capacity that sits idle almost all of the time and still offers no guarantee when the next scenario adds a denser street. A bounded fallback with explicit tagging fails in a way we can measure, while overprovisioning only moves the point where the world stops.

Related Architecture Specifications (AUTOMOTIVEV2X): v2xsystems.com · cellular-v2x.com · safev2x.com

More Technical Articles on v2xtwins.com

Simulating 1,000 Vehicles per Square Kilometer: Channel Saturation and Packet Delivery Ratios →Simulating Collective Perception in CARLA: Synthetic LiDAR Point Clouds over Virtual PC5 Sidelink →