Finite-Thrust Trajectory Optimization Using a Combination of Gauss Pseudospectral Method and Genetic Algorithm

Finite-thrust propulsion is now widely used in space missions, such as lunar or mars descent, interplanetary transfer, spacecraft rendezvous, etc.. The finite-thrust optimal control problem is qualitatively different from the impulsive case as there are now no integrable arcs and the control itself, must be modeled and determined. Optimizing finitethrust trajectory is a challenging problem due to the existence of long powered arcs. Therefore, obtaining optimal trajectory is sometimes tedious and time consuming.

programming problem (NLP).Then GA is employed to solve this NLP.The results of a numerical simulation verified the validity of the proposed optimization method.Results also indicate that the method has good performance on accuracy and fast convergence.

Problem statement for finite-thrust trajectory optimization
A general problem statement for finite-thrust trajectory optimization can be stated as follows [6] : determine the optimal transfer time f t and optimal control variable () and the path constraints (() , () ,) 0 tt t ≤ Cx u (4)

Optimization method
To solve the complex finite-thrust optimization problem with strict constraints, an optimization method is proposed in this section.It is a combination of a collocation method-GPM and GA.Here the GPM is used to transforming the optimal control problem to a NLP, and then GA is employed to solving the resulting NLP.The detailed optimization method is given as follows [7] .

NLP construction by GPM
We will give the detailed method how to transforming the finite-thrust optimal control problem to a NLP.The problem formulation will be presented in this section.
The Gauss pseudospectral method, like Legendre and Chebyshev methods, is based on approximating the state and control trajectories using interpolating polynomials.In the case of the GPM, the Lagrange interpolating polynomials are used to approximate the state and control.By using GPM, the continuous-time optimal control problem is converted into a NLP.The GPM for the powered descent control problem is summarized as follows [8][9] .
First, the original time interval The cost function, constraints, and boundary conditions can be given in terms of τ .Then the state is approximated using a basis of N+1 Lagrange interpolating polynomials L, 0 () () ()( ) where () ( 0 , , ) Additionally, the control is approximated using a basis of N Lagrange interpolating polynomials () ( ) () Differentiating Eq. ( 6), we obtain 00 where ki D ( ) is known as differentiation matrix.In the GPM, the dynamics are collocated at the N Legendre-Gauss (LG) points (1 , , ) . The derivative of each Lagrange polynomial at the LG points can be represented in a differential approximation matrix .The elements of the differential approximation matrix are determined offline as follows: where 1, , kN =  and 0, , is transcribed into an algebraic constraint using the differential approximation matrix as follows: In addition, 0 (1 ) XX ≡− and f X is defined using the Gauss quadrature given by , where k w are the Gauss weights.
The continuous cost function , ,;, 2 The boundary constraints are also discretized at the LG points as ( ) 00 ,, , 0 Furthermore, the path constraints are evaluated at the LG points as The cost function in Eq. ( 14) and the algebraic constraints in Eqs. ( 12), ( 13), ( 15) and ( 16) define an NLP whose solution is an approximate solution to the continuous Mayer problem.Finally, it is noted that discontinuities in the state or control can be handled efficiently by dividing the trajectory into phases, where the dynamics are transcribed within each phase and then connected together by additional phase interface constraints.

NLP solution by GA
Many methods can be used to solve the NLP, such as the steepest descent algorithm, hillclimbing algorithm, evolution algorithm and so on.Here genetic algorithm is employed to solve the optimization problem due to its excellent performance on global searching and the convenience to realize by computer.
Genetic algorithms are search procedures based on the mechanics of natural genetics.All natural species survive by adapting themselves to the environment.Genetic algorithm search combines a Darwinian survival-of-the-fittest concept to eliminate unfit characteristics and utilizes random information exchange, with exploitation of knowledge contained in old solutions, to effect a search mechanism with power and speed.In using genetic algorithms, the usual goal is to find solutions that are closer to the globally optimal point.This technique has gained popularity in the recent years as a robust optimization tool for variety of problems in engineering, science, economics, finance, etc.
A simple genetic algorithm is composed of three operators: (1) selection, (2) crossover, and (3) mutation.Selection is a process where an old string is carried through into a new population J www.intechopen.com

