Multi-rate Control Design under Input Constraints via Fixed-Time Barrier Functions

In this paper, we introduce the notion of periodic safety, which requires that the system trajectories periodically visit a subset of a forward-invariant safe set, and utilize it in a multi-rate framework where a high-level planner generates a reference trajectory that is tracked by a low-level controller under input constraints. We introduce the notion of fixed-time barrier functions which is leveraged by the proposed low-level controller in a quadratic programming framework. Then, we design a model predictive control policy for high-level planning with a bound on the rate of change for the reference trajectory to guarantee that periodic safety is achieved. We demonstrate the effectiveness of the proposed strategy on a simulation example, where the proposed fixed-time stabilizing low-level controller shows successful satisfaction of control objectives, whereas an exponentially stabilizing low-level controller fails.

I. INTRODUCTION Constraints requiring the system trajectories to evolve in some safe set at all times while visiting some goal set(s) are common in safety-critical applications. Constraints pertaining to the convergence of the trajectories to certain sets within a fixed time often appear in time-critical applications, e.g., when a task must be completed within a given time interval. Most popular approaches on the control synthesis under such specifications include quadratic programming techniques, where the safety requirements are encoded via control barrier functions (CBFs) and convergence requirements via control Lyapunov functions (CLFs), see e.g. [1], [2], or via one function that encodes both the safety and convergence requirements [3], [4].
Quadratic program (QP)-based approaches have gained popularity for control synthesis [1], [2], [4], [5] in real-time, since QPs can be solved efficiently. Most of the prior work, except [3], [4], deals with asymptotic or exponential convergence of the system trajectories to the desired goal set. Fixed-time stability (FxTS) [6] is a stronger notion of stability, where the time of convergence does not depend on the initial conditions. To address the problem of FxTS in the presence of input constraints, new Lyapunov conditions are proposed in [5], characterizing a domain of attraction for FxTS under input constraints.
As argued in the recent article [7], myopic control synthesis approaches relying solely on QPs are susceptible to infeasibility. To circumvent this issue, combining a high-level planner with a low-level controller has become a popular approach [8]- [12]. The underlying idea in these strategies is to design K. Garg  low-level controllers to track a reference trajectory, which is computed by a high-level planner using a simplified model. In [8] the authors presented the FaSTrack framework where the error bounds are computed using Hamilton-Jacobi (HJ) reachability analysis. This framework has been extended in [9], where the authors used Sum-Of-Squares (SOS) to compute the tracking error bounds. The constraint on the planner and the tracking error bounds may also be updated using an iterative procedure as suggested in [10]. A different approach that uses Model Predictive Controller (MPC) for high-level planning has been presented in [11] where the tracking controller is designed using control contraction metrics.
In this work, we introduce the notion of periodic safety where the system trajectories are required to remain in a safe set for all times and visit a subset of this safe set periodically. Inspired from [12], we use a multi-rate control framework where the low-level controller and the high-level planner operate at different frequencies. The high-level planner is used to generate a reference trajectory in the interior of a subset of the safe set, and the low-level controller to track this reference trajectory. The contribution of this paper is twofold. First, we combine the concepts of fixed-time stable Lyapunov functions [5] and control barrier functions [1] to define the notion of fixed-time barrier functions. We use it in a provably feasible QP, guaranteeing fixed-time convergence to a neighborhood of the reference trajectory from a region of attraction under input constraints. Second, we design the constraints of the MPC problem to consider this region of attraction of the lowlevel controller in the high-level planner. Compared to [12], we limit the rate of change for the planned trajectory so that the low-level controller is able to track the resulting reference trajectory within a predefined error bound. The limitation on rate change along with the tracking within the chosen error bound helps the system achieve periodic safety. Furthermore, we demonstrate that such constraints, which guarantee the correct operation of the low-level controller, do not jeopardize the feasibility of the MPC problem. Simulations demonstrate the fixed-time stabilizing low-level controller successfully satisfying the state constraints while an exponentially stabilizing controller [1] fails.
Notation: The Minkowski sum of two sets X , Y ⊂ R n is denoted as X T ⊕ Y, and the Pontryagin difference as X Y. The set of positive integers, non-negative integers and nonnegative reals is denoted as N, N 0+ , and R 0+ , respectively.
II. PROBLEM FORMULATION We first introduce the problem under study and then present some related background material. System Model: We consider nonlinear control affine system of the following form: where f : R nx → R nx and g : R nx → R nx×nu are locally Lipschitz continuous functions with f (0) = g(0) = 0, u ∈ R nu is the input and x ∈ R nx is the system state. The control objective is to design a controller u : R 0+ × R nx → U ⊂ R nu such that solutions to the closed loop system: satisfy the state constraints: where X ⊂ R nx and X T ⊂ X D with D = {x | x ≤ d} for some d > 0. We assume that the input constraint set is given as The time constant T is a user-specified parameter that defines the update frequency of the planned trajectory, as will be further clarified in Section III-A. The control objectives as described in (3) require safety of the system in terms of forward invariance of the set X , and periodic fixed-time stability of the set X T , which means that the system trajectories need to visit this set at each discrete time iT , i ∈ N 0+ . To capture these objectives, we introduce the notion of periodic safety.
Definition 1 (Periodic safety). Given the sets X T , X ⊂ R nx , with X T ⊂ X , and a time period T > 0, the set X T is said to be periodically safe w.r.t. the safe set X for the closed-loop system (2) if for all x(0) ∈ X T , the following holds  Figure 1 illustrates the periodic safety where the system trajectories visit the set X T periodically, while remaining inside the safe set X . Note that this notion is stronger than that of conditional invariance as defined in [13], where the set X is called conditionally flow-invariant for the closed-loop system (2) if for all x(0) ∈ X T ⊂ X , it holds that x(t) ∈ X for all t ≥ 0. In particular, periodic safety of X T w.r.t. X implies that X is conditionally flow-invariant. Next, we define the notion of fixed-time domain of attraction: The concept of FxT-DoA is important under a constrained input u ∈ U, as it is not possible to guarantee that fixed-time convergence can be achieved for arbitrary initial conditions. To characterize this FxT-DoA, inspired from [4], we introduce a class of barrier functions termed fixed-time barrier functions.
if there exist parameters δ ∈ R, α > 0, γ 1 = 1 + 1 µ and γ 2 = 1 − 1 µ for some µ > 1, such that the following holds: with r = δ 2α and 0 < r, k < 1. In particular, existence of a FxT barrier function h implies: 1) forward invariance of the set D S and 2) convergence to the set S within time T S .

