{'fraction_non_alphanumeric': 0.04411568260753406, 'fraction_numerical': 0.01092038471814053, 'mean_word_length': 4.291570948930906, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Safety-Critical Model Predictive Control with Discrete-Time Control Barrier Function

The optimal performance of robotic systems is usually achieved near the limit of state and input bounds. Model predictive control (MPC) is a prevalent strategy to handle these operational constraints, however, safety still remains an open challenge for MPC as it needs to guarantee that the system stays within an invariant set. In order to obtain safe optimal performance in the context of set invariance, we present a safety-critical model predictive control strategy utilizing discrete-time control barrier functions (CBFs), which guarantees system safety and accomplishes optimal performance via model predictive control. We analyze the stability and the feasibility properties of our control design. We verify the properties of our method on a 2D double integrator model for obstacle avoidance. We also validate the algorithm numerically using a competitive car racing example, where the ego car is able to overtake other racing cars.


A. Motivation
Safety-critical optimal control and planning is one of the fundamental problems in robotic applications. In order to ensure the safety of robotic systems while achieving optimal performance, the tight coupling between potentially conflicting control objectives and safety criteria is considered in an optimization problem. Some recent work formulates this problem using control barrier functions, but only using current state information without prediction, see [1]- [3], which yields a greedy control policy. Model predictive control can give a less greedy policy, as it takes future state information into account. However, the safety criteria in a predictive control framework is usually enforced as distance constraints defined under Euclidean norms, such as the distance between the robot and obstacles being larger than a safety margin. This distance constraint will not be active in the optimization until the reachable set along the horizon intersects with the obstacles. In other words, the robot will not take actions to avoid the obstacles until it is close to them. One way to solve this problem is to use a larger horizon, but that will increase the computational complexity in the optimization.
We address this challenge above by directly unifying model predictive control with discrete-time control barrier functions together into one optimization problem. This results in a safety-critical model predictive control formulation, called MPC-CBF in this paper. In this formulation, the CBF constraints could enforce the system to avoid obstacles even when the reachable set along the horizon is far away from the obstacles. We validate this control design using a 2D double integrator for obstacle avoidance, and also demonstrate that this method enables a racing car to safely compete with other cars in a racing competition, shown in Fig. 1.
B. Related Work 1) Model Predictive Control: MPC is widely used for robotic systems, such as autonomous driving, robotic manipulation and locomotion [4]- [6], to achieve optimal performance while satisfying different constraints. One of the most important criteria to deploy robots for real-world tasks is safety. There is some existing work about model predictive control considering system safety [7], [8]. The safety criteria in the context of MPC is usually formulated as constraints in an optimization problem [9]- [11], such as obstacle constraints and actuation limits. One concrete scenario regarding safety criteria for robots is obstacle avoidance. The majority of literature focuses on collision avoidance using simplified models, and considers distance constraints with various Euclidean norms [12]- [14], which we call MPC-DC in this paper.
However, these obstacle avoidance constraints under Euclidean norms might not be active until the robot is relatively close to the obstacles. To make the robot take actions to avoid obstacles even far away from it, we usually need a larger horizon which increases the computational time in the optimization. This encourages us to formulate a new type of model predictive control, which can guarantee safety in the context of set invariance with CBF constraints being active in the optimization.
2) Control Barrier Functions: CBFs have recently been introduced as a promising way to ensure set invariance by considering the system dynamics and implying forward invariance of the safe set. Futhermore, a safety-critical control design for continuous-time systems was proposed by unifying a control Lyapunov function (CLF) and a control barrier function through a quadratic program (CLF-CBF-QP) [2], [15]. This method could be deployed as a real-time optimization-based controller with safety-critical constraints, shown in [1], [16], [17]. The adaptive, robust, and stochastic cases of safety-critical control with CBFs have been considered in [18]- [21], and exponential CBFs could be used for high relative degree safety constraints for nonlinear systems [22]. Besides the continuous-time domain, the formulation of CBFs was generalized into discrete-time systems (DCLF-DCBF) in [3], and systems evolving on manifolds [16]. Recently in [23], model predictive control is introduced with control Lyapunov functions to ensure stability.
However, all the previous work on CBFs only uses the information of the current state. Inspired by the idea of model predictive control, DCLF-DCBF can be improved by taking future state prediction into account, yielding a better control policy. This motivates us to investigate the control design of predictive control under the constraints imposed by CBFs. In this paper, we foucs on the discrete-time formulation of control barrier functions applied to model predictive control, which encodes the safety from discrete-time CBFs in MPC.

