alphaFeedback

WorksMathematics

Safety of layered control systems via control barrier morphisms

AI contributions
Not recorded for this paper
View details

Abstract

Layered control architectures provide a powerful paradigm for synthesizing controllers for complex systems. Yet, translating guarantees at each layer to system-level guarantees is challenging due to the interactions between layers. To address this problem, this paper presents a categorical perspective on layered control architectures. Individual systems are represented as control coalgebras, their interactions are specified as morphisms to mediators, and system-level behaviors are obtained via composition defined categorically as a pullback. To analyze the safety of these systems, we formulate control barrier morphisms (CBMs), the categorical generalization of control barrier functions. We prove that feedback controllers satisfying a CBM condition render the associated safe subobject forward invariant. It is through CBMs that we can establish the safety of layered systems: given a CBM at each layer subject to compatibility conditions, the universal property of the pullback implies the existence of a CBM for the composed system. Safety of a full-order model being safety filtered by a reduced-order model is recovered as a specialization of the categorical framework.

A classic layered control architecture represented categorically

Figure 1. A classic layered control architecture represented categorically, for which the closed loop system is the pullback. Each layer has an associated control barrier morphism, and the universal property of the pullback implies the existence of a control barrier morphism for the layered architecture.

Introduction

Layered control architectures allow complex systems to be controlled through simpler models [1], [2]. A canonical example is the “planner-tracker” paradigm, where a planning (or safety) layer computes a reference using a reduced-order model, while a low-level controller on the full-order model tracks this reference signal. These architectures have the advantage of decomposing control problems into simpler subproblems that are tractable, but also introduce a question that cannot be answered by analyzing either layer in isolation: when does a guarantee established on the reduced-order model remain valid on the full-order model? This question has increased in importance due to the need to establish safety guarantees for highly dynamic robotic systems.

The problem of identifying architectures has been investigated frequently over the years from a variety of perspectives, including: aggregation [3], hierarchies [4], supervision [5], behavioral interconnection [6], and symbolic abstractions [7], to name a few. More recent approaches formulate layered architectures through contracts [8], [9] and multi-rate control [10]. These complementary perspectives indicate the fundamental nature of control architectures, and the need to make guarantees for complex systems by studying constituent components and their interactions. This paper studies layered architectures from the perspective of safety utilizing the framework of category theory, enabling us to determine how the safety of layered control architectures can be established from the safety of individual layers and their interactions.

The authors are with the California Institute of Technology, Pasadena CA 91125, U.S.A. { ames, jmoeller, mdesa}@caltech.edu and UCLA, Los Angeles CA 90095-1594, [email protected].

This research is funded by the AFOSR SCHEMA CoE and MURI grant Hybrid Dynamics - Deconstruction and Aggregation (HyDDRA).

As an illustration of the results in this paper, consider Figure 2 where a Control Barrier Function (CBF)-based safety filter [11], designed for a Reduced Order Model (RoM), is implemented in a Full Order Model (FoM) via an existing tracking controller. The safety filter utilizes a CBF on the RoM to transform a desired input signal into an input signal that guarantees safety. The FoM realizes the input via a tracking controller, introducing tracking error. Prior results combine the RoM barrier with tracking guarantees on the FoM to obtain a safety guarantee for the FoM [12], [13]. This paradigm provides a starting point for building a theory of composition that yields safety guarantees.

Layered safety architecture

Figure 2. A layered safety architecture: a reduced-order model is used to synthesize a safe controller, κsafe\kappa_{\mathrm{safe}}, which is fed to a full-order model as a reference v=κsafe(Π(x))v=\kappa_{\mathrm{safe}}(\Pi(x)) that is tracked, where Π\Pi is the state projection. The goal is to guarantee safety on the full-order model: h(Π(x))≥0h(\Pi(x))\geq0.

Category theory gives a natural language in which to reason about the composition. Coalgebras provide a general formulation for systems and their structure-preserving maps [14]. Pullbacks describe heterogeneous composition of tagged systems [15] and nonlinear feedback interconnection [16]. Diagrams allow for the interconnection of open dynamical systems [17], for hybrid systems to be composed [18], and for the composition of Lyapunov certificates via assume-guarantee reasoning [19]. This paper explores categorical composition through the lens of safety.

The first contribution of this paper is a categorical formulation of CBFs. To this end, we generalize control systems to a categorical setting by modeling them as coalgebras. Taking inspiration from categorical Lyapunov theory [20], [21], we formulate a control barrier morphism (CBM) as a map from a control coalgebra to a target comparison system. The collection of safe actions is represented by the admissible locus of a CBM. The existence of a feedback controller (section) of the admissible locus yields a closed loop system that is safe: it renders a subobject defined by the CBM forward invariant.

The second contribution is to frame composition as the categorical pullback. This endows composition with a universal property. Given two control systems, their interaction is framed as morphisms to a mediator, and the interconnected system is the pullback. The universal property of the pullback together with barrier morphisms enables the main result: given CBMs on each system that agree on the mediator, the result is a CBM for the composed system implying safety of a subobject. We apply this result to the motivating problem: a CBF-safety filter utilizing a RoM and tracked by a FoM, thus demonstrating that specialization of the main result leads to a CBF guaranteeing safety of the layered architecture. Importantly, the CBF for the layered system emerges as a consequence of the categorical framework, rather than from heuristic constructions, demonstrating its value.

Motivation: Layered Safety Filters

Consider a layered architecture (cf. Figure 2) consisting of a reduced-order model (RoM) and full-order model (FoM):

RoM

z˙=fR(z,ν):=f(z)+g(z)ν,\dot{z}=f_{\mathrm{R}}(z,\nu):=f(z)+g(z)\nu,

FoM

x˙=fF(x,v),(1)\dot{x}=f_{\mathrm{F}}(x,v), \tag*{(1)}

where the states zz and xx range over open subsets Z⊆RnzZ\subseteq\mathbb{R}^{n_z} and X⊆RnxX\subseteq\mathbb{R}^{n_x}, and the inputs ν\nu and vv range over Uν=RmU_\nu=\mathbb{R}^m and Uv=RmU_v=\mathbb{R}^m, respectively. We keep separate names for the two input spaces, even though they coincide, because the safety filter in Section V treats them as distinct interfaces. The inputs to the RoM and FoM have the same dimension because we are implicitly assuming that fFf_{\mathrm{F}} is obtained from the “true” dynamics of the system, x˙=F(x)+G(x)u\dot{x}=F(x)+G(x)u together with a tracking controller u=K(x,v)u=K(x,v) wherein fF(x,v)=F(x)+G(x)K(x,v)f_{\mathrm{F}}(x,v)=F(x)+G(x)K(x,v). Based on the inputs ν\nu of the RoM and the state xx of the FoM, the tracking controller forces the FoM to converge to the RoM’s behavior.

The RoM and FoM are coupled by a safety filter. Given the state projection Π:X→Z\Pi:X\to Z and a safety function h:Z→Rh:Z\to\mathbb{R} the safe set for the FoM is given by:

C={x∈X:h(Π(x))≥0}.(2)\mathcal{C}=\{x\in X:h(\Pi(x))\geq0\}. \tag*{(2)}

We assume that hh is a control barrier function (CBF) for the RoM, with the corresponding CBF-QP safety filter:

κsafe(z)=arg⁡min⁡ν∈Uν12∥ν−νdes(z)∥2\kappa_{\mathrm{safe}}(z)=\underset{\nu\in U_\nu}{\arg\min}\quad\frac{1}{2}\lVert\nu-\nu_{\mathrm{des}}(z)\rVert^2
s.t.Lfh(z)+Lgh(z)ν≥−αh(z)+∥Lgh(z)∥24γρ.(3)\text{s.t.}\quad L_fh(z)+L_gh(z)\nu\geq-\alpha h(z)+\frac{\lVert L_gh(z)\rVert^2}{4\gamma\rho}. \tag*{(3)}

with α>0\alpha>0 (taken to be a constant for simplicity, although a K∞e\mathcal{K}_{\infty}^{e} function would also be possible), Lfh=Dh fL_fh=Dh\,f and Lgh=Dh gL_gh=Dh\,g are the Lie derivatives, and the normed squared term is for robustness. In the layered architecture, the safe controller is passed to the FoM via the tracking controller, i.e., setting the reference velocity to v=κsafe(Π(x))v=\kappa_{\mathrm{safe}}(\Pi(x)) wherein:

x˙=fcl(x):=fF(x,κsafe(Π(x))).(4)\dot{x}=f_{\mathrm{cl}}(x):=f_{\mathrm{F}}(x,\kappa_{\mathrm{safe}}(\Pi(x))). \tag*{(4)}

The goal is safety of the FoM, i.e., to keep the state of the system within C\mathcal{C}. To this end, consider the FoM tracking error associated with the reference v=κsafe(Π(x))v=\kappa_{\mathrm{safe}}(\Pi(x)):

e(x)=Ψ(x)−κsafe(Π(x))e(x)=\Psi(x)-\kappa_{\mathrm{safe}}(\Pi(x))

where Ψ:X→Uv\Psi:X\to U_v is the input projection. That is, the error is the difference between the “actual velocity” of the system projected to the RoM input space via Ψ\Psi and the “desired velocity” encoded by κsafe\kappa_{\mathrm{safe}}.

