Trajectory Optimization of Hypersonic Periodic Cruise Using an Improved PSO Algorithm

Periodic cruise has the potential to improve the fuel-saving efficiency of hypersonic cruise vehicles but is difficult to optimize. In this paper, hypersonic periodic cruise trajectory is analyzed theoretically and optimized by an improved Particle Swarm Optimization algorithm. Firstly, through theoretical analysis, it is determined that the optimal throttle curve can be parameterized as a switching function. Considering the optimization direction of algorithm, a new penalty function for the constraints of periodic cruise is proposed. Then, PSO algorithm is improved and applied in periodic cruise trajectory optimization. Numerical results demonstrate that optimized periodic cruise trajectory costs less fuel compared with steadystate cruise trajectory, and without computing gradient information, the proposed method is also robust. Finally, the fuelsaving mechanism of periodic cruise is explored by comparing with steady-state cruise, which reveals that periodic cruise trajectory has higher impulse and lift-drag ratio, but lower mechanical energy loss rate.


Introduction
Hypersonic vehicle has a series of advantages and is attractive to researchers all over the world [1][2][3]. In hypersonic flight, in order to satisfy multifarious constraints and reduce fuel consumption at the same time, trajectory design is necessary and significant [4,5].
As far as hypersonic cruise vehicle is concerned, the whole trajectory of is generally divided into ascending stage, cruising stage, and gliding stage [6]. To carry out different missions in different stages, the flight modes of hypersonic vehicle are also quite different, which has been widely studied [7][8][9][10][11]. Generally speaking, the cruising stage accounts for a large proportion in the whole trajectory, and it decides the flight range to a great extent. To make the flight range longer, improving the fuel efficiency is an effective method and finding the cruise trajectory with higher fuel efficiency has been the focus of many researchers [12].
In cruising stage, there are two main cruise modes: steadystate cruise and periodic cruise. Steady-state cruise means that aircraft cruises at a constant altitude and velocity [13]. Thus, steady-state cruise trajectory has only two degree-of-freedoms (DOF) and is relatively easy to optimize [14]. However, it has been demonstrated that steady-state cruise trajectory is not the optimal in reducing fuel consumption [15]. Theoretically, the optimal trajectory is a curve with infinite DOF, and as a Two-Point Boundary Value Problem (TPBVP), it is quite difficult to be solved [16]. Therefore, to simplify the problem, periodic cruise was raised by dividing the whole cruise trajectory into a few phases. During periodic cruise, the curves of altitude and velocity approximate a form of periodic function. And trajectories in neighboring periods are nearly identical. At the end of a cycle, flight states are the same as the initial states [17].
In the analysis of hypersonic periodic cruise trajectory, angles of attack and throttle are control variables, which are also functions about time and need to be determined to minimize the objective, while these two variables are nonlinear and discontinuous sometimes, which increases the difficulty of obtaining the optimal solution [18]. From last century, a few theoretic analysis methods for trajectory design have been proposed [19,20], but simplification and approximation methods were widely adopted in these analysis; otherwise, it was difficult to carry out because of the complexity of hypersonic flight. With the development of computational science and intelligent algorithm, many optimization methods have been proposed and applied in the study of aerospace [21][22][23]. In recent years, evolutionbased algorithms and pseudo-spectral method are widely applied in trajectory optimization [24][25][26][27][28], and it is demonstrated that optimization method is effective to solve trajectory optimization problems [29,30].
Based on optimization methods, many researches about periodic cruise trajectory have been carried out. Kang et al. [31] studied the optimal periodic cruise trajectory by combining genetic algorithm and direct shooting method; then, a method of two-level optimization was developed to deal with the parameters of initial state in the outer loop and the control variables in the inner loop, respectively. Chen et al. [32] divided periodic cruise trajectory into a boost phase where engine was working and a coasting phase where engine was closed. Then, different constraints were proposed, and gradients of the cost were determined numerically. OTIS (Optimal Trajectories Implicit Simulation) was also applied in the problem. In [33], periodic cruise trajectory was divided into four parts, and different constraints were added separately in different parts. The trajectories in the four parts were optimized by GPOPS (Gauss Pseudospectral OPtimization Software) and fitted into a harmonic curve; then, the whole trajectory was obtained. Gao et al. [17] regarded the highest point of periodic cruise trajectory as the starting point and assumed that the curve of altitude was approximately a cosine curve which was regarded as a path constraint; then, the optimal control problem was solved by GPOPS. In [18], trajectories in accelerating phase and gliding phase were optimized separately; then, periodic cruise trajectory with less fuel consumed was obtained.
However, most of the optimization methods proposed for periodic cruise are based on gradient-based algorithm or pseudo-spectral method, which are sensitive to the initial guess value. If the initial guess is not suitable, the optimal solution may be missed. On the contrary, evolutionary optimization method does not need initial guess because the initial population is generated randomly, and it has more advantages in global search ability [34]. Furthermore, the derivative information is not required, which means that the difficulty to construct Jacobian and Hessian matrix can be avoided [35]. So far, there are few researches about the direct application of evolutionary method in the optimization of periodic cruise trajectory without combined with gradient-based algorithm or pseudo-spectral method. Therefore, this paper tries to directly apply evolutionary optimization method in periodic cruise trajectory design, which can optimize the trajectory robustly without initial guess or derivative information computed.
In this paper, firstly, theoretical analysis for periodic cruise is carried out, and it is determined that the optimal throttle curve is a switching function; then, the time when the engine switches on is regarded as an optimization variable. To deal with the constraint of periodic cruise and considering the optimization direction of algorithm, a new penalty function is proposed in the calculation of cost function. Then, to solve the problem effectively and efficiently, Particle Swarm Optimization (PSO) algorithm is improved in several aspects and applied in periodic cruise trajectory optimization. Finally, the difference of trajectory between steady-state cruise and periodic cruise is discussed, and the fuel-saving mechanism of periodic cruise is explored by contrast with steady-state cruise.

