You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This collection of MATLAB scripts intends to study the performance of state-constrained controllers utilizing control barrier functions in the context of adaptive cruise control.
Problem Formulation
We consider a case in which two vehicles, modeled as point masses, are moving in a straight line. The following vehicle is equipped with an ACC and the lead vehicle drives with constant speed $v_0$.
Control Objective: Cruising at a given speed $v_d$ for the following vehicle.
Safety Objective: Ensure that the distance $D$ is not violating the following safety constraint:
$$\begin{equation}
D \geq T_h v
\end{equation}$$
with $T_h$ being the look-ahead time.
The dynamics of the system can be defined as follows:
with $x$ being the position, $m$ the mass and $v$ the speed of the controlled vehicle. The control input $u$ of the ACC is defined as the wheel force $F_w$, while the aerodyanmic drag is given as $F_r$, which is defined as:
where $x(t) \in \mathbf{R}^{n}$ is a measurable state vector and $u(t) \in \mathbf{R}^{m}$ is a control input vector. The control input is assumed to be magnitude limited by $\vert u_0 \vert$, which leads to the following closed set for the control input space
For which we define the control objective of globally stabilizing the considered system to a point $x^∗ = 0$, and hence imposing $x(t) \rightarrow 0$. This can be achieved by finding a feedback control law $k(x)$ that drives a positive-definite continuous function $V : D \in \mathbf{R}^{m} \rightarrow R \geq 0$.
The system is globally stabilizable if there exists the class $\mathcal{K}_{\infty}$ functions $\alpha_1$, $\alpha_2$, $\alpha_3$ such that
$$\begin{equation}
\alpha_1 (\lVert x \rVert) \leq V(x) \leq \alpha_2 (\lVert x \rVert)
\end{equation}$$
$$\begin{equation}
\alpha_3(\lVert x \rVert) = \lambda V(x)
\end{equation}$$
with $\lambda$ being $\lambda > 0$. Since any controller that respects the above requirements can ensure stability, there is no need to explicitly construct the feedback controller
$$\begin{equation}
k(x) = \begin{Bmatrix} u \in \mathbf{R}^{m} : \dot{V}(x, u) = [L_f V (x) + L_g V (x)u] ≤ −\lambda V (x) \end{Bmatrix}
\end{equation}$$
One can define the following positive definite control Lyapunov function (CLF) $V(x,u)$:
$$\begin{equation}
\inf_{u \in U} L_f V (x) + L_g V (x)u \leq - \alpha_3 (\lVert x \rVert)
\end{equation}$$
Concept of Control Barrier Functions
We consider again a control affine plant of the form:
where $x(t) \in \mathbf{R}^{n}$ is a measurable state vector and $u(t) \in \mathbf{R}^{m}$ is a control input vector. The control input is assumed to be magnitude limited by $\vert u_0 \vert$, which leads to the following closed set for the control input space
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})$
By using a QP-based approach, it is possible to unify both CLF-based "performance objectives" and CBF-based "safety considerations". Using a quadratic programming formulation, the solution for $u$ can be found by solving: