Algorithm Search⌘K

Definitionresearch

Barrier certificate

Also called Prajna-Jadbabaie barrier certificate.

A function that is at most zero on the initial set, positive on the unsafe set, and does not increase along trajectories, which proves that no trajectory reaches the unsafe set.

A barrier certificate is a function of the state that proves a safety property: no trajectory that starts in an initial set ever enters an unsafe set. It is at most zero on the initial set, positive on the unsafe set, and it does not increase along the solutions, so a solution cannot cross from the first set to the second. Prajna and Jadbabaie (2004) defined it for continuous and hybrid systems and showed that, for polynomial data, the search for a polynomial certificate is a sum of squares program, so a semidefinite program can find one. The idea is the safety counterpart of a Lyapunov function: the proof needs no computation of the solutions or of the reachable set.

Definition

Let x′=f(x,d)x' = f(x, d) with x∈X⊆Rnx \in X \subseteq \mathbb{R}^n and a disturbance d(t)∈Dd(t) \in D, with ff such that solutions exist and are unique. Let X0⊆XX_0 \subseteq X be the initial set and Xu⊆XX_u \subseteq X the unsafe set. A barrier certificate is a continuously differentiable function B:X→RB : X \to \mathbb{R} with

B(x)≤0  for x∈X0,B(x)>0  for x∈Xu,∇B(x)⋅f(x,d)≤0  for x∈X, d∈D.B(x) \le 0 \ \text{ for } x \in X_0, \qquad B(x) > 0 \ \text{ for } x \in X_u, \qquad \nabla B(x) \cdot f(x, d) \le 0 \ \text{ for } x \in X, \ d \in D.

Theorem (Prajna and Jadbabaie 2004). If a barrier certificate exists, then no solution that starts in X0X_0 and stays in XX reaches XuX_u.

Proof. Along a solution, ddtB(x(t))=∇B⋅f≤0\frac{d}{dt}B(x(t)) = \nabla B \cdot f \le 0, so B(x(t))≤B(x(0))≤0B(x(t)) \le B(x(0)) \le 0 for all t≥0t \ge 0. A point of XuX_u has B>0B > 0, so the solution never reaches one. ■\blacksquare

The convex search. The three conditions are linear in BB, so the set of barrier certificates is convex. If ff is polynomial and X0={g0≥0}X_0 = \{g_0 \ge 0\}, Xu={gu≥0}X_u = \{g_u \ge 0\} and X={g≥0}X = \{g \ge 0\} are semialgebraic, a sufficient condition is that there are a polynomial BB, a constant ϵ>0\epsilon > 0, and sums of squares σ0\sigma_0, σu\sigma_u, σ\sigma with

−B−σ0g0,B−ϵ−σugu,−∇B⋅f−σgall sums of squares.-B - \sigma_0 g_0, \qquad B - \epsilon - \sigma_u g_u, \qquad -\nabla B \cdot f - \sigma g \qquad \text{all sums of squares}.

A polynomial of degree 2d2d in nn variables is a sum of squares if and only if it equals zTGzz^T G z for a positive semidefinite GG, where zz lists the (n+dd)\binom{n + d}{d} monomials of degree at most dd. So each condition is a semidefinite constraint with a matrix of that size, and the coefficients of BB and of the multipliers are the decision variables. For n=2n = 2 and d=2d = 2 the matrices are 6×66 \times 6; for n=6n = 6 and d=3d = 3 they are 84×8484 \times 84. The size grows fast with nn and dd, and this limits the method to systems of moderate dimension.

Variants of the definition.

  • Zero level only. It is enough that ∇B⋅f<0\nabla B \cdot f < 0 where B(x)=0B(x) = 0, but the set of such BB is not convex, so the convex condition on all of XX is the one used for search.
  • Hybrid systems. One function BqB_q for each location qq, the conditions above in each location, and a condition at each jump that the reset map keeps the state in the zero sublevel set of the function of the new location (Prajna and Jadbabaie 2004).
  • Stochastic systems. For a stochastic differential equation, a nonnegative BB whose expected value does not increase (a martingale argument) bounds the probability of ever reaching XuX_u by sup⁡X0B/inf⁡XuB\sup_{X_0} B / \inf_{X_u} B (Prajna, Jadbabaie and Pappas 2007).

Examples and non-examples

Example (a scalar contraction). For x′=−xx' = -x, X0=[−1,1]X_0 = [-1, 1] and Xu={∣x∣≥2}X_u = \{|x| \ge 2\}, take B(x)=x2−1B(x) = x^2 - 1. Then B≤0B \le 0 on X0X_0, B≥3B \ge 3 on XuX_u, and ∇B⋅f=−2x2≤0\nabla B \cdot f = -2x^2 \le 0.

