<< All versions
Skill v1.0.0
currentAutomated scan100/100alizainx/intelligence-systems-skills/control-barrier-functions-qp-shield
──Details
PublishedNovember 6, 2026 at 04:02 AM
Content Hashsha256:cbeb915cf3f06db1...
Git SHA4446b059cc96
──Files
Files (1 file, 2.4 KB)
SKILL.md2.4 KBactive
SKILL.md · 27 lines · 2.4 KB
name: control-barrier-functions-qp-shield id: ISS-159 token_budget: 700 chain_with: [linear-nonlinear-mpc-qp-solvers, adas-sotif-odd-monitoring, iso26262-asil-fmea-fault-watchdogs] description: "Control Barrier Functions (CBF), Exponential/High-Order CBFs (HOCBF) for relative degree $r \ge 2$, CLF-CBF-QP runtime safety shields, and reachability sets." metadata: version: "1.0.0"
control-barrier-functions-qp-shield (ISS-159)
1. First-Principles Invariant
- Ames Forward-Invariance Safety-Shield Law: Given safe set $\mathcal{C} = \{x \in \mathbb{R}^n : h(x) \ge 0\}$ and control-affine dynamics $\dot{x} = f(x) + g(x)u$, any Lipschitz control $u^*(x) = \arg\min_{u \in \mathcal{U}} \|u - u_{\text{nom}}(x)\|_2^2$ subject to the linear inequality $L_f h(x) + L_g h(x) u + \alpha(h(x)) \ge 0$ renders $\mathcal{C}$ strictly forward-invariant ($x(0) \in \mathcal{C} \implies x(t) \in \mathcal{C}\; \forall t \ge 0$) while modifying nominal/RL commands $u_{\text{nom}}$ minimally.
2. Fast-Pass Low-Token Protocol (Web & Coding Agents)
- For position obstacles with acceleration/force inputs (relative degree $r = 2$, where $L_g h(x) = 0$), use an Exponential Control Barrier Function (
ECBF/HOCBF): $\psi_1(x) = \dot{h}(x) + \gamma_1 h(x) \ge 0$ and $\dot{\psi}_1(x, u) + \gamma_2 \psi_1(x) = L_f^2 h + L_g L_f h u + (\gamma_1 + \gamma_2) L_f h + \gamma_1 \gamma_2 h \ge 0$.
3. Zero-Bug & Zero-Vulnerability Guards
- Keep the CBF barrier constraint strictly hard while relaxing the Control Lyapunov Function (
CLF: $L_f V + L_g V u + c V \le \delta$) with a slack variable $\delta$ so safety ($h(x) \ge 0$) NEVER loses a conflict against goal tracking ($V(x) \to 0$). - Account for bounded actuator limits $u \in [u_{\min}, u_{\max}]$ inside the barrier function design (e.g., braking-distance barrier $h(x) = d - \frac{v_{\text{rel}}^2}{2 a_{\max}}$) so the CBF-QP stays feasible inside $\mathcal{U}$.
- In discrete-time digital controllers ($x_{k+1} = F(x_k, u_k)$), enforce the discrete CBF condition $\Delta h(x_k, u_k) = h(x_{k+1}) - h(x_k) \ge -\gamma h(x_k)$ with $0 < \gamma \le 1$.
- Provide an explicit emergency braking fallback ($u_{\text{brake}}$) if multiple simultaneous obstacle CBF half-spaces become mutually infeasible under actuator saturation.
- Verify $h(x_k) \ge 0$ across 100% of simulated steps when shielding adversarial or random nominal inputs $u_{\text{nom}}$.
4. Verification Gate
python3 -c 'import numpy as np; ...'