Sequential composition of safety-certified controllers for hybrid and non-smooth robotic systems is well studied piecewise. Yet no existing framework reduces this question to a single algebraic condition. We construct a trajectory monad for Filippov-regular differential inclusions. Its Kleisli category treats controllers as morphisms and sequential execution as trajectory concatenation. Control Barrier Function (CBF) certification, a guarantee of forward invariance, corresponds to a sub-monad of this category. Joint safety of composed controllers then follows from one algebraic condition. All controllers must land in a common sub-monad, which is closed under the monad multiplication. The sub-monad condition recasts recasts existing CBF composition practice categorically. It explains why a smooth intersection of multiple barriers supports safe composition, while enforcing barriers phase by phase does not. For the phase-by-phase case, we derive a closed-form Bernoulli model of the failure rate. We validate it over a randomized sweep of 3{,}000 instances. The same sweep shows that the standard baseline degrades under constraint conflict as the barrier count grows. This baseline enforces all barriers simultaneously as constraints in a single quadratic program (QP). We instantiate the framework on a four-mode piecewise-affine system and on a unicycle reduced-order model over heterogeneous terrain.
Figures & tables
Fig. 1: Randomized sweep over Ns=150 random CBF geometries per cell, with ε=0.05 and α=2.0 . (A) Naive safety rate versus phase count n for each barrier count k . Dashed curves show the fitted Bernoulli model PsafeNaive(n)=(1−p0)n−1 , and shaded regions show p0±2 standard errors. The fitted p0 increases monotonically with k (Remark VI.1 ). (B)–(D) Safety rate over the full (n,k) grid for Naive, Global, and Monadic. Naive collapses exponentially with n . Global degrades under constraint conflict as k grows, despite being the exact simultaneous-QP baseline. Monadic achieves 100% on all 20 cells, as Theorem V.4 guarantees.
Fig. 2: Four-mode PWA system, one representative rollout. Naive (red) exits C1∩C2∩C3 near the mode-2/mode-3 transition. Global (green) and Monadic (blue) remain safe throughout. Line style shows the plant mode ℓ(x) , which switches as the trajectory crosses quadrants. Distances are for this single rollout, not the Ns=50 Monte Carlo averages.
Fig. 3: Rocky Terrain Traverse, one representative rollout. Naive (red) loops through mode ℓ=3 near the handoffs τ2 and τ3 and crosses the cliff boundary h3=0 . Global (green) and Monadic (blue) remain within C1∩C2∩C3 and reach the goal. Distances are for this single rollout, not the Ns=50 Monte Carlo averages.