III. MULTI-RATE CONTROL
In this section, we present a hierarchical strategy where we first design a high-level planner that generates a reference trajectory z(t), and then, a low-level controller that tracks this reference trajectory to guarantee that the closed-loop trajectory x(t) satisfies (3). The control input is defined as where u l and u m are defined using the policy Π defined as 1 : Here, π m : R nx → U M ⊂ U is the control policy from the high-level planner, to be designed in Section III-A, that generates a reference trajectory using a Linear Time-Invariant (LTI) model of system (1), and π l : R nx × R nu × N → U is the low-level control policy, to be designed in Section III-B, that helps track this reference trajectory. The constraint set U M ⊂ U dictates how much of the control authority is reserved individually for the high-level planner and the low-level controller, and is a design parameter.

A. High-level planning
In this section we describe the high-level planning strategy. Reference Model: We assume that the reference trajectory z(t) is generated using the following piecewise LTI model: (3) is specified by the user and z − (t) = lim τ t z(τ ) and z + (t) = lim τ t z(τ ) denote the right and left limits of the reference trajectory z(t) ∈ R n , which is assumed right continuous. The matrices (A, B) are known and, in practice, may be computed by linearizing the system dynamics (1) about the equilibrium point, i.e., the origin. Finally, the reference input u m (t) ∈ R d and the reset map ∆ z , which depends on the state of the nonlinear system (1), are given by the higher layer as discussed next. Model Predictive Control: We design a Model Predictive Controller (MPC) to compute the high-level input u m (t) that defines the evolution of the reference trajectory in (8), and to define the reset map ∆ z for the LTI model (8). The MPC problem is solved at 1/T Hertz and therefore the reference high-level input is piecewise constant, i.e.,u m (t) = 0 ∀t ∈ T where T = ∪ ∞ i=0 (iT, (i + 1)T ). First, we introduce the following discrete-time linear model: where the transition matrices areĀ = e AT andB = Given the discrete-time model (9) and the state of the nonlinear system (1) x(iT ), we solve the following finite-time optimal control problem at time and an initial condition z d i|i such that the predicted trajectory steers the system to the terminal set X F ⊂ X T , while minimizing the cost and satisfying state and input constraints. Let i+N |i ] (12) be the optimal solution of (11), then the high-level policy is Finally, we define the reset map for (8) as follows: B. Low-level control synthesis In this section we design the low-level policy π l . Consider the system dynamics (1) under the effect of the policy (7): We define the sets D i and C i as We show in Section IV that C i ⊂ D i+1 (guaranteed by bound on the rate change of the reference trajectory z(t) in (11c)) along with D i ⊂ X and C i ⊂ X T (guaranteed by (11e)) guarantees that closed-loop trajectories meet the objectives in (3). Under these considerations, the low-level control objective for t ∈ T i = [(i − 1)T, iT ) is to design the policy π l such that the set D i is FxT-DoA for the set C i . To this end, for the time interval T i with i ∈ N 0+ , consider the candidate FxT barrier function h i : R nx → R defined as and define the following QP: where c > 0 and u m = π m (x(i − 1)T ). We denote the optimal solution of the QP (19) as (u l (x, u m , i), δ (x, u m , i)) and define the low-level policy as The constraint (19b) guarantees that u = u l + u m ∈ U. The parameters µ, α, γ 1 , γ 2 in (19c) are fixed, and are chosen as α = max µk (1−k)T , µπ T √ 1−r 2 , γ 1 = 1+ 1 µ and γ 2 = 1− 1 µ with µ > 1 and 0 < r, k < 1, so that the closed-loop trajectories reach the zero super-level set of the FxT barrier function h i within the time step T .