A tracking function VV quantifies the ability of the FoM to bound this error via the assumptions:

tracking function:V(x)≥ρ∥e(x)∥2,tracking dynamics:V˙≤−λV,barrier dynamics:b˙≥−αb−γV.(5)\begin{aligned} \text{tracking function:}\quad&V(x)\geq\rho\lVert e(x)\rVert^2,\\ \text{tracking dynamics:}\quad&\dot{V}\leq-\lambda V,\\ \text{barrier dynamics:}\quad&\dot{b}\geq-\alpha b-\gamma V. \tag*{(5)} \end{aligned}

for b:=h∘Πb:=h\circ\Pi and γ,ρ>0\gamma,\rho>0. These assumptions can be used to define the composite barrier function for the FoM:

H(x):=(λ−α)b(x)−γV(x).H(x):=(\lambda-\alpha)b(x)-\gamma V(x).

The main result of [12] is that if λ>α\lambda>\alpha:

H(c(0))≥0⟹c(t)∈C∀t∈I(6)H(c(0))\geq0\qquad\Longrightarrow\qquad c(t)\in\mathcal{C}\quad\forall t\in I \tag*{(6)}

where c:I=[0,tf)⊆R→Xc:I=[0,t_f)\subseteq\mathbb{R}\to X is a solution: c˙=fcl(c(t))\dot{c}=f_{\mathrm{cl}}(c(t)). Therefore, starting from a reduced set of initial conditions defined by the zero superlevel set of HH, the state remains within C\mathcal{C} and, therefore, the FoM is safe. These ideas were generalized in [22] to bounded tracking and in [13] to predictive CBFs. See [23] for a notion of robust CBF, generalizing input-to-state safety used in [12]. This paper will demonstrate in Section V that this result is a natural consequence of categorical composition theory.

Control Barrier Morphisms

Categorical Lyapunov theory [20, 21] generalized Lyapunov theory to a broad class of “systems” by leveraging coalgebras. We build upon this framework and refer the reader to these papers for the background content needed. Importantly, this paper extends categorical Lyapunov theory to “control systems” through the introduction of control coalgebras. We leverage this to generalize safety-critical control to a categorical setting: defining control barrier morphisms (generalizing CBFs categorically) that imply forward invariance of a subobject (via a categorical Nagumo theorem).

Consider a category C\mathcal{C} with finite products and terminal object 11. A point of BB is a map x:1→Bx:1 \to B, and !X:X→1!_{X}:X \to1 denotes the unique map to the terminal object. In the remainder of the paper we will use F:C→C\mathcal{F}:\mathcal{C}\to\mathcal{C} to denote a functor and π:F⇒id⁡C\pi:\mathcal{F}\Rightarrow\operatorname{id}_{\mathcal{C}} to denote a natural transformation from F\mathcal{F} to the identity functor on C\mathcal{C}.

Systems, inputs, and feedback

A coalgebra is a morphism f:B→FBf:B\to\mathcal{F}B. This generalizes “systems,” e.g., a smooth vector field x˙=f(x)\dot{x}=f(x) is a TT-coalgebra f:M→TMf:M\to TM where TT is the tangent bundle functor on C=Man⁡\mathcal{C}=\operatorname{Man}, manifolds with boundary. Control coalgebras generalize this to include inputs.

Definition 1 (Control coalgebra). Let C\mathcal{C} be a category with finite products, F:C→C\mathcal{F}:\mathcal{C}\to\mathcal{C} be an endofunctor, and π:F⇒id⁡C\pi:\mathcal{F}\Rightarrow\operatorname{id}_{\mathcal{C}} a natural transformation. A control coalgebra, denoted by P=(p:E→B,f)\mathbf{P}=(p:E\to B,f), consists of (i) a base object B∈CB\in\mathcal{C} called the state space (ii) a bundle p:E→Bp:E\to B called the control bundle (iii) a bundle map f:(p:E→B)→(πB:FB→B)f:(p:E\to B)\to(\pi_{B}:\mathcal{F}B\to B), i.e., a map f:E→FBf:E\to\mathcal{F}B called the control system, such that πB∘f=p\pi_{B}\circ f=p as illustrated by the commutative diagram:

E→fFBp↓↓πBB=B\begin{CD} E @>f>> \mathcal{F}B\\ @VpVV @VV\pi_{B}V\\ B @= B \end{CD}

A morphism of control coalgebras ϕ=(ϕB,ϕE):P→P′\phi=(\phi^{B},\phi^{E}):\mathbf{P}\to\mathbf{P}' consists of maps ϕB:B→B′\phi^{B}:B\to B' and ϕE:E→E′\phi^{E}:E\to E' with:

p′∘ϕE=ϕB∘p,f′∘ϕE=FϕB∘f.(7)p'\circ\phi^{E}=\phi^{B}\circ p,\qquad f'\circ\phi^{E}=\mathcal{F}\phi^{B}\circ f. \tag*{(7)}

These objects and maps form the category Ctrl⁡F(C)\operatorname{Ctrl}_{\mathcal{F}}(\mathcal{C}).

A feedback controller is a section k:B→Ek:B\to E, i.e., p∘k=id⁡Bp\circ k=\operatorname{id}_{B}. It produces the autonomous system fcl=f∘k:B→FBf_{\mathrm{cl}}=f\circ k:B\to\mathcal{F}B as illustrated by a commutative diagram:

E→fFBk↑↑πBB→fcl:=f∘kFB\begin{CD} E @>f>> \mathcal{F}B\\ @A k AA @AA\pi_{B}A\\ B @>f_{\mathrm{cl}:=f\circ k}>> \mathcal{F}B \end{CD}

Autonomous systems are the control coalgebras with p=id⁡Bp=\operatorname{id}_{B}, i.e., (id⁡B:B→B,fcl)(\operatorname{id}_{B}:B\to B,f_{\mathrm{cl}}), and therefore satisfy πB∘fcl=id⁡B\pi_{B}\circ f_{\mathrm{cl}}=\operatorname{id}_{B}.

Example 1 (Continuous-time control systems). For C=Man⁡\mathcal{C}=\operatorname{Man} and F=T\mathcal{F}=T, the tangent bundle functor, the natural projection is πM:TM→M\pi_{M}:TM\to M. In the case that E=M×UE=M\times U and p=pMp=p_{M}, a control coalgebra is illustrated by:

M×U→fTMk↑↑πMM→fcl:=f∘kTM\begin{CD} M\times U @>f>> TM\\ @A k AA @AA\pi_{M}A\\ M @>f_{\mathrm{cl}:=f\circ k}>> TM \end{CD}

In local coordinates, we recover the classical notions:

  • control system: x˙=f(x,u)\dot{x}=f(x,u) for u∈Uu\in U,

  • feedback controller: k(x)=(x,κ(x))k(x)=(x,\kappa(x)),

  • closed-loop system: fcl(x)=f(x,κ(x))f_{\mathrm{cl}}(x)=f(x,\kappa(x)).

Let TT be a time object in C\mathcal{C}, i.e., an object equipped with a distinguished point 0T:1→T0_{T}:1\to T. Following [24], consider a collection of intervals II consisting of subobjects l:I↪Tl:I\hookrightarrow T with initial point 0I:1→I0_{I}:1\to I satisfying ι∘0I=0T\iota\circ0_{I}=0_{T}. On these intervals, a unit clock 1I:I→FI1_{I}:I\to\mathcal{F}I is a system with πI∘1I=id⁡I\pi_{I}\circ1_{I}=\operatorname{id}_{I}. A solution of an autonomous system fcl:B→FBf_{\mathrm{cl}}:B\to\mathcal{F}B is a map c:I→Bc:I\to B satisfying1:

\begin{CD} I @>c>> B\\ @V1_{I}VV @VVf_{\mathrm{cl}}V\\ \mathcal{F}I @>\mathcal{F}c>> \mathcal{F}B \end{CD} \qquad\Longleftrightarrow\qquad \mathcal{F}c\circ1_{I}=f_{\mathrm{cl}}\circ c \tag*{(8)}\end{CD}

For Example 1, T=RT=\mathbb{R}, I=[0,tf)⊂RI=[0,t_{f})\subset\mathbb{R} with tf>0t_{f}>0, ιI(t)=(t,1)\iota_{I}(t)=(t,1) and (8) implies that c˙(t)=fcl(c(t))\dot{c}(t)=f_{\mathrm{cl}}(c(t)).

Lax equalizers, barrier morphisms and safe subobjects

Definition 2 (Orders). An object R∈CR\in\mathcal{C} is preordered if, for every object X∈CX\in\mathcal{C}, the hom-set C(X,R)\mathcal{C}(X,R) is equipped with a preorder, f1≤f2f_{1}\le f_{2}, and precomposition is order-preserving: if g1≤g2:Y→Rg_{1}\le g_{2}:Y\to R and f:X→Yf:X\to Y, then g1∘f≤g2∘fg_{1}\circ f\le g_{2}\circ f. A preordered object RR is posetal if the preorder on C(X,R)\mathcal{C}(X,R) is antisymmetric: f1≤f2f_{1}\le f_{2} and f2≤f1f_{2}\le f_{1} implies f1=f2f_{1}=f_{2}.

