A Computationally Inexpensive Optimal Guidance via Radial-Basis-Function Neural Network for Autonomous Soft Landing on Asteroids

Optimal guidance is essential for the soft landing task. However, due to its high computational complexities, it is hardly applied to the autonomous guidance. In this paper, a computationally inexpensive optimal guidance algorithm based on the radial basis function neural network (RBFNN) is proposed. The optimization problem of the trajectory for soft landing on asteroids is formulated and transformed into a two-point boundary value problem (TPBVP). Combining the database of initial states with the relative initial co-states, an RBFNN is trained offline. The optimal trajectory of the soft landing is determined rapidly by applying the trained network in the online guidance. The Monte Carlo simulations of soft landing on the Eros433 are performed to demonstrate the effectiveness of the proposed guidance algorithm.


I. Introduction
Over the past few years, there was a strong interest in sending robotic spacecraft to asteroids in our solar system. Due to its high scientific value, more and more missions focus on the soft landing of the spacecraft on the asteroid's surface. As asteroids are far from the earth, communications between the spacecraft near asteroids and the control center on the earth will have a long delay. Hence, landing on asteroids must be done autonomously using on-board algorithms. The autonomous Guidance, Navigation, Control (GNC) technology is essential and becomes a big challenge to ensure the safety of soft landing mission.
Many studies on the autonomous guidance and control of the soft landing on asteroids have been carried out. Guelman et al. [1] researched the final approach phase and vertical landing on a spherical asteroid with a power limited, electrically propelled spacecraft. Based on the autonomous navigation system using the feature tracking technology, Huang et al. [2] planned desired descent landing trajectories of the spacecraft as the three power polynomial form with the initial and terminal constraint, and then applied a variable structure control to track the trajectory. This reference trajectory guidance based on the three power polynomial technology was widely applied [3][4][5]. Roberto Furfaro et al. [6] developed a novel closed-loop autonomous guidance law based on multiple sliding surfaces for the soft landing of the spacecraft on the designated point on the asteroid. In these previous contributions, the proposed autonomous guidance algorithms did not consider the optimality of the landing trajectory of the spacecraft.
In order to reduce fuel consumption and increase payload capacity, optimal guidance is essential for the soft landing on the asteroid. However, the analytical solutions of the optimal guidance are hardly figured out. Instead, numerical solutions are usually applied. Lantoine et al. [7] investigated a technique for computing optimal trajectories for soft landing in an irregular gravity field of a rotating asteroid. Zhang et al. [8] presented an optimization method based on the pseudo-spectral technology and the sequential quadratic programming for the minimum-energy soft landing on the asteroid. Wang et al. [9] investigated the fuel-optimal soft landing based on the Gauss pseudo-spectral method. However, the presented optimal guidance laws above are all with high computational cost due to the complicated model of the asteroid's gravitational field, which may affect the real time performance of the autonomous soft landing. As the spacecraft hovers vary over a region of state space at the beginning of the soft landing, a fixed optimal control which was planned with a certain initial hovering point may fail. Due to the time delay, solving the optimization problem on the earth and transferring the result to the spacecraft is also impossible. Hence, a computationally inexpensive and real time autonomous optimal guidance is necessary. The traditional optimal guidance law needs to be improved to meet the requirements of the autonomous soft landing.
The indirect method is usually applied to solve the optimal guidance problems. Based on the optimal control determined by the Pontryagin Principle, the optimization problem is transformed into a TPBVP and solved by the numerical methods such as Newton's or Powell's [10][11][12]. Then, the optimal soft landing trajectory can be determined. The main advantage of the indirect method lies in that the optimal trajectory and control can be determined by several initial co-states. Most of computational and time cost in the indirect method are consumed in solving the shooting equations. Hence, if the desired initial co-states can be quickly and easily obtained, the optimal guidance law based on the indirect method can be applied in the autonomous soft landing.
The improvement of the functional approximation technology of the neural network gives an opportunity to implement the realtime autonomous optimal guidance [13][14][15][16]. Cheng et al. [17] proposed a fixed-final time optimal control law using neural networks and Hamilton-Jacobi-Bellman (HJB) equations for general affine in the input nonlinear systems. Medagam et al. [18] presented a nonlinear optimal control technique based on approximating the solution to the HJB equation by the RBFNN Hossain et al. [19] presented an investigation into the challenges in implementing a hard real-time optimal non-stationary system using the general regression neural network. Because of its excellent approximation properties [20,21], the RBFNN was widely applied since be introduced in 1988 [22]. It is applied to improve the indirect optimization method in our work.
An optimal guidance algorithm for autonomous soft landing on asteroids was proposed in this paper. The optimization problem of the soft landing trajectory is formulated, and then transformed into a TPBVP through the optimal control obtained by the Pontryagin Principle. The RBFNN, which was trained by the database on the earth, was applied online to determine the optimal trajectory of the soft landing. A normalization method is applied to ensure the approximation property of the RBFNN. Monte Carlo simulations are performed to analyze the performance of the proposed optimal guidance. The main contributions of this work are presented as follows: (i) it's feasible to develop an autonomous optimal guidance algorithm via RBFNN for the spacecraft soft landing on the asteroid. (ii) the application of the RBFNN in the indirect optimal method is investigated.
The rest of the paper is organized in the following form. In Sec II, the optimization problem of the soft landing trajectory is formulated. The orbital dynamics of the spacecraft and the gravitational field of the asteroid are modeled. In Sec III, the optimization problem is transformed into a TPBVP through the optimal control determined by the Pontryagin Principle. Then, the optimal guidance via the RBFNN is proposed. In Sec IV, Monte Carlo simulations are performed to verify the effectiveness of the proposed algorithm. Ultimately, the conclusion follows in Sec V.