IV. CLOSED-LOOP PROPERTIES
In this section we show the properties of the proposed multirate control architecture. Consider the closed-loop system (15) under the control input (7) with policies π m and π l defined in (13) and (20), respectively. Below, we explain how we show that the closed-loop trajectories satisfy (3): A. First, we show in Lemma 1 that under the low-level controller u l , the set D i is FxT-DoA for the set C i , so that starting from any x((i − 1)T ) ∈ D i , the closed-loop trajectories reach the set C i within time T . B. Next, in Theorem 1 we show recursive feasibility of the MPC so that the closed-loop trajectories satisfy x((i − 1)T ) ∈ D i for all i ∈ N, which along with item A, implies that the closed-loop trajectories satisfy (3).

A. Fixed Time Domain of Attraction
In this section, we show that under the low-level controller defined as the optimal solution of the QP (19), the set D i is a FxT-DoA for the set C i . To this end, it is essential that the QP (19) is feasible for all x so that the low-level controller is well-defined. The slack term δ ensures the feasibility of the QP (19) for all x / ∈ ∂C i . For the feasibility of the QP (19) for x ∈ ∂C i , we make the following assumption, which is a standard assumption in the literature for guaranteeing forward invariance (see [15] for more details).

Assumption 1.
For all x ∈ ∂C i , i ∈ Z + , and u m ∈ U M , there exists u l ∈ U l such that the following holds: From Definition 3, we know that FxT-DoA depends on the ratio δ 2α . We make the following assumption on the maximum value of δ (x) as the solution of the QP (19) so that h i is a FxT barrier function for C i and D i is its FxT-DoA.

