## 2 Models and Methods
### The Flight Path Phase Model  
Based on the gravity energy reserving and mission altitude at daytime for engineering applications, the SPA HALE flight path is divided into five phases, as shown in Figure 2 below. It includes two level flight phases, two ascent phases and a gravity gliding phase. The two level flight phases in this study are defined as cruising altitude at night and mission altitude at daytime, which are marked \(h_{1}\) and \(h_{2}\). Firstly, the establishment of mission altitude \(h_{2}\) is beneficial to practical engineering applications, which is more conducive to the smooth charging of the energy storage battery. Besides, the mission altitude also provides possibilities for the SPA to execute a flight mission in a stable process, in which the wind speed is lower. Generally, the flight mission could be straight back, circle hover and ra regional mission for monitoring and communication, as shown in Figure 2. Secondly, as we known, the SPA cruising at the altitude \(h_{1}\) in night means lower power consumption. Meanwhile, some tasks such as detection can be also completed at this altitude. Therefore, the above-proposed SPA HALE flight path is very suitable for a day-high and night-low flight strategy and engineering task application, which is different from the three-stage gravity energy storage flight strategy. The details of the phases are as follows. Phase 1: Maximum power ascending  
This flight phase starts at time \(t_{0}\) when the solar radiation energy acquired by the HALE SPA at level flight altitude \(h_{1}\) is sufficient to support the climb flight. The phase ends at time \(t_{1}\) when the flight mission altitude \(h_{2}\) is reached. The flight power supply mode of this phase is: all the solar energy obtained is used for the climbing movement. Therefore, the electric power converted by the energy management system is all available for the aircraft. Inequality (including greater than or equal to \(\geq\) and less than or equal to \(\leq\)) path constraints (IPC), in the optimal control problem usually refers to the constraints of certain functions in a certain path process (\"a phase\"). Generally speaking, in addition to control variables, time and static parameters are also within the scope of these constraint functions. As a result, the SPA flight power \(P\) and the change rate \(q\) of the energy storage battery in the Phase 1 are as follows:  
\[\left\{ \begin{array}{l}P=I\cdot S_{sc}\eta_{IMPPT}\eta_{mot}\eta_{plr}\eta_{SC }=T\cdot v\\ \frac{dQ}{dt}=q=0\end{array} \right. \tag{1}\]  
where \(P\) is the SPA flight power, \(q\) the rate of the battery, \(T\) the thrust of propulsion system, \(v\) the aircraft speed, \(Q\) the battery capacity, \(S_{SC}\) the photovoltaic cell area, \(\eta_{IMPPT}\) the efficiency of Maximum  
Figure 2: Scheme flight path phase map based on gravity energy storage and mission altitude. Power Point Tracking (MPPT) device, \(\eta_{mot}\) the efficiency of aircraft motor, \(\eta_{plr}\) the efficiency of aircraft propeller, \(\eta_{SC}\) the efficiency of photovoltaic cell. In addition, the photovoltaic cell area \(S_{SC}\) can be obtained by the wing area as follows:  
\[S_{SC}=k_{W}\cdot S_{W} \tag{2}\]  
where \(S_{W}\) is the wing area, \(k_{W}\) the pavement ratio of photovoltaic cell. Phase 2: Level flight for mission and charging battery  
The phase begins at time \(t_{1}\) when the predetermined mission altitude \(h_{2}\) is reached, and ends at time \(t_{2}\) when the energy storage battery is fully charged. In the process, the SPA flies at the altitude \(h_{2}\) and charges the energy storage battery. The flight power supply mode of this phase is: part of the electrical energy converted by photovoltaic cells is used to maintain the aircraft's flight, and the rest is used to charge the energy storage battery. In this phase, the IPC are as follows:  
\[\frac{dQ}{dt}=q=\left(I\cdot S_{SC}\eta_{SC}\eta_{MPPT}-\frac{P}{\eta_{mot}\eta _{plr}}\right)\cdot\eta_{dmin} \tag{3}\]  
\[\left\{