USE OF A EVOLUTIONARY ALGORITHM TO OPTIMIZE INTERPLANETARY TRANSFERS UTILIZAÇÃO DE UM ALGORITMO EVOLUCIONÁRIO NA OTIMIZAÇÃO DE TRANSFERÊNCIAS INTERPLANETÁRIAS

In this paper, it was studied the optimization of the cost of interplanetary missions with emphasis on reducing fuel consumption. To achieve this goal, a genetic algorithm was implemented to optimize the total impulse of orbital transfer. It was implemented a case of sending a space vehicle from Earth to a another planet using a gravity assist maneuver (swing by), in this paper it was chose sending a spacecraft from Earth to Mars with a close approach to the Venus. The method employed can be used for impulsive interplanetary missions in general, and so the solution found can become an initial solution for numerical methods of optimization of low thrust maneuvers.


INTRODUCTION
There are many different methods and algorithms in computer science for optimizing numerous problems, such as deterministic methods and other methods such as evolutionary algorithms and neural networks.
A genetic algorithm (GA) is a search technique used in computer science to find approximate solutions to optimization and search problems. They are a particular class of evolutionary algorithms that use techniques inspired by evolutionary biology such as heredity, mutation, natural selection, and recombination (or crossing over).
In this work, a gravity assist maneuver (swing-by) was used, a maneuver that has a historical importance because it was used in the missions Voyager 1 and Voyager 2 and in several other missions.
When a spacecraft passes close to a celestial body and uses that body's gravity to change its orbit, we call it a "pure swing-by maneuver" or "standard swing-by maneuver". This change includes modifying the spacecraft's velocity, energy, and angular momentum. This is a type of maneuver known in the literature, already used in space missions, whose main objective is fuel optimization, considering that swing-by is equivalent to the application of a thrust with zero fuel consumption. Considering impulse in this case as the application of a force of infinite magnitude in an infinitesimal period of time, so we have that the consequence of this is the instantaneous variation of the speed of the vehicle. The most common model to study this maneuver is to divide the problem into three distinct parts dominated by Celestial Mechanics. Other models used to study this maneuver are the Circular Constrained Three-Body Problem (FELIPE; PRADO, 1999;PRADO, 1992) and the Constrained Elliptical Three-Body Problem (PRADO, 1997).
Using a model in which we divided the problem into three phases dominated by the dynamics of the Two-Body Problem (patched-conics) we were able to arrive at equations for the velocity impulse, energies and angular momentum. A comparison was then made between fuel consumption using the maneuver found in the work with a Hohmann Transfer and the result obtained by (ENGLANDER, 2013) using deterministic methods.

Powered swing by in three dimensions formulation
This formulation is found in (FELIPE, 2004) and its hypothesis is that the impulse is given at the instant of maximum approximation of the vehicle with the body M 2 . The coordinate system used has its origin in M 2 , this system as well as the maneuver can be seen in Figure 1. Assuming that the movement of the vehicle around the body M 2 describes a hyperbolic orbit, the angle δ, which is half of the angular deflection that the vehicle's velocity vector undergoes during the maneuver, is written as follows form: (1) Equations involving vehicle speeds before and after the encounter with M 2 were used. Therefore, the speed before the meeting is given by: Where: • Between points A and B we assume that the vehicle is under the attraction of the gravity • V − ∞ is the relative velocity vector between the vehicle and M 2 before the encounter; • The angles α and β define the position of the periapsis as seen in Figure1; • The angle γ defines the slope of the periapsis velocity ( Figure 1).
The total impulse is: • δV x , δV y and δV z are the components of the impulse given during the swing-by.
The developments for these equations were omitted in this document and are found in the thesis of Dr. Gislaine de Felipe (FELIPE, 2004).

GENETIC ALGORITHM -GA
Given the above mathematical formulation and using concepts previously applied, a mission was studied where a spacecraft is launched from one planet, swings by on another (or on the launch planet itself) and finally arrives at the target planet. The aim was to implement a genetic algorithm to optimize fuel consumption, for which the total thrust (∆V total ) was optimized. The random variables were: • Launch date; • Flight time until the swing by maneuver; • Flight time after swing by until reaching target planet; • Also used as random variables were the maximum approach distance during the swing by (r p ) and the deflection direction of the spacecraft speed during the maneuver.  Next, there is Figure 3 where you can see the flowchart of the fitness function. According to this algorithm, the total impulse of the maneuver is calculated. • Distance r p : 40000 km a 600000 km; • Signal of δ: 0 (positive) or 1 (negative).

RESULTS AND DISCUSSIONS
It is known that GA can find optimized solutions that converged to regions of local and non-global minimums, to see if this was happening, GA was run 5 times with the same domains as random variables and the result is illustrated in Figure 4. It can be seen that all 5 times the AG converged to similar values of ∆V total , however to be sure that it is the same region of values it is necessary to analyze the values of the random variables for the which AG converged. Analyzing the table 1, it is verified that the launch date and the flight times between the planets have a greater influence on the solution, as these values converged to a single region (23-Oct-2021; 160 days between M 1 and M 2 ; 170 days between M 2 and M 3 ) while the value of r p did not show the same behavior. Therefore, a strategy was adopted that consists of delimiting the Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 6, n. 3, p. 370-01, 370-10, 2021. DOI: 10.21575/25254782rmetg2021vol6n31687 domain of the launch date and flight times random variables for the regions that they converged and leaving the domain of r p and the sign of δ unchanged. This time, analyzing Table 2, it is noticed that there was a convergence of the values of r p for a region close to 55000 km with a rotation direction of δ positive or counterclockwise. Figure 5 shows the optimized interplanetary transfer found by GA.  For the best ∆V total found for EVMGA ∆V total = 8.4974 km/s it would have: • Impulse by the launch from Earth: 2, 8327 km/s • Impulse due to swing by in Venus: 0, 3873 km/s • Impulse by the arrive at Mars: 5, 2775 km/s As the study is about sending a probe from Earth to Mars, it is possible to calculate the Hohmann maneuver between these two planets and compare the result found with this classic maneuver.
The Hohmann maneuver between Earth and Mars has a total impulse of ∆V total = 5.5935 km/s, with an initial impulse of 2.9446 km/s leaving the Earth and a final impulse of 2.6488km/s and the time spent in this maneuver corresponds to 258.86 days.
One can now compare the total impulse and the total transfer time spent found with the Hohmann maneuver between Earth and Mars.  Table 3 shows that the best strategy for sending a probe from Earth to Mars is a direct transfer between the two planets, without using a swing by on Venus.

CONCLUSIONS
It is noticed that the adopted strategy satisfactorily found the optimized solution to a problem of celestial mechanics, finding the optimized total impulse of an interplanetary transfer with the use of gravity assist maneuvers. Revista Mundi, Engenharia e Gestão, Paranaguá, PR, v. 6, n. 3, p. 370-01, 370-10, 2021. DOI: 10.21575/25254782rmetg2021vol6n31687 It is known that the result found with GA is an optimized region, as demonstrated throughout the work, this methodology can be applied to an optimization problem to indicate an initial solution that can be affected by deterministic algorithms, improving the process.