C. Contribution
The contributions of this paper are as follows.
• We present a MPC-CBF control design for safetycritical tasks, where the safety-critical constraints are enforced by discrete-time control barrier functions. • We analyze the stability of our control design with sufficient conditions, and qualitatively discuss the feasibility in terms of set intersections between reachable sets of MPC and safe sets enforced by CBF constraints along the horizon. • Our proposed method is shown to outperform both MPC-DC and DCLF-DCBF. It enables prediction capability to DCLF-DCBF for performance improvement, and it also guarantees safety via discrete-time CBF constraints in the context of set invariance. • We verify the properties of our control design using a 2D double integrator for obstacle avoidance. Our algorithm is generally applicable and also validated in a more complex scenario, where MPC-CBF enables a car racing on a track while safely overtaking other cars.

D. Paper Structure
This paper is organized as follows: in Sec. II, we present the background of model predictive control and control barrier functions. In Sec. III, we introduce the safety-critical model predictive control design using discrete-time control barrier functions (MPC-CBF). The analysis of stability and feasibility properties is presented and the relations with DCLF-DCBF and MPC-DC are also discussed. To validate the control design and verify the properties of our formulation, a 2D double integrator for obstacle avoidance and a car racing competition example are demonstrated in Sec. IV. Sec. V provides concluding remarks.

II. BACKGROUND
Our proposed safety-critical model predictive control design builds on model predictive control and control barrier functions. We now present necessary preliminaries.

A. Model Predictive Control
Consider the problem of regulating to the origin of a discrete-time control system where x t ∈ X ⊂ R n represents the state of the system at time step t ∈ Z + , u t ∈ U ⊂ R m is the control input, and f is locally Lipschitz. Assume that a full measurement or estimate of the state x t is available at the current time step t. Then a finitetime optimal control problem is solved at time step t. When there are safety criteria, such as obstacle avoidance, the obstacles are usually formulated using distance constraints. The finite-time optimal control formulation is shown in (2).

MPC-DC:
Here x t+k|t denotes the state vector at time step t + k predicted at time step t obtained by starting from the current state x t (2d), and applying the input sequence u t:t+N −1|t to the system dynamics (2b). In (2a), the terms q(x t+k|t , u t+k|t ) and p(x t+N |t ) are referred to as stage cost and terminal cost respectively, and N is the time horizon. The state and input constraints are given by (2c), and distance constraints for safety criteria are represented by function g, in (2e), which could be defined under various Euclidean norms.
Let u * t:t+N −1|t = {u * t|t , ..., u * t+N −1|t } be the optimal solution of (2) at time step t. The resulting optimized trajectory using u * t:t+N −1|t is referred as an open-loop trajectory. Then, the first element of u * t:t+N −1|t is applied to system (1). This feedback control law is given below, The finite-time optimal control problem (2) is repeated at next time step t + 1, based on the new estimated state x t+1|t+1 = x t+1 . It yields the model predictive control strategy. The resulting trajectory using (3) is referred as a closed-loop trajectory. More details can be referred to in [24].

B. Control Barrier Functions
We now present discrete-time control barrier functions that will be used together with model predictive control for our control design, which will be introduced in Sec. III.
For safety-critical control, we consider a set C defined as the superlevel set of a continuously differentiable function h : X ⊂ R n → R, Throughout this paper, we refer to C as a safe set. The function h becomes a control barrier function if ∂h ∂x = 0 for all x ∈ ∂C and there exists an extended class K ∞ function γ such that for the control system (1) satisfies, This condition can be extended to the discrete-time domain which is shown as follows. where i.e, the lower bound of control barrier function h(x) decreases exponentially with the rate 1 − γ. Remark 1: Note that in (6), we defined γ as a scalar instead of a K ∞ function as in (5). Generally, for the discretetime domain, γ could also be considered as a class K function that also additionally satisfies 0 < γ(h(x)) ≤ h(x) for any h(x). However, we will continue to use the scalar form γ in this paper to simplify the notations for further discussions.
Besides the system safety, we are also interested in stabilizing the system with a feedback control law u under a control Lyapunov function V , i.e., We can also generalize it to discrete-time domain, where α > 0 and ∆V (x k , u k ) : Similarly as above, the upper bound of control Lyapunov function decreases exponentially with the rate 1 − α. The discrete-time control Lyapunov function and control barrier function can be unified into one optimization program (DCLF-DCBF), which achieves the control objective and guarantees system safety. This formulation was first introduced in [3] and is presented as follows, DCLF-DCBF: where l is positive, and δ ≥ 0 is a slack variable that allows the Lyapunov function to grow when the CLF and CBF constraints are conflicting. The safe set C in (4) is invariant along the trajectories of the discrete-time system with controller (9) if h(x 0 ) ≥ 0 and 0 < γ ≤ 1.

