## 5 Neural Control Design and Stability Analysis
_The weight error_ \(\tilde{\mathbf{W}}(t)\) _and estimation error_ \(\tilde{b}\) _trajectories are also bounded as follows:_ \[\limsup_{t\to\infty}\lVert\tilde{\mathbf{W}}(t)\rVert^{2}\leq 2\gamma_{1}\frac{ \beta}{\alpha},\quad\limsup_{t\to\infty}\lvert\tilde{b}(t)\rvert^{2}\leq 2 \gamma_{2}\frac{\beta}{\alpha}\] (49) _where_ \[\alpha=\min\biggl{(}\frac{\lambda_{\min}(\mathbf{Q_{1}})}{\lambda_{\max}(\mathbf{P_{1 }})},\frac{\lambda_{\min}(\mathbf{Q_{2}})}{\lambda_{\max}(\mathbf{P_{2}})},2\gamma_{1 }\delta_{W},\gamma_{2}\delta_{b}\biggr{)}\] (50) \[\beta=\lambda_{\max}(\mathbf{\Delta_{3}})f_{0}+4\lambda_{\max}(\mathbf{ \Delta_{3}})f_{1}\gamma_{ref}+\frac{\delta_{b}}{2}{b_{*}}^{2}\]  
_where \(\mathbf{Q_{1}}\in\mathbb{R}^{2\times 2}\) and \(\mathbf{Q_{2}}\in\mathbb{R}^{2\times 2}\) are positive definite symmetric matrices of appropriate dimensions, \(I_{2\times 2}\) is an identity matrix of \(2\times 2\) and \(\gamma_{1}\), \(\gamma_{2}\), \(\delta_{W}\), and \(\delta_{b}\) are positive real constants, with \(\gamma_{1}\), \(\gamma_{2}\) defining the learning gain of the DNN and the adaptive gain for the parameter estimation, respectively._  
Equations (25) and (42) define the indirect adaptive controller structure developed in this work, called _Dynamic Neural Control System_ (DNCS). With the aim of validating that identification and tracking errors of the control system achieve a given invariant region around the origin, this study applies Lyapunov stability theory. The mathematical proof is based on the proposed Lyapunov function candidate below:  
\[V\bigl{(}\mathbf{e},\tilde{\mathbf{\zeta}},\tilde{\mathbf{W}}(t),\tilde{b}(t),t\bigr{)} =\mathbf{e}^{\top}\mathbf{P_{1}}\mathbf{e}+\tilde{\mathbf{\zeta}}^{\top}\mathbf{P_{2}} \tilde{\mathbf{\zeta}}+\frac{1}{2\gamma_{1}}\tilde{\mathbf{W}}(t)^{\top}\tilde{\mathbf{W} }(t)+\frac{1}{2\gamma_{2}}\tilde{b}(t)^{2}, \tag{51}\]  
where \(\mathbf{0}<\mathbf{P_{i}}=\mathbf{P_{i}^{T}}\in\mathbb{R}^{2\times 2}\), \(i=1,2\). The full proof is given in Appendix A.  
Theorem 3 ensures the existence of conditions of sufficiency, which can be used to justify the convergence of the identification and tracking errors, that is, both error trajectories are ultimately bounded as in Equation (48). This formal inference considers the application of the proposed control structure Equation (42) and the resolution of two matrix-type algebraic Riccati equations (AREs). The two Riccati equations can be solved before (offline) the identifier-based controller starts. The DNCS control law in Equation (42) is comprised of the dynamic neural network approximation of the lumped disturbances, a compensation of the reference system dynamics, and a feedback controller based on the tracking error. Furthermore, it incorporates a compensation of the estimate \(\tilde{b}\) of the unknown control input gain. Therefore, the proposed control law design improves the behavior of the closed-loop system when a standard feedback controller with no compensation is applied. On the other hand, the expressions that represent the weight-updating laws for the DNN weights \(\mathbf{W}(t)\) and the estimation of the input gain \(\tilde{\mathbf{b}}(t)\) are obtained also as a consequence of the Lyapunov stability analysis and satisfy Equations (46) and (47), respectively. The parameters \(\gamma_{1}\) and \(\gamma_{2}\) represent the DNN learning rate and the adaptive gain, respectively, and \(\delta_{\text{W}}\) is a positive scalar. At this point, we suppose that the matrix \(\mathbf{W}_{0}\) is estimated via an offline training and then used during the adjustment of \(\mathbf{W}(t)\), which is closely related to the nominal description of Equation (28). Moreover, both adaptation laws in Equations (46) and (47) depend on the matrix \(\mathbf{P_{2}}\) calculated from the second algebraic Riccati Equation (43) as well as for the identification error \(\tilde{\mathbf{\zeta}}\).