Max H. Cohen, Ryan K. Cosner, and Aaron D. AmesThis research was supported by BPand NSF CPS Award #1932091.The authors are with the Department of Mechanical and Civil Engineering, California Institute of Technology, Pasadena, CA {maxcohen,rkcosner,ames}@caltech.edu.
Abstract
Certifying the safety of nonlinear systems, through the lens of set invariance and control barrier functions (CBFs), offers a powerful method for controller synthesis, provided a CBF can be constructed.This paper draws connections between partial feedback linearization and CBF synthesis.We illustrate that when a control affine system is input-output linearizable with respect to a smooth output function, then, under mild regularity conditions, one mayextend any safety constraint defined on the output to a CBF for the full-order dynamics.These more general results are specialized to robotic systems where the conditions required to synthesize CBFs simplify. The CBFs constructed from our approach are applied and verified in simulation and hardware experiments on a quadrotor.
I Introduction
Safety has emerged as a fundamental requirement for modern control systems. With safety framed as set invariance, control barrier functions (CBFs) have become a popular tool for designing controllers that endow systems with safety guarantees [1].Given a CBF, one mayconstruct a controller enforcing set invariance using convex optimization [1] or smooth universal formulas [2, 3]. Synthesizing a CBF-based controller, however, first requires constructing a valid CBF – a task often cited as the greatest challenge of CBF-based approaches. For low-dimensional systems, computational techniques such as sum-of-squares programming [4, 5] and Hamilton-Jacobi reachability [6, 7] often provide a viable pathway to address such challenges. Alternatively, one may construct hand-crafted CBFs for specific systems [8]. Yet each of these approaches tends to scale poorly with the dimension and complexity of the system.
A popular approach to constructing CBFs for complex high-dimensional systems is via backstepping [9, 10, 11]. This approach effectively extends a safety constraint that is not controlled invariant to a CBF defining a control invariant set (the zero superlevel set) contained within the original safety constraint. This is accomplished by imposing a particular layered structure on the dynamics, defining smooth virtual CBF-based controllers [2] at each layer, and then “backstepping” through such controllers to compute a CBF for the overall system. The main limitations of this approach are the structural requirements of the dynamics and the controllability assumptions imposed on each layer, which precludes the direct application of such ideas to underactuated systems.
Similar to backstepping, high order CBFs (HOCBFs) [12, 13, 14, 15] extend a safety constraint to a barrier-like function that may be used to enforce forward invariance of a safe set contained within the constraint set.In contrast to backstepping, HOCBFs place no structural requirements on the dynamics other than that they are control affine. Inspired by input-output linearization [16], such approaches treat the safety constraint as an output, differentiate this output until the input appears, and then impose CBF-like conditions on the highest derivative of the output. However, by treating the safety constraint as an output, these approaches implicitly require such a constraint to have a uniform relative degree on the safe set, which is restrictive in the context of CBFs [17]. As noted in [10, 15, 18], even simple safety constraints may not have a uniform relative degree and, in such a situation, the functions constructed following the approaches in [12, 13, 14, 15] may not meet the criteria of a HOCBF. Similar limitations arise when using such a methodology to construct CBFs, rather than HOCBFs, from a high relative degree safety constraint [19].
In this paper, we demonstrate how techniques from feedback linearization [16] facilitate the construction of CBFs, with an emphasis on the application of such ideas to underactuated robotic systems.Instead of treating safety constraints directly as outputs, as in prior works such as [11, 12, 13, 14, 19], we define the states relevant to the safety constraint as outputs. Leveraging the structural properties of the resulting output dynamics, we employ methods from [9, 10] to construct CBFs for the full-order dynamics, thereby relaxing the restrictive uniform relative degree requirements found in existing high relative degree CBF frameworks.Specifically, we establish that when a nonlinear control system is input-output linearizable with respect to a smooth output function, then, under mild regularity conditions, one may extend any smooth inequality constraint on the output to a CBF for the full-order system(Sec. III). We illustrate the utility of these results by specializing them to robotic systems where the conditions required to construct CBFs simplify (Sec. IV). The benefits of our approach are highlighted through both simulations and hardware demonstrations (Sec. V).
To summarize, the contributions of this paper are twofold:
•
We present a framework for constructing CBFs for high-dimensional and underactuated systems inspired by the methods developed in [9]. In contrast to [9], we establish the existence of a smooth controller required for the initial step in the CBF backstepping procedure. Furthermore, we formally characterize the properties required of the system output, safety constraint, and candidate CBF to ensure the applicability of the techniques described in [9] to general control affine systems.
•
We present extensive numerical examples illustrating the design of CBFs for various underactuated robotic systems and apply the developed theory on a quadrotor, which constitutes the first demonstration of CBF backstepping on hardware.
Notation.Define and as the boundary and interior of a set . A continuous function is said to be an extended class function () if i) , ii) is strictly increasing, iii) . For smooth functions and, we define as the Lie derivative of alongwith higher order Lie derivatives defined as in [16].
II Preliminaries and Problem Formulation
Consider a nonlinear control affine system:
(1)
with state and control input , where and are smooth (differentiable as many times as necessary) on the open and connected set . By taking with locally Lipschitzwe obtain the closed-loop system ,which, for each initial condition , produces a continuously differentiable trajectory defined on a maximal interval of existence . A set is said to be forward invariant for the closed-loop system if, for each , the resulting trajectory satisfies for all .A popular approach to designing controllers enforcingforward invarianceis through CBFs.
Definition 1([1]).
A continuously differentiable function defining a set as:
(2)
is said to be a CBF for (1) on if there exists and an open set satisfying such that for all :
(3)
When is a CBF, we say that as in (2) is a safe set.
The existence of a CBFimplies the existence of a locally Lipschitz feedback controller enforcing the forward invariance of [1, 17]. One example of such a controller is the optimization-based safety filter:
(4)
where is a desired controller. The main objective of this paper is to systematically construct CBFs using methodsfromfeedback linearization [16]. Central to our approach is the notion of relative degree.
Definition 2([16]).
A smooth function is said to have relative degree111A vector-valued output may have different relative degrees for each of its components. For simplicity of notation, we focus on outputs whose components share the same relative degree. with respect to (1) on an open set if for all :
i)
(5)
ii)
Let have relative degree on and define:
(6)
noting that the output dynamics are given by:
(7)
Given a smooth output and a smooth inequality constraint on defining a constraint set:
(8)
that is not necessarily controlled invariant, our goal is to construct a CBF and corresponding safe set so that enforcing forward invariance of leads to satisfaction of the output constraint.
III CBFs for Feedback Linearizable Systems
In this section, we establish that when (1) ispartially feedback linearizable with respect to a smooth output function then, under mild regularity conditions, one may construct a CBF and corresponding safe set whose forward invariance implies satisfaction of the output constraint.The following lemma is the starting point of our approach and outlines the regularity conditions that must satisfy.
Lemma 1.
Let be a smooth function defining a set as:
(9)
Let be an open set and suppose that:
(10)
Then, for any smooth there exists a smooth such that for all :
(11)
For any , one example of such a function is given by:
(12)
Proof.
Define , , and .Using a similar argument to those in [20, 2, 10], one can show that from (12) is smooth on . It follows from (10) that, for , only if , which implies that, for , only if . Hence, for each , we have . Since is smooth on , are smooth on , and for each , is smooth on , implying that from (12) is smooth on . To show (11) we compute:
(13)
Recall from (10) that when and , we have , implying that . Moreover, when , one can verify that for any .Using these observations to lower bound (13) implies that (11) holds, as desired.∎
The conditions in Lemma 1 are equivalent to the statement that is a CBF for a single integrator , an arguably mild requirement.This does not require to have a uniform relative degree on , which would be overly restrictive. Indeed, the gradient of relevant safety constraints may vanish at points on [15, 18, 10]. Instead, we will require the output to have a relative degree, which is less restrictive222That is, may have a relative degree even when does not. A simple example illustrating this point is the double integrator with state , output , and constraint . This phenomenon is also present in the examples considered in Sec. V and may arise when from (9) is a compact set (cf. [10, Footnote 4])..To this end, let have relative degree on and consider the output dynamics (7) of system (1). The output dynamics in (7) are in strict feedback form and are thus amenable to backstepping [9, 10]. We will thus leverage backstepping for (7) to construct a CBF, which may be used to enforce satisfaction of the original output constraint on (1).Following[9], we propose the CBF candidate:
(14)
where defines as in (9), for , , is any smooth function satisfying (11) for all for a smooth globally Lipschitz and:
(15)
where for each . The CBF candidate in (14) defines a set as in (2), which satisfies .Before proceeding, it will be useful to define , where is defined as in Lemma 1. We now illustrate that when has arelative degree on and satisfies (10), then (14) is a CBF for (1).
Theorem 1.
Consider system (1) with smooth output , the output constraint defining a constraint set as in (8), and the CBF candidate from (14) defining a set as in (2). Provided that satisfies (10) on a set , with as in (9), has relative degree on a set satisfying , and for each , where is a Lipschitz constant of from (11), then is a CBF for (1) on . Moreover, any locally Lipschitz controller that renders forward invariant for the closed-loop system (1) ensures that for all .
Proof.
The proof follows a similar argument to that of [9, Thm. 5]. Since has relative degree on , the matrix has rank and is thus right pseudo-invertible for each .Now, note that since and satisfies (11) for all , satisfies (11) for all , where exists since satisfies the conditions of Lemma 1. It then follows that since for each , each satisfies the same conditions as those in the proof of [9, Thm. 5], which implies that the CBF candidate in (14) satisfies the same conditions as those in [9, Sec. IV]. Hence, by following the same steps as in the proof of [9, Thm. 5], one may show that the smooth feedback controller:
where denotes the right psuedo-inverse and , satisfies for all , where is from (11). Thus, for all , we have:
which implies that is a CBF for (1) on .Since any locally Lipschitz controller enforcing the forward invariance of ensures that for all .∎
Theorem 1 highlights the interplay between the output , the safety constraint , the system’s actuation capabilities, and the ability to construct CBFs.By ensuring that has a relative degree on , (1) may be partially transformed into a strict feedback system (7)on , enabling the application of backstepping [9] to construct a CBF.Theorem 1 characterizes the requirements on , , and for such techniques to be applicable to general control affine systems (1), complimenting the ideas introduced in [9], which focused on systems already in strict feedback form.While using outputs to transform a system into strict feedback form is well-established in the backstepping literature [21], and has been exploited in the context of CBFs [11] by viewing as an output, Theorem 1 is, to our knowledge, the first to make the explicit connection between more general outputs and the constructions of CBFs.As demonstrated in Sec. V, this connection has important practical implications as itenables the application of such ideas to a broader class of systems than those originally considered in [9, 10].Moreover, by not treating as an output – a common approach in works such as [11, 12, 13, 14, 15, 19] – this construction overcomes the restrictive uniform relative degree requirements on present in most high relative degree CBF techniques.
IV CBFs for Underactuated Robotic Systems
We now specialize the previous results torobotic systems with generalized coordinates and dynamics:
(16)
Here, is the generalized velocity, denotes the positive definite and symmetric inertia matrix, denotes the Coriolis matrix, represents gravitational and other potential effects, is the actuation matrix, and is the control input.Note that by defining we may represent (16) as in (1) withdynamics:
(17)
Now, consider a twice continuously differentiable output ,which is used to define an output constraint and associated output constraint set:
(18)
defined in the configuration space of (16).Differentiating the output twice along the vector fields in (17) leads to . Importantly, we see that the the “decoupling” matrix:
(19)
depends only on the configuration, implying that the relative degreedepends only on the configuration. Note that when is constant, , and , the output always has relative degree 2 as one can check that for all .When has relative degree 2, the CBF candidate from (14) simplifies to:
(20)
where and is any continuously differentiable function satisfying (11) for all . The following corollary illustrates that (20) is a CBF for (17) provided satisfies (10) and (19) has full row rank on a set containing .
Corollary 1.
Consider system (17) with twice continuously differentiable output , the configuration constraint defining a set as in (18), and the CBF candidate as in (20) defining a set as in (2). Provided that satisfies (10) on a set , with as in (9), for all with , then is a CBF for (17). Moreover, any locally Lipschitz controller that renders forward invariant for the closed-loop system (17) ensures that for all .
Proof.
As for all , has relative degree 2 on and since and , we have . Finally, since the conditions of Theorem 1 hold, implying that as in (20) is a CBF for (17) on .∎
Focusing on robotic systems (16), rather than general control affine systems (1), offers various benefits due to the structural properties of (16). In particular, the relative degree of depends only on , implying that the relative degree can be verified over a lower-dimensional space.This often allows one to restrict the constraint set so that has relative degree 2 on by construction – a procedure exemplified in Sec. V-B.Moreover, when has relative degree 2, the resulting CBF (20) may be defined with a general , rather than a smooth globally Lipschitz one as in (14). This formulation also does not require defining the parameters in (14).
V Simulations and Hardware Experiments
V-APendulum on a Cart
We illustrate333Code and further details of our implementation available at https://github.com/maxhcohen/ReducedOrderModelCBFs.jl the ideas presented herein using a canonical example of an underactuated robotic system, the pendulum on a cart. The configuration consists of the planar position of the cart and the angle of a pendulum mounted on the cart with dynamics:
where denote the mass of the cart and pendulum, respectively, denotes the length of the pendulum, and denotes the acceleration due to gravity. We now demonstrate how the choice of output affects the ability to construct CBFs. Let so that our safety constraint depends only on the position of the cart. In this case, the decoupling matrix is , which has rank 1 for all implying that any function of the form (20) with and satisfying (10) is a CBF for this system. On the other hand, when , we have which has rank 1 so long as . Hence, any function of the form (20) with satisfying (10) is a CBF for this system provided that the constraint set does not contain points such that . Using these observations, we construct two CBFs for the two different outputs using the configuration constraints and , respectively, which require the position of the cart to remain less than and requires the angle of the pendulum to satisfy with a desired angle of the pendulum. The gradients of each constraint are given by and , respectively, which satisfy (10) for . These constraints are used to construct satisfying (11) using (12) and then used to construct CBFs as in (20) whose corresponding safe sets are illustrated in Fig. 2. These CBFs are subsequently used to construct controllers as in (4) that filter a nominal controller that attempts to drive the cart to a position beyond and a nominal controller that applies no input, respectively. The results of applying such controllers are illustrated in Fig. 2. As guaranteed by Corollary 1, such a controller ensures forward invariance of and satisfaction of each constraint.
V-BPlanar Quadrotor
We now apply our approach to a planar quadrotor with configuration consisting of the horizontal and vertical position of the quadrotor and the orientation of the quadrotor with respect to the horizontal plane.The dynamics are in the form of (16) with[8]:
where , are the mass and inertia, is the acceleration due to gravity, and and are the thrust and moment applied by the propellers. Our objective is to design a controller that keeps the quadrotor’s height above a specified value, which is captured by the output and the safety constraint . To check if this constraint leads to a CBF via Corollary 1, we first compute to find that our safety constraint satisfies (10) for . We then compute (19) to find that has rank 1 provided . However, since the configuration constraint places no limits on , such points are contained in and, consequently, this does not lead to a valid CBF. That drops rank on indicates that these particular choices of and are not compatible with the system’s actuation capabilities, and must be refined so that has full rank on .To this end, we modify our output function to and our constraint function to which defines an ellipse in the space with center , width , and height . This constraint ensures that and whenever .To check if yields a CBF, we compute , which satisfies (10) for , and , where creates a diagonal matrix, which has rank 2 provided . By taking we have the existence of a set such that for all , implying that this choice of and leads to a CBF by Corollary 1. Constructing a CBF using this constraint in (20), where is from (12), and applying the resulting controller (4) to the system, where attempts to stabilize the system to , leads to the results in Fig. 3 and Fig. 4, where the quadrotor falls from its initial state to a height of and maintains its height there for all time.The process outlined above emphasizes that designing a CBF requires carefully selecting the output and constraint to ensure compatibility with the system’s actuation capabilities. Importantly, the results in Sec. III and IV guide this selection by providing verifiable conditions on and , which enables the automatic construction of a CBF when satisfied.
V-CQuadrotor Hardware Experiments
We now extend the preceding example to a 3D quadrotor and illustrate the efficacy of our approach on hardware. The hardware platform is described in [22] and is modeled asa control affine system (1)with state representing the position , orientation (represented as a quaternion), and velocity , and control input , where is the angular rate and is the thrust. A full expression of the dynamics can be found in [22]. Our control objective is to keep the quadrotor’s height above , where and denotes the quadrotor’s height. To this end, we choose our output444For the model described in [22], the first component of has relative degree two whereas the second and third have relative degree one. The theory developed in Sec. III can be modified to account for such a situation at the expense of additional notation by transforming the output dynamics into a mixed relative degree cascaded system (cf. [9, 10]), but a formal presentation of such results is omitted here in the interest of space. as , where and are components of the quaternion such that . Given this output,we define where . This constraint ensures that and requires the quadrotor’s orientation to remain level when .Leveraging the constructions in Sec. III, this leads to the CBF candidate:
where is defined as in (12).This CBF is used to construct a safety filter as in (4), where corresponds to commands given via joystick that lift the quadrotor up before lowering it to the ground. Applying this safety filter to the system produces the results in Fig. 1 and Fig. 5, where remains above and remains positive for all time.
VI Conclusions
We presented a framework for synthesizing CBFs using ideas from feedback linearization, which were demonstrated both numerically and experimentally on underactuated robotic systems. Future research directions include characterizing the zero dynamics under CBF-based controllers.
References
[1]A.D. Ames, X.Xu, J.W. Grizzle, and P.Tabuada, “Control barrier function based quadratic programs for safety critical systems,” IEEE Trans. Autom. Control, vol.62, no.8, pp.3861–3876, 2017.
[2]M.H. Cohen, P.Ong, G.Bahati, and A.D. Ames, “Characterizing smooth safety filters via the implicit function theorem,” IEEE Contr. Syst. Lett., vol.7, pp.3890–3895, 2023.
[4]X.Xu, J.W. Grizzle, P.Tabuada, and A.D. Ames, “Correctness guarantees for the composition of lane keeping and adaptive cruise control,” IEEE Trans. Autom. Sci. Eng., vol.15, no.3, pp.1216–1229, 2017.
[5]P.Zhao, R.Ghabcheloo, Y.Cheng, H.Abdi, and N.Hovakimyan, “Convex synthesis of control barrier functions under input constraints,” IEEE Contr. Syst. Lett., vol.7, pp.3102–3107, 2023.
[6]J.J. Choi, D.Lee, K.Sreenath, C.J. Tomlin, and S.L. Herbert, “Robust control barrier–value functions for safety-critical control,” in Proc. Conf. Decis. Control, pp.6814–6821, 2021.
[7]K.P. Wabersich, A.J. Taylor, J.J. Choi, K.Sreenath, C.J. Tomlin, A.D. Ames, and M.N. Zeilinger, “Data-driven safety filters: Hamilton-jacobi reachability, control barrier functions, and predictive methods for uncertain systems,” IEEE Control Syst. Mag., vol.43, no.5, pp.137–177, 2023.
[8]G.Wu and K.Sreenath, “Safety-critical control of a planar quadrotor,” in Proc. Amer. Control Conf., pp.2252–2258, 2016.
[9]A.J. Taylor, P.Ong, T.G. Molnar, and A.D. Ames, “Safe backstepping with control barrier functions,” in Proc. Conf. Decis. Control, pp.5775–5782, 2022.
[10]M.H. Cohen, T.G. Molnar, 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.
[11]I.Abel, D.Steeves, M.Krstić, and M.Janković, “Prescribed-time safety design for strict-feedback nonlinear systems,” IEEE Trans. Autom. Control, vol.69, no.3, pp.1464–1479, 2024.
[12]Q.Nguyen and K.Sreenath, “Exponential control barrier functions for enforcing high relative-degree safety-critical constraints,” in Proc. Amer. Control Conf., pp.322–328, 2016.
[13]X.Xu, “Constrained control of input–output linearizable systems using control sharing barrier functions,” Automatica, vol.87, pp.195–201, 2018.
[14]W.Xiao and C.Belta, “High order control barrier functions,” IEEE Trans. Autom. Control, vol.67, no.7, pp.3655–3662, 2022.
[16]A.Isidori, Nonlinear Control Systems.Springer, thirded., 1995.
[17]M.Jankovic, “Robust control barrier functions for constrained stabilization of nonlinear systems,” Automatica, vol.96, pp.359–367, 2018.
[18]M.H. Cohen and C.Belta, Adaptive and Learning-based Control of Safety-Critical Systems.Springer Nature, 2023.
[19]J.Breeden and D.Panagou, “Robust control barrier functions under high relative degree and input constraints for satellite trajectories,” Automatica, vol.155, 2023.
[20]E.D. Sontag, “A universal construction of Artstein’s theorem on nonlinear stabilization,” Syst. Control Lett., vol.13, pp.117–123, 1989.
[21]M.Krstić, I.Kanellakopoulus, and P.Kokotović, Nonlinear and Adaptive Control Design.Wiley, 1995.
[22]R.K. Cosner, I.Sadalski, J.K. Woo, P.Culbertson, and A.D. Ames, “Generative modeling of residuals for real-time risk-sensitive safety with discrete-time control barrier functions,” arXiv preprint arXiv:2311.05802, 2023.
Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877
Phone: +21813267449721
Job: Technology Engineer
Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti
Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.