## 3 Solution Algorithm Design
### MPC Framework  
MPC is a popular control strategy in which a model is considered for predicting the future behavior of a plant over a prediction horizon, which adopts an online optimization method to determine the  
Figure 5: Architecture of the autonomous attack guidance system. future control effect through the optimization of a certain performance index [35; 36]. The control input of each time step of MPC is solved according to the latest state optimization. The main advantage of this strategy is that it is suitable for the optimal control of constrained nonlinear systems and can effectively reduce the accumulation of uncertainties. The optimal control model of the online autonomous attack guidance system in each time step can be described by  
\[J_{k}(\mathbf{u}_{u})=\int_{t_{k}}^{t_{k}+h}L(\mathbf{x},\ \mathbf{u}_{u},\ t)\ dt+\varphi(\mathbf{x} _{u}(t_{k}+h),\ t_{k}+h)\ \ \,\ \ \ \mathbf{x}=[\mathbf{x}_{u}\ \ \mathbf{x}_{t}]^{\rm T} \tag{9}\]  
subject to  
\[\mathbf{\dot{x}}_{u}=f_{u}(\mathbf{x}_{u},\ \mathbf{u}_{u},\ t)\ \,\ \ \mathbf{x}_{u}(t_{k})=\mathbf{x}_{uk} \tag{10}\]  
\[\mathbf{\dot{x}}_{t}=f_{t}(\mathbf{x}_{t},\ \mathbf{u}_{t},\ t)\ \,\ \ \mathbf{x}_{t}(t_{k})=\mathbf{x}_{tk} \tag{11}\]  
\[f_{g}(\mathbf{x},\ \mathbf{u})\leq 0 \tag{12}\]  
\[f_{h}(\mathbf{x}_{u},\mathbf{x}_{t})=0 \tag{13}\]  
where \(t_{k}=kh\), \(h\) refers to the time step and \(k\) to the step counter. \(\mathbf{x}_{uk}\) and \(\mathbf{x}_{tk}\) are the initial state vectors of the UCAV and the target in \(t\in[t_{k},t_{k}+h]\), respectively. Furthermore, the control constraint \(f_{g}\) in Equation (12) refers to Equation (2). The terminal constraint \(f_{h}\) in Equation (13) is given by  
\[D{=}\sqrt{(x_{u}-x_{t})^{2}+(y_{u}-y_{t})^{2}+(z_{u}-z_{t})^{2}}\leq D_{\rm min} \tag{14}\]  
where \(D_{\rm min}\) is the preset minimum distance, which represents the end condition of attack guidance for the UCAV. To reduce the aiming error angle, the performance index \(J_{k}(\mathbf{u}_{u})\) in \(t\in[t_{k},t_{k}+h]\) is of the form  
\[J_{k}(\mathbf{u}_{u})=\delta(t_{k}+h)=\sqrt{\delta_{z}^{2}(t_{k}+h)+\delta_{y}^{2} (t_{k}+h)} \tag{15}\]  
The idea of applying the MPC framework to the UCAV autonomous attack guidance is as follows: Firstly, the target motion state of the next time step is predicted according to the motion state of the target measured in the previous time. The UCAV motion state of the next time step is calculated with a certain control vector. Then, the predicted aiming error angle of the next time step is obtained, which is taken as the performance index in Equation (9). Finally, the adaptive fuzzy guidance controller below is used for iterative optimization to obtain the current time step control vector \(\mathbf{u}_{u}^{*}(t_{k})\) online that makes the performance index optimal. The algorithm schematic diagram of the MPC framework is shown in Figure 6.  
The UCAV motion state is calculated and updated according to the model in Equation (1). Although the target's maneuver in the future is unknown, the control vector of the target \(\mathbf{u}_{t}(t_{k}-h)\) in the previous time step \(t\in[t_{k}-h,t_{k}]\) can be calculated through the motion state measured at the previous time. To reduce the algorithm complexity and improve the computational efficiency, this study directly takes \(\mathbf{u}_{t}(t_{k}-h)\) as the predicted control vector \(\mathbf{u^{\prime}}_{t}(t_{k})\) in the next time step \(t\in[t_{k},t_{k}+h]\), where \(\mathbf{u^{\prime}}_{t}(t_{k}){=}[\mathbf{u^{\prime}}_{xt}(t_{k}),\ \mathbf{u^{\prime}}_{yt}(t_{k}),\ \mathbf{u^{\prime}}_{ zt}(t_{k})]^{\rm T}\), and the components are given by  
Figure 6: Algorithm schematic diagram of the MPC framework. \[\left\{ \begin{array}{l}{n^{\prime}}_{xt}(t_{k})=\vartheta_{t}(t_{k}-h)/g+\sin \theta_{t}(t_{k}-h)\\ {n^{\prime}}_{yt}(t_{k})=\dot{\theta}_{t}(t_{k}-h)v_{t}(t_{k}-h)/g+\cos\theta_ {t}(t_{k}-h)\\ {n^{\prime}}_{zt}(t_{k})=\dot{\phi}_{t}(t_{k}-h)v_{t}(t_{k}-h)\cos\theta_{t}(t _{k}-h)/g\end{array} \right.