User’s Manual for GPOPS Version 5.0:
A MATLAB
R
Software for Solving Multiple-Phase
Optimal Control Problems Using hp–Adaptive
Pseudospectral Methods
Anil V. Rao
University of Florida
Gainesville, FL 32607
David Benson
The Charles Stark Draper Laboratory, Inc.
Cambridge, MA 02139
Christopher L. Darby
Brendan Mahon
Camila Francolin
Michael Patterson
Ilyssa Sanders
University of Florida
Gainesville, FL 32607
Geoffrey T. Huntington
Blue Origin, LLC
Seattle, WA
August 2011
2
Acknowledgments
The software GPOPS was developed in response to a demand from the research and academic community for a
MATLAB software for solving complex optimal control problems. Since the original release of GPOPS in the
Fall of 2008, the methods and the software have undergone extensive changes. Originally the software utilized
the Gauss pseudospectral method, but more research in the area of pseudospectral methods for solving
optimal control has led us to the current version of the software that implements the Radau pseudospectral
method. In addition, we now offer a code that implements an hp–adaptive mesh refinement algorithm that
iteratively determines a mesh that accurately distributes the collocation points. The bulk of the changes to
GPOPS are internal, that is, the user-interface has changed only slightly from earlier versions of the code.
The authors of GPOPS hope sincerely that the code is useful.
Disclaimer
This software is provided “as is” and free-of-charge. Neither the authors nor their employers assume any
responsibility for any harm resulting from the use of this software. The authors do, however, hope that users
will find this software useful for research and other purposes.
Preface to The GPOPS Software
It is noted that GPOPS has been designed to work with the nonlinear programming solver SNOPT.
1
The
current version of GPOPS now includes a restricted version of SNOPT. Next, GPOPS has been re-written
so that now the objective function and constraint Jacobian derivatives can be estimated using built-in finite-
differencing, sparse complex-step differentiation, or forward mode automatic differentiation. In addition,
GPOPS still retains the ability to use the forward mode automatic differentiator INTLAB. It is noted that
INTLAB can be downloaded from http://www.ti3.tu-harburg.de/rump/intlab/. Commercial use of
INTLAB requires a license which can be obtained by contacting Professor Siegfried Rump via e-mail at
rumptu-harburg.de.
Changes in GPOPS Version 5.0
All of the changes in GPOPS Version 5.0 are internal. Specifically, the mesh refinement method used in
GPOPS has been updated to be more robust from that which was used in GPOPS Version 4.x. In addition,
the automatic scaling routine has been revised and this modification has been found to work significantly
better than the previous automatic scaling routine. It is noted that users of GPOPS 4.x will not see any
changes in syntax to the software, but it is expected (hoped) that this new version of GPOPS will run more
efficiently in comparison to Version 4.x
Licensing Agreement
By downloading, using, modifying, or distributing GPOPS , you agree to the terms of this license agreement.
This license gives you extremely GENEROUS RIGHTS, so if you do not agree to the terms of this agreement,
you may not proceed further with using, using, modifying, or distributing GPOPS.
License for GPOPS Software
This is a license for the software General Pseudospectral Optimal Control Software (GPOPS ). The license
for GPOPS is based on the Simple Public License. In the same spirit as the Simple Public License, the
language for the GPOPS License is similar to that of GPL 2.0. The words are different, but the goal is the
same: to guarantee for all users the freedom to share and change software. If anyone wonders about the
meaning of the GPOPS License, they should interpret it as consistent with GPL 2.0.
3
The GPOPS License applies to the software’s source and object code and comes with any rights that
I have in it (other than trademarks). You agree to the GPOPS License simply by downloading, copying,
distributing, or making a derivative work of the software. You get the royalty-free right to
• Use the software for any purpose;
• Make derivative works of it (this is called a ”Derived Work”);
• Copy and distribute it and any Derived Work.
If you distribute the software or a Derived Work, you must give back to the community by
• Prominently noting the date of any changes you make;
• Leaving other people’s copyright notices, warranty disclaimers, and license terms in place;
• Providing the source code, build scripts, installation scripts, and interface definitions in a form that is
easy to get and best to modify;
• Licensing it to everyone under the terms of this license agreement without adding further restrictions
to the rights provided;
• Conspicuously announcing that it is available under this license.
Restrictions for Use and Distribution of GPOPS
GPOPS is a completely free software both for use and for redistribution. Furthermore, while it may be used
within commercial organizations, it is not for sale or resale. The only exception to the sales restriction above
is that GPOPS may be included as a part of a free open-source software (for example, a distribution of the
Linux operating system). When distributing GPOPS with a free operating system, no fee beyond the price
of the operating system itself may be added (that is, you cannot profit from the redistribution of GPOPS ).
GPOPS is not for commercial use with the exception that it may be used by commercial organizations
for internal research and development. Any use of GPOPS by commercial organizations that involve the
presentation of results for profit-making purposes is strictly prohibited. In addition, there are some things
that you must shoulder:
• You get no warranties of any kind;
• If the software damages you in any way, you may only recover direct damages up to the amount you
paid for it (that is, you get zero if you did not pay anything for the software);
• You may not recover any other damages, including those called ”consequential damages.” (The state
or country where you live may not allow you to limit your liability in this way, so this may not apply
to you).
The GPOPS License continues perpetually, except that your license rights end automatically if
• You do not abide by the ”give back to the community” terms (your licensees get to keep their rights
if they abide);
• Anyone prevents you from distributing the software under the terms of this license agreement.
• You sell the software in any manner with the one exception listed above.
In addition, to the license given above, the authors of GPOPS request that the following documents be
cited in any publication where GPOPS was used to obtain the results:
(1) Rao, A. V., Benson, D. A., Darby, C. L., Patterson, M. A., Francolin, C., Sanders, I., and Huntington, G.
T., ”Algorithm 902: GPOPS , A MATLAB Software for Solving Multiple-Phase Optimal Control Prob-
lems Using the Gauss Pseudospectral Method,” ACM Transactions on Mathematical Software, Vol. 37,
No. 2, April–June, 2010, Article 22, 39 pages.
4
(2) Benson, D. A., Huntington, G. T., Thorvaldsen, T. P., and Rao, A. V., ”Direct Trajectory Optimization
and Costate Estimation via an Orthogonal Collocation Method, Journal of Guidance, Control, and
Dynamics, Vol. 29, No. 6, November–December 2006, pp. 1435–1440.
(3) Garg, D., Patterson, M. A., Darby, C. L., Francolin, C., Huntington, G. T., Hager, W. W., and Rao,
A. V., ”Direct Trajectory Optimization and Costate Estimation of Finite-Horizon and Infinite-Horizon
Optimal Control Problems Using a Radau Pseudospectral Method,” Computational Optimization and
Applications, Vol. 49, No. 2, June 2011, pp. 335–358.
(4) Garg, D., Patterson, M. A., Hager, W. W., Rao, A. V., Benson, D. A., and Huntington, G. T., ”A Unified
Framework for the Numerical Solution of Optimal Control Problems Using Pseudospectral Methods,”
Automatica, Vol. 46, No. 11 November 2010, pp. 1843-1851.
(5) Garg, D., Hager, W. W., and Rao, A. V., ”Pseudospectral Methods for Solving Infinite-Horizon Optimal
Control Problems,” Automatica, Vol. 47, No. 4, April 2011, pp. 829–837.
The GPOPS software is provided “as is” without warranty of any kind, expressed or implies, including but
not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In
no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether
in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the
use or dealings in the software.
CONTENTS 5
Contents
1 Introduction to General Pseudospectral Optimization Software (GPOPS ) 6
1.1 Radau Pseudospectral Method Employed by GPOPS . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Organization of GPOPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Notation Used Throughout Remainder of This Manual . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Constructing an Optimal Control Problem in GPOPS . . . . . . . . . . . . . . . . . . . . . . 8
1.5 Preliminary Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Constructing an Optimal Control Problem Using GPOPS 8
2.1 Syntax for Input Structure setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Syntax for Structure setup.funcs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Syntax for limits Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.4 Syntax for linkages Array of Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.5 Syntax of Each Function Specified in Structure setup.funcs . . . . . . . . . . . . . . . . . . 14
2.6 Syntax of Cost Functional Specified in setup.funcs.cost . . . . . . . . . . . . . . . . . . . . 14
2.7 Syntax for Differential-Algebraic Equations Function Specified in setup.funcs.dae . . . . . 15
2.8 Syntax of Event Constraint Function Specified in setup.funcs.event . . . . . . . . . . . . . 16
2.9 Syntax of Linkage Constraint Function Specified in setup.funcs.link . . . . . . . . . . . . . 18
2.10 Specifying an Initial Guess of The Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.11 Scaling of Optimal Control Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3 Specification of Parameters for Mesh Refinement 20
4 Different Options for Specification of Derivatives 20
4.1 Complex-Step Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.2 Analytic Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 Output from an Execution of GPOPS 27
6 Useful Information for Debugging a GPOPS Problem 28
7 GPOPS Examples 28
7.1 Hyper-Sensitive Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.2 Bryson-Denham Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.3 Multiple-Stage Launch Vehicle Ascent Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.4 Minimum Time-to-Climb of a Supersonic Aircraft . . . . . . . . . . . . . . . . . . . . . . . . . 45
8 Concluding Remarks 52
- 1
- 2
前往页