II. Problem formulation
The following assumptions need to be declared before the problem formulation. The rotation rate of the asteroid is time invariant. The spacecraft's soft landing starts from a hovering point, and ends with a specified location on the asteroid's surface. The initial position, velocity, and mass of the spacecraft can be obtained by the navigation system. The final position and velocity are determined to meet mission requests. As shown in Fig 1, the spacecraft is controlled by a main thruster. The magnitude and direction of the spacecraft's thrust are adjustable. The solar radiation pressure is not considered, it has a significant contribution only for very small asteroids with low gravity field [7].

The trajectory optimization problem
The orbital dynamic equations of the spacecraft near the asteroid were widely researched [23]. Aiming to formulate the trajectory optimization problem of the soft landing, dynamic equations of the spacecraft are established in the body-fixed frame [3,4]. The origin of the body-fixed frame coincides with the mass center of the asteroid. The z-axis coincides with the spin axis of the asteroid, and the x-axis coincides with minimum inertia axis of the asteroid. The y-axis can be defined by the right-hand rule.
In the body-fixed frame, the orbital motion of the spacecraft can be expressed as where x, y, z are the position of the spacecraft. g x , g y , g z are the gravitational acceleration of the asteroid in three axis. m is the mass of the spacecraft. ω is the angular velocity of the asteroid's rotation.
T is the magnitude of the spacecraft's thrust vector, which is limited to the domain from zero to T max .
β is the angle between the thrust vector and its projection on the o-x-y plane, α is the angle between the projection and the direction of the x axis. I s is the specific impulse of the thruster, g 0 is the gravitational acceleration on the earth. Define the state vector as Then Eq (1) can be converted into a nonlinear differential equation as The cost function is expressed as Hence, the trajectory optimization problem of the soft landing can be expressed as min JðÁÞ with the hard boundary conditions as The gravitational potential function of the asteroid The gravitational acceleration g = [g x , g y , g z ] T in Eq (1) can be determined by the gravitational potential function of the asteroid, as where U is the gravitational potential function of the asteroid. r = [x, y, z] T is the position vector of spacecraft. Due to the highly irregular shape, several models were developed to approach the nonspherical gravitational field of the asteroid. Among them, the spherical harmonic expansion model (SHEM) [24] and the constant-density polyhedron model [25], are widely applied in the autonomous GNC system for the soft landing. In the following part, they are introduced with a simple evaluation of the advantages and drawbacks. It should be mentioned that due to the limitation of the personal computer's computational ability, the second-order expansion of the SHEM is selected for the simulation in Sec IV. Theoretically, the polyhedron model can also be applied in our optimal guidance algorithm.
The spherical harmonic expansion model (SHEM). The SHEM divides the exterior gravitational potential of the asteroid into two parts, the spherical part and the irregular part. The irregular part is approached by an infinite series expansion in solid spherical harmonics. By the SHEM, the exterior gravitational potential of the asteroid can be expressed as where G is the gravitational constant, M is the total mass of the body, R 0 is the normalizing radius of the asteroid, P j i is the associated Legendre function, C ij and S ij are the spherical harmonic gravity coefficient, r, δ and γ are the radius, latitude, and longitude of the field point. The finite truncation of the SHEM is usually sufficient to get a good accuracy and easy to be used [4,26]. However, the series of the SHEM may be divergent in the Brillouin sphere [24] of the asteroid.
The polyhedron model. A constant density polyhedron is applied to approach the irregular shape of the asteroid. In this model, the exterior gravitational potential of the asteroid can be expressed as where σ is the constant-density of the body, r e is a vector from the field point to an arbitrary point on each edge, r f is a vector from the field point to an arbitrary point on each face, E e is a dyad defined in terms of the face and edge normal vectors associated with each edge, F f is the outer product of face normal vectors, L e is a logarithmic term expressing the potential of a 1D straight wire, ω f is the solid angle subtended by a face when viewed from the field point.
The polyhedron model can formulate the exterior gravitational potential of the asteroid anywhere in space, not limited to the outside of the Brillouin sphere. However, it needs to sum over all the edges and all the faces of the polyhedron to compute the gravitation in one field point. It is a large computational burden, especially when the polyhedron is highly accurate.
III. The realtime optimal guidance via RBFNN The relative TPBVP First of all, the trajectory optimization problem of the soft landing is transformed to a TPBVP through the optimal control obtained by the Pontryagin Principle theory.
According to the Pontryagin Principle theory, the optimal control is the one which can minimize the Hamiltonian function, as where O is the feasible region of the control.
As the latitude and longitude angle of the thruster are unlimited, the optimal control α Ã and β Ã can be determined by the partial derivative of the Hamiltonian function, as Hence, the optimal control α Ã and β Ã can be expressed as Eqs (13) and (14).
As the magnitude of the thrust is limited to [0, T max ], the optimal control T Ã is a piecewise function according to the Pontryagin Principle theory. Putting Eqs (13) and (14) into Eq (11), the optimal T Ã can be expressed as where S is the switching function, as As shown in Eqs (13)- (16), the optimal control u Ã can be determined by the co-states λ(t). According to the Pontryagin Principle theory, the co-states meet the regular expression as As shown in Eq (6), the terminal position and velocity of the spacecraft are constrained. Hence, their relative final co-states are uncertain. However, the terminal mass of the spacecraft is unconstrained and the mass-relative final co-state can be determined as In summary, the optimization problem is transformed to an TPBVP, the Canonical equation of which is shown as Its boundary conditions are shown as Eqs (5), (6) and (18).

