Matlab library for Control Barrier Function (CBF) and Control Lyapunov Function (CLF) based control methods. The library is designed to let users easily implement safety controller based on CBFs and CLFs with Matlab. We provide:
- An easy interface for construction and simulation of nonlinear control-affine systems.
- Safety controllers including CLF-QP, CBF-QP, and CBF-CLF-QP as built-in functions.
- Demonstrations on toy examples.
- Matlab
- Symbolic Math Toolbox
- Create a class that inherit
CtrlAffineSys
. - Create a class function
defineSystem
and define your dynamics using the symbolic toolbox. - Create class functions
defineClf
anddefineCbf
and define your CLF and CBF in each function respectively using the same symbolic expressions. - To run the simulation or run the controller, create a class instance with parameters specified as a Matlab structure array, and use the built-in functions—dynamics and other controllers such as
ctrlCbfClfQp
,ctrlClfQp
, etc.
Please checkout the Manual for more details.
Run files in the directory demos
in Matlab.
@misc{choi2020cbfclfhelper,
author = {Jason J. Choi},
title = {CBF-CLF-Helper 1.0: Library for Control Barrier Function (CBF) and Control Lyapunov Function (CLF) based control methods},
year = {2020},
version = {1.0.0},
url = {https://github.com/HybridRobotics/CBF-CLF-Helper}
}
Unofficial 2.0 version is under development at this repo. If you want to see new demos, please check out this folder.