17
Annals of Operations Research 37(1992)357-373 357 DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut, Technische Universit?it Miinchen, Postfach 20 24 20, D-8000 Miinchen 2, Germany Abstract This paper gives a brief list of commonly used direct and indirect efficient methods for the numerical solution of optimal control problems. To improve the low accuracy of the direct methods and to increase the convergence areas of the indirect methods we suggest a hybrid approach. For this a special direct collocation method is presented. In a hybrid approach this direct method can be used in combination with multiple shooting. Numerical examples illustrate the direct method and the hybrid approach. Keywords: Constrained optimal control, nonlinear dynamic systems, multiple shooting, direct collocation, nonlinear optimization, hybrid approach, estimates of adjoint variables. 1. The optimal control problem Many optimization problems in aeronautics and astronautics, in industrial robotics and in economics can be formulated as optimal control problems. The dynamic system may be described as a system of nonlinear differential equations ~(t) = f(x(t),u(t),t), to < t < tf, (1) with t 0, X(to) and some Xk(tf), k e {1 ..... n}, given and tf fixed or free. The n-vector function of states x(t) is determined by an /-vector function of controls u(t). The problem is to find functions u(t) that minimize a functional of Mayer type J[u]=~(x(tf),tf) with O:IR n+l ---->~. (2) Also more general types of functionals are possible. For realistic problems it is important to include path cons.traints. Most common are constraints on the control variables C(u(t),t) < O, to < t <- t f , (3) or constraints on the state variables S(x(t), t) <- O, to <- t < t I, J.C. Baltzer AG, Scientific Publishing Company

DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

Embed Size (px)

Citation preview

Page 1: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

Annals of Operations Research 37(1992)357-373 357

DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION

O. y o n S T R Y K and R. B U L I R S C H Mathematisches Institut, Technische Universit?it Miinchen, Postfach 20 24 20, D-8000 Miinchen 2, Germany

Abstract

This paper gives a brief list of commonly used direct and indirect efficient methods for the numerical solution of optimal control problems. To improve the low accuracy of the direct methods and to increase the convergence areas of the indirect methods we suggest a hybrid approach. For this a special direct collocation method is presented. In a hybrid approach this direct method can be used in combination with multiple shooting. Numerical examples illustrate the direct method and the hybrid approach.

Keywords: Constrained optimal control, nonlinear dynamic systems, multiple shooting, direct collocation, nonlinear optimization, hybrid approach, estimates of adjoint variables.

1. The optimal control problem

Many opt imizat ion problems in aeronautics and astronautics, in industrial robot ics and in economics can be formulated as opt imal control problems. The dynamic system may be described as a system of nonlinear differential equations

~(t ) = f ( x ( t ) , u ( t ) , t ) , to < t < t f , (1)

with t 0, X(to) and some Xk(tf), k e {1 . . . . . n}, given and tf fixed or free. The n-vector funct ion o f states x(t) is determined by an /-vector funct ion o f controls u(t).

Th e problem is to find functions u(t) that minimize a functional o f Ma y e r

type J [ u ] = ~ ( x ( t f ) , t f ) with O:IR n+l ---->~. (2)

Also more general types o f functionals are possible. For realistic problems it is important to include path cons.traints. Most common

are constraints on the control variables

C ( u ( t ) , t ) < O, to < t <- t f , (3)

or constraints on the state variables

S (x ( t ) , t) <- O, to <- t < t I ,

J.C. Baltzer AG, Scientific Publishing Company

Page 2: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

358 O. von Stryk, R. Bulirsch, Methods for trajectory optimization

or more generally

S ( x ( t ) , u ( t ) , t ) < O, t o < t < t f . (4)

In summary we have m constraints g(x ( t ) ,u ( t ) , t )= ( C , S ) - (g l . . . . . gin). For example, in aeronautics we often have position, velocity and mass as

state variables, angle of attack, thrust and direction of thrust as control variables and we wish to minimize the total flight time t for to maximize the payload. Typical constraints are constraints for the thrust, dynamic pressure constraints or constraints on the flight path over certain ground domains.

In economics we may have production rate, amount of capital or number of employed people as state variables, gross investments and expenditures for education as control variables and our aim is to obtain full employment by stable growth. As constraints we must ensure that the living standard does not fall beyond a certain limit.

There are also applications to nonstandard problems (cf. Feichtinger and Mehlmann [10]).