This notion of preordered objects allows for the formulation of lax equalizers defined via a universal property.

Definition 3 (Lax equalizers). Let RR be preordered. The lax equalizer of a pair of maps a,b:X→Ra,b:X\to R is an object Eq⁡≤(a,b)\operatorname{Eq}^{\leq}(a,b) and map e:Eq⁡≤(a,b)→Xe:\operatorname{Eq}^{\leq}(a,b)\to X satisfying:

Eq⁡≤(a,b)→eXe↓↓bX→aR⟺a∘e≤b∘e,\begin{CD} \operatorname{Eq}^{\leq}(a,b) @>e>> X\\ @V e VV @VV b V\\ X @>a>> R \end{CD} \qquad\Longleftrightarrow\qquad a\circ e\leq b\circ e,

such that for every q:Q→Xq:Q\to X,

a∘q≤b∘q⟺∃!u:Q→Eq⁡≤(a,b) with e∘u=q.(9)a\circ q\leq b\circ q\quad\Longleftrightarrow\quad\exists!u:Q\to\operatorname{Eq}^{\leq}(a,b)\text{ with }e\circ u=q. \tag*{(9)}

For a set XX with a,b:X→Ra,b:X\to\mathbb{R}, the lax equalizer is Eq⁡≤(a,b)={x∈X:a(x)≤b(x)}\operatorname{Eq}^{\leq}(a,b)=\{x\in X:a(x)\leq b(x)\}. Thus a lax commuting diagram describes an inequality, and the lax equalizer describes the locus on which it holds. Lax equalizers always exist in Set and Top, but need not exist in Man. For instance, if 00 is a not regular value of hh, then Eq⁡≤(0,h)={x∈X:0≤h(x)}\operatorname{Eq}^{\leq}(0,h)=\{x\in X:0\leq h(x)\} may not be an object of Man, as it may have a nonsmooth boundary. Throughout, we assume that the lax equalizers we use exist in the ambient category.

Choose a posetal measurement object RR with distinguished point 0R:1→R0_R:1\to R, an autonomous comparison system σ:R→FR\sigma:R\to FR, a preorder on FRFR, and write 0X:=0R∘!X:X→R0_X:=0_R\circ!_{X}:X\to R. The posetal order on RR and preorder on FRFR are distinct and related via the following essential assumption.

Assumption 1 (Barrier comparison lemma). The comparison system σ:R→FR\sigma:R\to FR, together with the order structures on RR and FRFR, and the distinguished point 0R0_R, satisfies the following for every time domain II and map u:I→Ru:I\to R:

u∘0I≥0R,Fu∘1I≥σ∘u⟹u≥0I.(10)u\circ0_I\ge0_R,\qquad Fu\circ1_I\ge\sigma\circ u\quad\Longrightarrow\quad u\ge0_I. \tag*{(10)}

This assumption is the categorical version of the comparison lemma [25], which is recovered when we make the choice R=RR=\mathbb{R} with comparison system r˙=σ(r):=−αr\dot r=\sigma(r):=-\alpha r for α>0\alpha>0. The classical comparison lemma gives u(t)≥e−αtu(0)≥0u(t)\ge e^{-\alpha t}u(0)\ge0 for any curve with u˙(t)≥−αu(t)\dot u(t)\ge-\alpha u(t) and u(0)≥0u(0)\ge0.

Definition 4 (Barrier morphism and safe subobject). For an autonomous system fcl:B→FBf_{\mathrm{cl}}:B\to FB, a morphism h:B→Rh:B\to R is a barrier morphism if:

\begin{CD} B @>h>> R\\ @Vf_{\mathrm{cl}}VV @VV\sigma V\\ FB @>>Fh> FR \end{CD} \qquad\leadsto\qquad Fh\circ f_{\mathrm{cl}}\ge\sigma\circ h. \tag*{(11)}\end{CD}

Its safe subobject is s:Sh:=Eq⁡≤(0B,h)↪Bs:S_h:=\operatorname{Eq}^{\le}(0_B,h)\hookrightarrow B.

A subobject s:S↪Bs:S\hookrightarrow B is forward invariant if every solution c:I→Bc:I\to B starting in SS factors through ss. That is, c∘0I=s∘x0c\circ0_I=s\circ x_0 for some x0:1→Sx_0:1\to S implies c=s∘c~c=s\circ\widetilde c for a (necessarily unique) c~:I→S\widetilde c:I\to S.

Theorem 1 (Categorical Nagumo theorem). Under Assumption 1, a barrier morphism hh renders ShS_h forward invariant.

Proof. Given a solution cc starting in ShS_h, pasting the solution diagram (8) with the lax barrier diagram (11) yields:

I→cB→hR1I↓fcl↓↓σFI→FcFB→FhFR\begin{CD} I @>c>> B @>h>> R\\ @V1_I VV @Vf_{\mathrm{cl}}VV @VV\sigma V\\ FI @>>F_c> FB @>>F_h> FR \end{CD}

Then u=h∘cu=h\circ c satisfies (10), so 0I≤h∘c0_I\le h\circ c. The universal property (9) gives the unique factorization of cc through ShS_h implying that ShS_h is forward invariant. □\square

Control barrier morphisms

Barrier morphisms can be extended to a control setting yielding control barrier morphisms. Consider a control coalgebra P=(p:E→B,f)P=(p:E\to B,f) and a target comparison system σ:R→FR\sigma:R\to FR with RR posetal and FRFR preordered.

Definition 5 (Admissible locus). For a map h:B→Rh:B\to R, define the admissible locus AhA_h of hh as the lax equalizer:

Ah:=Eq⁡≤(σ∘h∘p,Fh∘f)(12)A_h:=\operatorname{Eq}^{\le}(\sigma\circ h\circ p,Fh\circ f) \tag*{(12)}

Definition 6 (Control barrier morphism). A morphism h:B→Rh:B\to R is a control barrier morphism (CBM) if:

(i) πh:=p∘ah:Ah⟶B\pi_h:=p\circ a_h:A_h\longrightarrow B is an epimorphism,

(ii) πh\pi_h is point-surjective2{}^{2}: C(1,πh):C(1,Ah)→C(1,B)C(1,\pi_h):C(1,A_h)\to C(1,B) is surjective.

Because πh\pi_h is point-surjective, every state x:1→Bx:1\to B admits an admissible point x~:1→Ah\widetilde{x}:1\to A_h satisfying πh∘x~=x\pi_h\circ\widetilde{x}=x. In categories with an underlying set structure, this condition for a CBM recovers the classical CBF feasibility condition

∀x∈B,∃ex∈Exs.t.Fh∘f(ex)≥σ∘h(x).\forall x\in B,\qquad\exists e_x\in E_x\quad\text{s.t.}\quad Fh\circ f(e_x)\ge\sigma\circ h(x).

where Ex={ex∈E:p(ex)=x}E_x=\{e_x\in E:p(e_x)=x\}.

Theorem 2 (Safe control theorem). Let h:B→Rh:B\to R be a CBM. Under Assumption 1, any section uh:B→Ahu_h:B\to A_h of πh=p∘ah:Ah→B\pi_h=p\circ a_h:A_h\to B yields a safe controller: kh:=ah∘uh:B→Ek_h:=a_h\circ u_h:B\to E. That is, hh is a barrier morphism for the closed-loop system:

fcl:=f∘kh:B→FBf_{\mathrm{cl}}:=f\circ k_h:B\to FB

and Sh=Eq⁡≤(0B,h)S_h=\operatorname{Eq}^{\le}(0_B,h) is forward invariant for fclf_{\mathrm{cl}}.

Proof. The diagram for AhA_h given in (12) and the section uh:B→Ahu_h:B\to A_h paste to give the barrier inequality (11) for the closed-loop system: Fh∘fcl≥σ∘hFh\circ f_{\mathrm{cl}}\ge\sigma\circ h. It follows that hh is a barrier morphism for the autonomous closed-loop coalgebra fclf_{\mathrm{cl}}. Therefore, by Theorem 1, ShS_h is forward invariant. □\square

Remark 1 (Control Lyapunov morphisms). Let V:B→RV:B\to R be a morphism. Then the same construction as above with the inequality reversed gives the admissible locus:

aV:AV=Eq⁡≤(FV∘f,σV∘V∘p)→E.a_V:A_V=\operatorname{Eq}^{\le}(FV\circ f,\sigma_V\circ V\circ p)\to E.

Let VV be positive definite (as defined categorically in [20, 21]) and πV:=p∘aV\pi_V:=p\circ a_V be a point surjective epi, then VV is a control Lyapunov morphism (CLM)3{}^{3}. It is straightforward to prove that any section uV:B→AVu_V:B\to A_V yields a stabilizing controller aV∘uVa_V\circ u_V. Namely, for the closed loop system fcl:=f∘aV∘uV:B→FBf_{\mathrm{cl}}:=f\circ a_V\circ u_V:B\to FB the Lyapunov inequality is satisfied: FV∘fcl≤σV∘VFV\circ f_{\mathrm{cl}}\le\sigma_V\circ V. We will leverage this reverse inequality in the context of certificates for the tracking controller.