Remark 1.
As argued in [5], for given input bounds (dictated by the set U), the value of the slack term δ in QP (19) depends on the time of convergence T . Furthermore, the upper-bound in (21) depends on the parameters c and k, where 0 < c < d is such that X T C is non-empty and 0 < k < 1. Thus, in practice, numerical simulations can guide the choice of the parameters c, k, and the time T , so that (21) can be satisfied.
We first compute an expression for D Ci and then, we show that under Assumption 2, D i ⊆ D Ci . From [5, Theorem 1], we know that the FxT-DoA D Ci is given as a function of r M = sup r = δ 2α , i.e., the maximum value of the ratio r . We consider the two cases, namely r M < 1 and r M ≥ 1 separately.
For r M < 1, it follows from [5, Theorem 1] that D Ci = R nx is the FxT-DoA for C i . Thus, D i is also a FxT-DoA of the set C i .
For r M ≥ 1, it follows from [5, Theorem 1] that a FxT-DoA (i.e., the set D Ci ) is given as where the equality follows from the fact that r − √ r 2 − 1 is a monotonically decreasing function for r ≥ 1. Thus, it With the FxT barrier function h i (x) defined in (18), the set D Ci reads Now, under Assumption 2, it holds that r M ≤ . By re-arranging this inequality, we obtain that under Assumption 2, it holds that Now, for any Thus, it follows from (24) that for all x((i − 1)T ) ∈ D i . Using this, and (23), it follows that D i = D Ci . Hence, we have that D i is a FxT-DoA of the set C i . Thus, from [5,Theorem 1], it follows that the closed-loop trajectories of (2) will reach the set Finally, we show that the closed-loop trajectories remain in the set C i till t = iT , i.e., the set C i is forward invariant for the closed-loop trajectories of (2). Let t = t i (i − 1)T + T 1 denote the first time instant when the closed-loop trajectories of (2) reach the boundary of the set C i , i.e., h i (x(t i )) = 0. From the analysis in the first part of the lemma, it holds that t i ≤ iT . From (19c), it follows thaṫ The proof can be completed using [1, Proposition 1].
Thus, satisfaction of (19c) implies that system trajectories reach the set C i on or before t = iT , and stay there till t = iT . Now, in order for the closed-loop trajectories to reach the set C i+1 on or before t = (i + 1)T , it is required that x(iT ) ∈ D i+1 , which is shown in the following lemma.
Proof: By assumption of the lemma, the MPC problem (11) is feasible at time t i = iT . Now consider the optimal MPC solution (12) at time t i = iT . By definition, we have that x(iT ) − z * ,d i|i ∈ C, which implies that ||x(iT ) − z * ,d i|i || ≤ c. Furthermore, by feasibility of the optimal MPC solution (12) for problem (11), we have that ||z * ,d Finally, from (10) we have that z * ,d i+1|i = z − ((i + 1)T ). Thus, from the above equation we conclude that

B. MPC Recursive Feasibility and Closed-Loop Constraint Satisfaction
So far, we have shown that feasibility of the MPC guarantees that x(iT ) ∈ D i+1 , which, under the low-level control policy (20), guarantees that x((i + 1)T ) ∈ C i+1 . Thus, what is remaining to be shown is that the MPC (11) is recursively feasible, i.e., if (11) is feasible at t = 0T , then it is feasible at t = iT for all i ∈ N. This would guarantee that x(iT ) ∈ C i (and hence, x(iT ) ∈ X T ) for all i ∈ N. Recursive feasibility of MPC: We make the following assumption for the high-level planner that would help guarantee recursive feasibility of the MPC (11).
Remark 2. The above assumption is standard in the MPC literature [16], [17] and it allows us to guarantee that the MPC problem is feasible at all time instances. In practice, the set X F can be chosen as a small neighborhood of the origin. Now we are ready to state the main result that shows that the hierarchical control strategy in Section III leads to satisfaction of (3). Theorem 1. Let Assumptions 1-3 hold and consider the closed-loop system (15) under the control policy (7), where π m is defined in (13) and π l is defined in (20). If at time t = 0 problem (11) is feasible, then the closed-loop trajectories under the control policy (7) satisfy (3), i.e., the set X T is periodically safe w.r.t. the set X with period T .
Proof: The proof proceeds by induction. First, we show that if at time t i = iT the MPC problem (11) is feasible, then at time t i+1 = (i + 1)T the MPC problem (11) (11) at time t i = iT . Then from the feasibility of the MPC problem and Proposition 2 we have that x(iT ) ∈ D i+1 , which together with Lemma 1 implies that Now notice that from equation (10) we have z * ,d i+1|i = z − ((i + 1)T ), which in turn implies that  (11). We have shown that if the MPC problem (11) is feasible at time t i = iT , then the MPC problem is feasible at time t i+1 = (i + 1)T . Per assumption of the theorem, problem (11) is feasible at time t 0 = 0, and hence, we conclude by induction that the MPC problem (11) is feasible for all t i = iT and for all i ∈ N 0+ .
Next, we show that the feasibility of the MPC problem implies that state and input constraints are satisfied for the closedloop system. Notice that by definition u m (t) = v * i|i ∈ U m for all t ∈ [iT, (i+1)T ) and from Lemma 1, we have the low-level controller returns a feasible control action u l (t), therefore we have that Finally, from the feasibility of the state-input sequences in (26) for the MPC problem (11), we have that From the above equation we conclude that x(iT ) ∈ X T for all i ∈ N 0+ . Note that since z − (iT ) ∈ X T C, C ⊂ D, and Hence, it follows that x(t) ∈ X for all t ≥ 0. Thus, the closed-loop trajectories under the control policy (7) satisfy (3), i.e., the set X T is periodically safe w.r.t. the set X with period T .