2. The numerical solution

For classical problems and some special weakly nonlinear low dimensional systems the solution can be obtained analytically from the necessary and sufficient conditions of optimality, see e.g. section 5.1. But to obtain a solution of dynamic systems described by strongly nonlinear differential equations, see e.g. section 5.2, it is necessary to use numerical methods. For a first survey these methods can be classified into two types.

2.1. NECESSARY CONDITIONS FROM CALCULUS OF VARIATIONS

The indirect methods are based on the calculus of variations or the maximum principle. Under certain assumptions (see e.g. Bryson and Ho [1], Hestenes [14]) the following first order necessary conditions for an optimal trajectory are valid: There exist an n-vector function of adjoint variables ~(t) and an m-vector function v(t) , such that with the so-called Hamiltonian function

H = ~Tf+ vTg (5)

a multi-point boundary value problem in canonical form with piecewise defined differential equations results for t o < t < tf:

~H .~ = ~ = f , (6)

Page 3: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Butirsch, Methods for trajectory optimization 359

~,= ~H _~T~f_v T~)__g.g ---~-X = -~X Ox' (7)

o _ g . ( 8 )

The optimal control is determined by minimizing H with respect to u. For example, for H nonlinear in u we may use for to < t < tf

0 H = ~ T b f + v T O g 3u ~ ~ = 0 (9)

and the Legendre-Clebsch condition ~ZH/~u,~3uk positive semidefinite. We have additional (trivial) differential equations for t) and the switching points qi in which the constraints become active or inactive. Additional constraints at initial, end and interior points may hold. The numerical procedure described in sections 3 and 4 is also able to handle optimal singular arcs. However, for the sake of simplicity, this case is not discussed here.

To obtain solutions from these necessary conditions we may use methods which are based on the special structure of these necessary conditions, e.g. so-called gradient methods (see e.g. Gottlieb [ t 2], Tolle [25], Bryson and Ho [ 1 ], Chernousko and Lyubushin [8] and Miele [18]).

Alternatively, we obtain the controls u(t) from 3H/~u = 0 analytically or numerically using Newton's method, and we may use a method for the solution of general boundary value problems such as the multiple shooting method (see e.g. [2,23]) or a collocation method (see e.g. Dickmanns and Well [9]).

Contrary to other methods the multiple shooting method has the advantage that all kinds of constraints are allowed and very accurate results can be obtained. However, a rather good initial approximation of the optimal trajectory is needed and a rather large amount of work has to be done by the user to derive the adjoint differential equations. Moreover, the user has to know a priori the switching structure of the constraints. This can be derived by means of homotopy techniques. For a description of useful techniques in conjunction with multiple shooting for the numerical solution of constrained optimal control problems the reader is referred to [3].

All in all, the user must have a deep insight into the physical and mathematical nature of the optimization problem.

2.2. DIRECT SOLUTION OF THE OPTIMAL CONTROL PROBLEM

In direct approaches the optimal control problem is transformed into a nonlinear

programming problem. In a first approach, this can be done with a so-called direct shooting method

through a parameterization of the controls u(t). For this we choose u(t) from a finite dimensional space of control functions and use explicit numerical integration to satisfy the differential eqs. (1), see e.g. Williamson [27], Kraft [17], Horn [15], Bock and Plitt [5], to cite only a few of the many papers.

Page 4: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

360 O. yon Stryk, R. Bulirsch, Methods for trajectory optimization

In a second approach, u(t) and x(t) are chosen from finite dimensional spaces

u ~ span {/~1 . . . . . /~p }, U = ~ O~i~t i , O~ i E IR, ( 1 0 ) i=1 q

x ~ span{~l . . . . . 3~q}, X ----- Z ~ j . ~ j , ~ j ~.IR. (11) j=l

Compared with the first approach this has the additional advantage that the computationally expensive numerical integration of the differential eqs. (1) can be avoided. In common approaches piecewise polynomial approximations are used (cf. Renes [22], Kraft [17], Hargraves and Paris [13]). Approximations as finite sums of the Chebyshev expansions of x(t) and u(t) are also possible but not easy to handle in the presence of path constraints (see e.g. Vlassenbroek and van Dooren [26]). The differential eqs. (1) and the path constraints (4) are only satisfied at discrete points. The resulting nonlinear program is

