## 6 Controller Design
### System Stability Analysis  
Proving the global stability of our ECBF-NMPC dynamic motion planning framework is challenging as it incorporates approximate numerical methods, a neural network-based motion predictor, the GJK algorithm, and a safety filter. To guarantee local asymptotic stability, a control Lyapunov constraint is incorporated into the ECBF formulation and activated when the robot is close to the destination. **Property 1** ([41]). : _The inertia matrix \(\mathbf{M}(\mathbf{q})\) and \(\mathbf{M_{x}}\) are symmetric positive definite._  
**Property 2** ([41]). : _The matrix \(\mathbf{2C}_{x}(\mathbf{q},\mathbf{q})-\dot{\mathbf{M}}_{x}(\mathbf{q})\) is skew-symmetric._  
**Definition 2** (\(\mathcal{K}_{\infty}\)-class function [42]). : _A continuous function \(\beta:\mathbb{R}_{+}\to\mathbb{R}_{+}\) is a \(\mathcal{K}_{\infty}\)-class function (denoted as \(\beta\in\mathcal{K}_{\infty}\)), if_  
* \(\beta(0)=0\)__
* \(\beta\) _is increasing_
* \(\lim_{a\to\infty}\beta(a)=\infty\)_._  
**Definition 3** (Control Lyapunov Functions [43]). : _Given the system (8) and the composite error \(\mathbf{z}(\mathbf{x},t)=\hat{\mathbf{x}}+\Lambda\hat{\mathbf{x}}\), with \(\Lambda>0\), consider a continuously differentiable function \(V:\mathbb{R}^{3}\to\mathbb{R}_{+}\) on set \(\mathcal{Z}=\{\mathbf{z}(\mathbf{x},t)\in\mathbb{R}^{3}:\mathbf{x}\in\mathcal{C},\forall t >0\}\), where \(\mathcal{C}\) is the safe set as defined for the ECBF (Definition 1). Then, \(V\) is a control Lyapunov function (CLF) for the system in (8) if there exist \(\beta_{1}\), \(\beta_{2}\), \(\beta_{3}\in\mathcal{K}_{\infty}\) such that for all \(\mathbf{z}\in\mathcal{Z}\)_  
\[\beta_{1}(\|\mathbf{z}\|)\leq V(\mathbf{z})\leq\beta_{2}(\|\mathbf{z}\|), \tag{30}\] \[\inf_{\mathbf{u}\in\mathcal{U}}\dot{V}(\mathbf{z},\mathbf{u})\leq-\beta_{3}( \|\mathbf{z}\|). \tag{31}\]  
The existence of a CLF implies the existence of a control law that renders the closed-loop system locally asymptotically stable [44]. The target when employing a CLF constraint is to make the composite error \(\mathbf{z}(\mathbf{x},\hat{\mathbf{x}})\), which models the generalized Cartesian position and velocity errors with respect to the desired references, locally asymptotically converge to 0. Then, the problem (29) needs to satisfy both the ECBF and CLF constraints, which are written as  
\[\underset{\mathbf{u}_{\text{act}}\in\mathcal{U}}{\text{minimize}}\|f_{\mathbf{h}}-\bm {u}_{\text{act}}\|^{2},\] (32a) subject to \[L_{f}^{2}h_{i}(t,\mathbf{x}_{i})+L_{g}L_{f}h_{i}(t,\mathbf{x}_{i})\mathbf{u} _{\text{act},i}+k_{1}h_{i}(t,\mathbf{x}_{i})+k_{2}L_{f}h_{i}(t,\mathbf{x}_{i})\geq 0,i \in[_{1,7}],\] (32b) \[\mathbf{z}_{i}^{\mathsf{T}}\left(\mathbf{u}_{\text{act},i}+k_{2}\frac\mathbf{{z}_{i}}{\|\mathbf{z}_{i}\|+c_{1}}\right)-\mathbf{z}_{i}^{\mathsf{T}}K_{\mathsf{D}}\mathbf{ z}_{i}\geq 0,i\in[_{1,7}],\] (32c) where \[K_{\mathsf{D}}\] is a symmetric positive definite matrix. The candidate Lyapunov function \(V\) is defined as  
\[V(\mathbf{z}_{i})=\tfrac{1}{2}\mathbf{z}_{i}^{\mathsf{T}}M_{\mathbf{z}}\mathbf{z}_{i}. \tag{33}\]  
Since \(M_{\mathbf{x}}(\mathbf{q})\) is positive definite for all \(\mathbf{q}\), its minimum eigenvalue is positive. Assuming that \(\inf_{\mathbf{q}}\lambda_{\min}(M_{\mathbf{x}}(\mathbf{q}))>0\) and \(\sup_{\mathbf{q}}\lambda_{\max}(M_{\mathbf{x}}(\mathbf{q}))<\infty\), the inequality in (30) is satisfied with \(\beta_{1}(\|\mathbf{z}\|)=\inf_{\mathbf{q}}\lambda_{\min}(M_{\mathbf{x}}(\mathbf{q}))\|\mathbf{z}\|^ {2}\) and \(\beta_{2}(\|\mathbf{z}\|)=\sup_{\mathbf{q}}\lambda_{\max}(M_{\mathbf{x}}(\mathbf{q}))\|\mathbf{z}\|^ {2}\).