Example (a level set of a Lyapunov function). For x1′=x2x_1' = x_2, x2′=−x1−x2x_2' = -x_1 - x_2, the Lyapunov equation ATP+PA=−IA^T P + PA = -I gives P=(3/21/21/21)P = \begin{pmatrix} 3/2 & 1/2 \\ 1/2 & 1 \end{pmatrix}, and V=xTPxV = x^T P x has V′=−∥x∥2V' = -\|x\|^2. Let X0X_0 be the disk of radius 0.50.5 and Xu={x1≥1}X_u = \{x_1 \ge 1\}. On X0X_0, V≤0.25 λmax⁡(P)=0.25⋅1.809=0.452V \le 0.25\,\lambda_{\max}(P) = 0.25 \cdot 1.809 = 0.452. On XuX_u, V≥min⁡x2(1.5+x2+x22)=1.25V \ge \min_{x_2}(1.5 + x_2 + x_2^2) = 1.25, at x2=−0.5x_2 = -0.5. So B=V−0.46B = V - 0.46 is a barrier certificate.

Example (safe but not asymptotically stable). For the harmonic oscillator x1′=−x2x_1' = -x_2, x2′=x1x_2' = x_1, with X0X_0 the unit disk and Xu={∥x∥≥1.5}X_u = \{\|x\| \ge 1.5\}, B=x12+x22−1B = x_1^2 + x_2^2 - 1 has ∇B⋅f=0\nabla B \cdot f = 0. It proves safety, although no solution converges to the origin. A barrier certificate needs no decrease to zero, only no increase.

Non-example (an unsafe system). For x′=xx' = x, X0=[−1,1]X_0 = [-1, 1] and Xu={∣x∣≥2}X_u = \{|x| \ge 2\}, the solution from x0=1x_0 = 1 is ete^t, which reaches 22 at t=ln⁡2t = \ln 2. So no barrier certificate exists. The candidate B=x2−1B = x^2 - 1 meets the first two conditions, but ∇B⋅f=2x2>0\nabla B \cdot f = 2x^2 > 0.

Non-example (the third condition only on the sets). A function that decreases on X0X_0 and on XuX_u but increases between them proves nothing: the condition on the derivative must hold on all of XX, or at least on the zero level set of BB, which is where a solution would cross.

  • Lyapunov function. A Lyapunov function is positive definite and decreases, and proves stability. A barrier certificate has no sign condition at an equilibrium and need not decrease strictly. A sublevel set of a Lyapunov function that contains X0X_0 and misses XuX_u gives a barrier certificate, as in the second example.
  • Control barrier function. For a system with an input, a control barrier function hh asks that some input makes hh satisfy a decrease condition, with the safe set {h≥0}\{h \ge 0\}; the sign convention is the opposite. It is a tool for design: it gives a set of safe inputs at each state (Ames et al. 2019). A barrier certificate is a tool for verification of a closed system.
  • CBF safety filter. The online quadratic program that picks the safe input closest to a nominal input, using a control barrier function (Ames, Xu, Grizzle and Tabuada 2017).
  • Positively invariant set. The set {B≤0}\{B \le 0\} of a barrier certificate is positively invariant, for solutions that stay in XX, and it contains X0X_0 and misses XuX_u.
  • Reachable set. The set {B≤0}\{B \le 0\} contains the reachable set from X0X_0, so a barrier certificate is a reachable set over-approximation in implicit form. Hamilton-Jacobi reachability computes the reachable set itself on a grid, instead of a certificate.
  • Converse results. Wisniewski and Sloth (2016) gave conditions under which a safe system has a barrier certificate, so the search is not hopeless by construction. Prajna and Rantzer (2007) gave convex certificates for the dual property, that solutions do reach a target set.

References

  1. S. Prajna and A. Jadbabaie, Safety verification of hybrid systems using barrier certificates, Hybrid Systems: Computation and Control (HSCC 2004), LNCS 2993, Springer, 2004, pages 477 to 492, the definition for continuous and hybrid systems, the safety theorem, and the search by sum of squares programming
  2. S. Prajna, A. Jadbabaie and G. J. Pappas, A framework for worst-case and stochastic safety verification using barrier certificates, IEEE Transactions on Automatic Control 52(8), 2007, pages 1415 to 1428, barrier certificates with disturbances, for hybrid systems, and for stochastic systems with a bound on the probability of reaching the unsafe set
  3. S. Prajna and A. Rantzer, Convex programs for temporal verification of nonlinear dynamical systems, SIAM Journal on Control and Optimization 46(3), 2007, pages 999 to 1021, convex certificates for eventuality and other temporal properties
  4. R. Wisniewski and C. Sloth, Converse barrier certificate theorems, IEEE Transactions on Automatic Control 61(5), 2016, pages 1356 to 1361, conditions under which a safe system has a barrier certificate
  5. A. D. Ames, S. Coogan, M. Egerstedt, G. Notomista, K. Sreenath and P. Tabuada, Control barrier functions: theory and applications, European Control Conference, 2019, pages 3420 to 3431, the relation between barrier certificates, barrier functions and control barrier functions

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/RKCE24/text.yaml