## 3 Solution Algorithm Design
### Adaptive Fuzzy Guidance Controller
Therefore, \(n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y})\) can be described by  
\[n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y})=\mathbf{\theta}_{y}^{\mathrm{T}}\mathbf{\xi}( \delta_{y}) \tag{24}\]  
where \(\mathbf{\xi}(\delta_{y})\) is the \(m_{1}m_{2}\) dimensional vector, and its \(l_{1}l_{2}\)th element is given by  
\[\xi_{l_{1}l_{2}}(\delta_{y})=\frac{\mu_{A_{1}}^{l_{1}}(\delta_{1})\mu_{A_{2}}^ {l_{2}}(\delta_{2})}{\sum\limits_{l_{1}=1}^{m_{1}}\sum\limits_{l_{2}=1}^{m_{2}} (\mu_{A_{1}}^{l_{1}}(\delta_{1})\mu_{A_{2}}^{l_{2}}(\delta_{2}))} \tag{25}\]  
In combination with Equations (18)-(21), it can be obtained that  
\[\mathbf{\dot{e}}_{y}=\mathbf{\Lambda}\mathbf{e}_{y}+\mathbf{b}(n_{yu}^{*}-n_{yu}^{D}(\delta_{y }|\mathbf{\theta}_{y})) \tag{26}\]where \(\mathbf{\Lambda}=\left[ \begin{array}{cc}0&1\\ -k_{2}&-k_{1}\end{array} \right]\) and \(\mathbf{b}=\left[ \begin{array}{c}0\\ b\end{array} \right]\). The optimal parameter \(\mathbf{\theta}_{y}^{*}\) and the minimum approximation error \(\omega_{y}\) are respectively defined as  
\[\mathbf{\theta}_{y}^{*} =\arg\min_{\mathbf{\theta}_{y}\in R^{n_{1}n_{2}}}\left[ \begin{array}[] {c}\text{s}\text{s}\text{s}\text{p}\\ \text{s}\text{p}\end{array} \right.\left|n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y} )-n_{yu}^{*}\right|\right]\] (27) \[\omega_{y} =n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y}^{*})-n_{yu}^{*}\] (28) Therefore, Equation (26) can be expressed as \[\dot{\mathbf{e}}_{y} =\mathbf{\Lambda}\mathbf{e}_{y}+\mathbf{b}(\mathbf{\theta}_{y}^{*}-\mathbf{\theta}_{ y})^{\text{T}}\mathbf{\xi}(\delta_{y})-\mathbf{b}\omega_{y}\] (29) Based on this, the Lyapunov function is define as \[V =\frac{1}{2}\mathbf{e}_{y}^{\text{T}}\mathbf{P}\mathbf{e}_{y}+\frac{\mathbf{b}}{2 \gamma}(\mathbf{\theta}_{y}^{*}-\mathbf{\theta}_{y})^{\text{T}}(\mathbf{\theta}_{y}^{*}- \mathbf{\theta}_{y})\] (30) where \(\gamma\) is a positive constant and \(\mathbf{P}\) is a positive definite matrix that satisfies the Lyapunov equation, that is, \[\mathbf{\Lambda}^{\text{T}}\mathbf{P}+\mathbf{P}\mathbf{\Lambda}=-\mathbf{Q}\] (31) where \(\mathbf{Q}\) is an arbitrary positive definite matrix with \(2\times 2\). In combination with Equation (29), the derivative of \(V\) can be obtained as \[\bar{V} =-\frac{1}{2}\mathbf{e}_{y}^{\text{T}}\mathbf{Q}\mathbf{e}_{y}+\frac{b}{\gamma }(\mathbf{\theta}_{y}^{*}-\mathbf{\theta}_{y})^{\text{T}}[\gamma\mathbf{e}_{y}^{\text{T}} \mathbf{p}_{2}\mathbf{\xi}(\delta_{y})-\mathbf{\theta}_{y}]-\mathbf{e}_{y}^{\text{T}}\mathbf{p}_{ 2}\mathbf{b}\omega_{y}\] (32) where \(\mathbf{p}_{2}\) is the last column of \(\mathbf{P}\). According to Equation (32), the adaptive law can be designed as \[\dot{\mathbf{\theta}}_{y} =\gamma\mathbf{e}_{y}^{\text{T}}\mathbf{p}_{2}\mathbf{\xi}(\delta_{y})\] (33) Therefore, \(\omega_{y}\) can be sufficiently small by designing a fuzzy system with enough rules, and \(|\mathbf{e}_{y}^{\text{T}}\mathbf{p}_{2}\mathbf{b}\omega_{y}|<\frac{1}{2}\mathbf{e}_{y}^{\text {T}}\mathbf{Q}\mathbf{e}_{y}\) is satisfied, thus making \(\dot{V}<0\). Similar to the above process, the UCAV adaptive fuzzy guidance controller in the horizontal direction and its adaptive law can be obtained as  
\[n_{zu}^{D}(\delta_{z}|\mathbf{\theta}_{z}) =\mathbf{\theta}_{z}^{\text{T}}\mathbf{\xi}(\delta_{z}) \tag{34}\] \[\dot{\mathbf{\theta}}_{z} =\gamma\mathbf{e}_{z}^{\text{T}}\mathbf{p}_{2}\mathbf{\xi}(\delta_{z}) \tag{35}\]  
Based on this process, the algorithm flowchart of the adaptive fuzzy guidance controller is shown in Figure 7.  
Figure 7: Algorithm flowchart of the adaptive fuzzy guidance controller.