Generalized Gradient Algorithm
Generalized Gradient Algorithm
J. GUIDANCE
J. GUIDANCE
Appendix
By expanding the A matrix with the B matrix as its first column, the following approximate expressions for the zeros may be derived (neglecting unimportant contributions) CW.)/2] a, - K0/(2Mc)[CL - (c/iy)\Cm +C m / 2 ] (Al)
Restoration Algorithm (SGRA),1 which can solve general trajectory optimization problems. Goh and Teo2 proposed a unified control parameterization approach that converts an optimal control problem into a parameter optimization problem. These algorithms employ a sequence of cycles, each cycle having two phases. One phase improves the performance index while the other reduces the constraint violations. In this Note, a generalized gradient is found that improves the performance index and reduces the constraints at the same time.
a2 0
(A2)
Problem Statement
The general problem that will be considered has the following form: min / = <[JC(1),7T] + P L(*, H, TT, r) dr Jo subject to *=/(*, W , T T , T) (2) (1)
Downloaded by Beihang University (CNPIEC - XI'AN BRANCH) on April 14, 2013 | http://arc.aiaa.org | DOI: 10.2514/3.20597
Equations (Al) agree with the well-known approximations for the short-period mode (aa, un ), thus resulting in Eqs. (2). With regard to Eqs. (A2), the following phugoid approximations resulting from expanding the A matrix may be considered
(A3)
Combining these expressions with Eqs. (A2), the correlation described by Eqs. (2) results.
S(x, u, TT, T) = 0
(4)
References
'Roskam, J., "Airplane Flight Dynamics and Automatic Flight Controls," Roskam Aviation and Engineering Corp., Lawrence, KS, Pts.2 I, II, 1979/82. Brockhaus, R., Flugregelung II, R. Oldenbourg Verlag, Munich,
3 Powers, B. G., "Phugoid Characteristics of a YF-12 Airplane with Variable-Geometry Inlets Obtained in Flight Tests at a Mach Number of 42.9," NASA TP 1107, 1977. Berry, D. T., "Longitudinal Long-Period Dynamics of Aerospace Craft," Proceedings of the AIAA Atmospheric Flight Mechanics Conference, AIAA, Washington, DC, 1988, pp. 254-264. 5 Gilyard, G. B., and Burken, J. J., "Development and Flight Test Results of an Autothrottle Control System at Mach 3 Cruise," NASA
1979.
where u is the m x 1 control vector, x is the n x 1 state vector, TT is the p x 1 parameter vector, r is the normalized time in (0,1), ^ is the q x 1 terminal constraint vector, and S is the r x 1 path equality constraint vector. A meaningful problem requires: r<m and q<n + p* < n +/?, where p* is the number of parameters in il/.1 Let us first consider the problem without terminal constraints. If there is no path equality constraint, the problem can be handled in the conventional way:
T \L+\ (f-x)] L
J
dr
TP 1621, 1980.
Jo
(L + \Tf + \Tx) dr
Define
I
/v + \T)dx
'M
H dr] 67T
0
J
dr
(5)
QUALITY constraints represent a general class of path constraints in trajectory optimization, 1 since many types of constraints can be converted into path equality constraints. Miele1 has developed an algorithm named Sequential Gradient Received Sept. 18, 1989; revision received Feb. 5, 1990. Copyright 1990 by the American Institute of Aeronautics and Astronautics, Inc. All rights reserved. *Assistant Professor, Department of Aerospace Engineering and Mechanics. Member AIAA. tProfessor, Department of Aeronautics and Astronautics. Fellow AIAA. JPh.D. Candidate, Department of Aeronautics and Astronautics.
When path constraints exist, the following r equations must be satisfied to maintain the path constraints to first order: Sx5x +Sudu
(6)
If the pa^h equality constraints contain control components, \S,fSu\ * Q for Q <: T < 1. The general solution of the algebraic equation, Eq. (6), is du = - DltSxdx - D^bv + d*u (7)
NOV.-DEC. 1990
ENGINEERING NOTES
1167
PS0
Hr-HuDuST)dT\dv
[(Hx + X^ - HDuSx)5x + //M6*w] dr (8)
where j 1,..., q, together with the requirement: Sud*u + = 0. Now, adjoin Eq. (16) to Eq. (15) with q Lagrange multipliers^:
dJ = dJ +
(17)
Choose
where
HUDUSX
6ir= -
and
Downloaded by Beihang University (CNPIEC - XI'AN BRANCH) on April 14, 2013 | http://arc.aiaa.org | DOI: 10.2514/3.20597
Then we would like to choose d*u such that Hud*u <0 and Sud*u = 0. The use of the Lagrange multiplier method gives
6*11= - [Hu - HUDUSU]T (11)
- DuSu)Hf - KPDUS0
where dx can be obtained by forward integrating Eq. (12) with zero initial conditions and substitutions from Eqs. (10) and (11) and the "feedback" relation, Eq, (7). Then du is found from Eq. (7), and changes may be made as ATT = Kdir and Aw = Kdu, where K is the stepsize. It is also possible to reduce path constraint violations at the same time. This requires choosing du and 6?r to make the path constraint variations: dS = - pS0, where p>0, S0 is the path constraint vector evaluated at the current step, and dS = Sxdx +Su5u + SV67T. Therefore
Sx5x
=0 (13)
where
The same arguments are carried out as before until selection of 6*M, which has to satisfy Hu6*w <0 and Sud*u + pS0 = 0. The use of the Lagrange multiplier method gives
d*u = - (I - DUSU)H* - pDuS0 (14)
where 6*w consists of two parts. The first term improves the performance index while maintaining the path constraints to the first order. The second term reduces the path constraints. The impulse response method,3'4 is employed to seek the solution of the problem when terminal constraints are also present. Define the following quantities:
The existence of Q ~ ] is one necessary condition for the algorithm to converge (the controllability condition). The other is that the path constraints must contain control components.
Algorithm
P<? - (^v), +
Jo
(H? - //y>AA) dr
j = 0,..., q
The algorithm is conveniently divided into two phases. The feasibility phase is designed to obtain a solution satisfying both the path constraints and the terminal constraints: min //. = -
STSdr
(19)
W=-[H</>-H</>DuSx]
From Eq. (8), we have
67 =
(15)
(16)
the path constraints and/or terminal is necessary. The optimization phase uses the results of the feasibility phase as the initial guesses. The variations in control and parameter vectors are made to improve the performance index as well as to reduce the constraint violations.
1168
J. GUIDANCE
12) Compute the generalized gradients:
J. GUIDANCE
(m x n) (m xp) (m x 1)
and check the following stopping criteria:
// dr < e0 and P^P,
e0
(m x m)
TT L, Jx Jx ~ J
( i x n) (ixp)
(n x n) (n xp)
Downloaded by Beihang University (CNPIEC - XI'AN BRANCH) on April 14, 2013 | http://arc.aiaa.org | DOI: 10.2514/3.20597
where 1%, = Ini and 7,^ = /,. Now, the algorithm can be stated step by step as follows; 1) Guess the initial control and parameter vectors: M(T), TT. 2) Integrate forward: x = '/'(*, M, TT, r) with Jt(0) given. 3) Compute the gradients: Sx,Su,SvJx,fu,fV9\I/x,\l/^ and 7F. If 7 F <e/, go to step 8, where e/is a preselected small number, e.g., 1Q~4. Otherwise, continue. 4). Integrate backward: X = -5/5-//XT' with (X)! =
where e0 is a preselected small number as e/, e.g., 10~ 4 . If the preceding conditions are satisfied and /F<C/, the algorithm has converged. If the preceding conditions are satisfied but IP > e/, go to step 3. Otherwise, go on. _ 13) Integrate forward: 5x=fx5x -JJ*l'-fuHl with (dx)0 = 0. Compute the improving control variations: du = Sxdx
14) Improve controls and parameters: ATT = KP* and AM - Kdu. Go to step. 7. The program also should be terminated when the number of cycles exceeds a specified value.
+ SSI-.HI-
Comments
User's inputs include the feasibility accuracy e/, the optimal accuracy e 0 , the stepsize K, the terminal constraint improving factor e, and the path constraint improving factor p. The optimality phase takes q + 3 integrations of nth order equation at each iteration. This algorithm uses the forward integrations of the system equation and the perturbation equation in feedback form and the backward integration of the adjoint equations. These integrations are numerically stable. In addition, the optimality phase reduces the constraint violations while optimizing the performance. As a result, the feasibility phase only needs to be inserted once with a proper p.
6) Improve controls and parameters. With the steepest descent method, Aw = - KFhl and ATT = - KFpl- Go to step 2. 7) Integrate forward: *=/(*, w , TT, r) with #(0) given. 8) Compute the following generalized gradients:
5o 5o ^ Sx SK lm Lx Lu Lv
fxfuf*
fyx $j*
for j = 0,1,..., q
and
IF
min / = tf '
*i = (/*2
*2 = hU
Then, choose p and compute the generalized gradients with respect to controls:
H$=H$lm+-pS0 and H = H^/m
The control is bounded as I < u < I. Solution of this optimization problem involves "bangbang" control. 3 The control inequality constraint can be converted into a path equality constraint 5 by introducing an auxiliary control u2 and denoting the original control as u\:
W2
+ U; - I = 0
1 1) Choose K and e. Compute the following fory = 1,..., q and then JJL using Eq. (18).
/ =
NOV.-PEC. 1990
Downloaded by Beihang University (CNPIEC - XI'AN BRANCH) on April 14, 2013 | http://arc.aiaa.org | DOI: 10.2514/3.20597
ENGINEERING NOTES
1169
i.o
1.0
The computer program is coded in C language. Details of the algorithm and more examples can be found in Ref. 6.
Conclusion
0.4
0.4
0.0 1.0
0.0 1.0
A generalized gradient algorithm has been proposed and verified for trajectory optimization problems with possible path equality constraints, terminal equality constraints, and control parameters. The generalized gradient was shown to improve the performance index and reduce the constraints at the same time.
0.0
Acknowledgments
0.4-
-1.0
Normalized Time
0.0
0.0
-5
This research was supported by NASA Grant 191 from the NASA Ames Research Center, monitored by Heinz Erzberger. The authors would like to thank Jiangang Dai and Jinyi Chen for helpful discussions.
References
'Miele, A., "Gradient Algorithms for the Optimization of Dynamic Systems," Control and Dynamic Systems, Advances in Theory and Application, edited by C. Leondess, Vol. 16, Academic, New York, 1980. 2 Goh, C. J., and Teo, K. L., "Control Parametrization: A Unified Approach to Optimal Control Problems with General Constraints," Automatica, Vol. 24, No. 1, 1988, pp. 3-18. 3 Bryson, A. E., and Ho, Y. C., Applied Optimal Control, Hemisphere, Washington, DC, 1975. 4 Lee, A., "Optimal Landing of a Helicopter in Autorotation," Ph.D. Thesis, Dept. of Aeronautics and Astronautics, Stanford Univ., Stanford, CA, July 1986. 5 Jacobson, D.'H., and Lele, M, M., "A Transformation Technique for Optimal Control Problems with a State Variable Inequality Constraint," IEEE Transactions on Automatic Control, Vol. AC-14, No. 5, 1969. 6 Zhao, Y., "Optimimal Control of an Aircraft Flying Through a Downburst," Ph.D. Thesis, Stanford University, Stanford, CA, June 1989.
In the current implementation, the steepest descent scheme is employed in the feasibility phase. The program parameters are: Kltf = 0.2, Kpf = 0.2, Kuo = 0.05, Kpo = 0.05, p = 0.6, = 0.1, ' e/ = 0.0001, and e0 = O.OQl, where Kuf, Kpf denote the stepsizes for control and parameter, respectively, in the feasibility phase, whereas Kuo, Kpo are in the optimization phase. The optimal minimum time is found to be t* = 2.0023. This compares well with th analytical solution obtained in Ref. 3 (tf = 2.000). The basic feature of a "bang-bang*' control is clearly demonstrated. The results are plotted in Fig. 1.