V. SIMULATIONS
In this section, we present a simulation case study where we use the proposed strategy to steer a Segway to the origin 2 . The state of the system are the position p, the velocity v, the rod angle θ and the angular velocity ω (see Figure 2). The control action is the voltage commanded to the motor and the equations of motion used to simulate the system can be found in [18,Section IV.B]. In this simulation, we run the high-level MPC planner at 5Hz and the low-level controller at 10kHz with parameters d = 0.6 and c = 0.005. We choose the set X T = {x = [p, v, θ, ω] T | |p| ≤ 10, |v| ≤ 5, |θ| ≤ 0.3, |ω| ≤ 10π}, X F = {0}, input bounds u ≤ 25 with u m ≤ 15. In the first scenario, the initial conditions are [−1.0 0 0.1 0.3] T and T = 0.2. Figure 2 shows the evolution of the FxT barrier functions h i and the control input u. It can be seen that the input constraints are always satisfied, and the FxT barrier functions reach zero at each time step T , leading to periodic safety of the underlying set X .
Periodic safety is also evident from the left figure in Figure  3, where the closed-loop trajectories are shown to converge to the set C i by end of each interval T i . The middle plot in  (Right) Illustration of a scenario where the trajectoryx(t) generated using an exponentially stabilizing CLF fails to enter C1, leading to infeasibility of the MPC at t = 1T , whereas the trajectory x(t) generated by the proposed method enters C1 before t = 1T . Figure 3 shows the projection of the closed-loop trajectories on the p − θ plane. It can be seen from the inset plot that the closed-loop trajectory leaves the set X T in the interval T 3 and returns to the set before the next time step. It can be observed (as discussed in Section III) that the sets C i , D i satisfy C i ⊂ X T and D i ⊂ X , respectively, guaranteeing x(iT ) ∈ X T and x(t) ∈ X , i.e., periodic safety of the set X T w.r.t. the set X .
To compare the performance of the fixed-time stabilizing controller with an exponentially stabilizing one at the low level, we performed a simulation with initial conditions very close to the boundary of the set X T . In this case, we chose X T = {x = [p, v, θ, ω] T | |p| ≤ 10, |v| ≤ 5, |θ| ≤ 0.5, |ω| ≤ 10π} and initialized the system with θ(0) = 0.495. In this case, the parameters are chosen as d = 1, c = 0.04 and T = 0.25. The right plot on Figure 3 shows the trajectory x(t) generated by the proposed controller, and the trajectorȳ x(t) generated by an exponentially stabilizing controller [1]. The inset plot on the right plot of Figure 3 shows that both x(t) andx(t) leave the set X T . The closed-loop trajectory x(t) returns back to the set X T before t = 1T , whilex(t) fails to do so, leading to infeasibility of the MPC in (11) at t = 1T . This demonstrates the efficacy of the proposed framework over the existing methods that use exponentially stabilizing controllers.
VI. CONCLUSIONS In this paper, we introduced the notion of periodic safety requiring system trajectories to visit a subset of a safe set periodically. We defined the notion of fixed-time barrier function and used it in a multi-rate control framework, with MPC as a high-level planner, for control synthesis. We demonstrated that the proposed framework is capable of solving corner cases where exponentially stabilizing controllers might fail. Future work includes studying the robustness properties of the proposed framework by considering model uncertainties.