Finite-Thrust Trajectory Optimization
Using a Combination of Gauss Pseudospectral Method and Genetic Algorithm 63 depending on the performance index values.Due to this move, strings with better fitness values get larger numbers of copies in the next generation.Selecting good strings for this operation can be implemented in many different ways.In conjunction with the selection procedures, the good strings can either be allowed to change (pure selection) or retained in to the next evolution (elite selection).A simple crossover follows selection in three steps.First, the newly selected strings are paired together at random.Second, an integer position "n" along every pair of strings is selected uniformly at random.Finally, based on a probability of crossover, the paired strings undergo crossing over at the integer position "n" along the string.This results in new pairs of strings that are created by swapping all the characters between characters 1 and "n" inclusively.Although the crossover operation is a randomized event, when combined with selection it becomes an effective means of exchanging information and combining portions of good quality solutions.Selection and crossover give GA most of their search power.The third operator, mutation, is simply an occasional random alteration of a string position (based on probability of mutation).In a binary code, this involves changing a 1 to a 0 and vice versa.The mutation operator helps in avoiding the possibility of mistaking a local minimum for a global minimum.When mutation is used sparingly (about one mutation per thousand bit transfers) with selection and crossover, it improves the global nature of the genetic algorithm search. [10] using GPM, the optimal control problem was transcribed to a NLP by parameterizing the state and control using global polynomials and collocating the differential-algebraic equations using nodes obtained from a Gaussian quadrature.The dispersed state and control variables at LG points should be optimized using a parameter optimization technique.Here GA can be easily used as a parameter optimization technique for solving the problem.

Numerical examples: Lunar powered descent trajectory optimization
In this section, a trajectory optimization problem for lunar powered descent is presented to verify the validity of the proposed optimization method.
To make the optimization problem easier to solve, the dynamical system considered in most of previous studies on lunar powered descent is a two dimensional dynamics [7][11] .The descent trajectory of the lunar lander is assumed to remain in a vertical plane without any provision for possible lateral movements.However, for standard trajectory design or simulation before launching the rocket, the error can not be ignored.To obtain more accurate results and demonstrate the validity of this method to solve complex optimization problem, a three dimensional descent dynamics with high precision is established in this paper, and many strict constraints is given.
Here, we give the simple formulation of the optimization.

Dynamics equations
The lunar lander is in a circular orbit with an initial altitude 0 H .A Hohmann transfer orbit is used to decrease the altitude from 0 H to the pericynthion (altitude 15km).From here the powered descent begins.The powered-descent phase of the lunar-landing mission is www.intechopen.cominitiated at or near the pericynthion of the free descent orbit and finishes near the lunar surface (about altitude 2km).It is a continuous thrust maneuver of the duration of several minutes.The largest part of fuel is consumed during this phase [12] .
The following frame of reference is established to describe the powered descent maneuver.

OX Y Z −
The Origin is at the center of the moon; 1 OX axis is along the direction of the Moon's revolution, and OY axis is pointing at the ascending node of the Moon's orbit relative to the equator.2. Moon Centred Fixed (MCF) coordinate system OX Y Z − The Origin is at the center of the moon; OX axis is along the direction of the Moon's revolution, and OY axis is in the Moon's equator plane, pointing at the Sinus-Medii.

Orbit coordinate system ox yz −
The Origin is at the center of gravity of the lunar lander; ox axis is along the radial direction, oy axis is along the direction of the horizontal velocity at initial state of powered-descent.
It is assumed that the moon has a homogeneous gravity field and a constant rotation angular velocity.The coordinate systems and defined parameters are shown in Fig. 1.
where thrust size T and thrust direction angle , α β are control variables for the dynamics.
Other parameters nomenclature is given in appendix.