Models
The HL-20 aircraft model [36] is employed whose aerodynamic coefficients are parameterized in (1) [37]. α means the angle of attack, and M denotes Mach number. C L and C D denote the coefficient of lift and drag, respectively. The coefficient of drag at zero attack of angle, denoted by C D0 , is equal to 0.008 when M > 10.
Thrust is calculated by thrust coefficient in (2) [37] and is proportional to throttle denoted by s in (3). q means the dynamic pressure, and S e is the area of engine whose value is 9.02 m 2 .
Impulse is calculated by (4), and fuel consumed per second is calculated by (5), where h denotes flight altitude and g denotes the acceleration of gravity whose value is 9.8 m/s 2 .
The 1976 U.S. Standard Atmosphere Model is used. An altitude factor is defined by (6) [17], where R e means the radius of earth.
When flight altitude is in the range of 32 to 47 km, the atmospheric density, denoted by ρ, is calculated in (7), The earth is considered to be a homogeneous sphere. Sound velocity, which is denoted by a, is also regarded as a constant whose value is 340.294 m/s [37]. Then, the dynamic model is described in (8). The flight-path angle is denoted by γ. T, L, and D are thrust, lift, and drag, respectively; m means the mass of aircraft whose initial value is 89930 kg, and r denotes the flight range. Based on (8), the parameters of trajectory can be computed by Four Order Runge-Kutta method (RK-4), a numerical method for Ordinary Differential Equation (ODE).
Trajectory optimization is a classic optimal control problem. h, M, and γ are regarded as state variables which is formulated as x = ðh, M, γÞ T . α and s are regarded as control variables which is formulated as u = ðα, sÞ T . The limits of α and s are showed in Table 1. The optimization of trajectory is to determine the change of α and s to minimize the objective.