III. CONTROL DESIGN
After presenting a background of model predictive control and control barrier functions, we formulate the safety-critical model predictive control logic in this section.

A. Formulation
Consider the problem of regulating to a target state for the discrete-time system (1) while ensuring safety in the context of set invariance. The proposed control logic MPC-CBF solves the following constrained finite-time optimal control problem with horizon N at each time step t, MPC-CBF: where (10d) represents the initial condition constraint, (10b) describes the system dynamics, and (10c) shows the state/input constraints along the horizon. The CBF constraints imposed in (10e) are designed to guarantee the forward invariance of the safe set C associated with the discretetime control barrier functions, where ∆h is introduced in (6). Here we have The optimal solution to (10) at time t is a sequence of inputs as u * t:t+N −1|t = [u * t|t , ..., u * t+N −1|t ]. Then, the first element of the optimizer vector is applied, This constrained finite-time optimal control problem (10) is repeated at time step t + 1, based on the new state x t+1|t+1 , yielding a receding horizon control strategy: safety-critical model predictive control.
The system dynamics constraint in (10b) could be linear if we have a linear system, and (10c) could also be linear if X and U are defined as polytopes in the state and input space, respectively. The discrete-time control barrier functions constraints in (10e) are generally non-convex unless the CBFs are linear. This makes the whole optimization in (10) generally become a nonlinear programming problem (NLP).

B. Stability
In DCLF-DCBF, control Lyapunov functions are introduced as optimization constraints (9b) with corresponding slack variable as additional term in the cost function (9a). This allows for the achievement of control objectives represented by CLFs and unifies the formulation under one optimization with CBFs. In our MPC-CBF control design, we have the terminal cost p(x t+N |t ) in (10a) as a control Lyapunov function, which guarantees the stability of the system along the closed-loop trajectory. This stability of the closed-loop system is guaranteed if the following holds, This inequality provides the sufficient conditions for the stability, and comes from the function J * t that should decrease along the closed-loop trajectories, where we have The proof of stability based on (12) could be found in [24,Thm. 12.2].

