• Nenhum resultado encontrado

Shoot-1.1 Package - User Guide Pierre Martinon, Joseph Gergaud

N/A
N/A
Protected

Academic year: 2024

Share "Shoot-1.1 Package - User Guide Pierre Martinon, Joseph Gergaud"

Copied!
41
0
0

Texto

Its functions include handling discontinuities on the right-hand side (for example due to pop-pop control) for trajectory integration and calculating Jacobians for the firing method. Special attention is paid to the numerical integration of the shooting function and the accurate calculation of its Jacobian, especially in the discontinuous case. Returning to indirect methods, single-shooting consists of finding the zero-shooting function associated with the original problem.

We assume here that the optimal control expression given by the necessary conditions (Hamiltonian minimization) is actually a function, denotedγ, ieu(t) =ArgM inw∈UH(t, x, p, w) =γ(t, y ). We now introduce an application called the shot function, which essentially maps the initial value ζ to the value of the boundary conditions in tf. Then the value of the firing function is given by the boundary conditions attf for the solution(·, z) of (IV P) corresponding to the initial value(t0, z) = (x0, z).

Finding a zero point of the recording function S is then equivalent to the resolution of (BV P), and therefore also gives a solution of (P). We then obtain(·, z) as a solution to the initial value problem with a discontinuous right side. As mentioned earlier, one of the main practical problems in the shooting method is finding a suitable starting point, due to the small radius of convergence of the Newton method applied to the shooting function.

For example, we can introduce a tolerance on the rate of the firing function that indicates a successful convergence of the firing method.

Package overview

The principle of continuation is to find some homotopy that connects the original problem to an easier problem, and then follow the zero path of this homotopy, from a solution of the easy problem to a solution of the original problem. There are several ways to trace this path, such as Predictor-Corrector methods (or differential homotopy) which treat the null path as a differentiable curve, Piecewise Linear (or simplicial) methods which build a PL approximation of the path over a triangulation of the space. We refer interested readers to [1] for a general overview of continuation methods, and to [8] in the context of Newton methods for nonlinear problems.

The stepsizehk for the homotopic parameter (such thatλk+1=λk+hk) can be set to some fixed value, or to something more refined. Then we can start with a step sizeh0= 1 and try to solve (P1) directly; if the attempt fails, we divide the step size hk. It is then safer to stop the continuation when a certain maximum number of iterations has been reached, or when the stepsizehk falls below a minimum value.

This method is implemented in the Shoot package and can be quite effective for well-chosen homotopies. Integrators.f90: integrators interface -RHS.f90: IVP right side handling -Common.f90: some common subroutines -ShootDefs.f90: global variables.

User supplied subroutines and input files

The program will ask for the name (without the extension) of the input files, for example “Problem1” for Problem1.cont and Problem1.in. At the end of the run, a solution.solis file is created that contains the solution at the end of the continuation. Skriptsol.m tracks state, value, and time-based control, as well as an optional toggle function.

It is called at the beginning of the program and then every time the recording function is calculated. This subroutine returns the value of the optimal control, according to the necessary conditions (Hamiltonian minimization). An incoming value of 0 indicates that the switch flag should be initialized to match the sign of the switch function, in addition to calculating the control.

This subroutine provides the toggle function required for toggle detection or singular arc handling. For problems with singular arcs, the first time derivative of the switching function is also required. Real — Integer — Integer: Tolerance specifies the norm threshold on the sliding function for a continuation step to be accepted.

Integer — Integer [0.2]: debug should be set to 0 for normal use; the extended flag can be set to 1 or 2 to display some additional output. Integer — Integer — Integer — Integer: specifies the dimensions of the firing function unknown, and of the state, costate, and control of the problem (the state and costate dimensions are usually the same, but may differ if some components are known are constant and therefore do not need to be integrated). Integer: number of fixed times (often 2: start and end times) Real — Real: values ​​of fixed times.

Complete formulations use internal nodes and matching conditions; light formulations use only the switching times. The first integer selects the method for the numerical integration of the initial value problem (IV P). Sets the method used to calculate the Jacobian of the shooting function (see page 17).

Switchings detection

Variational System

Sample problem: Orbital transfer

The application of Pontryagin's maximum principle then leads to the following expression of the optimal control. We can see that this control has a bang-bang structure, as its norm varies between 0 and 1 at zeros of the switching function ψ. We choose here for the "easy" problem the same transfer with minimization of an "energy" criterion, namely Rtf.

