This repository contains the implementations for the paper "Stabilization of Nonlinear Systems through Control Barrier Functions". The main idea is to use a Control Barrier Function (CBF), along with a weak candidate (quadratic) Control Lyapunov Function (CLF) to stabilize nonlinear systems.
To run the code, you will need to install the following packages:
- Python 3.9: Official Python Website
- NumPy 1.26.0: NumPy Documentation
- CVXPY 1.4.1: CVXPY Documentation
- Matplotlib 3.5.3: Matplotlib Documentation
To reproduce the provided examples, follow these steps:
-
Clone the repository:
git clone https://github.com/KehanLong/CBF_Stabilization.git
-
Navigate to the cloned repo:
cd CBF_Stabilization
-
Run the provided examples:
python warm_up_CLF.py
;python unicycle_CLF.py
;python polynomial_systems_CLF.py
;python inverted_pendulum_CLF.py
.