Algorithm Search⌘K

Definitionresearch

Control barrier function

Also called CBF.

A function whose zero superlevel set some input can keep forward invariant, used to state safety the way a CLF states stability.

A control barrier function (CBF) for a system with an input is a function hh such that, at each state, some input keeps hh from falling too fast. The safe set is C={x:h(x)≥0}C = \{x : h(x) \ge 0\}. If the input always satisfies the CBF condition, a state that starts in CC stays in CC. A control Lyapunov function says that some input can make a function decrease to zero, which gives stability. A CBF says that some input can stop a function from becoming negative, which gives safety. The condition is linear in the input for a control-affine system, so it fits in a quadratic program: the CBF safety filter is the controller that uses it. A barrier certificate is a different object: it proves that a system without a free input, or with a fixed feedback, never reaches an unsafe set.

Definition

Setting. The system is x˙=f(x)+g(x)u\dot x = f(x) + g(x) u with x∈Rnx \in \mathbb{R}^n, u∈U⊆Rmu \in U \subseteq \mathbb{R}^m, and ff, gg locally Lipschitz. The function h:D→Rh : D \to \mathbb{R} is continuously differentiable on an open set D⊆RnD \subseteq \mathbb{R}^n, and the safe set is C={x∈D:h(x)≥0}C = \{x \in D : h(x) \ge 0\}, with C⊆DC \subseteq D closed. The Lie derivatives are Lfh(x)=∇h(x)Tf(x)L_f h(x) = \nabla h(x)^T f(x) and Lgh(x)=∇h(x)Tg(x)L_g h(x) = \nabla h(x)^T g(x), so h˙=Lfh(x)+Lgh(x) u\dot h = L_f h(x) + L_g h(x)\, u along a solution.

Extended class K function. A function α:(−b,a)→R\alpha : (-b, a) \to \mathbb{R}, with a,b>0a, b > 0, is an extended class K function if it is continuous, strictly increasing and α(0)=0\alpha(0) = 0. It is extended class K infinity if it is defined on all of R\mathbb{R} and α(s)→±∞\alpha(s) \to \pm\infty as s→±∞s \to \pm\infty. The common choice is α(s)=γs\alpha(s) = \gamma s with γ>0\gamma > 0.

Definition (zeroing CBF, Ames et al. 2017). hh is a control barrier function on DD if there is an extended class K function α\alpha with

sup⁡u∈U[Lfh(x)+Lgh(x) u+α(h(x))]≥0for all x∈D.\sup_{u \in U} \bigl[ L_f h(x) + L_g h(x)\, u + \alpha(h(x)) \bigr] \ge 0 \quad \text{for all } x \in D.

The set of good inputs at xx is Kcbf(x)={u∈U:Lfh(x)+Lgh(x) u+α(h(x))≥0}K_{\text{cbf}}(x) = \{u \in U : L_f h(x) + L_g h(x)\, u + \alpha(h(x)) \ge 0\}. With U=RmU = \mathbb{R}^m the supremum is +∞+\infty when Lgh(x)≠0L_g h(x) \neq 0, so the condition reduces to

Lgh(x)=0⟹Lfh(x)+α(h(x))≥0,x∈D.L_g h(x) = 0 \quad \Longrightarrow \quad L_f h(x) + \alpha(h(x)) \ge 0, \qquad x \in D.

What it gives (theorem, Ames et al. 2017). If hh is a CBF on DD and k:D→Uk : D \to U is a locally Lipschitz feedback with k(x)∈Kcbf(x)k(x) \in K_{\text{cbf}}(x) for all x∈Dx \in D, then CC is forward invariant for x˙=f(x)+g(x)k(x)\dot x = f(x) + g(x) k(x): a solution that starts in CC stays in CC while it exists. The proof is the comparison argument: h˙≥−α(h)\dot h \ge -\alpha(h) along the solution, and the solution of y˙=−α(y)\dot y = -\alpha(y) from y(0)≥0y(0) \ge 0 never becomes negative. The full proof is on the CBF safety filter page. The positively invariant set page gives the general notion.

Reading the condition. Inside CC, where h>0h > 0, the term α(h)\alpha(h) is positive, so hh may decrease, but less fast as it nears 0. On the boundary h=0h = 0, the condition says h˙≥0\dot h \ge 0 for some input. Outside CC but in DD, α(h)<0\alpha(h) < 0, so the condition asks that hh increase, and a state that starts a little outside CC is pushed back. This is why DD is an open set that is larger than CC. It makes the condition robust to small errors.

Other forms.

  • Reciprocal CBF. A function BB that goes to +∞+\infty at the boundary of CC, with B˙≤γ/B\dot B \le \gamma / B for some input. Ames et al. (2014, 2017) defined it before the zeroing form. It is not defined outside CC, so it has no robustness margin, and it is less used now.
  • Bounded inputs. With a bounded UU, the reduction to the test on Lgh=0L_g h = 0 fails, and hh may be a CBF for U=RmU = \mathbb{R}^m but not for UU (see the second example).
  • High relative degree. If Lgh=0L_g h = 0 on all of DD, the input does not appear in h˙\dot h, and the condition is a constraint on the state, not on the input. Exponential CBFs (Nguyen and Sreenath 2016) and high-order CBFs (Xiao and Belta 2019) apply the condition to a chain of derivatives of hh instead. The number of derivatives is the relative degree of hh.

Examples and non-examples

Interval with a free input. For x˙=u\dot x = u with u∈Ru \in \mathbb{R} and h(x)=1−x2h(x) = 1 - x^2, C=[−1,1]C = [-1, 1]. Lfh=0L_f h = 0 and Lgh=−2xL_g h = -2x. Lgh=0L_g h = 0 only at x=0x = 0, where h=1h = 1 and α(1)>0\alpha(1) > 0. So hh is a CBF on D=RD = \mathbb{R} for every extended class K infinity α\alpha.