Objectives
The aim of optimal trajectory design is to minimize the amount of fuel required to perform a free end-time descent from the given initial state to the given terminal state.The objective function is: The magnitude of thrust T is defined as a constant here, so the objective is to minimize the total powered descent time.The objective function can therefore be expressed as

Constraints
Firstly the boundary conditions including position and velocity constraints of lunar lander at initial time 0 t and final time f t are considered.
The constraints at the initial time are () () () The constraints at the final time are Then constrained by the propulsion system, the thrust direction angle should be subject to where min α , max α , min β and max β are the boundary of thrust direction angle.

Simulation example
Here a test case scenario is given to validate the optimization method.
The initial and final conditions -treated as boundary conditions by the optimization algorithm -are given by Equation ( 25 The constraints of thrust direction angle are set as follows: Here taking the LG points N=50, and GPM-GA is employed to solve the optimization problem.The results show that the optimal flight time for lunar landing is 472.74s, and require a fuel mass of 5947.2kg.The trajectory of lunar lander is shown in Fig. 2, where the result of methodology outlined in this paper, are compared to the indirect method (Pontryagin's maximum principle).As can be see, the two methods yield practically the same results.
The velocity of lunar lander in the orbit coordinate system o xyz − is shown in Fig. 3, while the time history of thrust direction angle during landing is shown in Fig. 4. The simulation results indicate that the GPM-GA optimization algorithm has high accuracy, and the error with results solved by indirect method is very small.What's more, the calculation will converge rapidly even when the initial values for GPM are chosen at random in the bound.Less than 2 minutes are needed for a result to be obtained on a PC with a 3.0GHz/Pentium 4 CPU.However, if using the traditional method such as direct shooting method to solve the optimal descent trajectory, the program can only be converged when the initial guess is closed to optimal values, and the calculation time is longer.For example, more than 20 minutes are needed for calculation with the method in reference [3] .

Demonstration of computational feasibility
The feasibility of the computational solution can be validated by comparing the results to the propagated states via a separate ODE Runge-Kutta propagator.By interpolating the values of the control function, () i t u , at the discretization time points and then integrating the differential dynamical equations 17, via MATLAB's ode45 solver, a comparison of error norms can be made with the results of methodology outlined in this paper.Results showed that powered descent trajectory dose satisfy the end-point conditions within an input constraint.

Demonstration of computational optimality
To demonstrate the necessary conditions needed for optimality the first step requires the formulation of the Hamiltonian [13] ( ) ( )( ) ,,,  ,,  ,, where () L ⋅ is the Lagrange cost, and () f ⋅ is the vector field for the right hand side of the differential dynamical equations.
To determine the final value of the Hamiltonian, the Endpoint Lagrangian, given as, ( This indicates that the Hamiltonian should be 0 for all the time in this problem.The Hamiltonian from the optimization solution in this paper is almost 0 with respect to time, and it can be used verify that the numerical results satisfy the necessary Karush-Kuhn-Tuhker (KKT) conditions for optimality.

Conclusion
An optimization algorithm GPM-GA method is presented to solve the optimal finite-thrust trajectory with an input constraint in the paper.The results of a numerical simulation verified the validity of the proposed optimization method.The results indicate that the method can provide good performance on accuracy and fast convergence.It is expected that this novel optimization algorithm can be used to solve the similar optimization problems.

Fig. 1 .
Fig. 1.Coordinate systemsThe dynamics equations for lunar powered descent can be denoted as follow.

[
values of the other parameters used in this scenario are summarized here:

Nomenclature m mass of lunar lander r position vector of lunar lander 0 mµ
initial mass of lunar lander t flight time sp I propulsion system's specific impulse u , v , w velocity of lunar lander in the orbit www.intechopen.comgravity constant of the moon θ , φ longitude and latitude ω rotation angular velocity of the moon T thrust h altitude from lunar surface of lunar lander α , β thrust direction angle