## 2 Materials and Methods
\begin{cases}\frac{1}{p}\cdot \varepsilon\big{(}t,\overline{\theta}\big{)}-\xi_{2}(t)\cdot G_{c}\big{(}s, \overline{\theta}\big{)},g\big{(}t,\varepsilon\big{(}t,\overline{\theta} \big{)},\dot{\varepsilon}\big{(}t,\overline{\theta}\big{)}\big{)}=1,\\ \frac{1}{p}\cdot\partial(t)-\xi_{2}(t)\cdot G_{c}\big{(}s,\overline{\theta} \big{)},g\big{(}t,\varepsilon\big{(}t,\overline{\theta}\big{)},\dot{ \varepsilon}\big{(}t,\overline{\theta}\big{)}\big{)}=0.\end{cases}  \tag{9}\]  
During the optimization process, the adjustable parameter vector \(\overline{\theta}\) is changed in accordance with the gradient procedure [25] (Figure 2):  
\[\overline{\theta}[l]=\overline{\theta}[l-1]-\eta_{l}\cdot I\cdot\
abla_{ \overline{\theta}}I\big{(}\varepsilon\big{(}t,\overline{\theta}[l-1]\big{)} \big{)},\ l=1,2,\ldots, \tag{10}\]  
where \(\Gamma=\text{diag}(\gamma)=\{\delta_{ij},\ \gamma_{ji}\}\) is the weight coefficient diagonal matrix; \(\delta_{ij}\) is the Kronecker delta; \(\
abla_{\overline{\theta}}I\big{(}\varepsilon\big{(}t,\overline{\theta}[l-1] \big{)}\big{)}\) is the gradient vector (6); and \(\eta_{l}\) is the dynamic training rate depending on the change in \(J\). The definition of the gradient vector \(\
abla_{\overline{\theta}}I\big{(}\varepsilon\big{(}t,\overline{\theta}[l-1] \big{)}\big{)}\) in this research is associated with the computation of the sensitivity function vector \(\Xi\) for the variable-structure controller under consideration:  
\[\Xi=(\xi_{1}(t),\xi_{2}(t)),\frac{\partial\Xi}{\partial t}=\bigg{(}\frac{ \partial\xi_{1}(t)}{\partial\overline{\theta}_{1}},\frac{\partial\xi_{2}(t)}{ \partial\overline{\theta}_{2}}\bigg{)},\frac{\partial^{2}\Xi}{\partial t^{2} }=\bigg{(}\frac{\partial\xi_{1}^{2}(t)}{\partial\overline{\theta}_{1}^{2}}, \frac{\partial\xi_{2}^{2}(t)}{\partial\overline{\theta}_{2}^{2}}\bigg{)}. \tag{11}\]  
The implementation of the automatic parametric optimization-generated algorithm on a computer requires stopping the formation of the optimization process; in [25, 28, 30, 31],  
Figure 2: Pseudocode illustrating the steps of gradient-based optimization. the following condition was applied and tested for the automatic parametric optimization algorithms based on sensitivity theory:  
\[S_{j}[l]=S_{j}[l+1]+ \begin{cases}1\text{ at }\Delta J[l]\times\Delta J[l-1]<0,\\ 0\text{ at }\Delta J[l]\times\Delta J[l-1]>0,\end{cases}  \tag{12}\]  
\[S_{\partial J_{j}}[l]=S_{\partial J_{j}}[l+1]+ \begin{cases}1\text{ at }\frac{\partial J \left(\overline{\theta}^{l}\right)}{\partial\overline{\theta}_{j}}\times \frac{\partial J\left(\overline{\theta}^{l-1}\right)}{\partial\overline{\theta} _{j}}<0,\\ 0\text{ at }\frac{\partial J\left(\overline{\theta}^{l}\right)}{\partial \overline{\theta}_{j}}\times\frac{\partial J\left(\overline{\theta}^{l-1} \right)}{\partial\overline{\theta}_{j}}>0,\end{cases} j=\overline{1,2}. \tag{13}\]  
where \(\Delta J[l]=J\left(\overline{\theta}^{l}\right)-J\left(\overline{\theta}^{l-1}\right)\) is the difference between the optimality criteria in the next two iterations. The automatic parametric optimization-generated algorithm for computation-adjustable parameters is considered complete when the following condition is met:  
\[\left(S_{j}[l]\geq n_{S_{j}}\right)\vee\left(\left(S_{\partial J_{1}}\geq n_{ \partial J_{1}}[l]\right)\wedge\left(S_{\partial J_{2}}\geq n_{\partial J_{2} }[l]\right)\right), \tag{14}\]  
where \(n_{S_{j}}\), \(n_{\partial J_{1}}\), and \(n_{\partial J_{2}}\) are given positive values characterizing the corresponding number of changes in the sign of the optimality criterion increments and the gradient components of each sign. The specific values of the parameters \(n_{S_{j}}\), \(n_{\partial J_{1}}\), and \(n_{\partial J_{2}}\) were obtained as a preliminary research result. For the automatic parametric optimization-generated algorithm, in the next stage, the analytical dependencies were determined to achieve the research aim of checking the reliability of the adjustable parameters \(\overline{\theta}^{*}\) computed based on criterion (6) for the minimum value.