Example 2 (Continuous-time CBFs). Returning to Example 1, pick the comparison object R=RR=\mathbb{R} with the canonical order ≥\ge and equip TR≅R2TR\cong\mathbb{R}^2 with the order: (r,r˙)≥(r′,r˙′)(r,\dot r)\ge(r',\dot r') iff r=r′r=r' and r˙≥r˙′\dot r\ge\dot r'. Define the comparison system σh:R→TR\sigma_h:R\to TR by σh(r)=(r,−α(r))\sigma_h(r)=(r,-\alpha(r)), for α∈K∞\alpha\in\mathcal{K}_{\infty} extended class K∞\mathcal{K}_{\infty}.

For h:M→Rh:M\to\mathbb{R}, the safe set is

Sh={x∈M:h(x)≥0}S_h=\{x\in M:h(x)\ge0\}

and the admissible locus is given by:

Ah={(x,u)∈M×U:Dh(x)f(x,u)≥−α(h(x))}.A_h=\{(x,u)\in M\times U:Dh(x)f(x,u)\ge-\alpha(h(x))\}.

Point-surjectivity of πh:Ah→M\pi_h:A_h\to M is the usual CBF condition:

∀x∈M,∃u∈U s.t. Dh(x)f(x,u)≥−α(h(x)).\forall x\in M,\quad\exists u\in U\ \text{s.t.}\ D h(x)f(x,u)\ge-\alpha(h(x)).

A section uh(x)=(x,κh(x))u_h(x)=(x,\kappa_h(x)) is a feedback controller such that the barrier condition is satisfied:

Dh(x)f(x,κh(x))≥−α(h(x))D h(x)f(x,\kappa_h(x))\ge-\alpha(h(x))

and therefore ShS_h is forward invariant for the closed-loop system: fcl(x)=f(x,κh(x))f_{\mathrm{cl}}(x)=f(x,\kappa_h(x)). We have thus captured the classic CBF results categorically.

Composition of Systems and Certificates

The key idea, inspired by [15, 16], is that composition can be described by a pullback. We now make this idea precise in the context of control coalgebras and CBMs.

Composition over a mediator

Consider the case of two control coalgebras P1P_1 and P2P_2 (this framework can be extended to any number of systems via the limit). The essential concept is that control systems must communicate through a mediator MM, resulting in a cospan of morphisms in Ctrl⁡F(C)\operatorname{Ctrl}_{\mathcal{F}}(\mathcal{C}):

P1→ϕ1M←ϕ2P2,M=(p0:E0→B0,f0).(13)P_1\xrightarrow{\phi_1}M\xleftarrow{\phi_2}P_2,\qquad M=(p_0:E_0\to B_0,f_0). \tag*{(13)}

The mediator specifies which state and input information must agree. The cospan defines constraints between states and inputs that are imposed by the interconnection between two systems. Composition enforces this agreement via the pullback.

Assumption 2 (Existence of pullbacks). The pullbacks:

E:=E1×E0E2,B:=B1×B0B2\begin{aligned} E&:=E_1\times_{E_0}E_2,\\ B&:=B_1\times_{B_0}B_2 \end{aligned}

exist, and F\mathcal{F} preserves the state pullback:

FB=F(B1×B0B2)≅F(B1)×F(B0)F(B2).\mathcal{F}B=\mathcal{F}(B_1\times_{B_0}B_2)\cong\mathcal{F}(B_1)\times_{\mathcal{F}(B_0)}\mathcal{F}(B_2).

For smooth manifolds, transverse pullbacks are sufficient and are preserved by TT. Arbitrary pullbacks need not exist.

Proposition 1 (Composition of control coalgebras). Under Assumption 2, there is a unique control coalgebra:

P:=P1×MP2=(p:E→B,f)P:=P_1\times_M P_2=(p:E\to B,f)

given by the pullback in Ctrl⁡F(C)\operatorname{Ctrl}_{\mathcal{F}}(\mathcal{C}):

P→p1P1p2↓↓ϕ1P2→ϕ2M\begin{CD} P @>{p_1}>> P_1\\ @V{p_2}VV @VV{\phi_1}V\\ P_2 @>{\phi_2}>> M \end{CD}

with projections pi=(piB,piE)p_i=(p_i^B,p_i^E) satisfying:

piB∘p=pi∘piE,FpiB∘f=fi∘piE,i=1,2.(14)p_i^B\circ p=p_i\circ p_i^E,\qquad\mathcal{F}p_i^B\circ f=f_i\circ p_i^E,\qquad i=1,2. \tag*{(14)}

Remark 2. The universal property of the pullback is essential to understanding properties of the composed system. It is summarized by the following system-level diagrams:

Z→z1P1z2↓↓ϕ1P2→ϕ2M⟹Z→z1P1z2↓↓p1P2→p2P→M\begin{CD} Z @>{z_1}>> P_1\\ @V{z_2}VV @VV{\phi_1}V\\ P_2 @>{\phi_2}>> M \end{CD} \qquad\Longrightarrow\qquad \begin{CD} Z @>{z_1}>> P_1\\ @V{z_2}VV @VV{p_1}V\\ P_2 @>{p_2}>> P @>>> M \end{CD}

Hence, for a system ZZ with compatible maps to the subsystems P1P_1 and P2P_2, there is a unique induced map to PP. This map will be essential in extending certificates (e.g., barrier morphisms) from subsystems to the composed closed-loop system.

Proof. The following diagram commutes.

E1×E0E2→p1EE1→f1FB1p2E↓↓ϕ1E↓ϕ1BE2→f2FB2→ϕ2BFB0\begin{CD} E_1\times_{E_0}E_2 @>{p_1^E}>> E_1 @>{f_1}>> \mathcal{F}B_1\\ @V{p_2^E}VV @VV{\phi_1^E}V @VV{\phi_1^B}V\\ E_2 @>{f_2}>> \mathcal{F}B_2 @>{\phi_2^B}>> \mathcal{F}B_0 \end{CD}

So the maps fi∘piE:E→FBif_i\circ p_i^E:E\to\mathcal{F}B_i, i=1,2i=1,2, form a cone over FB1→FB0←FB2\mathcal{F}B_1\to\mathcal{F}B_0\leftarrow\mathcal{F}B_2. Since F\mathcal{F} preserves the state pullback, universal property of pullback gives a unique f:E→FBf:E\to\mathcal{F}B such that the following diagram commutes:

E1×E0E2→p1EE1→f1FB1∃!f↓ ↓FB1×FB0FB2←FB2\begin{CD} E_1\times_{E_0}E_2 @>{p_1^E}>> E_1 @>{f_1}>> \mathcal{F}B_1\\ @V{\exists!f}VV @. @VVV\\ \mathcal{F}B_1\times_{\mathcal{F}B_0}\mathcal{F}B_2 @<<< \mathcal{F}B_2 \end{CD}

Setting p:=πB∘fp:=\pi_B\circ f makes (p,f)(p,f) into a control coalgebra automatically. By standard arguments, it satisfies the universal property of the desired pullback in Ctrl⁡F(C)\operatorname{Ctrl}_{\mathcal{F}}(\mathcal{C}). □\square

Example 3 (Continuous-time interconnection). Consider again continuous-time systems cf⁡\operatorname{cf}. Example 1. Namely, for F=T\mathcal{F}=T, let PiP_i have Ei=Mi×UiE_i=M_i\times U_i and dynamics in coordinates x˙i=fi(xi,ui)\dot{x}_i=f_i(x_i,u_i). A stateless port mediator is

MW=(p0:=!_W:W→1,f0:=!_W),T1≅1={∗}M_W=(p_0:=!\_W:W\to1,f_0:=!\_W),\qquad T1\cong1=\{*\}

where f0(w)=!W(w)≡∗f_0(w)=!_W(w)\equiv*. Any map θi:Ei→W\theta_i:E_i\to W defines a morphism of control systems θi:=(!Mi,θi):Pi→MW\theta_i:=(!_{M_i},\theta_i):P_i\to M_W. Consequently,

B=M1×M2,E=(M1×U1)×W(M2×U2).(15)B=M_1\times M_2,\qquad E=(M_1\times U_1)\times_W(M_2\times U_2). \tag*{(15)}

Cascade interconnection: Take W=U1W=U_1, wherein p0:U1→1p_0:U_1\to1, θ1(x1,u1)=u1\theta_1(x_1,u_1)=u_1, and θ2(x2,u2)=y2(x2)\theta_2(x_2,u_2)=y_2(x_2) for M2→U1M_2\to U_1. Then u1=y2(x2)u_1=y_2(x_2), so E≅M1×M2×U2E\cong M_1\times M_2\times U_2 and:

x˙1=f1(x1,y2(x2)),x˙2=f2(x2,u2).(16)\dot{x}_1=f_1(x_1,y_2(x_2)),\qquad\dot{x}_2=f_2(x_2,u_2). \tag*{(16)}

The remaining external input is u2u_2, resulting in the cascade interconnection:

u2⟶P2→y2(x2)=u1P1u_2\longrightarrow P_2\xrightarrow{y_2(x_2)=u_1}P_1