Theoretical Analysis and
Optimization Method 3.1. Theoretical Analysis for Periodic Cruise. In order to simplify the problem theoretically, the values of α and γ are regarded relatively small whose cosine value is set to 0 and sine value is set to 1. Then, considering the directions of altitude and range, the dynamic equations can be expressed in the two directions as shown in (9) [38].
Make the transformation as shown in (10).
The control variables, α and s, are denoted by u 1 and u 2 ; thus, 0 ≤ u 1 ≤ 15°, and 0 ≤ u 2 ≤ 1. Then, L, D, and I sp are all relative to x 2 , x 3 , x 4 , and u 1 , while T is relative to x 2 , x 3 , x 4 , u 1 , and proportional to u 2 . So the fuel consumption per second can be expressed briefly as shown in (11), where k is a lumped parameter of those which are relative to x 2 , x 3 , x 4 , and u 1 .
Then, the dynamic equations in (9) can be described as: The constraints are as shown in (13).
The objective of optimal control is to minimize the fuel consumption averaged by range in a whole period. In order to construct the Hamilton function conveniently, it is regarded as a multiobjective optimization problem, whose objectives are maximum range and minimum fuel consumption. So the performance index is as given in (14), where J 1 reflects the range and J 2 reflects the fuel consumption. ω is a weight coefficient.
Therefore, the Hamilton function can be defined as (15), and λ is the Lagrange multipliers.
And the costate function can be expanded as (16).
According to the optimality condition of Hamilton function: due to thus when ξ > 0, H is positively correlated with u 2 . According to the minimum principle, to minimize the value of H, when ξ > 0, u 2 should be equal to its minimum value at 0; similarly, when ξ < 0, u 2 should be equal to its maximum value at 1. Thus, (20) is obtained.
Therefore, it can be concluded that the optimal throttle is either open or close totally, which is consistent with the results obtained by optimization method in [17,19]. Then, the change of throttle can be parameterized by a switching function, whose coefficients are also regarded as optimization variables in this paper.
Based on the theoretical analysis, the throttle is parameterized by a switching function, and the time when engine starts and the duration when engine works are regarded as variables, while the change of angle of attack is not clear. Thus, the angle of attack needs to be parameterized as well. Then, the optimal control problem of periodic cruise trajectory design is transformed into a parameter optimization problem, and optimization algorithm can be employed to solve it. PSO algorithm is relatively easy to program, and it is reported well suited for finding the optimal solution for nonlinear system. In this paper, PSO algorithm is improved firstly and then applied to solve the parameter optimization problem.
3.2. Optimization Problem of Periodic Cruise. In a periodic cruise whose period is donated by t c , the terminal constraints are illustrated in (21).
The objective of optimization is to minimize the fuel consumption averaged by flight range in a cruise period, which is as given in (22).
Therefore, the optimization problem of periodic cruise trajectory can be formulated as (23).
To parameterize the angle of attack, the Lagrange interpolation method is employed. The values of α when t = 0, t = 1/3t c , and t = 2/3t c are selected as control points, and the value at the end of period is set equal to that in the initial time to ensure continuity in neighboring periods. Thus, there are four control points totally so that cubic Lagrange interpolation can be achieved to calculate the value of α at a certain moment. Based on the conclusion in last section, the throttle is open or closed totally; thus, the engine switch-on time t b and working duration t d are also regarded as optimization variables. Therefore, there are 5 variables in all, and the optimization objective is to minimize the fuel consumption averaged by range in a period.
Periodic cruise requires that the initial state x 0 = ðh 0 , M 0 , γ 0 Þ T is the same as the final state F h , F M , and F γ are penalty functions for flight altitude, Mach number, and flight-path angle, respectively, as given in (25), where λ 1 , λ 2 , and λ 3 are large positive numbers.
Based on the description above, constraints are formulated in a new form, and cost function is established; thus, the periodic cruise problem is transformed into an optimization problem as follows: Then, the optimization can be carried out by optimization algorithm, which is illustrated next.
3.3. PSO Algorithm and Improvement. Due to there are 5 optimization variables in total, PSO algorithm, which is demonstrated suitable for optimization problem with high dimensions [39,40] and easy to program, is employed to deal with the optimization problem. In order to improve the speed and effect of the algorithm, several improvements are implemented.
The core of PSO algorithm is to update the particle velocity, whose formula is shown as (27), where r 1 and r 2 are both random numbers between 0 and 1 and k is the Inertia weight, denoted by w, is used to adjust the global and local search ability of algorithm. A larger inertia weight could enhance the global search ability, while a smaller weight could enhance the local search ability [41]. Therefore, in this paper, w varies nonlinearly with k as shown in (28), where k max is the maximum number of iteration and its value is 100. The values of w min and w max are 0.4 and 0.8, respectively [42].
c 1 and c 2 are learning factors which reflect the ability of learning from individual and swarm, respectively [43]. In the early stage, a larger c 1 and a smaller c 2 could improve the global search performance. In the later stage, a smaller c 1 and a larger c 2 could make more particles close to the optimal position and is conducive to accelerate convergence [44]. Therefore, the learning factors are adjusted by linear strategy in (29), where c 1f and c 10 equal to 0.8 and 1.5, while c 2f and c 20 equal to 2.5 and 0.5.
In order to reduce the possibility of falling into the local optimal solution, a hybrid strategy is also implemented. Based on the concept of genetic algorithm, there are a certain amount of particles selected to implement hybridization according to a determined probability. The position and velocity of the offspring particles can be obtained by random pairwise hybridization of the parent particles [45,46]. Thus, the position and velocity of particles in the next iteration are obtained by (30), where r 3 is a random number between 0 and 1.

