The 1D_MPC_CBF repository houses a collection of MATLAB scripts written to study differnt state-constrained controllers.
MATLABMIT
1D_MPC_CBF
Description
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.
with $h: \mathbf{R}^n \times \mathbf{R}^p \to \mathbf{R}$ being a continuously differentiable function, called control barrier function (CBF).
The CBF can ensure for the presented control affine system that for any initial condition $x_0 := x(t_0) \in \mathcal{C}$, that $x(t)$ stays within $\mathcal{C}$ for any $t$, if there exists an extended class $\mathcal{K}$ functions $\alpha$ such that for all $x \in Int(\mathcal{C})$
A linear controller of the following form is defined:
$$\begin{align}
u_d = K_1 x + K_2 x_d
\end{align}$$
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 $u_d$ such that $x(t)$ stays within $\mathcal{C}$ for any $t$.