study and industrialization of optimization methods …1063271/fulltext01.pdfa code in c++ using...

82
IN DEGREE PROJECT MATHEMATICS, SECOND CYCLE, 30 CREDITS , STOCKHOLM SWEDEN 2016 Study and Industrialization of Optimization Methods for Low- Thrust Orbital Maneuvers ROMAIN BOYER KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ENGINEERING SCIENCES

Upload: others

Post on 04-Apr-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

IN DEGREE PROJECT MATHEMATICS,SECOND CYCLE, 30 CREDITS

, STOCKHOLM SWEDEN 2016

Study and Industrialization of Optimization Methods for Low-Thrust Orbital Maneuvers

ROMAIN BOYER

KTH ROYAL INSTITUTE OF TECHNOLOGYSCHOOL OF ENGINEERING SCIENCES

Page 2: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66
Page 3: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

Study and Industrialization of

Optimization Methods for Low-Thrust Orbital Maneuvers

R O M A I N B O Y E R

Master’s Thesis in Systems Engineering (30 ECTS credits) Degree Programme in Vehicle Engineering (120 credits) Royal Institute of Technology year 2016

Supervisor at Thales Group: Jérémie Labroquère Supervisor at KTH: Per Engvist

Supervisor at ISAE: Stéphanie Lizy-Destrez Examiner at KTH: Per Engvist

TRITA-MAT-E 2016:72 ISRN-KTH/MAT/E--16/72--SE

Royal Institute of Technology School of Engineering Sciences

KTH SCI SE-100 44 Stockholm, Sweden

URL: www.kth.se/sci

Page 4: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66
Page 5: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

Acknowledgements

I would like to use this opportunity to thank all people for their welcome inside the friendlybut working atmosphere of the Flight Dynamics department.

I want to address special thanks to Jérémie Labroquère who gave his time to supervise meduring these six months. His advice, explanations and comments have been very helpful.

I would like also to thank all people who answered my questions, who helped me in anyway to master a bug with the dierent software I had the opportunity to use during theinternship, or who gave me advice about orbital maneuver and optimal control: Thomas Ro-drigues, Emmanuel Bignon, Pierre Mercier and Johann Tournebize.

Finally, I am grateful to the two professors Stéphanie Lizy-Destrez from ISAE and Per Enqvistfrom KTH for accepting to be supervisors and examiners of this degree project.

1

Page 6: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66
Page 7: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

CONTENTS CONTENTS

Contents

List of Figures 4

List of Tables 5

1 Introduction 6

1.1 Presentation of the company . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.1.1 Thales Group and Thales Services . . . . . . . . . . . . . . . . . . . . 61.1.2 Flight dynamics department . . . . . . . . . . . . . . . . . . . . . . . . 7

1.2 Internship description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.2 Flight trajectories computation issue . . . . . . . . . . . . . . . . . . . 81.2.3 Internship purposes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2.4 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Modelling and optimization techniques 10

2.1 Satellite ight trajectory modelling . . . . . . . . . . . . . . . . . . . . . . . . 102.1.1 Two-body problem and Keplerian motion . . . . . . . . . . . . . . . . 102.1.2 Perturbations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2 Optimal Control Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.1 General formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.2.2 Solving methods of an optimal control problem . . . . . . . . . . . . . 142.2.3 Direct methods applied to optimal control problem . . . . . . . . . . . 15

3 Numerical optimization 20

3.1 State of the art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2 Solver selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

3.2.1 Description of the method of selection . . . . . . . . . . . . . . . . . . 223.2.2 Choice of the solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223.2.3 NLP Test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.3 Validation of the choice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.3.1 The Brachistochrone problem . . . . . . . . . . . . . . . . . . . . . . . 243.3.2 Transformation into NLP problem . . . . . . . . . . . . . . . . . . . . 253.3.3 Final resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293.3.4 Conclusion on the methods and the solvers . . . . . . . . . . . . . . . 32

4 Development of a module: to transform any optimal control problem into

a NLP 33

4.1 Needs and requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1.1 Cost function transformation . . . . . . . . . . . . . . . . . . . . . . . 334.1.2 Dynamics tranformation . . . . . . . . . . . . . . . . . . . . . . . . . . 334.1.3 Path contraint transformation . . . . . . . . . . . . . . . . . . . . . . . 344.1.4 Boundary condition tranformation . . . . . . . . . . . . . . . . . . . . 344.1.5 Available direct methods . . . . . . . . . . . . . . . . . . . . . . . . . . 344.1.6 Provide gradients with nite dierence . . . . . . . . . . . . . . . . . . 344.1.7 Handle dierent types of problem . . . . . . . . . . . . . . . . . . . . . 35

4.2 Conception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.3 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.4 Unit Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.5 Validation on a high-thrust transfer . . . . . . . . . . . . . . . . . . . . . . . . 39

4.5.1 A high-thrust transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . 394.5.2 Collocation method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404.5.3 Direct single shooting . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

2

Page 8: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

CONTENTS CONTENTS

4.5.4 Direct multiple shooting . . . . . . . . . . . . . . . . . . . . . . . . . . 434.5.5 Comparison between the three methods . . . . . . . . . . . . . . . . . 44

5 Validation and results for low-thrust transfers 45

5.1 Simplied Medium-Thrust Transfer problem . . . . . . . . . . . . . . . . . . . 455.1.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455.1.2 Resolution with single shooting . . . . . . . . . . . . . . . . . . . . . . 46

5.2 General Low-Thrust Transfer Problem . . . . . . . . . . . . . . . . . . . . . . 495.2.1 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495.2.2 Change in SMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505.2.3 Change in eccentricity . . . . . . . . . . . . . . . . . . . . . . . . . . . 535.2.4 Change in inclinaison . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565.2.5 GTO-GEO transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

6 Encountered problems 63

7 Conclusion 64

Appendices 65

A Code in C++ using solver Nlopt (SLSQP algorithm) 65

B Theoretical solution of the Brachistochrone problem 66

C Output of Ipopt solver with the Brachistochrone problem (single shooting) 67

D Test problems for orbital transfers 69

D.1 Brachistochrone problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69D.2 Van der Pol oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69D.3 Maximum-Energy Orbit Transfer . . . . . . . . . . . . . . . . . . . . . . . . . 69D.4 Maximum-Radius Orbit Transfer with Solar Sail . . . . . . . . . . . . . . . . 69D.5 Planet to planet transfer: Earth-Mars . . . . . . . . . . . . . . . . . . . . . . 70D.6 Earth-to-Mars problem with Nuclear-electric propulsion systems . . . . . . . . 70D.7 Earth-to-Mars problem with Solar-electric propulsion systems . . . . . . . . . 71D.8 Earth-to-Mars problem with Solar sail spacecraft . . . . . . . . . . . . . . . . 71

E Results for a high-thrust transfer from the paper "Low-Thust, High-Accuracy

Trajectory Optimization" 72

F Results for a medium-thrust transfer from the paper "Low-Thust, High-

Accuracy Trajectory Optimization" 73

G Output of Ipopt solver with a low-thrust problem (change of SMA and

single shooting method) 74

References 75

3

Page 9: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

LIST OF FIGURES LIST OF FIGURES

List of Figures

1 Thales Services into Thales Group . . . . . . . . . . . . . . . . . . . . . . . . 62 Thales Services - Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Organization of LOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Keplerian elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Sketch of an optimal control problem . . . . . . . . . . . . . . . . . . . . . . . 137 Sketch of the single shooting method . . . . . . . . . . . . . . . . . . . . . . . 178 Sketch of the multiple shooting method . . . . . . . . . . . . . . . . . . . . . 189 Brachistochrone solution with Nlopt (Collocation) . . . . . . . . . . . . . . . 2910 Brachistochrone solution with Ipopt (Single shooting) . . . . . . . . . . . . . 3011 Brachistochrone solution with Ipopt (Multiple shooting) . . . . . . . . . . . . 3112 General view of the software architecture: Package diagram. . . . . . . . . . . 3513 General view of the software architecture: Class diagram. . . . . . . . . . . . 3714 The "direct method" package. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3815 Optimal radial thrust for the time-optimal problem . . . . . . . . . . . . . . . 4116 Optimal tangential thrust for the time-optimal problem . . . . . . . . . . . . 4117 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 4218 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4219 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 4320 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 4321 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 4422 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4423 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 4724 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 4725 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 4826 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4827 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 5128 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 5129 Optimal vertical thrust of the time-optimal problem . . . . . . . . . . . . . . 5230 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 5231 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5332 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 5433 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 5434 Optimal vertical thrust of the time-optimal problem . . . . . . . . . . . . . . 5535 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 5536 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5637 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 5738 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 5739 Optimal vertical thrust of the time-optimal problem . . . . . . . . . . . . . . 5840 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 5841 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5942 Optimal radial thrust of the time-optimal problem . . . . . . . . . . . . . . . 6043 Optimal tangential thrust of the time-optimal problem . . . . . . . . . . . . . 6044 Optimal vertical thrust of the time-optimal problem . . . . . . . . . . . . . . 6145 Evolution of the main parameters . . . . . . . . . . . . . . . . . . . . . . . . . 6146 Transfer trajectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6247 Theoretical solution of the Brachistochrone problem . . . . . . . . . . . . . . 6648 Optimal solution for a time-optimal problem . . . . . . . . . . . . . . . . . . . 7249 Optimal solution for a time-optimal problem . . . . . . . . . . . . . . . . . . . 73

4

Page 10: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

LIST OF TABLES LIST OF TABLES

List of Tables