C. Feasibility
Since the optimization (10) could be a nonlinear programming problem, we are interested in finding under which circumstances this optimization becomes feasible, i.e., the feasible set under the constraints (10b)-(10e) is not empty.
We analyze this feasibility problem qualitatively in the state space. Given current state x t in (10d), the reachable set at horizon step k is defined as a reachable region in the state space, satisfying system dynamics in (10b), input/state constraints in (10c) and initial condition in (10d). This reachable set R(x t , X , U, k) is defined as follows, R(x t , X , U, k) = {x t+k|t ∈ X : ∀i = 0, ..., k − 1, We also define the set of state space satisfying CBF constraints in (10e) and initial condition in (10d) as, where S cbf (k) describes superlevel sets of h satisfying the control barrier function constraints (10e) at each time step along the open-loop trajectory. We illustrate R(x t , X , U, k) and S cbf (k) in the state space shown in Fig. 2, given the initial condition x t . Then, the feasibility of the optimization in (10) turns out to be whether the intersection between the feasible set at each horizon step, R(x t , X , U, k), and the superlevel set of h(x) satisfying the CBF constraints, S cbf (k), is nonempty for all k = 1, ...N .
Remark 2: Note that S cbf (k) is not empty when h is a valid control barrier function. Furthermore, R(x t , X , D, k) is also guaranteed to be nonempty, if we choose X as a control invariant set as discussed in [24,Thm. 11.1 and 11.2].
In order to better understand this problem, we illustrate the level sets of control barrier function constraints as, with several choices of γ. The superlevel set S cbf (k) are the regions illustrated on the left hand side of these level sets, with an example where the robot approaches the obstacle from the left to the right, shown in Fig. 2. We can see that, if γ becomes relatively small, the safe set will be more constrained. In this case, the system tends to be safer, but the intersection between R(x t , X , U, k) and S cbf (k) might be infeasible if γ becomes too small. When the γ becomes larger, the region of S cbf (k) in the state space will be increased. This will make the optimization more likely to be feasible, however, the CBF constraints might not be active during the optimization, if γ is too large. In this case, R(x t , X , U, k) will become a proper subset of S cbf (k).
Remark 3: When γ becomes relatively small, the MPC-CBF controller makes a smaller subset of the safe set C in (4) invariant, and thus is more safer, but this might also make the optimization infeasible. A larger γ will make the optimization more likely to be feasible, but the CBF constraints might not be active during the optimization. We expect that γ is chosen appropriately, such that the intersection between these two sets will not be empty and becomes a proper subset of R(x t , X , U, k). This leads to a tradeoff between safety and feasibility in terms of the choice of γ.
Remark 4: Given x t , X , U, we could pick a value of γ to find a tradeoff between safety and feasibility. However, when the system evolves, this γ might no longer satisfy our safety demand or guarantee the optimization feasibility. Therefore, for a given fixed γ, we generally only have Fig. 3: For MPC-CBF, the feasible set at each horizon step k is the intersection between R(xt, X , U, k) and S cbf (k), colored in yellow. For MPC-DC, the feasible set at each horizon step is the intersection between R(xt, X , U, k) and C, colored with borders in red. We see clearly that MPC-CBF is safer than MPC with distance constraints with smaller set invariance. Moreover, distance constraints might be inactive when the robot is still far away from obstacles, illustrated in (a), where R(xt, X , U, k) is a subset of C. CBF constraints could still be active with appropriate choices of γ even when the robot is far away from obstacles, shown in (a) and (b). pointwise feasibility and a persistently feasible formulation is still an open problem and is part of future work.

D. Relation with DCLF-DCBF
When N = 1, the formulation in (10) could be simplified as an optimization over one step system input u * k , u * k = argmin where p(f (x k , u k )) and q(x k , u k ) are the terminal cost and stage cost which we have seen previously in (10a). The optimization (15) is similar to the DCLF-DCBF formulation (9). The stage cost q(x k , u k ) minimizes the system input, similar as u T k H(x)u k in (9a). The terminal cost minimizes the control Lyapunov function p(f (x k , u k )) in (15a), instead of using CLF constraints as (9b). As we no longer use the CLF constraint, we do not need a slack variable, such as δ in (9a), to guarantee the feasibility.
Remark 5: As the CLF constraints in (9b) are transferred into the cost function in (15) with N = 1, the formulation in (15) becomes similar to DCLF-DCBF. To sum up, our MPC-CBF formulation operates in a similar manner of DCLF-DCBF with prediction N = 1.

E. Relation with MPC-DC
When γ approaches its upper bound of 1, the CBF constraints in (10e) becomes, If g(x) in (2e) and h(x) are the same, these CBF constraints are almost the same as distance constraints defined in (2e) except for one horizon step difference. In other words, the CBF constraints function are at the next predicted horizon step instead of the current horizon step. Moreover, the feasible set at each horizon step k in MPC-DC formulation becomes R(x t , X , U, k) ∩ C. While, as we have seen previously, the feasible set in MPC-CBF formulation at each horizon step k is R(x t , X , U, k) ∩ S cbf (k). Note that S cbf (k) is a subset of C. Therefore, the MPC-CBF formulation in (10) has a smaller safe set than the MPC-DC formulation.
In the case the reachable set R(x t , X , U, k) is a proper subset of the safe set C, then the distance constraints in (2e) are not active in the optimization (2), as shown in Fig. 3a. In other words, the distance constraints will not be active in the optimization (2) until the reachable set along the horizon intersects with the unsafe regions, i.e., the reachable set intersects the obstacles as shown in Fig. 3b. Using our MPC-CBF formulation, the CBF constraints in (10e) could be always active with an appropriate choice of γ whenever the robot tends to approach the obstacles. In this case, even when the reachable set R(x t , X , U, k) is a proper subset of the safe set C, the reachable set could be still constrained by its intersection with S cbf (k), as shown in Fig. 3a.
Remark 6: We discuss the constraint activation only in the cases when the robot is moving towards the obstacles, i.e., there exists a control input u such that h(f (x, u)) < h(x). When the robot is moving away from the obstacles, both distance constraints and CBF constraints are inactive, which is intuitive since the robot is always safe in this case.
Remark 7: Our MPC-CBF formulation is safer than MPC-DC in the context of smaller set invariance, where we can see that R(x t , X , U, k) ∩ S cbf (k) is a proper subset of R(x t , X , U, k) ∩ C, as shown in Fig. 3.
Remark 8: In practice, we may need to use a smaller horizon for speeding up the optimization. To achieve a similar performance compared to the MPC-DC formulation in (2), we could apply smaller γ in our MPC-CBF control design in (10) and use a smaller horizon. This could help us to reduce the complexity of the optimization for obstacle avoidance, as will be shown in Fig. 4e.

IV. EXAMPLES
Having presented the proposed MPC-CBF control design, we now numerically validate it using a 2D double integrator for obstacle avoidance and analyze its properties. We also apply this control design to a competitive car racing problem.

A. 2D Double Integrator for Obstacle Avoidance
Consider a linear discrete-time 2D double integrator system, where we have and the sampling time ∆t is set as 0.2s. A MPC-CBF is designed as in (10) and (11) for 2D double integrator to avoid an obstacle, where the stage cost q(x k , u k ) = x k Qx k + u k Ru k and terminal cost p(x N ) = x N P x N , and Q = 10 · I 4 , R = I 2 and P = 100 · I 4 . The system is subject to state constraint X and input constraints U, The lower and upper bounds are, For discrete-time control barrier function constraint (10e), we choose a quadratic barrier function for obstacle avoidance, where x obs , y obs , and r obs describe x/y-coordinate and radius of the obstacle with x obs = −2m, y obs = −2.25m and r obs = 1.5m, shown as a red circle in Fig. 4. The start and target positions are (−5, −5) and (0, 0), which are labelled as blue and red diamonds. The resulting trajectories of MPC-CBF controller with different choices of γ and N are presented in Fig. 4.

1) Comparison with DCLF-DCBF:
In order to compare the performance between our proposed MPC-CBF and DCLF-DCBF, we develop a DCLF-DCBF controller for the same obstacle avoidance task, which is based on (9).
For the design of DCLF-DCBF, we use R in MPC-CBF example as H in (9) to ensure that we have the same penalty on inputs. The discrete-time CBF constraints of DCLF-DCBF are the same as the ones used in MPC-CBF. Since the terminal cost P is the control Lyapunov function of model predictive control, we choose P in MPC-CBF example as the control Lyapunov function that is used to construct discretetime CLF constraints in (9). Based on these choices, it is fair to compare a DCLF-DCBF controller with a MPC-CBF controller.
The simulation result of MPC-CBF and DCLF-DCBF comparison is shown in Fig. 4a, 4b and 4c. The trajectory is denoted in black line with small circles representing each step. The trajectory of DCLF-DCBF controller with γ = 0.4 is presented in Fig. 4a, where the system does not start to avoid the obstacle until it is close to it. Fig. 4b shows the trajectory for MPC-CBF controller with horizon N = 1 and γ = 0.4. This trajectory is similar to that of DCLF-DCBF controller. Based on our analysis in Sec. III-D, the performances of DCLF-DCBF and MPC-CBF with N = 1 are almost the same, which is validated in this simulation. Fig. 4c shows the trajectory of MPC-CBF controller with horizon N = 8 and γ = 0.4. We can see that this controller can drive the system to avoid the obstacle earlier than the DCLF-DCBF controller. Also, among these three controllers, it is the only one that can reach the goal position in the limited simulation time.
2) Comparison with MPC-DC: A MPC-DC controller is developed based on (2) using the same parameters as MPC-CBF presented before except the discrete-time CBF constraint, which is replaced by a Euclidean norm distance constraint g shown in (2e). The function g has the same expression as h, defined in (18). Fig. 4d and 4e show the simulation result of the comparison between MPC-CBF and MPC-DC. In Fig. 4d Fig. 4e. We notice that MPC-CBF controller with smaller γ and MPC-DC with larger horizon N can make the system avoid obstacles earlier. This verifies our analysis in Sec. III-C, since smaller γ in MPC-CBF and larger horizon N in MPC-DC can activate the safety constraints earlier. We also observe that that even with an extremely large horizon N , e.g. N = 30, the system only has visible obstacle avoidance behavior when it is close to obstacles. In contrary, a relatively small γ is able to make the system avoid obstacles even far away from obstacles.
In Fig. 4e, MPC-CBF with N = 5 and γ = 0.25 starts to turn to avoid the obstacle with a similar behavior as MPC-DC with N = 7. Note that N = 7 in MPC-DC is the minimum horizon to make the optimization program feasible. This property is discussed in Remark 8. Since discrete-time CBF enforces the invariance of safe set, it allows a smaller N for MPC-CBF with a smaller γ to achieve a comparable performance as MPC-DC with a larger N . This property motivates us to apply the MPC-CBF instead of MPC-DC, since MPC-CBF could economize computational time with smaller horizon, as illustrated in TABLE I.