Feedback interconnection: Let W=U1×U2W=U_1\times U_2, p0(u1,u2)≡∗p_0(u_1,u_2)\equiv*, and pick outputs y1:M1→U2y_1:M_1\to U_2, y2:M2→U1y_2:M_2\to U_1. With θ1(x1,u1)=(u1,y1(x1))\theta_1(x_1,u_1)=(u_1,y_1(x_1)), θ2(x2,u2)=(y2(x2),u2)\theta_2(x_2,u_2)=(y_2(x_2),u_2), the pullback enforces u1=y2(x2)u_1=y_2(x_2) and u2=y1(x1)u_2=y_1(x_1). Hence E≅M1×M2E\cong M_1\times M_2 and the composition is autonomous:

x˙1=f1(x1,y2(x2)),x˙2=f2(x2,y1(x1)).(17)\dot{x}_1=f_1(x_1,y_2(x_2)),\qquad\dot{x}_2=f_2(x_2,y_1(x_1)). \tag*{(17)}

This yields the familiar feedback interconnection diagram:

y1(x1)=u2P1⟶P2y2(x2)=u1\begin{array}{c} y_1(x_1)=u_2\\[2pt] \boxed{P_1}\longrightarrow\boxed{P_2}\\[-2pt] y_2(x_2)=u_1 \end{array}

Comparison systems and compatible certificates

To compose guarantees for systems framed as certificates, e.g., control barrier morphisms, it is necessary to compose the target comparison systems for the layered system architecture: P1→M←P2P_1\to M\leftarrow P_2. Choose autonomous targets Ri=(Ri,σi)R_i=(R_i,\sigma_i), i=0i=0 (for MM) and i=1,2i=1,2 (for PiP_i), and connecting maps ni=(ni,ni)n_i=(n_i,n_i):

R1→n1R0←n2R2,Fni∘σi=σ0∘ni.(18)R_1\xrightarrow{n_1}R_0\xleftarrow{n_2}R_2,\qquad\mathcal{F}n_i\circ\sigma_i=\sigma_0\circ n_i. \tag*{(18)}

Assume R=R1×R0R2R=R_1\times_{R_0}R_2 exists and is preserved by F\mathcal{F}. Proposition 1 gives the autonomous pullback:

Q=(R,σ):=R1×R0R2(19)Q=(R,\sigma):=R_1\times_{R_0}R_2 \tag*{(19)}

with projections piR=(piR,piR)p_i^R=(p_i^R,p_i^R) where piR:R→Rip_i^R:R\to R_i. Give each FRi\mathcal{F}R_i, i=1,2i=1,2, a preorder ≥i\ge_i and equip FR\mathcal{F}R with the projection-induced preorder:

ξ≥η  ⟺  FpiR∘ξ≥iFpiR∘η,i=1,2,(20)\xi\ge\eta\iff\mathcal{F}p_i^R\circ\xi\ge_i\mathcal{F}p_i^R\circ\eta,\qquad i=1,2, \tag*{(20)}

for every pair ξ,η:X→FR\xi,\eta:X\to\mathcal{F}R. Precomposition preserves this preorder. The two component orders need not compare the same quantities or use the same direction of scalar inequality. For example, if we are considering a control barrier function h:M1→R1=Rh:M_1\to R_1=\mathbb{R} and a control Lyapunov function V:M2→R2=R≥0V:M_2\to R_2=\mathbb{R}_{\geq0}, the corresponding preorders on TRT\mathbb{R} and TR≥0T\mathbb{R}_{\geq0} would be ≥1=≥\ge_1=\ge and ≥2=≤\ge_2=\le (since Lyapunov and barrier functions have flipped orders). If the target mediator is terminal, R0=1R_0=1, this induces a mixed componentwise order on the composed target.

Main Result

We can now present the main result on the composition of certificates, i.e., control barrier morphisms. For this theorem, under Assumption 2, let

P=(p:E→B,f)=P1×MP2,Q=(R,σ)=R1×R0R2(21)P=(p:E\to B,f)=P_1\times_M P_2, \qquad Q=(R,\sigma)=R_1\times_{R_0}R_2 \tag*{(21)}

be the composed control system from Proposition 1 and the autonomous target system (19), respectively, where RR is posetal and FR\mathcal{F}R has the projection-induced preorder (20).

Theorem 3 (Composition of control barrier morphisms). Let PP be the composed control system and $Q** be the autonomous target as in (21). Suppose there are CBMs χi:B→Ri\chi_i:B\to R_i, i=1,2i=1,2, for PP with admissible loci AχiA_{\chi_i} such that the diagram below commutes:

\begin{array}{ccccc} B&\xrightarrow{\chi_1}&R_1\\ \downarrow{\chi_2}&&\downarrow{n_1}\\ R_2&\xrightarrow{n_2}&R_0 \end{array} \qquad n_1\circ\chi_1=n_2\circ\chi_2. \tag*{(22)}\end{array}

and the following pullback exists, inducing a map a:A→Ea:A\to E:

A:=Aχ1×EAχ2,a:=aχ1∘p1A=aχ2∘p2A.A:=A_{\chi_1}\times_E A_{\chi_2}, \qquad a:=a_{\chi_1}\circ p_1^A=a_{\chi_2}\circ p_2^A.

If πA:=p∘a:A→B\pi_A:=p\circ a:A\to B is an epi and point-surjective, there exists a unique CBM χ:B→R\chi:B\to R with piR∘χ=χip_i^R\circ\chi=\chi_i, i=1,2i=1,2, satisfying

Fχ∘f∘a≥σ∘χ∘p∘a\mathcal{F}\chi\circ f\circ a\geq\sigma\circ\chi\circ p\circ a
⟺Fχi∘f∘a≥iσi∘χi∘p∘a,i=1,2,\Longleftrightarrow\quad \mathcal{F}\chi_i\circ f\circ a\geq_i\sigma_i\circ\chi_i\circ p\circ a,\qquad i=1,2,
⟺q factors through both aχ1,aχ2\Longleftrightarrow\quad q\text{ factors through both }a_{\chi_1},a_{\chi_2}
⟺q factors through a.\Longleftrightarrow\quad q\text{ factors through }a.

Remark 3. This theorem can be visualized by the diagram:

R1↗χ1↘n1B⇢RR0↘χ2↗n2R2\begin{array}{ccccc} &&R_1&&\\ &\nearrow^{\chi_1}&&\searrow^{n_1}&\\ B&\dashrightarrow R&&&R_0\\ &\searrow_{\chi_2}&&\nearrow_{n_2}&\\ &&R_2&& \end{array}

where the χi\chi_i are state maps that lax commute on the dynamics according to (22), and the remaining arrows strictly commute. Therefore, certificates (CBMs) from PP to each of the targets RiR_i induce a unique certificate to the composed target. Additionally, if there are component CBMs χˉi:Bi→Ri\bar{\chi}_i:B_i\to R_i associated with each of the subsystems PiP_i, Theorem 3 can be applied with χi=χˉi∘piB\chi_i=\bar{\chi}_i\circ p_i^B assuming the conditions of the theorem hold. The existence of sections of πχ1\pi_{\chi_1} and πχ2\pi_{\chi_2} does not imply the existence of a section of πA\pi_A.

Proof. The compatibility of χi\chi_i in (22) gives a unique map χ:B→R\chi:B\to R with piR∘χ=χip_i^R\circ\chi=\chi_i. For any q:X→Eq:X\to E, strictness of the target projections and the induced preorder give:

Fχ∘f∘q≥σ∘χ∘p∘q\mathcal{F}\chi\circ f\circ q\geq\sigma\circ\chi\circ p\circ q
⟺Fχi∘f∘q≥iσi∘χi∘p∘q,i=1,2.\Longleftrightarrow\quad\mathcal{F}\chi_i\circ f\circ q\geq_i\sigma_i\circ\chi_i\circ p\circ q,\qquad i=1,2.
⟺q factors through both aχ1,aχ2\Longleftrightarrow\quad q\text{ factors through both }a_{\chi_1},a_{\chi_2}
⟺q factors through a.(23)\Longleftrightarrow\quad q\text{ factors through }a. \tag*{(23)}

Here, the first equivalence follows from the induced preorder (20), the identities piR∘χ=χip_i^R \circ\chi= \chi_i, and strictness of the target projections piRp_i^R. The remaining equivalences follow from the universal properties of the admissible loci and their pullback. Therefore, AA satisfies the universal property of the admissible locus of χ\chi, and thus Aχ≅AA_\chi\cong A over EE and πχ\pi_\chi can be identified with πA\pi_A. Taking q=aq=a yields (23) and χ\chi is a control barrier morphism. □

Corollary 1 (Safety by certificate composition). Suppose that there is a composed target system Q=(R,σ)Q=(R,\sigma), where RR is posetal with distinguished zero 0R:1→R0_R:1\to R and FR\mathcal{F}_R *has the induced order (20), such that Assumption 1 is satisfied. Under Theorem 3, every section u:B→Au:B\to A renders

Sχ=Eq⁡≤(0B,χ)↪B(24)S_\chi=\operatorname{Eq}^{\leq}(0_B,\chi)\hookrightarrow B \tag*{(24)}

forward invariant for fcl=f∘a∘u:B→FBf_{\mathrm{cl}}=f\circ a\circ u:B\to\mathcal{F}B.

