---
title: "Control Barrier Function Based Quadratic Programs for Safety"
description: "How control barrier functions and quadratic programs keep a system within safe limits while pursuing goals such as cruising speed or lane centering."
canonical: "https://research.elamur.ai/free/en/papers/ames-2016-control-barrier-function-based-quadratic/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/ames-2016-control-barrier-function-based-quadratic/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / Control Barrier Function Based Quadratic Programs for Safety Critical Systems

# Control Barrier Function Based Quadratic Programs for Safety Critical Systems

Paper · 2016 · Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle et al.

**Authors:** Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle and Paulo Tabuada · **Year:** 2016 · **Venue:** IEEE Transactions on Automatic Control · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

IEEE Transactions on Automatic Control · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1609.06408)
- [DOI 10.1109/tac.2016.2638961](https://doi.org/10.1109/tac.2016.2638961)
- [arXiv 1609.06408](https://arxiv.org/abs/1609.06408)

## Summary

An adaptive cruise controller has to do more than hold a chosen speed. If traffic ahead slows, maintaining that speed can bring the car too close to the vehicle in front. The controller needs to give up speed tracking soon enough to preserve the following gap, and the braking it requests must be within the car’s limits. The paper develops a way to make that decision for nonlinear systems whose control inputs enter the equations of motion linearly. It represents safety as a set of allowed states and asks which inputs can keep the system in that set as time advances.

The authors develop two kinds of barrier function for answering this question. A reciprocal barrier grows without bound as the state approaches the edge of the allowed set. A zeroing barrier reaches zero there. Both permit some movement towards the edge while the system is safely inside. They differ in how they rule out crossing and in where their guarantees apply. The authors give conditions under which the existence of a barrier proves that the set is preserved, and investigate when preservation of a set also implies the existence of a barrier. For a system with a selectable input, the derivative condition becomes a rule for identifying admissible actions at the current state.

A quadratic program chooses among those actions. It combines the barrier’s safety inequality with a control Lyapunov function, which asks the system to make progress toward a performance target. An additional variable lets the optimizer relax the performance demand when it conflicts with the safety inequality. The safety constraint has no such allowance. The paper proves local Lipschitz continuity, a bound on how quickly the command can change with the state, for its basic optimization under stated conditions. That result helps establish that the feedback produces well-defined trajectories. The proof covers the basic program, and the automotive versions add actuator constraints whose effect on feedback regularity is left open.

In adaptive cruise simulations, the car returns towards the desired speed when the gap allows it and adapts to the lead vehicle when it must. A controller designed around limited wheel force starts braking earlier and respects the force bounds that the unbounded controller can exceed. With the same bounds, a less conservative barrier permits closer following while preserving the specified headway. The authors also use a barrier to govern lane keeping, where the distance to the lane edge must be considered together with lateral motion. The simulated car respects both the lane displacement limit and the lateral acceleration limit. The examples show that the choice of safe set depends on what the actuators can do, while the optimization determines how much performance is possible within that set.

## Deep dive: Control Barrier Function Based Quadratic Programs for Safety Critical Systems

How control barrier functions and quadratic programs keep a system within safe limits while pursuing goals such as cruising speed or lane centering. · about 36 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A permitted state and a state that can stay permitted

The paper starts from a difficulty in systems where software commands physical motion. An engineer can design a controller for each goal in isolation. A cruise controller can try to reduce speed error, and a following controller can try to protect the gap to the car ahead. Both may be designed correctly for their own objectives and still issue incompatible requests. When they share an actuator, the way their requests are reconciled becomes part of the safety problem. That decision recurs as the vehicles move and the circumstances change.

The authors formulate safety as membership in a set of states. Here a state is a collection of quantities that describe the current condition of the system, such as the speeds and separation of the two cars in adaptive cruise control. A set is *forward invariant* if a trajectory beginning in it remains there as time advances, for as long as that trajectory exists. If the state includes everything needed to evaluate a particular safety specification, forward invariance expresses that specification over a trajectory. For following a car, checking that the gap is adequate at the present instant gives only the starting condition. Invariance explains how the gap can remain adequate under the subsequent motion.

The performance objective has a different shape. It asks the state to approach a target, such as the set of states in which the controlled car is traveling at the desired speed. The car may already be in an admissible state while moving much more slowly than that speed. A good controller can keep the state admissible during that period and resume pursuing the target as circumstances change. The authors seek a feedback law that can handle both tasks, including intervals in which pursuing the target at a prescribed rate would conflict with safety.

The distinction also matters for actuator bounds. A vehicle can be inside its lane while moving sideways fast enough that its available lateral acceleration cannot prevent it from crossing the marker. A trailing car can satisfy an instantaneous following rule at a gap from which it cannot handle the lead car’s strongest allowed braking. These are examples of the difference between a state that satisfies a positional requirement and a state from which the requirement can continue to be satisfied. The paper addresses that difference explicitly when it builds the automotive safety sets.

#### What earlier certificates established

The authors describe barrier functions as having roots in optimization, where a barrier can penalize approach to a constraint. They also discuss their use in control and verification, including an interior penalty method in optimal control and certificates for properties such as safety, avoidance, and eventuality. In the dynamical setting, a barrier is useful because an inequality evaluated along the equations of motion can establish invariance without computing the collection of states reachable from every initial condition.

There is a parallel with a Lyapunov function. A Lyapunov function assigns a scalar value to the current state. An appropriate bound on how it decreases along trajectories can establish convergence to a target without solving for every trajectory. A barrier certificate also uses a scalar and a derivative bound. Its task is to keep a trajectory on the allowed side of a boundary. For a controlled system, the derivative depends on the chosen input, so the condition can describe a family of safe inputs. The authors build on earlier work that had already introduced this control interpretation.

The paper identifies a restriction in some earlier barrier conditions. One approach made a barrier that diverges at the boundary decrease or stay constant everywhere inside the set. Another made a function that vanishes on the boundary increase or stay constant. Those rules preserve levels inside the safe set as well as the actual safety boundary. A following car with plenty of space may be able to close part of the gap safely. A rule that forbids any reduction in the barrier margin would discard that maneuver before the controller could consider whether it serves the speed objective. The paper also describes earlier work that relaxed conditions on interior levels. Its own proposal allows the permitted rate of approach to depend on the current barrier margin.

A boundary condition provides another starting point. The paper invokes Nagumo’s theorem to connect invariance to the direction of the dynamics where the state set ends. On the boundary described by a differentiable safety function, the condition used in the paper asks for a non-negative derivative of that function. The authors describe an earlier line of work called invariance control that extends the boundary-based approach to constraints on quantities affected by the input only after further differentiation. They note that such controllers can be discontinuous and can exhibit chattering, or rapid switching. They make the regularity of the feedback part of their own analysis because choosing an allowed input at every state also needs to produce a well-defined closed-loop trajectory.

#### Why put the requirements in one optimization?

An earlier approach discussed by the authors combined stabilization and safety in a single feedback law when their requirements could both be met. That leaves a problem when the input needed for stabilization conflicts with the input needed to stay safe. The adaptive cruise example makes the conflict concrete. A fixed target speed may be higher than the speed the following car can sustain behind a slower lead vehicle. Requiring the speed error to decay at a prescribed rate can then contradict the following constraint.

The optimization formulation also draws on prior work in bipedal control. The authors describe how an inequality for decreasing a control Lyapunov function could be written in terms of the robot’s joint torques and imposed in a quadratic program. Other work took advantage of that representation to accommodate several objectives and constraints on forces or torques. The present paper brings barrier inequalities into the same type of program and makes the requirements asymmetric. The safety condition defines which commands the program may choose, and the performance condition can be relaxed at a cost.

The optimization therefore addresses a choice that remains after the safety proof. A barrier can identify several actions that preserve safety. A performance objective gives a reason to prefer one of those actions, and a quadratic cost resolves the selection. Feasibility still depends on what the system can do. When an actuator is bounded, the paper’s strategy is to construct a safety set from which some input within those bounds can satisfy the barrier. The safety set and the optimization each have a distinct role in obtaining a workable controller.

### The method, step by step

#### Describe the safe set and the equations of motion

The construction starts with a signed safety function. Its sign says which side of the boundary the state occupies, and its magnitude provides the argument for the derivative bound. In the authors’ notation the function is called h. A positive value places the state in the interior of the set. A zero value places it on the boundary, and a negative value puts it outside. The function can encode a physical margin, such as distance remaining after allowance for braking. The general theory uses its value and derivative and does not require it to be the geometric distance to the boundary.

```
C = {x ∈ ℝⁿ : h(x) ≥ 0}
```

Here C is the closed safe set, x is the state, and ℝⁿ is the space of real vectors with n components. The notation ∈ means set membership, and the colon inside the braces introduces the condition for membership. The scalar h(x) is continuously differentiable in the setup. The inequality includes the boundary value 0. The paper also takes the positive values of h to describe the interior and its zero values to describe the boundary.

The authors first study the case with no input to choose. This lets them distinguish the property to be verified from the mechanism that will later enforce it.

```
ẋ = f(x)
```

The dot on x denotes its time derivative, and f is the vector field that assigns a rate of change to each state x. The paper assumes f is locally Lipschitz. In a neighborhood of any given state, this means changes in f are bounded in proportion to changes in the state. This assumption gives local existence and uniqueness for trajectories. The invariant-set results are expressed over the maximal interval on which the trajectory exists. A system is forward complete when that interval has no finite upper endpoint.

To reason about h along a trajectory, the paper uses a Lie derivative, the directional rate of change of a scalar along a vector field.

```
L_f h(x) = ∇h(x) · f(x)
```

The notation L_f h is the Lie derivative of h along f. The gradient ∇h contains the partial derivatives of h with respect to the components of x, and the dot denotes the scalar product with the vector f(x). Along a trajectory of the uncontrolled system, this expression equals the time derivative of h evaluated at the current state. The same notation applies when the scalar of interest is a reciprocal barrier or a Lyapunov function.

From a safety set to a feedback command The steps in order.

#### Choose how the barrier behaves at the edge

A reciprocal barrier is defined inside C. Its value becomes arbitrarily large as the trajectory approaches the boundary. One candidate in the paper is the reciprocal of the safety function.

```
B(x) = 1 / h(x)
```

Here B is the reciprocal barrier candidate and h is the safety function. The formula is defined where h(x) is positive. If h approaches zero from that side, B grows without bound. The paper also uses a logarithmic candidate, including in the automotive examples.

```
B(x) = −log(h(x) / (1 + h(x)))
```

The function log is the logarithm. The argument is the ratio of the positive safety margin h(x) to that margin plus 1. The leading minus sign makes B positive on the interior, and B grows without bound as the argument tends to zero at the boundary.

The simplest derivative rule considered by the authors caps the growth of the reciprocal barrier by a quantity that shrinks as the barrier gets larger.

```
Ḃ ≤ γ / B
```

The symbol Ḃ is the time derivative of B along a trajectory, and γ is a positive design constant. The right-hand side is positive inside the safety set, so the barrier is allowed to grow and the safety margin may decrease. As B becomes large, the allowed growth rate tends to zero. The proof uses a scalar comparison to show that growth subject to this bound cannot take B to infinity in finite time.

The general reciprocal definition uses class K functions. A function in this class is continuous, strictly increasing on its non-negative domain, and zero at the origin. This gives the bounds the authors need near the boundary while allowing different relationships between the barrier and h farther inside.

```
1 / α₁(h(x)) ≤ B(x) ≤ 1 / α₂(h(x))
```

The functions α₁ and α₂ are of class K. The lower bound makes B diverge as a positive h(x) tends to zero. The upper bound is also needed for the comparison argument. It connects the size of B back to an upper bound on h, which in turn bounds how fast B is allowed to increase.

```
L_f B(x) ≤ α₃(h(x))
```

The function α₃ is another class K function and L_f B is the rate of change of B along f. Since α₃ vanishes at zero, the bound on growth diminishes near the boundary. To use the bound, the authors combine it with the upper bound on B and write the resulting growth limit as a class K function of the reciprocal of B. They compare B to a scalar trajectory that solves the corresponding equality. Taking the reciprocal of the scalar trajectory turns growth into decay.

```
ż = −α(z)z²
```

Here z is the reciprocal of the positive scalar comparison trajectory, ż is its time derivative, and α is the class K function obtained by composing α₃ with the inverse of α₂. The square is a result of differentiating the reciprocal. The scalar comparison yields a positive lower bound on z at each finite time. Equivalently, the trajectory used to bound B remains finite. The barrier’s lower bound then keeps h positive for a trajectory starting in the interior. The result thus certifies the interior of C and uses initial states where B is defined.

The zeroing construction uses h itself. It relies on an *extended class K* function, which is continuous and strictly increasing on an interval containing zero and has value zero at zero. This extension lets the inequality be evaluated on either side of the boundary when the chosen domain includes exterior states.

```
L_f h(x) ≥ −α(h(x))
```

Here α is the extended class K function. The inequality holds on a domain D containing C. For positive h(x), the right-hand side is negative, so h may decrease inside. At h(x) equal to zero, the right-hand side vanishes. The condition at that point is the boundary derivative condition used in the paper’s invariance argument. Where the domain extends outside C, h is negative and the lower bound on its derivative is positive, so the dynamics are required to move the value of h towards zero.

A simple zeroing choice makes the lower bound proportional to the current margin.

```
L_f h(x) ≥ −γh(x)
```

The positive constant γ sets the permitted rate of decline of h inside the set. The authors observe that fixing this linear form gives a convex condition when searching numerically for a barrier, and they name sum of squares as an example of a numerical approach. The automotive examples instead construct barriers explicitly from their physical specifications.

When the zeroing condition holds on an open domain around the set, the authors also relate it to stability of the set from outside. They construct a scalar that measures violation.

```
V_C(x) = max(0, −h(x))
```

Here V_C is the Lyapunov candidate associated with the set C, and max selects the larger of its arguments. It is zero in C and positive outside C. Outside, its derivative is the negative of the derivative of h and is strictly negative under the zeroing condition. The paper uses this to obtain asymptotic stability with the stated forward-completeness or compactness qualification. The extension beyond the boundary gives a way to study how perturbations might affect the invariance conclusion.

#### Ask which inputs satisfy the derivative condition

The next step introduces an input. The input is allowed to affect the derivative of the state through coefficients that depend on the state.

```
ẋ = f(x) + g(x)u
```

Here u is the control vector with m components. The function f describes the drift, or motion in the absence of the control term. The matrix-valued function g maps the input to its contribution to the state derivative. This is a control-affine system. The state dependence of f and g may be nonlinear, while the input appears linearly at each fixed state. The admissible inputs form a set U.

For the applications with explicit actuator bounds, the authors represent the input set using linear inequalities.

```
U = {u ∈ ℝᵐ : A₀u ≤ b₀}
```

The space ℝᵐ contains real input vectors with m components. The matrix A₀ gives the coefficients of the input inequalities, and the column vector b₀ gives their bounds. The inequality holds component by component. The paper calls this a convex polytope representation and uses bounds of this form to describe allowed commands.

A reciprocal control barrier function carries over the two bounds on B and puts an existence condition on the rate inequality. The paper states the existence test using an infimum over U. The feedback rule then requires an input that actually satisfies the inequality.

```
K_rcbf(x) = {u ∈ U : L_f B(x) + L_g B(x)u − α₃(h(x)) ≤ 0}
```

The set K_rcbf(x) consists of the admissible inputs that meet the reciprocal barrier bound at state x. The term L_f B is the rate along the drift. The row L_g B contains the derivatives of B along the columns of g, so the product L_g B(x)u is the rate attributable to the chosen control. The function α₃ sets the allowed barrier growth. If a locally Lipschitz feedback always chooses a member of K_rcbf at the current interior state, the uncontrolled barrier argument applies to the resulting closed-loop dynamics.

For a zeroing control barrier function, the definition uses a supremum of the expression that must be non-negative. The set of inputs that meet the inequality is as follows.

```
K_zcbf(x) = {u ∈ U : L_f h(x) + L_g h(x)u + α(h(x)) ≥ 0}
```

Here K_zcbf(x) is the set of inputs that meet the zeroing condition at x. The terms L_f h and L_g h(x)u give the drift and input contributions to the derivative of h, and α is extended class K. A feedback with the regularity required in the paper that chooses from this set preserves the closed safe set. In both constructions, the derivative condition is affine in the input. At a fixed state it cuts out a half-space when its input coefficient is non-zero. This makes it possible to impose the condition in the same program as the actuator bounds.

#### Account for inputs that affect safety indirectly

Some safety specifications depend on a quantity whose first derivative has no input term. In lane keeping, steering affects lateral acceleration, while the first derivative of lateral displacement describes motion that is already underway. The paper uses *relative degree* to count how many derivatives of a quantity are needed before the control input appears. If the relative degree of h exceeds one, an inequality on the first derivative of h alone gives no way to choose between inputs at that state. Either all inputs meet that inequality or none do.

For inputs without bounds, the authors show how to build a reciprocal barrier that includes a higher derivative of h.

```
B_r(x) = 1 / h(x) + H(L_fʳ⁻¹ h(x))
```

Here r is the relative degree of h, and L_fʳ⁻¹ h means applying the Lie derivative along f a total of r minus one times. The function H is a differentiable scalar function with non-negative bounded values and a derivative that never vanishes. The new barrier B_r retains the divergent reciprocal term. Because H has bounded values, adding it preserves the bounds needed near the safety boundary.

The derivative of the added term introduces a non-zero input coefficient. Differentiating along a column of g brings in the derivative of H and the Lie derivative along that column of the already differentiated safety function. The definition of relative degree is what makes the latter quantity non-zero. With unrestricted inputs, a non-zero coefficient allows an input to meet the scalar barrier inequality. The authors also outline a zeroing construction using a positive bounded multiplier applied to h. The input coefficient in these constructions gives a way to influence the derivative. It does not establish that every inequality can be met with a bounded actuator.

#### Add the performance condition and select a command

For performance, the authors consider a control Lyapunov function that requests exponential convergence of a controlled part of the state. The remaining state variables describe dynamics on the target surface. In cruise control, speed error is the controlled quantity. A function of that error measures progress towards the surface where the error is zero.

```
c₁‖x₁‖² ≤ V(x) ≤ c₂‖x₁‖²
```

Here V is the control Lyapunov function, x is the full state, and x₁ is the controlled part whose target is zero in these coordinates. The bars ‖ ‖ denote the Euclidean norm. The positive constants c₁ and c₂ bound the Lyapunov value above and below by multiples of the squared error. These bounds let a decay guarantee for V imply a convergence guarantee for x₁.

```
L_f V(x) + L_g V(x)u + c₃V(x) ≤ 0
```

The terms L_f V and L_g V(x)u give the rate of V along the drift and under the input. The positive constant c₃ sets the requested decay rate of V. If the inequality holds along the trajectory, V decreases at least as fast as prescribed by the exponential bound. The corresponding control Lyapunov function condition asks whether an input can meet the inequality at each state. A minimum-norm controller can select the qualifying input with the smallest Euclidean norm, and the paper uses that construction to motivate a quadratic objective.

The combined controller makes the decrease condition adjustable. It chooses a decision vector containing both the input and a scalar relaxation.

```
w*(x) = argmin_w [½ wᵀH(x)w + F(x)ᵀw]
```

The vector w stacks the control input u and the scalar relaxation δ. The symbol w*(x) denotes the minimizing vector at the current state x, and argmin denotes selection of the argument that minimizes the expression subject to the constraints. The superscript ᵀ denotes transpose. The matrix H(x) is positive definite and sets the quadratic cost, and the vector F(x) supplies the linear term. The matrix H in this objective has a different role from the scalar function H used in the higher-relative-degree construction.

```
L_f V(x) + L_g V(x)u + c₃V(x) − δ ≤ 0
```

The scalar δ is the allowance in the performance condition. If δ is zero, the inequality is the full Lyapunov decrease requirement. A positive δ lets the optimizer accept a smaller rate of decrease or a temporary increase in V. There is no matching variable in the safety inequality. The optimizer can therefore accommodate a conflict with performance whenever it has a safe input available. The objective can penalize use of the allowance, and its weight affects which of the safe actions the program prefers.

For the reciprocal formulation, the safety inequality is the one defining K_rcbf. A zeroing inequality can take its place in a program based on K_zcbf. If there are input bounds, the candidate must also satisfy those. The optimizer is evaluated using the current state, and the input part of its solution is applied to the system. The paper’s procedure begins with the equations of motion, the safety specification, and the intended target. The vehicle parameters, feedback gains, and cost weights serve different purposes, but none is learned by fitting a controller to a collection of labeled trajectories.

The authors also prove a regularity result for the basic program with one Lyapunov inequality and one reciprocal barrier inequality. They translate the decision variable by the unconstrained minimizer and express the new problem as a minimum in a norm weighted by H. In those coordinates they can study which of the inequalities is active, meaning that it holds with equality at the optimum. The relaxation coordinate gives the Lyapunov inequality a non-zero coefficient in a direction where the barrier inequality has coefficient zero. When the barrier has a non-zero input coefficient, the two constraint directions are linearly independent.

```
Gᵢⱼ(x) = yᵢ(x)ᵀH(x)⁻¹yⱼ(x)
```

Here yᵢ and yⱼ are the column vectors of coefficients of the indexed inequalities in the original decision coordinates, i and j index the Lyapunov and barrier rows, and H(x)⁻¹ is the inverse of the cost matrix. The collection of entries Gᵢⱼ forms the Gram matrix, a matrix of inner products of constraint directions in the transformed problem. It is positive definite under the independence condition. This gives a unique set of coefficients for the constrained solution. The paper computes them by considering when each row is binding and shows that the formulas agree at their shared boundaries because the optimum is unique. Under the stated regularity and relative-degree conditions, the feedback is locally Lipschitz on the interior.

#### Construct a following margin that includes braking

In adaptive cruise control, the authors describe straight-line motion of a following vehicle and a lead vehicle. The state contains their speeds and the gap. The following vehicle takes wheel force as input. Its acceleration also depends on resistance. The lead vehicle’s acceleration is a disturbance with specified acceleration and deceleration bounds. The gap changes at the difference between the two speeds.

```
Ḋ = v_l − v_f
```

Here D is the gap, Ḋ is its time derivative, v_l is the lead vehicle’s speed, and v_f is the following vehicle’s speed. A negative gap derivative means the follower is closing on the leader. For the initial formulation, the authors express the time-headway requirement using a signed function.

```
h(x) = D − τ_d v_f
```

The symbol τ_d is the desired time headway, the multiplier that converts the following speed v_f into the required gap. The paper gives τ_d = 1.8 for its example of the headway rule. The safety function is the gap remaining after subtracting the required distance. This expression changes directly with the following car’s acceleration, so the wheel force enters its derivative. The performance function is the squared error between the following car’s speed and the desired cruising speed.

```
V(x) = (v_f − v_d)²
```

Here v_d is the desired speed. The square is zero at the speed target and positive when the following car is either slower or faster. With unbounded wheel force the authors can find a control satisfying the reciprocal barrier condition for the headway margin. They build the first cruise quadratic program from that condition and the relaxed speed requirement. Their cost penalizes the control effort in a coordinate that removes the resistance term from the acceleration equation, together with a penalty for relaxing the Lyapunov inequality.

With bounded force, an instantaneous headway margin can be positive even when continued safety is impossible under the braking limit. The authors construct a stronger requirement for the force-constrained program. They imagine the leader braking at its maximum allowed rate and ask what initial gap would suffice if the follower responds with its own maximum permitted braking. The appendix does the calculation without the follower’s resistance term and assumes immediate braking. In the original equations the authors treat resistance as helping braking.

```
Δᵒ* = max_{t ∈ [0,T_f]} [Δ(t) + τ_d(v_f − a_fgt)]
```

Here Δᵒ* is the required initial gap in the construction called optimal, t is time since braking began, and T_f is the follower’s stopping time under maximum braking. The function Δ(t) is the distance the follower has traveled minus the distance the leader has traveled up to time t. The leader’s traveled distance becomes constant after its stopping time if it stops first. The coefficient a_f is the follower’s deceleration limit expressed as a fraction of gravitational acceleration g. The speed v_f in this calculation is the follower’s starting speed. The term multiplied by τ_d is the headway distance still required at time t. The maximum over the braking interval requires the initial gap to meet the most demanding part of that interval, which can occur before the follower stops.

The difference between the actual gap D and this required gap is the optimal force-based safety function hᵒ_F. A second construction makes the calculation simpler by using the headway distance at the initial speed throughout the hypothetical stop. This yields the conservative requirement Δᶜ* and its margin hᶜ_F. The conservative gap is at least as demanding because the follower’s required headway would otherwise fall as it slows. The authors use either margin directly for a zeroing barrier or transform it into a reciprocal barrier. The safety inequality and the wheel-force bounds are both hard constraints. The example illustrates how a safe action can be verified by a braking command while the optimizer remains free to choose a different command if it also satisfies the inequality.

#### Include the motion toward a lane boundary

For lane keeping, the authors use lateral displacement, lateral velocity, yaw angle error, and yaw rate as state variables. The longitudinal speed is held constant, and the lateral dynamics use linear tire forces. The input is the angle of the front wheels. Road curvature supplies a desired yaw rate, which enters as a disturbance. The geometric constraint bounds the absolute displacement from the lane center, and a separate constraint bounds the absolute lateral acceleration.

The authors construct the force-based lane barrier from the distance needed to stop lateral motion. If the vehicle is moving toward one side, the relevant space is the distance from its current position to the marker on that side. The barrier subtracts the stopping distance available under maximum allowed lateral acceleration.

```
h_F(x) = y_max − sgn(ẏ)y − ½ẏ² / a_max
```

Here h_F is the force-based lane margin, y is displacement from the lane center, and y_max is the displacement limit. The quantity ẏ is the rate of displacement in the road-fixed coordinate. The sign function sgn identifies the side towards which that displacement is changing. The positive value a_max is the limit on the magnitude of lateral acceleration. The final term is the lateral stopping distance for the current rate of motion and the allowed acceleration magnitude.

Where the vehicle has non-zero lateral motion, the authors show that the steering input corresponding to maximum allowed acceleration against that motion can make the derivative of the margin non-negative. They also discuss the limit of the derivative as lateral motion tends to zero. Steering values that respect the acceleration limit can be expressed as an interval at the current state. The paper intersects the interior of the force-based set with the geometric lane requirement. On a lane edge in that intersection the motion points inward, which explains why preserving the force-based condition also preserves lane membership for the stated starting set.

The lane example uses a nominal linear steering controller for centering and permits a deviation from its requested input.

```
u = −K(x − x_ff) + δ
```

Here u is the steering input, K is the feedback gain, x is the vehicle state, and x_ff is a feedforward state term used to reduce tracking error on a curved road. The scalar δ allows a deviation from the nominal feedback command when needed to meet the safety constraints. The authors obtain K by solving a linear-quadratic regulator problem for the lateral dynamics. They also explain how a quadratic Lyapunov function could be used to formulate the steering objective in the same form as the cruise example. In the simulation they use the nominal command and its permitted deviation, which shows how the barrier can govern the use of an existing feedback design.

### Experiments and results

#### Adaptive cruise control behind a changing lead vehicle

The evidence comes from simulated trajectories of the automotive systems. For cruise control, the authors start the following car at 18 m/s, the lead car at 10 m/s, and the gap at 150 m. They set the desired cruising speed to 22 m/s, also given as 79.2 km/h. The lead vehicle can change speed within its stated acceleration and braking bounds. The controller has to deal with a following vehicle that is already moving faster than the leader, while the requested cruising speed is higher still.

Initial vehicle speeds and the cruise target in the adaptive cruise simulation The controlled car starts faster than the lead car and below its desired cruising speed.

**The numbers**

| System or setting | speed (m/s) |
| --- | --- |
| Lead car at initialization | 10 |
| Controlled car at initialization (this paper) | 18 |
| Desired cruising speed setting | 22 |

The chart compares the speeds that define the simulation scenario. The controlled car is the one equipped with the paper’s controller. Higher speed orders the values in the chart, while the appropriate speed on the road depends on the available headway. The outcomes are reported through speed, acceleration or force, and safety-margin trajectories. The paper gives the speed target and the initial speeds as exact scalar values and presents the controller comparisons as time plots.

The simulations compare the basic cruise quadratic program with the force-constrained program using the conservative and optimal reciprocal barriers. In the basic program, the follower reaches the desired cruising speed when the headway condition allows. When it catches a slower lead car, it settles to the lead car’s speed as needed to protect the gap. The plotted headway margin stays positive. The acceleration plot shows that this controller can exceed the indicated comfort limits, as its optimization has no wheel-force constraint. This result shows how a controller can satisfy its encoded headway rule while issuing physically or practically undesirable commands.

The force-constrained program includes both acceleration-side and braking-side wheel-force bounds. The paper’s simulation parameters assign 0.25 to each of the follower’s acceleration and deceleration force fractions, with the force scale set by the follower mass and gravitational acceleration. The follower mass used in simulation is 1650 kg. The wheel force affects acceleration along with the resistance term. The force comparison therefore concerns the commanded input, while the acceleration preview also shows the motion that results.

In the force-constrained runs, the car approaches the desired speed more slowly and begins braking earlier than in the run with unconstrained force. The authors report that the force bounds are satisfied throughout the runs with the force-based barriers. The headway trace also shows that the barrier based on the optimal stopping calculation permits a smaller following distance than the conservative barrier while meeting the same time-headway requirement. The important outcome is joint compliance. A trajectory must satisfy both the headway rule and the input-force rule at the same time.

The paper also runs the constrained controller with the zeroing versions of the conservative and optimal margins. The force-constraint plots compare these with their reciprocal counterparts. Both kinds preserve the stated constraints in the reported runs. The authors describe the zeroing implementation as giving a smoother input trajectory in their limited experience and point to the plots as the evidence. They do not assign a scalar score to smoothness or report a distribution across scenarios.

#### Lane keeping on a curved road

The lane-keeping simulation runs with the constant longitudinal speed set to 27.7 m/s. The displacement bound is 0.9 m from the lane center, and the lateral acceleration bound is 0.3g. The road is curved. The plotted quantities are lateral displacement, lateral acceleration, and the barrier value. Each shows a different aspect of the controller’s behavior. The displacement trace shows where the vehicle is in the lane. The acceleration trace shows whether the maneuver respects the allowed lateral response. The barrier trace indicates whether the state satisfies the margin that accounts for both position and lateral motion.

The nominal feedback gain comes from a linear-quadratic regulator with a control weight of 600. The state weighting uses a preview output corresponding to roughly 0.7 seconds. The paper gives a proportional gain coefficient of 5 and a derivative gain coefficient of 0.4 for that weighting. The feedforward term incorporates the desired yaw rate associated with the road and is included to reduce tracking error. These settings define the nominal centering behavior that the quadratic program can adjust.

The authors report that the absolute displacement stays within 0.9 m and the absolute lateral acceleration stays within 0.3g. These numbers are the imposed bounds, and the results show compliance over the simulated trajectory. The paper presents one lane-keeping controller in this experiment, with the nominal steering law embedded in the optimization. The plot illustrates the behavior of the resulting controller and does not provide a separate trajectory for the nominal law alone.

The automotive results use physical quantities and constraints in place of a benchmark score. There are no training, validation, or test splits. For the cruise comparison, the starting state is held fixed across the formulations and the traces show when and how the controller intervenes. For the lane experiment, the trace establishes that the displayed maneuver respects the two stated limits under the chosen conditions. The mathematical guarantees have a separate basis in the barrier conditions and the assumptions about the dynamics and feedback.

### What the ablations show

#### Changing the input limits changes the safety calculation

The paper offers controlled comparisons of formulations in cruise control. The first compares the basic program with a force-constrained program and its redesigned barrier. The desired speed, headway requirement, and starting state are common to the comparisons. The force-aware versions have to start preparing earlier for a slowdown because they cannot request the same braking action as the unbounded program. Their slower approach to the cruising speed is also consistent with the cap on the drive force. The plotted behavior shows how limits on the command affect when the controller can afford to intervene.

This comparison changes two related parts of the design together. It adds explicit force bounds and changes the barrier to account for what those bounds allow. The two changes are paired because a headway inequality based on unrestricted braking can be infeasible at states where the instantaneous gap is still acceptable. The experiment establishes the behavior of the joint redesign. It does not isolate the effect of adding input bounds while leaving the original safety set unchanged.

The basic run is also a check on how to read the hard constraint. A positive headway margin in that run certifies agreement with the headway rule shown in the plot. The middle plot shows acceleration outside the desired comfort region. Those observations can hold together because the basic program constrains only the former. The force-constrained program succeeds by making both requirements part of the construction, including at states where limited braking first matters.

#### Changing the margin changes how much space the follower preserves

Within the force-constrained cruise controller, comparing the conservative and optimal barriers focuses on the definition of the safe set. Both use the same idea of immediate braking within the allowed command range. The conservative calculation reserves the distance associated with the initial speed throughout the hypothetical stop. The optimal calculation allows the required time-headway distance to fall with the follower’s speed. That difference changes how much room the controller can use while the cars are approaching one another.

In the simulations, the optimal reciprocal version follows more closely while the plotted headway remains acceptable. This is consistent with the analytical comparison of the gap requirements. The paper’s use of *optimal* refers to the maximal safe set from its simplified braking calculation. The experiment illustrates the additional room in that set. It does not measure an optimum over fuel use, passenger comfort, travel time, or any larger trip objective.

The comparison also helps explain why the measured headway margin and the implemented barrier can differ. The headway plot shows the distance in excess of the immediate rule. The force-aware barrier is built from a gap sufficient for future motion under the bounded braking scenario. A controller may have to act while the immediate margin is still comfortably positive. In this setup, that earlier action is a consequence of preserving the ability to meet the rule later.

#### Changing the barrier representation changes the input trace

The reciprocal and zeroing comparison holds the choice of underlying force-aware safety margin fixed within each pairing. Given a conservative margin, the authors can use its zeroing condition or apply a reciprocal transformation and constrain the derivative of the transformed quantity. They do the same with the optimal margin. The shared geometry of the allowed states lets the comparison focus more directly on the two derivative rules. A controller can choose different actions under those rules even when both use the same margin to define the safe set.

The force plots show that either version can respect the limits in the displayed cruise simulations. The authors find the zeroing trajectories smoother and suggest a reason. The local Lipschitz constant of a reciprocal barrier can become arbitrarily large near the boundary, where the barrier diverges. A zeroing function has finite value there. The paper presents this as an interpretation of the comparison. The evidence is the shape of the input traces, and neither the experiments nor the continuity theorem establish a general ranking of controller smoothness.

#### What the analytical comparisons establish

The paper also compares the barrier constructions by asking which implications hold in the other direction. Reciprocal barrier existence is sufficient to preserve the interior. A zeroing barrier gives preservation of the closed set under the paper’s boundary argument. For a nonempty compact invariant set in the paper’s setup, the authors recover a zeroing condition on the set by bounding the worst value of the derivative in slices of the safety function. Each slice includes the states with a non-negative margin up to a chosen value. Compactness gives a finite worst derivative on the slice. The authors then bound the resulting function by a class K function.

A stronger condition, strict inward motion everywhere on the boundary of a compact set, yields the inverse of h as a reciprocal barrier as well as a zeroing barrier. The proof divides the interior into a region near the boundary, where the derivative remains inward by continuity, and a region away from the boundary, where a sufficiently large constant can bound the allowable decline. The authors also give a noncompact example in which the boundary points inward but the derivative becomes arbitrarily negative along a fixed positive level of h. A derivative bound expressed only in terms of that level cannot cover the whole level set. Thus the compactness assumption does work in the converse argument. The comparison explains why an easy-to-state boundary property and a useful interior inequality require different checks.

### Limitations

#### Limits stated by the authors

The invariance conclusions apply on the maximal existence interval of the closed-loop trajectory. Choosing inputs that satisfy a control barrier inequality does not, on its own, establish forward completeness. A duration guarantee for all future time needs a closed-loop solution that exists for all future time. There is also a domain difference between the two certificates. A reciprocal barrier is defined in the interior, and its invariance result starts there. The zeroing construction can address initial states on the boundary of the closed set.

The local Lipschitz proof for the optimization covers the program with a reciprocal barrier constraint and a relaxed Lyapunov constraint under its regularity assumptions and a non-zero barrier input coefficient. The authors explicitly leave the effect of added input inequalities on that proof open. They construct the automotive examples so there is a feasible command under the bounds throughout the relevant safe set. Pointwise feasibility supplies a command to the optimizer. To infer the full trajectory guarantee using the paper’s feedback corollaries, regularity of the selected control law is a separate consideration.

The higher-relative-degree construction has a related restriction. A non-zero input coefficient is enough to choose an input meeting a scalar inequality when the input can have arbitrary magnitude. A bounded input might produce too small a change in the barrier derivative. The authors identify finding suitable barriers for general bounded-input systems with higher-relative-degree safety functions as an open problem. Their force-based automotive barriers are specific constructions using braking or lateral stopping calculations. The conclusion also leaves open how to characterize and compute corresponding barriers for more general systems and how to compose multiple safety specifications, including speed control and lane keeping in the same vehicle.

The cruise barrier called optimal is maximal for the simplified braking dynamics used in the appendix. The derivation sets aside the resistance term and assumes there is no reaction delay. Resistance assists braking in the original equations, which is the authors’ reason for using the simplified construction there. The stated maximality belongs to the simplified calculation. The paper also qualifies its observation about smoother zeroing-barrier inputs as limited experience.

#### Limits visible in the setup and evidence

The safety claim is relative to the state set, dynamics, and input conditions used in the argument. The cruise controller protects a time-headway rule for point masses traveling in a straight line under a bounded lead-vehicle disturbance. The lane controller protects a lateral displacement limit with constant longitudinal speed and a linear description of tire forces. These formulations make the relationship between available control and future safety explicit. They leave other operating conditions outside the demonstrated cases, including simultaneous longitudinal and lateral control, delayed actuation, and errors in the quantities used to evaluate the barrier.

A sampled implementation raises a further distinction. The proof uses a pointwise derivative condition along a continuous trajectory. The reported simulations show the selected inputs and trajectories for the cases studied. They do not quantify how finite sampling, state-estimation error, or numerical optimization tolerance affects the available safety margin. The paper points to related real-time implementations, including scale-car cruise control, but the plots in this paper report simulations. The earlier experiments serve as implementation context for the approach.

The experimental design illustrates the mechanism with time histories. The cruise runs use a common initial condition, and the lane-keeping run shows a curved-road maneuver at the chosen speed. The results do not estimate how often a limit would be encountered across varied traffic or roads, or how frequently an initial state belongs to one force-aware set and falls outside the other. The plots also leave questions about cost tuning open. A greater relaxation penalty can make the optimizer pursue the Lyapunov condition more strongly when it has room to do so. Since the constraint is soft, the selected input still depends on the cost, the actuator bounds, and the geometry of the constraints at that state. A feasibility result gives no universal settling time or bound on accumulated tracking error.

Finally, the paper’s two ways of reasoning about safety emphasize different checks. The zeroing proof uses the derivative at the boundary and a condition tied to the sign of the safety function. The reciprocal proof uses a bound on how the barrier can grow throughout the interior. Applying either to a new system requires verifying the hypotheses for the chosen representation. An invariant set alone does not supply a useful derivative bound for every choice of safety function or input range. The authors’ noncompact example makes this dependence concrete even before actuator bounds enter the problem.

### What came after

The paper identifies related work on requirements that arise when taking the construction beyond a single safety constraint. A composition study it cites addresses correctness guarantees for using adaptive cruise control and lane keeping together. The driving examples developed in this paper are separate. Their force-based sets were derived for different equations of motion and different actuators, so a joint formulation has to establish that the required constraints can be met together. The companion study concerns that composition question. The reference establishes the direction of the work, and the paper does not report the composition study’s results.

The authors also point to related constructions for constraints with higher relative degree. One uses a backstepping-inspired approach to constructing reciprocal barriers and applies barrier-based quadratic programming to bipedal walking. Another considers exponential control barriers for safety constraints whose input appears only after further differentiation. These are cited alongside the paper’s own construction. They show which technical issue motivated different approaches, while the paper leaves general bounded-input feasibility open.

The related scale-car study takes the cruise controller into an embedded experimental setting, a step the authors mention when discussing the simulation comparisons. The paper identifies this as a conference implementation and gives no new numerical comparison from those experiments. It likewise names prospective applications in robotics, including collision avoidance and constraints on the placement of a robot’s end effector or foot. Those applications are directions proposed in the conclusion. The documented work concerns composition, higher relative degree, and embedded cruise control alongside the paper’s development, with no later citing studies identified.

## Cite

Cite as Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle and Paulo Tabuada. 2016. Control Barrier Function Based Quadratic Programs for Safety Critical Systems. IEEE Transactions on Automatic Control.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.1109/tac.2016.2638961](https://doi.org/10.1109/tac.2016.2638961) · [arXiv 1609.06408](https://arxiv.org/abs/1609.06408)

```bibtex
@article{ames2016control,
  title = {{Control Barrier Function Based Quadratic Programs for Safety Critical Systems}},
  author = {Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle and Paulo Tabuada},
  journal = {IEEE Transactions on Automatic Control},
  year = {2016},
  doi = {10.1109/tac.2016.2638961},
  eprint = {1609.06408},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/tac.2016.2638961}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