5
International Journal of Aerospace Engineering In addition, the maximum velocity is dynamically limited: the range of updating velocity is allowed to be relatively larger at the initial stage of the algorithm to enhance swarm diversity and to be slightly smaller in the middle and later stages to prevent the updating velocity too large and away from the optimal position. Maximum velocity of k-th iteration is obtained by (31).
Therefore, the process of the improved PSO algorithm is as illustrated in Figure 1, and the details are as follows: Step 1. Generate the initial position and velocity of swarm randomly.
Step 2. Compute the cost value of each particle in the swarm.
Step 3. Select the particles to implement hybridization.
Step 4. Update the position and velocity of particle: the position and velocity of selected particles are updated by (30), while others are updated according to (27).
Step 5. Repeat Step 2 to Step 4 until the terminal condition is satisfied.
In this paper, the swarm size is 800, and the maximum iteration is 100. Then, based on the optimization problem and improved PSO algorithm, the optimization for periodic cruise trajectory can be carried out.

Optimization Results.
To confirm the effect of the proposed method and explore the performance of periodic cruise, take the initial altitude of 45 km and the initial Mach number of 14 as an example, numerical simulation is carried out based on the improve PSO algorithm. The calculation is implemented based on Intel Core i5-11300H CPU whose main frequency is 3.10 GHz.
Set the initial altitude h 0 at 45 km initial Mach number M 0 at 14, the cruise period is roughly determined at 200 s according to [17,19]. Figure 2 shows the change of cost function in the optimization process. With identical initiation and population size, the changes of cost function by classic PSO algorithm, genetic algorithm (GA) and differential evolution algorithm (DE) are also displayed to validate the effect of improvements. It can be seen that the classic PSO, GA, and DE all converge after approximately 80 iterations, while the improved PSO algorithm needs less than 40 iterations. And the classic PSO and GA as well as DE are more likely to be stuck in a local optimal solution. Figure 3 shows the optimized trajectory parameters of periodic cruise (PC) in red solid lines. In addition, parameters of steady-state cruise (SC), which is computed by the method in [6] at altitude of 45 km and Mach number of 14, are also displayed in dotted lines. It can be seen that periodic cruise is demonstrated to be realized because state variables return to its initial value at the end of period; thus, the new penalty function for constraints is validated as well. The fuel consumption averaged by range of periodic cruise is 1.5251 kg/km, while that value of steady-state cruise is 1.6855 kg/km; thus, periodic cruise is more fuel-efficient, and 9.51% fuel can be saved by periodic cruise. The proposed method is effective to optimize periodic cruise trajectory.
Compared with optimized results in [17,18], fuel-saving performance of the proposed method in this paper is slightly higher. And the reason should be that there are constraints that the altitude curve is approaching a cosine function in [17], and engine starts at the lowest points in [18]. Without these additional constraints, the trajectory obtained by the proposed method can be more flexible; thus, the fuelsaving percentage is higher.   Table 2.
The histories of 100 dispersed trajectories obtained using the proposed optimization method are plotted in Figure 4. Simulation results show that most of the cases can successfully converge to the optimal solution, and their fuel-saving percentages are all close to 9%. Thus, the proposed optimization method is not sensitive with a random initialization.
In order to further verify the robustness and feasibility of the proposed method, several cases whose initial altitudes and Mach numbers are around the optimal values of steady-state cruise are selected to be optimized. The optimal altitude of steady-state cruise is 42.6 km, and the optimal Mach number is 14.38. Then, 6 points, whose altitudes are 40 km and 45 km and Mach numbers are 14, 14.38, and 15, respectively, are selected as the initial points of periodic cruise. Figure 5 displays the trajectories of these cases, and their fuel-saving percentages are showed in Figure 6. It can be seen that periodic cruise is realized in all the 6 cases. When the initial altitude is relatively low, the altitude increases firstly and then decreases, and the altitude variation range increases with Mach number. And the reason should be that with a larger initial Mach number, a higher altitude can be achieved to reduce atmospheric density and then reduce drag. While when the initial altitude is relatively high, the altitude decreases firstly and then increases, and the altitude variation range decreases with Mach number. And the reason is that if initial Mach number is large, it is not appropriate to largely decrease altitude because drag will increase a lot. From Figure 6, it can be seen that the periodic cruise trajectories obtained in the all 6 cases consume less fuel than corresponding steady-state cruise trajectories. Therefore, the proposed method is effective to optimize periodic cruise trajectory robustly.