Note that if R+:=Eq⁡≤(0R,id⁡R)R_+:=\operatorname{Eq}^{\leq}(0_R,\operatorname{id}_R) exists, the universal property of the lax equalizer and the pullback imply that:

Sχ≅B×RR+.(25)S_\chi\cong B\times_R R_+. \tag*{(25)}

Indeed, q:X→Bq:X\to B satisfies 0X≤χ∘q0_X\leq\chi\circ q exactly when χ∘q\chi\circ q factors through R+R_+. Thus the standard safe subobject is the inverse image of target positivity: Sχ=χ−1(R+)S_\chi=\chi^{-1}(R_+).

Remark 4 (General composition). Composition as the pullback extends to any number of systems. In this case, a graph Γ\Gamma describes the interconnection structure, with a system PvP_v at each node vv and a mediator MeM_e at each edge ee, giving the cospan

Psource⁡(e)⟶Me⟵Ptarget⁡(e),P_{\operatorname{source}(e)}\longrightarrow M_e\longleftarrow P_{\operatorname{target}(e)},

and the composed system is the limit of the resulting diagram, provided this limit exists and F\mathcal{F} preserves the corresponding limit of state spaces (cf. [15] for tagged systems). For example, the classic three-layer control architecture, consisting of a planning layer, a trajectory generation layer, and a real-time control layer, composes into a single control coalgebra

P:=lim⁡(P1⟶M12⟵P2⟶M23⟵P3).P:=\lim\left(P_1\longrightarrow M_{12}\longleftarrow P_2\longrightarrow M_{23}\longleftarrow P_3\right).

We expect Theorem 3 to extend to this case: given CBMs χv:B→Rv\chi_v:B\to R_v for PP, one for each node, that are compatible over a diagram of target systems of the same shape, the universal property of the limit induces a CBM on the composed system, provided the joint admissible locus projects onto BB by a point-surjective epi.

Layered Safety for Reduced-Order Models

We return to the motivation given in Section II: layered safety architectures leveraging RoMs to guarantee safety on FoMs (see Figure 2 for an illustration of this architecture). The goal of this section is to apply the categorical results on composition to this specific case. We show that the result in (6) follows systematically as a result of the categorical framework. Throughout this section we work in C=Man\mathsf{C}=\mathsf{Man}.

We begin by noting that assumptions on the interface between the RoM and FoM can be understood categorically.

Assumption 3 (Projection compatibility). There are smooth maps Π:X→Z\Pi:X\to Z and Ψ:X→Uv\Psi:X\to U_v such that, for every (x,v)∈X×Uv(x,v)\in X\times U_v, it follows that:

DΠ(x)fF(x,v)=fR(Π(x),Ψ(x)).(26)D\Pi(x)f_F(x,v)=f_R(\Pi(x),\Psi(x)). \tag*{(26)}

Equivalently, the following dynamics square commutes:

X×Uv→(Π,Ψ)Z×UvfF↓↓fRTX→TΠTZ(27)\begin{CD} X\times U_v @>{(\Pi,\Psi)}>> Z\times U_v\\ @V{f_F}VV @VV{f_R}V\\ TX @>{T\Pi}>> TZ \tag*{(27)} \end{CD}

where (Π,Ψ)(x,v)=(Π(x),Ψ(x))(\Pi,\Psi)(x,v)=(\Pi(x),\Psi(x)).

Since the FoM is obtained from a tracking controller u=K(x,v)u=K(x,v) applied to the full order dynamics: fF(x,v)=F(x)+G(x)K(x,v)f_F(x,v)=F(x)+G(x)K(x,v), sufficient conditions [13] for (27) to hold are: DΠ(x)G(x)=0D\Pi(x)G(x)=0 and DΠ(x)F(x)=fR(Π(x),Ψ(x))D\Pi(x)F(x)=f_R(\Pi(x),\Psi(x)).

The safety-filter mediator and the closed-loop pullback

We can mirror the conceptual safety architecture in Figure 2 with a precise categorical representation as a cospan:

PRoM=(pZ:Z×Uv→Z,fR),z˙=fR(z,v),Msf=(p0:Z×Uv×Uv→Z,fsf),z˙=fsf(z,v,v)=fR(z,v),PFoM=(pX:X×Uv→X,fF),x˙=fF(x,v).(28)\begin{aligned} P_{\mathrm{RoM}}&=(p_Z:Z\times U_v\to Z,f_R),& \dot z&=f_R(z,v),\\ M_{\mathrm{sf}}&=(p_0:Z\times U_v\times U_v\to Z,f_{\mathrm{sf}}),& \dot z&=f_{\mathrm{sf}}(z,v,v)=f_R(z,v),\\ P_{\mathrm{FoM}}&=(p_X:X\times U_v\to X,f_F),& \dot x&=f_F(x,v). \tag*{(28)} \end{aligned}

Here, the mediator has copies of UvU_v and UvU_v to receive control interfaces from the RoM and FoM. It is these interfaces that encode the safety filter itself, ksafek_{\mathrm{safe}}. Throughout this section, let ksafek_{\mathrm{safe}} be a smooth safety filter satisfying the constraint in (3), not necessarily its exact optimizer, which exist by [26].

The closed-loop system is obtained via the pullback.

Proposition 2 (Composition is the safety filtered FoM). Under Assumption 3, the cospan (28) has the pullback

Pcl:=PRoM×MsfPFoM≅(id⁡X:X→X,fcl),(29)P_{\mathrm{cl}}:=P_{\mathrm{RoM}}\times_{M_{\mathrm{sf}}}P_{\mathrm{FoM}}\cong(\operatorname{id}_X:X\to X,f_{\mathrm{cl}}), \tag*{(29)}

where fclf_{\mathrm{cl}} is given by (4).

Proof. The pullback imposes equality in the mediator:

(z,v,ksafe(z))=(Π(x),Ψ(x),v).(z,v,k_{\mathrm{safe}}(z))=(\Pi(x),\Psi(x),v).

This determines z=Π(x)z=\Pi(x), v=Ψ(x)v=\Psi(x), and v=ksafe(Π(x))v=k_{\mathrm{safe}}(\Pi(x)) uniquely. Hence the state space pullback and control bundle pullback are both XX, with the identity bundle projection. The FoM projection determines the dynamics of the pullback as fF(x,ksafe(Π(x)))f_F(x,k_{\mathrm{safe}}(\Pi(x))). Assumption 3 verifies the RoM projection, completing the pullback cone. □

As in Section II, and specifically (5), we consider a smooth non-negative tracking function V:X→R≥0V:X\to\mathbb{R}_{\geq0} satisfying:

Assumption 4 (Tracking). On XX, for constants γ,ρ>0\gamma,\rho>0 and λ>α≥0\lambda>\alpha\geq0, assume:

V(x)≥ρ∥Ψ(x)−κsafe(Π(x))∥2,DV(x)fcl(x)≤−λV(x).(30)V(x)\geq\rho\lVert\Psi(x)-\kappa_{\mathrm{safe}}(\Pi(x))\rVert^2, \qquad DV(x)f_{\mathrm{cl}}(x)\leq-\lambda V(x). \tag*{(30)}

Let b:=h∘Πb:=h\circ\Pi. To recover the barrier dynamics in (5), by Assumption 3, the RoM CBF inequality, and Assumption 4:

b˙=Dh(Π(x))fR(Π(x),Ψ(x))=Lfh(Π(x))+Lgh(Π(x))κsafe(Π(x))+Lgh(Π(x))e(x)≥−αb+∥Lgh(z)∥24γρ+Lgh(z)e≥−αb−γρ∥e∥2≥−αb−γV.(31)\begin{aligned} \dot{b} &=Dh(\Pi(x))f_R(\Pi(x),\Psi(x))\\ &=L_fh(\Pi(x))+L_gh(\Pi(x))\kappa_{\mathrm{safe}}(\Pi(x))+L_gh(\Pi(x))e(x)\\ &\geq-\alpha b+\frac{\lVert L_gh(z)\rVert^2}{4\gamma\rho}+L_gh(z)e\\ &\geq-\alpha b-\gamma\rho\lVert e\rVert^2\geq-\alpha b-\gamma V. \tag*{(31)} \end{aligned}

where here z=Π(x)z=\Pi(x) and the last inequalities follow from completing the square and (30). The end result is two certificates on the closed loop: bb, built from the RoM barrier hh, satisfying b˙≥−αb−γV\dot{b}\geq-\alpha b-\gamma V, and the tracking function VV, satisfying V˙≤−λV\dot{V}\leq-\lambda V. These two certificates will form the basis for constructing the target systems, and will ultimately generate the induced certificate for PclP_{\mathrm{cl}}.

Comparison targets and their pullback

The barrier lower bound (31) and the tracking decay assumption (30) are encoded by the comparison systems Rh\mathbf{R}_h and RV\mathbf{R}_V via the cospan:

