Physical AI Lab // Episode 2.7 // One-pager
Safety filter: control barrier functions
Bend a dangerous action back into the safe zone before it goes out
Three key points
- Write safety as a function h: the safe set is h(x) ≥ 0; satisfy one inequality and the safe set is forward invariant, so once in, you can't get out (R, Ames et al.).
- A safety filter is a very small quadratic program: find the action closest to the nominal one that still meets the safety constraint, minimally invasive. For scale, the paper measured a different quadratic program (a CLF-QP controller) on a BeagleBone Black at about 0.4 ms on average (R).
- Put it on the fastest control loop (this course's design advice); one multi-arm paper calls 1 kHz a necessity for real-time control and a minimum required by safety standards (R). But the guarantee relies on an accurate model, and higher relative degree and actuator saturation weaken it. Don't treat it as insurance for everything.
Evidence: O official · R research · M media
| R | h ≥ 0 | write safety as the safe set h(x)≥0; being safe means the trajectory stays in this invariant set forever and never crosses the boundary (paper) |
| R | 0.4 ms | the average computation time the paper measured on a BeagleBone Black board for a different quadratic program, a CLF-QP controller; not a measurement of this episode's CBF filter |
| R | 1 kHz | the control rate a multi-arm real-time control framework sustains; the paper calls it a necessity for real-time control and a minimum required by safety standards |
Further reading
- Ames et al. · Control Barrier Functions: Theory and Applications (arXiv 1903.11199)
https://arxiv.org/abs/1903.11199 - multipanda_ros2: 1 kHz real-time control (arXiv 2602.02269)
https://arxiv.org/abs/2602.02269