Fast Trajectory Optimization for Gliding Reentry Vehicle Based on Improved Sparrow Search Algorithm

In order to solve the problem of low convergence accuracy and easy to fall into local optimization when solving the reentry vehicle trajectory optimization problem for existing algorithms, an improved sparrow search algorithm (OTRSSA) is proposed. Firstly, the basic sparrow search algorithm is improved by the methods of opposition-based learning, adaptive T-distribution and random walk to improve the optimization accuracy and stability, and increase the global search ability, and the performance verification is carried out in 12 benchmark functions; secondly, the 3-DOF motion model of reentry trajectory optimization problem is established and transformed into multi-dimensional function optimization problem; finally, OTRSSA is applied to solve the trajectory optimization problem. The simulation results show that the optimization performance and convergence speed of OTRSSA are better, and a reentry trajectory with the farthest range and satisfying constraints can be obtained quickly.


Introduction
Reentry vehicle has the advantages of high speed, long range and strong maneuverability [1], reentry flight environment is complex, and high-speed reentry flight is greatly affected by heat flux, overload and dynamic pressure, the problem of trajectory optimization has always been a research hotspot.
There are two kinds of methods for reentry trajectory optimization: indirect method and direct method. Based on the classical variational method or Pontryagin minimum principle, the indirect method transforms the optimal control problem into a Hamiltonian two-point boundary value problem, which is sensitive to the initial value and difficult to converge, literature [2][3][4] uses indirect method to solve such problems. The direct method is to discretize and parameterize the variables in the optimal control problem, so as to transform the optimal control problem into a nonlinear programming (NLP) problem, and then solve it with numerical optimization method. In direct method, Gaussian pseudo spectrum method uses Gaussian pseudo Spectrum Approximation parameterization to divide the trajectory into several segments, so that all points on the flight path meet the complex constraints [5][6]. In recent years, various heuristic algorithms have been proposed and applied to reentry trajectory optimization. In reference [7], the decimal ant colony algorithm with local search strategy is used to realize the trajectory optimization design of minimizing the total heat absorption under overload constraints; in reference [8], the reentry trajectory optimization problem was solved by the improved chicken swarm algorithm with fixed angle of attack profile and discrete pitch angle; in reference [9], 2 the artificial bee colony algorithm is used to discretize the angle of attack at Legendre Gaussian collocation points to realize the direct configuration of trajectory optimization.
Sparrow search algorithm was proposed by Xue et al. In 2020, compared with other algorithms, it has the advantages of good stability and high convergence accuracy [10]. In reference [11], sparrow search algorithm is applied to the path planning of UAV, and the constrained path under time cooperation is obtained. But the basic sparrow search algorithm also has some problems, such as easy to fall into local optimum, long search time and so on. This paper proposes a sparrow search algorithm based on opposition-based learning, adaptive distribution and random walk strategy (OTRSSA), which can increase the search space, jump out of the local optimal solution and quickly search for the global optimal solution.

The improved sparrow search algorithm
2.1. Basic sparrow search algorithm SSA algorithm is a new swarm intelligence optimization algorithm inspired by Sparrow's foraging and anti predation behavior. It divides the whole population into discoverer, follower and early warning, and they update their positions according to their respective ways.
The location of the discoverers is about 10% 20%  of the population, and the location renewal mode is as follows: Where: t is the number of iterations, max iter is the maximum number of iterations, indicates a safe value, q is a random number that obeys normal distribution, L represents a matrix with size 1 d  and elements 1.
In addition to the discoverer, the rest of the sparrows are followers, which are updated according to the following formula: Where: p X indicates the best location for the discoverer, worst X indicates the worst position， A is a vector of 1 and -1 . The early warning persons account for about 10% 20%  of the population, and their location is updated as follows: Where: best X represents the current global optimal position,  is the step control parameter,

Opposition-based Learning strategy initialization population
Opposition based learning (OBL) was proposed by Tizhuosh in 2005, which has been proved to be an effective method to improve the search ability of the algorithm [12].

Definition 1 Opposite Number: If x is any real number between [ , ]
a b , then the opposite number of is: Because the feasible scheme and the scheme based on reverse learning are located on both sides of the search space, the reverse learning strategy can expand the search area and enhance the global search ability.

Adaptive t-distribution strategy to update sparrow position
T-distribution is also called student distribution. Its curve shape is related to the degree of freedom parameter n. The probability density function is as follows: Where: After the sparrow is updated, the adaptive t -distribution is used to update the sparrow position again. Compared with the sparrow before and after the update, the sparrow before is replaced if it is better. The updating method of adaptive t -distribution is as follows: * ( ) Where: t i x is the position of sparrow after variation; i x is the position of the - is a t -distribution with the number of iterations as the parameter.

Random walk strategy perturbs sparrow position
The mathematical expression of random walk strategy is as follows： Where: ( ) X t is defined as the set of steps of random walk; cussum represents the cumulative sum; t is the number of steps of random walk (in this paper, we take the maximum number of iterations);   r t is a random function, defined as: Since there is a boundary in the feasible region, it is not possible to update the position directly with equation (8), so it is necessary to normalize it： To sum up, the flow chart of OTRSSA algorithm is shown in figure 1.

Starting
Set parameters Initialize the population using opposition-based learning, let t=1 t < t_max Calculate fitness value and sort, record the best individual and location

