WorksEngineering
Representing Differential Inclusions as Monads: A Framework for Compositional Controller Synthesis
Abstract
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.
Introduction
Compositional controller design is a fundamental challenge in hybrid robotics, including legged locomotion, manipulation with contacts, and variable-structure control. Given controllers certified to be individually safe, does their sequential execution produce a jointly safe trajectory? Existing approaches answer this piecewise, each under its own composition regime. No unifying account explains why some composition strategies preserve safety certificates while others provably fail.
Several mature lines of work address pieces of this problem. Boolean and smooth CBF compositions [1, 2, 3, 4] prove forward invariance for min/max, smooth AND/OR, and nested Boolean combinations of barriers. They are compositional within a fixed operating mode. A separate line of work asks when several CBFs can be enforced jointly without emptying the input-constrained feasible set [5], [6]. We observe this QP infeasibility empirically for the simultaneous-constraint baseline in §VI. Outside the CBF literature, sequential composition has a long history in robotics through funnels built from Lyapunov sublevel sets [7]. Sum-of-squares funnel libraries later made this approach robust to disturbances [8]. Assume-guarantee contracts [9] provide cascade and feedback composition theorems for continuous-time invariance, with extensions to hybrid systems [10].
Monadic and categorical systems theory [11, 12, 13, 14] has used Kleisli categories for dynamical-system composition since the work in [14]. The hybrid monad of [12] is the closest predecessor to our construction.
None of these frameworks gives a unified categorical formulation in which CBF certificates lift as sub-monadic structure with provably closed Kleisli composition. The Boolean nonsmooth compositions of [1] are mode-local and do not address sequential phase transitions. Funnel-based sequential composition [7], [8] checks compatibility funnel by funnel rather than through a single algebraic condition. It also targets Lyapunov sublevel sets rather than CBF-certified safe sets. The input-constrained compatibility conditions of [5], [6] guarantee feasibility of the composed QP. Like the Boolean compositions, however, they are stated mode-locally rather than across sequential handoffs. The hybrid monad [12], [13] handles hybrid trajectory composition but does not embed safety certificates. Assume-guarantee contracts [9] give sufficient conditions for composition in a contract-based formalism rather than an algebraic one. Within that framework, the question of why composition fails has no algebraic answer.
Contribution. We develop a trajectory monad that fills this gap. It is a mathematical structure on Filippov-regular differential inclusions. Its Kleisli category is a formal language for composing safety-certified controllers. Its sub-monad structure gives a sufficient condition for compositional safety and a precise account of why naive composition fails. The sub-monad account also has analytical consequences. It identifies the failure mode as a local mismatch of sub-monad membership at each Kleisli handoff. This locality lets us model the failure probability as a sequence of independent trials, one per handoff (§VI).
Specifically, the contributions of this work are: 1) Construction of the trajectory monad for Filippov-regular differential inclusions on diffeological spaces, with the monad laws holding exactly (§III). 2) Formalization of sequential controller design in the resulting Kleisli category, which encodes mode switching as Kleisli composition (§IV). 3) Lifting of CBF certificates to sub-monads, a characterization of when Kleisli composition fails, and a sufficient condition for compositional safety. The condition is a common sub-monad, realized by a smooth intersection CBF with an explicit margin (§V). 4) A closed-form Bernoulli model for the naive failure rate, which treats each Kleisli handoff as an independent trial. The sub-monad mismatch structure of §V motivates this decomposition. We validate the model over 3,000 randomized instances with phase counts and barrier counts . The same sweep shows the standard simultaneousconstraint QP baseline degrading under constraint conflict as grows (§VI). 5) Numerical instantiation on two use cases, a four-mode piecewise-affine (PWA) system and a unicycle reduced-order model on heterogeneous terrain (§VII).
Related work. The categorical treatment of open dynamical systems via polynomial functors and lenses is developed in [11]. Section 2.3 of that work uses Kleisli composition explicitly as a systems-composition language. We specialize to Filippov systems and add safety-certificate lifting, which does not appear there. The hybrid monad of [12], [13] uses the same Moore-path construction for strictly associative hybrid composition. Its authors use it to define the meaning of loops in hybrid programs. They do not address safety certificates or controller design (see Remark 3.1). The sheaf-theoretic formulation of [15] offers a complementary account of dynamical-system composition. The smooth Boolean CBF compositions of [3], [16] and the softmin barrier analysis of [17] are the engineering tools we embed into the monadic framework. We recover their safety guarantee from sub-monad closure (Theorem 5.4).
Preliminaries
System Model and Filippov Regularity
Let be a smooth manifold of dimension representing the state space. Consider the control-affine system
where and , with the tangent bundle of . We assume and are locally bounded and measurable, and locally Lipschitz away from finitely many switching surfaces. The input set is compact and convex. The dynamics may switch discontinuously, e.g., at contact events or in variable-structure control. The right-hand side of (1) then need not admit a classical solution. We instead model such behavior via the Filippov differential inclusion [18], [19]
Here denotes the closed convex hull, and is the ball of radius about in local coordinates. The inner intersection ranges over all Lebesgue-null sets . Where and are continuous, reduces to the set of control-reachable velocities . On a switching surface, it also convexifies the velocities of the adjacent modes. This is what admits absolutely continuous solutions across the switch.
Assumption 2.1 (Filippov regularity [18]): The set-valued map is upper-semicontinuous with nonempty compact convex values everywhere on . Assumption 2.1 holds for (2) whenever and are locally bounded and measurable and is compact and convex [19]. It therefore holds for all PWA systems with box input sets. Under Assumption 2.1, Filippov’s theorem guarantees that a solution exists on some from every . The solution need not be unique.
Control Barrier Functions
Let be a continuously differentiable function and let be the corresponding safe set.
Definition 2.1 (Control Barrier Function [20]): A function is a Control Barrier Function (CBF) for system (1) if some extended class- function satisfies
for all . An extended class- function is continuous and strictly increasing on all of , with .
If is a CBF, the CBF-QP safety filter
renders forward-invariant [20]. That is, implies for all . Here is a nominal (task-level) controller. Throughout, we take the linear choice with scalar gain , as in (3). This choice only fixes the implemented constraint. Our results in §III–§V use only forward invariance and hold for any extended class- function.
Categorical Preliminaries
We recall the minimal diffeology background used in §III, together with monads and Kleisli categories. See [21] and [11] for the general theories. Throughout, denotes composition of functors, natural transformations, or morphisms in an arbitrary category , as determined by context.
Definition 2.2 (Diffeology): A diffeology on a set plays the role for an arbitrary set that a smooth atlas plays for a manifold. It specifies which maps into , from open Euclidean domains, count as smooth. Formally, a diffeology assigns to every open (any ) a set of maps , called plots, with three properties. 1) Every constant map is a plot. 2) (Locality) If is an open cover and the restriction of to each is a plot, then itself is a plot. 3) (Smooth reparametrization) If is a plot and is smooth in the ordinary sense for open , then is a plot. A set together with a diffeology is a diffeological space.
Definition 2.3 (Smooth maps): A map between diffeological spaces is smooth if is a plot of for every plot of . Let be a subset that is not open. A map defined on is smooth if, around every point of , it extends to a smooth map on an open neighborhood in . We write Diff for the category of diffeological spaces with smooth maps as morphisms.
Every smooth manifold carries a canonical diffeology whose plots are the smooth maps in the usual sense. This assignment is a full and faithful embedding [21]. We use it to regard as an object of Diff without altering its manifold structure. Unlike Man, the category of smooth manifolds, is complete, cocomplete, and cartesian closed [21]. Section III uses these properties.
The following definitions are standard and are stated for a generic monad on an arbitrary category ; §III specializes and constructs the specific trajectory monad .
Definition 2.4 (Monad): A monad on a category is a triple . Here is an endofunctor, is a natural transformation called the unit, and is a natural transformation called the multiplication. They satisfy the left unit law , the right unit law , and the associativity law . The functor is the identity on , and is the identity natural transformation on , with components .
Definition 2.5 (Kleisli category): The Kleisli category of a monad on has the same objects as . A Kleisli morphism in is a morphism in . Two such morphisms and compose as
where denotes Kleisli composition.
Definition 2.6 (Sub-monad): A sub-monad of is a monad together with a monad morphism , which is a natural transformation commuting with units and multiplications. We say is a sub-monad of and write .
Running Examples
We consider two systems as use cases throughout the paper. Both satisfy Assumption 2.1, so the trajectory monad construction of §III applies to each.
Use Case I (four-mode PWA system). Let be the state. The system is with . The mode index is the quadrant of [22]. Each mode combines a contraction with a rotation, and the rotation direction alternates between adjacent quadrants. We use
and . The offsets are , , , and , so each offset points away from the origin into its own quadrant. This corresponds to and in (1). In the interior of each quadrant, the map (2) is . On the coordinate axes, it is the convex hull of the adjacent modes’ velocity sets. In both cases is a compact convex polytope.
Use Case II (modal unicycle reduced-order model). Let , where is the planar position and is the heading angle. The control input is , with forward speed and yaw rate . The unicycle reduced-order model (ROM) [23] has input matrix
We add terrain modes that make the plant a genuine Filippov system. The mode indexes the most binding of the three barriers of §VII, which represent flat ground, stepping stones, and a slope edge. The dynamics are with . The limits are , , and for , in m/s and rad/s. Only the stepping stones carry drift, m/s, while . This corresponds to and in (1).
The modes switch on the surfaces , where both the input set and the drift jump. The drift lies outside the span of unless the robot heads along the -axis. The velocity sets of mode 2 and its neighbors are then disjoint, so (2) convexifies across a genuine discontinuity. Assumption 2.1 holds because the drift is bounded and each is compact and convex. Cohen et al. [23] show that the unicycle ROM captures the safety-relevant navigation behavior of an 18-DOF quadruped.
The Trajectory Monad
Definition 2.5 presupposes a monad on the systems of interest. Before asking whether CBF certificates are preserved under sequential composition, we construct one. We write for this specific trajectory monad, to distinguish it from the generic monad of Definitions 2.4–2.6. The endofunctor sends each state to the trajectories it can generate. The unit regards a state as the trivial trajectory at that state. The multiplication flattens a trajectory of trajectories. It follows the initial points of the inner trajectories and then appends the last inner trajectory.
We construct in , the category of diffeological spaces [21]. The space of all admissible trajectories of (2) is infinite-dimensional and not itself a manifold. The category , by contrast, is complete, cocomplete, and cartesian closed, and it contains every smooth manifold as a full subcategory [21]. The state space therefore remains the finite-dimensional manifold of §II-A. Only needs the added generality.
The one genuine difficulty is associativity of concatenation. Suppose trajectories are parametrized on a fixed interval such as . Concatenating two of them then requires rescaling each by a factor of two. Concatenating a third depends on which pair is rescaled first. Associativity then holds only up to a reparametrizing homeomorphism, not as literal equality of functions. Moore trajectories keep their true duration instead of being rescaled onto a fixed interval. They give strict, on-the-nose associativity (§III-A).
Throughout, denotes this specific trajectory monad and its Kleisli category. Strictly speaking, acts on pairs , since contains only trajectories admissible for . It acts on smooth maps that send admissible trajectories of to admissible trajectories of [24]. We suppress from the notation.
Moore Trajectories and Strict Associativity
Definition 3.1 (Moore trajectory space): A Moore trajectory of duration in is a pair , where is absolutely continuous. That is, is
differentiable almost everywhere, its derivative lies in , the space of Lebesgue-integrable functions on , and . The trajectory monad object is the disjoint union over all durations
The endpoint map is . We equip with the functional diffeology. A map , with open and , is a plot iff the duration map is smooth and the evaluation map is smooth in the sense of Definition 2.3.
Consider two Moore trajectories and with . Their concatenation is defined by
The concatenation has duration . Durations are real numbers, so holds strictly as functions. Both sides have duration and agree on every sub-interval.
Remark 3.1 (Relation to the hybrid monad): The hybrid monad of [12], [13] pairs a duration with a path in a similar way, and our multiplication follows theirs. They use it for strictly associative iteration semantics of hybrid computation, in a deterministic setting. Our construction transfers it to Filippov-admissible trajectories on diffeological spaces. It also lifts safety certificates as sub-monadic structure (§V), which neither prior work does.
Unit and Multiplication
Definition 2.4 requires a unit and a multiplication in addition to the endofunctor. Having constructed , we define these two pieces next.
Definition 3.2 (Unit): The unit maps each state to the duration-zero constant trajectory at that state,
where is the trivial path.
Definition 3.3 (Multiplication): Let denote the initial point of a Moore trajectory. An element of is an outer Moore trajectory whose head path is admissible for . The multiplication follows the head path up to time and then appends the last inner trajectory,
The concatenation is well defined because the head path ends at . This is the multiplication of the hybrid monad of [12], transferred to Filippov-admissible trajectories.
Monad Laws
Having fixed , , and , it remains to check the monad laws, including naturality of and . For set-valued , naturality holds only under a regularity condition on . Filippov regularity (Assumption 2.1) supplies this condition.
For a map as above, define . By the chain rule for absolutely continuous curves, maps admissible trajectories of to admissible trajectories of .
Naturality of and means that such a map commutes with the unit (“doing nothing”) and with concatenation, as in (6). It certifies the monad structure does not depend on the choice of coordinates.
Theorem 3.4 (Monad laws): Under Assumption 2.1, is a monad on , and the following diagrams commute on the nose.
Proof: [Sketch] Unit laws. For , the head path has duration zero and returns . For , the head path is itself and the appended trajectory has duration zero. Associativity. For , both paths around the left square in (7) produce the same three segments in the same order. These are the heads of the heads of , the head path of , and the last inner trajectory of . Moore concatenation is strictly associative, so the two results agree as functions. Naturality. The map acts pointwise on paths, preserves durations, and commutes with head. It therefore commutes with and , which is exactly (6). □
The Kleisli Category as Controller Language
We now use the Kleisli category of to model controllers as morphisms and sequential execution as their composition. This gives the language in which §V states and proves compositional safety.
Apply Definition 2.5 to the trajectory monad , with in the role of the generic objects . A Kleisli morphism assigns to each initial state one admissible Moore trajectory. We call a Kleisli morphism a controller when it is rooted, i.e., , so that its trajectory starts where it is invoked. Every closed-loop system generates a rooted morphism, and the unit is rooted. For controllers and , Definition 3.3 gives
Indeed, since is rooted, the head path of is itself, and the appended trajectory is run from the endpoint. Kleisli composition is therefore sequential execution. We run , then run from where $\varphi stopped. The composite is again rooted, and by Theorem 3.4, is associative on the nose.
Diagram (8) shows Kleisli composition in .
Remark 4.1 (Prior uses of Kleisli composition for systems): Kleisli categories for dynamical systems appear in [14] and in Section 2.3 of [11]. What is new here is that the morphisms carry CBF safety certificates. A morphism , with the CBF sub-monad of §V, is a controller with a proven invariance guarantee. The sub-monad structure of §V is what makes these certificates composable.
CBF Sub-Monads and Compositional Safety
Kleisli composition models sequential execution, but it does not by itself preserve safety certificates. We now identify which Kleisli morphisms carry a safety guarantee. We then ask when composing two such morphisms preserves it.
Lifting CBF Certificates to Sub-Monads
Let be a CBF with safe set as in §II-B.
Definition 5.1 (CBF sub-monad): The CBF sub-monad associated to is
It collects the admissible Moore trajectories that never leave . Its unit is restricted to .
Proposition 5.2 (Sub-monad closure): The unit and multiplication of preserve . That is, , and maps into . Hence is a sub-monad of , and the inclusion is a monad morphism. Diagram (9) expresses the compatibility with multiplication.
Proof: For , the unit never leaves . Now let . Each lies in , so its head lies in and the head path never leaves . The appended trajectory also stays in . By the piecewise definition of concatenation, stays in throughout. Diagram (9) commutes by construction. □
Closure uses only the definition of , not the CBF property. The CBF property enters in Theorem 5.4. There it guarantees that the CBF-QP controller (3) generates a trajectory in from every . This is the viability of under (2) in the sense of [25].
Failure of Naive Composition
Proposition 5.3 (Naive composition fails): Let and be controllers certified for different safe sets . The Kleisli composite need not lie in . Diagram (10) shows why. The two controllers reach through two different inclusions, and no common sub-monad need contain the image.
Proof: Take with and . Let and . Let be the CBF-QP (3) for with and duration 2. From , the constraint never binds. The trajectory therefore reaches while remaining in . Any composite contains this segment and leaves . □
Compositional Safety via a Shared Sub-Monad
Proposition 5.3 is avoided if all phase controllers map into the same sub-monad. We achieve this with a smooth intersection of the individual CBFs, a known construction [3, 16, 17]. We add an explicit margin to it.
Let be CBFs with safe sets . For a smoothing parameter , the smooth minimum (softmin) of the barriers is . The shifted intersection CBF is , with margin .
Remark 5.1 (The margin and its role): The classical log-sum-exp bound [17] gives . The upper bound yields . In continuous time, every controller certified by thus lands in a sub-monad of . The margin strengthens this to on . By the lower bound, on the boundary , so the choice at most doubles the inherent softmin gap. The margin matters in implementation. Our controllers are sampled-data with zero-order hold, and the continuous-time CBF guarantee does not transfer exactly to this setting [26]. The margin absorbs this inter-sample drift at our step sizes. Deriving from a sampled-data bound as in [26] would make this rigorous.
Theorem 5.4 (Compositional safety): Let be CBF-QP controllers (3) designed with the shifted intersection CBF . Their nominal controllers may differ. Assume is a CBF for (1) (Definition 2.1). Then every with satisfies
Diagram (11) shows the composition chain.
Proof. Since is a CBF, each keeps trajectories inside when started there [20]. Each such trajectory is an element of . Every handoff state is the endpoint of such a trajectory, so it also lies in . Each phase therefore starts where its certificate applies. By Proposition 5.2, is closed under . The Kleisli composite thus lands in , as in diagram (11). Finally, Remark 5.1 gives , and the inclusion completes the proof. □
■
Theorem 5.4 gives a sufficient condition. Controllers in different sub-monads may still compose safely from particular initial states, as the nonzero Naive safety rates in §VI show. The hypothesis that is a CBF is not automatic under input bounds [5], [17]. We monitor it empirically through QP feasibility.
Remark 5.2 (Automatic activation): At state , the CBF-QP constraint imposed by is . The softmin weights are . Let index the most binding barrier at . When for all , the weight approaches . The constraint then concentrates on the most binding barrier without any scheduling logic. This lazy activation, observed in [3], [17], is a property of the softmin gradient. The sub-monad view adds that it needs no coordination across phases, since every phase controller enforces the same constraint.
Statistical Validation
We compare three strategies. Naive has phase enforce only , with , so successive controllers land in different sub-monads (Proposition 5.3). Global enforces all barriers as hard constraints in one QP [5], [20] and lands in whenever that QP is feasible. Monadic enforces the single constraint and lands in (Theorem 5.4). Inputs are two-dimensional, so we solve each QP exactly by enumerating its candidate minimizers. If none is feasible, the saturated nominal input is applied, which is what exposes Global to violations. Proposition 5.3 shows that Naive composition can fail, and Theorem 5.4 shows that Monadic composition cannot. Neither result says how often Naive fails. We now quantify this failure probability (§VI-A) and validate all three strategies over a randomized sweep (§VI-B).
Bernoulli Failure Model
Under Naive, phase enforces only . By forward invariance, the trajectory stays in throughout phase . Nothing constrains the other barriers. At time , the handoff passes a state certified only for to a controller certified only for . Proposition 5.3 identifies these handoffs as the source of the sub-monad mismatch. This motivates modeling each handoff as a separate trial.
Lemma 6.1 (Bernoulli failure model): For , let be the event that the Naive trajectory leaves during phase , i.e., after handoff . Assume that phase 1, which starts from , is jointly safe. The Naive trajectory is then jointly safe iff occurs. Suppose are mutually independent with common probability . Then
This has two consequences. 1) If , then geometrically in . 2) The index of the first failing handoff has mean . The expected number of safe handoffs before the first failure is therefore .
Proof: By independence, . This gives (12) and claim 1. The index of the first failing handoff is geometric with success probability , so its mean is . Excluding the failing handoff itself gives claim 2. □
■
Remark 6.1 (Geometric interpretation of ): Independence and a common are modeling assumptions that we impose and then test empirically. They are plausible when each phase nearly converges to its CLF target before the handoff, which decorrelates successive handoff states. They are also plausible when barriers are drawn i.i.d., as in the sweep below. We test them empirically in §VI-B, where any residual phase-1 failures are absorbed into the fitted . Suppose further that the handoff state is roughly uniform on . A first-order estimate is then . This is the fraction of the active safe set that lies outside the joint safe set. Adding a barrier can only shrink , so the estimate is nondecreasing in . This agrees with the fits reported below.
Randomized Sweep
Setup. We sweep with instances per cell, 3,000 in total, on the modal ROM of Use Case II. Each instance draws random ellipses, corridors, or half-planes, an initial state with , and waypoints inside . Phases last 2 s, and the final phase lasts 4 s. We use , , and s. A run is safe if throughout. We fit by nonlinear least squares.
Results. Figure 1 summarizes the sweep. The fitted values for increase monotonically with (Remark 6.1). Naive drops to single digits by for every . Monadic achieves 100% on every cell, as Theorem 5.4 guarantees.
Figure 1. Randomized sweep over random CBF geometries per cell, with and . (A) Naive safety rate versus phase count for each barrier count . Dashed curves show the fitted Bernoulli model , and shaded regions show standard errors. The fitted increases monotonically with (Remark 6.1). (B)–(D) Safety rate over the full grid for Naive, Global, and Monadic. Naive collapses exponentially with . Global degrades under constraint conflict as grows, despite being the exact simultaneous-QP baseline. Monadic achieves 100% on all 20 cells, as Theorem 5.4 guarantees.
Panel (C) shows a failure mode that our framework does not capture. Global degrades as and grow, reaching 58% at , . When the constraint normals conflict in the two-dimensional input space, the QP becomes infeasible and Global falls back to the nominal input. This does not contradict Theorem 5.4. Sub-monad membership presupposes that a certified controller exists, and Global lands in only while its QP is feasible. Input-constrained compatibility conditions [5], [6] address exactly this existence question. Softmin composition does not guarantee Monadic feasibility in general [17], yet Monadic remained safe in all 3,000 instances. Building feasibility into the sub-monad condition itself is an open question.
Use Cases
We have established the categorical account and quantified how reliably it avoids the failure mode of naive composition. We now demonstrate the three strategies of §VI on two concrete robotic systems.
Both use cases compare three composition strategies. Naive has each phase controller enforce only the single barrier , placing controllers in different sub-monads (Proposition 5.3). Global [1] enforces all barriers as separate hard QP constraints at every step, giving a shared sub-monad at the cost of constraints per step. Monadic uses a single constraint, giving the shared sub-monad of Theorem 5.4 with one constraint per step. All CBF-QPs are solved with Gurobi at 50 Hz.
Use Case I: Four-Mode PWA System
Setup. We use three safe sets, the ellipse , the corridor , and the half-plane . Four phases of take the state from in mode 2 to the goal in mode 4 under a saturated proportional nominal law. We use , , forward Euler with , and runs with initial states perturbed by .
Failure mechanism. The phase-1 target lies near the left corridor wall, where the mode-2 drift points left. Naive enforces only in phase 1, so the drift carries past before the first handoff. A controller in thus need not lie in .
Results. Naive violates safety in 78% of runs. Monadic matches the 100% safety of Global with one constraint per step instead of three. It also keeps a larger margin, versus , consistent with . Figure 2 shows a representative rollout.
Figure 2. Four-mode PWA system, one representative rollout. Naive (red) exits near the mode-2/mode-3 transition. Global (green) and Monadic (blue) remain safe throughout. Line style shows the plant mode , which switches as the trajectory crosses quadrants. Distances are for this single rollout, not the Monte Carlo averages.
Use Case II: Unicycle ROM on Heterogeneous Terrain
Setup. The ROM of Use Case II crosses a Rocky Terrain Traverse in four phases of . It must respect the ellipsoidal margin , the stepping-stone corridor , and the cliff . A proportional nominal controller drives to phase targets inside , at constant speed in phases 1 to 3. We use , , , and runs.
Failure mechanism. The heading carries across each handoff. Naive enforces , , , and in turn, so nothing constrains the cliff in phases 2 and 4. Near and , the inherited heading carries the robot across (Figure 3). The composite lands in but not in .
Figure 3. Rocky Terrain Traverse, one representative rollout. Naive (red) loops through mode near the handoffs and and crosses the cliff boundary . Global (green) and Monadic (blue) remain within and reach the goal. Distances are for this single rollout, not the Monte Carlo averages.
Results. Naive is never safe, with . Monadic matches the 100% safety of Global with one constraint per step. Its margins, and , exceed . Global’s margins are only and .
Results. Naive achieves 0% safety, with . This is a structural, not marginal, violation, confirming Proposition 5.3. Monadic matches Global safety at 100% with one QP constraint per step. The Monadic minimum margins, and , are both tightly consistent with the theoretical lower bound . This validates that the controller is conservative by exactly the shift of Remark 5.1, no more and no less. Global, by contrast, attains margins only marginally above zero, and . Monadic therefore achieves the same safety guarantee with quantified, structural conservatism rather than incidental margin.
Conclusion
We constructed the trajectory monad for Filippov-regular differential inclusions. We showed that CBF certificates lift to sub-monads, so controllers that land in a common sub-monad compose safely. Naive phase-by-phase composition fails because successive controllers land in different sub-monads. This mismatch is localized at each Kleisli handoff. It motivates a closed-form Bernoulli failure model, which we validated over 3,000 randomized instances. A smooth intersection CBF with an explicit margin places all phase controllers in one shared sub-monad, with one QP constraint per step. It achieved 100% safety in the sweep and on both use cases. The standard simultaneous-constraint baseline, in contrast, degraded under constraint conflict as the barrier count grew. Future work includes incorporating QP feasibility into the sub-monad condition, a sampled-data derivation of the margin, and Eilenberg–Moore algebras of , which we conjecture to be Lyapunov certificates. We also plan hardware validation on a Unitree Go2 quadruped.
References
- [1]P. Glotfelter, J. Cortés, and M. Egerstedt, “Nonsmooth barrier functions with applications to multi-robot systems,” IEEE Control Systems Letters, vol. 1, no. 2, pp. 310–315, 2017.
- [2]P. Glotfelter, I. Buckley, and M. Egerstedt, “Hybrid nonsmooth barrier functions with applications to provably safe and composable collision avoidance,” IEEE Robotics and Automation Letters, vol. 4, no. 2, pp. 1303–1310, 2019.DOI
- [3]T. G. Molnár and A. D. Ames, “Composing control barrier functions for complex safety specifications,” IEEE Control Systems Letters, vol. 7, pp. 3615–3620, 2023, arXiv:2309.06647.arxiv.org/abs/2309.06647
- [4]P. Ong, H. Lee, T. G. Molnar, D. Panagou, and A. D. Ames, “Combinatorial control barrier functions: Nested boolean and p-choose-r compositions of safety constraints,” arXiv preprint arXiv:2509.10716, 2025.DOI
- [5]J. Breeden and D. Panagou, “Compositions of multiple control barrier functions under input constraints,” in American Control Conference (ACC), 2023, pp. 3688–3695.arxiv.org/abs/2210.01354
- [6]X. Tan and D. V. Dimarogonas, “Compatibility checking of multiple control barrier functions for input constrained systems,” in IEEE Conference on Decision and Control (CDC), 2022, pp. 939–944.arxiv.org/abs/2209.02284
- [7]R. R. Burridge, A. A. Rizzi, and D. E. Koditschek, “Sequential composition of dynamically dexterous robot behaviors,” The International Journal of Robotics Research, vol. 18, no. 6, pp. 534–555, 1999.DOI
- [8]A. Majumdar and R. Tedrake, “Funnel libraries for real-time robust feedback motion planning,” The International Journal of Robotics Research, vol. 36, no. 8, pp. 947–982, 2017.arxiv.org/abs/1601.04037
- [9]A. Saoud, A. Girard, and L. Fribourg, “Assume-guarantee contracts for continuous-time systems,” Automatica, vol. 134, p. 109910, 2021.DOI
- [10]J. Moeller and A. D. Ames, “Hybrid systems as coalgebras: Lyapunov morphisms for Zeno stability,” arXiv preprint, vol. arXiv:2604.05255, 2026.arxiv.org/abs/2604.05255
- [11]D. J. Myers, Categorical Systems Theory. Topos Institute, 2022, book draft, https://topos.site.
- [12]S. Goncharov, R. Jakob, and R. Neves, “A semantics for hybrid iteration,” in 29th International Conference on Concurrency Theory (CONCUR), ser. LIPIcs, vol. 118, 2018, pp. 22:1–22:17, arXiv:1807.01053.DOI
- [13]S. Goncharov and R. Neves, “An adequate while-language for hybrid computation,” in 21st International Symposium on Principles and Practice of Declarative Programming (PPDP), 2019, arXiv:1902.07684.arxiv.org/abs/1902.07684
- [14]B. Jacobs, “Coalgebraic specifications and models of deterministic hybrid systems,” in Eighth International Conference on Algebraic Methodology and Software Technology (AMAST), ser. LNCS, vol. 1101, 1996, pp. 237–251.DOI
- [15]P. Schultz, D. I. Spivak, and C. Vasilakopoulou, “Dynamical systems and sheaves,” Applied Categorical Structures, vol. 28, pp. 1–57, 2020.arxiv.org/abs/1609.08086
- [16]L. Lindemann and D. V. Dimarogonas, “Controller barrier functions for signal temporal logic tasks,” IEEE Control Systems Letters, vol. 3, no. 1, pp. 96–101, 2019.DOI
- [17]P. Rabiee and J. B. Hoagg, “Soft-minimum barrier functions for safety-critical control subject to actuation constraints,” arXiv preprint, vol. arXiv:2304.00693, 2023.DOI
- [18]A. F. Filippov, Differential Equations with Discontinuous Righthand Sides. Springer, 1988.
- [19]J. Cortés, “Discontinuous dynamical systems: A tutorial on solutions, nonsmooth analysis, and stability,” IEEE Control Systems Magazine, vol. 28, no. 3, pp. 36–73, 2008.DOI
- [20]A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath, and P. Tabuada, “Control barrier functions: Theory and applications,” in European Control Conference (ECC), 2019, pp. 3420–3431.arxiv.org/abs/1903.11199
- [21]P. Iglesias-Zemmour, Diffeology. American Mathematical Society, 2013, vol. 185.
- [22]C. Belta, B. Yordanov, and E. Aydin Gol, Formal Methods for Discrete-Time Dynamical Systems. Springer, 2017.
- [23]M. H. Cohen, T. G. Molnár, and A. D. Ames, “Safety-critical control for autonomous systems: Control barrier functions via reduced-order models,” Annual Reviews in Control, vol. 57, p. 100947, 2024.DOI
- [24]P. Tabuada, Verification and Control of Hybrid Systems: A Symbolic Approach. Springer, 2009.DOI
- [25]J.-P. Aubin, Viability Theory. Boston: Birkhäuser, 1991.
- [26]J. Breeden, K. Garg, and D. Panagou, “Control barrier functions in sampled-data systems,” IEEE Control Systems Letters, vol. 6, pp. 367–372, 2022.DOI