The optimal guidance
To every initial co-states λ(t 0 ), the relative final states x(t f ) and co-states λ(t f ) can be numerically integrated through Eq (19). Hence, the proposed TPBVP can be transformed into a set of nonlinear shooting equations as where x 0 ¼ ½x; y; z; _ x; _ y; _ z T Several methods can solve the shooting equations, such as the Newton's and the Powell's. However, all these methods need thousands of iterations, which result in their high computational complexities. Considering the optimal guidance based on the indirect method, most computational cost is consumed in the process of solving the shooting equations. Hence, the key problem is how to obtain the desired initial co-states in a computationally inexpensive way.
The solution of the equations can be treated as the map of the initial states x(t 0 ) to the desired initial co-states λ(t 0 ). It is difficult to deduce the analytical form of the map. However, the map may be approached by the functional approximation technology. In our research, the RBFNN is applied to make the indirect method available online. The spacecraft can acquire the initial co-states through the trained RBFNN quickly. Integrate Eq (19) forward with the initial states and co-states, the optimal control can be determined at each point along the trajectory.
The structure of the online optimal guidance is shown in Fig 2 Thousands sets of initial states and their relative initial co-states, which are acquired through solving the shooting equations by Newton's method, establish the training database. Then, the RBFNN is trained by the database. The pre-computation to obtain the database is also very complex. However, it is an offline computation, which is on the earth and will not threaten the real time performance of the optimal guidance. The spacecraft can easily acquire the relative optimal control through the well trained network online.
The normalization method. The magnitude of each element in the states and co-states are quite different, which may threaten the approximation property of the RBFNN. In order to avoid this problem, a normalization method is applied to convert all elements to the same magnitude.
The normalization method is expressed as  The structure of the optimal guidance. This figure illustrates the structure of the optimal guidance. The RBFNN is trained by the database obtained by solving the shooting equations. Then it is applied online to obtain the relative initial co-states quickly. Through the initial co-states, the optimal control can be determined by the analytical equations as Eqs (13)- (15). The inverse of the normalization method is expressed as The RBFNN. As illustrated in Fig 3, the output of the RBFNN is the sum of all outputs of the neurons with different coefficients. The center point of neurons is not necessarily structured, that is, it can have an arbitrary distribution. Such a mesh-free grid structure yields high flexibility, especially when the domain is irregular [27].
The output of RBF neurons are expressed as where v, are the input of the RBF neural, p j is the center point of the RBF neuron, b is the shape parameter, The output of RBFNN can be expressed as where c is the unknown coefficients, N is the number of the neurons. The training of the RBFNN is based on the orthogonal least squares. Define the error function as where e is the 7 × n matrix of the error. n is the number of the training data. N is the number of the neurons. Define the regression matrix as pðiÞ j ¼ ½pðiÞ j1 ; pðiÞ j2 ; Á Á Á ; pðiÞ jn T ð30Þ The orthogonal triangular decomposition of P(i) is expressed as where P ai is a N × N Upper triangular matrix whose main diagonal elements are 1, P ui is a n × N Orthogonal matrix. The weight vector c i can be determined as below [28].

