The 1D_MPC_CBF repository houses a collection of MATLAB scripts written to study different state-constrained controllers. With a focus on a class of 1D dynamical systems, this collection of MATLAB scripts intends to compare and analyze the performance of different state-constrained controllers utilizing control barrier functions and model predictive control.
We consider the following control affine system:
A closed set
with
The CBF can ensure for the presented control affine system that for any initial condition
Where
with
The following state-constrained controllers are implemented and can be compared via separate time simulations:
A linear controller of the following form is defined:
The linear controller is tuned regarding the desired control performance but alone cannot generate safe commands. Therefore the following CLF-QP safety filter is used to adapt
After each simulation run, a plot with results is given out. An example of such a plot is given here:
The scripts use external libraries, which need to be installed.
Further, the following MATLAB toolboxes are needed:
The software was tested with MATLAB 2020b under Windows 11 Home.
The contents of this repository are covered under the MIT License.
We kindly acknowledge the following papers, which have been the foundation of the here presented scripts:
- [1] J. Zeng, B. Zhang, and K. Sreenath, “Safety-Critical Model Predictive Control with Discrete-Time Control Barrier Function,” in 2021 American Control Conference (ACC), May 2021, pp. 3882–3889.
- [2] A. D. Ames, X. Xu, J. W. Grizzle and P. Tabuada, "Control Barrier Function Based Quadratic Programs for Safety Critical Systems," in IEEE Transactions on Automatic Control, vol. 62, no. 8, pp. 3861-3876.