B. Competitive Car Racing
We have evaluated the MPC-CBF design using a 2D double integrator and compared its performance with DCLF-DCBF and MPC-DC. We proceed to implement MPC-CBF in a more complex scenario: competitive car racing.
1) Vehicle Model: We use curvilinear coordinates to describe vehicle states of the ego and other cars in a racing competition. The system dynamics is given as follows, where x t and u t represent the state and input of the vehicle at time step t. Furthermore, f represents the nonlinear lateral vehicle dynamics model from [25,Ch. 2]. The definition of state and input is shown as follows, where s t represents the curvilinear distance travelled along the centerline of the track, e yt and e φt are the deviation distance and heading angle error between vehicle and path. v xt , v yt , φ t are the vehicle longitudinal velocity, lateral velocity and yaw rate in the curvilinear coordinates, respectively. A representation of the state in the curvilinear coordinate is shown in Fig. 5. The inputs are longitudinal acceleration a t and steering angle δ t .
2) Control Design: A MPC-CBF is developed for this competitive car racing example using (10). The stage cost function is designed as follows, where x r = (v t , 0, 0, 0, 0, 0), Q = diag(10, 0, 0, 0, 0, 10) and R = diag (1,10). This cost function allows ego car to track the centerline with a target speed v t while minimizing the tracking error from the centerline. The motion of overtaking other racing cars is considered as CBF constraints in (10e). Assume we have K racing cars competing with ego car. At time step t, each CBF h i t represents the safety criterion between ego car at (s k t , e y k t ) and i-th other racing car at (s i t , e y i t ), described in the curvilinear coordinates, shown in Fig. 5. We choose CBF in a quadratic form as follows, where we assume all racing cars including ego car hold the shape of rectangle with a diagonal length as d.