IV. Simulation
Eros433, whose physical parameters are shown in Table 1, is selected to be the mission object in the simulation [29]. In the table, G is the gravitational constant, M is the total mass of the body, R 0 is the normalizing radius of the asteroid, C 20 and C 22 are the spherical harmonic gravity coefficient, ω is the angular velocity of the asteroid's rotation, T max is the upper bound of the control thrust, I s is the specific impulse of the thruster, t f is the terminal time of the soft landing, m 0 is the initial mass of the spacecraft. The second order of SHEM is applied as the gravity field model of the asteroid, its triaxial expressions are shown as Eqs (34)-(42). The gravitational acceleration in three axis are expressed as Define the terminal error of position and velocity as As illustrated in Fig 4a,   acceptable for the autonomous guidance. Hence, the precomputed optimal control cannot guarantee the safety of the soft landing. The autonomous optimal guidance is necessary.

B: The descending with RBFNN (150 neurons trained by 1331 sets of data)
Firstly, the optimal soft landing trajectories about 1331 initial hovering points, which have an interval of 1000m between the adjacent two points, are selected to establish the training database.Then, a RBFNN of 150 neurons is trained by the database. Finally, the network is applied in the simulation of the online optimal guidance.
A Monte Carlo simulation (one thousand times) is conducted to verify the proposed optimal guidance. The spacecraft is assumed to be hovering on a random point in the selected space of [0 ± 5, 70 ± 5, 0 ± 5] km at the start, and then descend to the desired hovering point applying the proposed optimal guidance..
The statistical results of the simulation are shown in The simulation shows that the proposed optimal guidance is better than the fixed optimal guidance.
The contrast of the two obtained co-states l s i and l rbf i are shown in Table 2. The initial costate l s i is acquired through solving the shooting equations. The initial co-state l rbf i is acquired through the trained RBFNN. The initial state x 1 is a sample point in the training database. The x 2 is a random point in the selected space, but not in the samples.
Contrasting the results shown in Table 2, each element in the l rbf i is similar to the ones in the l s i , no matter at the selected point or random point. However, the computation time of the RBFNN is 12.04 milliseconds in the environment of MATLAB with a 2.59 GHz CPU. It is much faster than the traditional indirect method based on Newton's or Powell's, which may need minutes even hours [8].
C: The descending with RBFNN (1000 neurons trained by 1331 sets of data) Aiming to improve the accuracy of the proposed optimal guidance, the RBFNN is extended to 1000 neurons. The results of the Monte Carlo simulation are shown in Fig 6 As illustrated in Fig 6a, the max terminal position error is reduced to 0.3 meters and the average value is reduced to 0.0214 meters. The velocity error is not reduced much, but it is more concentrated. Compare with the results in Fig 5 and Fig 6, it is easy to find that the accuracy of the optimal guidance law is improved with the increasing of the neurons.

D: The descending with RBFNN (1000 neurons trained by 9261 sets of data)
To improve the performance of the proposed guidance further, the trained database is extended to 9261 sets of data. The results of Monte Carlo are shown in Fig 7. The maximum of the terminal position error is reduced to 0.077 meters and the average value is reduced to 0.013 meters. which is shown in Fig 7a. With the extended database, the accuracy of the proposed guidance algorithm is improved further.  As a conclusion of the simulations above, it is obvious that the proposed optimal guidance is effective. It can guide the spacecraft to the desired point. The computing time is only a few milliseconds. The accuracy of the proposed optimal guidance can be improved by increasing the number of the neurons and the training data set.

V. Conclusion
This paper proposed a fast and computationally inexpensive optimal guidance algorithm via RBFNN for the autonomous soft landing on an asteroid. The well trained RBFNN was applied online to determine the optimal soft landing trajectory without solving the shooting equation, which leads the computing time of the optimal guidance law reduced to a few milliseconds. The accuracy of the proposed guidance algorithm can be improved through the extending of the network and the training database. Hence, it can meet the requirements of the practical if the network and database are appropriate. As a consequence, the proposed optimal guidance algorithm can guide the spacecraft to the desired point. Also, it is fast and computationally inexpensive enough to be selected in the autonomous soft landing task.
Several limitations still exist in our work. The proposed method focuses on reducing the online cost of optimal guidance, the offline cost of the pre-computation process is still very high. The outside disturbance on the spacecraft during the soft landing needs a further research. The training process of the network can also be improved. These works will be done in the future.