The basically reproduction of the article "Tangent Barrier Lyapunov Functions for the Control of Output-Constrained Nonlinear Systems".But only this code achieves the symmetric part of article.
Adding a sliding mode differentiator to estimate the x1's differentiation as follow:
And also the origial differentiator in the article is as follow:
The article's website: https://doi.org/10.3182/20130902-3-CN-3020.00122.
Wish it take effort for you.