## 3 Mathematical Models and Control Design
### Validation of the Control Algorithms (Prove)
From Karush-Kuhn-Tucker (KKT) conditions, \(k(x)=0\), \(\omega(x)=0\). However, since \(\gamma(V)<0\), this solution is never applicable in this situation._  
**Case 2. **_Only the CLF constraint is in effect in this instance, which means \(L_{f}V+L_{g}Vu+\gamma(V)=\delta\), \(L_{f}V+L_{g}h^{T}u+\alpha(h)>0\), and \(\lambda_{1}\geq 0,\ \lambda_{2}=0\); then, the solution:_  
\[k(x)=-\frac{L_{f}V+\gamma(V)}{p^{-1}+\left|\left|L_{g}V\right|\right|^{2}}L_{ g}V^{T} \tag{39}\]  
_CBF is inactive; then, from the equilibrium points:_  
\[f_{cl}(x)=f(x)-\frac{L_{f}V+\gamma(V)}{p^{-1}+\left|\left|L_{g}V\right|\right| ^{2}}G\
abla V=0 \tag{40}\]  
_There are two possible solutions from Equation (40):_  
1. \(f(x)=0\)_, and_ \(G(x)\
abla V(x)=0\) _for some_ \(x\in\Omega\frac{clf}{cbf}\)_;_
2. \(f(x)=G(x)\
abla V(x)\)_; then, the Equation (_40_) becomes:_ \[k(x)=p\gamma(V),x\in\Omega\frac{clf}{cbf}\] (41)  
_Such that the equilibrium points could be \[f(x)=p\gamma(V)G\
abla V \tag{42}\]  
_Equation (42) provides set of interior equilibria._  
**Case 3. **: _CBF constraint is active, \(L_{f}V+L_{g}Vu+\gamma(V)-\delta<0\), \(L_{f}h+L_{g}hu+\alpha(h)=0\), \(\lambda_{1}~{}=~{}0\), \(\lambda_{2}\geq 0\). Then, the KKT condition becomes:_  
\[k(x)=-\big{|}\big{|}L_{g}h\big{|}\big{|}^{-2}\Big{(}L_{f}h+\alpha(h)\Big{)}L_{g}h ^{T} \tag{43}\]  
_CLF is inactive; then:_  
\[\Omega_{cbf}^{\overline{cdf}}=\left\{ \begin{matrix}x\epsilon R^{n}:L_{f}h+ \alpha(h)\leq 0,\\ L_{g}VL_{g}h^{T}\Big{(}L_{f}h+\alpha(h)\Big{)}>\Big{(}L_{f}V+\gamma(V)\Big{)} \big{|}\big{|}L_{g}h\big{|}\big{|}^{2}\end{matrix} \right\} \tag{44}\]  
_At the equilibrium points \(f_{cl}(x)=0\); then:_  
\[f_{cl}(x)=f(x)-\big{|}\big{|}L_{g}h\big{|}\big{|}^{-2}\Big{(}L_{f}h+\alpha(h) \Big{)}G\
abla h=0 \tag{45}\]  
_The solutions of Equation (45):_  
(i) \(f(x)=0\)_, and_ \(G(x)\
abla V(x)=0\) _for some_ \(x\in\Omega_{cbf}^{\overline{cdf}}\)_._  
(ii). \(f(x)=kG(x)\
abla V(x)\)_; then, Equation (45) becomes_ \(\alpha(h)=0,forx\in\partial\mathbb{C}\)_._  
**Case 4. **: _When both constraints are active, then \(L_{f}V+L_{g}V^{T}u+\gamma(V)-\delta=0\), \(L_{f}h+L_{g}h^{T}u+\alpha(h)=0\), \(\lambda_{1}\), \(\lambda_{2}\geq 0\); then, the KKT equation becomes_  
\[ \begin{bmatrix}p^{-1}+\big{|}\big{|}L_{g}V\big{|}^{2}&-L_{g}VL_{g}h^{T}\big{]} \\ L_{g}VL_{g}h^{T}&-\big{|}\big{|}L_{g}h\big{|}^{2}\end{bmatrix}\begin{bmatrix} \lambda_{1}\\ \lambda_{2}\end{bmatrix} = \begin{bmatrix}L_{f}V+\gamma(V)\\ L_{f}h+\alpha(h)\end{bmatrix}  \tag{46}\]  
_The determinant of the matrix on the left-side of (46):_  
\[\Delta=\Big{(}L_{g}VL_{g}h^{T}\Big{)}^{2}-\Big{(}p^{-1}+\big{|}\big{|}L_{g}V \big{|}\big{|}^{2}\Big{)}\Big{(}\big{|}\big{|}L_{g}h\big{|}\big{|}^{2}\Big{)} \tag{47}\]  
_Consider two cases:_  
(i). \(\Delta=0\) _; then, the matrix on the left side of the Equation (_47_) loses rank when_ \(L_{g}h=0\)_. Then, the solution_ \(L_{g}h+\alpha(h)=0\)_. The KKT equation becomes equal as Equation (_39_)._  
(ii). \(\Delta<0\)_; then, KKT equation becomes_  
\[k(x)=-\lambda_{1}L_{g}V^{T}+\lambda_{2}L_{g}h^{T} \tag{48}\]  
\(\lambda\) _values are obtained as_  
\[\left\{ \begin{matrix}\lambda_{1}=\frac{1}{\lambda}\Big{(}\Big{(}L_{f}h+\alpha (h)\Big{)}L_{g}VL_{g}h^{T}-\Big{(}L_{f}V+\gamma(V)\Big{)}\big{|}\big{|}L_{g}h \big{|}\big{|}^{2}\Big{)}\\ \lambda_{2}=\frac{1}{\lambda}\Big{(}\Big{(}L_{f}h+\alpha(h)\Big{)}\Big{(} \big{|}\big{|}L_{g}V\big{|}^{2}+p^{-1}\Big{)}-\Big{(}L_{f}V+\gamma(V)\Big{)}L _{g}VL_{g}h^{T}\Big{)}\end{matrix} \right. \tag{49}\]  
_When_ \(\Delta=0\) _or_ \(\Delta>0\)_, then the solution becomes_  
\[\Omega_{cbf}^{clf}=\left\{ \begin{matrix}x\epsilon R^{n}:L_{g}VL_{g}h^{T}\Big{(} \frac{L_{f}h+\alpha(h)}{L_{f}V+\lambda(V)}\Big{)}\leq\big{|}\big{|}L_{g}h\big{|} \big{|}^{2},\\ L_{g}VL_{g}h^{T}\geq\Big{(}\frac{L_{f}h+\alpha(h)}{L_{f}V+\lambda(V)}\Big{)} \Big{(}\big{|}\big{|}L_{g}h\big{|}\big{|}^{2}+p^{-1}\Big{)}\end{matrix}