# Adaptive Optimal Control of UAV Brake Based on Parameter Estimation
## 3 Adaptive Optimal Control Design with Guaranteed Parameter Estimation
### Optimal Control Auxiliary Item Design  
Considering the optimal synthesis of control energy consumption, dynamic tracking error, and filtering error, we design the performance index functions for the following dynamic error closed-loop system of the system, which can be obtained from (4) and (16) such that  
\[\dot{e}_{3}=\dot{x}_{3}-\dot{\alpha}_{2}=K_{3}u-K_{4}x_{2}-K_{5}x_ {3}+\Delta_{2}(t)-\dot{\alpha}_{2}=K_{3}u-K_{4}x_{2}-K_{5}(e_{3}+\dot{\alpha}_ {2})\] \[+\Delta_{2}(t)-\dot{\alpha}_{2} \tag{31}\]  
By substituting controller (28) into (31), the dynamic equation of filtering error is  
\[\dot{e}_{3}=-K_{5}e_{3}+u_{o}+\Delta_{3} \tag{32}\]  
where \(\Delta_{3}\) denotes the lumped disturbances and compensation error. The cost function for the system (32) is designed as  
\[J^{*}(e_{3})=\min_{u_{o}}^{\infty}\int_{t}^{\infty}\Big{\{}e_{3}^{T}\mathbf{ Q}e_{3}+u_{o}^{*T}\mathbf{R}u_{o}^{*}\Big{\}}d\tau \tag{33}\]  
According to [PERSON]'s optimality principle [38], the solution of the optimal cost function is the solution of the HJB equation:  
\[\min_{u_{o}}\Big{(}e_{3}^{T}\mathbf{Q}e_{3}+u_{o}^{*T}\mathbf{R}u_{o}^{*}+ \
abla J^{*}(e_{3})(-K_{5}e_{3}+u_{o}^{*})\Big{)}=0 \tag{34}\]  
And the optimal control solution can be obtained as  
\[u_{o}^{*}=-\frac{1}{2}R^{-1}\
abla J^{*}(e_{3}) \tag{35}\]  
where \(\
abla J^{*}(x)=\partial J^{*}(x)/\partial x\), and it is a necessary condition for solving the optimal control, which is approximated by NN:  
\[\
abla J^{*}(x)=W^{T}\sigma(e_{3})+\epsilon_{r} \tag{36}\]  
where \(W^{T}\)and \(\sigma(x)\) are the optimal weight and activation function of the evaluation NN, and \(\epsilon_{r}(x)\) represents the approximate error that converges to zero after proper training under continuous excitation. In practice, the ideal NN weights W are unknown, combined with (36) and (37); thus, we have the actual optimal control as  
\[\hat{u}_{o}=-\frac{1}{2}R^{-1}\hat{W}^{T}\sigma(x)=\Lambda\hat{W}^{T}\sigma(x) \tag{37}\]  
In order to make the weight estimation \(\hat{W}\) of the NN converge quickly to the ideal value, the control mode of parameter updating is driven by the extraction estimation error in (13)-(21). This mode avoids using an executive NN, which significantly reduces the amount of training computation, speeds up the weight convergence, and improves the estimation accuracy. In order to determine the critical NN weight, the HJB equation can be expressed as  
\[e_{3}^{T}\mathbf{Q}e_{3}+{u_{o}^{*}}^{T}\mathbf{R}{u_{o}^{*}}+\hat{W}^{T}\varpi( x)[-K_{5}e_{3}+{u_{o}}]+\varepsilon_{HJB}=0 \tag{38}\]  
where \(\varepsilon_{HJB}\) is a bounded error caused by the approximation error of critic NN, model linearization error, and system uncertainty. Suppose \(\rho=\sigma(x)[-K_{5}e_{3}+{u_{o}}]\); we obtain  
\[\eta=-\hat{W}^{T}\rho-\varepsilon_{HJB} \tag{39}\]  
where \(\eta=e_{3}^{T}\mathbf{Q}e_{3}+{u_{o}^{*}}^{T}\mathbf{R}{u_{o}^{*}}\) is a utility function. We define regression matrix \(A\) and regression vector \(B\). One has  
\[\left\{ \begin{aligned} \dot{A}&=-lA+pp^{T},A(0)=0\\ \dot{B}&=-lB+p\eta,B(0)=0\end{aligned} \right. \tag{40}\]  
where the regression parameter \(l\) is the normal number. The auxiliary vector \(\Xi\) based on \(A\) and \(B\) is introduced as  
\[\Xi=A\hat{W}_{c}^{*}+B \tag{41}\]  
According to (19)-(21), we obtain  
\[\Xi=A\hat{W}-AW+v=-A\tilde{W}+v \tag{42}\]  
where \(\tilde{W}=W-\hat{W}\) is the estimation error. We have \(v=\int_{0}^{t}e^{-l(t-\tau)}\varepsilon_{HJB}(\tau)p^{T}(\tau)d\tau\) for \(\|v\|\leq\varepsilon_{v2}\). \(\tilde{W}\) is the weight error, which is related to the auxiliary vector \(\Xi\). The designed update rule is  
\[\hat{W}=\text{Y}(\hat{\varpi}(x)r_{2}-\Xi) \tag{43}\]  
where Y is learning gain, and the calculation of \(\hat{W}\) is the same as (24). **4.