As we shall see below, the shooting method actually converges for (P0) from a simple initial guess. Moreover, the solution for (P0) with activated coupling detection is a sufficient starting point for (P), so that the continuation here is reduced to its simplest form. We briefly present here the numerical results for the orbital problem, for a maximum pressure of 10N and 0.1N.

For both problems we see that the recording method converges for λ= 0 from the given starting point, as shown in the. Then the algorithm continues with the discrete continuation, and in this case converges directly for λ= 1 with the solution of λ= 0, so only 1 iteration is needed. Note: The executable file for the orbital transfer problem is called “Orb”, and the input files for these two problems are in the appendix, see page 28.

Note that transfer time, number of revolutions (i.e. final length) and number of switches are inversely proportional to thrust, so we find values ​​hundreds of times greater than for a 10N transfer. The value of the criterion (minimum fuel consumption) also remains the same as for the 10N transmission. Once again, we draw the solution and the trajectory, which has the same structure as the 10N transmission, but with 1800 switches, 750 revolutions around the Earth and a final time of 640 days.

Orbital transfer (0.1N) - Mode, costate and control and trajectory Here is the execution log for the 0.1N transfer (input files are also listed in the appendix). We note that the cpu time is also about a hundred times higher than for the 10N transfer, which is mainly because the integration of (IV P) to calculate the value of the sliding function is a hundred times longer. For this family of orbital transfer problems, experiments with maximum thrusts ranging from 10N to 0.1N show that the number of Jacobian evaluations needed for the shooting method (both at λ= 0 andλ=1) is roughly the same for all shocks, between 3 and 6 .

Singular arcs and continuation

Shooting problem formulation

Along the singular arc, the switching function ψ and its time derivatives are required to cancel. In practice, singular control is often calculated using the relation ¨ψ= 0, so the switching conditions may include, for example, requiring either ψ = 0 at both ends of the singular arc or ψ= ˙ψ= 0 at the beginning of the singular arc. arc (tangential entry).

Sample problem: Goddard (3D)

The join condition indicates a change in structure, which here corresponds to the end of a singular arc. Furthermore, D(r, v)>0 is the drag component, g(r)∈ R3 is the normal gravitational force, and b > 0 is a positive real number depending on the engine. The thrust is Cu(t) where C >0 is the maximum thrust and the control is the normalized thrust in R3.

Depending on the characteristics of the problem (initial and final conditions, mass/thrust ratio, etc.), control strategies are known to consist of choosing the control so that ku(t)ki remains piecewise constant throughout the flight, either equal to 0 or up to the maximum allowed value 1, may not be optimal, due to the high values ​​of air resistance at high speed. Moreover, deriving the switching function twice on a single subarc yields the expression of α via a relation of the form A(x, p)α =B(x, p). The free end-time problem is formulated as a fixed end-time one via the usual time transformation t = tf s, with s ∈[0,1] and tf an additional component of the state vector, so that ˙tf = 0 and tf (0), tf(1) are free, where the corresponding costate satisfies ˙ptf =−H.

The resulting perturbed problem (Pλ) has a strongly convex Hamiltonian (with respect to tou) for λ < 1, with a continuous optimal control. In this case, even the solution of the regularized problem (P0) is not visible, due to aerodynamic forces (drag). For this reason, we present a preliminary extension on the density of the atmosphere, starting from a problem without an atmosphere.

This first homotopy can be initialized with a very simple initial guess (see the Appendix for the input files) and converges without any difficulty in solving the regularized problem. We can now perform the main continuation in the quadratic regularization, using the solution obtained after the homotopy of the atmosphere as an initial guess. The graphs of the control and switching function strongly suggest the presence of a singular subspace around the time interval [0.1,0.4].

Using the information from the previous solution at λ= 0.8, we assume a control structure of formbang-singular-bang and try the singular shooting that converges to a solution with the expected singular arc. We show the state, costate, control, and coupling function for the single-arc solution. Goddard (3D) - Mode, costate, control and toggle function The altitude, speed and mass in flight are represented below.

Orbital transfer

The only differences for the initialization file are the final "time" (actual longitude), the initial guess for tf (first component of z0), the number of integration steps for the RK4 method and of course the maximum thrust (first of the parameters at the end of the file ).

Goddard problem

J¨ager, editors, Modeling Chemical Reaction Systems, volume 18 of the Springer Series in Chemical Physics, pages 102–125.

Referências

Documentos relacionados