  In this study, we present a novel sliding mode safety-critical controller
designed to address both stability and safety concerns in a class of nonlinear
uncertain systems. The controller features two feedback loops: an inner loop
designed by conventional sliding mode techniques and an outer safeguarding loop
aimed at enhancing system safety. The inner loop, while ensuring asymptotic
stability of the closed-loop system, may not guarantee compliance with safety
constraints. To overcome this limitation and ensure both stability and safety,
the outer loop introduces a correction term known as the safeguarding control
signal. This signal is added to the unsafe control signal generated by the
inner loop, effectively modifying it to meet the required safety constraints.
To design the safeguarding control law, we integrate the system dynamics with
an additional state variable. The dynamics of this augmented state are derived
based on a stability constraint obtained from Lyapunov theory. By utilizing a
control barrier function for the augmented system, we determine the
safeguarding control signal, which ensures the system operates within the
defined safety constraint. The proposed safety-critical controller exhibits
finite-time convergence to the sliding manifold. To mitigate interference
between the inner and outer loops, strategies such as defining risky sets are
employed, limiting the impact of the safeguarding loop on the functionality of
the inner loop. A closed-form solution for designing safeguarding control laws
is derived to eliminate the necessity for solving any quadratic problems in
real-time. Simulation case studies validate the effectiveness of the proposed
controller in maintaining stability and safety.