Analysis of Periodic Cruise Trajectory.
In the case of h 0 = 45 km and M 0 = 14 above, a periodic cruise trajectory with fuel saving rate of nearly 10% compared to that of steady-    International Journal of Aerospace Engineering state cruise is obtained. Based on this case, the fuel-saving mechanism of periodic cruise is analyzed in detail.
It can be seen from Figure 3 that the aircraft firstly decelerates and descends without power. When the flight altitude approaches the lowest point, the engine ignites and starts to accelerate. At this time, due to the low altitude and high atmospheric density, the engine can capture more airflow for combustion. Mach number is small at the same time. According to (4), the specific impulse is larger with lower altitude and smaller Mach number, which means a unit mass of fuel could generate larger thrust. Therefore, when engine is working, periodic cruise makes better use of impulse performance. Figure 7 shows the curve of L/D in steady-state cruise and periodic cruise within a cycle. It can be found that L/D of periodic cruise is in the range of 4.1 to 4.2, which is greater than that of steady-state cruise at 3.9. Based on the Breguet Range Equation [47], large L/D is beneficial to enhance flight range. Thus, it reveals that periodic cruise makes better use of aerodynamic characteristics of aircraft to maintain high L/D, which is also a reasons for improving fuel efficiency during cruise.
In Figure 8, the curves of drag and thrust of steady-state cruise and periodic cruise are given, respectively. Thrust of steady-state cruise is not shown in the figure because the thrust and drag of steady-state cruise are roughly equal. Combined with the Figure 3, it can be seen that the drag of periodic cruise is the largest near the position where flight altitude and Mach number reach the lowest point. After the engine switches on, Mach number and altitude increase gradually, and drag decreases conversely. It is interesting that the drag of periodic cruise is not always lower than that of steady-state cruise. There is still a large span when the drag of periodic cruise is larger. However, from the perspective of energy conversion, the advantage of periodic cruise can be revealed. Since the initial and final states of a cycle are the same, if the mass change is ignored, the kinetic energy and gravitational potential energy keep unchanged in initial state and final state, which means that all the energy generated by fuel combustion is used to overcome drag and finally convert into heat energy. According to [48], the mechanical energy loss rate could be evaluated by (32), and its curve is displayed in Figure 9. The total mechanical energy loss of cruise could be obtained by integrating the curves. It is obvious that the total energy loss of periodic cruise is smaller than that of steady-state cruise, whose reason should be that from Figures 3 and 8, periodic cruise Mach number is lower than that of steady-state cruise in      International Journal of Aerospace Engineering the span when the drag of periodic cruise is larger than that of steady-state cruise, which plays a role in reducing the mechanical energy loss rate. Thus, periodic cruise needs less energy supplement, and it is more fuel-efficient.
Therefore, the trajectory of periodic cruise utilizes the change of atmospheric density to reduce drag and enhance impulse and adopts suitable flight states to achieve higher lift-drag ratio and reduce the whole mechanical energy loss. Therefore, less fuel is consumed compared with that of steady-state cruise.

Conclusions
In this paper, based on the theoretical analysis, the design problem of periodic cruise trajectory is transformed into optimization problem by parameterizing the throttle and angle of attack. An improved PSO algorithm is applied to solve the optimization problem, and results with less fuel consumed are obtained. Finally, the fuel-saving mechanism of periodic cruise is analyzed. Conclusions can be drawn as follows: (1) The change of throttle is a switching function; thus, the throttle is open totally when engine works in periodic cruise (2) The improved PSO algorithm can robustly optimize trajectory of periodic cruise with less fuel consumed, and the new form of constraints is effective for periodic cruise (3) Periodic cruise trajectory can enhance the impulse and L/D and reduce the loss of mechanical energy by matching velocity and drag properly

Data Availability
The image data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.