## 3 Solution Algorithm Design
### Adaptive Fuzzy Guidance Controller  
For the Step (3) in the above MPC framework, a UCAV attack guidance controller based on the adaptive fuzzy control method [33; 34] is designed. Based on the optimal control model in Equation (9), the adaptive fuzzy guidance controller iteratively optimizes the control vector that makes the performance index continuously decrease in each time step, and realizes the approximate optimal control in each time step under the constraint of specified iteration times or high-precision requirements. The main advantage of this algorithm is that it has adaptivity for parameters, which reduces the dependence on artificial expertise and improves the adaptability to uncertain factors. Compared with intelligent optimization algorithms, the algorithm complexity is reduced and the convergence and timeliness are improved. Since the algorithm of the adaptive fuzzy guidance controller in the horizontal direction is similar to that in the vertical direction, only the vertical direction is taken as an example for modeling in this paper. Firstly, based on the aforementioned aiming model of BVR attack fire control, the attack guidance model in the vertical direction is set up for  
\[\ddot{\delta}_{y}=f(\delta_{y},\dot{\delta}_{y})+bn_{yu} \tag{18}\]  
where \(f\) and \(b\) are an unknown function and an unknown positive constant, respectively. Obviously, the aiming error angle instruction in the ideal aiming state is \(\delta_{ym}{=}0\), and \(\dot{\delta}_{ym}{=}0\). Therefore, the error vector is defined as  
\[\mathbf{e}_{y}=[e_{y},\dot{e}_{y}]^{\mathrm{T}}\,\quad\mathbf{e}_{y}=\delta_{ym}-\delta_{ y}=-\delta_{y} \tag{19}\]  
To asymptotically converge \(e_{y}\) to zero, that is, \(e_{y}(t)\to 0\) when \(t\rightarrow\infty\); set \(\mathbf{K}=[k_{2},k_{1}]^{\mathrm{T}}\), and let all solutions of the polynomial \(s^{2}+k_{1}s+k_{2}\) lie on the left half of the complex plane. Therefore, the control law in the vertical direction is designed as  
\[n_{yu}^{*}=\frac{1}{b}(-f(\delta_{y})+\ddot{\delta}_{ym}+K^{\mathrm{T}}e_{y}) \tag{20}\]  
where \(\delta_{y}=[\delta_{y},\dot{\delta}_{y}]^{\mathrm{T}}\). The principle of the adaptive fuzzy guidance controller is to design a feedback controller and an adaptive law of adjusting parameters based on the fuzzy system to make the output \(\delta_{y}\) track the ideal instruction \(\delta_{ym}\) as far as possible. Thus the adaptive fuzzy guidance controller in the vertical direction is expressed as  
\[n_{yu}=n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y}) \tag{21}\]  
where \(n_{yu}^{D}\) refers to a fuzzy system and \(\mathbf{\theta}_{y}\) to an adaptive parameter set. For ease of presentation, let \(\delta_{1}{=}\delta_{y}\) and \(\delta_{2}{=}\delta_{y}\). Firstly, \(m_{i}\) fuzzy sets \(A_{i}^{l_{i}}\) are defined for the input variable \(\delta_{i}\), where \(i=1,2\) and \(l_{i}=1,2,\ldots,m_{i}\). \(n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y})\) is constructed with \(m_{1}m_{2}\) rules that in the form of  
\[If\ \ \delta_{1}\ is\ A_{1}^{l_{1}}\ \ and\ \ \ \delta_{2}\ is\ A_{2}^{l_{2}}\,\ \ \then\ \ \ n_{yu}^{D}\ \ is\ \ S_{1}^{l_{1}l_{2}} \tag{22}\]  
Then, product inference engine, singleton fuzzifier, and center average defuzzifier are used to design \(n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y})\), that is,  
\[n_{yu}^{D}(\delta_{y}|\mathbf{\theta}_{y})=\frac{\sum\limits_{l_{1}=1}^{m_{1}}\sum \limits_{l_{2}=1}^{m_{2}}g_{u}^{l_{1}l_{2}}(\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{23}\]  
where \(\mu_{A_{i}}^{l_{i}}\) is the corresponding fuzzy membership function, \(g_{u}^{l_{1}l_{2}}\) is the adjustable free parameter and is placed in the set \(\mathbf{\theta}\in R^{m_{1}m_{2}}\).