1 Avantages and disavantages of direct methods . . . . . . . . . . . . . . . . . . 152 NLP Solvers (part 1/3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 NLP Solvers (part 2/3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 NLP solvers (part 3/3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 NLP characteristics according to the selected direct method for the Brachis-

tochrone problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 Physical Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5010 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5311 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5612 Orbits characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5

Page 11: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

1 INTRODUCTION

1 Introduction

1.1 Presentation of the company

1.1.1 Thales Group and Thales Services

Thales Group, present in 56 countries and employing around 67000 people, is one of the lead-ers in critical information systems in the Aerospace, Transportation and Defense and Securitymarkets. The group is mostly known for its broad experience of the development and synergyof state-of-art technologies both for the civil and military markets, and also for its Researchand Development activities which bring together a multinational group of around 25000 en-gineers and researchers.

Present in civil and military eld, Thales Group is organized into 6 divisions: Secure Commu-nications and Information Systems, Avionics, Land and Air Systems, Space, Defense MissionSystems and Ground Transportation Systems. Each division is divided into Strategic BusinessUnits (SBU), and the latters into Strategic Business Lines (SBL). The activities of ThalesServices are part of the Secure Communications and Information Systems division.

Figure 1: Thales Services into Thales Group

The following gures show more precisely the organization of Thales Services:

Figure 2: Thales Services - Organization

6

Page 12: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

1.1 Presentation of the company 1 INTRODUCTION

Figure 3: Organization of LOM

1.1.2 Flight dynamics department

Inside Thales Service, the departments are divided into a matrix organization considering thegeographic area and the domain of activity.

The internship has been done in the Flight Dynamics Department in Toulouse, which ispart of Division South-West, inside the "Logiciel Orienté Machine" Unit (LOM).

The Flight Dynamics department, as the name indicates, provides services in the area ofspace mechanics, mainly to serve spacecraft operation's needs. In particular, the departmentprovides two types of services:

• Technical support in the client's facilities, concerning the areas of mission analysis,technical studies

• Software project development directly at Thales site, which includes in particular thedevelopment of software tools such as:- CMS (Space Mechanic Center): Space Mechanics library used by CNES (for controloperations) and developed in FORTRAN. It includes the low-level libraries and high levelservices as maneuvers computations, guidance, orbit determination (OD), commandsgeneration and so forth- PATRIUS: Analogue to CMS but developed in Java- ZOOM : Orbit Determination toolkit developed for CNES- GOTLIB/PHRLIB (C++): Attitude Guidance Libraries- STELA: Long-term propagation tool developed for end-of-life activities- GALILEO: Guidance library for the next generation European navigation system- ASPROSH: Commands Validation Library- COSMEUS (JACK, JMAN, JPOD, JPAD): Software suite for space mechanics- POD/PAD for Gokturk mission: Precise Orbit Altitude Determination Library

7

Page 13: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

1.2 Internship description 1 INTRODUCTION

1.2 Internship description

1.2.1 Context

This internship extends a Master Thesis, which was written by Hanane Ait-Lakbir in 2015entitled "Study and Industrialization of Computational Methods for Orbital Maneuver" [15].Hanane's Master Thesis was a part of the development software suite COSMEUS (ComplexSpace Mechanics Utilities and Software), a java library related to space mechanics which iscomposed of the following modules:

• JACK (Java Aerospace Capitalization Kit): low-level library for space mechanics (orbitpropagation, force models, orbital event management, orbital parameter computation...)

• JUDE (Java Utilities for Development): library for exception, message, logs manage-ment

• JSCAR (Java Software for Comparison, Analysis and Reporting): library for tests

• JMAN (Java Maneuver): library for maneuver computation

• POD (Java Precise Orbit Determination) and JPAD (Java Precise Attitude Determina-tion): generic library for orbit and attitude determination

• Other modules: JERY for Java Earth Reentry: library for atmospheric reentry. JDEB(Java Debris) for debris trajectory propagation and assessment of collision risks.

Hanane's Master Thesis completed JMAN and JACK with some functionnalities in order tointegrate electrically propelled maneuvers (ie low-thrust maneuvers). More precisely, Hananeused indirect optimization methods to compute optimal maneuvers. On the contrary, thisMaster Thesis deals with direct methods to optimize low-thrust orbital tranfers. It is quiteimportant to know how to use thrust during a space mission in order to optimize one param-eter. For example, for a space company, one could want to minimize the fuel consumption,with respect to some mission constraints.

1.2.2 Flight trajectories computation issue

In this part, the ight trajectories computation issue is explained. First, orbital maneuverscan be divided into four dierent types:

• Station-keeping: the aim is to maintain the satellite on its orbit because some pertuba-tions modify the trajectory

• Orbit raising and early orbit phase: trajectory between two dierent orbits

• Debris avoidance: to avoid collisions which could damage the satellite

• Interplanatery transfers: between two planets, typically a mission to go to Mars

Only orbit raising maneuvers are studied in this report. There could be trajectories betweentwo orbits with changes in SMA (semi-major axis), changes in eccentricity, changes in inclina-tion or transfers from GTO (Geostationary Transfer Orbit) to GEO (Geosynchonous Orbit).This kind of maneuvers is performed with two dierent types of propulsion: chemical or elec-tric propulsion. Nowadays, the electric propulsion (ie low-thrust propulsion) is becoming moreand more important because it allows to consume less propellant. Thus, lighter satellites canbe built which save some money for the aerospace industry. However, the main disavantageis the duration of the maneuvers which is signicantly higher. For example, a spiral transfer,between a parking orbit at 200 km to GEO, with a Isp equal to 310 s and a constant ratio T

mequal to 0.01 m.s−2, can last ve days instead of ve hours with a Hohmann transfer.

8

Page 14: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

1.2 Internship description 1 INTRODUCTION

During a space mission, some parameters can be optimized such as the fuel consumption,the radius of the nal orbit or the duration of the maneuver, with respect to some space mis-sion constraints. In the case of chemical propulsion, it is quite easy to compute the optimalmaneuvers because a maneuver can be modeled as a sequence of impulsive thrusts. Indeed,the duration of thrust arcs is really short compared to the mission duration. However, forlow-thrust propulsion (ie electric propulsion), optimization problems are less straightforwardto solve. The control variables (thrust) become continuous functions and make the problemharder to solve. Continous optimization tools are then needed.

1.2.3 Internship purposes

The aim is to assess the possibility to use direct optimization methods in order to solve low-thrust trajectory problems. Based on some test cases, the applicability to compute optimalorbital transfers with low-thrust propulsion and the potential replacement of indirect methodswill be detailed. The focused maneuvers are orbit raising maneuvers, for example with changesin eccentricy or SMA. Either the fuel consumption or the duration of the trajectory can beoptimized with respect to some mission constraints.

1.2.4 Planning

The initial planning can be observed below:

Figure 4: Planning

This planning has almost not changed during the internship, except for the part "get usedto Jman" which lasted only two weeks. As you can see, most of the time is dedicated to theimplementation and the validation of a software.

9

Page 15: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2 MODELLING AND OPTIMIZATION TECHNIQUES

2 Modelling and optimization techniques

In this section, the two-body problem is rst described. Then, the other pertubations aredetailed to obtain a better approximation of what could be the motion of a satellite in the near-Earth space. Lastly, the optimization theory is briey explained with the general formulationof an optimal control problem and dierent methods of resolution.

2.1 Satellite ight trajectory modelling

2.1.1 Two-body problem and Keplerian motion

The gravitational two-body problem concerns the motion of two point particles that interactonly with each other, due to gravity. Any other inuence is neglected. In this master thesis,the studied two-body problem is given by the Earth and the spacecraft. Indeed, only theraising orbit maneuvers around the Earth are considered as it was said before. For example,interplanatery transfers could have included other bodies like the Sun or Mars. This modelallows to approximate the motion of a spacecraft around the Earth by considering only oneforce which is gravity and using the Kepler's law.

Let consider the Earth, which is assumed to be xed, and a satellite. The following pa-rameters can be introduced in a cartesian frame:

r = (x, y, z) position vector

v = r = (x, y, z) velocity vector

a = v = (x, y, z) acceleration vector

As it was said before, only one force (gravity) is taken into account in this two-body problem.Using the Newton's law of gravity, the gravitation eld can be expressed as:

F = −G.M.m

r3.r = −µ.m

r3.r

where r corresponds to the distance between the satellite and the Earth center, G the univer-sal constant of gravitation and µ the gravitational parameter.

From there, the equation of motion becomes:

r +µ

r3.r = 0

The Kepler's laws can now be stated in the case of a satellite around the Earth. The proofsof the three laws are not written because it does not seem to be relevant here:

• The orbit of a spacecraft is an ellipse with the Earth at one of the two foci.

• A line segment joining a satellite and the Earth sweeps out equal areas during equalintervals of time.

• The square of the orbital period of a satellite is proportional to the cube of the semi-major axis of its orbit.

Instead of the regular cartesian elements, it may be very useful to use orbital elements toidentify a specic orbit. Traditionnally, these elements are the six Keplerian elements:

• Eccentricity e

• Semi-major axis a

• Inclination i (angle between the reference plane and the orbital plane)

10

Page 16: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.1 Satellite ight trajectory modelling2 MODELLING AND OPTIMIZATION TECHNIQUES

• True anomaly θ

• Right ascension of the ascending node Ω (angle between the vernal axis and the ascend-ing node axis)

• Argument of the perigee ω (angle between the direction of the perigee and the ascendingnode axis).

These elements are illustrated on a specic orbit with the next gure:

Figure 5: Keplerian elements

Nevertheless, the Keplerian parameters are not the most suitable for electric transfers becausethey are not dened in some cases, for example if e tends to zero. On the contrary, theEquinoctial parameters are very useful to model a low-thrust problem (cf section 5). Indeed,the equinoctial parameters often help to avoid some numerical problems such as a division byzero or scaling problems. These parameters are p, which is the semi-parameter, f and g whichdescribe the eccentricity of the orbit, h and k which describe the inclination, L which is thetrue longitude. They can be related to the keplerian parameters with the following equations:

p = a(1− e2)f = e cos(ω + Ω)g = e sin(ω + Ω)

h = tan(i

2)cos(Ω)

k = tan(i

2)sin(Ω)

L = ω + Ω + θ

11

Page 17: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

The conversion towards the cartesian elements is ensured with the following equations:

α2 = h2 − k2

s2 = 1 + h2 + k2

w = 1 + f.cos(L) + g.sin(L)

r =p

w

x =r

s2(cos(L) + α2.cos(L) + 2.h.k.sin(L))

y =r

s2(sin(L)− α2.sin(L) + 2.h.k.cos(L))

z =r

s2(h.sin(L)− k.cos(L))

2.1.2 Perturbations

The gravitation eld is not the only force which aects the satellite. Consequenltly, thekeplerian motion can only give an approximation of the trajectory. The main perturbationsof the path for a satellite in the near-Earth space can be summarized as below:

• Earth shape (not perfectly spherical): the eects of the Earth atness change the ex-pression of the gravitation eld.

• Other bodies' inuences, mainly the Sun and the Moon

• Atmosphere (drag)

• Solar radiation: apparition of a pressure force due to the exchange of quantity of motionbetween the photons and the spacecraft.

2.2 Optimal Control Theory

A trajectory optimization problem can generally be seen as an optimal control problem andsolved using indirect or direct methods. In this master thesis, only direct methods are used.

2.2.1 General formulation

The aim of an optimal control problem is to determine a control law u(t), related to a nitestate x(t) with some dierential equations corresponding to state dynamics:

x(t) = f(t,x(t),u(t))

with boundary conditions:

x(t0) = x0 initial condition

ψi(xtf ) ≤ 0 inequality final condition

ψe(xtf ) = 0 equality final condition

path constraints:

Ki(t,x(t),u(t)) ≤ 0 inequality path constraint

Ke(t,x(t),u(t)) = 0 equality path constraint

12

Page 18: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

and box constraints:

ulower ≤ u(t) ≤ uupper

xlower ≤ x(t) ≤ xupper

in order to optimize a cost function:∫ tf

t0

L(x(t),u(t)) dt + φ(tf ,xf )

L is a C1 function called the cost rate, φ a C0 function called the nal cost. The generalformulation easily follows for a minimization:

min∫ tf

t0

L(x(t),u(t)) dt + φ(tf ,xf ) cost function

st x(t) = f(t,x(t),u(t)) dynamics

x(t0) = x0 initial condition

ψi(xtf ) ≤ 0 inequality final condition

ψe(xtf ) = 0 equality final condition

Ki(t,x(t),u(t)) ≤ 0 inequality path constraint

Ke(t,x(t),u(t)) = 0 equality path constraint

ulower ≤ u(t) ≤ uupper box constraint

xlower ≤ x(t) ≤ xupper box constraint

The following gure illustrates the previous general form of an optimal control problem.

Figure 6: Sketch of an optimal control problem

For a maximization, it would have been "min −(∫ tf

t0L(x(t),u(t)) dt + φ(tf ,xf )

)" instead

of "min(∫ tf

t0L(x(t),u(t)) dt + φ(tf ,xf )

)" in the cost function.

To be more concrete, in the case of trajectory optimization, the control law u(t) correspondsto the thrust whereas x(t) could include both position and velocity of the satellite. Moreover,the dierential equations are traditionnally the equations of motion and the cost functioncould be the mission duration. All this notions related to low-thrust transfers are describedlater.

13

Page 19: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

2.2.2 Solving methods of an optimal control problem

There are four types of methods:

• Dynamic programming

• HJBE (The HamiltonJacobiBellman Equation)

• Indirect methods (Calculus of variations and PMP)

• Direct methods (Sequential methods and simultaneous methods)

The two last methods are traditionally used for low-thrust trajectory optimization.

2.2.2.1 Dynamic Programming

This method provides the optimal closed-loop control law. With dynamic programming,you can obtain a global solution. However, it is barely used for the computation of orbitalmaneuvers because the computation of the maneuver involves the reaction of perturbations.

2.2.2.2 HJBE

This method corresponds to a continuous-time dynamic programming and provides satisfac-tory properties such as sucient conditions for optimality and optimal solutions in feedbackform. However, there are also several drawbacks. Mainly, the HJB equations is very hard tosolve numerically and analytic solutions can only be obtained in a few cases.

2.2.2.3 Indirect methods

They are based on PMP (Pontryagin's Maximum Principle) and Calculus of Variations. Theywere used in Hanane's Master Thesis to compute optimal solutions for low-thrust transfers.These methods allow to reach high accuracies and smooth solutions. Nevertheless, some disa-vantages can be stated. Indirect methods are quite complex to use. It is quite dicult to nda global solution. Lastly, the main problems remain the convergence of the shooting methodsand the sensitivity of the initial guess. All these diculties explain the choice to use directmethods in this Master Thesis.

Let us describe more precisely indirect methods by showing how to solve PMP in practice.

• Dene the Hamiltonian function:

H(t,x,u,λ) = L(t,u(t)) + λTf(t,x(t),u(t))

• Pointwise minimization of H with respect to u:

µ(x,λ) = arg minuH(x,u,λ)

The optimal control is expressed by:

u∗(t) = µ(x(t),λ(t))

• Solve TPBVP (Two Point Boundary Value Problem):

λ =− ∂H

∂x(t,x(t), µ(x(t),λ(t)),λ(t)),

x(t) = f(x, µ(x(t),λ(t))),

14

Page 20: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

with boundary conditions

λ(tf )− ∂φ

∂x(x(tf )) ⊥ Sf ,

x(ti) = xi, x(tf ) ∈ Sf .

TPBVP can be numerically solved with shooting techniques (single or multiple shoot-ing).

2.2.2.4 Direct methods

A direct method tranforms an optimal control problem into a non-linear problem (NLP),which can normally be solved by an optimization solver. The following table sums up thecharacteristics of a direct method, which can be compared with a indirect method in theprevious paragraph.

Advantages DisavantagesConvergence of the algorithm Existence of local mimimum solutions

Choice of the initial guess not too crucial Time consuming if large dimensionsQuite robust algorithm Relative low precision

Table 1: Avantages and disavantages of direct methods

2.2.2.5 Hybrid methods

Hanane Ait-Lakbir has used homotopy continuation methods to solve the diculties relatedto the indirect methods. One of the main problems was the convergence of the algorithm. Apossibility could be to use hybrid methods (both direct and indirect methods). More precisely,one can apply PMP to get a boundary-value problem. Then, direct methods can be used toinitialize a multiple shooting method. Direct methods allows to obtain a good initial guess forPMP methods. In other words, they provide a point not too far away from the global solutionto avoid convergence problems. The advantage of this approach is to provide an initial guessclose to the global solution. In this way, it is possible to get a better accuracy than directmethods and avoid the convergence problems of indirect methods.

• First step: PMP to get TPBVP

• Second step: Resolution of the initial optimal control problem thanks to a direct method.

• Third step: Initialization of the multiple shooting with the point given by the directmethod.

• Fourth step: Resolution of TPBVP with multiple shooting.

2.2.3 Direct methods applied to optimal control problem

In this Master Thesis, only direct methods are performed to solve trajectory optimizationproblems with low-thrust propulsion. This choice has been motivated by the main avantagesof this kind of methods which are described in table 1. The direct methods can be dividedinto two dierent categories:

• Sequential methods: only the control is discretized. The collocation is likely to be themost famous sequential method.

15

Page 21: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

• Simultaneous methods: both the state vector and the control are discretized. It oftenleads to a direct shooting, which can be single or multiple.

The aim is to get a non-linear problem (NLP) by discretizing both the state vector and thecontrol in the initial optimal control problem (simultaneous approach). The rst step is todiscretize the time interval t ∈ [0, tf ] into N − 1 equal subintervals (ie N points). The step

length is given by h = tfN−1 so that tj+1 − tj = h, j = 0, . . . , N − 1. Both the state vector

and the control are discretized by:

x(t) = xj ,u(t) = uj , where jh ≤ t < (j + 1)h.

It leads to N points for the state vector and N-1 points for the control because the controlu is not considered at the nal point. Let dimu be equal to the dimension of the control u,dimx the dimension of the statevector x. Both matrices X and U, which respectively containall the state vector coecients and all the control coecients for all the steps, are introduced:

X =

x0,0 ... x0,N−1

... ... ...xdimx−1,0 ... xdimx−1,N−1

U =

u0,0 ... u0,N−2

... ... ...udimu−1,0 ... udimu−1,N−2

Now, the transformation to obtain a non-linear problem can really begin. As it was written inthe general formulation of an optimal control problem, there were nine dierent expressionsto be discretized (cost function, dynamics, initial condition, equality and inequality nalconditions, equality and inequality path constraints and two box constraints). From thispoint, dierent ways to discretize the dierential equations (dynamics) from the optimalcontrol problem can be used like Euler, Middle Point, Heun, Runge-Kutta, Adams- Moulton,etc. For example, with Euler, dynamics x(t) = f(t,x(t),u(t)) can be approximated as below:

xi,j+1 = xi,j + h.xi,j for i = 0...dimx − 1, for j = 0...N − 2

which is the same as:

xi,j+1 − xi,j − h.fi(j,x0,j , ...,xdimx−1,j ,u0,j , ...,udimu−1,j) = 0, for i = 0...dimx − 1, for j = 0...N − 2

Whatever the method used to discretize dynamics, it gives dimx.(N−1) dierent constraints.In the same way, the initial condition, both inequality and equality nal conditions, may beexpressed as:

xi,1 − x0(i) = 0, for i = 0...dimx − 1ψ1(xi,N−1)− xtf (i) ≤ 0, for i = 0...dimx − 1

ψ2(xi,N−1)− xtf (i) = 0, for i = 0...dimx − 1

Thus, 3.dimx new constraints have just been added to the non linear problem. Moreover, thepath constraints (equality and inequality) give the following constraints:

Ki(j,x0,j , ...,xdimx−1,j ,u0,j , ...,udimu−1,j) ≤ 0 for j = 0...N − 1Ke(j,x0,j , ...,xdimx−1,j ,u0,j , ...,udimu−1,j) = 0 for j = 0...N − 1

Then, both box constraints have to be considered. Consequently, new constraints can beadded:

ulower(i) ≤ u(i, j) ≤ uupper(i), for i = 0...dimu − 1, for j = 0...N − 2xlower(i) ≤ x(i, j) ≤ xupper(i), for i = 0...dimx − 1, for j = 0...N − 1

16

Page 22: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

Lastly, the cost function needs to be discretized. You can observe one example of discretizationbelow:

tfN − 1

.N−1∑j=0

L(x0,j , ...,xdimx−1,j ,u0,j , ...,udimu−1,j) + φ(tf ,xf )

Let introduce the NLP state vector z which contains both all coecients of X and U. It alsoincludes the nal time and may be dened as:

z = (u0,0, ...,u0,N−2, ...,udimu−1,0, ...,udimu−1,N−2, ...,x0,0, ...,x0,N−1, ...,xdimx−1,0, ...,xdimx−1,N−1, tf )

The dimension of the NLP state vector z is equal to dimz = (N − 1).dimu +N.dimx + 1.The cost function can be replaced by f(z) whereas all the constraints can be replaced byg1(z) ≤ 0 and g2(z) = 0. Finally, the expression the NLP problem becomes:

min f(z)st g1(z) ≤ 0

g2(z) = 0

This method can lead to very large non-linear problems (many variables and constraints). Theway to transform an optimal control problem into a non-linear problem with the collocationwill be illustrated later with a concrete example.

2.2.3.2 Direct single shooting

Let rst illustrate how the single shooting method works with the following sketch:

Figure 7: Sketch of the single shooting method

With a shooting method, only the control u is discretized. Let assume the control is piecewiseconstant. The objective remains to obtain a non-linear problem that might be solved by asolver. Let introduce the NLP state vector contains all coecients of U and tf . It may bedened as:

z = (u0,0, ...,u0,N−2, ...,udimu−1,0, ...,udimu−1,N−2, tf )

The dimension of the NLP state vector z is equal to dimz = (N − 1).dimu + 1. One cannotice that the dimension of z is much smaller than the state vector obtained with collocation.This fact makes the problem more simple to solve and reduces the computation time. Anintegration method like Euler or Runge-Kutta is still needed to discretize dynamics. Thefollowing equations are still true with Euler:

xi,j+1 − xi,j − h.fi(j,x0,j , ...,xdimx−1,j ,u0,j , ...,udimu−1,j) = 0,for i = 0...dimx − 1, for j = 0...N − 2

17

Page 23: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

However, these equations are not included in the nal NLP. Starting from the initial boundarycondition and using the last equation, the nal state of x composed of xN−1,0, ...,xN−1,dimx−1

may be expressed as a function of all the controls and the initial boundary. In that way, all theequations from the integration of dynamics are kept implicit. Nevertheless, the nal boundaryfrom the optimal control problem has still to be handled. The resulted constraints in the NLPproblem become:

ψi(xN−1,0, ...,xN−1,dimx−1) ≤ 0 inequality final condition

ψe(xN−1,0, ...,xN−1,dimx−1) = 0 equality final condition

Since the nal state only depends on the controls and the initial boundary, it becomes:

ψi(u,x0) ≤ 0 inequality final condition

ψe(u,x0) = 0 equality final condition

Both the path constraints and the cost function can be reformulated in the same way as itwas made in collocation. Finally, the expression the NLP is still the same:

min f(z)st g1(z) ≤ 0

g2(z) = 0

Compared to the collocation, the single shooting method gives smaller non-linear problems.All the transformation with a single shooting method will be illustrated with an example laterin this Master Thesis.

2.2.3.3 Direct multiple shooting

Let rst illustrate how the multiple shooting method works with the following sketch:

Figure 8: Sketch of the multiple shooting method

This method generelizes the single shooting, by adding other variables ε, which are guessesof the state vector x during the path and allow to do more than one shooting. Continuityconstraints are added for each shooting. It leads to a greater number of constraints but givesmore stability. Let nbshootings > 2 be the number of shootings. The NLP vector z is composed

18

Page 24: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

2.2 Optimal Control Theory 2 MODELLING AND OPTIMIZATION TECHNIQUES

of controls, guesses of the state vector ε and tf .

z =(u0,0, ...,u0,N−2, ...,udimu−1,0, ...,udimu−1,N−2,

ε0,0, ..., ε0,nbshootings−2, ..., εdimx−1,0, ..., εdimx−1,nbshootings−2, tf )

The expression of the NLP changes but can still be expressed as:

min f(z)st g1(z) ≤ 0

g2(z) = 0

Three dierent methods have been explained in this part. They all allow to tranform anoptimal control problem into a non-linear problem. Now, the objective is to solve the resultedNLP, which can be very dierent according the selected method and quite large in terms ofvariables and constraints. A powerful optimization solver is needed.

19

Page 25: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3 NUMERICAL OPTIMIZATION

3 Numerical optimization

To solve large non-linear problems, a suitable solver is mandatory. Indeed, low-thrust prob-lems might result to NLP with thousands of variables and constraints. First, dierent state-of-the-art solvers are presented. They might be written in dierent languages. Then, a selectionis performed based on dierent criteria and a test case in order to choose the most appropriatesolver to solve a low-thrust problem solved by a direct method.

3.1 State of the art

The objective of this part is to list the dierent solvers which might be able to solve a largenon-linear problem, as you can see in the table below.

Dierent parameters may be distinguished for a given solver like the language (modelinglanguage: AMPL, GAMS, LING/LINGO, MPL, AIMMS, APMonitor, Mathematica, AS-CEND.. or standard language: Fortran, C, C++, Java, Python, Matlab...), the algorithm(local, global) or the licence.

Solver Algorithms (local)Algorithms(global)

Language License Characteristics

AlgencanAugmentedLagrangian type

xFortran.Interfaceswith C/C++

GNUGeneralPublicLicense

Minimizing a smoothfunction with apotentially large numberof variables andbox-constraints

COBYLA

ConstrainedOptimization byLinearApproximations

x

Fortran.Interfaceswith Matlab,Python, C

GNUGeneralPublicLicense

Single precision only,minimizing a nonlinearfunction subject tononlinear inequalityconstraints only

ALGLIB

AugmentedLagrangian, AGS(AdaptiveGradientSampling)

x C, C++ALGLIBFree Editionwith GPL

Nonlinearlyequality/inequalityconstrained optimization

IpoptInterior pointmethod

xC++via aJava interface

EclipsePublicLicense

Good and ecient localoptimization technique

Joptimizer

Barrierinterior-point andPrimal-dualinterior-pointmethods

x JavaApacheLicense

Solve a convexminimization withequality and inequalityconstraints

NLoptNelder-Mead(NM), SQP

various simple(21 algos)

C, C++,Fortran,Matlab

free/open-source

Good toolbox thatprovides many usefullocal optimizationtechniques, but lessuseful global techniques

ArtelysKnitro

Two interior pointalgorithms, twoactive setalgorithms

xC, C++,Fortran, Java,or Python

ProprietaryNonlinear programmingproblems

Table 2: NLP Solvers (part 1/3)

20

Page 26: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.1 State of the art 3 NUMERICAL OPTIMIZATION

SNOPT

Single technique(sequentialquadraticprogramming)

x

Fortran, butinterfaceswith C, C++,Python andMATLAB

ProprietaryVery ecient SQPalgorithm

MOSEKInterior-pointoptimizer

x

Interfaceswith C,Javaand Pythonlanguages

ProprietaryConvex nonlinearoptimization problems

PAGMONelder-Mead(NM), SQP

Dierentialevolution (DE),Particle swarmoptimization(PSO), ASA,genericalgorithms(GA)

C++ Available

Good well-structuredtoolbox. Wellthought-out architecture.Includes manytechniques.

WORHPInterior PointMethod

x

Fortran and Cimplementa-tion. Can beused fromC/C++

ProprietaryContinuous large scalenonlinear optimization

MIDACO xDerivative-free,evolutionaryalgorithm

Java, Matlab,Python,C/C++, Rand Fortran

Limited

NLP, suitable forproblems with up tothousands of variablesand constraints

CONOPTGeneralizedReduced Gradient(GRG)

x Fortran

Available asa FortranSubroutinelibrary.

Large-Scale NonlinearOptimization (NLP)

MINOS

LinearlyConstrainedLagrangianMethod

x Fortran ProprietaryNo xed limit onproblem size

LancelotAugmentedLagrangianFunction

x FortranAcademicuse

Large-scale NonlinearOptimization

BARON xBranch-and-boundoptimization

matlab +Developer-orientedparserinterface

AcademicandcommercialBARONlicenses

Nonconvex optimizationproblems to globaloptimality

FilterSD

LinearComplementarityProblem (LCP)Solver orQuadraticProgramming(QP) Solver

x FortranEclipsePublicLicense 1.0

Smooth, twicedierentiable, nonlinearprograms.

Matlab SQP x Matlab Proprietary

Optimization functionfmincon whichimplements a SQPscheme

GSLNelder-Mead,various others

SA, MC C++ Available Scientic library

Table 3: NLP Solvers (part 2/3)

21

Page 27: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.2 Solver selection 3 NUMERICAL OPTIMIZATION

METSlib Single MethodSA, fewothers

C++Open-sourceGPL

Non-mature toolbox, fewand simple techniquesonly

OPT++ Various x C++PublicLicense

Provides various localoptimization methods

OptSolve++Various x C++ AvailableVarious interesting localtechniques

Tfmin

Shooting method(for the numericalsolution ofcontinuous 3Dminimum timeorbit transferaround the Earth)

x

Fortran andMatlabpackage (usethe librariesMinpack andAdifor)

OpenSource To solve the TPBVP

Table 4: NLP solvers (part 3/3)

3.2 Solver selection

3.2.1 Description of the method of selection

In the previous part, a table has showed all the solvers which can be used in applied mathe-matics. The method of selection is based on dierent points. First, it is quite convenient touse a solver, which has an open-source code. It allows to understand the code and make somechanges to better answer to a specic problem. Moreover, at Thales Services, both C++and Java are often used. That is why the priority is given to these languages. Then, thesolver should be able to handle very large non-linear problems with potentially thousands ofvariables and constraints. It should be able to face both equality and inequality constraints.

3.2.2 Choice of the solver

Two solvers have nally been selected: Ipopt and Nlopt. They are both open-source, codedin C++, able to face very large scale NLP with both equality and inequality constraints.

3.2.2.1 Nlopt

This solver is callable in C, C++, Fortran or Matlab. It includes dierent open-source algo-rithms (local or global) which often support problems with millions of variables and thousandsof constraints. Some algorithms do not need to know the gradients whereas others are notable to run if the user do not provide the gradients. However, some algorithms do not supportboth non-linear equality and inequality constraints.

Among all of the algorithms available in Nlopt, only Cobyla (local derivative-free algorithm)and SLSQP (local gradient-based algorithm) have the characteristics to handle a non-linearproblem provided by a low-thrust optimization. Cobyla is based on a constrained optimiza-tion by linear approximations. The main advantage of this algorithm is the possibility for theuser to not know the gradients. On the contrary, SLSQP is based on a sequential quadraticprogramming. It is possible to have a better precision but you always need to compute thegradients before running this algorithm.

3.2.2.2 Ipopt

Ipopt is an open-free software package coded in C++ for large-scale linear or non-linearproblems. Ipopt's algorithm is based on a interior point optimizer. It exists a Java interface

22

Page 28: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.2 Solver selection 3 NUMERICAL OPTIMIZATION

(Jipopt) which will be primordial in this report. Indeed, most of the libraries related to orbitalmaneuvers at Thales services are coded in Java. Jipopt allows to run Ipopt by providing aNLP in Java code. Since an interior point optimizer is used, gradients are always needed torun Ipopt. Another advantage of this solver is a great number of available options such asthe tolerance on the dual infeasibility or on the constraint violation, the possibility to scalethe problem etc.

3.2.3 NLP Test case

To validate the choice made in the previous part, dierent NLP problems have been testedwith both solvers Nlopt and Ipopt. In this part, a rst test case is solved with Nlopt and asecond one with Ipopt.

3.2.3.1 Resolution with Nlopt

A very simple NLP is presented below:

min 100.(x1 − x20)2 + (1− x0)2

st − 1.5 = x1

This problem has only two variables and a lower boundary condition on one variable. Oneavantage of this test is that the analytical solution is known and can easily be compared withthe numerical solution given by the solver. With an initial guess for x equal to xinitial =(−2, 1), the analytical solution is an objective function equal to 0 and an optimal point x∗equal to (1, 1).

After computation with Nlopt (SLSQP algorithm with a tolerance equal to 10−5), the follow-ing results are found:

f(x) = 0.00173396x∗ = (1.03482, 1.06857)

These results are close enough to validate the choice of Nlopt for a small non-linear problem.The C++ code is available in the appendix A. As you can see in the appendix, the gradientsare provided to help the SLSQP algorithm, which is a gradient-based algorithm.

Note that this NLP have similarly been solved with Ipopt during the internhip and the sameresults were obtained.

3.2.3.1 Resolution with Ipopt

A much more sophisticated problem is presented below:

min x1.x4(x1 + x2 + x3) + x3

st x1.x2.x3.x4 ≥ 25

x21 + x2

2 + x23 + x2

4 = 401 ≤ x1, ,x2, ,x3, ,x4 ≤ 5

This problem has four variables, two constraints and boundary conditions for each variable.One avantage of this test is that the analytical solution is known and can easily be com-pared with the numerical solution given by the solver. With an initial guess for x equalto xinitial = (1, 5, 5, 1), the minimized objective function is 0 and the optimal point x∗ is

23

Page 29: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

equal to (1.000, 4.7430, 3.8211, 1.3794). After computation with Ipopt, the following resultsare found:

f(x) = 17.014x∗ = (1, 4.743, 3.82115, 1.37941)

These results are close enough to validate the choice of Ipopt for a more complex non-linearproblem.

Note that this NLP have similarly been solved with Nlopt during the internhip and thesame results were obtained.

3.3 Validation of the choice

In the previous part, both Nlopt and Ipopt eciencies have been showed on NLP test cases.Nevertheless, in this Master Thesis, the nal objective is to handle low-thrust orbital maneu-vers. Such a maneuver can be expressed thanks to an optimal control problem. In this part,an optimal control problem has been chosen: this is the Brachistochrone problem.

3.3.1 The Brachistochrone problem

The Brachistochrone problems is a famous optimal control problem which can be written asbelow:

min tfst x(t) = v(t).sin(u(t))

y(t) = v(t).cos(u(t))v(t) = g0.cos(u(t))x(0) = 0y(0) = 0v(0) = 0x(tf ) = 2y(tf ) = 2v(tf ) free

As you can see above, the Brachistochrone problem is a time-optimal problem with threevariables: two variables for the position (x, y) and one variable for the speed v. The threerst constraints correspond to dynamics. Then, there are both initial and nal conditions.The aim is to nd which control u minimizes the nal time with respect to all the constraints.

This optimal control problem is interesting for this report because this is a trajectory op-timization problem. In this part, the Brachistochrone problem is transformed in a non-linearproblem with a direct method and nally solved with both Nlopt and Ipopt solvers. Thatillustrates the fact that it is possible to handle a physical trajectory optimization problemusing a direct method and a suitable optimization solver. Once again, the solution of thisoptimal control problem is known and can be found in the scientic litterature. A comparisonwith the theoretical results is also made in this part. Even if the Brachistochrone problemremains easier to solve than a low-thrust problem, it a signicant rst step.

24

Page 30: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

3.3.2 Transformation into NLP problem

3.3.1.1 Transformation with collocation

In this part, the Brachistochrone problem is transformed into a non-linear problem witha collocation method. The following parameters are rst introduced:

• N = number of points

• Step length: h = tfN−1 .

Dierent methods can be selected to integrate dynamics such as Euler, Runge-Kutte, Heun-Method... All of them lead to a NLP. To illustrate as simply as possible the transformation,Euler's method has been chosen in this part. Euler's method implies the following equations:

x((k + 1).h) = x(k.h) +tf

N − 1.v(k.h).sin(u(k.h)), k = 0..N − 2

y((k + 1).h) = y(k.h) +tf

N − 1.v(k.h).cos(u(k.h)), k = 0..N − 2

v((k + 1).h) = v(k.h) +tf

N − 1.g0.cos(u(k.h)), k = 0..N − 2

The three continuous constraints from dynamics have just been converted into 3.(N − 1)discrete constraints. Let uvect = [u(0), ..., u(N − 2)], xvect = [x(0), ..., x(N − 1)], yvect =[y(0), ..., y(N − 1)], vvect = [v(0), ..., v(N − 1)].

Our new problem becomes:

min tfst xvect(0) = 0

xvect(i+ 1)− xvect(i)−tf

N − 1.vvect(i).sin(uvect(i)) = 0, i = 0...N − 2

yvect(0) = 0

yvect(i+ 1)− yvect(i)−tf

N − 1.vvect(i).cos(uvect(i)) = 0, i = 0...N − 2

vvect(0) = 0

vvect(i+ 1)− vvect(i)−tf

N − 1.g0.cos(uvect(i)) = 0, i = 0...N − 2

xvect(N − 1)− 2 = 0yvect(N − 1)− 2 = 0

Let introduce the NLP variable z:

z = [uvect,xvect,yvect,vvect, tf ]

z contains all the variables from the initial problem (x, y, v) at each step, which gives anumber of variables equal to: 3.N +N − 1 + 1 = 4.N for the NLP problem. The number ofconstraints can be computed as well: 3.(N − 1) + 3 + 2 = 3.N + 2. Finally, the NLP can beexpressed as:

25

Page 31: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

min z(4N − 1)st z(N − 1) = 0

z(N + i)− z(N − 1 + i)− z(4N − 1)N − 1

.z(3N − 1 + i).sin(z(i)) = 0, i = 0..N − 2

z(2N − 1) = 0

z(2N + i)− z(2N − 1 + i)− z(4N − 1)N − 1

.z(3N − 1 + i).cos(z(i)) = 0, i = 0..N − 2

z(3N − 1) = 0

z(3N + i)− z(3N − 1 + i)− z(4N − 1)N − 1

.g0.cos(z(i)) = 0, i = 0..N − 2

z(2N − 2)− 2 = 0z(3N − 2)− 2 = 0

which corresponds to a more generelized form:

min f(z)st g(z) = 0

3.3.1.2 Transformation with single shooting

In this part, only u is discretized such as u becomes piecewise constant. The same parametersN and the step length are introduced and dynamics give the same 3.(N − 1) equations as theprevious part (still with Euler):

x(i+ 1)− x(i)−tf

N − 1.v(i).sin(u(i)) = 0, i = 0..N − 2

y(i+ 1)− y(i)−tf

N − 1.v(i).cos(u(i)) = 0, i = 0..N − 2

v(i+ 1)− v(i)−tf

N − 1.g0.cos(u(i)) = 0, i = 0..N − 2

Now, a loop can be used in order to obtain x(N-1), y(N-1) and v(N-1) as functions of all thecontrols u(0), ... , u(N-2). Indeed, from the initial conditions x(0) = 0, y(0) = 0, v(0) = 0,the rst iteration implies:

x(1) = 0y(1) = 0

v(1) =tf

N − 1.g0.cos(u(0))

The last iteration allows us to express x(N-1), y(N-1) and v(N-1) as functions of all thecontrols u(0), ... , u(N-2) and the nal time tf . The analytic form of these functions is notgiven because this is a quite complex equation which does not bring more information. Letx(N − 1) = g1(u(0), ..., u(N − 2)) and y(N − 1) = g2(u(0), ..., u(N − 2)). x(N-1) and y(N-1)are constrained by the nal condition and must be qual to 2. Consequently, our new problembecomes:

min tfst g1(u(0), ..., u(N − 2), tf ) = 2g2(u(0), ..., u(N − 2), tf ) = 2

26

Page 32: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

The NLP state vector z can now be introduced:

z = (u(0), ..., u(N − 2), tf )

Finally, the following NLP is obtained:

min z(N − 1)st g1(z)− 2 = 0g2(z)− 2 = 0

Compared to the NLP from the collocation, this problem has only two constraints and Nvariables.

3.3.1.3 Transformation with multiple shooting

Here, discontinuous state trajectories are allowed at intermediate NLP iterates. Extra de-cision εk that play the role of intermediary conditions for the state variables x(t), y(t) andv(t). In this part, to simplify the equations, the tranformation is made with only three shoot-ings. That means that there are only two intermediary points ε1 and ε2. It is convenient tochoose a total number of points which is a multiple of the number of shootings. Let us remindthat Euler's method is still used to propagate the dierential equations.

First shooting (from the boundary condition):

x(0) = 0y(0) = 0v(0) = 0

x(i+ 1) = x(i) +tf

N − 1.v(i).sin(u(i)), i = 0...N/3− 1

y(i+ 1) = y(i) +tf

N − 1.v(i).cos(u(i)), i = 0...N/3− 1

v(i+ 1) = v(i) +tf

N − 1.g0.cos(u(i)), i = 0...N/3− 1

Second shooting (from the rst intermediary point ε1):

x(N/3) = ε11

y(N/3) = ε12

v(N/3) = ε13

x(i+ 1) = x(i) +tf

N − 1.v(i).sin(u(i)), i = N/3...2N/3− 1

y(i+ 1) = y(i) +tf

N − 1.v(i).cos(u(i)), i = N/3...2N/3− 1

v(i+ 1) = v(i) +tf

N − 1.g0.cos(u(i)), i = N/3...2N/3− 1

27

Page 33: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

Third shooting (from the second intermediary point ε2):

x(2N/3) = ε21

y(2N/3) = ε22

v(2N/3) = ε23

x(i+ 1) = x(i) +tf

N − 1.v(i).sin(u(i)), i = 2N/3...N − 2

y(i+ 1) = y(i) +tf

N − 1.v(i).cos(u(i)), i = 2N/3...N − 2

v(i+ 1) = v(i) +tf

N − 1.g0.cos(u(i)), i = 2N/3...N − 2

x(N − 1) = 2y(N − 1) = 2

Similarly to the single shooting method, with a loop, x(N − 1), y(N − 1), x(N/3), y(N/3),v(N/3), x(2N/3), y(2N/3), v(2N/3) can be expressed as functions of u(0), ..., u(N − 2) andtf , which are respectively noted g1, g2, g3, g4, g5, g6, g7, g8. Our problem becomes:

min tfst x(N/3) = g1(u(0), ..., u(N/3− 1), tf ) = ε11

y(N/3) = g2(u(0), ..., u(N/3− 1), tf ) = ε12

v(N/3) = g3(u(0), ..., u(N/3− 1), tf ) = ε13

x(2N/3) = g4(u(N/3), ..., u(2N/3− 1), tf ) = ε21

y(2N/3) = g5(u(N/3), ..., u(2N/3− 1), tf ) = ε22

v(2N/3) = g6(u(N/3), ..., u(2N/3− 1), tf ) = ε23

x(N − 1) = g7(u(2N/3), ..., u(N − 2), tf ) = 2y(N − 1) = g7(u(2N/3), ..., u(N − 2), tf ) = 2

Let introduce z = (u(0), ..., u(N − 2), ε11 , ε12 , ε

13 , ε

21 , ε

22 , ε

23 , tf ). The dimension of z is equal to

N + 6 (ie N + 6 variables in the NLP). The number of constraints is equal to 8. Finally, theNLP problem can be written as:

min z(N + 5)st g1(z)− 2 = 0

g2(z)− 2 = 0

g3(z)− ε11 = 0

g4(z)− ε12 = 0

g5(z)− ε13 = 0

g6(z)− ε21 = 0

g7(z)− ε22 = 0

g8(z)− ε23 = 0

This problem was obtained with only three shootings. Let nbshootings be the number ofshootings. More generally, if the Brachistochrone problem is transformed into a NLP witha multiple shooting, the number of variables is equal to N + 3.(nbshootings − 1) whereas thenumber of constraints is 2 + 3.(nbshootings − 1).

28

Page 34: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

3.3.3 Final resolution

In the last part, the Brachistochrone problem has been transformed into a NLP problem, us-ing three dierent methods (collocation, single shooting, multiple shooting). In this section,both resolutions with Nlopt and Ipopt are detailed.

3.3.3.1 Resolution with Nlopt

Here, the Brachistochrone problem is solved with Nlopt thanks to a C++ code, which im-plements all the functions and equations from the previous part and a nite dierence tocompute the gradients. The conditions of the resolution are the following ones:

1. Collocation used to transform the optimal control problem

• Number of points N = 10

• Euler's method to integrate dynamics of the Brachistochrone problem

• Time-step for Euler's integration equal totfN−1 .

2. SLSQP algorithm to solve the NLP problem

• Tolerance of the solver set to 10−4.

• Initial guess to start the computation:z = (u(0), ..., u(N−2), x(0), ..., x(N−1), y(0), ..., y(N−1), v(0), ..., v(N−1), tf ) =(0, ..., 0, 0.8).

• Gradients provided with nite dierence (central dierence)

∂z0f(z0, ...,zN−1) =

f(z0 + h, z1..., zN−1)− f(z0 − h,z1, ...,zN−1)2.h

The optimal objective function (nal time) is found equal to 0.860849. The following gureillustate the optimal solution (control u) and the evolution of the main parameters (x, y, v)of the Brachistochrone problem:

Figure 9: Brachistochrone solution with Nlopt (Collocation)

29

Page 35: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

These results are very satisfactory. The nal time (tf = 0.86) is slightly above the theoreticaltime 0.82. The control u is linear. Both evolutions of the position and the speed are veryclose to the expected ones from the scientic litterature. More precision can be achieved byincreasing the number of points N.

3.3.3.2 Resolution with Ipopt

Here, the Brachistochrone problem is solved with Ipopt thanks to a C++ code, which im-plements all the functions and equations from the previous part and a nite dierence tocompute the gradients. The conditions of the resolution are the following ones:

1. Single shooting used to tranform the optimal control problem

• Number of points N = 10

• Euler's method to integrate the dynamics of the Brachistochrone problem

• Time-step for Euler's integration equal totfN−1 .

2. Interior point optimizer to solve the nlp problem

• Tolerance of the solver set to 10−4.

• Initial guess to start the computation: z = (u(0), ..., u(N − 2), tf ) = (0, ..., 0, 0.8).

• Gradients provided with nite dierence (backward dierence)

∂z0f(z0, ...,zN−1) =

f(z0, z1, ...,zN−1)− f(z0 − h,z1, ...,zN−1)h

(1)

The following gure illustates the optimal solution of the Brachistochrone problem with theprevious conditions:

Figure 10: Brachistochrone solution with Ipopt (Single shooting)

A nal time of 0.8249 is found and the control u is still almost linear. All the curves are verysimilar to the ones in the last paragraph, even if the direct method (single shooting instead

30

Page 36: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

of collocation), the nite dierence (backward dierence instead of central dierence) andthe solver (Ipopt instead of Nlopt) are all dierent. The results are very close to theory (cf.appendix B).

The appendix C shows the output of Ipopt with the characteristics of the non linear problem(number of variables, constraints...) and the optimization settings (iterations, dual infeasabil-ity, constraint violation...) and all the results (optimal solution, optimal objective value...).

Finally, satisfying results can be computed with the multiple shooting method. For example,the following conditions are selected:

1. Multiple shooting used to tranform the optimal control problem

• Number of points N = 10

• Number of shootings = 2 (only one intermediary point ε and so one continuityconstraint)

• Runge Kutta method to integrate the dynamics of the Brachistochrone problem

• Time-step for Euler's integration equal totfN−1 .

2. Interior point optimizer to solve the NLP problem

• Tolerance of the solver set to 10−4.

• Initial guess to start the computation: z = (u(0), ..., u(N − 2), ε0, ε1, ε2, tf ) =(0, ..., 0, 0.8).• Gradients provided with nite dierence (backward dierence)

∂z0f(z0, ...,zN−1) =

f(z0, z1, ...,zN−1)− f(z0 − h,z1, ...,zN−1)h

(2)

As you can see below, similar results (nal time now equal to 0.8250) are observed thanks toa multiple shooting method. On this example, both single and multiple shooting gave almostthe same results with the same eciency.

Figure 11: Brachistochrone solution with Ipopt (Multiple shooting)

31

Page 37: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

3.3 Validation of the choice 3 NUMERICAL OPTIMIZATION

The following part summarizes the eciency of each solver, each method and makes a con-clusion about what could be the best choices to make in order to face low-thrust orbitalmaneuvers later.

3.3.4 Conclusion on the methods and the solvers

According to the direct method, very dierent NLP can be obtained from the Brachistochroneproblem. The collocation method gives much more larger problems with both more variablesand constraints. Consequently, it can be time-consuming. Low-thrust transfers are quite long(about 100 days) and many variables are needed to be able to correct the trajectory oftenenough. Moreover, a shooting method allows to integrate dynamics with a smaller time-stepand to achieve a better accuracy. The time-step to integrate the dierential equations canbe much smaller than the space-step which denes the number of points (ie the number ofvariables). On the contrary, for the collocation, the time-step and the space-step (ie numberof points) should be the same. That is why a shooting method should be preferred. Between asingle and a multiple shooting, a single shooting leads to a less complex problem but unstablesystems are dicult to treat. The following table detailes the main dierences between thethree direct methods applied on the Brachistochrone problem.

NLP characteristics /Direct method

Collocation Single shooting Multiple shooting

Number of variables 4N N N + 3(nbshootings − 1)Number of constraints 3N + 2 2 2 + 3(nbshootings − 1)

Table 5: NLP characteristics according to the selected direct method for the Brachistochroneproblem

In the previous section, the collocation method has been chosen to illustrate the resolutionwith Nlopt whereas the shooting methods have been selected to show the resolution withIpopt. In order not to make the report too long and repetitive, not all the results havebeen revealed for each method and each solver. Nevertheless, between both solvers, on thisproblem, for a given method, almost the same results are achieved. More options are oeredby Ipopt and a Java interface is available. Thus, the priority will be given to Ipopt in therest of this report.

A transformation of the Brachistochrone problem has been showed for three directmethods. For each solver, one C++ code was needed to implement all the equations for onenon-linear problem. It means that each time you want to solve one optimal control problem,you have to transform yourself the control problem, obtain a corresponding non-linearproblem, code the NLP in C++ or Java and nally call a solver. It lacks exibility and isvery time-consuming if many optimal control problems have to be solved. Thus, the objectiveof the next part will be to develop a module to automatically transform any optimal controlproblem with the desired direct method into a NLP, which can be directly solved with asolver, preferably Ipopt.

32

Page 38: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

4 Development of a module: to transform any optimal controlproblem into a NLP

A module coded in Java is developed in this part. If the user gives an optimal control problem,this module is able to obtain a non-linear problem, whose a general formulation could be:

min f(z)st g1(z) ≤ 0

g2(z) = 0

First, an analyse of needs is performed. Then, both conception and implementation areexplained. Lastly, a validation is proceeded with high-thrust orbital maneuvers.

4.1 Needs and requirements

The input of this module is an optimal control problem, which can have any form (cf 2.2.1for the general formulation). The user should be able to choose any optimal control problem,choose a way to integrate both dynamics and the objective function, select a direct methodand a nite dierence method to provide gradients.

4.1.1 Cost function transformation

As you can see in the general formulation of an optimal control problem, the objective function(cost function) might contain an integral:∫ tf

t0

L(x(t),u(t)) dt + φ(tf ,xf )

The module should handle this integral and oer dierent ways of integration. Moreover, thecost function depends on x(t), u(t), tf and xf . According to the direct method, the moduleshould be able to transform the cost function in a new objective function, which only dependson z (the state vector of the non-linear problem).

4.1.2 Dynamics tranformation

Whatever the direct methods used, dynamics has always to be integrated. This module shouldoer dierent possibilities to discretize dynamics. Four dierent methods are selected:

• Eulerxi+1 = xi + h.f(ti,xi,ui)

• Runge-Kutta 4

xi+1 = xi +h

6(k1 + 2k2 + 2k3 + k4) (3)

where k1 = f(ti,xi,ui) (4)

k2 = f(ti +h

2,xi +

h

2.k1,ui) (5)

k3 = f(ti +h

2,xi +

h

2.k2,ui) (6)

k4 = f(ti + h,xi + h.k3,ui) (7)

• Heun method

xi+1 = xi +h

2(k1 + k2) (8)

where k1 = f(ti,xi,ui) (9)

k2 = f(ti + h,xi + h.k1,ui) (10)

33

Page 39: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.1 Needs and requirements

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

• Modied Euler

xi+1 = xi + h.k2 (11)

where k1 = f(ti,xi,ui) (12)

k2 = f(ti +h

2,xi +

h

2.k1,ui) (13)

(14)

The integration is not performed at the same level if the user has chosen a shooting methodor a collocation. Indeed, for a collocation, the dierential equations are directly convertedinto constraints whereas they remain implicit for shooting methods. Dynamics transformationdepends on both the integration strategy and the direct method.

4.1.3 Path contraint transformation

The path constraints (equality and inequality) have to be discretized as well and convertedinto new equations that will be included in the nal NLP. Similarly to the cost function anddynamics, they have to be expressed as a function of the NLP state vector z.

4.1.4 Boundary condition tranformation

Similarly to the three previous sections, the boundaries conditions have to be taken intoaccount in the nal non linear problem. They must only depend on the NLP state vector z,which is entirely dierent according to the direct method used.

4.1.5 Available direct methods

Three methods are available for the user:

• Collocation

• Single shooting

• Multiple shooting

According to the method, the transformation of each element of the optimal control problemis entirely dierent: not the same state vector z, not the same cost function f(z), not thesame constraints g1(z) and g2(z).

Furthermore, the user has the possibility to choose the space-step (ie the number of con-trols N and consequently the number of variables). This point is quite important because thecomputation time and the accuracy depend on the number of controls.

Lastly, the use should be able to choose any time-step to integrate dynamics in particularfor a shooting method. The time-step might be much lower than the space-step to reach abetter accuracy to integrate dynamics but it will require a longer computation time.

4.1.6 Provide gradients with nite dierence

The module has to provide gradients, especially with Ipopt which is a gradient-needed solver.Two nite dierence methods will be implemented:

• Backward dierence

∂z0f(z0, ...,zN−1) =

f(z0, z1, ...,zN−1)− f(z0 − h, z1, ...,zN−1)h

(15)

34

Page 40: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.2 Conception

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

• Central dierence

∂z0f(z0, ...,zN−1) =

f(z0 + h, z1, ...,zN−1)− f(z0 − h, z1, ...,zN−1)2.h

4.1.7 Handle dierent types of problem

The module should be able to handle dierent types of problems such as time-optimal prob-lems or mass-optimal problems. Indeed, for low-thrust transfers, both the transfer durationand the fuel consumption are likely to be minimized. According to the type of problem, theresulted NLP might be completely dierent. For example, for a mass-optimal problem, the -nal time is known in advance and does not appear as a variable whereas it exactly correspondsto the objective function for a time-optimal problem. The user will have the possibility toselect the type of problem that he wants to solve.

4.2 Conception

This paragraph explains the conception phase of the module. The software architecture canbe divided into ve packages:

• "optimal control problem"

• "integration cost function"

• "discretization dynamics"

• "direct method"

• "non-linear problem"

These ve packages relate one initial optimal control problem to the solver Jipopt (Javainterface of Ipopt). The following gure illustrates the software architecture with the dierentpackages and all their classes and interfaces:

Figure 12: General view of the software architecture: Package diagram.

As you can see above, two packages "brachistochrone problem" and "jipopt" are not takeninto account in our module, which is only composed of ve modules. Indeed, the Brachis-tochrone problem has been chosen as an example but it could have been another optimal

35

Page 41: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.2 Conception

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

control problem. "Jipopt package" is a Java interface between our module and the solverIpopt, which normally runs in C++. The solver gets all the needed information of the NLPfrom the package "non-linear problem". Furthermore, it allows to set the desired options ofthe solver such as the tolerance, the maximal number of iterations, the dual infeasibilty etc.

The user has just to provide a problem with the cost function, dynamics, the box constraints,the path constraints and the boundaries. Dynamics can be discretized with four dierent waysthanks to the package "discretization dynamics". The package "integration cost function", asits name says, is composed of methods to integrate the objective function, especially the costrate. More precisely, two dierent ways, based on a trapeze method, have been implemented.The package "optimal control problem" catches any control problem, calls an integrationmethod for the cost function and a discretization method for dynamics. Then, it conveys itsinformation to the "direct method" package, which applies one selected direct method anddiscretizes both objective function and constraints from the optimal control problem. Now,the package "non-linear problem", which allows to choose a time-step and a space-step (ienumber of controls), can obtain from the "direct method" package f(z), g1(z) and g2(z). Itis able to compute the gradients 5f , 5g1 and 5g2 and convey all the results to "Jipopt".

A class diagram with all the classes and interfaces can be observed with the next gure:

36

Page 42: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.3 Implementation

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Figure 13: General view of the software architecture: Class diagram.

4.3 Implementation

This phase follows the conception phase and gives the opportunity to use dierent computertools. Eclipse is the selected Java environment for the implementation, Subversion (SVN) isused to manage dierent version of the codes while Maven is used to compile and manage thedependencies all the packages included in the module.

It would be too long to explain how each class is coded because some classes contain manyvariables and methods. Consequently, only one package ("direct method") is detailed. Youcan observe how this package looks like thank to the next gure:

37

Page 43: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.4 Unit Tests

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Figure 14: The "direct method" package.

Without going into detail, the abstract class "AbstractMethod" gathers all informationshared by each method such as the time-step, the space-step or the initial optimal controlproblem. However, this class has some abstract methods, which depend on a specic di-rect method. These methods are implemented in "MultipleShooting", "SingleShooting" and"Collocation" which extend "AbstractMethod". For example, a method related to a specicdirect method is "ComputeStateVector" which computes the state vector of the NLP. As itwas explained in previous sections, the resulted NLP state vector can be completely dierentaccording the selected direct method.

4.4 Unit Tests

In parallel to the implementation of the module, the design of some tests has been done withthe Junit framework. The unit tests check if all methods and classes give expected results ontest cases, whose an analytical solution is known. To be concrete, the four integration methods(Euler, Euler-modied, Rune-Kutta and Heun-method) give very satisfactory results on thefollowing dynamics:

x0 = 2.x0

x1 = x1

Then, two trapeze integration methods have been checked on this cost function:∫ tf

t0

L(x(t),u(t)) dt + φ(tf ,xf ) = tf

Lastly, collocation and both single and multiple shooting have been validated with this verysimple optimal control problem:

min tfst x(t) = u(t)

x(0) = 0x(tf ) ≤ 12.u+ 1 ≤ 00 ≤ u ≤ 10 ≤ x ≤ 10

38

Page 44: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

4.5 Validation on a high-thrust transfer

Validation is proceeded thanks to a test case, which has to be close to a low-thrust transferoptimization. Some problems related to orbital maneuvers for a satellite or a spacecraft aregiven by the appendix D. More precisely, the selected test case to validate the module is atime-optimal problem for a simplied high-thrust transfer in the near-Earth space. Dynamicsis the same as low-thrust transfers but this test case is easier to solve because the duration ofthe orbital maneuver is shorter. Thus, less controls (ie less variables) are needed to correctthe trajectory of the spacecraft.

4.5.1 A high-thrust transfer

A transfer, from an initial orbit to a nal orbit (raising orbit maneuver) around the Earth,has been chosen. Both orbits are circular and included in the equatorial plane. A two-bodyproblem (Earth-satellite) is considered here. Dynamics of the transfer can be expressed as:

min tfst r = vr

θ =vtr

vr =v2t

r− µ

r2+ ur

vt = −vr.vtr

+ ut

where r corresponds to the radius, θ the polar angle, vr the radial speed, vt the tangential

speed, u = Tm = (ur, ut) the control parameter with ||u||max = ||T||max

m . Let ||T||max = 100Nand m = 1000kg. It gives ||u||max = 0.1.

This problem can lead to numerical diculties because all the variables do not have thesame order of magnitude. For example, ur is lower than 0.1 whereas r is higher than 6378.It will bring some problems for the computation of the gradients as well. Moreover, the nu-merical solver (Ipopt) will favour some directions instead of others. Let scale the problem toavoid numerical complexities (canonic scaling):

r =r

Rur =

urUr

(16)

θ =θ

Aut =

utUt

(17)

vr =vrVr

t =t

∆T(18)

vt =vtVt

(19)

where Vr = Vt = R∆T = µ.∆T

R2 = ∆T.Ut = ∆T.Ur, A = 1, Ur = Ut = µR2 , ∆T =

√R3

µ . Let R

be equal to the radius of the Earth which is 6378 km.

Dynamics becomes:

r = vr

θ =vtr

vr =v2t

r− 1r2 + ur

vt = −vr.vtr

+ ut

39

Page 45: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Now, boundary conditions are needed. They are given by the following table which summarizesboth initial and nal orbits characteristics (both orbits are circular):

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit R 0 0 0 0 0

Final orbit 4R 0 0 0 0 free

Table 6: Orbits characteristics

Thus, the time-optimal problem can be expressed as:

min tfst r = vr

θ =vtr

vr =v2t

r− 1r2 + ur

vt = −vr.vtr

+ ut

(r, θ, vr, vt)(0) = (1, 0, 0, 1)(r, θ, vr, vt)(tf ) = (4, free, 0, 0.5)

It can be solved with a specic direct method and Ipopt.

4.5.2 Collocation method

The collocation method is not really convenient to solve a high-thrust transfer optimization.Indeed, the state vector in the resulted non-linear problem contains much more variablesthan with a shooting method (cf section 3.3.4). Consequently, the optimization is very time-consuming. Moreover, since both position and speed at any time are included in the statevector, you also have to give an initial guess for them to start running the solver. On thecontrary, for a shooting method, since the state vector only includes the control and the naltime, you do not have to provide speed and position estimations during the path. For thesereasons, the previous high-thrust problem is not solved with the collocation method in thisMaster Thesis. Nevertheless, it will be solved with both single and multiple shooting methods.

4.5.3 Direct single shooting

In this part, the minimum-time trajectory is solved using single shooting. More precisely,the dierential equations are integrated with a time-step equal to

tf3000 . Let N be equal to 30

(space-step equal totf30). It means there are 59 variables (29 for the radial thrust and 29 for

the tangential thrust during the path and one corresponding to the nal time). The controlis still considered piecewise constant. The initial guess is completely random for the controlsand about ten hours for the nal time.

The found optimal cost function, which corresponds to the nal time, is 47.99. It was ob-tained after a running time of about one minute. The time scaling factor was dened as

∆T =√

R3

µ ' 807.39s. It leads to a nal time equal to 10.76 hours (38747 s).

The two following gures give the optimal solution u∗ = (ur, ut). ut remains at 0.01 foralmost all the transfer whereas ut switches between -0.01 and 0.01.

40

Page 46: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Figure 15: Optimal radial thrust for the time-optimal problem

Figure 16: Optimal tangential thrust for the time-optimal problem

It is also interesting to observe the evolution of the radius, the polar angle and the speed tocheck if the trajectory is physically feasible.

41

Page 47: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Figure 17: Evolution of the main parameters

Lastly, the transfer trajectory can be showed below:

Figure 18: Transfer trajectory

As you can see, this trajectory seems to be very meaningful from a physical point of view.The spacecraft starts from the initial orbit with a polar angle equal to zero and makes almostfour rounds and 38747 seconds to reach its nal orbit. The trajectory of the satellite can becompared thanks to dierent scientic papers. More precisely, in the appendix E, you cannd the results from the paper "Low-Thust, High-Accuracy Trajectory Optimization" by Rossand Michael. In this report, the resulted trajectory with a single shooting method is almostthe same as in this scientic paper (same starting point, same nal point, same number ofrounds...). In the paper written by Ross and Michael, the nal time is also very close and isequal to 38893 seconds.

42

Page 48: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

4.5.4 Direct multiple shooting

This high-thrust transfer problem is solved in this part with exactly the same conditions(time-step equal to

tf3000 and space-step equal to

tf30) but with a multiple shooting method

(two shootings ie two branches). The computation time is longer because the number ofvariables has been increased but the algorithm is still able to converge to a global solution.The found optimal cost function is still the same and corresponds to a nal time equal to10.76 hours (38747 s). It was obtained after a running time of about two minutes. As youcan see thanks to the next gures, all the results are very simular.

Figure 19: Optimal radial thrust of the time-optimal problem

Figure 20: Optimal tangential thrust of the time-optimal problem

43

Page 49: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

4.5 Validation on a high-thrust transfer

4 DEVELOPMENT OF A MODULE: TO TRANSFORM ANY OPTIMAL CONTROL

PROBLEM INTO A NLP

Figure 21: Evolution of the main parameters

Figure 22: Transfer trajectory

4.5.5 Comparison between the three methods

A conclusion can be made about the performance of each direct method to optimize a high-thrust transfer. First, the collocation requirements are not really convenient because thismethod increases the number of variables of the resulted NLP and add stress to the opti-mization solver due to the new constraints. Another disavantage if the necessity to providean initial guess for the controls, the nal time, the speed and the position since they are allincluded in the NLP state vector. Nevertheless, it has been shown with a comparison ona problem found in the scientic literature that both single and multiple shooting methodsare suitable. The single shooting method is faster to run because there are less variables.However, the multiple shooting method can treat unstable systems in a better way thanks tothe intermediary values of the state vector which give more stability to the algorithm.

44

Page 50: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

5 Validation and results for low-thrust transfers

In this part, the aim is to use our module to optimize low-thrust orbital maneuvers, whichis the nal objective of this internship. In the previous section, a time-optimal problem hasbeen solved for a specic high-thrust transfer (approximately 100 N). It was in the case of twocircular orbits in the equatorial plane. In this section, low-thrust transfers are still optimizedfor orbit raising maneuvers but with any kind of orbits.

5.1 Simplied Medium-Thrust Transfer problem

5.1.1 Formulation

First, the transfer problem from the previous section is going to be solved but this time witha medium-thrust propulsion. Dynamics is still the same:

min tfst r = vr

θ =vtr

vr =v2t

r− µ

r2+ ur

vt = −vr.vtr

+ ut

where r corresponds to the radius, θ the polar angle, vr the radial speed, vt the tangentialspeed, u = T

m the control parameter with ||u||max = ||T ||max

m . Let ||T ||max = 20N andm = 1000kg. It gives ||u||max = 0.02.

The scaling has to be selected with caution because the previous scaling (canonic scaling)gives too low values for the controls in comparison with the other variables. For example, uris lower than 0.02 whereas r is always higher than 6378. A more balanced scaling has to bechosen. The designer units used to solve a lower thrust problem in this part are:

r =r

Rur =

urUr

(20)

θ =θ

Aut =

utUt

(21)

vr =vrVr

t =t

∆T(22)

vt =vtVt

(23)

where Vr = 0.01õ/r0, Vt = 0.1

√µ/r0, A = 10, Ur = Ut = 0.001 µ

R2 , ∆T =√

R3

µ . Let R be

equal to the radius of the Earth which is 6378 km.

Dynamics becomes:

r =Vr.∆TR

vr

θ =∆T.VtAR

vtr

vr =∆T.V 2

t

VrR

v2t

r− µ.∆TVrR2

1r2 +

∆T.UrVr

ur

vt = −Vr.∆TR

vr.vtr

+Ut.∆TVt

ut

45

Page 51: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.1 Simplied Medium-Thrust Transfer problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Boundary conditions are the still the same as well and are given by the following table:

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit R 0 0 0 0 0

Final orbit 4R 0 0 0 0 free

Table 7: Orbits characteristics

Finally, the time-optimal problem can be expressed as:

min tf

r =Vr.∆TR

vr

θ =∆T.VtAR

vtr

vr =∆T.V 2

t

VrR

v2t

r− µ.∆TVrR2

1r2 +

∆T.UrVr

ur

vt = −Vr.∆TR

vr.vtr

+Ut.∆TVt

ut

(r, θ, vr, vt)(0) = (1, 0, 0, 10)(r, θ, vr, vt)(tf ) = (4, free, 0, 5)

5.1.2 Resolution with single shooting

In this part, the minimum-time trajectory is optimized using single shooting (it could havebeen solved with multiple shooting in the same way). More precisely, the optimization is

done with a time-step equal totf

8000 and a space-step equal totf80 . It means there are 159

variables (79 for the radial thrust and 79 for the tangential thrust during the path and onecorresponding to the nal time). All the controls are equal to zero in the initial guess vectorwhereas the nal time is about fty hours.

The found optimal cost function is 245.0879. It leads to a nal time equal to 54.96 hours(2.29 days). The running time is about three minutes.

The two following gures give the optimal solution u∗ = (ur, ut). ut remains at 2 alongthe transfer whereas ut switches between -2 and 2, which correspond to the maximum valuesof the thrust.

46

Page 52: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.1 Simplied Medium-Thrust Transfer problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 23: Optimal radial thrust of the time-optimal problem

Figure 24: Optimal tangential thrust of the time-optimal problem

You can observe the evolution of some physical parameters and the trajectory in the equatorialplane thanks to the next gures:

47

Page 53: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.1 Simplied Medium-Thrust Transfer problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 25: Evolution of the main parameters

Figure 26: Transfer trajectory

As you can see, this spiral transfert seems to be very meaningful from a physical point of viewand takes many revolutions around the Earth. The spacecraft starts from the initial orbitwith a polar angle equal to zero and reach its nal orbit with a radius four times higher. Acomparison with some results from scientic papers can be performed. More precisely, in theappendix F, you can nd a solution from the paper "Low-Thust, High-Accuracy TrajectoryOptimization" by Ross and Michael.

48

Page 54: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

5.2 General Low-Thrust Transfer Problem

5.2.1 Model

The objective of this part corresponds to the nal one of this report which is to solved low-thrust Earth-orbit optimal control problem in 3D. The modied equinoctial elements (p, f,g, h, k, L) are used to write the equations of motion of the spacecraft. Only the thrustand the gravitation eld are considered in a near-Earth space (two-body problem). Now,both initial and nal orbits could have any form. Let u be the thrust direction expressed asu = (ur, uθ, uh). It gives these equations of motion:

p =√p

µ

2pq

Tuθm0

f =√p

µ

(sin(L)

Turm0

+1q

((q + 1) cos(L) + f)Tuθm0− g

q(h sin(L)− k cos(L))

Tuhm0

)g =

√p

µ

(−cos(L)

Turm0

+1q

((q + 1) sin(L) + g)Tuθm0− f

q(h sin(L)− k cos(L))

Tuhm0

)h =

√p

µ

s2cos(L)2q

Tuhm0

k =√p

µ

s2sin(L)2q

Tuhm0

L =√p

µ(h sin(L)− k cos(L))

Tuhm0

+õ

(q

p

)2

where q = 1 + f cos(L) + sin(L), s2 = 1 +√h2 + k2.

Initial boundary conditions:

The satellite starts from an initial orbit which can be expressed in terms of the modiedequinoctial elements:

p(0) = a0(1− e20)

f(0) = e0 cos(ω0 + Ω0)g(0) = e0 sin(ω0 + Ω0)

h(0) = tan(i02

)cos(Ω0)

k(0) = tan(i02

)sin(Ω0)

L(0) = ω0 + Ω0 + θ0

Final boundary conditions:

The spacraft terminates its transfer when it reaches the nal orbit but it can have any positionon this orbit. This condition may be expressed in terms of the modied equinoctial elements:

49

Page 55: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

p(tf ) = af (1− e2f )

f(tf ) = ef cos(ωf + Ωf )g(tf ) = ef sin(ωf + Ωf )

h(tf ) = tan(if2

)cos(Ωf )

k(tf ) = tan(if2

)sin(Ωf )

L(tf ) free

Path constraints:

||u|| ≤ 1

In this example, the maximum norm has been chosen:

||u||∞ = max(|ur|, |uθ|, |uh|)

The physical constants to solve this problem are given in the following table:

Constant Value

Ve 7.355× 104 m.s−1µ 3.9860× 1014 m3.s−2T 1 N

m0 1000 kg

Table 8: Physical Constants

In this part, the aim is to transfer a satellite from an initial orbit (dened by the initial bound-ary conditions) to a nal orbit (dened by the nal boundary conditions), while satisfyingthe dynamics constraints and the path constraints, in order to maximize the nal time. Thecost function is just tf .

5.2.2 Change in SMA

The rst test consists in the change in SMA (semi-major axis).

Description

This test considers a transfer between two quasi-circular orbits whose the characteristics aregiven by the following table:

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit 7371 0.001 1 0 0 180

Final orbit 17371 0.001 1 0 0 free

Table 9: Orbits characteristics

θ remains free on the nal orbit because the spacecraft can have any position on its nal orbitat tf .

50

Page 56: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Resolution

The minimum-time trajectory is optimized using the single shooting method with a time-step equal to

tf2000 and a space-step equal to

tf100 . It means there are 298 variables (99 for ur,

99 for uθ, 99 for uh during the path and one corresponding to the nal time). The foundoptimal time is equal to 640440 s (7.4 days). The running time is much longer than in theprevious parts and is about thirty minutes.

The gures below give the prole of the controls (ie thrust) for this maneuver:

Figure 27: Optimal radial thrust of the time-optimal problem

Figure 28: Optimal tangential thrust of the time-optimal problem

51

Page 57: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 29: Optimal vertical thrust of the time-optimal problem

In the two next gures, both the evolution of the modied equinoctial elements and thespacecraft trajectory are shown.

Figure 30: Evolution of the main parameters

52

Page 58: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 31: Transfer trajectory

5.2.3 Change in eccentricity

The second test consists in the change in eccentricity.

Description

The spacecraft starts from an elliptical orbit (e = 0.4) to reach a quasi-circular orbit asyou can see in the table below:

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit 17371 0.4 1 0 0 0

Final orbit 17371 0.001 1 0 0 free

Table 10: Orbits characteristics

Resolution

The minimum-time trajectory is still optimized using the single shooting method with atime-step equal to

tf2000 and a space-step equal to

tf100 . The optimal time is equal to 163420 s

(1.9 days) and is found after a running time of about 20 minutes.

The gures below give the prole of the controls (ie thrust) for this maneuver:

53

Page 59: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 32: Optimal radial thrust of the time-optimal problem

Figure 33: Optimal tangential thrust of the time-optimal problem

54

Page 60: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 34: Optimal vertical thrust of the time-optimal problem

In the two next gures, both the evolution of the modied equinoctial elements and thespacecraft trajectory are shown.

Figure 35: Evolution of the main parameters

55

Page 61: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 36: Transfer trajectory

5.2.4 Change in inclinaison

The third test consists in the change in inclination between two quasi-circular orbits.

Description

All the characteristics of the orbits are described in the next table:

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit 17371 0.001 5 0 0 90

Final orbit 17371 0.001 0 0 0 free

Table 11: Orbits characteristics

Resolution

The minimum-time trajectory is optimized using the single shooting method with a time-step equal to

tf750 and a space-step equal to

tf50 . It means there are 148 variables (49 for ur, 49

for uθ, 49 for uh during the path and one corresponding to the nal time). The found opti-mal time is equal to 280525 s (3.2 days) and is found after a running time of about 15 minutes.

The gures below give the prole of the controls (ie thrust) for this maneuver:

56

Page 62: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 37: Optimal radial thrust of the time-optimal problem

Figure 38: Optimal tangential thrust of the time-optimal problem

57

Page 63: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 39: Optimal vertical thrust of the time-optimal problem

In the two next gures, both the evolution of the modied equinoctial elements and thespacecraft trajectory are shown.

Figure 40: Evolution of the main parameters

58

Page 64: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 41: Transfer trajectory

5.2.5 GTO-GEO transfer

The last case corresponds to a GTO-GEO transfer to illustrate a more realistic maneuver.

Description

The characteristics of the orbits are described in the following gure:

a (km) e i (degrees) Ω ω θ (degrees)

Initial orbit 24363 0.7306 28.5 0 0 0

Final orbit 35786 0.001 0.001 0 0 free

Table 12: Orbits characteristics

Resolution

The minimum-time trajectory is optimized using the single shooting method with a time-step equal to

tf750 and a space-step equal to

tf50 . It means there are 148 variables (49 for ur, 49

for uθ, 49 for uh during the path and one corresponding to the nal time). The found opti-mal time is equal to 361780 s (3.2 days) and is found after a running time of about 20 minutes.

The gures below give the prole of the controls (ie thrust) for this maneuver:

59

Page 65: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 42: Optimal radial thrust of the time-optimal problem

Figure 43: Optimal tangential thrust of the time-optimal problem

60

Page 66: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 44: Optimal vertical thrust of the time-optimal problem

In the two next gures, both the evolution of the modied equinoctial elements and thespacecraft trajectory are shown.

Figure 45: Evolution of the main parameters

61

Page 67: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

5.2 General Low-Thrust Transfer Problem5 VALIDATION AND RESULTS FOR LOW-THRUST TRANSFERS

Figure 46: Transfer trajectory

62

Page 68: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

6 ENCOUNTERED PROBLEMS

6 Encountered problems

This section summarizes the main sources of diculties during this internship. You can ndbelow a not exhaustive list by chronological order:

1. Understand both Jman and Jack libraries.

• A lot of dierent classes in Java code in both libraries

• Comprehend the global architecture of these libraries

2. Get used to Unix terminal with dierent shells: bash, sh, ksh.

3. Ipopt and Nlopt installations in shell.

• Follow many instructions in shell

• Use of Makele to run C++ code

4. Get used to C++ with easy scripts.

5. Get used to Ipopt and Nlopt solvers by solving some simple non-linear problems.

6. Resolution of the Brachistochrone problem

• Transformation of the Brachistochrone problem with collocation, single shootingand multiple shooting into a non-linear problem with a C++ code.

• Resolution with Nlopt and Ipopt.

7. Conception and implementation of a module to transform any optimal control probleminto a NLP which is given to the selected solver (Ipopt)

8. Low-thrust problems resolution with Ipopt.

• Scaling problems at the rst place.

• Conversion between cartesian and equinoctial parameters

• Adjust all the Ipopt options in order to converge to a global solution

Each encountered problem was nally overcome and was a necessary step to meet the nalaim of this Master Thesis: solve low-thrust transfers with direct methods.

63

Page 69: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

7 CONCLUSION

7 Conclusion

During this Master Thesis, a research has been done to determine the most suitable solver tooptimize low-thrust orbital maneuvers. Some NLP test cases have been directly solved withtwo solvers (Ipopt and Nlopt). Moreover, the Brachistochrone problem, an optimal controlproblem, has been transformed into a NLP with three dierent direct methods (collocation,single and multiple shootings). Then, a module in Java has been conceived, implementedand validated, in order to transform any optimal control problem into a non-linear problem.Finally, four low-thrust orbital maneuver optimization test cases have been solved thanks tothe module and Ipopt. These test cases respectively correspond to a change in SMA, a changein eccentricity, a change in inclination and a GTO-GEO transfer.

The internship's objective has been fullled with the validation of the module on low-thrustorbital maneuvers with direct methods, especially on time-optimal problems. Compared toindirect methods, the main advantage is the large convergence radius allowing to convergeto an optimal point by giving any random initial point. For this reason, the direct methodsshould be preferred in order to optimize low-thrust orbital maneuvers. According to the num-ber of chosen variables (ie the number of controls along the path), the computation time canbecome large and reach several hours. The multiple shooting method is likely to be the mostappropriate method even it takes a longer running time than the single shooting method.

Three main perspectives can be stated to extend this internship:

• Take into account keplerian motion perturbations, such as the solar radiation or theatmosphere.

• Handle inter-planatery transfers, for example a Earth-Mars transfer.

• Use threads to save computation time, especially for the multiple shooting.

This Master Thesis, made in an industrial company, is a unique oppportunity to apply the-oretical knowledge and solve practical problems. The following points give the main eldsrelated to this internship:

1. Technical level:

• Computer science: software development, Java, UML with Enterprise Architect.

• Space dynamics: keplerian motion, two-body problem, orbital maneuvers.

• Applied mathematics: non-linear optimization, optimal control theory.

• Computer tools: Eclipse, Maven, SVN.

2. Organization level

• Perform a bibliographic research via Internet and the available books

• Get used to the company resources (Eclipse, SVN, Maven...)

• Manage time organization to provide results and a report in due time

3. Relational level

• Discover the way of working at Thales

• Argue one's results and choices throughout the internship

• Discuss with the engineers of the Flight Dynamics department about the dierentprojects

64

Page 70: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

A CODE IN C++ USING SOLVER NLOPT (SLSQP ALGORITHM)

Appendices

A Code in C++ using solver Nlopt (SLSQP algorithm)

#include <nlopt.hpp>

#include <iostream>

double myvfunc(const std::vector<double> &x, std::vector<double> &grad,

void *my_func_data)

if (!grad.empty())

grad[0] = -200*2*x[0]*(x[1] - x[0]*x[0]) -2*x[0];

grad[1] = 200*(x[1] - x[0]*x[0]);

return 100*(x[1] - x[0]*x[0])*(x[1] - x[0]*x[0])

+ (1 - x[0])*(1 - x[0]);

double myvconstraint(const std::vector<double> &x, std::vector<double>

&grad, void *data)

if (!grad.empty())

return 0;

int main()

nlopt::opt opt(nlopt::LD_SLSQP, 2);

std::vector<double> lb(2);

lb[0] = -HUGE_VAL;

lb[1] = -1.5;

opt.set_lower_bounds(lb);

opt.set_min_objective(myvfunc, NULL);

opt.add_inequality_constraint(myvconstraint, NULL, 1e-8);

opt.set_xtol_rel(1e-4);

std::vector<double> x(2);

x[0] = -2;

x[1] = 1;

double minf;

nlopt::result result = opt.optimize(x, minf);

std::cout << "objective function : " << minf;

std::cout << "objective value : " << x[0] << " " << x[1];

65

Page 71: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

B THEORETICAL SOLUTION OF THE BRACHISTOCHRONE PROBLEM

B Theoretical solution of the Brachistochrone problem

Figure 47: Theoretical solution of the Brachistochrone problem

66

Page 72: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

C OUTPUT OF IPOPT SOLVER WITH THE BRACHISTOCHRONE PROBLEM

(SINGLE SHOOTING)

C Output of Ipopt solver with the Brachistochrone problem(single shooting)

Number of nonzeros in equality constraint Jacobian...: 20

Number of nonzeros in inequality constraint Jacobian.: 0

Number of nonzeros in Lagrangian Hessian.............: 0

Total number of variables............................: 10

variables with only lower bounds: 0

variables with lower and upper bounds: 10

variables with only upper bounds: 0

Total number of equality constraints.................: 2

Total number of inequality constraints...............: 0

inequality constraints with only lower bounds: 0

inequality constraints with lower and upper bounds: 0

inequality constraints with only upper bounds: 0

iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls

0 8.1999900e-01 4.74e-01 3.86e-03 0.0 0.00e+00 - 0.00e+00 0.00e+00 0

1 8.1116667e-01 8.91e-02 3.72e-01 -0.7 2.08e-01 - 1.00e+00 1.00e+00f 1

2 8.2750967e-01 8.46e-04 3.86e-02 -2.2 1.63e-02 - 9.96e-01 1.00e+00h 1

3 8.2503810e-01 3.05e-03 6.60e-03 -3.8 6.89e-02 - 9.97e-01 1.00e+00h 1

4 8.2457229e-01 2.32e-03 3.90e-03 -5.7 6.46e-02 - 1.00e+00 1.00e+00h 1

5 8.2493593e-01 1.45e-04 1.89e-03 -6.8 2.14e-02 - 1.00e+00 1.00e+00h 1

6 8.2495647e-01 9.66e-06 2.71e-04 -7.7 5.80e-03 - 1.00e+00 1.00e+00h 1

7 8.2495801e-01 7.61e-08 5.17e-08 -11.0 5.15e-04 - 1.00e+00 1.00e+00h 1

8 8.2495802e-01 3.07e-12 1.93e-09 -11.0 3.56e-06 - 1.00e+00 1.00e+00h 1

Number of Iterations....: 8

(scaled) (unscaled)

Objective...............: 8.2495801788125744e-01 8.2495801788125744e-01

Dual infeasibility......: 1.9279647237105564e-09 1.9279647237105564e-09

Constraint violation....: 3.0739855105821334e-12 3.0739855105821334e-12

Complementarity.........: 1.1111677857468063e-11 1.1111677857468063e-11

Overall NLP error.......: 1.9279647237105564e-09 1.9279647237105564e-09

Number of objective function evaluations = 9

Number of objective gradient evaluations = 9

Number of equality constraint evaluations = 9

Number of inequality constraint evaluations = 0

Number of equality constraint Jacobian evaluations = 9

Number of inequality constraint Jacobian evaluations = 0

Number of Lagrangian Hessian evaluations = 0

Total CPU secs in IPOPT (w/o function evaluations) = 0.013

Total CPU secs in NLP function evaluations = 0.035

EXIT: Optimal Solution Found.

67

Page 73: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

C OUTPUT OF IPOPT SOLVER WITH THE BRACHISTOCHRONE PROBLEM

(SINGLE SHOOTING)

*** The problem solved!

Objective Value = 0.8249580178812574

Primal Variable Values:

0.06718716948369946

0.20156051892933638

0.33593388652209155

0.4703072607636757

0.6046806348000529

0.7390540084104231

0.8734273816235504

1.0078007626681462

1.142174154544979

0.8249580178812574

Constraint Values:

-2.2144508449173372E-12

-3.0739855105821334E-12

Dual Multipliers for Variable Lower Bounds:

1.653839012569937E-10

4.9612893979677427E-11

2.976776005792243E-11

2.12626937409846E-11

1.6537654860253495E-11

1.3530810677964671E-11

1.1449148612457763E-11

9.922595990711876E-12

8.75523202256491E-12

1.2121828823448843E-11

Dual Multipliers for Variable Upper Bounds:

1.0067641871958767E-12

1.020570665123487E-12

1.0347611221452413E-12

1.049351764782469E-12

1.0643597629892707E-12

1.0798032837170349E-12

1.095701563846238E-12

1.1120749911878139E-12

1.1289451902303625E-12

1.0899132571275193E-12

Dual Multipliers for Constraints:

-0.14966122968077003

-0.056578399772833715

68

Page 74: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

D TEST PROBLEMS FOR ORBITAL TRANSFERS

D Test problems for orbital transfers

D.1 Brachistochrone problem

Paper: "Direct and indirect methods for trajectory optimization".Author: O. von Stryck and R. Bulirsch.

min tf

st x1(t) =√

2gx2(t) cos(θ(t))

x2(t) =√

2gx2(t) sin(θ(t))x1(0) = 0x2(0) = 0x1(tf ) = 1x2(tf ) free

D.2 Van der Pol oscillator

Paper: Initialization of the shooting method via the Hamilton-Jacobi-Bellman approach".Author: Emilian Cristiani, Pierre Martinon

min tfst x1(t) = x2(t)

x2(t) = −x1(t) + x2(t)(1− x1(t)2) + u(t)x1(0) = 1x2(0) = −0.8x1(tf ) = 0x2(tf ) = 0u(t) ∈ [−1, 1]

D.3 Maximum-Energy Orbit Transfer

Paper: "New numerical methods for open-loop and feedback solutions to dynamic optimiza-tion problems".Author: Pradipto Ghosh.

max12

(vr(tf )2 + vt(tf )2)− 1r(tf )

st r = vr

θ(t) =vtr

vr =v2t

r− µ

r2+ Γsin(β)

vt =−vt.vrr

+ Γcos(β)

D.4 Maximum-Radius Orbit Transfer with Solar Sail

Paper: "New numerical methods for open-loop and feedback solutions to dynamic optimiza-tion problems".Author: Pradipto Ghosh.

69

Page 75: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

D.5 Planet to planet transfer: Earth-MarsD TEST PROBLEMS FOR ORBITAL TRANSFERS

min − r(tf )st r = vr

θ(t) =vtr

vr =v2t

r− µ

r2+ a

cos(α)3

r2

vt =−vt.vrr

+ asin(α).cos(α)2

r2

D.5 Planet to planet transfer: Earth-Mars

Paper: "Optimal low-thrust transfers in two-body and three-body dynamics".Author: Mirco Rasotto

min∫ tf

t0

12||u(t)||2 dt

st r = v

v = Fext + Tmaxu(t)m(t)

m = −Tmax||u(t)||Ispg0

D.6 Earth-to-Mars problem with Nuclear-electric propulsion systems

Paper: "Continuous low-thrust trajectory optimization: techniques and applications".Author: Mischa Kim

min tfst r = vr

θ =vθr

vr =v2θ

r− 1r2

+ τ.cos(αr)

vθ = −vr.vθr

+ τ.sin(αr)

τ = τ2.k

where k corresponds to the thrust eciency, τ to the specic thrust and αr to the controlvariable.

70

Page 76: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

D.7 Earth-to-Mars problem with Solar-electric propulsion systemsD TEST PROBLEMS FOR ORBITAL TRANSFERS

D.7 Earth-to-Mars problem with Solar-electric propulsion systems

Paper: "Continuous low-thrust trajectory optimization: techniques and applications".Author: Mischa Kim

min tfst r = vr

θ =vθr

vr =v2θ

r− 1r2

+b1 + b2.P (r)

m.cos(αr)

vθ = −vr.vθr

+b1 + b2.P (r)

m.sin(αr)

τ = c1 + c2.P (r)

where P(r) corresponds to the solar array performance whereas b1, b2, c1 and c2 are constant.

D.8 Earth-to-Mars problem with Solar sail spacecraft

Paper: "Continuous low-thrust trajectory optimization: techniques and applications".Author: Mischa Kim

min tfst r = vr

θ =vθr

vr =v2θ

r− 1r2

r2.cos(αr)3

vθ = −vr.vθr

r2.sin(αr)2.sin(αr)

where β corresponds to the solar sail characteristic acceleration.

71

Page 77: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

E RESULTS FOR A HIGH-THRUST TRANSFER FROM THE PAPER "LOW-THUST,

HIGH-ACCURACY TRAJECTORY OPTIMIZATION"

E Results for a high-thrust transfer from the paper "Low-Thust,High-Accuracy Trajectory Optimization"

Figure 48: Optimal solution for a time-optimal problem

72

Page 78: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

F RESULTS FOR A MEDIUM-THRUST TRANSFER FROM THE PAPER

"LOW-THUST, HIGH-ACCURACY TRAJECTORY OPTIMIZATION"

F Results for a medium-thrust transfer from the paper "Low-Thust, High-Accuracy Trajectory Optimization"

Figure 49: Optimal solution for a time-optimal problem

73

Page 79: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

G OUTPUT OF IPOPT SOLVER WITH A LOW-THRUST PROBLEM (CHANGE OF

SMA AND SINGLE SHOOTING METHOD)

G Output of Ipopt solver with a low-thrust problem (changeof SMA and single shooting method)

Number of nonzeros in equality constraint Jacobian...: 1490

Number of nonzeros in inequality constraint Jacobian.: 0

Number of nonzeros in Lagrangian Hessian.............: 0

Total number of variables............................: 298

variables with only lower bounds: 0

variables with lower and upper bounds: 298

variables with only upper bounds: 0

Total number of equality constraints.................: 5

Total number of inequality constraints...............: 0

inequality constraints with only lower bounds: 0

inequality constraints with lower and upper bounds: 0

inequality constraints with only upper bounds: 0

iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls

0 6.4000000e+05 1.71e+02 1.00e+00 0.0 0.00e+00 - 0.00e+00 0.00e+00 0

1 6.3999997e+05 1.64e+02 1.61e+03 1.2 1.65e+01 - 9.90e-01 4.04e-02f 1

2 6.4000036e+05 1.61e+02 1.55e+05 3.1 2.26e+01 - 9.90e-01 1.70e-02f 1

3 6.4003367e+05 3.03e+01 5.67e+04 2.9 4.16e+01 - 9.91e-01 8.01e-01h 1

4 6.4009166e+05 2.67e+01 3.28e+06 3.8 5.76e+02 - 8.99e-01 1.01e-01f 1

5 6.4047335e+05 7.49e-01 4.84e+04 3.2 3.82e+02 - 1.00e+00 1.00e+00h 1

6 6.4049175e+05 2.37e-02 1.07e+04 2.4 1.84e+01 - 9.96e-01 1.00e+00f 1

7 6.4049141e+05 6.41e-04 5.31e-01 0.6 3.39e-01 - 1.00e+00 1.00e+00f 1

8 6.4048271e+05 2.46e-02 1.39e+03 -5.4 8.70e+00 - 7.05e-01 1.00e+00f 1

9 6.4046586e+05 2.25e-01 1.03e+02 -0.3 2.03e+01 - 1.00e+00 8.31e-01f 1

iter objective inf_pr inf_du lg(mu) ||d|| lg(rg) alpha_du alpha_pr ls

10 6.4044250e+05 1.61e+00 1.99e+01 -0.5 2.63e+01 - 1.00e+00 8.88e-01f 1

11 6.4044150e+05 3.51e-03 9.99e-01 -1.5 9.99e-01 - 1.00e+00 1.00e+00f 1

12 6.4044050e+05 9.83e-04 1.00e+00 -3.5 1.00e+00 - 9.98e-01 1.00e+00f 1

Number of Iterations....: 12

(scaled) (unscaled)

Objective...............: 6.4044050155658321e+05 6.4044050155658321e+05

Dual infeasibility......: 9.9995647213589511e-01 9.9995647213589511e-01

Constraint violation....: 5.1860603925438556e-04 9.8269310183241032e-04

Complementarity.........: 4.4467425829762932e-04 4.4467425829762932e-04

Overall NLP error.......: 9.9995647213589511e-01 9.9995647213589511e-01

74

Page 80: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

REFERENCES REFERENCES

References

[1] Gao Yang. Direct Optimization of Low-thrust Many-revolution Earth-orbit Transfers. Chi-nese Journal of Aeronautics, vol 22, pp 426-433, 2009.

[2] Ross, I.Michael, Qi Gong, and Pooya Sekhavat. Low-Thrust, High-Accuracy Trajectory

Optimization. Journal of Guidance, Control and Dynamics, vol 30, no 4, pp 921-933,2007.

[3] Mischa Kim. Continuous low-thrust trajectory optimization: techniques and applications.Faculty of the Virginia Polytechnic Institute and State University, 2005.

[4] Mirco Rasotto. Optimal low-thrust transfers in two-body and three-body dynamics. Po-litecnico di Milano, 2012.

[5] Pradipto Ghosh. New numerical methods for open-loop and feedback solutions to dynamic

optimization problems. University of Illinois at Urbana-Champaign, 2013.

[6] Dr. Timm Faulwasser. Optimal Control: A Primer on Direct Solutions Methods. Labo-ratoire d`Automatique, EPFL, 2013.

[7] John T. Betts. A Survey of Numerical Methods for Trajectory Optimization. Mathematicsand Engineering Analysis, Boeing Information and Support Services, 1998.

[8] Udit Kumar, Sumit Soman, Jayavdeva. Benchmarking NLopt and state-of-art algorithms

for Continuous Global Optimization via Hybrid IACO. Department of Electrical Engi-neering, Indian Institute of Technology, Delhi, India, 2015.

[9] Emiliano Cristiani, Pierre Martinon. Initialization of the shooting method via the

Hamilton-Jacobi-Bellman approach. Journal of Optimization Theory and Applications,vol 146, no 2, pp 321-346, 2010.

[10] Emmanuel Trélat. Optimal control and applications to aerospace: some results and chal-

lenges. Archives ouvertes (HAL), 2012.

[11] Robert D. Falck, John W. Dankanich. Optimization of Low-Thrust Spiral Trajectoriesby

Collocation. National Aeronautics and Space Administration, 2012.

[12] J. Frederic Bonnans, Geneviève Launay. Large scale direct optimal control applied to the

re-entry problem. Archives ouvertes (HAL), 1994.

[13] O. von Stryk, R. Bulirsch. Direct and Indirect Methods for Trajectory Optimization.Annals of Operations Research, vol 37, pp 357-373, 1992.

[14] Paul Musegaas. Optimization of Space Trajectories Including Multiple Gravity Assists

and Deep Space Maneuvers. Delft University of Technology, 2012.

[15] Hanane Ait-Lakbir. Study and Industrialization of Computational Methods for Orbital

Maneuver. KTH Royal Institute of Technology and ISAE Supaero, 2016.

75

Page 81: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66
Page 82: Study and Industrialization of Optimization Methods …1063271/FULLTEXT01.pdfA Code in C++ using solver Nlopt (SLSQP algorithm)65 B Theoretical solution of the Brachistochrone problem66

TRITA -MAT-E 2016:72

ISRN -KTH/MAT/E--16/72--SE

www.kth.se