The same set with a bounded input. Take ∣u∣≤1|u| \le 1 and α(s)=s\alpha(s) = s. The supremum over ∣u∣≤1|u| \le 1 of −2xu+(1−x2)-2x u + (1 - x^2) is 2∣x∣+1−x22|x| + 1 - x^2, which is nonnegative for ∣x∣≤1+2|x| \le 1 + \sqrt 2. So hh is a CBF on D=(−(1+2),1+2)D = (-(1 + \sqrt 2), 1 + \sqrt 2), an open set that contains CC.

Unstable system, bounded input: a non-example. For x˙=x+u\dot x = x + u and h(x)=2−xh(x) = 2 - x, Lfh=−xL_f h = -x and Lgh=−1L_g h = -1. With u∈Ru \in \mathbb{R}, Lgh≠0L_g h \neq 0 everywhere, so hh is a CBF on R\mathbb{R}. With ∣u∣≤1|u| \le 1, the supremum at x=2x = 2 is −2+1+α(0)=−1<0-2 + 1 + \alpha(0) = -1 < 0, so hh is not a CBF for any α\alpha. At x=2x = 2 every allowed input gives x˙≥1\dot x \ge 1, and the state leaves CC. The set C=(−∞,2]C = (-\infty, 2] cannot be kept invariant.

The same system with a smaller set. With ∣u∣≤1|u| \le 1, the set x≤1x \le 1 is the largest set of the form (−∞,c](-\infty, c] that the input can hold, because x˙=x+u≤0\dot x = x + u \le 0 at x=cx = c needs c≤1c \le 1. Take h(x)=0.5−xh(x) = 0.5 - x and α(s)=s\alpha(s) = s. The supremum is −x+1+0.5−x=1.5−2x-x + 1 + 0.5 - x = 1.5 - 2x, which is nonnegative for x≤0.75x \le 0.75. So hh is a CBF on D=(−∞,0.75)D = (-\infty, 0.75). The gap between CC and the largest holdable set gives the margin.

Relative degree 2: a non-example. For the double integrator x˙1=x2\dot x_1 = x_2, x˙2=u\dot x_2 = u and h=−x1h = -x_1 (stay at x1≤0x_1 \le 0), Lgh=0L_g h = 0 everywhere and Lfh=−x2L_f h = -x_2. The condition reads −x2+α(−x1)≥0-x_2 + \alpha(-x_1) \ge 0, which fails at states with x1≤0x_1 \le 0 and a large x2x_2, for every α\alpha. So hh is not a CBF, and the set CC is not even holdable: at x=(0,1)x = (0, 1) the state leaves for every input. The function h1=−x2−γx1h_1 = -x_2 - \gamma x_1 with γ>0\gamma > 0 has Lgh1=−1L_g h_1 = -1, so it is a CBF on R2\mathbb{R}^2, and its safe set {x2≤−γx1}\{x_2 \le -\gamma x_1\} intersected with CC is a set that the input can hold. This is the construction of exponential and high-order CBFs.

The case without an input. For x˙=−x\dot x = -x, h=1−x2h = 1 - x^2 has h˙=2x2≥0\dot h = 2x^2 \ge 0, so h˙≥−α(h)\dot h \ge -\alpha(h) holds on R\mathbb{R} with no input to choose. Here the CBF condition is the condition of a barrier certificate, and it proves that [−1,1][-1, 1] is invariant. The two notions differ only when there is an input: a CBF says that a good input exists, and a barrier certificate says that the system is safe as it is.

  • Control Lyapunov function. A CLF VV asks for V˙<0\dot V < 0 away from the origin; a CBF asks for h˙≥−α(h)\dot h \ge -\alpha(h) on DD. A CLF is positive definite; a CBF changes sign at the boundary of CC. Both are combined in one quadratic program with the CLF condition relaxed by a slack variable, so that safety wins when the two conflict (Ames et al. 2017).
  • Barrier certificate. A function that proves safety of a system without a free input, often found by sum of squares programming. A CBF certifies that an input exists that keeps the system safe.
  • Control invariant set. A set that some input can keep invariant. If hh is a CBF and a locally Lipschitz selection of KcbfK_{\text{cbf}} exists, CC is control invariant. The largest control invariant subset of a constraint set is what Hamilton-Jacobi reachability computes.
  • CBF safety filter. The quadratic program min⁡∣u−unom∣2\min |u - u_{\text{nom}}|^2 over Kcbf(x)K_{\text{cbf}}(x). It is the standard way to use a CBF.
  • Sontag-like formulas. Wieland and Allgöwer (2007) gave a formula for a safe feedback from a CBF, in the style of Sontag's universal formula for CLFs.

References

  1. Aaron D. Ames, Xiangru Xu, Jessy W. Grizzle and Paulo Tabuada, Control barrier function based quadratic programs for safety critical systems, IEEE Transactions on Automatic Control 62(8), 3861-3876, 2017, the definitions of reciprocal and zeroing control barrier functions and the forward invariance results
  2. Aaron D. Ames, Samuel Coogan, Magnus Egerstedt, Gennaro Notomista, Koushil Sreenath and Paulo Tabuada, Control barrier functions: theory and applications, European Control Conference, 3420-3431, 2019, the definition with an extended class K infinity function, the safety theorem, and high relative degree
  3. Constructive safety using control barrier functions, the first definition of a control barrier function, by analogy with control Lyapunov functions
  4. Hassan K. Khalil, Nonlinear Systems, third edition, Prentice Hall, 2002, Section 3.4, the comparison principle, used in the proof of forward invariance

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/5DRK8N/text.yaml