Spacecraft Trajectory Optimization João Francisco Lima Seabra Thesis to obtain the Master of Science Degree in Aerospace Engineering Supervisor: Paulo Jorge Soares Gil Examination Committee Chairperson: Supervisor: João Manuel Lage de Miranda Lemos Paulo Jorge Soares Gil Member of the Committee: João Manuel Gonçalves de Sousa Oliveira July 2015 ii Dedicated to my family iii iv Acknowledgments I would like to express my gratitude to my supervisor, Prof. Paulo Gil, whose knowledge and expertise guided me through the development of this work. I would also like to thank the rest of my thesis committee. More importantly I would like to thank my family for the undeniable support throughout my life, and my friends for making this last years of university an unforgettable experience. v vi Resumo O problema da optimização de trajectórias interplanetárias é analisado, utilizando a biblioteca PyGMO; apresenta-se uma implementação de um método de dois passos para resolver o problema. As trajectórias consideradas são postas num campo gravı́tico do inverso do quadrado das distâncias, e manobras de assistência gravitacional em voo razante são permitidas. O objectivo é o de resolver problemas de optimização global, com grandes janelas de lançamento e funções de custo complexas, tais como os problemas da competição GTOC; a necessidade de encontrar um mı́nimo ou máximo global levou à implementação de um método de transcrição directa, com estimativas iniciais provenientes de um método baseado em formas, em que a forma é uma sinusóide exponencial que aproxima uma trajectória óptima de propulsão contı́nua. A biblioteca PyGMO desenvolvida pela ESA é usada; disponibiliza algoritmos eficientes para optimização. O programa desenvolvido neste trabalho é validado com uma solução conhecida de uma trajectória Terra-Marte optimizada pela massa final. O programa é também testado em transferências com múltiplas manobras de voo razante; finalmente, uma solução para o primeiro problema do GTOC é apresentada. O método implementado mostrou-se bem sucedido em explorar o espaço das fases da solução. Palavras-chave: Optimização de Trajectórias, Propulsão Contı́nua, Optimização Global, GTOC, Transcrição Directa, Trajectórias Interplanetárias, Manobras de Voo Razante. vii viii Abstract The problem of optimizing spacecraft interplanetary trajectories is considered in this work, using the PyGMO library; an implementation of a two-step method to solve the problem is presented. The trajectories are set in an inverse-square field with a low-thrust propulsion spacecraft, and gravity-assisted flybys are permitted. The intention is to solve global optimization problems, with large launch windows and complex objective functions, such as the problems from the GTOC competition; the need to find a global optimum in a large phase space led to the implementation of a direct transcription method, with initial guesses provided by a shape-based method using exponential sinusoids to approximate an optimal continuous thrust trajectory. The PyGMO library developed by ESA is used; it provides efficient algorithms for optimization. The program developed in this work is validated against a known solution of an Earth to Mars mass optimized trajectory. The program is also tested in multiple gravity assists transfers; finally, a solution to the first GTOC problem is presented. The method implemented has proven successful in exploring the solution phase space. Keywords: Trajectory Optimization, Low-thrust Trajectories, Global Optimization, GTOC, Direct Transcription, Interplanetary Trajectories, Gravity Assists. ix x Contents Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v Resumo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii List of Figures xv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii List of Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix 1 Introduction 1 1.1 Interplanetary Trajectories and their Optimization . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Global Trajectory Optimization Competition . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Trends in Spacecraft Trajectory Optimization 5 . . . . . . . . . . . . . . . . . . . . . . . . . 2 The Trajectory Optimization Problem 9 2.1 Equations of Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.1 Spacecraft Propulsion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1.2 Two-body Model Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.1.3 Launch and Rendezvous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.1.4 Gravity-Assisted Flybys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 Trajectory Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.2.1 The Optimal Control Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 Direct vs Indirect Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.3.1 Direct Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.3.2 Indirect Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.4 Stochastic Optimization - The Evolutionary Algorithm . . . . . . . . . . . . . . . . . . . . . 16 2.5 Method Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 2.6 Generating Initial Guesses 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Global Trajectory Optimization Program 19 3.1 Shape-based Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.2 Local Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3 PyGMO/PyKEP Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 xi 4 Tests and Results 33 4.1 Direct Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Convergence Analysis - From Planar 2-D Shape to Inclined 3-D orbits . . . . . . . . . . . 38 4.3 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.4 Transfer with a Gravity-Assist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.5 First GTOC Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 5 Conclusions 51 5.1 Achievements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Bibliography 55 xii List of Tables 3.1 PyGMO algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.1 Global shape-based search input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.2 Decision vector input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.3 Locally optimization results time constrained and 2-D . . . . . . . . . . . . . . . . . . . . . 35 4.4 2-D Locally optimization results time-unconstrained . . . . . . . . . . . . . . . . . . . . . . 35 4.5 3-D Locally optimization results time-constrained . . . . . . . . . . . . . . . . . . . . . . . 36 4.6 3-D Locally optimization results time-unconstrained . . . . . . . . . . . . . . . . . . . . . . 37 4.7 Maximum inclinations for local optimization convergence . . . . . . . . . . . . . . . . . . . 39 4.8 Earth-Mars Mission characteristics for validation . . . . . . . . . . . . . . . . . . . . . . . 40 4.9 Optimal trajectory for validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.10 Validation global shape-based search input . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.11 Best shape-based trajectories for validation . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.12 Best locally optimized trajectories for validation - Earth-Mars transfer . . . . . . . . . . . . 41 4.13 Earth-Mars-Jupiter global shape-based search input . . . . . . . . . . . . . . . . . . . . . 42 4.14 Decision vector input for Earth-Mars-Jupiter transfer . . . . . . . . . . . . . . . . . . . . . 43 4.15 Locally optimization results time-unconstrained and 2-D . . . . . . . . . . . . . . . . . . . 44 4.16 Locally optimization results time unconstrained and 3-D . . . . . . . . . . . . . . . . . . . 45 4.17 GTOC1 problem characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.18 NEA TW229 keplerian elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 4.19 GTOC1 Earth-NEA optimization parameters . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.20 GTOC1 Earth-NEA solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.21 GTOC1 Earth-Earth-NEA optimization parameters . . . . . . . . . . . . . . . . . . . . . . 48 4.22 GTOC1 Earth-Earth-NEA solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 xiii xiv List of Figures 3.1 Global Optimization Method Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . o 19 3.2 Exponential sinusoid spiral n 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.3 Exponential sinusoid spiral no 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 o 3.4 Exponential sinusoid spiral n 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.5 Miss angle versus k2 plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.6 Global shape-based search algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 3.7 Shape-based algorithm input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.8 EJSU shape-based trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.9 Structure of the transcribed trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.10 Monotonic Basin Hopping algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1 Shape-based trajectory with higher mass at arrival . . . . . . . . . . . . . . . . . . . . . . 34 4.2 Earth-Mars Optimized 2-D Trajectory time-constrained . . . . . . . . . . . . . . . . . . . . 36 4.3 Earth-Mars Optimized 3-D Trajectory time-constrained . . . . . . . . . . . . . . . . . . . . 37 4.4 Earth-Mars Optimized 3-D Trajectory time-unconstrained . . . . . . . . . . . . . . . . . . 38 4.5 Earth-Mars trajectory optimized with a genetic algorithm . . . . . . . . . . . . . . . . . . . 39 4.6 Earth-Mars shape-based trajectory with higher final mass . . . . . . . . . . . . . . . . . . 41 4.7 Earth-Mars locally optimized trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 4.8 Gravity-assist shape-based trajectory with higher mass at arrival . . . . . . . . . . . . . . 43 4.9 2-D Gravity-assist trajectory with higher mass at arrival . . . . . . . . . . . . . . . . . . . . 44 4.10 3-D Gravity-assist trajectory with higher mass at arrival . . . . . . . . . . . . . . . . . . . . 45 4.11 3-D Gravity-assist trajectory with higher mass at arrival . . . . . . . . . . . . . . . . . . . . 46 4.12 3-D Gravity-assist trajectory obtained with genetic algorithm . . . . . . . . . . . . . . . . . 46 4.13 Earth-NEA trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.14 Earth-Earth-NEA trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 xv xvi Nomenclature Greek symbols α Thrust angle. γ Flight path angle. µ Standard gravitational parameter. Φ Keplerian advancing matrix. φ Spiral phase angle. ρ Radial distance from the Sun. θ Spiral position angle. ~η Engine throttle vector. ~τ Specific thrust vector. Roman symbols Isp Specific impulse. m Mass. ~r Position vector. T~ Thrust vector. ~u Control vector. ~ X State vector. a Semi-major axis of the elliptical orbit. D Decision vector. e Eccentricity of the elliptical orbit. g0 Standard gravitational acceleration. i Orbit inclination. xvii J Objective function. k0 Spiral scaling factor. k1 Spiral dynamic parameter. k2 Spiral winding factor. tof Time of flight. x, y, z Position Cartesian components. Subscripts f Final. ga Gravity assist. i Initial. p Planet. R Rendezvous. sc Spacecraft. x, y, z Cartesian components. Superscripts T Transpose. xviii List of Acronyms ESA European Space Agency. GTOC Global Trajectory Optimization Competition is an event started in 2005 and launched every one-two years that presents highly complex problems of designing and optimizing interplanetary trajectories. NEA Near Earth Asteroid. NEP Nuclear Electric Propulsion is a type of propulsion system that delivers a high specific impulse and a constant low maximum thrust. NLP Non-Linear Programming is an approach to solving optimization problems with constraints and an objective function. PyGMO Python Parallel Global Multi-objective Optimizer is a scientific library for the python programming language providing algorithms for optimization under the parallelization abstraction of the generalized island-model paradigm. SEP Solar Electric Propulsion is a type of propulsion system that delivers a high specific impulse and a low maximum thrust that varies with the distance to the Sun. xix xx Chapter 1 Introduction The problem of spacecraft trajectory optimization can be stated as the determination of a trajectory that satisfies mission-dependent path constraints while minimizing a given performance index [1]. The objective of this work is to implement techniques for global trajectory optimization in the case of interplanetary transfers, using some programming libraries developed in Python by the European Space Agency (ESA). The ultimate goal is to assess the capabilities of these tools and be able to participate in the global trajectory optimization competition (GTOC) organized by ESA. 1.1 Interplanetary Trajectories and their Optimization The optimization of the trajectory is crucial for the outcome of any space mission design; the emergence of the digital computer allowed the efficient computation of the trajectories, and the significant growth in computational power provided the tools for solving the new problems arisen from the space exploration era [2]. The first propulsion systems used were chemical rockets. This system can provide high thrust; however, chemical rockets are limited in terms of the impulse produced by the maximum chemical energy that can be made available. Spacecrafts using this type of propulsion ignite the rockets for a very small period of time compared to the total time of flight; hence the propulsion can be approximately modelled as impulsive. The optimization of such trajectories is usually achieved by solving Lambert’s problem [3]; it consists of finding the trajectory between initial and final positions and a given time of flight, with no thrust applied. In contrast with chemical rockets, electric propulsion systems, such as nuclear electric propulsion (NEP) and solar sail electric propulsion (SEP), can achieve higher specific impulse and hence are significantly more efficient. The drawback is that the force produced is very small, making it impossible to use this kind of propulsion in impulsive manoeuvres; hence it is common practice to refer to such systems as low-thrust or continuous thrust propulsion, since the thrust is used along a significant fraction of the interplanetary phase of the trajectory. In this case complications arise in the design of the trajectories; the propulsion is now a continuous function over time and the optimization is more complicated than the impulsive thrust case [4], where the optimization could be transformed 1 into a parameter adjustment over a fixed number of impulses. Currently, the use of low-thrust propulsion systems is decisive in the design of interplanetary flights; the high efficiency in terms of propellant makes it possible to reach regions beyond the chemical rockets capability or increase the mass of the payload. A big achievement in the design of interplanetary trajectories was the use of gravitational assists to modify the orbital energy of the spacecraft during the flight [5], without spending propellants. Although its mathematical formulation had been previously established, due to the non intuitive complexity of the concept the gravity assist was received with some doubt. It was only in 1974 with the Mariner 10 mission that its feasibility was tested; the space probe performed successfully a gravity assist manoeuvre at Venus to reach Mercury [6]. Since then multiple sequences of gravity assists have been put to practice, to pull the spacecraft into deeper space. One example is the Cassini-Huygens probe that reached Saturn, with a sequence of four flybys, twice at Venus, Earth and Jupiter [3]. Gravity assisted flybys may be used to achieve a plane change of the spacecraft’s orbit [3]; changing the plane by using the engines implies consuming a great amount of propellant even for small angles of plane change [7], so the use of a gravity assist is highly advantageous in this case. It is also common practice to use a deep space manoeuvre, that is, a application of thrust during the interplanetary trajectory in order to reach the flyby planet at the desired position and velocity. 1.2 Global Trajectory Optimization Competition One motivation of this thesis was the Global Trajectory Optimization Competition – GTOC [8]. This event was created by Dario Izzo of the European Space Agency ESA , with the aim of generating a series of interesting problems regarding solutions to global trajectory optimization. The winner of each competition is the host of the next GTOC, presenting a new problem to be solved. The problem is carefully defined so that it is global; the objective function tends to be unusual, the number of local minima high, and the basin of attraction of the global minimum is taken into account in the formulation of the problem so that global search methods are needed to successfully achieve an optimum mission design. Also one of the purposes of the competition is to present original problems; consequently the experience of the competitor and the knowledge of standard trajectories solutions are intended to be of little value against the numerical methods implemented. Previous Competitions In all the GTOC’s problems, the motion considered is three-dimensional and that of the two-body problem type: the celestial bodies follow elliptic orbits (the orbital elements of each body are provided) around the Sun; in the sixth GTOC the problem is set in the Jupiter and its moons system, but the equations are identical. The spacecraft has the characteristics of a low-thrust (continuous) propulsion, and the maximum thrust does not vary with the distance from the sun, so it has the characteristics of a NEP spacecraft. The problem of the competition varies in each edition; next are summarized the characteristics of the previous competitions: 2 • First GTOC - Save the Earth – Objective: maximization of the change in the semi-major axis of an asteroid, subject to an impact of an electric propelled spacecraft; – Gravity-assists allowed; – Spacecraft: specific impulse of 2500s, a wet mass of 1500kg and a maximum thrust of 0.04N with unconstrained direction; – Launch Window: years 2010 to 2030; – Maximum time of flight: 30 years; • Second GTOC - Multiple Asteroid Rendezvous – Objective: maximize the final mass-to-time ration in a multiple asteroid rendezvous problem; one asteroid from four groups of asteroid had to be visited, – Gravity-assists not allowed; – Spacecraft: specific impulse of 4000s, a wet mass of 1000kg and a maximum thrust of 0.1N with unconstrained direction; – Launch Window: years 2015 to 2035; – Maximum time of flight: 20 years; • Third GTOC - Multiple Sample Return – Objective: a multiple near-Earth asteroid rendezvous; the objective of the optimization was to maximize a more complex performance index: J= min(τj ) mf + 0.2 mi τmax (1.1) where the first term is the final and initial mass ratio, and in the second term τj is the stay-time at asteroid j and τmax the maximum stay-time; – Gravity-assists allowed only at Earth; – Spacecraft: specific impulse of 3000s, a wet mass of 2000kg and a maximum thrust of 0.15N with unconstrained direction; – Launch Window: years 2016 to 2025; – Maximum time of flight: 10 years; • Fourth GTOC - Asteroids Billiard – Objective: maximize the number of asteroids visited in a multiple rendezvous problem; – Gravity-assists allowed; – Spacecraft: specific impulse of 3000s, a wet mass of 1000kg and a maximum thrust of 0.135N with unconstrained direction; 3 – Launch Window: years 2015 to 2025; – Maximum time of flight: 10 years; • Fifth GTOC - Penetrators – Objective: maximize the number of asteroids visited in a multiple rendezvous problem, the spacecraft had to revisit each asteroid before returning home; – Gravity-assists allowed; – Spacecraft: specific impulse of 3000s, a wet mass of 4000kg and a maximum thrust of 0.3N with unconstrained direction; – Launch Window: years 2015 to 2025; – Maximum time of flight: 15 years; • Sixth GTOC - Global Mapping of Galilean Moons – Objective: optimize a trajectory that globally mapped the four Jupiter moons, by close flybys. Each moon surface was divided into a grid of pentagon and hexagon faces; the performance index to be maximized was the number of faces covered weighted by defined constants, that is, the spacecraft had to perform a flyby close to a given surface below a defined distance. – Gravity-assists allowed; – Spacecraft: specific impulse of 2000s, a wet mass of 2000kg and a maximum thrust of 0.1N with unconstrained direction; – Launch Window: years 2020 to 2030; – Maximum time of flight: 4 years. Various noteworthy institutions have participated on the competitions, such as NASA’s Jet Propulsion Lab (JPL), ESA’s Concepts Team, Moscow State University and Politecnico de Turin, to name a few. The JPL team is the recordist of the competitions, having achieved three first places since the first edition. Future Competition The nature of the various competition problems entails the following characteristics for a method to be successful: • Automated global search of the state space • Numerical robustness • Algorithmic versatility The automated search is obvious due to the global nature of the problem: the existence of many local minima requires a wide search for the optimum; the numerical robustness while evaluating trajectories is a key value so that the automated search is feasible; finally, it is convenient that the algorithm is versatile, because the attributes of the problems change with the GTOC edition, so the required changes on the algorithm must be made with ease. 4 Outline of the Thesis Having the GTOC in mind, the thesis was approached as a mean to implement techniques of global optimization in order to solve a future competition problem. The preparation was accomplished by studying the state of the art of trajectory optimization, by analysing the previous GTOC’s problem statements, and exploring the diverse solutions from different methods used by the competitor teams. To implement the algorithms, the PyGMO library [9] – Python Parallel Global Multi-objective Optimizer – was selected. PyGMO was developed by ESA exactly for these class of problems. It is freely available to any user and provides problems and algorithms automatically parallelized with a multicore architecture. The user can pose its own problems and write its own solvers, that are also automatically parallelized by the library. Mixing different methods of optimization is also possible; one can for example integrate in the same optimization a sequence of stochastic and non-stochastic algorithms. The library is also closely tied to trajectory optimization since it has been continuously used by ESA’s team on the GTOC competition. So naturally it was considered reasonable and interesting to study and explore its capabilities. 1.3 Trends in Spacecraft Trajectory Optimization Betts [2] provides a broad review of the various methods applied to trajectory optimization, discussing the advantages and disadvantages of each method. Betts concludes that the most widely used methods are direct shooting, indirect multiple shooting and direct transcription. The direct shooting method is to be used in problems with small set of parametrized variables, as is the case of orbit transfers with impulsive manoeuvres. Indirect multiple shooting benefits from a increase in robustness from the normal shooting method, and has the advantageous ability of performing each different phase simultaneously in parallel processors. Direct transcription is mostly suitable for complicated problems and global problems due to its versatility. In the compendium of methods gathered by Betts, there was no place for genetic algorithms. Despite the author dismissal of the stochastic methods, there has been a continuous research and development of genetic algorithms applied to trajectory optimization, since this article release in 1998 till the present day. Some methods using stochastic algorithms have been particularly successful, for example Vasile et al [10] with an evolutionary algorithm mixed with branching, Hartmann et al [11] with a pareto genetic algorithm mixed with an indirect method, Yam et al with basin hopping and simulated annealing for global search [12], and Wall and Conway genetic algorithm [13]. Optimization Methods Sims and Flanagan [4] introduced a direct transcription method for preliminary design of low-thrust missions, with the possibility of multiple gravity-assisted flybys. The spacecraft trajectory is divided into legs where the thrust is modelled as a series of impulses. This method has been tested against a similar indirect method, and it has proven to be more robust, less sensitive in the convergence and able 5 to handle more intermediate flybys. Petropoulos et al. [14] present a two-step method to design and optimize low-thrust trajectories with multiple gravity assists. First a global search using exponential sinusoids to model the low-thrust trajectory is done on the solution space, obtaining a large set of trajectories; the second step receives as input the obtained trajectories and locally optimizes them with a parameter optimization method: the direct transcription of Sims and Flanangan [4], previously described. The method of Petropoulos et al. has been heavily tested with successful results, both for simple direct transfer problems and also for complex multiple gravity-assists trajectories. Dachwald and Ohndorf [15] introduce a evolutionary neurocontrol method for the optimization of low-thrust trajectories. It consists of a fusion of evolutionary algorithms with artificial neural networks. The main objective of this methodology is to avoid the drawbacks of local optimization, namely the necessity of obtaining an initial guess. The results obtained were mildly satisfactory; there were some problems in fine-tuning the solutions; small changes in the initial parameters of the trajectories led to unsatisfied constrains at the end of the trajectory. Also, no gravity-assisted flybys were incorporated to the program, because they greatly increased the machine learning complexity. Although the drawbacks of using a problem-independent procedure are significant, this approach is still interesting and is being widely researched; the same authors have been able to successfully introduce multiple gravity-assists trajectories to this program [16]. Petukhov et al [17] present a compound method to optimize low-thrust trajectories. The approach has two steps: first an auxiliary problem is formulated, and the solution is used as input to the second step. The first method is a simplification of the problem; the trajectory is divided into three parts: pericentric, apocentric and passive. In the pericentric part, maximum thrust is used in the same direction as the velocity vector; in the passive part there is no thrust applied; the apocentric part uses maximum thrust but with an angle with the plane of the target orbit. The resulting scheme is solved with nonlinear programming. The trajectory obtained with this simplified problem then serves as the input to construct the Pontryagin extremals. This method showed reasonably good results, and the authors intend to further enhance the method by making the three region bounds as free parameters in the optimization process. Casalino et al [18] present an indirect optimization method where the trajectory is split into elementary legs that can be either thrust, coast or flyby, and the sequence of arcs must be specified a priori. Then each leg is separately optimized and joined to serve as a tentative initial trajectory to be optimized. The results of the method were satisfying; however, the authors claim that this kind of approach – indirect optimization – is not suited to global trajectory optimization problems, because there is a lack of previous known solutions, and is difficult to assess a possible sequence of gravity assists. Dario Izzo et al [19] present an approach to automate asteroid selection for a grand tour mission. This is a special class of global trajectory optimization, where a grand tour on a large set of asteroids is to be found. The approach is divided into three phases: first a combinatorial phase is performed to select the sequence of rendezvous, second a global optimization method is performed with simplified assumptions – exponential sinusoids or impulsive arcs –, and finally local optimization is applied to 6 the best trajectories found, resulting in a low-thrust trajectory. This method has shown good results in obtaining good sequences of rendezvous, and benefits from being automated. Grigoriev and Zapletin present a different approach to the same problem of rendezvous with multiple asteroids [20]. The method implemented is an indirect shooting method; the initial guesses are obtained by auxiliary problems. The same authors discuss the choosing of promising sequences of asteroids [21]; the approach consists of decomposing the problem into discrete and continuous parts. The discrete part is tied to the combination of possible sequences, and the continuous to the path itself. The discrete part is solved with dynamic programming. The trajectory is approximated with the Lambert problem (conic arcs), and the asteroids chosen for analysis are those close to the spacecraft. The most promising sequences are then optimized with the same indirect method. Wall and Conway [13] present another approach to solve multiple rendezvous problems. The method is decomposed in two parts, one that deals with the sequence related values, and another that deals with the trajectory optimization. To avoid the pre-pruning of the state space, that may prune away the optimal solution, the authors implemented a nested genetic algorithm, with an inner and an outer loops. The outer loop has the objective of optimizing the sequence of discrete events, and the inner loop tries to find a near optimal solution and returns the cost of the trajectory to the outer loop. The inner genetic algorithm is used in conjunction with a shape based method, to evaluate the trajectories. The authors tested this program and obtained satisfactory results. The method was tested against the same nested loop configuration but with an inner direct multiple shooting loop, and the computation time rose enormously; in a different run the outer loop was changed to a standard branch and bound algorithm, and the genetic algorithm has proven better, particularly when the problem dimension increases. Wall and Conway [22] present a shape based method combined with a genetic algorithm. The shape used is an inverse polynomial function with six parameters that fully specify the boundary conditions at departure and arrival. The shape based method is suitable to explore the search space without pre-pruning solutions, and to rapidly calculate approximations of the performance index. The genetic algorithm is applied to optimize the free parameters of the problem, namely the departure and arrival dates and the number of revolutions of the trajectory; an a priori knowledge of the solution is not required because of the genetic algorithm. The solutions obtained with this method also make good initial guesses for a more accurate optimization method such as the direct transcription. Miele and Wang [23] discuss the differences between electrical and chemical engines. A two-body model is considered, the departure and arrival orbits are circular, and the solutions were obtained from a sequential gradient-restoration algorithm. The results were analysed in terms of the thrust control, the propellant consumption and the flight time: in terms of the thrust profile, to achieve a minimum propellant consumption the thrust is always along the velocity, and there are three phases of flight, a maximum thrust phase, a coast phase and again a maximum thrust phase; in terms of flight time, the chemical engines produce short times of transfer and large coasting arcs, while the electrical engines produce long times of flight, and the first maximum thrust arc is large, implying a trajectory with multiple revolutions; in terms of propellant consumption, the electrical engine is significantly more efficient than the chemical, achieving less consumption and higher payloads. The three sequential arcs of maximum 7 thrust, coast and again maximum thrust to minimize propellant consumption are possibly the reason for simplifying methods such as the one implemented by Petukhov et al [17], previously described. Selection of Methods From the various methods previously considered, the most promising ones for the problem of global trajectory optimization are the direct methods, because of their robustness and versatility. The characteristics of the global problem of the GTOC, summarized in section 1.2, led to the implementation of a shape-based direct transcription method; the reasons for the choice are laid down in the next chapter, in section 2.2. 8 Chapter 2 The Trajectory Optimization Problem 2.1 Equations of Motion The problem of determining a good approximation of an interplanetary trajectory can be reduced to solving a set of two-body problems using the so called patch conic approximation. This approximation takes advantage that in the solar system the mass of the Sun is much larger than the mass of the planets, and the planets are far away from each other; the force of the nearest planet or of the Sun dominates the motion in most of the trajectory, transforming the problem into a two-body problem which can be solved. The regions where more than one force are significant are sufficiently small, thus making the resulting error small enough for preliminary mission design. The basic physical model implemented is that used in all the GTOC competitions – the patched conic approximation. The central body is the Sun and the spacecraft is the orbiting body; however, the model can be easily changed to any other two-body scheme, such as the Jupiter and its moons system. All the celestial bodies are modelled as point masses, the central body is fixed in space and produces a constant symmetrical gravitational field and is the only body affecting the spacecraft motion; the only exception being the gravity-assisted flyby, modelled as an instant change in the spacecraft velocity described in Section 2.1.4. The spacecraft has a variable mass related to the thrust applied throughout the trajectory, this relation depends on the type of engine employed. The propulsion considered is described in Section 2.1.1. The inertial reference frame used in the equations of motion is centred at the central body. For the three-dimensional analysis, a rectangular basis is used {~ex , ~ey , ~ez }; for planar two-dimensional analysis both polar coordinates {~er , ~eθ } and Cartesian coordinates are used {~ex , ~ey }. 2.1.1 Spacecraft Propulsion The engine’s specific impulse Isp – the impulse per unit mass of propellant – is considered constant and the mass flow rate is given [3] by . m=− mτ , Isp g0 9 (2.1) where τ ≡ T /m is the specific thrust and g0 is the standard gravitational acceleration at the surface of the Earth. Integrating in time equation 2.1 the final mass of propellant is obtained over a time of flight: mf = mi exp Z tf − Isp g0 t0 2.1.2 τ dt . (2.2) Two-body Model Equations The spacecraft equations of motion are [3] ẍ = −µ x + τx , r3 y + τy , r3 z z̈ = −µ 3 + τz , r ÿ = −µ . m=− m|~τ | , Isp g0 (2.3a) (2.3b) (2.3c) (2.3d) where r= p x2 + y 2 + z 2 , ~r = (x, y, z) (2.4) is the distance from the central body. The acceleration on the spacecraft is due to the central body force (first term on the right side of equations 2.3) and the thrust applied (second term τi ). The equations of motion of every other celestial body are: ẍ = −µ x , r3 y , r3 z z̈ = −µ 3 , r ÿ = −µ (2.5a) (2.5b) (2.5c) where r= p x2 + y 2 + z 2 = a(1 − e2 ) 1 + e cos(θ) (2.6) is the distance from the celestial body to the central body obtained by the solution of the two-body problem [7]; a, e, θ are respectively the semi-major axis of the ellipse, the eccentricity and the true anomaly. Knowing the solution of the celestial bodies motion, it is not necessary to numerically integrate the equations of motion to obtain the position of the planets at each instant; this eases the computational effort, and the two-body problem although a simplification of the actual physics, is adequate to the preliminary design of space missions [1]. 10 2.1.3 Launch and Rendezvous The launch is defined by the following equations (subscripts sc and p refer to the spacecraft and the planet, respectively): ~rsc (t0 ) = ~rp (t0 ), (2.7a) ~r˙sc = ~r˙p + ~v∞0 , (2.7b) |~v∞0 | ≤ |~v∞ |max , (2.7c) where the ~v∞0 is the departure hyperbolic excess velocity. So the spacecraft matches the position of the departure planet and its initial velocity is the sum of the planet’s velocity and the relative velocity ~v∞ . The launch hyperbolic excess velocity magnitude must be smaller than the maximum available by the launcher vehicle, hence it is problem specific. The rendezvous is defined as the moment tR when the positions and velocities of the spacecraft and the rendezvous planet match ~rsc (tR ) = ~rp (tR ), (2.8a) ~r˙sc = ~r˙p , (2.8b) neglecting the small distance and interval of time of the spacecraft trajectory near the planet. 2.1.4 Gravity-Assisted Flybys The gravity-assist flyby model is based on the patched-conic approximation, neglecting the time spent in the sphere of influence of the flyby planet. The gravity-assist occurs at instant tga when the spacecraft position equals the planet position: ~rsc (tga ) = ~rp (tga ). From the gravity-assist approximation results an instantaneous turn of the velocity vector of the spacecraft relative to the planet, that is, the hyperbolic excess velocity: (~v∞ )0 = (~vsc )0 − ~vp . (2.9) Therefore, the magnitude |~v∞ | before and after stays the same, and the turn angle δ of − v→ ∞ is given by [12] 2 sin(δ/2) = 1/(1 + rp |− v→ ∞ | /µp ) (2.10) where rp is the perigee radius of the hyperbolic trajectory and µp is the gravitational constant of the planet. After rotating the hyperbolic excess velocity vector by δ, the velocity of the spacecraft after the flyby, with respect to the inertial frame, is obtained: −→ (− v→ ∞ )1 = R(δ)(v∞ )0 , (2.11) → − −→ (− v→ sc )1 = vp + (v∞ )1 , (2.12) 11 where (v~sc )1 is the velocity of the spacecraft after the flyby, and R(δ) is a rotation matrix that rotates the velocity vector by an angle δ. 2.2 Trajectory Optimization The trajectory optimization problem is usually solved via numerical methods; there is no known analytical solution, except for some very specific problems. Currently the most common approaches are based on direct and indirect methods, both needing an initial guess for the trajectory. Stochastic methods, such as genetic algorithms or neural networks, have the ability of working without an initial guess; however, these methods suffer from not using gradient information of the problem [2]. The stochastic methods are mostly used jointly with direct or indirect methods, usually to optimally chose discrete parameters, such as flyby sequences, types of legs and other combinatorial schemes [24]. Some approaches provide initial guesses for the optimization process; this is needed to search the state space systematically. This is usually done by making some sort of approximation in calculating the trajectory and its corresponding fitness function. The optimal control problem is mathematically defined in section 2.2.1, the various methods that attempt to solve the problem are presented and the advantages and disadvantages of each method are discussed. 2.2.1 The Optimal Control Problem The optimal control problem can be stated as finding the control history that satisfy the system dynamics, while satisfying the constraints and minimizing or maximizing an objective function [1]. The dynamics of the system are defined by a set of first order differential equations, ~˙ = f (X, ~ ~u, t) X (2.13) ~ is the state vector, ~u is the control vector and t is the time, the independent variable. where X The initial and terminal conditions are generically given by [2] ~ 0 ), t0 ) ≤ ψ0u ψ0l ≤ ψ0 (X(t (2.14a) ~ f ), tf ) ≤ ψf u ψf l ≤ ψf (X(t (2.14b) and the objective is to minimize the cost function [3]: ~ f ), tf ) + J = Φ(X(t Z tf ~ ~u, t)dt. L(X, (2.15) t0 where t0 and tf are the initial and final times, Φ is a function of the final state vector and L is evaluated along the trajectory, function of both the instantaneous state and control vectors, and integrated over the 12 entire trajectory. The control variables to be optimized u1 (t) u2 (t) ~u = .. , . un (t) (2.16) must lie within the allowed physical bounds ~ul ≤ ~u ≤ ~uu , (2.17) and the state vector also has to satisfy its bounds ~l ≤ X ~ ≤X ~ u. X (2.18) There may be equality or inequality constraints imposed on the trajectory; they can be event-type constraints, evaluated at a particular instant te , ~ e ), ~u, te ), C = f1 (X(t (2.19a) ~ and control ~u at the instant te , and C is some specific where f1 is some general function of the state X value; over the trajectory, ~ f ), ~u, tf ) + C = f1 (X(t Z tf ~ f2 (X(t), ~u, t)dt, (2.19b) t0 where f2 is some general function of the same variables but now over the entire trajectory; or they can be a path constraint ~ ~u, t) ≤ f1 (X, ~ ~u, t), C(X, (2.19c) where the functions C and f1 are specified over the trajectory. Having defined the optimal control problem, a method must be applied to minimize the cost function J given by equation (2.15). The trajectory optimization methods that attempt to solve the problem fall into three categories [2]: direct, indirect, and stochastic methods. 2.3 Direct vs Indirect Methods The approach to minimize the cost function J is different in each method; in the direct methods the state and control variables are adjusted directly in order to reach a solution, while in the indirect methods the minimum is sought by solving analytically derived necessary conditions for optimality. 13 2.3.1 Direct Methods To directly adjust the dynamic variables (state and control), the control variables have to be parametrized. Each direct method parametrizes the control variables differently, but all use non-linear programming (NLP) to achieve a minimum or maximum solution. Non-linear Programming - NLP Non-linear programming tries to achieve the minimum of the cost function by calculating increments in the vector of control parameters [3], while observing all constraints. For this to be possible, at least first-gradient information must be available for the cost function J. The Lagrangian method is considered ~ and the constraints here; the extended Lagrangian takes into account both the function to minimize J(X) imposed on the trajectory: ~ λ) = J(X) ~ − λT c(X), ~ L(X, (2.20) where λ is a vector of undetermined Lagrange multipliers. This extended Lagrangian may be seen as an augmented cost function J that also takes into account the constraints of the problem. A change in L, due to a control increment ∆p is given by ~ λ) = ∆J(X) ~ − λT ∆c(X) ~ ∆L(X, (2.21) The change in the cost function J is given by ∆J = g T ∆p, (2.22) where ∂J ∂p1 . g = .. (2.23) ∂J ∂pm is the gradient of J in relation to the control parameters p; the change in c due to a control increment is given by ∆c = AT ∆p, (2.24) where A ∂c1 ∂p1 . A = .. ∂c1 ∂pm ... .. . ∂cn ∂p1 ... ∂cn ∂pm .. . (2.25) is the gradient matrix of the constraints c in relation to p. With this gradient information it is now possible to apply a search in p steps (∆p) for the minimum of the cost function while reducing the constraint error E = C to zero; such search is iterative and usually based on some form of a Newton method [2]. 14 Types of Methods The most widely used numerical methods are single shooting, multiple shooting and collocation or transcription. The single shooting method is the simplest method of the three; the initial state vector values are assigned and the trajectory is propagated considering the parametrized control initial guess, then non-linear programming is applied to solve the constrained optimization problem. In multiple shooting, the trajectory is divided in time, and in each segment the single shooting method is applied; the initial values at each division are optimization parameters, and the continuity at the junction of segments is treated as an equality constraint. This is again solved by non-linear programming. The transcription or collocation method parametrizes the dynamic variables at grid points. Hence the trajectory is discretized in time, and at each grid point the value and derivatives of the state variable are defined. At intermediate points of the grid, the state and its derivatives are determined by piecewise polynomials. The constraints are defined as the difference between the calculated and interpolated values at coincident times, that must be iteratively reduced to zero. The collocation is thus solved by minimizing the cost function J while observing the constraints, both the path and terminal constraints of the type of (2.19) and the constraints imposed by the derivatives at the grid points; the parameters to be optimized are the state vectors at the collocation points and the control parameters – the thrust history, i.e., the evolution of thrust with time that determines the optimal trajectory. 2.3.2 Indirect Methods The indirect approach is based on the results derived from the Calculus of Variations and the Pontryagin’s minimum principle [2]. It is convenient to use the Hamiltonian H in the form ~˙ + L, H = ~λT X (2.26) where ~λ is the adjoint or co-state vector, and L is the same function as in the J equation (2.15). By setting the first variation ∂J to zero, in order to obtain a stationary point, the following set of equations are derived, and constitute the necessary conditions for an optimum [2]: T λ̇ = −HX HuT = 0 ~λ(tf ) = ΦT X (2.27a) (2.27b) t=tf (2.27c) =0 (2.27d) ~λ(t0 ) = 0 (2.27e) (Φt + H) t=tf These conditions define a two-point boundary value problem; the set of necessary conditions define a differential-algebraic system given by (2.13), (2.27a), and (2.27b), with boundary conditions at t0 and 15 tf , given by (2.14), (2.27c), and (2.27d). This boundary value problem may be solved by the usual shooting methods. The main difference from the direct approach is that the control function is now given at all points by equation (2.27b), and the parameters ~λ(t0 ) become the decisive function that defines the optimum control function. Tipically, multiple shooting methods are used to solve the indirect formulation [2]. It is interesting to see the relation between the non-linear programming results and the results obtained from the indirect methods. The necessary conditions to reach a optimum point in a non-linear programming scheme are given by: ~ λ) = 0 = g(X) − AT (X)λ, 5x L(X, (2.28a) ~ λ) = −c(X). ~ 5λ L(X, (2.28b) As the number of control parameters tends to infinity, the necessary conditions (2.28) converge to the necessary conditions (2.27) for optimality of indirect methods. This result reinforces the idea that the direct methods obtain only approximate solutions to the problem, due to the discretization of the dynamic variables. Refining the grid of the discretization, although achieving a closer approximating of the real solution, may bring computational problems to the non-linear programming algorithms; the dimension of the control parameters increases with the grid refinement and this brings difficulties in large matrix inversion used in the non-linear programming algorithms. 2.4 Stochastic Optimization - The Evolutionary Algorithm A different approach applied to the problem of spacecraft trajectory optimization is the stochastic algorithm; here it is considered one of the most common [1] evolutionary algorithms, the genetic algorithm GA; it exemplifies the approach of the other stochastic algorithms. Evolutionary algorithms are numerical optimizers that find an optimal set of discrete parameters that characterize the problem solution [2]. One advantage of the evolutionary algorithms is that they do not require initial solutions – they are randomly generated within the problem bounds at the start of the optimization process; other advantage is that they are more likely attracted to a global optimum, contrary to the direct and indirect methods that converge to the local optimum dependant on the initial guess. The drawback is that there is no guarantee that a minimum has been found; also, there are no necessary conditions for optimality with this approach. All the evolutionary algorithms require that the solution is described by a relatively small set of discrete parameters. In case of a trajectory with impulsive manoeuvres, the set of parameters can be the timing of the impulses, the thrust direction and magnitude. In case of a trajectory with low-thrust, the continuous part of the thrust direction and magnitude has to be parametrized, for example by polynomial equations in time, or with a shape-based method. In the most basic form of the GA, each solution is described by a finite set of parameters, converted to a string of binary numbers. This sequence of numbers is usually referred to as the chromosome; each 16 chromosome can be decoded to yield a trajectory and its associated cost function. The optimization starts by randomly assigning values to the chromosomes in a population of chromosomes. The various sequences are then improved by selection, combination, and mutation: in the selection step, the worst solutions are removed; in the step of combination, the various chromosomes are put together by combining partial sequences; finally, the mutation takes place, randomly changing a small fraction of the population. These three steps are repeated until the termination condition is met; it can be either because the process has evolved a fixed number of generations, or because the cost function has reached a plateau. So there is no way to assert if a minimum as been found, and also the chromosomes of the final population may produce infeasible trajectories. The feasibility of the trajectories is usually obtained by introducing a penalty function, that modifies the cost according to the infeasibility of the trajectory (the trajectory is feasible if the boundary conditions are met). A great advantage of using genetic algorithms is that they are easy to implement [2], but they are best used together with a more accurate method – direct or indirect, so that the trajectory is feasible. The genetic algorithm has proven successful in generating initial guesses for direct methods[13]. 2.5 Method Selection The optimization method selected to be used in this work is the direct transcription method, explained in detail in Chapter 3. There are several reasons that make this selection the best. The direct methods in general are numerically more robust than the indirect methods [2]; there is also less sensitivity in the convergence when choosing similar initial guesses [4]. In terms of flexibility of the algorithm, the direct transcription method is particularly more easily changed when the problem structure changes [13]; indirect methods need a new analytical derivation of the necessary conditions. This is crucial for our selection of the direct transcription method, because future problems to be solved from the GTOC are global and may require different physical models, new path and terminal constraints, or new objective functions. The main drawback of using a direct method is that by using an optimal control formulation that is simpler that the one derived from variational calculus, the solution obtained is an approximation to the real optimum solution [3]. Another disadvantage, also caused by the discretization of the dynamic variables, is the phenomenon of pseudo-minima [25]; these pseudo-minima satisfy the necessary conditions for optimality but actually are not close to the true optimum. Independently of the numerical method used to solve the indirect formulation, indirect methods suffer from high sensitivity to the initial guess, making it difficult to reach a good optimum solution [1]. The adjoint vectors need to be estimated, and often they do not have a obvious physical interpretation [2]. Another disadvantage occurs when there are path inequalities; it is necessary to first guess the sequence of constrained and unconstrained sub-arcs before the optimization can be performed [2]. The advantage of the indirect methods is that when found, they produce the real solution, not the approximate solution obtained from the discretization used in direct methods. However, it is difficult to 17 obtain convergence in indirect methods; moreover the inflexibility due to the necessity of analytically deriving conditions makes the indirect approach less adequate for global problems. 2.6 Generating Initial Guesses Generating a good initial guess is one of the most essential steps in finding a good optimal solution. It is important to note that, although there are no good or bad solutions but only true optimal ones, a good optimal solution is understood as a trajectory that satisfies all the constraints and produces a cost function J that is lower (or higher when considering maximization) than all the previously known trajectories for a specific problem. This is the case of global trajectory optimization; the huge dimension of the phase space of the trajectories makes it impossible to assess if a given trajectory produces or not a global minimum. The high dimension of the problem – usually caused by large launch windows and numerous possible sequences of events – demands a wide search on the state space, so that the probability of finding the global optimum increases. The search is commonly performed by automating the generation of initial guesses. The global search methods generally use some sort of approximation for the trajectories, as it has been seen in the global methods discussed in Section 1.3. The cause for the approximation is that, for wide searches to be feasible, there should be a rapid computation of the trajectories. Two common practices are to exhaustively search the approximate state space or use an evolutionary algorithm to perform the stochastic search; it is noted that the evolutionary algorithm still needs an approximate way to evaluate each trajectory, or computational times become infeasible [13]. From the two common approaches for generating an initial guess – globally search an approximate state space or use an evolutionary algorithm–, the first was implemented in this work– the planar shapebased method. It performs an exhaustive search on the approximate state space. The shape used to generate a low-thrust trajectory is the exponential sinusoid of Petropoulos et al [26], that uses four constants to define its shape in the low-thrust plane, parametrized by the polar coordinate θ. By using only four constants to define a trajectory, trajectories cannot be defined to match both departure and arrival position and velocity (rendevouz problem), so Wall and Conway [22] investigated exponential sinusoids with two additional constants, but the results found were not satisfactory: the computational times were slow and the resulting trajectories were far from being optimal. Although the exponential sinusoid considered has not the sufficient parameters to solve a rendezvous problem, the method is used for its purposes: approximate the optimal low-thrust transfer in a rapid and efficient way, permitting a broad search. This two-dimensional shape-based method, used together with a local direct transcription optimizer has proven very successful in global optimization problems [27]; and has achieved first place in three editions of the GTOC competition. 18 Chapter 3 Global Trajectory Optimization Program The two-step approach implemented to solve the global trajectory optimization problem is depicted in the diagram of figure 3.1. The user first sets as input the sequence of flybys, the launch window and information related to the type of legs; from this input the shape-based method finds thousands of possible trajectories that intersect the flyby bodies; the trajectories found with the shape-based method are then transcribed in the third block traj2input to the format needed for the local optimization method. User Input - Shape-based - Traj2input 6 - Local Opt. 6 Figure 3.1: Global Optimization Method Diagram. The input information format and the global search method are both presented in section 3.1; the local optimization method implemented, the direct transcription, is described in section 3.2, and the block traj2input is explained in section 3.2. 3.1 Shape-based Method The first step of the optimization performs a broad search of low-thrust trajectories with gravity-assists, where an exponential sinusoid shape is used to represent the powered portion of flight. The program runs through a user-defined launch window and sequence of flyby bodies and exhaustively finds the 19 trajectories that intersect them. The leg type (leg is the trajectory between two bodies), sequence is also specified a priori: the legs can be either thrust, coast (no thrust) or mixed. In the case of mixed legs the switch radius must be defined; the switch radius defines the point from where the thrust is turned off for the rest of the leg. The two-dimensional exponential sinusoid is given in polar coordinates (r, θ) by [28] r = k0 ek1 sin(k2 θ+φ) , (3.1) where k0 ,k1 ,k2 and φ are constants that define the trajectory. The constant k0 is a scaling factor and φ defines the orientation of the spiral in the low-thrust plane. The constant k1 is called the dynamic range parameter and controls the ratio of the apoapsis to the periapsis; k2 is the winding parameter and controls the number of revolutions around the central body. Figures 3.2, 3.3, and 3.4 present three exponential spirals; the effect of reducing the winding parameter – increasing the number of revolutions – can be seen in figure 3.3, and the effect of increasing the dynamic range parameter can be seen in figure 3.4. Figure 3.2: Exponential sinusoid spiral, with k0 = 1,k1 = 1/2,k2 = 2/11,φ = −π/2 Figure 3.3: Exponential sinusoid spiral similar to figure 3.2, but with k2 = 1/11 20 Figure 3.4: Exponential sinusoid spiral similar to figure 3.3, but with k1 = 1 By considering the polar equations of motion: r̈ − rθ̇2 + µ = τ sin α, r2 1 d 2 (r θ̇) = τ cos α, r dt (3.2a) (3.2b) and assuming a thrust tangent to the velocity, both the angular rate θ̇ and the normalized thrust acceleration a are determined for every point on the shape [26]: µ/r3 tan γ + k1 k22 s + 1 (3.3) 1 (−1)n tan γ k22 (1 − 2k1 s) − 2 cos γ tan2 γ + k1 k22 s + 1 (tan2 γ + k1 k22 s + 1)2 (3.4) θ̇2 = a= 2 where the normalized thrust acceleration a, is defined by a ≡ τ /(µ/r2 ), (3.5) s ≡ sin(k2 θ + φ), (3.6) tan γ = k1 k2 cos(k2 θ + φ) (3.7) and the flight path angle γ is given by The thrust angle is given by α = γ + nπ, n = 0, 1 (3.8) where n is chosen so that the thrust acceleration (3.4) is positive. The program steps through the launch window defined by the user, and for each departure time t0 the trajectories that reach the next body in the sequence are computed. The hyperbolic velocity v∞ , in case 21 of a launch, is defined by the user and may point in any direction; in the case of a flyby the hyperbolic velocity turn angle is constrained by altitude. The program then steps through the range of possible turn angles for the outgoing ~v∞ . For each initial relative velocity there corresponds a heliocentric flight-path angle and speed [26], so both tan γ and θ̇ are known, thus the quantity k1 k22 s can be obtained from equation (3.3), and together with the trigonometric identity sin2 θ + cos2 θ ≡ 1 and the flight-path angle (3.7), results the constraint relationship [26] k12 k24 − k22 tan2 γ − k1 k22 s = 0. (3.9) This equation relates the undetermined shape parameters k1 and k2 ; the free parameter to search for intersections is taken as k2 . For a departure time t0 , the intersections of the spacecraft with the planet are searched in function of the constant k2 . The other three constants – k0 , k1 , φ – are determined so that the spiral starts at the position of the departure planet ρ(θ0 ) = rsc (θ0 ), and with the same angular rate as the determined from the sum of the departure hyperbolic velocity with the planet velocity ~vsc = ~vp + ~v∞ , and also so that the constraint given by equation (3.9) is satisfied. Calculating Intersections For each turn angle, the k2 values that yield intersections of the shape with the target body are found; having determined the point where the intersection occurs, the specific value of k2 that results in a correct time of flight must be calculated. The intersection of the exponential sinusoid shape r with the conic shape orbit of a body ρ is found through a Newton’s method, solving for the roots of the following function d(θ) = 1/ρ(θ) − 1/r(θ); (3.10) the difference of the inverse of the radii is used to speed up the computations [26]. The initial guess θest for the root-finding method is taken as the point θ for which the exponential sinusoid radius equals the periapsis radius ρn of the target’s orbit: θest 1 1 ρn = arcsin ln k2 k1 k0 (3.11) After computing the intersection point, the transfer time for the spacecraft to reach it must be calculated. For the spacecraft pursuing a exponential sinusoid, the time of flight has to be numerically calculated. The time of transfer tof is obtained by numerical integration, from the θ̇ equation (3.3): Z θf tof = θ̇ θi −1 Z θf s dθ = θi tan2 γ + k1 k22 s + 1 dθ. µ/r3 (3.12) The planet position at the transfer time may be calculated by solving Kepler’s equation. Knowing both the spacecraft and planet position, the miss angle – heliocentric angle between the spacecraft and the 22 planet – can be calculated, and a search is made over k2 to find the zero miss angle, that is, the k2 that produces a flyby is searched. Figure 3.5 shows a plot of typical curves of the miss angle versus the k2 shape parameter, obtained for an Earth-Mars trajectory; each contour represent a turn angle. The search for the zero miss angle is performed both along and across the curves. If two points on a curve straddle a zero, a linear extrapolation is performed over k2 until the new zero miss angle is below the tolerance defined (10−12 ), then the k2 is retained; this process is made over the entire turn angle curve. For the next contour computed, each value is compared to the previous contour. If two k2 points in two different curves straddle a zero miss angle, a linear extrapolation is made over the turn angle; with the extrapolated turn angle value the k2 is extrapolated until a zero is found. Thus this root-finding scheme needs to store in memory two turn angle vs k2 curves, the previous curve and the one that is being computed. Figure 3.5: Miss Angle vs k2 Coast and Mixed legs Other leg types are also implemented for the initial global search: coast legs (no thrust) and mixed legs. The mixed legs consist of a exponential sinusoid patched with a coast leg; a switch radius must be defined so that from there the thrust is turned off until the next intersection. The determination of the intersections for these types of legs is similar to that of the exponential sinusoid: first the orbit intersection is computed, then, after the time of flight is calculated, the miss angle 23 is obtained. The search for the intersection is also made by a Newton’s method with (3.11), but now the shape r(θ) is replaced with the equation of a conic section. In the case of the mixed legs, the same situation applies for the initial conditions of the exponential sinusoid; the constraint relationship (3.9) is used and the state at the switch point is calculated, from where the conic parameters can be obtained and used in equation (3.11) to find the intersection. For the coast leg the orbital parameters are readily obtained from the initial state (~r, ~v )0 and also used in the (3.11). The search for the zero miss angle is performed as for the exponential sinusoid, with two curves stored in memory and searching for zeros both along and across the curves. Multiple Gravity-Assist Search Algorithm The shape-based search is performed for a user-defined sequence of gravity-assisted flybys, from departure to arrival. Each leg must be specified: it can either be a thrust, coast or mixed leg. The user also specifies the launch window interval and the departure hyperbolic velocity range. Algorithm: Global Shape-based Search sequence, launch window ← input() for t0 in launch window: call function trajectory(sequence, []): def function trajectory(leg, solution): for TurnAngle in TurnAngle range: r, v ← calculate state at t0 if leg == coast: a, e, i, $ ← compute orbital elements(r,v) else: for k2 in k2 range: if leg == thrust: k0 , k1 , φ ← compute spiral constants(r,v,k2 ) if leg == mixed: k0 , k1 , φ, θswitch ← compute mixed spiral constants(r,v,k2 ) θinter ← compute intersection tof ← compute time of flight missangle ← compute miss angle if miss angle == 0: #flyby found! if arrival planet: solution ← append trajectory else: call function trajectory(next leg, solution) Figure 3.6: Global shape-based search algorithm. The program then finds sequences of intersections according to the algorithm of figure 3.6. First the departure time is stepped through the launch window; for each instant of departure, the search for intersections with the next body in the sequence of flybys is made; when a trajectory that reaches the next body is found, the gravity-assist equations of section 2.1.4 are used to provide the range of turn angles for the v~∞ after the flyby. This process is repeated recursively for all the legs in the sequence; 24 when a trajectory finds its way through the sequence up to the arrival planet, that trajectory is stored; each solution is then evaluated by the amount of propellant used. As the shape is completely specified by the four constants k0 , k1 , k2 and φ, there are no great memory restrictions when allocating many solutions. For example, 616 trajectories found for a Earth-Mars-Ceres mission with two thrust arcs take up to approximately 1.37 MB in disk space. An example of the input format, representing a multiple gravity-assist trajectory from Earth to Uranus, with intermediate flybys at Jupiter and Saturn is presented in figure 3.7. Input format example mga.txt #mission sequence:ejsu leg:ttt v inf:5.0e3 #data window:3000,4000,1 angle step:0.2 Figure 3.7: Shape-based algorithm input. The legs are all thrust, the departure hyperbolic velocity magnitude is 5.0e3 m/s; the trajectory found with maximum mass at arrival is depicted in figure 3.8: Figure 3.8: Earth-Jupiter-Saturn-Uranus Shape-based trajectory with maximum mass at arrival. Each trajectory leg is then divided into N segments, and the ∆V of each segment is obtained integrating the thrust profile, as it will be explained in section 3.2. This will serve as the input of the direct transcription method. 25 3.2 Local Optimization The local optimizer consists of a direct transcription method, created by Sims and Flanagan [4]. The optimal control problem of low-thrust multiple gravity-assists trajectories is transcribed to a non-linear programming problem. The transcription is made by dividing the trajectory into legs that begin and end at control nodes, and each node is usually associated with a celestial body. On each leg there is a match point; the trajectory is propagated forward from the initial control node to the match point and backward from the final node to the match point. ~ impulses are applied along each of the The low-thrust is modelled as a series of impulses; the ∆V N segments that divide each leg. Typically 10 segments are used for a simple interplanetary transfer leg. The resulting trajectory structure is represented in figure 3.9. Figure 3.9: Structure of the transcribed trajectory Both the forward and backward propagation between control nodes and impulses is made according to a two body model, that is, the trajectories are keplerian, and the gravity assists are modelled as described in section 2.1.4, with an instantaneous turn of the relative velocity ~v∞ . The transcription method for a generic leg is formally defined by the following equations [29] for the forward propagation performed in the first nf wd segments: − xm i+1 = Φxi (∆t/2)xi + (3.13a) − m xm i+1 = xi+1 + ∆xi+1 + xi+1 = Φxm+ (∆t/2)xm i+1 , i+1 26 (3.13b) (3.13c) and the equations for the backward propagation performed in the last nbck segments: + xm i−1 = Φxi (−∆t/2)xi − (3.14a) + m xm i−1 = xi−1 − ∆xi−1 (3.14b) − xi−1 = Φxm− (−∆t/2)xm i−1 . (3.14c) i−1 In the equations Φ(∆t) is the advancing matrix that reproduces the keplerian motion for a time interval ∆t, thus advancing the state xi = (~r, ~v , m) of the spacecraft from one point to another. The subscript i represents the segment position in the leg, the superscripts m− and m+ represent the state before and after the the impulse is applied, and ∆xi is the discontinuity of the state associated with the impulse. The discontinuities due to the impulses are taken into account in the instantaneous change of state: ~i , m− [exp(− ∆Vi ) − 1]), ∆~xi = (~0, ∆V i Isp g0 (3.15) and so the trajectory is propagated both ways until the match point is reached. This formulation leads to a constrained non-linear optimization problem [4]. The variables of opti~ impulses, and mization are the state (~r, ~v , m) and corresponding epoch at each control node, the ∆V the flyby turn angle at each intermediate flyby. The state at the control node is generally a dependent variable because the position is usually set to be equal to the flyby planet, unless the control node is set to be a fixed point in space, in which case the variable is independent. The equality constraint of the optimization is the continuity of the spacecraft state on the match point. ~i on each segment is feasible, an inequality constraint is placed on every segment To assure that the ∆V ~i |. Any objective function or other constraints can be placed on for the magnitude of the impulse |∆V the trajectory, depending on the problem, provided that they can be expressed by the variables of the trajectory. Local Optimization Input To optimize the trajectories with the transcription model, the solutions obtained from the global search must be transformed to the format needed: the legs between flyby bodies have to be segmented in time and the ∆V accumulated over the segment has to be calculated to serve as an input for the optimization. For each leg, the time of flight tof has already been calculated in the shape base method; so the duration of each segment is tseg = tof /N , where N is the number of segments defined by the user for each leg. As the trajectories obtained are all in function of the polar coordinate θ, the various θi , corresponding to each segment have to be calculated by quadrature. The ∆V for each segment can be obtained by numerically integrating the specific thrust ~i | = |∆V Z ti+1 Z θi+1 τ dt = ti θi 27 τ (θ)θ̇−1 dθ. (3.16) The mass on the end node is obtained by mf = mi exp(∆Vleg /(Isp g0 )), (3.17) where ∆Vleg is the change in velocity accumulated over the entire leg. ~i , the engine throttles are used equivalently In the direct transcription method used, instead of the ∆V as the variable for optimization. The throttles, defined as ~η = T~ /Tmax , are easily obtained from the ∆V for each segment i of the leg: ~i mi N . ~ηi = ∆V Tmax tof (3.18) Now, to constrain the maximum allowed change in velocity over a segment, it is only necessary to satisfy the N constraints for each leg: |~ηi | ≤ 1. 3.3 (3.19) PyGMO/PyKEP Libraries Both PyGMO and PyKEP are open source projects intended to be used together to script parallel optimization tasks for use in astrodynamics [29]. The libraries are written in the C++ language and are exposed to Python, so that introducing new problems and algorithms is done with ease. Python is a widely used programming language that supports object-oriented, imperative and functional programming. The language automatically deals with the memory management and has an extensive standard library, including scientific packages with mathematical and plotting functionalities similar to those found in the MATLAB computing environment. The main reason for selecting Python as the language to implement both the shape-based and direct transcription algorithms was the existence of the ESA’s PyGMO library for Python. PyGMO employs a paradigm called the generalized island model, for the parallelization of optimization algorithms. The solutions for a given problem are represented as individuals; a group of individuals is called a population, and such a population over which an algorithm acts to improve the solutions is called an island. Finally, various islands grouped together in an archipelago can be formed in a defined topology and share their solutions. The user defines the problems by coding a python class (or C++ class wrapped for python) where the virtual methods associated with computing the objective function J and the constraints c need to be provided. The algorithm that acts on the island can be coded by the user; but it was preferred to use the existing implemented non-linear algorithms in the PyGMO library, already known to be efficient. The island where the individual lives is then initialized by assigning to it the problem and the algorithm. The initialization of the island automatically generates a random population sized by the user; in my case a population of one individual was used for the optimization. The individual decision vector obtained by the global shape-based method is then attributed to the individual, and the algorithm is performed on the island. 28 PyGMO Problem and Algorithm Definitions The PyGMO library attempts to solve global optimization problems generically formulated as shown in (3.20). The decision vector D may have simultaneously a continuous dimension n and an integer dimension m; it is this decision vector that describes each solution (also known as individual). Each component of the decision vector, whether real or integer, is allowed to vary only between the lower and upper bounds specified by lb and ub respectively. The decision vector of each solution is evaluated with respect to the constraints; they may be of the equality ceq or inequality cineq type. D ∈ Rn × Nm find : to minimze : J(D, s) , (3.20) lb ≤ D ≤ ub subject to : ceq (D) = 0 cineq (D) ≤ 0 It is up to the user to formulate the problem intended to be solved with the structure of (3.20). The algorithm that acts on the problem must be chosen according to the type of the problem; not all algorithms can solve a particular problem. The problem type (and subsequently the algorithm type that can be applied) is defined by three fields: • Decision vector type – Continuous (C) – Integer (I) – Mixed (M ) • Constraints type – Constrained (C) – Unconstrained (U ) • Objective function type – Single-objective (S) – Multi-objective (M ) In the next table some of the many algorithms available from the PyGMO library are presented, along their type. The algorithms are divided in Heuristic Optimization, Meta-Algorithms and Local Optimization algorithms. The heuristic algorithms use stochastic optimization procedures; the Meta-Algorithms combine both stochastic and deterministic methods, and the local optimization algorithms are purely deterministic, providing minimums close to the the initial guess. 29 Name Heuristic Optimization Type Differential Evolution (DE) Self-adaptive DE Particle Swarm Optimization (PSO) Simple Genetic Algorithm (SGA) Vector Evaluated GA (VEGA) Simulated Annealing Strength Pareto Evolutionary Algorithm Monte Carlo Search C −U −S C −U −S C −U −S C −U −S M −U −S C −U −S C −U −M M −C −S Meta-Algorithms Monotonic Basin Hopping (MBH) Multistart (MS) Augmented Lagrangian (AL) − − C −C −S Local Optimization Nelder-Mead Simplex Sequential Least Squares Programming (SLSQP) COBYLA Truncated Newton Method BFGS Table 3.1: PyGMO algorithms. 30 C −U −S C −C −S C −C −S C −C −S C −U −S The purely evolutionary algorithms are not well suited for the problem of spacecraft trajectory information, since they mostly apply to unconstrained problems. This is usually surpassed by defining penalty functions in the performance index, that account for the virtual constraint mismatch error. The algorithms that suit the most the trajectory optimization problem are in the local optimization category, since the trajectory optimization problem considered is of the type C − C − S (Continuous, Constrained, Single-Objective). The one used in this work is the SLSQP algorithm; it is a Non-Linear Programming method, generally described in section 2.3.1. Both the Monotonic Basin Hoping and the Multi-Start algorithms have no defined type; this is because these algorithms are used in conjunction with any other algorithm, as long as the second algorithm satisfies the problem type – they inherit the characteristics of the second algorithm. The Multi-Start method is simple; a number of iterations is defined, and for that number of iterations a random population (set of solutions) is generated and evolved with the second algorithm. The Monotonic Basin Hopping algorithm is also simple in concept. The solutions are perturbed and then a second algorithm performs local optimization on them; if the result is better than the unperturbed solutions, a counter is reset to zero and the process continues; if not, the counter increments and the optimization stops if the counter reaches some defined limit. The algorithm is described formally in figure 3.10 [9], since it has been used to improve some trajectories. Algorithm: Monotonic Basin Hopping pop ← G() pop∗ ← S(pop) while k < stop do: popnew ← P (pop∗ ) pop∗new ← S(popnew ) if Best(pop∗new , pop∗ ) is pop∗new : pop∗ ← pop∗new Figure 3.10: Monotonic Basin Hopping algorithm. The G procedure generates a random population of solutions, while the S procedure is defined by the local optimization algorithm (for example the SLSQP), thus deterministically evolves the population, and P is the procedure that perturbs randomly the solutions. So the MBH algorithm attempts to globally optimize the solution, by randomly jumping through the solution space, hopefully getting close to the basin of attraction of the optimum – thus its name. Defining the Problem as a Python Class To perform the local optimization, a Python class defining the problem has to be created and three necessary virtual class functions have to be defined: the constructor ( init ), the objective function ( objfun impl) and the constraints function ( compute constraints impl). • Constructor 31 In the constructor, besides the data initialization necessary, the dimension of the decision vector has to be defined, with an array with the following information: – Dimension of the decision vector; – Dimension of the integer part of the decision vector; – Number of objective functions; – Number of constraints; – Number of inequality constraints; – Tolerance on constraints violation. In my work the integer part of the decision vector is always null, and it is always a single-objective problem. The tolerance on constraints violation is the value that determines if a given constraint is satisfied; the constraints are all in the form c(D) = 0 for equality and c(D) ≤ 0 for inequality constraints. All the constraints are adimensionalized. Then the lower and upper bounds of the decision vector have to be provided in the format [Lower bounds, Upper bounds]. • Objective function The objective function virtual method has to compute and return the value of J according to the m f current decision vector D. For example, if the objective function is of the form J = − |~v∞arr | and the decision vector only includes the final mass mf and the engine throttles along the trajectory, then the mass used is simply that of the current decision vector but the arrival relative velocity has to be calculated from the throttles (of the current decision vector). • Constraints The constraint virtual method has to provide all the constraints of the optimization, both equality and inequality constraints, returning an array with the dimension established in the constructor. For the case of the transcription method used, the forward and backward propagation of the trajectory have to be computed as explained in section 3.2, the propagation is calculated according to the current decision vector that provides the throttles, and this provides the calculation of the mismatch point, an equality constraint. The rest of the constraints are of the inequality type: the throttles magnitude upper bound, launch hyperbolic velocities and other problem specific constraints, such as minimum heliocentric radius. The final step before optimization can be performed is to associate an algorithm to the problem. In this work the algorithm used was the SLSQP (Sequential Least Squares Quadratic Programming) already provided by PyGMO. The feasibility of the resulting optimized trajectory is assured if all the constraints are satisfied. 32 Chapter 4 Tests and Results In this chapter the program developed is tested and the results for various problems are presented. First a simple direct transfer is optimized. The results of the global search method are shown, the decision vector is made and the best trajectories are locally optimized; the results are compared to an optimization with no initial guesses, using a genetic algorithm. Then a trajectory with a gravity-assist is considered; the global shape-based method is applied and the best trajectories are locally optimized. Being able to solve these preliminary problems, the first GTOC competition problem can be tackled; the best solution obtained is presented and compared to the results of the other teams. 4.1 Direct Transfer To first test the program, a direct transfer from Earth to Mars is considered. The objective is to maximize the final mass at arrival. The characteristics of the problem are presented in table 4.1. Transfer Characteristics Leg Leg Type |v~∞ | at departure Launch Window Launch Window Step Earth-Mars Thrust 2× 103 m/s 2000-Jan-01 to 2000-Dec-31 5 Julian Days Table 4.1: Global shape-based search input. A thrust leg is considered, so the shape used to find intersections with Mars is an exponential sinusoid. The departure hyperbolic velocity magnitude is constant and the turn angle is varied in the range [−π, π]. The trajectories are searched over one year, starting in year 2000. After running the global shape-based search algorithm with a launch window step of five Julian Days, 2360 trajectories were found. The shape-based trajectory with the best fitness function – higher mass at arrival – is depicted in figure 4.1; the inner orbit is that of the Earth and the outer orbit is Mars’s, the spacecraft’s trajectory is 33 drawn in red. Figure 4.1: Shape-based trajectory with higher mass at arrival. To construct the decision vector to be optimized, the initial guesses obtained from the shape-based search must be transcribed, as explained in section 3.2. The input information to create each decision vector for each correspondent shape-based trajectory is presented in table 4.2. First, the decision vectors were created with only two dimensions, implying a two-dimensional local optimization. This was done because the results from the shape-based are planar, as explained in section 3.1; so the direct transcription optimization was first done with the planets projected onto the low-thrust plane, to test if the solutions converged to a feasible solution. Direct Transcription Parameters Number of Segments Nseg Initial Mass mi Engine Isp Maximum Thrust Tmax 10 1500 kg 2500 s 0.5 N Table 4.2: Decision vector input. With the two-dimensional analysis, two optimizations were performed: one with a constrained initial and final epochs and one with unconstrained initial and final epochs. In the first case, the departure and arrival epochs are those of the initial guess; the optimization is thus performed for the following decision vector: D ≡ [mf , ~v∞ , ~ηi ] i = 1, . . . , Nseg (4.1) The optimization was performed for the ten best shape-based trajectories, ranked by the mass at arrival. The results are presented in table 4.3. It is noted that the third trajectory after the local optimization got 34 a higher final mass than the second trajectory, that had a higher final mass before the optimization. Locally Optimized Trajectories Trajectory id 1 2 3 4 5 Final Mass [kg] 1320.108 1310.104 1310.879 1299.242 1292.590 Table 4.3: Locally optimization results time constrained and 2-D. Now for the case of initial and final epochs unconstrained, the decision vector becomes: D ≡ [t0 , tof, mf , ~v∞ , ~ηi ] i = 1, . . . , Nseg , (4.2) with the arrival epoch now given by t0 + tof . The limits placed on the new two variables of optimization are such that both the initial and final epochs may vary 5 Julian days; to help search the phase space with the new decision vector dimension, a genetic algorithm was employed, the Monotonic Basin Hopping algorithm described in section 3.3. The improved results are shown in table 4.4. Locally Optimized Trajectories Trajectory id 1 2 3 4 5 Final Mass [kg] 1322.390 1310.503 1311.952 1302.310 1293.203 Table 4.4: 2-D Locally optimization results time-unconstrained. Having now the optimized two-dimensional results, the more accurate problem with three dimensions is tested. The initial guesses are still planar, but now the solutions need to be three dimensional because the inclination of the orbital planes is not null. Hence the third dimension of the thrust ηz will be determined by the non-linear programming algorithm; the initial two-dimensional shape-based trajectory will then converge to a locally optimal three-dimensional trajectory; the convergence is typically assured for small relative inclinations of the orbital planes of the flyby bodies. First a optimization is performed with the departure and arrival epochs fixed. The decision vector for this problem is the same as in equation (4.1) but now the throttles and the departure hyperbolic velocity have a third dimension; the third component in both cases is set to zero for the initial guess. In table 4.5 the results of the epochs constrained optimization are presented. As expected, the final mass of the trajectories is lower than the corresponding planar solutions in table 4.3, because now additional thrust is necessary to reach the inclined orbit. The same procedure with the initial and final epochs unconstrained was performed for the threedimensional case, with the monotonic basin hopping algorithm to help search the phase space. The decision vector is the same as in equation (4.2) but now the throttles and the departure velocity have 35 Locally Optimized Trajectories Trajectory id 1 2 3 4 5 Final Mass [kg] 1296.319 1296.812 1287.028 1290.199 1286.760 Table 4.5: 3-D Locally optimization results time-constrained. Figure 4.2: Earth-Mars Optimized 2-D Trajectory time-constrained. one additional component. The results of the optimization are presented in table 4.6, and the most optimal trajectory found is depicted in figure 4.4. The global search program results are compared to a purely genetic algorithm, that uses no initial trajectories and generates the decision vectors randomly within the bounds of the problem. The genetic algorithm used is the monotonic basin hopping, with a population with 5 individuals. The optimization was run several times, and being a stochastic algorithm, the results varied with each run. In figure 4.5 36 Figure 4.3: Earth-Mars Optimized 3-D Trajectory time-constrained. Locally Optimized Trajectories Trajectory id 1 1 2 3 4 5 Final Mass [kg] 1301.126 1300.254 1299.411 1292.423 1290.321 1288.671 Table 4.6: 3-D Locally optimization results time-unconstrained. one of the solutions obtained is depicted, with mass at arrival of 1299.612 kg. From the various runs, the final mass fell into the interval 1171.780 − 1299.612 kg; the range of the objective function is similar to that obtained from the shape-based method. Although there is no apparent advantage in utilizing the shape-based method instead of a simple genetic algorithm, the shape-based search gains performance when the problem complexity increases, with multiple flybys and with wider launch windows [26]. In this test the transfer is a simple thrust leg, and the launch window is relatively small (one year), so the genetic algorithm can get results as good as those found with the global search method, with little computational effort. 37 Figure 4.4: Earth-Mars Optimized 3-D Trajectory time-unconstrained. 4.2 Convergence Analysis - From Planar 2-D Shape to Inclined 3-D orbits To get some insight on the convergence obtained in the local optimization related to the fact that the initial guesses are from a two-dimensional trajectory, a systematic optimization of shape-based trajectories were obtained with increasing inclination of the arrival planet. This was performed with a simple transfer case with one interplanetary leg, departing from Earth (1 AU) and flying by a generic planet orbit. The target orbit major axis was stepped from 2 AU to 30 AU, and for each major axis the inclination was stepped from 0 degrees to 90 degrees, relative to the ecliptic plane. For each different target orbit, two-dimensional exponential sinusoids were found that intersected the target body. Then the 2-D shape-based trajectories were locally optimized in three-dimensions; when convergence was not obtained, the corresponding inclination of the target orbit was stored. This process was performed for all the different target orbits; the maximum inclination that produced convergence was stored for each orbit major axis. The results are presented in table 4.7. From this analysis it can be seen that the convergence from a planar shape-based trajectory to a three-dimensional one decreases with the difference in the major-axis and inclination between orbits. Although this analysis does not entail a formal deduction, for interplanetary transfers in the solar system convergence is more than expected, since the inclination of all the planets is in the region of convergence presented in the table above. If the case is that a flyby with a minor object from the solar system is intended, problems may arise, since many comets and asteroids have large inclinations. However, for bodies in the asteroid belt, no problem in convergence is expected, 38 Figure 4.5: Earth-Mars trajectory optimized with a genetic algorithm. since their major-axis is around 3 AU and inclination around 10 degrees. Convergence Analysis Major Axis (AU ) 2 6 10 14 18 22 26 30 Maximum Inclination (deg) 48 25 14 11 9 7 5 4 Table 4.7: Maximum inclinations for local optimization convergence. 39 4.3 Validation To validate the program developed, the results were compared with a known near-optimal trajectory from Earth to Mars, where the objective is to maximize the mass at arrival. The trajectory is given by Wall and Conway [30]; the mission characteristics are given in table 4.8. Although the mission consists of a simple transfer leg, the test is suitable for the global search method implemented, since the launch window has a considerable span of 30 years; thus the shape-based method must be decisive in determining an initial guess around the optimal launch date. Mission Characteristics Leg |v~∞ | at departure Launch Window Initial Mass mi Engine Isp Maximum Thrust Tmax Earth-Mars 0.8935 × 103 2000-Jan-01 to 2029-Dec-31 18000 kg 4110 s 2.775 N Table 4.8: Earth-Mars Mission characteristics for validation. The best trajectory found by Wall and Conway is described in table 4.9. Reference optimal solution Launch date Time of flight Arrival date Mass at arrival 2001-Jan-19 600 days 2001-Aug-23 14696 kg Table 4.9: Optimal trajectory for validation. Running through the launch window with a step of 1 Julian Day, the shape-based search with the input given in table 4.10 found 76256 trajectories; the best spiral trajectories are described in table 4.11; it can be already seen before applying the local optimization that the best trajectories are near the optimal one provided by Conway et al, both in departure date and final mass. Transfer Characteristics Leg Leg Type |v~∞ | at departure Launch Window Launch Window Step Earth-Mars Thrust 8.935 × 102 m/s 2000-Jan-01 to 2000-Dec-31 1 Julian Days Table 4.10: Validation global shape-based search input. The direct transcription method was applied on the best initial guesses, producing third dimensional locally-optimal trajectories. The description of each changed trajectory is presented in table 4.12, and the best found trajectory is depicted in figure 4.7. 40 Best shape-based trajectories Trajectory id 1 2 3 4 5 6 7 8 Final Mass [kg] 14814.5 14813.9 14804.8 14800.4 14786.8 14780.2 14775.0 14774.7 Launch Date 2001-Jan-25 2001-Jan-25 2001-Jan-19 2001-Jan-26 2000-Jan-26 2001-Nov-08 2001-Jan-19 2001-Jan-18 Table 4.11: Best shape-based trajectories for validation. Figure 4.6: Earth-Mars shape-based trajectory with higher final mass. Best locally optimized trajectories Trajectory id 7 6 8 4 3 2 5 1 Final Mass [kg] 14710.0 14708.2 14708.0 14672.0 14643.2 14641.5 14623.2 13844.2 Launch Date 2001-Jan-18 2001-Nov-08 2001-Jan-18 2001-Jan-26 2001-Jan-19 2001-Jan-25 2000-Jan-26 2001-Jan-14 Table 4.12: Best locally optimized trajectories for validation - Earth-Mars transfer. 4.4 Transfer with a Gravity-Assist After testing the program with a simple thrust leg, the next step was to optimize a trajectory with one gravity-assist. The problem considered is to optimize a transfer from Earth to Jupiter with an intermediate gravity-assist at Mars, maximizing the mass at arrival. The input information for the global shape-based 41 Figure 4.7: Earth-Mars locally optimized trajectory for validation. search is presented in table 4.13. Transfer Characteristics Legs Leg Types |v~∞ | at departure Launch Window Launch Window Step Earth-Mars-Jupiter Thrust-Thrust 3 × 103 2000-Jan-01 to 2029-Dec-31 30 Julian Days Table 4.13: Earth-Mars-Jupiter global shape-based search input. Thrust legs were selected for both Earth-Mars and Mars-Jupiter legs, meaning that for the first step of optimization the trajectories will consist of two patched exponential sinusoids. The shape-based search was performed over 30 years with a step of 30 Julian days, and 5908 trajectories that reached Jupiter via a Mars flyby were found (the step of 30 days is too large and obviously inadequate in the search of the best initial guess, however the purpose is to test a sequence of flybys). The trajectory with highest mass at arrival is depicted in figure 4.8. The information needed as input for the direct transcription method is presented in table 4.14. For the first leg ten segments were chosen for the transcription; for the second leg fifteen segments were used because of the higher duration of the Mars-Jupiter leg. The decision vector for the gravity assist problem is given by: 42 Figure 4.8: Gravity-assist shape-based trajectory with higher mass at arrival. D ≡ [t0 , tof1 , mf 1 , ~v∞ |dep , ~v∞ |f lyby0 , (4.3) tof2 , mf 2 , ~v∞ |f lyby1 , ~v∞ |arr , ~ηleg1 , ~ηleg2 ] So the decision vector includes the information for the two legs: the time of flight tof of the leg, the final mass at the end of the leg and the throttles at the segments. First the optimization was done considering planar motion, with the orbits projected onto the lowthrust plane, so the vector parameters in the decision vector (4.3) are two-dimensional. The results of the optimization for the ten best trajectories are presented in table 4.15. Direct Transcription Parameters Nseg for Earth-Mars leg Nseg for Mars-Jupiter leg Initial Mass mi Engine Isp Maximum Thrust Tmax 10 15 2000 kg 2500 s 0.5 N Table 4.14: Decision vector input for Earth-Mars-Jupiter transfer. The best trajectory found for the initial, flyby and final epochs unconstrained two-dimensional optimization is depicted in figure 4.9. The optimization with the actual inclined orbits was then performed and the results are presented in 43 Locally Optimized Trajectories Trajectory id 1 2 3 4 5 6 7 8 9 10 Final Mass [kg] 1167.068 1165.184 1164.628 1164.248 1163.598 1149.208 1146.753 1143.396 1141.219 1140.909 Table 4.15: Locally optimization results time-unconstrained and 2-D. Figure 4.9: 2-D Gravity-assist trajectory with higher mass at arrival. table 4.16. The best solution found is depicted in figure 4.10. To improve the solution found with the two-step method, a monotonic basin hopping algorithm was applied to the best trajectory yet; the improvement obtained was from 1257.669 to 1290.854 kg, and the correspondent trajectory is plotted in figure 4.11. The solution obtained with the two-step global search method is again compared to the solution obtained with the monotonic basin hopping algorithm. The best solution obtain with this method had a mass at arrival of 1210 kg, and is depicted in figure 4.12 The benefits of using a initial shape-based guess over a genetic algorithm are obvious; convergence is assured for all the initial trajectories, while with the purely genetic algorithm the optimization does not always produce a feasible trajectory, that is, it may not satisfy the constraints. Moreover, for very 44 Locally Optimized Trajectories Trajectory id 1 2 3 4 5 6 7 8 9 10 Final Mass [kg] 1257.669 1252.037 1249.973 1249.601 1249.353 1249.098 1248.294 1248.235 1244.840 1243.885 Table 4.16: Locally optimization results time unconstrained and 3-D. Figure 4.10: 3-D Gravity-assist trajectory with higher mass at arrival. large launch windows as the one considered in this problem (30 years), the monotonic basin hopping algorithm has difficulties in finding a good local optimum, while the shape-based search assures that almost all the possible trajectories are analysed [26], with the compromise of being two-dimensional and approximately optimal. 4.5 First GTOC Solution The first GTOC problem characteristics were already summarized along all the existing competitions in section 1.2. The objective is to maximize the following expression: msc (~vsc/rel · ~vast )|t=tf , 45 (4.4) Figure 4.11: 3-D Gravity-assist trajectory with higher mass at arrival. Figure 4.12: 3-D Gravity-assist trajectory obtained with genetic algorithm. which induces a maximum change in the target asteroid’s major axis of the orbit after collision. ~vsc/rel is the spacecraft’s velocity relative to the asteroid and ~vast is the asteroid heliocentric velocity, msc the spacecraft’s mass, and tf is the moment of impact. The mission characteristics are specified in table 4.17. 46 GTOC1 Initial Mass mi Engine Isp Maximum Thrust Tmax Maximum |v~∞ | at departure Launch Window Maximum time-of-flight Minimum heliocentric distance 2000kg 2500 s 0.04 N 2.5 × 103 m/s 2010 − Jan − 01 to 2030 − Jan − 01 30 years 0.2AU Table 4.17: GTOC1 problem characteristics. The target asteroid is a NEA (Near Earth Asteroid) designated by T W 229 and has the following characteristics: Asteroid TW229 Characteristics semi-major axis eccentricity inclination argument of periapsis right ascension mean anomaly at 53600 MJD 2.5897261AU 0.2734625 6.40734o 264.78691o 128.34711o 320.47955o Table 4.18: NEA TW229 keplerian elements. The shape-based trajectories are expected to converge to the three-dimensional trajectories, since the considered NEA has a semi-major axis of 2.5 AU and an inclination of 6.4 degrees, well inside the region of convergence obtained in section 4.2. As the PyGMO library tries to achieve minimization and not maximization, the objective function was set to the negative of 4.4: J = −msc ((~vsc − ~vast ) · ~vast )|t=tf . (4.5) The inclusion of this objective function in the program was easy, since all the information in 4.5 is readily available: the spacecraft mass at arrival is part of the decision vector, as well as the velocity at the arrival. The velocity of the asteroid is known as a function of time, and the time is also available in the decision vector, summing the initial epoch with the time of flight to collision. The decision vector used for the GTOC problem is given by D ≡ [t0 , tof1 , mf 1 , ~v∞ |dep , ~v∞ |f lyby0i , tof2 , mf 2 , ~v∞ |f lyby0f , ~v∞ |f lyby1i , .. . tofn , mf n , ~v∞ |f lybynf , ~v∞ |arr , ~ηleg1 , ~ηleg2 , . . . , ~ηlegn ] 47 (4.6) and represents a generic multiple gravity-assist trajectory with n legs; each leg is represented by its time-of-flight, mass at the end point, velocities at the start and end of the leg and the engine throttles. To satisfy the mission requirement that the spacecraft’s distance to the Sun would not be less that 0.2 AU, an inequality constraint was added to the problem: cineq = 0.2AU − p x(t)2 + y(t)2 + z(t)2 < 0. (4.7) Earth-NEA To first solve the problem, a direct transfer from Earth to the asteroid was considered. The shapebased method was performed stepping through the launch window with a step of one julian day. The initial-guesses were sorted by the objective function and served as an input to the local optimizer, with parameters described in table 4.21. Optimization Parameters Number of Segments Nseg Initial Mass mi Engine Isp Maximum Thrust Tmax 35 2000 kg 2500 s 0.04 N Table 4.19: GTOC1 Earth-NEA optimization parameters. The best trajectory found is depicted in figure 4.13, with its characteristics in table 4.20. Earth-Asteroid Best Solution Departure Date Arrival Date Objective Function J 2021 − 10 − 15 2038 − 12 − 29 9.0978 × 1010 Table 4.20: GTOC1 Earth-NEA solution. Earth-Earth-NEA From the sequence of flybys considered (Earth-Venus-NEA, Earth-Mars-NEA, Earth-Earth-NEA), the best solution found was obtained with a Earth-Earth-NEA trajectory. The shape-based method was again performed with a step of one julian day; the parameters for the local optimizer are shown in table 4.21. Optimization Parameters Number of Segments Nseg Initial Mass mi Engine Isp Maximum Thrust Tmax 5-5 2000 kg 2500 s 0.04 N Table 4.21: GTOC1 Earth-Earth-NEA optimization parameters. The best solution is depicted in figure 4.14 and described in table 4.22. 48 Figure 4.13: Earth-NEA trajectory. Earth-Earth-Asteroid Best Solution Departure Date Earth Flyby Arrival Date Objective Function J 2021 − 01 − 28 2029 − 01 − 18 2030 − 02 − 21 12.6291 × 1010 Table 4.22: GTOC1 Earth-Earth-NEA solution. Remarks The best score from the competitor teams was of J = 185 × 1010 and the worse of J = 0.89 × 1010 . The winner team was NASA; near my score were teams such as DLR (Germany Aerospace Centre) and Alcatel Alenia Space. The huge leap in the objective function score mostly comes from long flyby sequences used by the best teams (up to 15 flyby planets); not only the sequences are difficult to construct (too many options), but they are hugely costly in computation time. A simple direct transfer for this GTOC problem takes around 2 days to optimize, in a computer with a dual core CPU at 2.00 GHz and a 8 GB RAM; about one day to generate the shape-based trajectories (launch window of 30 years!), and another day to local optimize some of the best trajectories. Adding a gravity-assist means approximately squaring the number of trajectories obtained in the shape-based method, and that leads to overall times of computation of one week. The main achievement from attempting to solve the first GTOC problem is identifying the lack of tools available; although the two-step method implemented is a fundamental tool on the design process of low-thrust trajectories, much more is needed to tackle the GTOC problems. The main features that 49 Figure 4.14: Earth-Earth-NEA trajectory. would need to be added are mainly heuristic tools to assess at a first instance what combinations of events are worth exploring in the shape-based method. Not only the gravity-assist sequence should be previously evaluated, but also what kind of legs and at what epoch should the gravity-assist take place, for example. A crucial improvement on the current tool would be the pruning of the shape-based trajectories at the moment they are being generated; some heuristics would have to be found that would not try to find thousands of trajectories because they would achieve a poor performance index, saving great computation time. Also the program would benefit from including the possibility to consider shapes other than the exponential sinusoid. 50 Chapter 5 Conclusions 5.1 Achievements The problem of spacecraft trajectory optimization considered – that of interplanetary transfers using low-thrust propulsion – was tackled with a two-step approach that globally searches the solution space. The optimization procedure satisfies the intended characteristics: it is robust, versatile and global. The robustness is assured through the direct transcription method; the direct method for local optimization assures that for most initial guesses – even if randomly generated – a feasible solution is obtained. The direct transcription also allows that changes in the formulation of the problem, such as new complex performance indexes, are easily introduced. The global aspect of the two-step approach is obtained by the shape-base method, that exhaustively searches the approximate solution space, generating initial guesses to the local optimizer. Results show that the implemented method works and has a reasonable performance; the PyGMO library has proven to be an adequate tool for global optimization. The main limitation found was the computational means; increasing the number of flybys in a sequence approximately squared the already costly time of computation. The need for heuristics that can guide the search for a good solution was identified; this would save a lot of time during the global search. 5.2 Future Work Future work on this subject should focus on automatically selecting the most promising sequences of flybys; the sequence of flyby bodies is usually selected based on the astrodynamics experience of the mission designer. Due to the discrete nature of the problem of forming a sequence of flybys, a stochastic algorithm should be used in the selection of the sequence; the problem would consist of finding a suitable fitness function to evaluate each sequence and an efficient way to construct them. Then the multiprocessing architecture of the PyGMO library could be used to parallelize the optimization algorithms. Heuristics should also be found to prune away uninteresting trajectories in the shape-based search. 51 52 Bibliography [1] Bruce Conway, editor. Spacecraft Trajectory Optimization. Cambridge University Press, 2010. [2] J. T. Betts. Survey of Numerical Methods for Trajectory Optimization. Journal of Guidance, Control, and Dynamics, 21(2):193–207, March–April 1998. [3] Stephen Kemble. Interplanetary Missions Analysis and Design. Praxis Publishing Ltd, 1st edition, 2006. [4] J. A. Sims and Flanagan S. N. Preliminary Design of Low-Thrust Interplanetary Missions. In AAS/AIAA Astrodynamics Specialist Conference, volume AAS 99-338, Girdwood, Alaska, August 1999. [5] Anastassios E. Petropoulos, James M. Longuskij, and Eugene P. Bonfiglio. Trajectories to Jupiter via Gravity Assists from Venus, Earth, and Mars. Journal of Spacecraft and Rockets, 37(6):776– 788, December 2000. [6] James A. Van Allen. Gravitational Assist in Celestial Mechanics. Am. J. Phys., 71(5):448–451, May 2003. [7] William E. Wiesel. Spaceflight Dynamics. McGraw-Hill Companies, Inc., 2nd edition, 1995. [8] Dario Izzo. 1st ACT Global Trajectory Optimisation Competition : Problem Description and Summary of the Results. Acta Astronautica, 61(9):731–734, 2007. [9] Dario Izzo and Francesco Biscani. PyGMO Documentation. https://media.readthedocs.org/ pdf/pygmo/newdocs/pygmo.pdf, 2014. [Online; accessed -December-2014]. [10] M. Vasile. A Global Approach To Optimal Space Trajectory Design. In Proceedings of the 13th AAS/AIAA Space Flight Mechanics Meeting, volume AAS 99-338, Ponce, Puerto Rico, 9–13 February 2003. [11] John W. Hartmann, Vi L. Coverstone-Carroll, and N. Williams. Optimal Interplanetary Spacecraft Trajectories via a Pareto Genetic Algorithm. Journal of the Astronautical Sciences, 46(3):267–282, 1998. [12] Chit Hong Yam, David Di Lorenzo, and Dario Izzo. Constrained Global Optimization of Low-Thrust Interplanetary Trajectories. In Proceedings of the IEEE Congress on Evolutionary Computation, pages 1–7, Barcelona, Spain, 18–23 July 2010. 53 [13] Bradley J. Wall and Bruce A. Conway. Genetic Algorithms Applied to the Solution of Hybrid Optimal Control Problems in Astrodynamics. Journal of Global Optimisation, 44(4):493–508, August 2009. [14] T. Troy McConaghy, Theresa J. Debban, Anastassios E. Petropoulos, and James M. Longuski. Design and Optimization of Low-Thrust Trajectories with Gravity-Assists. Journal of Spacecraft and Rockets, 40(3):380–387, May–June 2003. [15] Bernd Dachwald and Andreas Ohndorf. 1st ACT Global Trajectory Optimisation Competition : Results Found at DLR. Acta Astronautica, 61(9):742–752, 2007. [16] Ian Carnelli, Bernd Dachwald, and Massimiliano Vasile. Evolutionary Neurocontrol : A Novel Method for Low-Thrust, Gravity-Assist Trajectory Optimization. Journal of Guidance, Control, and Dynamics, 32(2):615–624, March–April 2009. [17] Viacheslav G. Petukhov, Mikhail S. Konstantinov, and Gennady G. Fedotov. 1st ACT Global Trajectory Optimisation Competition : Results found at Moscow Aviation Institute and Khrunichev State Research and Production Space Center. Acta Astronautica, 61(9):775–785, 2007. [18] Lorenzo Casalino, Guido Colasurdo, and Matteo Rosa Sentinella. 1st ACT Global Trajectory Optimisation Competition : Results Found at the Politecnico of Turin. Acta Astronautica, 61(9):769–774, 2007. [19] Dario Izzo. Automated Asteroid Selection for a Grand Tour Mission. In Proceedings of the 58th International Astronautical Congress, volume IAC-07-C1.7.07, Hyderabad, India, 24–28 September 2007. [20] I. S. Grigoriev and M. P. Zapletin. Constructing Pontryagin Extremals for the Optimal Control Problem of Asteroid Fly-By. Automation and Remote Control, 70(9):1499–1513, 2009. [21] I. S. Grigoriev and M. P. Zapletin. Choosing Promising Sequences of Asteroids. Automation and Remote Control, 74(8):1284–1296, 2013. [22] Bruce A. Conway. Shape-Based Approach to Low-Thrust Rendezvous Trajectory Design. Journal of Guidance, Control, and Dynamics, 32(1):95–101, January–February 2009. [23] A. Miele and T. Wang. Optimal Planetary Orbital Transfers via Chemical Engines and Electrical Engines. Journal of Optimization Theory and Applications, 127(3):587–604, December 2005. [24] D. Izzo, V. M. Becerra, D. R. Myatt, S. J. Nasuto, and J. M. Bishop. Search Space Pruning and Global Optimisation of Multiple Gravity Assist Spacecraft Trajectories. Journal of Global Optimisation, 38:283–296, November 2007. [25] Mischa Kim. Continuous Low-Thrust Trajectory Optimization: Techniques and Applications. Master’s thesis, Virginia Polythecnic Institute, 2005. [26] Anastassios E. Petropoulos and James M. Longuski. Shape-Based Algorithm for Automated Design. Journal of Spacecraft and Rockets, 41(5):787–796, September–October 2004. 54 [27] T. Troy Mcconaghy, Theresa J. Debban, Anastassios E. Petropoulos, and James M. Longuski. Design and Optimization of Low-Thrust Trajectories with Gravity Assists. Journal of Spacecraft and Rockets, 40(3):380–387, May–June 2003. [28] Anastassios E. Petropoulos and Jon A. Sims. A Review of Some Exact Solutions to the Planar Equations of Motion of a Thrusting Spacecraft. In Proceedings of the 2nd International Symposium on Low Thrust Trajectories, Toulouse, France, 18 June 2002. [29] Dario Izzo. PyGMO and PyKEP: Open Source Tools for Massively Parallel Optimization in Astrodynamics. In Proceedings of the International Conference on Astrodynamics Tools and Techniques, Noordwijk, Netherlands, 29 May – 1 June 2012. [30] Bradley Wall and Bruce A. Conway. Near-Optimal Low-Thrust Earth – Mars Trajectories via a Genetic Algorithm. Journal of Guidance, Control, and Dynamics, 28(5):1027–1031, September– October 2005. 55 56