Rh=(R(b,r)2,σh),σh dynamics:{b˙=−αb−γr,r˙=−λr,R0=(Rr,σ0),σ0 dynamics:r˙=−λr,RV=(Rs,σV),σV dynamics:s˙=−λs,(32)\begin{aligned} \mathbf{R}_h&=\left(\mathbb{R}^2_{(b,r)},\sigma_h\right), & \sigma_h\ \mathrm{dynamics}:& \begin{cases} \dot{b}=-\alpha b-\gamma r,\\ \dot{r}=-\lambda r, \end{cases}\\ \mathbf{R}_0&=(\mathbb{R}_r,\sigma_0), & \sigma_0\ \mathrm{dynamics}:& \dot{r}=-\lambda r,\\ \mathbf{R}_V&=(\mathbb{R}_s,\sigma_V), & \sigma_V\ \mathrm{dynamics}:& \dot{s}=-\lambda s, \tag*{(32)} \end{aligned}
n1=pr⁡r,n2=id⁡R.n_1=\operatorname{pr}_r,\qquad n_2=\operatorname{id}_{\mathbb{R}}.

At equal base points, the preorders on Rh\mathbf{R}_h and RV\mathbf{R}_V are:

Preorder on TRb,r2:(b˙,r˙)≥h(b˙′,r˙′)⟺b˙≥b˙′,\text{Preorder on }T\mathbb{R}^2_{b,r}:\qquad (\dot{b},\dot{r})\geq_h(\dot{b}',\dot{r}') \Longleftrightarrow \dot{b}\geq\dot{b}',
Preorder on TRs:s˙≥Vs˙′⟺s˙≤s˙′.(33)\text{Preorder on }T\mathbb{R}_s:\qquad \dot{s}\geq_V\dot{s}' \Longleftrightarrow \dot{s}\leq\dot{s}'. \tag*{(33)}

The first order tests the barrier lower bound, while the second order tests the tracking upper bound.

The goal is to find a composed comparison system Q≅Rh×R0RV\mathbf{Q}\cong\mathbf{R}_h\times_{\mathbf{R}_0}\mathbf{R}_V such that the conditions of Corollary 1 are satisfied. Set a:=λ−α>0a:=\lambda-\alpha>0. The composed comparison system Q\mathbf{Q} is given in (b,ℓ)(b,\ell)-coordinates with corresponding projections phRp_h^R and pVRp_V^R as given in the following pullback diagram (see Remark 5 for additional details on choosing Q\mathbf{Q}):

Q=(R(b,ℓ)2,σ),σ dynamics:{b˙=−λb+ℓ,ℓ˙=−αℓ,phR(b,ℓ)=(b,ab−ℓγ),pVR(b,ℓ)=ab−ℓγ.(34)\begin{aligned} \mathbf{Q}&=\left(\mathbb{R}^2_{(b,\ell)},\sigma\right), & \sigma\ \mathrm{dynamics}:& \begin{cases} \dot{b}=-\lambda b+\ell,\\ \dot{\ell}=-\alpha\ell, \end{cases}\\ p_h^R(b,\ell)&=\left(b,\frac{ab-\ell}{\gamma}\right), & p_V^R(b,\ell)&=\frac{ab-\ell}{\gamma}. \tag*{(34)} \end{aligned}

The fact that Q\mathbf{Q} is the pullback of (32) follows from the observation that L:R(b,r)2→R(b,ℓ)2L:\mathbb{R}^2_{(b,r)}\to\mathbb{R}^2_{(b,\ell)}, given by L(b,r)=(b,ab−γr)L(b,r)=(b,ab-\gamma r) is invertible and satisfies TL∘σh=σ∘LTL\circ\sigma_h=\sigma\circ L.

The dynamics preorder on Q\mathbf{Q}, i.e., the preorder on TR(b,ℓ)2T\mathbb{R}^2_{(b,\ell)}, is the one induced by the projections in (34) per (20). In (b,ℓ)(b,\ell)-coordinates at a fixed base point this is given by:

(b˙,ℓ˙)≥Q(b˙′,ℓ˙′)⟺b˙≥b˙′,ℓ˙−ℓ˙′≥a(b˙−b˙′).(\dot{b},\dot{\ell})\geq_Q(\dot{b}',\dot{\ell}') \Longleftrightarrow \dot{b}\geq\dot{b}',\qquad \dot{\ell}-\dot{\ell}'\geq a(\dot{b}-\dot{b}').

Since a>0a>0, this implies the ordinary componentwise preorder on TR(b,ℓ)2T\mathbb{R}^2_{(b,\ell)}. Finally, the dynamics on Q\mathbf{Q} imply that R≥02\mathbb{R}^2_{\geq0} is forward invariant verifying Assumption 1.

Remark 5 (Finding the comparison system). It is important to note that the choice of Q\mathbf{Q} was guided by the need to satisfy Assumption 1 for the induced preorder (20) as required by Corollary 1. For example, a naive (but valid) choice for the pullback is Rh=(R(b,r)2,σh)≅Rh×R0RV\mathbf{R}_h=(\mathbb{R}^2_{(b,r)},\sigma_h)\cong\mathbf{R}_h\times_{\mathbf{R}_0}\mathbf{R}_V. Yet the dynamics σh\sigma_h for this system do not satisfy Assumption 1: at b=0,r>0b=0,r>0, it follows that b˙=−γr<0\dot{b}=-\gamma r<0. Now, to understand how we arrived at Q\mathbf{Q}, we can determine the largest forward invariant subset of {(b,r):b≥0}\{(b,r):b\geq0\}:

K:={(b,r):b≥0, ab−γr≥0}.K:=\{(b,r):b\geq0,\ ab-\gamma r\geq0\}.

Defining L(b,r)=(b,ab−γr)L(b,r)=(b,ab-\gamma r) as above, it follows that K={(b,r):L(b,r)≥0}K=\{(b,r):L(b,r)\geq0\} and L(K)=R≥02L(K)=\mathbb{R}^2_{\geq0}. Transporting the pullback through LL yields Q\mathbf{Q} as defined above.

The induced certificate and full-order model safety

The goal is now to apply the main result, Theorem 3, to obtain a control barrier function for the closed-loop system PclP_{\mathrm{cl}} representing the layered architecture. To this end, consider the barrier certificate χh:=(b,V):X→R(b,r)2\chi_h:=(b,V):X\to\mathbb{R}^2_{(b,r)} and the tracking certificate χV:=V:X→Rs\chi_V:=V:X\to\mathbb{R}_s. These are compatible since pr⁡r∘χh=χV\operatorname{pr}_r\circ\chi_h=\chi_V. Moreover, (31) and (30) imply that:

Tχh∘fcl≥hσh∘χh,TχV∘fcl≥VσV∘χV.T\chi_h\circ f_{\mathrm{cl}}\geq_h\sigma_h\circ\chi_h, \qquad T\chi_V\circ f_{\mathrm{cl}}\geq_V\sigma_V\circ\chi_V.

for the chosen target systems (by design).

The target pullback Q\mathbf{Q} induces a unique morphism:

χ(x)=(b(x),H(x)),H(x)=ab(x)−γV(x).(35)\chi(x)=(b(x),H(x)), \qquad H(x)=ab(x)-\gamma V(x). \tag*{(35)}

Moreover, the conclusion that Tχ∘fcl≥σ∘χT\chi\circ f_{\mathrm{cl}}\geq\sigma\circ\chi yields:

b˙≥−λb+H,H˙≥−αH.(36)\dot{b}\geq-\lambda b+H, \qquad \dot{H}\geq-\alpha H. \tag*{(36)}

This allows us to establish with categorical means safety of PclP_{\mathrm{cl}}, and specifically the closed-loop FoM first considered in (4). Since PclP_{\mathrm{cl}} is autonomous, Aχh≅AχV≅XA_{\chi_h}\cong A_{\chi_V}\cong X.

Theorem 4 (Layered safety). Suppose Assumptions 3 and 4 hold, and that there exists a smooth safe controller ν=κsafe(z)\nu= \kappa_{\mathrm{safe}}(z) for the RoM z˙=fR(z,ν)\dot{z} = f_{\mathrm{R}}(z,\nu) satisfying:

Dh(z)fR(z,κsafe(z))≥−αh(z)+∥Lgh(z)∥24γρ.Dh(z)f_{\mathrm{R}}(z,\kappa_{\mathrm{safe}}(z)) \ge-\alpha h(z) + \frac{\lVert L_{g}h(z)\rVert^{2}}{4\gamma\rho}.

If λ>α\lambda> \alpha, for closed-loop FoM (4) the set:

Sχ={x∈X:(λ−α)h(Π(x))≥γV(x)}(37)S_{\chi} = \{x \in X : (\lambda-\alpha)h(\Pi(x)) \ge\gamma V(x)\} \tag*{(37)}

is forward invariant. Therefore, since Sχ⊆CS_{\chi} \subseteq C, for all solutions c:I→Xc : I \to X of x˙=fcl(x)=fF(x,κsafe(Π(x)))\dot{x} = f_{\mathrm{cl}}(x) = f_{\mathrm{F}}(x,\kappa_{\mathrm{safe}}(\Pi(x))):

c(0)∈Sχ⟹h(Π(c(t)))≥0∀t∈I.c(0) \in S_{\chi} \quad\Longrightarrow\quad h(\Pi(c(t))) \ge0 \quad\forall t \in I.

Proof. Safety of SχS_{\chi} follows from Corollary 1. It only remains to verify the form of SχS_{\chi} given in (37). With the componentwise order on R=R(b,ℓ)2R = \mathbb{R}^{2}_{(b,\ell)}:

Sχ=Eq⁡≤(0X,χ)={x∈X:χ(x)≥0}={x∈X:h(Π(x))≥0, H(x)≥0},S_{\chi} = \operatorname{Eq}^{\leq}(0_{X},\chi) = \{x \in X : \chi(x) \ge0\} = \{x \in X : h(\Pi(x)) \ge0,\ H(x) \ge0\},

since b=h∘Πb = h \circ\Pi. But a=λ−α>0a = \lambda-\alpha> 0 and V≥0V \ge0, and therefore:

H(x)≥0⟹ah(Π(x))≥γV(x)⟹h(Π(x))≥0.H(x) \ge0 \quad\Longrightarrow\quad ah(\Pi(x)) \ge\gamma V(x) \quad\Longrightarrow\quad h(\Pi(x)) \ge0.

This implies that SχS_{\chi} is given by (37) and that Sχ⊆CS_{\chi} \subseteq C.

Note that the barrier morphism in this case, χ\chi, takes values in R2\mathbb{R}^{2}. We can obtain a classical scalar barrier as well. To this end, consider the projection pr⁡ℓ:Q→(R,σα)\operatorname{pr}_{\ell} : Q \to(\mathbb{R},\sigma_{\alpha}), where σα(y)=−αy\sigma_{\alpha}(y) = -\alpha y, is a strict dynamics-preserving morphism. Therefore, pasting with χ\chi gives the scalar barrier H=pr⁡ℓ∘χH = \operatorname{pr}_{\ell} \circ\chi:

X→χR2→pr⁡ℓRfcl↓σ↓σα↓TX→TχTR2→Tpr⁡ℓTR⇝H˙≥−αH\begin{CD} X @>\chi>> \mathbb{R}^{2} @>\operatorname{pr}_{\ell}>> \mathbb{R} \\ @Vf_{\mathrm{cl}}VV @V\sigma VV @V\sigma_{\alpha}VV \\ TX @>T\chi>> T\mathbb{R}^{2} @>T\operatorname{pr}_{\ell}>> T\mathbb{R} \end{CD} \qquad\leadsto\qquad\dot{H} \ge-\alpha H

This, again, implies that Sχ={x∈X:H(x)≥0}S_{\chi} = \{x \in X : H(x) \ge0\} is forward invariant and the conclusions of Theorem 4 follow.

Conclusion

This paper presented a categorical framework in which to represent and analyze layered control architectures. To this end, we formulated “control systems” categorically via control coalgebras. While C=ManC = \mathrm{Man} was considered in this paper for simplicity, the framework is general and can be applied to a wide range of system types. Composition can be understood categorically as the pullback over a mediator. The main result showed how the universal property of the pullback yields CBMs on the composed system given CBMs on each subsystem. We applied this result to a layered architecture representing safety filtering a FoM with a RoM, recapturing previous results as a specialization. Looking forward, the goal is to apply this categorical framework to more complex layered architectures with heterogeneous control systems.

References

  1. [1]N. Matin, A. D. Ames, and J. C. Doyle, “A quantitative framework for layered multirate control: Toward a theory of control architecture,” IEEE Control Systems Magazine, vol. 44, no. 3, pp. 52–94, 2024.
  2. [2]M. H. Cohen, T. G. Molnar, and A. D. Ames, “Safe-critical control for autonomous systems: Control barrier functions via reduced-order models,” Annual Reviews in Control, vol. 57, p. 100947, 2024.
  3. [3]M. Aoki, “Control of large scale dynamic systems by aggregation,” IEEE Transactions on Automatic Control, vol. 13, pp. 246–253, Jun. 1968.
  4. [4]M. D. Mesarovic, D. Macko, and Y. Takahara, Theory of Hierarchical, Multilevel, Systems, ser. Mathematics in Science and Engineering. New York: Academic Press, 1970, vol. 68.
  5. [5]H. Zhong and W. M. Wonham, “On the consistency of hierarchical supervision in discrete-event systems,” IEEE Transactions on Automatic Control, vol. 35, no. 10, pp. 1125–1134, Oct. 1990.DOI
  6. [6]J. C. Willems, “The behavioral approach to open and interconnected systems,” IEEE Control Systems Magazine, vol. 27, no. 6, pp. 46–99, Dec. 2007.
  7. [7]P. Tabuada, Verification and Control of Hybrid Systems: A Symbolic Approach. New York: Springer, 2009.DOI
  8. [8]M. Mazo Jr., W. Compton, M. H. Cohen, and A. D. Ames, “A contract theory for layered control architectures,” 2024, arXiv preprint arXiv:2409.14902.arxiv.org/abs/2409.14902
  9. [9]N. V. Naik, A. Pinto, and P. Nuzzo, “Contract embeddings for layered control architectures,” ACM Trans. Embed. Comput. Syst., vol. 24, no. 5s, Sep. 2025. [Online]. Available: https://doi.org/10.1145/3764587
  10. [10]U. Rosolia, A. Singletary, and A. D. Ames, “Unified multirate control: From low-level actuation to high-level planning,” IEEE Transactions on Automatic Control, vol. 67, no. 12, pp. 6627–6640, 2022.DOI
  11. [11]A. D. Ames, X. Xu, J. W. Grizzle, and P. Tabuada, “Control barrier function based quadratic programs for safety critical systems,” IEEE Transactions on Automatic Control, vol. 62, no. 8, pp. 3861–3876, 2017.DOI
  12. [12]T. G. Molnár, R. K. Cosner, A. W. Singletary, W. Ubellacker, and A. D. Ames, “Model-free safety-critical control for robotic systems,” IEEE Robotics and Automation Letters, vol. 7, no. 2, pp. 944–951, 2022.DOI
  13. [13]W. D. Compton, M. H. Cohen, and A. D. Ames, “Learning for layered safety-critical control with predictive control barrier functions,” in Proceedings of the 7th Annual Learning for Dynamics & Control Conference, ser. Proceedings of Machine Learning Research, vol. 283, 2025, pp. 153–165.arxiv.org/abs/2412.04658
  14. [14]J. J. M. M. Rutten, “Universal coalgebra: A theory of systems,” Theoretical Computer Science, vol. 249, no. 1, pp. 3–80, 2000.DOI
  15. [15]A. D. Ames, A. Sangiovanni-Vincentelli, and S. Sastry, “Homogeneous semantics preserving deployments of heterogeneous networks of embedded systems,” in Networked Embedded Sensing and Control. Springer, 2006, pp. 127–154.DOI
  16. [16]P. Tabuada, “Controller synthesis for bisimulation equivalence,” Systems & Control Letters, vol. 57, no. 6, pp. 443–452, 2008.arxiv.org/abs/0706.0929
  17. [17]D. Vagner, D. I. Spivak, and E. Lerman, “Algebras of open dynamical systems on the operad of wiring diagrams,” Theory and Applications of Categories, vol. 30, no. 51, pp. 1793–1822, 2015.arxiv.org/abs/1408.1598
  18. [18]J. Culbertson, G. F. Ghrist, D. E. Koditschek, and P. F. Stiller, “Formal composition of hybrid systems,” Theory and Applications of Categories, vol. 35, no. 45, pp. 1634–1682, 2020.arxiv.org/abs/1911.01267
  19. [19]M. Capucci and D. J. Myers, “Compositionality of Lyapunov functions via assume-guarantee reasoning,” 2026, arXiv:2604.03017.arxiv.org/abs/2604.03017
  20. [20]A. D. Ames, J. Moeller, and P. Tabuada, “Categorical Lyapunov theory I: Stability of flows,” Applied Categorical Structures, vol. 34, no. 60, 2026.arxiv.org/abs/2502.15276
  21. [21]A. D. Ames, S. Mattenet, and J. Moeller, “Categorical Lyapunov theory II: Stability of systems,” 2025, arXiv:2505.22968.arxiv.org/abs/2505.22968
  22. [22]M. H. Cohen, N. Cosmay-Shanklin, W. D. Compton, T. G. Molnar, and A. D. Ames, “Safety-critical controller synthesis with reduced-order models,” in 2025 American Control Conference (ACC). IEEE, 2025, pp. 5216–5221.arxiv.org/abs/2411.16479
  23. [23]R. Nanyakkara, A. D. Ames, and P. Tabuada, “Safety under state uncertainty: Robustifying control barrier functions,” 2026. [Online]. Available: https://arxiv.org/abs/2508.17226
  24. [24]J. Moeller and A. D. Ames, “Hybrid systems as coalgebras: Lyapunov morphisms for Zeno stability,” arXiv preprint arXiv:2604.05255, 2026.arxiv.org/abs/2604.05255
  25. [25]H. K. Khalil, Nonlinear Systems, 3rd ed. Upper Saddle River, NJ: Prentice Hall, 2002.
  26. [26]M. H. Cohen, P. Ong, G. Bahati, and A. D. Ames, “Characterizing smooth safety filters via the implicit function theorem,” IEEE Control Systems Letters, vol. 7, pp. 3890–3895, 2023.arxiv.org/abs/2309.12614

Paper details

vlnc:W_3uc5cwen
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

Not recorded for this paper · View statement →

Looking for related papers…
Contents