Minimize ~ ( I 0 , Y = (a l . . . . . ap,fl~ . . . . . ~q, tf), y ~ IR p +q+l, (12)

subject to a(Y) = 0, b(Y) < O. (13)

The differential equations, initial and end point conditions and path constraints enter the constraint functions a and b of the nonlinear program.

The nonlinear programming problem is solved by using either a penalty function method or methods of augmented or modified Lagrangian functions such as sequential quadratic programming methods.

The advantage of the direct approach is that the user does not have to be concerned with adjoint variables or switching structures.

One disadvantage of direct methods is that they produce less accurate solutions than indirect methods: By solving numerically several difficult optimal control problems from aeronautics, we found that in practice the minimum functional value is obtained with relative low accuracy (i.e. errors of about one percent). Increasing the dimension of the finite dimensional space does not necessarily yield better values for the extremely complicated problems arising from aerodynamics. However, this "quantity" of one percent can be a crucial part of the payload in a space flight mission (cf. Callies et al. [6], Chudej et al. [7]).

A second disadvantage is that the discretized optimal control problems have sometimes several minima. Applying the direct methods to the discretized problem they often end up in one of these "pseudominima". This solution, however, can be quite a step away from the true solution satisfying all the necessary conditions from variational calculus resulting, e.g., in a 20 percent worse functional value. Examples of such problems are reported by Bock et al. [16] and by [24].

To overcome these disadvantages it is necessary to combine direct with indirect methods. In the following, we present a special direct method used in conjunction with multiple shooting.

Page 5: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Bulirsch, Methods for trajectory optimization 361

3. A direct method

The basic ideas of this direct collocation method were outlined by Renes [22], Kraft [17], Hargraves and Paris [13]. Several additional practical features are added such as selection of initial values, node selection, node refinement, accuracy check and convergence improving features as, for example, scaling of variables, additional constraints, special treatment of angles [24].

A discretization of the time interval

t o = t I < t 2 < . . . < t N = tf (14)

is chosen. The parameters Y of the nonlinear program are the values of control and state variables at the grid points tj, j = 1 . . . . . N, and the final time tf:

Y = (u(t l) . . . . . u(tN), X(t 1) . . . . . X(tN), tN) E IR N(t + n)+ I (15)

The controls are chosen as piecewise linear interpolating functions between u(tj) and u(tj + 1) for tj <_ t < 5 + I:

t - - tj Uap p (t) = U(tj ) + tJ+l _ t------~ (U(tj+l) - U(tj )). (16)

Z61

o 0

• ~ j + !

Fig. 1. Approximation of u(t).

The states are chosen as continuously differentiable and piecewise cubic functions b e t w e e n x(tj) and x(tj+ l), ~app(S):= f ( x ( s ) , u ( s ) , s ) , s = t j , t j+l , for tj <_ t < tj+ l,

j = l . . . . . N - l ,

~ , . j ¢ t - tj ~k

c6 = x( t j ) ,

c¢ = h iD,

(17)

(18)

(19)

Page 6: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

362 O. von Stryk, R. Bulirsch, Methods for trajectory optimization

X -,.,

0 0

Fig. 2. Approximation of x(t) and implicit integration scheme.

ci2 = - 3 x ( t j ) - 2hj3~ + 3x(tj+l ) - h j~+l , (20)

= 2 x ( tj ) + h s f j - x( t i+l) + h s f (21)

where

f j := f ( x ( t j ) , u ( t j ) , t j ) , hj := tj+ 1 - t j .

The states are piecewise cubic Hermite interpolating functions. Readers who are not familiar with this term are referred to common textbooks of Numerical Analysis, such as e.g. [23]. The constraints in the nonlinear programming problem are

,, the path constraints of the optimal control problem at the grid points tj:

g(x(tj), u(tj), tj) < O, j = 1 . . . . . N,

* the specified values of the state variables at initial and terminal time,

* and

f (Xapp(t) ,Uapp(t) , t ) -Jqpp(t) = 0 for t = tj +tj+_.________~l j = 1, N - 1 . (22) , * * . ~

Further on, the index "app" for approximation will be suppressed. This way of discretizing x(t) has the advantage that not only the number of parameters of the nonlinear program is reduced (because :~(t/), j = 1 . . . . . N, are not parameters) but also the number of constraints is reduced by this implicit integration scheme (because the constraints ic( t j )=f(x( t j ) ,u( t j ) , t j ) , j = 1 . . . . . N, are fulfilled by the chosen approximation). Other ways of discretizing x(t) do not have this property. For the time being, the nonlinear program is solved by using a method based on sequential quadratic programming due to Gill et al. [11]. This direct collocation method has been successfully applied to difficult constrained optimal control problems such as the minimum accumulated heat descent trajectory of an Apollo capsule with height constraint [24]. Convergence was achieved even in the case that no information was given about the optimal trajectory. Only information of the given data was used.

Page 7: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk~ R. Bulirsch, Methods for trajectory optimization 363

Approximations of the minimum functional value and of the state variables with a relative error of one percent were achieved and were quite satisfactory. Approximations of the optimal control variables, however, were worse compared to the "exact" solution (see figs. 4 and 8). Also the disadvantages of direct methods described above have been observed.

4. The hybrid approach

To overcome the disadvantages of the direct method it would be desirable to combine the good convergence prope~ies of the direct method with the reliability and accuracy of the multiple shooting method. But the switch between both methods is not easy as it is necessary to set up the adjoint differential eqs. (7) and the optimal control laws (9). Also a proper choice of the multiple shooting nodes, initial values of the adjoint variables ~,(t) and the variables v ( t ) and the switching structure is needed in advance.

As for the combination of the methods, the grid points of the direct method yield a good choice for the positions of the multiple shooting nodes. For example, in fig. 6 the final distribution of the 25 grid points obtained by the node selection and refinement described in [24] is marked by crosses on the time axis.

As an additional advantage, reliable estimates for the adjoint variables (that do not explicitly appear in the direct formulation) can be obtained from the parameters and the Lagrangian function of the nonlinear program.

We assume sufficient differentiability for all functions and (only for the purpose of illustration) n = 1, l = 1, m = 0.

Evaluation of the approximations of u(t) and x( t ) of the direct method from section 3 at the center t i + 1/2 := (tl + ti + 1)/2 of each discretization interval yields

U(ti+ll2 ) = 1 (Ui + Ui+l ), (23)

1 (Xi +Xi+l) + t i+18t i ( f ( x i , u i , t i ) - - f ( X i + l , U i + l t i+l)), (24) X(ti+lt2 ) = ~

_ 3(Xi+l - -Xi) 1 ( f ( x i , u i t i ) + f ( X i + l , U i + l , t i + l ) ) ' (25) "~(ti+l/2) -- 2(ti+l -- t i) -- -~

i = 1 ..... N - I .

Here the notation

ui := U(ti) , X i := X(ti), i = 1 . . . . . N , (26)

has been used, where u~ and x i are the parameters of the nonlinear program. Furthermore

the relations

~u( ti+l/2 ) - 0 = ~u( ti-1/2 ) (27) ~xi ~xi '

Page 8: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

364 O. von Stryk, R. Bulirsch, Methods for trajectory optimization

OX(ti+ll2) = 1__+ ti+l - t i Of(xi,ui,tl) (28) ~x i 2 8 bx '

~X( t i - l / 2 ) = 1___ ti -- ti-I ~ f ( x i , u i , t i ) (29) Oxi 2 8 Ox "

O:c(ti+l/2) 3 1 Of(xi,ui,ti) = ( 3 0 )

Ox i 2(ti+ 1 - t i) 4 Ox '

~X( t i - l l 2 ) 3 1 Of(xi,ui,tl) = ÷ (31) Ox i 2 ( t i - t i_ l ) 4 Ox

are needed. The Lagrangian of the associated nonlinear program from section 3 is

N-1 L(Y ,# ) = qa(XN,tN)- ~_~#j(f(x(tj+l/2),u(tj+l/2)tj+l/2)--2(ti+l/2)), (32)

j=1

with # = (/.q . . . . . ]AN- I) • IRN - I

A solution of the nonlinear program fulfills the necessary first order conditions of Kuhn and Tucker. In detail, we find among others for i = 2 . . . . . N - 1

o = )

--].ti(~f(x(ti+l/2)'U(ti+ll2)'ti+ll2) ~JT(fi+I/2 ) 1 3xi ~xi "

(33)

Substitution of (27) - (31) into (33), the chain rule of differentiation, and some basic calculations lead to

~L 3 ( #i I-ti-1 1 1 ~f(xi ,ui , t i ) ~ X i = t i+ 1 - - t i t i -- ti_ 1 4 ~X (#i-1 + # i )

1( ~f(x(ti-ll2)'U(ti-l/2),ti-l/2) Of(x(li+ll2)'U(ti+ll2)'ti+l/2) 1 - 7 #i-1 bx ~ #i bx

Of(xi,ui,ti)Iti--ti-1 ti+ ti 1 4 ~x ---- if-- #i-1 ~ - #i . (34)

For convenience, we now suppose an equidistant grid, i.e.

ti+l - ti = h = tf - to N - 1 ' i = l . . . . . N - 1 . (35)

Page 9: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Bulirsch, Methods for trajectory optimization 365

Introducing the abbreviations

J~ := f (x i 'u i ' t i ) , J~+l/2 := f(x(ti+ll2),U(ti+il2),ti+ll2), (36)

eq. (34) can be rewritten as

OL = - 3 ( # i - #i-1)

Oxi

43x (/zi-1 q-#i)--'2~i-l~-"-ff~x -- ~i ~X i "

-ff-~- t#i-1 - #i ). (37)

By using Taylor's theorem

/ - + o ( h ) , / 2 - - xOZ + O ( h ) ' (38)

we obtain an adjoint difference equation for #;, valid for i = 2 . . . . . N - 1,

OL _ 3 #i - #i-1 Oxi 2 h

3 (#i + # i - 1 ) - ~ + O(h) 4

= 0. (39)

By keeping t = t i fixed and letting h ---> 0 by increasing the number of grid points N---> ,,~, eq. (39) converges to the adjoint differential equation

12 (ti) = -Id (ti) Of(x( t l )' u(ti )' ti) Ox

So we use

(40)

~t , ( t i+ l l2 ) = O'.(--#i), cr=const. >0 , i = 2 ..... N - l , (41)

as an estimate for ~(t) with a scaling factor or. For all optimal control problems of Mayer type, tr can be easily determined by using the additional end point condition for 2(ty) from calculus of variations. Relation (41) was used in the examples of section 5.

Obviously, an estimate for the multiplier function v(t) appearing in (5)-(9) in the presence of constraints g can also be obtained by this approach.

The examples show that the switching structure for the constraints on the state variables will be approximated in a satisfactory way by a solution of the direct method. However, the switching structure of the constraints on the control variables will not be approximated as well due to the bad approximation of the control variables. At this point, further refinements are required.

Nevertheless, this hybrid approach has been successfully applied to several test examples and new real-life problems with unknown solutions as, for example, the maximum range trajectory of a hangglider [4].

Page 10: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

366 O. von Stryk, R. Bulirsch, Methods for trajectory optimization

5. Numerical examples

5.1. THE BRACHISTOCHRONE PROBLEM

As a first example and in order to illustrate the properties of the direct method for estimating adjoint variables the well-known classical Brachistochrone problem was chosen. Here, the numerical solution from the direct collocation method is compared with the exact solution. As for the formulation of the problem the notation of Bryson and Ho [1] is used, see section 2.7, problem 6 (the gravity acts in the direction of the y-axis):

Minimize J[O] = tf,

subject to the differential equations

(42)

Jc(t) = ~V~y(t) cos~9(t), g = 9.81, (43)

~(t) = ~ y ( t ) sin O(t), 0 < t < t f ,

and the prescribed values at initial and terminal time

(44)

x(O) = O, x ( t f ) = 1, (45)

y(0) = 0, y( t f ) free. (46)

The control O(t) is the angle of the tangent of the trajectory (x( t), y( t) ). The necessary conditions, derived from calculus of variations, can be solved

analytically; and we obtain for the state and control variables of the optimal trajectory in 0 < t <_ tf:

1 ( cot - sin cot), co=~f-~, (47) x( t ) = -y

y(t) = 2 s in2 (2 t), (48)

1 O(t) = ~ ( ~ - cot), (49)

and the adjoint variables

~,x ( t ) = - ~ ~gg ,

;I.y (t) = ~,x COt(2 t ) •

The final time and minimum functional value is

t f = ~gg .

(50)

(51)

(52)

Page 11: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Bulirsch, Methods for trajectory optimization 367

-y OO°oi

-.25

-. 50

-.75

-I .00

27

~ "'. .25 ,50 .75 l . O 0

Fig. 3. The (x(t),- y(t)) trajectory in the plane.

1.50

1,25

1.00

.75

.50

.25

0 .00 0 .00 • lo .20 .30 .40 .50

Fig. 4. The optimal conta'ol O versus time.

Page 12: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

368 O. von Stryk, R. Bulirsch, Methods for trajectory optimization

o o°oi

- 1 . 0 0

- 2 . O0

- 3 . 0 0

- 4 . O0

L

oo . t

i i

Fig. 5. The adjoint variable ~ versus time.

Figures 3 to 5 show the initial trajectory (- - -) of the direct method for 5 equidistant grid points, the solution of the direct method ( . . . . . ) for 10 grid points and the analytic solution (-). In the figures there is no visible difference between the approximated and the exact state variables x and y. The minimum functional value is achieved with an error of 7/1000 percent. Obviously, the singularity of A.y(t) at t = 0 affects the quality of the approximation of O(t) in the neighborhood of t = 0.

It should be noted that due to the singularity of ~( t ) at t = 0, the problem cannot be solved by multiple shooting when using this formulation. An additional refinement as, e.g., a local finite Taylor series is therefore necessary.

5.2. THE APOLLO REENTRY PROBLEM

To illustrate the properties of the hybrid approach we solve another well- known but rather difficult problem of finding the minimum accumulated heat descent trajectory of an Apollo capsule (cf. [23,24] and Pesch [21]).

The differential equations of this two dimensional model are for 0 < t < t/:

~, _ S go sin y 2mP(~)V2CD(U ) (1+ ~)2, (53)

= Rs in y, (54)

= l - - ~ c o s y , (55)

Page 13: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. yon Stryk, R. Bulirsch, Methods for trajectory optimization 369

~" = -~m p( ~) vct` (u) +

dt= CV3~P~ ) ,

vcos 7 go cos 7 (56) R ( I + ~ ) v ( l+ ~) 2 '

(57)

where the abbreviations

c o (u) = Coo + Cot ̀ cos u, Coo = 0.88, Cot ̀ = 0.52, (58)

cL(u) = ct` o sinu, ct` o = -0.505, (59)

P ( ~ ) = P o e x p ( - f l R ~ ) , Po = 2.3769x10-3, (60)

S = 50000, go = 3.2172 × 10 -4, R = 209.0352, (61) rn

~ = 1 0.235 ' c = 2 0 , N = 4 , (62)

have been used. The state variables are the velocity v, the normalized height ~, the range over ground 5, the flight path angle 7and the accumulated heat q. The control variable is the angle of attack u. The final time tf is free. The prescribed values at initial and terminal time are

v(o) = 0.35,

~(o) = 4/R,

~(o) =o, 7(0) = -5 .75. ~/180,

q(O) = o,

v( t / )=0 .0165 ,

~ ( t f ) = 0.75530/R,

i f ( t / )= 51.6912,

7( i f) free,

q ( t : ) free.

The functional to be minimized is

J[u] = q(t/).

The adjoint differential eqs. (7) from calculus of variations are

;t, v = - 3 c v 2 ~'-'-~-'A,q fp (~ )'~ + 2--'~p(~)(2 v/t, vco (u) - / t , rct, (u))

~ s i n T ~ cos r (~'~' + go z~ + , ~ ) - - - T - , ~ , -T~(t,--k-- v2(1+ , )

(63)

(64)

(65)

Page 14: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

370 O. yon Stryk, R. Bulirsch, Methods for trajectory optimization

~ _ 1 - ~ 3 f f ~ - ~ _ 2 ~ R p ( ~ ) ( V 2 A v C o ( U ) _ - -~pKcv ~ lT ,~q vZrcL(u))

o in, cos,' 'o - 2/~v (1 + ~)3 ( 1 + ~ ) 2 7(1 + ~ - - - - - - ~ '

;/,;. = o,

)~7¢=1--~R ~r v(l+¢) ~(1+¢)2 ~;L, ,

~q =0 .

Furthermore, we have the additional conditions

/~r(tf) = O, /~q(tf) = 1, H(tf) = O,

and the optimal control law

= ( bcL(u) ~H S p ( ~ ) v )],~, bu 2m bu

Oco u) va,,, ~u )=0.

(66)

(67)

(68)

(69)

(70)

( 7 0

150. O0

I00.00

50. O0

O. O0 -

0.00 100 • O0 2 0 0 . O0 3 0 0 . OO 4 0 0 . O 0

Fig. 6. The height of the capsule versus time.

ta ,

Page 15: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Bulirsch, Methods for trajectory optimization 371

.IOE-O1

.50E-02

O . O O E + O 0 0

- . 5 0 E - 0 2

- . I O E - O 1

- . 1 5 E - O 1

- . 2 0 E - O 1

! )0 / 100 .00

/ /

/ / /

/ /

/ i /

"%-- ",.,.~., 200. O0 .,~.~'~'~'~'- 300. O0 ~" . , , ,., , 0 0 . O0 l ~ l

\

Fig. 7. The adjoint variable of the height versus time.

[oZeg] 180 .00

9 0 . 0 0

0.00 0

- 9 0 . 0 0

- 1 8 0 . 0 0

i.~.~ .~ i i i

i i I

, I I I

0 0 200. O0 800. O0 i400. O0

il A i I \ ~ I

! % /

\/ \ / .......

% .,,- ",,. ./

Fig. 8. The angle of attack versus time.

Page 16: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

372 O. yon Stryk, R. Bulirsch, Methods for trajectory optimization

An initial trajectory for the iteration process is generated at nine equidistant grid points from the given prescribed values of the state variables at initial and final time. The direct collocation method converges in several refinement steps. Additional grid points had to be added in order to obtain a 25 grid point solution.

By an automatic procedure the number and positions of multiple shooting nodes and the values of state and adjoint variables are obtained from the solution of the direct method.

From these starting values the multiple shooting method (cf. [2, 19,20,23]) converges to a very accurate solution.

The error in the achieved functional value and the final time of the solution of the direct method compared with the multiple shooting solution was about one percent.

Figures 6 to 8 show the height of the capsule, the adjoint variable of the height and the control angle of attack, the initial (- - -) trajectory, the result of the direct method ( . . . . . ) and the solution of the multiple shooting method (-). In addition, fig. 6 also shows the initial and final distribution of the grid points of the direct method marked by crosses.

6. Conclusions

We have demonstrated that a combination of direct and indirect methods is a very promising way to obtain the numerical solution of nonlinear optimal control problems.

The switch between both methods in the case of general nonlinear constraints on the control and state variables is currently studied. First numerical results are encouraging.

Nevertheless, the solution of a difficult real-life optimal control problem cannot be obtained without any insight into the mathematical and physical nature of the solution of the optimal control problem.

References

[1] A.E. Bryson and Y.--C. Ho, Applied Optimal Control, Rev. Printing (Hemisphere, New York, 1975). [2] R. Bulirsch, Die Mehrzielmethode zur numerischen LOsung yon nichtlinearen Randwertproblemen

trod Aufgaben der optirnalen Steuerung, DLR, Oberpfaffenhofen, Germany, Report of the Carl- Cranz-Gesellschaft (1971). Reprint: Department of Mathematics, Munich University of Technology (1985).

[3] R. Bulirsch, F. Montrone and H.J. Pesch, Abort landing in the presence of a windshear as a minimax optimal control problem. Part 1: Necessary conditions. Part 2: Multiple shooting and homotopy, Schwerpunktprogramm der DFG: Anwendungsbezogene Optimierung und Steuerung, Report No. 210 (1990), ]. Optim. Theory Appl. (1991), to appear.

[4] R. Bulirsch, E. Nerz, H.J. Pesch and O. yon Stryk, Maximum range trajectory of a hangglider through a thermal, in preparation.

[5] H.G. Bock and K.J. Plitt, A multiple shooting algorithm for direct solution of optimal control problems, IFAC 9th World Congress, Budapest, Hungary (1984).

Page 17: DIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION · PDF fileDIRECT AND INDIRECT METHODS FOR TRAJECTORY OPTIMIZATION O. yon STRYK and R. BULIRSCH Mathematisches Institut

O. von Stryk, R. Bulirsch, Methods for trajectory optimization 373

[6] R. Callies and R. Bulirsch, Optimale Flugbahn einer Raumsonde zum Planetoiden Vesta, Jahrbuch der DGLR 11(1990)895-904.

[7] K. Chudej, R. Bulirsch and K.D. Reinsch, Optimal ascent and staging of a two-stage space vehicle system, Jahrbuch der DGLR I(1990)243-249.

[8] F.L. Chernousko and A.A. Lyubushin, Method of successive approximations for optimal control problems (survey paper), Opt. Contr. Appl. Meth. 3(1982)101-114.

[9] E,D. Dickmanns and K.H. Well, Approximate Solution of Optimal Control Problems Using Third Order Hermite Polynomial Functions, Lecture Notes in Computational Science, Vol. 27 (Springer, Heidelberg, 1975)pp. 158-166.

[10] G. Feichtinger and A. Mehlmann, Planning the unusual: Applications of control theory to nonstandard problems, Acta Appl. Math. 7(1986)79-102.

[11] P.E. Gill, W. Murray, M.A. Saunders and M.H. Wright, User's Guide for NPSOL (version 4.0), Report SOL 86-2, Department of Operations Research, Stanford University, California (1986).

[12] R.G. Gottlieb, Rapid convergence to optimum solutions using a min-H strategy, AIAA J. 5(1967) 322-329.

[13] C.R. Hargraves and S.W. Paris, Direct trajectory optimization using nonlinear programming and collocation, AIAA J. Guidance 10(1987)338-342.

[14] M.R. Hestenes, Calculus of Variations and Optimal Control Theory (Wiley, 1966). [15] M.K. Horn, Solution of the optimal control problem using the software package STOMP, 8th IFAC

Workshop on Control Applications of Nonlinear Programming and Optimization, Paris (1989). [16] J. Konzelmann, H.G. Bock and R.W. Longrnan, Time optimal trajectories of elbow robots by direct

methods, Proc. AIAA Guidance, Navigation, and Control Conf., Boston (1989) AIAA Paper 89-3530-CP.

[17] D. Kraft, On converting optimal control problems into nonlinear programming codes, in: NATO ASI Series, Vol. F15, Computational Mathematical Programming, ed. K. Schittkowski (Springer, 1985) pp. 261-280.

[18] A. Miele, Gradient algorithms for the optimization of dynamic systems, in: Control and Dynamic Systems, ed. C.T. Leondes, Vol. 16 (Academic Press, 1980) pp. 1-52.

[19] H.J. Oberle, Numerische Berechnung optimaler Steuerungen yon Heizung und Kt~hlung ftlr ein realistisches Sormenhausmodell, Habilitationsschrift, Munich University of Technology, Germany (1982), Report No. M8310 (1983).

[20] H.J. Oberle and W. Grimm, BNDSCO - a program for the numerical solution of optimal control problems, Deutsche Forschungs- und Versuchsanstalt ftir Luft- und Raumfahrt (DLR), Oberpfaffenhofen, Germany, DLR IB 515-89/22 (1990).

[21] H.J. Pesch, Real-time computation of feedback controls for constrained optimal control, Part 2: A correction method based on multiple shooting, Optim. Contr. Appl. Meth. 2(1989)147-171; see also: Schwerpunktprogramm der DFG: Anwendungsbezogene Optimierung und Steuerung, Reports no. 8 and 14 (1987).

[22] J.J. Renes, On the use of splines and collocation in a trajectory optimization algorithm based on mathematical programming, National Aerospace Lab. Amsterdam, The Netherlands, NLR-TR78016 U (Sept. 1978).

f23] J. Stoer and R. Bulirsch, Introduction to Numerical Analysis, 2rid rev. ed. (Springer, 1983). i24] O. von Stryk, Ein direktes Verfahren zur n~iherungsweisen Bahnoptimierung yon Luft- und

Raumfahrzeugen unter Berticksichtigung yon BeschrL, akungen, (a) Diploma Thesis, Department of Mathematics, Munich University of Technology, Germany (May

1989); (b) Lecture at the Institute for Flight Systems Dynamics, DLR, Oberpfafferthofen, Germany (June

16th 1989); (c) Annual Scientific Conf. of the GAMM, Hannover, Germany (1990), Zamm 71, 6(1991)T705-

T706. [25] H. Tolle, Optimierungsverfahren (Springer, Berlin, 1971). [26] J. Vlassenbroek and R. van Dooren, A Chebyshev technique for solving nonlinear optimal control

problems, IEEE Trans. Aut. Contr. AC-33(1988)333-340. [27] W.E. Williamson, Use of polynomial approximations to calculate suboptimal controls, AIAA J.

9(1971)2271 - 2273.