## 3 Mathematical Models and Control Design
### Validation of the Control Algorithms (Prove)  
Assume that the closed-loop system's equilibrium points are the outcome of applying the control law. \[\varepsilon=\{0\}\bigcup\varepsilon_{int}\bigcup\varepsilon_{\partial c} \tag{29}\]  
where \(0\varepsilon R^{n}\) is the origin of the state space and  
\[\varepsilon_{int}=\left\{x\in\Omega\frac{clf}{cbf}\backslash\{0\}\bigg{|}f(x )=p\gamma(v(x))G(x)\
abla v(x)\right\} \tag{30}\]  
\[\varepsilon_{\partial c}=\left\{x\in\Omega_{cbf}^{clf}\bigcap\partial c\left| N\left( \begin{bmatrix}f(x)^{T}\\ \
abla v(x)^{T}G(x)\end{bmatrix} ^{T}\right)\backslash\{0\}\
eq\varnothing\right\} \tag{31}\]  
where \(G(x)=g(x)g(x)^{T}\), \(\varepsilon_{int}\) is the set of interior equilibria, and \(\varepsilon_{\partial c}\) is the set of boundary equilibria. CLF denotes the active constraints, and CBF the inactive constraints. \(\Omega\frac{clf}{cbf}\) are the active states for both CLF and CBF. The interplay between the CLF and CBF constraints is crucial in collision avoidance. The system must ensure stability (via CLF) while avoiding collisions (via CBF), especially in dynamic environments with moving obstacles and other WMRs. The distinction between interior equilibria and boundary equilibria helps in understanding the system's behavior under different conditions. Interior equilibria represent safe and stable states, while boundary equilibria represent critical states where the system is at risk of violating safety constraints. \[\Omega\frac{clf}{cbf}=\left\{x\in R^{n}: \begin{array}{c}x\in R^{n}:L_{f}V+ \gamma(V)\geq 0,\\ L_{g}VL_{g}h^{T}\Big{(}L_{f}V+\gamma(V)\Big{)}<\left(L_{f}h+\alpha(h)\right) \big{(}p^{-1}+\big{|}\big{|}L_{g}V\big{|}\big{|}\big{)}\right\}\end{array} \right. \tag{32}\]  
The concepts of interior equilibria, boundary equilibria, and states where both CLF and CBF are active are central to the design of control strategies for collision avoidance in WMRs. These concepts help in balancing the competing objectives of stability (via CLF) and safety (via CBF), ensuring that the system operates safely and efficiently in dynamic environments. The mathematical formulations provide a framework for designing control inputs that achieve these objectives, making them essential for real-world applications like smart agriculture and autonomous navigation. \[\Omega_{cbf}^{clf}=\left\{ \begin{array}{l}x\in R^{n}:L_{g}VL_{g}h^{T}\left( \frac{L_{f}h+\alpha(h)}{L_{g}V+\gamma(V)}\right)\leq\left|\left|L_{g}h\right| \right|^{2},\\ L_{g}VL_{g}h^{T}\geq\left(\frac{L_{f}h+\alpha(h)}{L_{g}V+\gamma(V)}\right) \left(\left|\left|L_{g}V\right|\right|^{2}+p^{-1}\right)\right\}\end{array} \right. \tag{33}\]  
The Lagrangian associated with the control law provides a mathematical framework for deriving optimal control inputs that ensure both stability (via CLF) and safety (via CBF) in collision avoidance for WMRs. By minimizing the control effort while satisfying the CLF and CBF constraints, the Lagrangian enables the system to achieve efficient, stable, and safe navigation in dynamic environments. The Karush-Kuhn-Tucker (KKT) conditions ensure that the optimal solution is both feasible and efficient, making the Lagrangian a powerful tool for control design in complex systems. \[L=\frac{1}{2}||u||^{2}+\frac{1}{2}p\omega^{2}+\lambda_{1}\left(L_{f}V+L_{g}Vu+ \gamma(V)-\omega\right)-\lambda_{2}\left(L_{f}V+L_{g}hu+\alpha(h)\right) \tag{34}\]  
The KKT conditions becomes  
\[\frac{\partial L}{\partial u}=u+\lambda_{1}L_{g}V-\lambda_{2}L_{g}h=0 \tag{35}\]  
\[\frac{\partial L}{\partial\omega}=p\omega-\lambda_{1}=0 \tag{36}\]  
\[\lambda_{1}\left(L_{f}V+L_{g}Vu+\gamma(V)-\omega\right)=0 \tag{37}\]  
\[\lambda_{2}\left(L_{f}V+L_{g}hu+\alpha(h)\right)=0 \tag{38}\]  
With \(\lambda_{1},\ \lambda_{2}\geq 0\), it must now differentiate between four distinct scenarios based on when each constraint is activated. **Case 1. **_Both restrictions are passive in this instance, meaning \(L_{f}V+L_{g}Vu+\gamma(V)-\omega<0\), \(L_{f}V+L_{g}hu+\alpha(h)>0\), and \(\lambda_{1}=\lambda_{2}=0\).