Ending
Update the finder location according to Equation (1) Update the follower location according to Equation (2) Update the alerter location according to Equation (3) Dynamic t-distribution according to Equation (7) Calculate fitness value and sort Random walk according to Equation (8) and (10  As shown in Table 4, for high-dimensional unimodal test functions F1 ~ F5, OTRSSA greatly improves the optimization accuracy and stability compared with the other five algorithms, for F1 ~ F4, the average and standard deviation of OTRSSA are improved by more than 25 orders of magnitude compared with the other five algorithms, for F5, although the optimization performance of OTRSSA is not as good as F1 ~ F4, it is still improved by an order of magnitude. For high-dimensional multimodal test function F6 ~ F9, in F7 ~ F9, OTRSSA and SSA are far better than the other four algorithms in the optimization accuracy and stability, which shows that OTRSSA can jump out of the local optimum, find the global optimum stably, and has strong robustness. Although the performance of OTRSSA is not as good as SSA in F6, the optimization accuracy and stability are still very high. For low dimensional functions F10 ~ F12, although the average value and standard deviation of multiple optimization by OTRSSA are not significantly improved compared with the other five algorithms, for each test function F10 ~ F12, OTRSSA can find its approximate optimal solution, which shows that OTRSSA has strong robustness and good stability. In order to further test the advantage of OTRSSA in iteration speed, F6 and F10 are selected to test with OTRSSA and SSA respectively. The convergence curves are shown in figure 2 and figure 3. It can be seen from table 4, figure 2 and figure 3 that although the average and standard deviation of multiple optimizations by OTRSSA in test functions F6 and F10 are not as accurate as those by SSA, its convergence speed is fast and the global approximate optimal solution can be obtained stably.
To sum up, compared with other algorithms, OTRSSA has a greater improvement in the optimization accuracy and stability, and its iterative convergence speed is faster, the search ability is strong, it can jump out of the local optimal solution, and find the global optimal solution or global approximate optimal solution stably.

Motion model of reentry process
Considering that the earth is a stationary homogeneous sphere and the vehicle's bank angle is zero. The reentry motion equation is: Where: r is the radial distance from the Earth center to the vehicle, v g m   ， ， ， ， are the velocity, the flight path angle, the range angle and the acceleration of gravity respectively. L and D the aerodynamic lift and drag accelerations respectively, the specific expression is: Where: max q is the maximum dynamic pressure, max n is the maximum overload value， max q  max n is the maximum heating rate， min max   、 are the maximum and minimum angle of attack.

Terminal constraints
The terminal constraints of reentry process mainly consider the terminal height and velocity constraints.
other times is obtained by linear interpolation, and the flight trajectory satisfying the constraints and the optimal performance index is obtained by integrating the motion equation and optimizing the variables, which belongs to the multi constraint optimization problem.

Simulation calculation and verification
The trajectory optimization problem of reentry vehicle is a multi constrained optimization problem. Using OTRSSA to solve the reentry trajectory optimization problem is to use OTRSSA to optimize the objective function. The position of sparrow individual represents a group of optimization variables. Individual fitness is the value of objective function. The objective function is composed of cost function and constraint function. The discoverer in sparrow population is the individual with better value of current objective function, and the follower is the individual with worse value of current objective function, after several iterations, the optimal solution returned is the optimal value of the variable corresponding to the farthest voyage.

Simulation parameters
The aerodynamic reference area of the aircraft is / kW m 、 80kPa 和 3g ，the terminal height is 20km ，terminal speed is greater than 1000 / m s . Figure. 4 and figure. 5 are the range angle curves obtained by using the six algorithms of OTRSSA, SSA, WOA, PSO, Ba and GWO, respectively. It can be seen from figure. 4 that the range angle obtained by using the optimization of OTRSSA is the largest, which is, converted into the range of about; as can be seen from figure 5, OTRSSA converges rapidly to the optimal value at the beginning of iteration, and then stabilizes at the optimal value, which indicates that OTRSSA has strong global optimization ability.

Simulation results and analysis
figure. 4 Curve of range angle Figure. 5 Curve of iterative convergence The altitude and speed change are shown in figure 6 and figure 7. From figure 6, it can be seen that the aircraft shall be wave like jumping after re-entry and pull, with a smaller jump range, and the re-entry glide time is about 3000s and the terminal height is 20km ; it can be seen from figure 7 that the overall velocity of the aircraft decreases in the course of re-entry and glide, and the terminal speed is slightly higher than 1000 / m s , which meets the design requirements.   1) In this paper, the basic sparrow search algorithm is improved from three aspects: opposition-based learning, adaptive t-distribution and random walk, and the improved sparrow search algorithm (OTRSSA) is compared with other five algorithms. The results of 12 test functions show that compared with other algorithms, OTRSSA has higher optimization accuracy and stability, faster iterative convergence speed, and it can effectively jump out of the local optimal solution and quickly find the global optimal solution; 2) In this paper, OTRSSA is used to solve the trajectory optimization problem. The simulation results show that OTRSSA can optimize a reentry trajectory with the farthest range and meet the constraints, which has a good application value in the reentry trajectory optimization problem.
3) There is still room to improve the stability of multi-dimensional function optimization for OTRSSA, which can be further applied to the cooperative trajectory optimization design of reentry vehicle.