3) Simulation & Results:
During the competition, we expect ego car to track the centerline with a target speed v t = 0.8m/s. MPC-CBF with a horizon N = 12 updates at 10 Hz. The system dynamics is simulated at 1000 Hz and the controller sampling time is 0.1s. While the system dynamics is simulated using f in (19), we use the linearized dynamics along the centerline to formulate our control design.
In the simulation, we deploy several racing cars to compete with ego car. In order to better illustrate results, a snapshot of overtaking motion with a zoom-in view is shown in   Ego car begins with an initial speed v 0 = 0.2m/s at the origin of the centerline and two other racing cars start in front of ego car. These two cars are simulated to move at a constant speed 0.2m/s while keeping a constant distance deviation e yi from the centerline, where e y1 = 0.1m and e y2 = −0.1m. Fig. 1 demonstrates that the proposed controller can allow ego car to safely race and overtake other racing cars in both left and right directions. Fig. 6a shows the speed profile, where the dashed blue line shows the desired speed. We can see that ego car always tries to catch up to the target speed during the competitive car racing. In Fig. 6b, we could observe two motions of overtaking front racing cars from e ψ and e y . Since these two racing vehicles hold opposite distance deviations from the centerline, ego car overtakes them with right and left turns respectively.

V. CONCLUSION
A safety-critical model predictive control design is proposed in this paper, where discrete-time control barrier function constraints are used in a receding horizon fashion to ensure safety. We present an analysis of its stability and feasibility, and describe its relation with MPC-DC and DCLF-DCBF. To verify our analysis, we use a 2D double integrator for obstacle avoidance, where we can see that MPC-CBF outperforms both MPC-DC and DCLF-DCBF. The proposed control logic is also applied to a more complex scenario: competitive car racing, where our ego car can race and safely overtake other racing cars.