<%BANNER%>

Efficient Solutions to Nonlinear Optimal Control Problems using Adaptive Mesh Orthogonal Collocation Methods

Permanent Link: http://ufdc.ufl.edu/UFE0045236/00001

Material Information

Title: Efficient Solutions to Nonlinear Optimal Control Problems using Adaptive Mesh Orthogonal Collocation Methods
Physical Description: 1 online resource (181 p.)
Language: english
Creator: Patterson, Michael A
Publisher: University of Florida
Place of Publication: Gainesville, Fla.
Publication Date: 2013

Subjects

Subjects / Keywords: control -- optimal
Mechanical and Aerospace Engineering -- Dissertations, Academic -- UF
Genre: Mechanical Engineering thesis, Ph.D.
bibliography   ( marcgt )
theses   ( marcgt )
government publication (state, provincial, terriorial, dependent)   ( marcgt )
born-digital   ( sobekcm )
Electronic Thesis or Dissertation

Notes

Abstract: In a direct collocation method, a continuous-time optimal control problem is transcribed to a finite-dimensional nonlinear programming problem. Solving this nonlinear programming problem as efficiently as possible requires that sparsity at both the first- and second-derivative levels be exploited. In this dissertation the first and second derivative nonlinear programming problem sparsity is exploited using Gaussian quadrature orthogonal collocation at Legendre-Gauss-Radau points. Furthermore, a variable-order mesh refinement method is developed that allows for changes in both the number of mesh intervals and the degree of the approximating polynomial within a mesh interval. This mesh refinement employs a relative error estimate based on the difference between the Lagrange polynomial approximation of the state and a Legendre-Gauss-Radau quadrature integration of the dynamics within a mesh interval. This relative error estimate is used to decide if the degree of the approximating polynomial within a mesh should be increased or if the mesh interval should be divided into sub-intervals. Finally, a reusable software package is described that efficiently computes solutions to multiple phase optimal control problems. This software package exploits the sparse structure of the Radau collocation method, while also implementing the aforementioned variable-order mesh refinement method.
General Note: In the series University of Florida Digital Collections.
General Note: Includes vita.
Bibliography: Includes bibliographical references.
Source of Description: Description based on online resource; title from PDF title page.
Source of Description: This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Statement of Responsibility: by Michael A Patterson.
Thesis: Thesis (Ph.D.)--University of Florida, 2013.
Local: Adviser: Rao, Anil.

Record Information

Source Institution: UFRGP
Rights Management: Applicable rights reserved.
Classification: lcc - LD1780 2013
System ID: UFE0045236:00001

Permanent Link: http://ufdc.ufl.edu/UFE0045236/00001

Material Information

Title: Efficient Solutions to Nonlinear Optimal Control Problems using Adaptive Mesh Orthogonal Collocation Methods
Physical Description: 1 online resource (181 p.)
Language: english
Creator: Patterson, Michael A
Publisher: University of Florida
Place of Publication: Gainesville, Fla.
Publication Date: 2013

Subjects

Subjects / Keywords: control -- optimal
Mechanical and Aerospace Engineering -- Dissertations, Academic -- UF
Genre: Mechanical Engineering thesis, Ph.D.
bibliography   ( marcgt )
theses   ( marcgt )
government publication (state, provincial, terriorial, dependent)   ( marcgt )
born-digital   ( sobekcm )
Electronic Thesis or Dissertation

Notes

Abstract: In a direct collocation method, a continuous-time optimal control problem is transcribed to a finite-dimensional nonlinear programming problem. Solving this nonlinear programming problem as efficiently as possible requires that sparsity at both the first- and second-derivative levels be exploited. In this dissertation the first and second derivative nonlinear programming problem sparsity is exploited using Gaussian quadrature orthogonal collocation at Legendre-Gauss-Radau points. Furthermore, a variable-order mesh refinement method is developed that allows for changes in both the number of mesh intervals and the degree of the approximating polynomial within a mesh interval. This mesh refinement employs a relative error estimate based on the difference between the Lagrange polynomial approximation of the state and a Legendre-Gauss-Radau quadrature integration of the dynamics within a mesh interval. This relative error estimate is used to decide if the degree of the approximating polynomial within a mesh should be increased or if the mesh interval should be divided into sub-intervals. Finally, a reusable software package is described that efficiently computes solutions to multiple phase optimal control problems. This software package exploits the sparse structure of the Radau collocation method, while also implementing the aforementioned variable-order mesh refinement method.
General Note: In the series University of Florida Digital Collections.
General Note: Includes vita.
Bibliography: Includes bibliographical references.
Source of Description: Description based on online resource; title from PDF title page.
Source of Description: This bibliographic record is available under the Creative Commons CC0 public domain dedication. The University of Florida Libraries, as creator of this bibliographic record, has waived all rights to it worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
Statement of Responsibility: by Michael A Patterson.
Thesis: Thesis (Ph.D.)--University of Florida, 2013.
Local: Adviser: Rao, Anil.

Record Information

Source Institution: UFRGP
Rights Management: Applicable rights reserved.
Classification: lcc - LD1780 2013
System ID: UFE0045236:00001


This item has the following downloads:


Full Text

PAGE 1

EFFICIENTSOLUTIONSTONONLINEAROPTIMALCONTROLPROBLEMS USING ADAPTIVEMESHORTHOGONALCOLLOCATIONMETHODS By MICHAELPATTERSON ADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOL OFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENT OFTHEREQUIREMENTSFORTHEDEGREEOF DOCTOROFPHILOSOPHY UNIVERSITYOFFLORIDA 2013

PAGE 2

c r 2013MichaelPatterson 2

PAGE 3

ForMyParents 3

PAGE 4

ACKNOWLEDGMENTS Firstandforemost,IwouldliketothankDr.AnilV.Raoforta kingachanceon me,providingmeanopportunitytoachievebeyondanygoalIc ouldimagine,andnever lettingmesettleforgoodenough.Iwouldalsoliketothankm ycommitteemembers Dr.GloriaWiens,Dr.NormanFitz-Coy,andDr.WilliamHager fortheirtime,guidance, andexperience.Next,Iwouldalsoliketothankeveryonetha tIhaveworkedwith intheVehicleDynamicsandOptimizationLaboratory(VDOL) .Specically,Iwould liketothankArthurScherichforbeingmyfriendfromthesta rt,DivyaGargforher collaboration,ChrisDarbyforhisworkethic,CamilaFranc olinforalwaysbeingthemost interestingpersonintheroom,MatthewWeinsteinforhisex cellenthelpincompleting ourresearchonautomaticdifferentiation,KathrynSchube rtforputtingupwithmy distractions,andBegumSenses,FengjinLiu,andDarinTosc anoforalwayshavingafun personnearbywhenIwasworking. 4

PAGE 5

TABLEOFCONTENTS page ACKNOWLEDGMENTS ..................................4 LISTOFTABLES ......................................8 LISTOFFIGURES .....................................9 ABSTRACT .........................................11 CHAPTER 1INTRODUCTION ...................................12 2MATHEMATICALBACKGROUND .........................19 2.1BolzaOptimalControlProblem ........................19 2.2NumericalMethodsforOptimalControl ...................22 2.2.1IndirectMethods ............................22 2.2.1.1Indirectshootingmethod ..................23 2.2.1.2Indirectmultipleshootingmethod .............24 2.2.2DirectMethods .............................26 2.2.2.1Directshooting .......................27 2.2.2.2Multipledirectshooting ...................27 2.2.2.3Directcollocation ......................29 2.3FamilyofLegendre-GaussDirectCollocationMethods ..........29 2.3.1TransformedContinuousBolzaProblem ...............29 2.3.2LG,LGR,andLGLCollocationPoints ................30 2.3.3Legendre-Gauss-LobattoOrthogonalCollocationMet hod .....32 2.3.4Legendre-GaussOrthogonalCollocationMethod ..........33 2.3.5Legendre-Gauss-RadauOrthogonalCollocationMetho d .....35 2.3.6BenetsofUsingLegendre-Gauss-RadauCollocationM ethod ..36 2.4NumericalOptimization ............................37 2.4.1UnconstrainedOptimization ......................37 2.4.2EqualityConstrainedOptimization ..................38 2.4.3InequalityConstrainedOptimization .................40 3LEGENDRE-GAUSS-RADAUCOLLOCATIONSPARSESTRUCTURE .....42 3.1NotationandConventions ...........................42 3.2OptimalControlProblem ...........................44 3.3Variable-OrderLegendre-Gauss-RadauCollocationMet hod .......47 3.4Legendre-Gauss-RadauCollocationMethodNLPDerivati ves .......53 3.4.1GradientofObjectiveFunction ....................55 3.4.2ConstraintJacobianDifferentialForm ................57 3.4.3ConstraintJacobianIntegralForm ..................62 3.4.4LagrangianHessian ..........................67 5

PAGE 6

3.4.4.1Hessianofendpointfunction ................68 3.4.4.2Hessianofcollocationpointfunctiondifferentia lform ...71 3.4.4.3Hessianofcollocationpointfunctionintegralfor m ....77 3.5Discussion ...................................83 3.6Example .....................................84 3.7Conclusions ...................................95 4 hp ADAPTIVEMESHREFINEMENT ........................96 4.1MotivationforNew ph AdaptiveCollocationMethod .............96 4.2BolzaOptimalControlProblem ........................99 4.3Legendre-Gauss-RadauCollocationMethod ................103 4.4 ph AdaptiveMeshRenementMethod ....................105 4.4.1ErrorEstimateinEachMeshInterval .................105 4.4.2RationaleforErrorEstimate ......................106 4.4.3EstimationofRequiredPolynomialDegreewithinaMes hInterval .109 4.4.4 p Then h StrategyforMeshRenement ...............110 4.5Examples ....................................112 4.5.1Hyper-SensitiveProblem ........................113 4.5.2TumorAnti-AngiogenesisProblem ..................119 4.5.3ReusableLaunchVehicleEntry ....................120 4.6Discussion ...................................127 4.7Conclusions ...................................127 5 GPOPS-II :MULTIPLEPHASEOPTIMALCONTROLSOFTWARE .......129 5.1GeneralMultiplePhaseOptimalControlProblems .............129 5.2Legendre-Gauss-RadauCollocationMethod ................130 5.2.1Single-PhaseOptimalControlProblem ................131 5.2.2Variable-OrderLegendre-Gauss-RadauCollocationM ethod ....134 5.3MajorComponentsof GPOPS-II .......................136 5.3.1NLPStructure ..............................138 5.3.1.1NLPvariables ........................138 5.3.1.2NLPobjectiveandconstraintfunctions ...........140 5.3.2SparseStructureofNLPDerivativeFunctions ............142 5.3.3OptimalControlProblemScalingforNLP ..............143 5.3.4ComputationofDerivativesRequiredbytheNLPSolver ......146 5.3.5DeterminingtheOptimalControlFunctionDependenci es .....147 5.3.6AdaptiveMeshRenement ......................148 5.3.7AlgorithmicFlowof GPOPS-II .....................149 5.4Examples ....................................150 5.4.1Hyper-SensitiveProblem ........................151 5.4.2ReusableLaunchVehicleEntry ....................154 5.4.3SpaceStationAttitudeControl .....................157 5.4.4KineticBatchReactor .........................160 5.4.5Multiple-StageLaunchVehicleAscentProblem ...........169 6

PAGE 7

5.5Discussion ...................................172 5.6Limitationsof GPOPS-II ............................172 5.7Conclusions ...................................174 REFERENCES .......................................175 BIOGRAPHICALSKETCH ................................181 7

PAGE 8

LISTOFTABLES Table page 3-1NLPperformancewithoutexploitingsparsity ....................93 3-2NLPperformanceexploitingsparsity ........................94 3-3SummaryofNLPconstraint,Jacobian,andLagrangianHes siansizes .....94 4-1Hyper-sensitiveproblemerroranalysis .......................116 4-2Hyper-sensitiveproblemmeshrenementanalysis ................118 4-3Tumoranti-agiogenesismeshrenementanalysis ................122 4-4Reusablelaunchvehicleentryproblemmeshrenementan alysis ........124 5-1Meshrenementhistoryforhyper-sensitiveproblem ...............154 5-2Performanceof GPOPS-II onthereusablelaunchvehicleentryproblem ....157 5-3Vehiclepropertiesformultiple-stagelaunchvehiclea scentproblem .......171 5-4Constantsusedinthelaunchvehicleascentoptimalcont rolproblem ......171 8

PAGE 9

LISTOFFIGURES Figure page 2-1SchematicshowingLGL,LGR,andLGorthogonalcollocati onpoints ......31 3-1CompositeLegendre-Gauss-Radaudifferentiationmatr ix ............52 3-2CompositeLegendre-Gauss-Radauintegrationandvalue differencematrices .54 3-3GeneralJacobiansparsityfortheLegendre-Gauss-Rada udifferentialscheme .61 3-4GeneralJacobiansparsityfortheLegendre-Gauss-Rada uintegralscheme ..66 3-5GeneralHessiansparsityfortheLegendre-Gauss-Radau differentialScheme .76 3-6GeneralHessiansparsityfortheLegendre-Gauss-Radau integralscheme ...82 3-7Solutiontoorbit-raisingoptimalcontrolproblem ..................90 3-8Orbit-raisingoptimalcontrolproblemJacobiansparsi ty ..............91 3-9Orbit-raisingoptimalcontrolproblemHessiansparsit y ..............92 4-1Motivationexamplesabsoluteerrors ........................100 4-2Motivationexamplesabsoluteerrorestimates ...................108 4-3Errorbasedapproximatepolynomialdegreeincrease ..............110 4-4Hyper-sensitiveproblemsolutionandmeshrenementhi story .........117 4-5Hyper-sensitiveproblemmeshrenementsolutionsnear endpoints .......118 4-6Tumoranti-angiogenesisproblemsolutionandmeshren ementhistory ....121 4-7Reusablelaunchvehicleentryproblemsolutiononnalm esh ..........125 4-8Reusablelaunchvehicleentryproblemmeshhistory ...............126 5-1Schematicoflinkagesformultiple-phaseoptimalcontr olproblem ........131 5-2Single-phasecompositeLegendre-Gauss-Radaudiffere ntiationmatrix .....137 5-3Single-phasecompositeLegendre-Gauss-Radauintegra tionmatrix ......137 5-4Single-phasecompositeLegendre-Gauss-Radau E matrix ............142 5-5DifferentialschemeNLPconstraintJacobianandLagran gianHessian .....144 5-6integralschemeNLPconstraintJacobianandLagrangian Hessian .......145 5-7Flowchartofthe GPOPS-II algorithm ........................150 9

PAGE 10

5-8Solutiontohyper-sensitiveoptimalcontrolproblem ................152 5-9Solutiontohyper-sensitiveproblemnear t =0 and t = t f ............153 5-10Meshrenementhistoryforhyper-sensitiveproblem ...............153 5-11Reusablelaunchvehicleentryproblemsolution ..................156 5-12Statesolutiontospacestationattitudecontrolprobl em ..............160 5-13Controlsolutiontospacestationattitudecontrolpro blem ............161 5-14Statesolutiontokineticbatchreactorproblem ..................165 5-15Controlsolutiontokineticbatchreactorproblem .................166 5-16Phase1statesolutiontokineticbatchreactorproblem ..............167 5-17Phase1controlsolutiontokineticbatchreactorprobl em .............168 5-18Solutionofmultiple-stagelaunchvehicleascentprob lem .............173 10

PAGE 11

AbstractofDissertationPresentedtotheGraduateSchool oftheUniversityofFloridainPartialFulllmentofthe RequirementsfortheDegreeofDoctorofPhilosophy EFFICIENTSOLUTIONSTONONLINEAROPTIMALCONTROLPROBLEMS USING ADAPTIVEMESHORTHOGONALCOLLOCATIONMETHODS By MichaelPatterson May2013 Chair:Dr.AnilRaoMajor:MechanicalEngineering Inadirectcollocationmethod,acontinuous-timeoptimalc ontrolproblemis transcribedtoanite-dimensionalnonlinearprogramming problem.Solvingthis nonlinearprogrammingproblemasefcientlyaspossiblere quiresthatsparsityat boththerst-andsecond-derivativelevelsbeexploited.I nthisdissertationtherstand secondderivativenonlinearprogrammingproblemsparsity isexploitedusingGaussian quadratureorthogonalcollocationatLegendre-Gauss-Rad aupoints.Furthermore, avariable-ordermeshrenementmethodisdevelopedthatal lowsforchangesin boththenumberofmeshintervalsandthedegreeoftheapprox imatingpolynomial withinameshinterval.Thismeshrenementemploysarelati veerrorestimatebased onthedifferencebetweentheLagrangepolynomialapproxim ationofthestateand aLegendre-Gauss-Radauquadratureintegrationofthedyna micswithinamesh interval.Thisrelativeerrorestimateisusedtodecideift hedegreeoftheapproximating polynomialwithinameshshouldbeincreasedorifthemeshin tervalshouldbedivided intosub-intervals.Finally,areusablesoftwarepackagei sdescribedthatefciently computessolutionstomultiplephaseoptimalcontrolprobl ems.Thissoftwarepackage exploitsthesparsestructureoftheRadaucollocationmeth od,whilealsoimplementing theaforementionedvariable-ordermeshrenementmethod. 11

PAGE 12

CHAPTER1 INTRODUCTION Thegoalofsolvinganoptimalcontrolproblemistodetermin ethecontrolofa dynamicalsystemthatminimizes(ormaximizes)adesiredpe rformanceindexwhile simultaneouslysatisfyingtheconstraintsofthesystem.S olutionstooptimalcontrol problemscanbefoundusingmanydifferenttechniques.Anal ytictechniquesforsolving optimalcontrolproblemsinvolvendingthenecessarycond itionsforoptimality,usually bymeansofcalculusofvariations[ 1 2 ].Unfortunatelyasproblemsgrowinsizeand complexity,itbecomesincreasinglydifculttondasolut ionanalytically.Consequently, optimalcontrolproblemsgenerallyneedtobesolvedusingn umericalmethods. Numericalmethodsforsolvingoptimalcontrolproblemsfal lintotwocategories: directmethodsandindirectmethods[ 3 4 ].Inadirectmethodtheoptimalstateand controlarefoundbydirectlyminimizing(ormaximizing)th eperformanceindexsubjectto theconstraintsofthesystem.Indirectmethodsinvolvend ingthenecessaryconditions foroptimality,andthendeterminingthestate,control,an dcostatethatsatisfythese conditions.Indirectmethodscanproduceveryaccuratesol utions,butaredependent uponndingthenecessaryconditionsforoptimalitywhichc anbeverydifcult.Direct methodsmaynotoffertheaccuracyofindirectmethods,butd onotrequirethatthe necessaryconditionsforoptimalitybederived.Also,dire ctmethodsarenotas dependentonaprioriknowledgeoftheoptimalsolution.Bec auseoftheexibilityof directmethods,theywillbethefocusofthisdissertation. Overthepasttwodecades,aparticularclassofdirectmetho dscalled direct collocationmethods havebecomeapopularchoiceforndingnumericalsolutions tooptimalcontrolproblems.Inadirectcollocationmethod ,thestateisapproximated usingasetofbasis(ortrial)functionsandtheconstraints arecollocatedatspecied setofpointsinthetimeintervalofinterest.Directcolloc ationmethodsareemployed eitheras h p or hp –methods[ 5 – 9 ].Inan h –method,thestateisapproximatedusing 12

PAGE 13

manyxedlow-degreepolynomial(e.g.,second-degreeorth ird-degree)meshintervals. Convergenceinan h –methodisthenachievedbyincreasingthenumberofmesh intervals[ 10 – 12 ].Ina p –method,thestateisapproximatedusingaxednumberof meshintervals(usallyonlyasinglemeshintervalisused), andconvergenceisthen achievedbyincreasingthedegreeoftheapproximatingpoly nomial[ 13 – 20 ].Inan hp –method,convergenceisachievedbyincreasingboththenum berofmeshintervals andthedegreeofthepolynomialwithineachmeshinterval[ 21 22 ]. Recently,agreatamountofresearchhasbeenfocusedon orthogonalcollocation methods [ 13 – 20 23 – 29 ].Inaorthogonalcollocationmethod,thecollocationpoin tsare basedonaccuratequadraturerulesandthebasisfunctionsa retypicallyChebyshevor Lagrangepolynomials.Originally,orthogonalcollocatio nmethodswereemployedas p –methods.Forproblemswhosesolutionsaresmoothandwellbehaved,aorthogonal collocationmethodhasasimplestructureandconvergesata nexponentialrate[ 30 – 32 ]. Themostwelldeveloped p –typeorthogonalcollocationmethodsarethe LegendreGaussorthogonalcollocationmethod [ 15 23 ],the Legendre-Gauss-Radauorthogonal collocationmethod [ 18 19 27 ],andthe Legendre-Gauss-Labattoorthogonalcollocationmethod [ 13 ].Morerecently,ithasbeenfoundthatcomputationalefci encyand accuracycanbeincreasedbyusingeitheran h [ 27 ]oran hp orthogonalcollocation method[ 21 22 ]. Whileorthogonalcollocationmethodsarehighlyaccurate, properimplementationis importantinordertoobtainsolutionsinacomputationally efcientmanner.Specically, modernlargescalegradient-basednonlinearprogrammingp roblem(NLP)solvers requirethatrstand/orsecondderivativesoftheNLPfunct ions,orestimatesofthese derivatives,besupplied.Inarst-derivative(quasi-New ton)NLPsolver,theobjective functiongradientandconstraintJacobianareusedtogethe rwithadensequasi-Newton approximationoftheLagrangianHessian(typicallyaBroyd en-Fletcher-Goldfarb-Shanno (BFGS)[ 33 – 36 ]orDavidon-Fletcher-Powell(DFP)[ 37 – 39 ]quasi-Newtonapproximation 13

PAGE 14

isused).Inasecond-derivative(Newton)NLPsolver,theob jectivefunctiongradient andconstraintJacobianareusedtogetherwiththeLagrangi anHessianoftheNLP Lagrangian.Examplesofcommonlyusedrst-derivativeNLP solversinclude NPSOL [ 40 ]and SNOPT [ 41 42 ],whilewellknownsecond-derivativeNLPsolversinclude IPOPT [ 43 ]and KNITRO [ 44 ]. Ingeneral,rst-derivativemethodsforsolvingNLPsaremo recommonlyusedthan second-derivativemethodsbecauseofthegreatchallenget hatarisesfromcomputing antheLagrangianHessian.Itisknown,however,thatprovid ingtheLagrangianHessian cansignicantlyimprovethecomputationalperformanceof anNLPsolveroverusing aquasi-Newtonmethod.Thispotentialforalargeincreasei nefciencyandreliability isparticularlyevidentwhentheNLPissparse.Whilehaving anaccurateLagrangian Hessianisdesirable,evenforsparseNLP'scomputingaHess ianisinefcientifnot doneproperly.Whilecurrentusesoforthogonalcollocatio nmethodshaveexploited sparsityattherstderivativelevel,sparsityatthesecon dderivativelevelhasnotyet beenfullyunderstoodorexploited. BecauseaNLPsperformanceisstronglydependentonthequal ityofthederivatives itrequires,anefcientapproachisrequiredforcomputing therstandsecond derivativesofNLPfunctionsarisingfromadirectorthogon alcollocationmethod[ 29 45 ]. InthisdissertationthesparsestructureoftheLegendre-G auss-Radauorthogonal collocationmethodisdescribed[ 18 19 22 27 ].TheLegendre-Gauss-Radau collocationmethodisthefocusofthisdissertationbecaus eoftheelegantstructure ofthe.Furthermore,theLegendre-Gauss-Radauorthogonal collocationmethod hasthefeaturethattheNLPderivativefunctionscanbeobta inedbydifferentiating onlythefunctionsofthe continuous-timeoptimalcontrolproblem .Becausethe optimalcontrolfunctionsdependuponmanyfewervariables thanthefunctionsof theNLP,differentiatingtheoptimalcontrolproblemfunct ionsreducessignicantlythe computationaleffortrequiredtocomputetheNLPderivativ efunctions.Furthermore,the 14

PAGE 15

NLPderivativefunctionsthatresultfromthetranscriptio noftheLegendre-Gauss-Radau orthogonalcollocationmethodareshowntohaveasparseblo ckstructure. Thesecondpartofthisdissertationfocusesonmeshreneme ntmethodsfor solvingoptimalcontrolproblemsthatemploytheaforement ionedRadaucollocation method.Severalmeshrenementmethodsemployingdirectco llocationmethodshave beendescribedinrecentyears[ 21 22 46 47 ].Reference[ 46 ]describesamethod thatemploysadifferentiationmatrixtoattempttoidentif yswitches,kinks,corners,and otherdiscontinuitiesinthesolutionandusesGaussianqua draturerulestogeneratea meshthatisdenseneartheendpointsofthetimeintervalofi nterest.Reference[ 47 ] employsadensityfunctionandattemptstogenerateaxed-o rdermeshonwhichto solvetheproblem.References[ 21 ]and[ 22 ]describe hp adaptivemethodswherethe errorestimateisbasedonthedifferencebetweenthederiva tiveapproximationofthe stateandtheright-handsideofthedynamicsatthemidpoint sbetweencollocation points.TheerrorestimatesusedinRefs.[ 22 ]and[ 21 ]inducesagreatdealofnoise makingthesemethodscomputationallyintractablewhenahi gh-accuracysolutionis desiredanddonottakeadvantageoftheexponentialconverg encerateofaorthogonal collocationmethod. Inadditiontosparsityexploitation,inthisdissertation computationalefciency isshowntobefurtherimprovedviaanewvariable-ordermesh renementmethod. Themethodisdividedintothreeparts.First,anapproachis developedforestimating therelativeerrorinthesolutionwithineachmeshinterval .Thisrelativeerrorestimate isobtainedbycomparingtheoriginalstatevariabletoahig herorderapproximation ofthestate.Thisrelativeerrorestimateisusedtodetermi neifthedegreeofthe polynomialapproximationshouldbeincreasedorifmeshint ervalsshouldbeadded. Thepolynomialdegreeisincreasedinameshintervalifitis estimatedthatthesolution inthemeshintervalrequiresapolynomialdegreethatisles sthanamaximumallowable degreetosatisfythedesiredtoleranceonthenextmeshiter ation.Otherwise,the 15

PAGE 16

meshisrened.Thisprocessisrepeatedonaseriesofmeshes untilaspecied accuracytoleranceismet.Thedecisiontoincreasethepoly nomialdegreeorrene themeshisbasedonthebasep logarithmoftheratioofthemaximumrelativeerror andtheaccuracytoleranceandisconsistentwiththeknowne xponentialconvergence ofaorthogonalcollocationmethodforaproblemwhosesolut ionissmooth.The effectivenessofthisstrategyisstudiedonthreeexamples thathavedifferentfeatures intheoptimalsolutionand,thus,exercisedifferentaspec tsofthenew hp approach.It isfoundthatthemethodinthisthesisachievesaspeciedac curacytoleranceusinga signicantlysmallerNLPsizewhencomparedwithstandard xed-order h methods. Themethodofthisthesisisfundamentallydifferentfromth eanyofthesepreviously developedmethods.First,inthisthesiswedevelopanappro achthatisbasedon varyingtheorderoftheapproximationineachmeshinterval andusingtheexponential convergencerateofaorthogonalcollocationmethod.Furth ermore,themethodof thisthesisestimatestherelativeerrorusingthedifferen cebetweenaninterpolated valueofthestateandaLegendre-Gauss-Radauquadratureap proximationtothe integralofthedynamics.Thisrelativeerrorestimaterema inscomputationallytractable whenahigh-accuracysolutionisdesiredandreducessigni cantlythenumberof collocationpointsrequiredtomeetaspeciedaccuracytol erancewhencompared withthemethodsofRef.[ 21 ]or[ 22 ].Finally,themeshrenementmethoddeveloped inthisthesisisasimpleyetefcientwaytogeneratemeshes andleadstoreduced computationtimesandincreasedaccuracywhencomparedwit hxed-order h and p methods. Finally,thisdissertationalsodescribesanewoptimalcon trolsoftwarecalled GPOPS-II thatemploystheaforementionedvariable-orderLegendreGauss-Radau orthogonalcollocationmethod.GPOPS-IIrepresentsasign icantadvancementin mathematicalsoftwareoverpreviouslydevelopedsoftware thatemploysGaussian quadratureorthogonalcollocation.Inparticular,itisno tedthatapreviouslydeveloped 16

PAGE 17

Gaussianquadratureorthogonalcollocationsoftwarecall ed GPOPS waspublishedin [ 17 ].While GPOPS-II issimilarto GPOPS inthatbothsoftwareprogramsimplement Gaussianorthogonalcollocation, GPOPS-II isafundamentallydifferentsoftware programthan GPOPS .First, GPOPS employs p (global)collocationineachphaseof theoptimalcontrolproblem.Itisknownthat p collocationschemesarelimitedinthat theyhavedifcultysolvingproblemswhosesolutionschang erapidlyincertainregions orarediscontinuous.Moreover, p methodsbecomecomputationallyintractableas thedegreeoftheapproximatingpolynomialbecomesverylar ge. GPOPS-II ,however, employs hp -adaptivemeshrenementwherethepolynomialdegree,numb erofmesh intervals,andwidthofeachmeshintervalcanbevaried.The hp -adaptivemethodsallow forplacementofcollocationpointsinregionsofthesoluti onwhereadditionalinformation isneededtocapturekeyfeaturesoftheoptimalsolution.Ne xt, GPOPS islimitedin thatitcanonlybeusedwithquasi-Newton(rstderivative) NLPsolversandderivative approximationsareperformedonthelargeNLPfunctions.On theotherhand, GPOPS-II implementsthesparsederivativeapproximationsdescribe dinthisdissertation,by approximatingderivativesoftheoptimalcontrolfunction sandinsertingthesederivatives intotheappropriatelocationsintheNLPderivativefuncti ons,theNLPderivativesare computedwithgreaterefciency.Moreover, GPOPS-II implementsapproximationsto both rstandsecondderivatives.Consequently, GPOPS-II utilizesinanefcientmanner thefullcapabilitiesofamuchwiderrangeofNLPsolvers(fo rexample,fullNewtonNLP solverssuchas IPOPT [ 43 ]and KNITRO [ 44 ])and,asaresult,iscapableofsolvinga muchwiderrangeofoptimalcontrolproblemsascomparedwit h GPOPS Thesoftwaredescribedinthisdissertationemploystheafo rementioned Legendre-Gauss-Radauorthogonalcollocationmethod[ 18 – 20 29 ]inbothdifferential andintegralform.Thekeycomponentsofthesoftwarearedes cribedaredescribedin detailandthesoftwareisdemonstratedonvechallengingo ptimalcontrolproblems. 17

PAGE 18

Thisdissertationisorganizedasfollows..Chapter 2 describesthemathematical backgroundnecessarytounderstandtheconceptsofoptimal control.Anonlinear optimalcontrolproblemisstatedandthecontinuous-time rst-ordernecessary conditionsforthisproblemarederived.Next,numericalme thodsforoptimalcontrol arediscussedusingbothindirectanddirectmethods.Moreo ver,threeorthogonal collocationmethodsaredescribed.Chapter 3 providesadetaileddescriptionof thestructureoftheLegendre-Gauss-Radauorthogonalcoll ocationmethodinboth differentialandintegralforms.Next,anefcientmethodt ocomputetheNLPderivative functionsdirectlyfromthederivativesoftheoptimalcont rolproblemfunctionsis describedalongwiththecomputationalperformancegained byexploitingthisstructure. Chapter 4 describesavariable-ordermeshrenementmethod,aswella samotivation forusingvariable-ordermeshrenementispresentedalong withawaytoaccurately estimatethesolutionerroronthemesh.Furthermore,amesh renementmethodbased ontheexponentialconvergenceoftheorthogonalcollocati onmethodisdeveloped, wherethemeshisrenedasafunctionoftheestimatederrora ndtheminimumand maximumpolynomialallowedineachmeshinterval.Finally, Chapter 5 describesin detailthenewoptimalcontrolsoftwareGPOPS-II. 18

PAGE 19

CHAPTER2 MATHEMATICALBACKGROUND Therstobjectiveofthischapteristoprovideanoverviewo fdifferentnumerical methodsforsolvingoptimalcontrolproblems.Thesemethod saredividedintotwo categories:indirectmethodsanddirectmethods.Thekeyty pesofnumericalmethods withineachofthesecategoriesisdescribed.Thesecondobj ectiveistodescribethe classofdiscretizationmethodsthatareusedasthebasisof thisthesis.Specically, methodsthatemploycollocationusingthefamilyofLegendr e-Gaussquadrature pointsareprovided.Thisfamilyofcollocationpointsincl udesLegendre-Gauss, Legendre-Gauss-Radau,andLegendre-Gauss-Lobattoquadr aturepoints.Moreover, afterprovidingdescriptionsoftheorthogonalcollocatio nmethodsthatarisefromusing thesepoints,ajusticationisgivenastowhythemethodsde velopedintheremainder ofthisdissertationarebasedonLegendre-Gauss-Radaucol location.Finally,thethird objectiveistoprovideashortintroductiontonite-dimen sionalnumericaloptimization. 2.1BolzaOptimalControlProblem Theobjectiveofanoptimalcontrolproblemistodeterminet hestateandcontrol thatoptimizeaperformanceindexsubjecttodynamicconstr aints,boundaryconditions, andpathconstraints.Considerthefollowingoptimalcontr olprobleminBolzaform. Determinethestate, y ( t ) 2 R ny ,control, u ( t ) 2 R ny ,initialtime, t 0 ,andnaltime, t f ,that minimizethecostfunctional J = ( y ( t 0 ), t 0 y ( t f ), t f )+ Z t f t 0 g ( y ( t ), u ( t ), t ) dt (2–1) subjecttothedynamicconstraints d y dt = a ( y ( t ), u ( t ), t ), (2–2) thepathconstraints c ( y ( t ), u ( t ), t ) 0 (2–3) 19

PAGE 20

andboundaryconditions b ( y ( t 0 ), t 0 y ( t f ), t f )= 0 (2–4) wherethefunctions g a c and b aredenedbythefollowingmappings: : R n y R R n y R R n q R g : R n y R n u R R a : R n y R n u R R n y c : R n y R n u R R n c b : R n y R R n y R R n q R n b TheBolzaproblemofEqs.( 2–1 )–( 2–4 )historicallyhasbeensolvedusingabranch ofmathematicscalledcalculusofvariationstoobtainaset ofrst-ordernecessary conditionsforoptimality[ 1 48 49 ].Asolutiontotheoptimalityconditionsiscalled anextremalsolution,andsecond-orderconditionscanbech eckedtoensurethatthe extremalsolutionisaminimum.Unconstrainedoptimizatio nproblemsthatdepend oncontinuousfunctionsoftimerequirethattherstvariat ion, J ( y ( t )) ,ofthecost functional, J ( y ( t )) ,onanoptimalpath y ( t ) ,vanishforalladmissiblevariations y ( t ) suchthat J ( y ( t ) y ( t ))=0. (2–5) Foraconstrainedoptimizationproblem,anextremalsoluti onisgeneratedfromthe continuous-timerst-ordernecessaryconditionsbyapply ingthecalculusofvariations toanaugmentedcost.Theaugmentedcostisobtainedbyappen dingtheconstraintsto thecostfunctionalusingtheLagrangemultipliers.Theaug mentedcostisgivenas J = ( y ( t 0 ), t 0 y ( t f ), t f ) T b ( y ( t 0 ), t 0 y ( t f ), t f ) + Z t f t 0 h g ( y ( t ), u ( t ), t ) ( t ) T (_ y a ( y ( t ), u ( t ), t )) ( t ) T c ( y ( t ), u ( t ), t ) i dt (2–6) where ( t ) 2 R ny ( t ) 2 R nc ,and 2 R nb aretheLagrangemultiplierscorresponding toEqs.( 2–2 ),( 2–3 ),and( 2–4 ),respectively.Thequantity ( t ) iscalledthecostateor 20

PAGE 21

theadjoint.Thevariationwithrespecttoeachfreevariabl eissettozeroasshownin Eq.( 2–5 )resultinginasetofrst-ordernecessaryconditionsforo ptimality.Moreover,it isconvenienttodeterminetherst-orderoptimalitycondi tionsintermsoftheaugmented Hamiltonian.H ( y ( t ), u ( t ), ( t ), ( t ), t )= g ( y ( t ), u ( t ), t )+ T ( t ) a ( y ( t ), u ( t ), t ) T ( t ) c ( y ( t ), u ( t ), t ). (2–7) Therst-orderoptimalityconditionsarethenconvenientl yexpressedas y ( t ) T = @ H @ = a ( y ( t ), u ( t ), t ) ( t ) T = @ H @ y 0= @ H @ u T ( t 0 )= @ @ y ( t 0 ) + T @ b @ y ( t 0 ) T ( t f )= @ @ y ( t f ) T @ b @ y ( t f ) H ( t 0 )= @ @ t 0 T @ b @ t 0 H ( t f )= @ @ t f + T @ b @ t f (2–8) where i ( t )=0 when c i ( y ( t ), u ( t ), t ) < 0, i ( t ) 0 when c i ( y ( t ), u ( t ), t )=0, ( i =1,..., n c ). (2–9) When c ( t ) i < 0 thepathconstraintinEq.( 2–3 )isinactive.Therefore,bymaking ( t ) i =0 ,theconstraintissimplyignoredinaugmentedcost,Furthe rmore,thenegative valueof ( t ) i when c ( t ) i =0 isinterpretedsuchthatimprovingthecostmayonlycome fromviolatingtheconstraint[ 48 ]. Forsomeproblems,thecontrolcannotbeuniquelydetermine d,eitherimplicitlyor explicitly,fromtheseoptimalityconditions.Insuchcase s,theweakformofPontryagin's minimumprinciplecanbeusedwhichsolvesforthepermissib lecontrolthatminimizes theaugmentedHamiltonianinEq.( 2–7 ).If U isthesetofpermissiblecontrols,then 21

PAGE 22

Pontryagin'sminimumprinciplestatesthattheoptimalcon trol, u 2U ,satisesthe condition H ( y ( t ), u ( t ), ( t ), ( t ), t ) H ( y ( t ), u ( t ), ( t ), ( t ), t ), 8 u 2U (2–10) Therst-orderoptimalityconditionsofEq.( 2–8 )deneasetofnecessaryconditions thatmustbesatisedforanextremalsolutionofanoptimalc ontrolproblem.The second-ordersufciencyconditionscanbeimplementedtoc onrmthattheextremal solutionisthedesiredminimumormaximum. 2.2NumericalMethodsforOptimalControl Oftenitisdifculttoobtainanalyticsolutionstooptimal controlproblems. Furthermore,asthecomplexityoftheoptimalcontrolprobl emincreases,nding solutionsviaanalyticalmethodsbecomesintractable(orm aynothaveaanalytic solution).Asaresult,numericalmethodsforsolvingdiffe rentialequations,rootnding, andnumericaloptimizationmustbeemployedtosolvemostop timalcontrolproblems. Numericalmethodsoptimalcontrolfallintooneoftwocateg ories,indirectmethods anddirectmethods.Inanindirectmethod,thecalculusofva riationsisemployedto obtaintherst-orderoptimalityconditionsofEqs.( 2–8 )and( 2–9 ).Moreover,when therst-orderoptimalityconditionsaresatisedanextre malsolutionisobtained.Ina directmethod,thestateand/orcontrolareapproximatedus inganappropriatefunction approximation(e.g.,polynomialapproximationorpiecewi seconstantparameterization). Furthermore,thecostfunctionalisapproximatedasacostf unction.Thecoefcientsof thefunctionapproximationsarethentreatedasoptimizati onvariablesandtheproblem is transcribed toanumericaloptimizationproblem. 2.2.1IndirectMethods Inanindirectmethod,thecalculusofvariationsisemploye dtoobtaintherst-order optimalityconditionsofEqs.( 2–8 )and( 2–9 ).Theseconditionsresultinatwo-point (or,inthecaseofacomplexproblem,amulti-point)boundar y-valueproblem.This 22

PAGE 23

boundary-valueproblemactuallyhasaspecialstructurebe causeitarisesfromtaking thederivativeofaHamiltonianandthisboundary-valuepro blemissolvedusingthe appropriateboundaryconditions.Thebeautyofusinganind irectmethodisthatthe stateandcostatearesolvedforandtheresultingsolutioni sreadilyveriedtobean extremaltrajectory.Thedisadvantageofindirectmethods isthattheboundary-value problemisoftenextremelydifculttosolve,particularly forproblemsthatspanlargetime intervalsorproblemswithinteriorpointconstraints.2.2.1.1Indirectshootingmethod Considerthefollowingboundary-valueproblemthatresult sfromtherst-order optimalityconditionsofEq.( 2–8 ) p ( t )= 264 H T H T y 375 (2–11) withtheboundaryconditions p ( t 0 )= p 0 p ( t f )= p f (2–12) Itisknownthattherst-orderoptimalityconditionsofEq. ( 2–8 )donotprovidethe completesetofboundaryconditions.Inordertondasoluti ontotheboundary-value problem,aninitialguessismadeoftheunknownboundarycon ditionsatoneendofthe interval.Usingthisguess,togetherwiththeknownboundar yconditions,thedynamics ofEq.( 2–11 )arethenintegratedusingnumericalintegrationtechniqu es(e.g.,Euler, Hermite–Simpson,Runge-Kuttaetc.)tondtheboundarycon ditionsattheotherend. Usingforwardintegrationthenalboundaryconditionisde terminedas ~ p f = p 0 + Z t f t 0 p ( t ) dt (2–13) 23

PAGE 24

usingbackwardintegrationtheinitialconditionisdeterm inedas ~ p 0 = p f + Z t 0 t f p ( t ) dt (2–14) Asolutiontotheboundary-valueproblemcanbeobtainedfro mtherootndingproblem where ~ p f p f =0 (or ~ p 0 p 0 =0 ifusingbackwardintegration)wherethevariables aretheunknownboundaryconditions.Thesolutionobtained fromtheboundary-value problemsatisestherst-orderoptimalityconditionsofE q.( 2–8 ),thusprovidinga extremalsolutiontotheoptimalcontrolproblem. Althoughindirectshootingmayseemtobeasimpleapproacht hatyieldstoa low-dimensionalrootndingproblem,itcanbedifculttoi mplementinpractice.First, therst-orderoptimalityconditionsoftheoptimalcontro lproblemarerequiredandcan beverydifculttoderive.Second,thevaluesofthecostate boundaryconditionsare non-intuitive,makingitdifculttoguesstheunknownvalu es.Finally,theerrorfrom numericalintegrationcangrowrapidlywhenintegratingov erlongtimeintervals,ofifthe dynamicschangerapidlyoverthetimeintervalofinterest2.2.1.2Indirectmultipleshootingmethod Considerthefollowingboundary-valueproblemthatresult sfromtherst-order optimalityconditionsofEq.( 2–8 ) p ( t )= 264 H T H T y 375 (2–15) withtheboundaryconditions p ( t 0 )= p 0 p ( t f )= p f (2–16) Itisknownthattherst-orderoptimalityconditionsofEq. ( 2–8 )donotprovidethe completesetofboundaryconditions.Inordertondasoluti ontotheboundary-value problem,thetimedomainisdividedinto K intervals,suchthatthe k th intervalisonthe 24

PAGE 25

domain [ T k 1 T k ] where t 0 = T 0 < T 1 < T K = t f .Moreover,aninitialguessis madefortheunknownboundaryconditionsatoneendofthepro blem,aswellasall valuesforeachinteriorpointcondition p ( T k ) ( k =1,..., K 1) .Thedynamicsarethen numericallyintegratedovereachinterval,usingforwardi ntegration ~ p k = p k 1 + Z T k T k 1 p ( t ) dt k =1,..., K (2–17) orbackwardintegration ~ p k 1 = p k + Z T k 1 T k p ( t ) dt k = K ,...,1, (2–18) Asolutiontotheboundary-valueproblemcanbeobtainedfro mtherootndingproblem where ~ p k p k =0 ( k =1,..., K ) (or ~ p k 1 p k 1 =0 ( k = K ,...,1,) ifusingbackward integration)wherethevariablesaretheunknownboundaryc onditionsandallinterior pointconditions.Thesolutionobtainedfromtheboundaryvalueproblemsatisesthe rst-orderoptimalityconditionsofEq.( 2–8 ),thusprovidingaextremalsolutiontothe optimalcontrolproblem. Indirectmultipleshooting,likeindirectshootingrequir esthattherst-order optimalityconditionsbederived,butunlikeindirectshoo ting,theintegrationisperformed overmanysubintervalsoftheoriginaldomain.Furthermore ,therootndingproblem thatarisesfrommultipleindirectshootingcontainsmorev ariablesandconstraints thentherootndingproblemfromindirectshooting.Althou ghitmayseemthat multipleindirectshootinghasmoredifcultiestheindire ctshootingbecauseofthe largerproblemsize,multipleindirectshootingactuallyh asseveraladvantagesover indirectshooting.Thenumericalintegrationerrorisredu cedbecausetheintegrationis preformedoversmallerintervalsthenwhenusingindirects hooting.Also,thesmaller intervalscanbetterhandledynamicsthathavemultipletim e-scales,increasingthearray ofproblemsthatcanbesolved. 25

PAGE 26

2.2.2DirectMethods Therst-orderoptimalityconditionsofEq.( 2–8 )areoftendifculttoformulate. Furthermore,numericalmethodsthatsolvetheseequations (indirectmethods)generally requireanaccurateinitialguess,whichisoftennon-intui tive.Forthesereasonsdirect methodshavebecomeaverypopularalternativetoindirectm ethods.Ratherthan formulateasetofoptimalityconditions,directmethodstr anscribeorconvertthe innite-dimensionaloptimalcontrolproblemintoanitedimensionaloptimization problemwithalgebraicconstraints.Adirecttranscriptio nmethodhasthreefundamental steps[ 10 ]: Step1: Convertthedynamicsystemintoaproblemwithanitesetofv ariablesand algebraicconstraints. Step2: Solvethenite-dimensionalproblemusingaparameteropti mizationmethod. Step3: Determinetheaccuracyofthenite-dimensionalapproxima tionandif necessaryrepeatthetranscriptionandoptimizationsteps Dependinguponthetypeofdirectmethodemployed,thesizeo fthenonlinear optimizationproblem[ornonlinearprogrammingproblem(N LP)]canberathersmall (e.g.,asinadirectshooting)ormaybequitelarge(e.g.,ad irectcollocationmethod). Itmaybecounter-intuitivethatsolvingthelargerNLPwoul dbepreferredoversolving theboundary-valueproblemofaindirectmethod,butinprac tice,theNLPcanbeeasier tosolve,anddoesnotrequireasaccurateofaninitialguess .Therealsoexistseveral powerfulandwellknownNLPsolverssuchas SNOPT [ 41 42 ], IPOPT [ 43 ]and KNITRO [ 44 ]. Unlikeindirectmethods,indirectmethodsthereisnoneedt odiscretizeand approximatethecostate.However,ifanaccuratecostatees timatecanbegenerated, thisinformationcanhelpvalidatetheoptimalityofthesol utionfromadirectapproach. Consequently,manydirectmethodsattempttoproduceacost ateapproximationbased 26

PAGE 27

ontheLagrangemultipliersinvolvedinthenite-dimensio nalnonlinearoptimization problem.2.2.2.1Directshooting Inthedirectshootingmethodthecontrolisparameterizedu singaspecied functionaloftheform ~ u ( t )= p X i =1 i i ( t ), (2–19) where 1 ,..., p isthesetofcontrolparameters,and 1 ( t ),..., p ( t ) isasetofknown functions.TheBolzaproblemofEqs.( 2–1 )–( 2–4 )isthentransformedtohavethe followingform.Minimizethecost J = ( y ( t 0 ), t 0 y ( t f ), t f )+ Z t f t 0 g ( y ( t ),~ u ( t ), t ) dt (2–20) subjecttothepathconstraints c ( y ( t ),~ u ( t ), t ) 0 (2–21) andboundaryconditions b ( y ( t 0 ), t 0 y ( t f ), t f )= 0 (2–22) wherethestateisfoundas y ( t )= y ( t 0 )+ Z t t 0 a ( y ( t ),~ u ( t ), t ) dt (2–23) wheretheintegralsofEqs.( 2–20 )and( 2–23 )areapproximatedusingnumerical integrationtechniques(e.g.,Euler,Hermite–Simpson,Ru nge-Kuttaetc.).The optimizationproblemisthensolvedtondtheoptimalvalue softheunknown componentsoftheinitialstate,andthe p controlparameters 1 ,..., p thatminimize Eq.( 2–20 ). 2.2.2.2Multipledirectshooting Thedirectshootingtechniquecanalsobeappliedusingbydi vidingthetimedomain intomultipleintervalsknownas multipledirectshooting wherethetimedomainis 27

PAGE 28

dividedinto K intervals,whereeachtimeintervalisonthedomain [ T k 1 T k ] k = 1,..., K where t 0 = T 0 < T 1 < T K = t f .Thecontrolisparameterizedineachinterval as ~ u k ( t )= p k X i =1 ki ki ( t ), k =1,..., K (2–24) where k1 ,..., kp isthesetofcontrolparametersininterval k ,and k1 ( t ),..., kp ( t ) is asetofknownfunctionsininterval k .TheBolzaproblemofEqs.( 2–1 )–( 2–4 )isthen transformedtohavethefollowingform.Minimizethecost J = ( y ( t 0 ), t 0 y ( t f ), t f )+ K X k =1 Z T k T k 1 g ( y k ( t ),~ u k ( t ), t ) dt (2–25) subjecttothepathconstraints c ( y k ( t ),~ u k ( t ), t ) 0 (2–26) theboundaryconditions b ( y ( t 0 ), t 0 y ( t f ), t f )= 0 (2–27) andthecontinuityconstraints y k ( T k )= y k +1 ( T k ), k =1,..., K 1, (2–28) wherethestateisfoundas y k ( t )= y k ( T k 1 )+ Z T k T k 1 a ( y k ( t ),~ u k ( t ), t ) dt k =1,..., K (2–29) wheretheintegralsofEqs.( 2–25 )and( 2–29 )areapproximatedusingnumerical integrationtechniques(e.g.,Euler,Hermite–Simpson,Ru nge-Kuttaetc.).The optimizationproblemisthensolvedtondtheoptimalvalue softheunknown componentsoftheinitialstate y ( t 0 ,andthe p k controlparameters k1 ,..., kp ineach interval k =1,..., K thatminimizeEq.( 2–25 ). 28

PAGE 29

2.2.2.3Directcollocation Directcollocationmethods,whereboththestateandcontro lareparameterized, havebecomeaverypopularclassofmethodsforoptimalcontr oloverthelast twentyyears.Theincreaseinuseofdirectcollocationmeth odsisaresultofthe improvementofNLPsolvers.Inadirectcollocationmethodb oththestateandcontrol areapproximatedusingaspeciedfunctionalform,whereth etwomostcommonforms are localcollocation and globalcollocation .Similartomultipledirectshooting,local collocationmethodsdividethetimedomaininto K intervals,whereeachtimeinterval isonthedomain [ T k 1 T k ] k =1,..., K where t 0 = T 0 < T 1 < T K = t f ,where afunctionalapproximationisappliedtothestateandcontr olineachinterval.Global collocationmethodsapplythefunctionalapproximationto boththestateandcontrolover theentiredomain.Furthermore,typicallyglobalcollocat ionmethodsuseamuchhigher orderfunctionalapproximationoverasingleinterval,whe relocalcollocationmethods usealoworderfunctionalapproximationineachintervalov ermanyintervals.Aspecic classofdirectcollocationmethodscalled orthogonalcollocationmethods ,where collocationisperformedatsetorthogonalGaussian-quadr aturepointsisdescribedin detailinSection 2.3 2.3FamilyofLegendre-GaussDirectCollocationMethods Thissectionwillprovideadetaileddescriptionofdirectc ollocation methodsusingtheLegendre-Gauss-Lobatto(LGL),Legendre -Gauss(LG),and Legendre-Gauss-Radau(LGR)points.TheapproachforLGLco llocationisreferred toastheLegendre-Gauss-Lobattocollocationmethod,thes econdapproachforLG collocation,calledtheLegendre-Gausscollocationmetho d,andathirdapproachfor LGRcollocation,calledtheLegendre-Gauss-Radaucolloca tionmethod. 2.3.1TransformedContinuousBolzaProblem TheBolzaproblemofEqs.( 2–1 )–( 2–4 )isdenedonthetimeinterval t 2 [ t 0 t f ] wheretimeistheindependentvariable.Furthermore,itmay beusefultoredenethe 29

PAGE 30

Bolzaproblemsothattheindependentvariableiscontained onaxeddomain.The independentvariable t canbemappedtoanewindependentvariable 2 [ 1,1] viathe afnetransformation = 2 t t f t 0 + t f + t 0 t f t 0 (2–30) UsingEq.( 2–30 )theBolzaproblemofEqs.( 2–1 )–( 2–4 )canberedenedasfollows. Determinethestate, y ( ) 2 R n ,control, u ( ) 2 R m ,initialtime, t 0 ,andnaltime, t f ,that minimizethecostfunctional J = ( y ( 1), t 0 y (1), t f )+ t f t 0 2 Z 1 1 g ( y ( ), u ( ), ; t 0 t f ) d (2–31) subjecttothedynamicconstraints d y d = t f t 0 2 a ( y ( ), u ( ), ; t 0 t f ), (2–32) thepathconstraints c ( y ( ), u ( ), ; t 0 t f ) 0 (2–33) theboundaryconditions b ( y ( 1), t 0 y (1), t f )= 0 (2–34) TheoptimalcontrolproblemofEqs.( 2–31 )–( 2–34 )willbereferredtoasthe transformedcontinuousBolzaproblem .Itisnotedthattheoptimalcontrolproblemof Eqs.( 2–31 )–( 2–34 )canbetransformedfromthetimeinterval 2 [ 1,1] tothe timeinterval t 2 [ t 0 t f ] viatheafnetransformation t = t f t 0 2 + t f + t 0 2 (2–35) 2.3.2LG,LGR,andLGLCollocationPoints TheLegendre-Gauss(LG),Legendre-Gauss-Radau(LGR),and Legendre-Gauss-Lobatto(LGL)collocationpointslieonth eopeninterval 2 ( 1,1) thehalfopeninterval 2 [ 1,1) or 2 ( 1,1] ,andtheclosedinterval 2 [ 1,1] 30

PAGE 31

h 1 0.5 0 0.5 1 LGL LGR LG tCollocation Points LG Points Do Not Include Either Endpoint LGR Points Include One Endpoint LGL Points Include Both Endpoints Figure2-1.SchematicshowingLGL,LGR,andLGorthogonalco llocationpoints. respectively.Adepictionofthesethreesetsofcollocatio npointsisshowninFig. 2-1 whereitisseenthattheLGpointscontainneither-1or1,the LGRpointscontainonly oneofthepoints-1or1(inthiscase,thepoint-1),andtheLG Lpointscontainboth-1 and1.Denoting N asthenumberofcollocationpointsand P N ( ) asthe N th -degree Legendrepolynomialdenedas P N ( )= 1 2 N N d N d N ( 2 1) N (2–36) TheLGpointsaretherootsof P N ( ) ,theLGRpointsaretherootsof ( P N 1 ( )+ P N ( )) andtheLGLpointsaretherootsof P N 1 ( ) togetherwiththepoints-1and1.The polynomialswhoserootsaretherespectivepointsaresumma rizedasfollows: LG:Rootsobtainedfrom P N ( ) LGR:Rootsobtainedfrom ( P N 1 ( )+ P N ( )) LGL:Rootsobtainedfrom P N 1 ( ) togetherwiththepoints-1and1 ItisseenfromFig. 2-1 thattheLGandLGLpointsaresymmetricabouttheorigin 31

PAGE 32

whereastheLGRpointsareasymmetric.Inaddition,theLGRp ointsarenotuniquein thattwosetsofpointsexist(oneincludingthepoint-1andt heotherincludingthepoint 1).TheLGRpointsthatincludetheterminalendpointareoft encalledthe ipped LGR points,howeverinthisdissertation,thestandardsetofLG Rpointswillbefocusedon. 2.3.3Legendre-Gauss-LobattoOrthogonalCollocationMet hod IntheLegendre-Gauss-Lobattoorthogonalcollocationmet hod,bothcollocationand interpolationareperformedattheLGLpoints.Thestateint heLegendre-Gauss-Lobatto collocationmethodisapproximatedas y ( ) Y ( )= N X i =1 ` i ( ) Y ( i ) (2–37) wheretheLagrangepolynomials ` i ( ),( i =1,..., N ) aredenedas ` i ( )= N Y j =1 j 6 = i j i j (2–38) Thetimederivativeofthestateisthengivenas y ( ) Y ( )= N X i =1 ` i ( ) Y ( i ) (2–39) Theapproximationtothetimederivativeofthestategiveni nEq.( 2–39 )isthenapplied atthe N LGLcollocationpoints ( 1 ,..., N ) as y ( k ) Y ( k )= N X i =1 ` i ( k ) Y ( i )= N X i =1 D LGL ki Y ( i ),( k =1,..., N ) (2–40) where D LGL ki ,( k i =1,..., N ) isthe N N Legendre-Gauss-Lobattocollocation methoddifferentiationmatrix,itisfurthernotedthatthe Legendre-Gauss-Lobatto collocationmethoddifferentiationmatrixissingular.Th econtinuous-timedynamics giveninEq.( 2–32 )arethencollocatedatthe N LGLpointsas N X i =1 D LGL ki Y ( i ) t f t 0 2 a ( Y ( k ), U ( k ), k ; t 0 t f )= 0 ,( k =1,..., N ) (2–41) 32

PAGE 33

Next,thecontinuous-timecostfunctionalisapproximated usingaGauss-Lobatto quadratureas J ( Y ( 1 ), 1 Y ( N ), N ; t 0 t f )+ t f t 0 2 N X i =1 w LGL i g ( Y ( i ), U ( i ), i ; t 0 t f ) (2–42) where w LGL i ,( i =1,..., N ) aretheLGLweights.Thecontinuous-timeboundary conditionsarethenapproximatedas b ( Y ( 1 ), Y ( N ), 1 N ; t 0 t f )= 0 (2–43) Finally,thepathconstraintsareapproximatedatthe N LGLcollocationpointsas c ( Y ( k ), U ( k ), k ; t 0 t f ) 0 ,( k =1,..., N ). (2–44) 2.3.4Legendre-GaussOrthogonalCollocationMethod IntheLegendre-Gaussorthogonalcollocationmethodcollo cationisperformedat theattheLGpoints,whileinterpolationisperformedatthe LGpointsandtheinitialpoint 0 = 1 .Theboundaryconditionsareenforcedbyaddingthesupport point N +1 =1 ThestateintheLegendre-Gausscollocationmethodisappro ximatedas y ( ) Y ( )= N X i =0 ` i ( ) Y ( i ) (2–45) wheretheLagrangepolynomials ` i ( )( i =0,..., N ) aredenedas ` i ( )= N Y j =0 j 6 = i j i j (2–46) Thetimederivativeofthestateisthengivenas y ( ) Y ( )= N X i =0 ` i ( ) Y ( i ) (2–47) 33

PAGE 34

Theapproximationtothetimederivativeofthestategiveni nEq.( 2–47 )isthenapplied atthe N LGcollocationpoints ( 1 ,..., N ) as y ( k ) Y ( k )= N X i =0 ` i ( k ) Y ( i )= N X i =0 D LG ki Y ( i ),( k =1,..., N ) (2–48) where D LG ki ,( k =1,..., N ; i =0,..., N ) isthe N ( N +1) Legendre-Gausscollocation methoddifferentiationmatrix.UnliketheLegendre-Gauss -Lobattocollocationmethod differentiationmatrix,theLegendre-Gausscollocationm ethoddifferentiationmatrixis notsquare(ithasmorecolumnsthanrows)becausethestatei sapproximatedusing adifferentsetofpointsthanareusedtocollocatethedynam ics.Inparticular,the dynamicsarecollocatedatthe N LGpointsas N X i =0 D LG ki Y ( i ) t f t 0 2 a ( Y ( k ), U ( k ), k ; t 0 t f )= 0 ,( k =1,..., N ) (2–49) Next,inordertoaccountfortheinitialandterminalpoints (i.e.,the boundarypoints 0 = 1 and N +1 =1 ),anadditionalvariable Y ( N +1 ) isdenedviaaGaussquadrature as Y ( N +1 ) Y ( 0 )+ t f t 0 2 N X i =1 w LG i a ( Y ( i ), U ( i ), i ; t 0 t f ) (2–50) Next,thecontinuous-timecostfunctionalisapproximated usingaGaussquadratureas J ( Y ( 0 ), 0 Y ( N +1 ), N +1 ; t 0 t f )+ t f t 0 2 N X i =1 w LG i g ( Y ( i ), U ( i ), i ; t 0 t f ) (2–51) where w LG i ,( i =1,..., N ) aretheLegendre-Gaussweights.Wheretheendpointcost intheLegendre-Gausscollocationmethodisevaluatedatth eboundarypoints 0 = 1 and N +1 =1 .Furthermore,similartothewaythattheendpointcostisev aluatedatthe boundarypoints,thecontinuous-timeboundaryconditions arealsoapproximatedatthe boundarypoints as b ( Y ( 0 ), 0 Y ( N ), N +1 ; t 0 t f )= 0 (2–52) 34

PAGE 35

Finally,thepathconstraintsareapproximatedatthe N LGpointsas c ( Y ( k ), U ( k ), k ; t 0 t f ) 0 ,( k =1,..., N ). (2–53) 2.3.5Legendre-Gauss-RadauOrthogonalCollocationMetho d IntheLegendre-Gauss-Radauorthogonalcollocationmetho dcollocationis performedattheattheLGRpoints,whileinterpolationispe rformedattheLGRpoints andthenalpoint N +1 =1 .ThestateintheLegendre-Gauss-Radaucollocationmethod isapproximatedas y ( ) Y ( )= N +1 X i =1 ` i ( ) Y ( i ) (2–54) wheretheLagrangepolynomials ` i ( )( i =1,..., N +1) aredenedas ` i ( )= N +1 Y j =1 j 6 = i j i j (2–55) Thetimederivativeofthestateisthengivenas y ( ) Y ( )= N +1 X i =1 ` i ( ) Y ( i ) (2–56) Theapproximationtothetimederivativeofthestategiveni nEq.( 2–56 )isthenapplied atthe N LGRcollocationpoints ( 1 ,..., N ) as y ( k ) Y ( k )= N +1 X i =1 ` i ( k ) Y ( i )= N +1 X i =1 D RPM ki Y ( i ),( k =1,..., N ) (2–57) where D LGR ki ,( k =1,..., N ; i =1,..., N +1) isthe N ( N +1) Legendre-Gauss-Radau collocationmethoddifferentiationmatrix.Itisnotedtha ttheLegendre-Gauss-Radau collocationmethoddifferentiationmatrixisnotsquare(i thasmorecolumnsthanrows) becausethestateisapproximatedusingadifferentsetofpo intsthanareusedto collocatethedynamics.Inparticular,thedynamicsarecol locatedatthe N LGRpoints 35

PAGE 36

as N +1 X i =1 D LGR ki Y ( i ) t f t 0 2 a ( Y ( k ), U ( k ), k ; t 0 t f )= 0 ,( k =1,..., N ) (2–58) Next,thecontinuous-timecostfunctionalisapproximated usingaGauss-Radau quadratureas J ( Y ( 1 ), 1 Y ( N +1 ), N +1 ; t 0 t f )+ t f t 0 2 N X i =1 w LGR i g ( Y ( i ), U ( i ), i ; t 0 t f ) (2–59) ItisnotedthatheendpointcostintheLegendre-Gauss-Rada ucollocationmethodis evaluatedattheboundarypoints 1 = 1 and N +1 =1 .Furthermore,similartotheway thattheendpointcostisappliedattheboundarypoints,the continuous-timeboundary conditionsarealsoapproximatedattheboundarypointsas b ( Y ( 1 ), 1 Y ( N +1 ), N +1 ; t 0 t f )= 0 (2–60) Finally,thepathconstraintsareapproximatedatthe N LGRpointsas c ( Y ( k ), U ( k ), k ; t 0 t f ) 0 ,( k =1,..., N 1). (2–61) 2.3.6BenetsofUsingLegendre-Gauss-RadauCollocationM ethod ThisdissertationwillfocusontheLegendre-Gauss-Radauc ollocationmethod forthefollowingreasons.First,theLegendre-Gauss-Rada ucollocationmethod differentiationmatrixisnotsingularasintheLegendre-G auss-Lobattocollocation method.Furthermore,becausetheLegendre-Gauss-Lobatto collocationmethod differentiationmatrixissingular,severalproblemsaris ewiththemethodsuchasa poorcostateapproximationfromtheLagrangemultipliersa ndonsomeproblems afailuretondaaccuratecontrol.Second,unliketheLegen dre-Gausscollocation methodthatdependsuponusingaintegrationquadraturetoo btainthenalstate, theLegendre-Gauss-Radaucollocationmethodhasthenals tate(andinitial state)asdiscretizedvariables.Finally,theLegendre-Ga uss-Radaucollocation 36

PAGE 37

methodhasavalueofthecontrolatoneoftheendpoints,this featuremakesthe Legendre-Gauss-Radaucollocationuniquelyvaluablewhen implementedasamultiple intervalmethodbecausethecontrolremainscollocatedatt heintervalpoints. 2.4NumericalOptimization Inadirectcollocationapproximationofanoptimalcontrol problem,the continuous-timeoptimalcontrolproblemistranscribedin toanonlinearprogramming problem(NLP).TheobjectiveofaNLPistondasetofparamet ersthatminimizes somecostfunctionthatissubjecttoasetofalgebraicequal ityorinequalityconstraints. InordertodescribehowanNLPyieldsandoptimalsolutionth issectionwillprovide abackgroundofunconstrainedoptimization,equalitycons trainedoptimization,and inequalityconstrainedoptimization.2.4.1UnconstrainedOptimization Considerthefollowingproblemofdeterminingtheminimumo fafunctionsubjectto multiplevariableswithoutanyconstraints.Minimizetheo bjectivefunction J ( x ), (2–62) where x 2 R n .For x tobealocallyminimizingpoint,theobjectivefunctionmus tbe greaterwhenevaluatedatanyneighboringpoint,i.e., J ( x ) > J ( x ). (2–63) Inordertodevelopasetofsufcientconditionsdeningalo callyminimizingpoint x rst,athreetermTaylorseriesexpansionaboutsomepoint, x ,isusedtoapproximate theobjectivefunctionas J ( x )= J ( x )+ g ( x )( x x )+ 1 2 ( x x ) T H ( x )( x x ), (2–64) 37

PAGE 38

wherethegradientvector, g ( x ) 2 R 1 n ,is g ( x )= @ J @ x 1 @ J @ x n (2–65) andthesymmetricHessianmatrix, H ( x ) 2 R 1 n is H ( x )= 266666664 @ 2 J @ x 2 1 @ 2 J @ x 1 @ x 2 @ 2 J @ x 1 @ x n @ 2 J @ x 2 @ x 1 @ 2 J @ x 2 2 @ 2 J @ x 2 @ x n ... ... ... @ 2 J @ x n @ x 1 @ 2 J @ x n @ x 2 @ 2 J @ x 2 n 377777775 (2–66) For bfx tobealocalminimizingpoint,twoconditionsmustbesatis ed.First,a necessaryconditionisthat g ( x ) mustbezero,i.e., g ( x )= 0 (2–67) Thenecessaryconditionbyitselfonlydenesanextremalpo intwhichcanbealocal minimum,localmaximum,orsaddlepoint.Inordertoensure x isalocalminimum,then anadditionalconditionthatmustbesatisedis ( x x ) T H ( x x ) > 0. (2–68) Eqs.( 2–67 )and( 2–68 )togetherdenethenecessaryandsufcientconditionsfor a localminimum.2.4.2EqualityConstrainedOptimization Considerthefollowingequalityconstrainedoptimization problem,minimizethe objectivefunction J ( x ), (2–69) subjecttotheequalityconstraints f ( x )= 0 (2–70) 38

PAGE 39

where x 2 R n ,and f ( x ) 2 R m .Findingtheminimumoftheobjectivefunctionsubjectto equalityconstraintsusesanapproachsimilartothecalcul usofvariationsapproachfor determiningtheextremaloffunctionals.TheLagrangianis denedas ` ( x )= J ( x ) T f ( x ), (2–71) where 2 R m isthesetofLagrangemultipliersrespecttotheequalityco nstraints. Moreover,thenecessaryconditionsfortheminimumoftheLa grangianisthat ( x ) satisestheconditions r x ` ( x )= g ( x ) G T ( x ) = 0 r ` ( x )= f ( x )= 0 (2–72) wheretheJacobianmatrix, G ( x ) 2 R m n ,isdenedas G ( x )= r x f ( x )= 266666664 @ f 1 @ x 1 @ f 1 @ x 2 @ f 1 @ x n @ f 2 @ x 1 @ f 2 @ x 2 @ f 2 @ x n ... ... ... @ f m @ x 1 @ f m @ x 2 @ f m @ x n 377777775 (2–73) ItisnotedthatataextremaloftheLagrangian,theequality constraintofEq.( 2–70 )is satised.Furthermore,thenecessaryconditionsofEq.( 2–72 )aresatisedatextremal points,anddonotspecifyaminimum.Inordertospecifyamin imum,rst,theHessian oftheLagrangianisdenedas H ` ( x )= r 2xx ` ( x )= r 2xx J ( x ) m X i =1 i r 2xx f i ( x ), (2–74) then,asufcientconditionforaminimumisthat v T H ` ( x ) v > 0, (2–75) foranyvector v intheconstrainttangentspace. 39

PAGE 40

2.4.3InequalityConstrainedOptimization Considerthefollowingoptimizationproblemthathasbothe qualityconstraints,and inequalityconstraints,minimizetheobjectivefunction J ( x ), (2–76) subjecttotheequalityconstraints f ( x )= 0 (2–77) andtheinequalityconstraints c ( x ) 0 (2–78) where x 2 R n f ( x ) 2 R m ,and c ( x ) 2 R p ,wheresomeoftheinequalityconstraints c ( x ) aresatisedasequalitiessuchthat c j ( x )= 0 j 2 A c j ( x ) < 0 j 2 B (2–79) where A isconsideredtheactiveset,and B istheinactiveset.Next,theLagrangianis denedas ` ( x )= J ( x ) T f ( x ) ( ( A ) ) T c ( A ) ( x ), (2–80) where 2 R m isthesetofLagrangemultipliersassociatedwiththeequal ityconstraints, and ( A ) 2 R q isthesetofLagrangemultipliersassociatedwiththeactiv esetofthe inequalityconstraints,where q isthenumberofactiveconstraintsof c ( x ) .Furthermore, itisofnotethat ( B ) = 0 ,andtherefore,theinactivesetofconstraintsareignored .The necessaryconditionsfortheminimumoftheLagrangianisth atthepoint ( x 8 ( A ) satises r x ` ( x ( A ) )= g ( x ) G Tf ( x ) G Tc ( A ) ( x ) ( A ) = 0 r ` ( x ( A ) )= f ( x )= 0 r ( A ) ` ( x ( A ) )= c ( A ) ( x )= 0 (2–81) 40

PAGE 41

ItisnotedthatataextremaloftheLagrangian,theconstrai ntsofEqs.( 2–77 )and( 2–78 ) aresatised.Furthermore,thenecessaryconditionsofEq. ( 2–81 )aresatisedat extremalpoints,anddonotspecifyaminimum.Inordertospe cifyaminimum,rst,the HessianoftheLagrangianisdenedas H ` ( x ( A ) )= r 2xx ` ( x ( A ) )= r 2xx J ( x ) m X i =1 i r 2xx f i ( x ) q X j =1 ( A ) j r 2xx c j ( x ), (2–82) then,asufcientconditionforaminimumisthat v T H ` ( x ( A ) ) v > 0, (2–83) foranyvector v intheconstrainttangentspace. 41

PAGE 42

CHAPTER3 LEGENDRE-GAUSS-RADAUCOLLOCATIONSPARSESTRUCTURE Inthischapterthestructureofthevariable-orderLegendr e-Gauss-Radau orthogonalcollocationmethodisdeveloped.Thedescripti onofthesparsestructure includesexpressionsfortherst,andsecondderivativeso ftheresultingnon-linear program.Furthermore,thesparsityoftheresultingderiva tivesisshownandthe stuructureisdemonstratedonanexampleproblem.Theworki nthischapterisbased ontheworkfromRefs.[ 29 50 ]. Thischapterisorganizedasfollows.InSection 3.1 weprovideournotationand conventionsusedthroughoutthispaper.InSection 3.2 westatethecontinuous-time optimalcontrolproblem.InSection 3.3 ,westatetheLegendre-Gauss-Radau orthogonalcollocationmethod[ 18 – 20 ]thatisusedtoderivetheNLPderivative functions.InSection 3.4 wederiveexpressionsfortheobjectivefunctiongradient, constraintJacobian,andLagrangianHessianoftheNLPthat arisesfromthe discretizationofthecontinuous-timeoptimalcontrolpro blemofSection 3.2 usingthe Legendre-Gauss-RadauorthogonalcollocationmethodofSe ction 3.3 .InSection 3.5 we provideadiscussionoftheunderlyingstructureofthederi vativefunctions.InSection 3.6 weprovideanexamplethatdemonstratesthegreatimproveme ntincomputational efciencyobtainedusingthemethodofthispaper.Finally, inSection 3.7 weprovide conclusionsonourwork. 3.1NotationandConventions Throughoutthispaperthefollowingnotationandconventio nswillbeemployed. Allscalarswillberepresentedbylower-casesymbols(e.g. y u ).Allvectorfunctions oftimewillbetreatedas row vectorsandwillbedenotedbylower-caseboldsymbols. Thus,if p ( t ) 2 R n isavectorfunctionoftime,then p ( t )= [ p 1 ( t ) p n ( t ) ] .Anyvector thatisnotafunctionoftimewillbedenotedasacolumnvecto r,thatisastaticvector z 2 R n willbetreatedasacolumnvector.Next,matriceswillbeden otedbyupper 42

PAGE 43

caseboldsymbols.Thus, P 2 R N n isamatrixofsize N n .Furthermore,if f ( p ) f : R n R m ,isafunctionthatmapsrowvectors p 2 R n torowvectors f ( p ) 2 R m ,then theresultofevaluating f ( p ) atthepoints ( p 1 ,..., p N ) isthematrix F 2 R N n [ f ( p k ) ] 1N F 1N [ f ( p k ) ] 1N = 266664 f ( p 1 ) ... f ( p N ) 377775 Asinglesubscript i attachedtoamatrixdenotesaparticularrowofthematrix,i .e., P i is the i th row ofthematrix P .Adoublesubscript i j attachedtoamatrixdenoteselement locatedinrow i andcolumn j ofthematrix,i.e., P i j isthe ( i j ) th elementofthematrix P .Furthermore,thenotation P :, j willbeusedtodenotealloftherowsandcolumn j ofa matrix P .Finally, P T willbeusedtodenotethetransposeofamatrix P Next,let P and Q be n m matrices.Thentheelement-by-elementmultiplicationof P and Q isdenedas P Q = 266664 p 11 q 11 p 1 m q 1 m ... ... p n 1 q n 1 p nm q nm 377775 Itisnotedfurtherthat P Q isnotstandardmatrixmultiplication.Furthermore,if p 2 R n thentheoperation diag ( p ) denotes n n diagonalmatrixformedbytheelementsof p diag ( p ) = 266666664 p 1 0 0 0 p 2 0 ... ... ... 00 p n 377777775 Finally,thenotation 0 n m representsan n m matrixofzeros,while 1 n m representan n m matrixofallones. 43

PAGE 44

Next,wedenethenotationforderivativesoffunctionsofv ectors.First,let f ( p ) f : R n R .Then r p f ( p ) 2 R n isarowvectoroflength n andisdenedas r p f ( p )= @ f @ p 1 @ f @ p n Next,let f ( p ) f : R n R m ,where p maybeeitherarowvectororacolumnvectorand f ( p ) hasthesameorientation(i.e.,eitherrowvectororcolumnv ector)as p .Then r p f is the m by n matrixwhose i th rowis r p f i ,thatis, r p f = 266664 r p f 1 ... r p f m 377775 = 2666664 @ f 1 @ p 1 @ f 1 @ p n ... ... @ f m @ p 1 @ f m @ p n 3777775 Thefollowingconventionswillbeusedforsecondderivativ esofscalarfunctions.Given afunction f ( p q ) ,where f : R n R m R mapsapairofrowvectors p 2 R n and q 2 R m toascalar f ( p q ) 2 R ,thenthemixedsecondderivative r 2pq isan n by m matrix, r 2pq f = 2666664 @ 2 f @ p 1 @ q 1 @ 2 f @ p 1 @ q m ... ... @ 2 f @ p n @ q 1 @ 2 f @ p n @ q m 3777775 = r 2qp f T Thus,forafunctionoftheform f ( p ) ,where f : R n R wehave r 2pp f = 2666664 @ 2 f @ p 2 1 @ 2 f @ p 1 @ p n ... ... @ 2 f @ p n @ p 1 @ 2 f @ p 2 n 3777775 = r 2pp f T 3.2OptimalControlProblem Considerthefollowinggeneraloptimalcontrolproblem,de terminethestate, y ( t ) 2 R n y ,thecontrol u ( t ) 2 R n u ,theintegral q 2 R n q ,theinitialtime, t 0 ,andthe 44

PAGE 45

terminaltime, t f ,onthetimeinterval t 2 [ t 0 t f ] thatminimizethecostfunctional J = ( y ( t 0 ), t 0 y ( t f ), t f q ) (3–1) subjecttothedynamicconstraints d y dt = a ( y ( t ), u ( t ), t ), (3–2) theinequalitypathconstraints c min c ( y ( t ), u ( t ), t ) c max (3–3) theintegralconstraints q i = Z t f t 0 g i ( y ( t ), u ( t ), t ) dt ,( i =1,..., n q ), (3–4) andtheboundaryconditions b min b ( y ( t 0 ), t 0 y ( t f ), t f q ) b min (3–5) Thefunctions q a c and b aredenedbythefollowingmappings: : R n y R R n y R R n q R g : R n y R n u R R n q a : R n y R n u R R n y c : R n y R n u R R n c b : R n y R R n y R R n q R n b whereweremindthereaderthatallvectorfunctionsoftimea retreatedas row vectors. Inthispaper,itwillbeusefultomodifytheoptimalcontrol problemgivenin Eqs.( 3–1 )–( 3–5 )asfollows.Let 2 [ 1,+1] beanewindependentvariable.The variable t isthendenedintermsof as t = t f t 0 2 + t f + t 0 2 (3–6) 45

PAGE 46

TheoptimalcontrolproblemofEqs.( 3–1 )–( 3–5 )isthendenedintermsofthevariable asfollows.Determinethestate, y ( ) 2 R n y ,thecontrol u ( ) 2 R n u ,theintegral q 2 R n q theinitialtime, t 0 ,andtheterminaltime t f onthetimeinterval 2 [ 1,+1] thatminimize thecostfunctional J = ( y ( 1), t 0 y (+1), t f q ) (3–7) subjecttothedynamicconstraints d y d = t f t 0 2 a ( y ( ), u ( ), ; t 0 t f ), (3–8) theinequalitypathconstraints c min c ( y ( ), u ( ), ; t 0 t f ) c max (3–9) theintegralconstraints q i = t f t 0 2 Z +1 1 g i ( y ( ), u ( ), ; t 0 t f ) d ,( i =1,..., n q ), (3–10) andtheboundaryconditions b min b ( y ( 1), t 0 y (+1), t f q ) b min (3–11) Supposenowthatthetimeinterval 2 [ 1,+1] isdividedintoa mesh consistingof K meshintervals [ T k 1 T k ], k =1,..., K ,where ( T 0 ,..., T K ) arethe meshpoints .The meshpointshavethepropertythat 1= T 0 < T 1 < T 2 < < T K = T f =+1 .Next, let y ( k ) ( ) and u ( k ) ( ) bethestateandcontrolinmeshinterval k .Theoptimalcontrol problemofEqs.( 3–7 )–( 3–11 )canthenwrittenasfollows.First,thecostfunctionalof Eq.( 3–7 )canbewrittenas J = ( y (1) ( 1), t 0 y ( K ) (+1), t f q ), (3–12) 46

PAGE 47

Next,thedynamicconstraintsofEq.( 3–8 )inmeshinterval k canbewrittenas d y ( k ) ( ) d = t f t 0 2 a ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ),( k =1,..., K ). (3–13) Furthermore,thepathconstraintsof( 3–9 )inmeshinterval k aregivenas c min c ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ) c max ,( k =1,..., K ). (3–14) theintegralconstraintsof( 3–10 )aregivenas q i = t f t 0 2 K X k =1 Z T k T k 1 g i ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ) d ,( i =1,..., n q ),( k =1,..., K ). (3–15) Finally,theboundaryconditionsofEq.( 3–11 )aregivenas b min b ( y (1) ( 1), t 0 y ( K ) (+1), t f q ) b max (3–16) Becausethestatemustbecontinuousateachinteriormeshpo int,itisrequiredthatthe condition y ( T k )= y ( T + k ), besatisedattheinteriormeshpoints ( T 1 ,..., T K 1 ) 3.3Variable-OrderLegendre-Gauss-RadauCollocationMet hod Themultiple-intervalformofthecontinuous-timeoptimal controlprobleminSection 3.2 isdiscretizedusingthepreviouslydevelopedLegendre-Ga uss-Radauorthogonal collocationmethodasdescribedinRef.[ 18 ].WhiletheLegendre-Gauss-Radau orthogonalcollocationmethodischosen,withonlyslightm odicationstheapproach developedinthispapercanbeusedwithotherorthogonalcol locationmethods (e.g.,theLegendre-Gaussorthogonalcollocationmethod[ 15 17 23 ]orthe Legendre-Gauss-Lobattoorthogonalcollocationmethod[ 13 ]).Anadvantageof usingtheLegendre-Gauss-Radauorthogonalcollocationme thodisthatthecontinuity conditions y ( T k )= y ( T + k ) acrossmeshpointsareparticularlyeasytoimplement. 47

PAGE 48

IntheLobatto,thestateofthecontinuous-timeoptimalcon trolproblemis approximatedineachmeshinterval k 2 [1,..., K ] as y ( k ) ( ) Y ( k ) ( )= N k +1 X j =1 Y ( k ) j ` ( k ) j ( ), ` ( k ) j ( )= N k +1 Y l =1 l 6 = j ( k ) l ( k ) j ( k ) l (3–17) where 2 [ 1,+1] ` ( k ) j ( ), j =1,..., N k +1 ,isabasisofLagrangepolynomials, ( ( k ) 1 ,..., ( k ) N k ) aretheLegendre-Gauss-Radau[ 51 ](LGR)collocationpointsinmesh interval k denedonthesubinterval 2 [ T k 1 T k ) ,and ( k ) N k +1 = T k isanoncollocated point.Differentiating Y ( k ) ( ) inEq.( 3–17 )withrespectto ,weobtain d Y ( k ) ( ) d = N k +1 X j =1 Y ( k ) j d ` ( k ) j ( ) d (3–18) ThecostfunctionalofEq.( 3–12 )isthenshownas J = ( Y (1) 1 t 0 Y ( K ) N K +1 t K q ), (3–19) where Y (1) 1 istheapproximationof y ( T 0 = 1) ,and Y ( K ) N K +1 istheapproximationof y ( T K =+1) .CollocatingthedynamicsofEq.( 3–13 )atthe N k LGRpointsusing Eq.( 3–18 ),wehave N k +1 X j =1 D ( k ) ij Y ( k ) j t f t 0 2 a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ). (3–20) where U ( k ) i i =1,..., N k ,aretheapproximationsofthecontrolatthe N k LGRpointsin meshinterval k 2 [1,..., K ] ,and t ( k ) i isobtainedfrom ( k ) k usingEq.( 3–6 )and D ( k ) ij = d ` ( k ) j ( ) d # ( k ) i ,( i =1,..., N k j =1,..., N k +1, k =1,..., K ), (3–21) isthe N k ( N k +1) Legendre-Gauss-Radauorthogonalcollocationdifferenti ation matrix [ 18 ]inmeshinterval k 2 [1,..., K ] .Whilethedynamicscanbecollocatedin differentialform,alternativelythedynamicscanbecollo catedusingtheequivalent integralform oftheLegendre-Gauss-Radauorthogonalcollocationmetho dasdescribed 48

PAGE 49

inRefs.[ 18 – 20 ].TheintegralformoftheLegendre-Gauss-Radauorthogona lcollocation methodisgivenas Y ( k ) i +1 Y ( k ) 1 t f t 0 2 N k X j =1 I ( k ) ij a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ), (3–22) where I ( k ) ij ,( i =1,..., N k j =1,..., N k k =1,..., K ) isthe N k N k Legendre-GaussRadauorthogonalcollocationintegrationmatrix inmeshinterval k 2 [1,..., K ] ,andis obtainedfromthedifferentiationmatrixas I ( k ) D 1 2: N k +1 (3–23) Finally,itisnotedforcompletenessthat I ( k ) D ( k ) 1 = 1 ,where 1 isacolumnvector oflength N k ofallones.Next,thepathconstraintsofEq.( 3–14 )inmeshinterval k 2 [1,..., K ] areenforcedatthe N k LGRpointsas c min c ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) c max ,( i =1,..., N k ), (3–24) theintegralconstraintsofEq.( 3–15 )isthenapproximatedas q i K X k =1 N k X j =1 t f t 0 2 w ( k ) j g i ( Y ( k ) j U ( k ) j ( k ) j ; t 0 t f ),( i =1,..., n q ), (3–25) where w ( k ) j j =1,..., N k aretheLGRquadratureweights[ 51 ]inmeshinterval k 2 [1,..., K ] denedontheinterval 2 [ T k 1 T k ) Furthermore,theboundary conditionsofEq.( 3–16 )areapproximatedas b min b ( Y (1) 1 t 0 Y ( K ) N K +1 t f q ) b max (3–26) Itisnotedthatcontinuityinthestateattheinteriormeshp oints k 2 [1,..., K 1] is enforcedviathecondition Y ( k ) N k +1 = Y ( k +1) 1 ,( k =1,..., K 1), (3–27) 49

PAGE 50

wherewenotethatthe same variableisusedforboth Y ( k ) N k +1 and Y ( k +1) 1 .Hence,the constraintofEq.( 3–27 )iseliminatedfromtheproblembecauseitistakenintoacco unt explicitly.TheNLPthatarisesfromtheLegendre-Gauss-Ra dauorthogonalcollocation methodisthentominimizethecostfunctionofEq.( 3–19 )subjecttothealgebraic constraintsofEqs.( 3–20 )–( 3–26 ). Supposenowthatwedenethefollowingquantitiesinmeshin tervals k 2 [1,..., K 1] andthenalmeshinterval K : ( k ) = h ( k ) i i 1N k k =1,..., K 1, ( K ) = h ( K ) i i 1N K +1 t ( k ) = h t ( k ) i i 1N k k =1,..., K 1, t ( K ) = h t ( K ) i i 1N K +1 Y ( k ) = h Y ( k ) i i 1N k k =1,..., K 1, Y ( K ) = h Y ( K ) i i 1N K +1 U ( k ) = h U ( k ) i i 1N k k =1,..., K A ( k ) = h a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) i 1N k C ( k ) = h c ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) i 1N k ,, G ( k ) = h g ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) i 1N k w ( k ) = [ w i ] 1N k ,, N = K X k =1 N k 50

PAGE 51

Wethendenethefollowingquantities: = 266664 (1) ... ( K ) 377775 t = 266664 t (1) ... t ( K ) 377775 w = 266664 w (1) ... w ( K ) 377775 Y = 266664 Y (1) ... Y ( K ) 377775 U = 266664 U (1) ... U ( K ) 377775 A = 266664 A (1) ... A ( K ) 377775 C = 266664 C (1)... C ( K ) 377775 G = 266664 G (1) ... G ( K ) 377775 (3–28) Itisnotedforcompletenessthat t 2 R N +1 2 R N +1 Y 2 R ( N +1) n y U 2 R N n u G 2 R N n q A 2 R N n y ,and C 2 R N n c .Thecostfunctionanddiscretizeddynamic constraintsgiveninEqs.( 3–19 )and( 3–20 )canthenbewrittencompactlyas J = ( Y 1 t 0 Y N +1 t f q ) (3–29) = DY t f t 0 2 A = 0 (3–30) where 2 R N n y and D isthecompositeLegendre-Gauss-Radauorthogonal collocationdifferentiationmatrix.Aschematicofthecom positeLegendre-Gauss-Radau orthogonalcollocationdifferentiationmatrix D isshowninFig. 3-1 whereitisseen that D hasablockstructurewithnonzeroelementsintherow-colum nindices 51

PAGE 52

Block 1 Block 2 Block 3 Block K (2) Zeros Except in Blocks (1) Block k is of Size N k by N k +1 (3) Total Size N by N +1 Figure3-1.StructureofcompositeLegendre-Gauss-Radauo rthogonalcollocation differentiationmatrixwherethemeshconsistsof K meshintervals. ( P k 1 l =1 N l +1,..., P kl =1 N l P k 1 l =1 N l +1,..., P kl =1 N l +1) ,whereforeverymeshinterval k 2 [1,..., K ] thenonzeroelementsaredenedbythematrixgiveninEq.( 3–21 ).When thedynamicsarecollocatedinintegralform,thedynamicco nstraintsofEq.( 3–22 )can bewrittencompactlyas = E Y t f t 0 2 IA = 0 (3–31) where 2 R N n y I isthecompositeLegendre-Gauss-Radauorthogonal collocationintegrationmatrix,and E isthevaluedifferencematrix.Schematicsof thecompositeLegendre-Gauss-Radauorthogonalcollocati onintegrationmatrix I ,andthecompositevaluedifferencematrix E areshowninFig. 3-2 ,whereitis seenthat I hasablockstructurewithnonzeroelementsintherow-colum nindices ( P k 1 l =1 N l +1,..., P kl =1 N l P k 1 l =1 N l +1,..., P kl =1 N l ) ,whereforeverymeshinterval k 2 [1,..., K ] thenonzeroelementsaredenedbythematrixgiveninEq.( 3–23 ).The Radauvaluedifferencematrix E isusedasacompactwaycomputethestatedifference 52

PAGE 53

Y ( k ) i +1 Y ( k ) 1 ,( i =1,..., N k k =1,..., K ) ,where E ( k ) 1 = 1 where 1 isacolumnvector oflength N k ofallones,and E ( k ) 2: N k +1 isthenegativeidentitymatrix.Next,thediscretized pathconstraintsofEq.( 3–24 )areexpressedas C min C C max (3–32) where C min and C max arematricesofthesamesizeas C andwhoserowscontainthe vectors c min and c max ,respectively.Furthermore,thediscretizedintegralcon straintsof Eq.( 3–25 )areexpressedas = q t f t 0 2 w T G = 0 (3–33) where 2 R N n y .Moreover,thediscretizedboundaryconditionsofEq.( 3–26 )canbe writtenas b min b ( Y 1 t 0 Y N +1 t f q ) b max (3–34) Thenonlinearprogrammingproblem(NLP)associatedwithth eLegendre-Gauss-Radau orthogonalcollocationmethodisthentominimizethecostf unctionofEq.( 3–29 )subject tothealgebraicconstraintsofEqs.( 3–30 )–( 3–34 ).Finally,let ( ) 2 R N +1 bedened as = @ t @ t 0 = 1 2 = @ t @ t f = 1 + 2 (3–35) wherethederivativesinEq.( 3–35 )areobtainedfromEq.( 3–6 ). 3.4Legendre-Gauss-RadauCollocationMethodNLPDerivati ves Thenonlinearprogrammingproblem(NLP)arisingfromthe Legendre-Gauss-Radauorthogonalcollocationmethodpres entedinSection 3.3 hasthe followinggeneralform.Determinethevectorofdecisionva riables z 2 R N ( n y + n c )+2 that minimizesthecostfunction f ( z ) (3–36) 53

PAGE 54

Block 1 Block 2 Block 3 Block K (2) Zeros Except in Blocks (1) Block k is of Size N k by N k (3) Total Size N by N ACompositeintegrationmatrix Block 1 Block 2 Block 3 Block K (3) Zeros Except in Blocks (1) Block k is of Size N k by N k +1 (4) Total Size N by N +1 -1-1-1-1-1 1 1 1 1 1 -1-1-1-1-1 1 1 1 1 1 -1-1-1 1 1 1 -1-1-1-1 1 1 1 1 BValuedifferencematrix Figure3-2.StructuresofcompositeLegendre-Gauss-Radau orthogonalcollocation integrationandvaluedifferencematriceswherethemeshco nsistsof K meshintervals. 54

PAGE 55

subjecttotheconstraints h min h ( z ) h max (3–37) InthecaseoftheLegendre-Gauss-Radauorthogonalcolloca tionmethod,thedecision vector, z ,constraintfunction h ( z ) ,andcostfunction f ( z ) aregiven,respectively,as z = 26666666666666666666666664 Y :,1 ... Y :, n y U :,1 ... U :, n u q 1: n q t 0 t f 37777777777777777777777775 h = 2666666666666666666664 :,1 ... :, n y C :,1 ... C :, n c 1: n q b 1: n b 3777777777777777777775 f ( z )= ( z ), (3–38) where isobtaineddirectlyfromEq.( 3–29 ).Wenowsystematicallydetermine expressionsforthegradientoftheNLPobjectivefunction, theJacobianoftheNLP constraints,andtheHessianoftheNLPLagrangian.Thekeyr esultofthissection isthattheseNLPderivativesareobtainedbydifferentiati ngthefunctionsofthe continuous-timeoptimalcontrolproblemasdenedinEqs.( 3–1 )–( 3–5 )ofSection 3.2 asopposedtodifferentiatingthefunctionsoftheNLP. 3.4.1GradientofObjectiveFunction ThegradientoftheobjectivefunctioninEq.( 3–38 )withrespecttothe Legendre-Gauss-RadauorthogonalcollocationmethodNLPd ecisionvector z isgiven as r z f = r z (3–39) 55

PAGE 56

Thederivative r z isobtainedas r z = r Y r U r q r t 0 r t f (3–40) where r Y = r Y :,1 r Y :, n y r U = [ 0 1 Nn u ] r q = r q 1 r q n q (3–41) Thederivatives r Y :, i r q i r t 0 and r t f areobtainedas r Y :, i = @ @ Y 1, i 0 1 ( N 1) @ @ Y N +1, i i =1,..., n y r q k = @ @ q k k =1,..., n q r t 0 = @ @ t 0 r t f = @ @ t f (3–42) where( i l =1,..., n y ),and( k =1,..., n q )ItisseenfromEqs.( 3–39 )–( 3–42 )that computingtheobjectivefunctiongradient, r z f ,requirestherstderivativesof be computedwithrespecttotheinitialstate, Y 1 ,initialtime, t 0 ,nalstate, Y N +1 ,naltime, t f ,andtheintegralvariables q .TheNLPobjectivefunctiongradientisthenassembled usingtheequationsderivedinthissection. 56

PAGE 57

3.4.2ConstraintJacobianDifferentialForm TheJacobianoftheconstraintsisdenedas r z h = 266666666666666666666666666666666664 r z :,1 ... r z :, n y r z C :,1 ... r z C :, n c r z 1 ... r z n b r z b 1 ... r z b n b 377777777777777777777777777777777775 (3–43) Therstderivativesofthedefectconstraintsareobtained as r z :, l = r Y :, l r U :, l r q :, l r t 0 :, l r t f :, l l =1,..., n y (3–44) where r Y :, l = r Y :,1 :, l r Y :, n y :, l r U :, l = r U :,1 :, l r U :, n u :, l r q :, l = 0 N n q l =1,..., n y (3–45) 57

PAGE 58

Therstderivatives r Y :, i :, l ,( i l =1,..., n y ), r U :, j :, l ,( j =1,..., n u l =1,..., n y ), r t 0 :, l ( l =1,..., n y ),and r t f :, l ( l =1,..., n y ) ,canbeobtainedas r Y :, i :, l = il D :,1: N t f t 0 2 diag @ a l @ y i 1N D :, N +1 # r U :, j :, l = t f t 0 2 diag @ a l @ u j 1N r t 0 :, l = 1 2 [ a l ] 1N t f t 0 2 @ a l @ t 1N r t f :, l = 1 2 [ a l ] 1N t f t 0 2 @ a l @ t 1N (3–46) where ( i l =1,..., n y ) ,and ( j =1,..., n u ) .Furthermore, il istheKroneckerdelta function il = 8><>: 1, i = l 0, otherwise Therstderivativesofthepathconstraintsaregivenas r z C :, p = r Y C :, p r U C :, p r q C :, p r t 0 C :, p r t f C :, p p =1,..., n c (3–47) where r Y C :, p = r Y :,1 C :, p r Y :, n y C :, p r U C :, p = r U :,1 C :, p r U :, n u C :, p r q C :, p = 0 N n q p =1,..., n c (3–48) 58

PAGE 59

Therstderivatives r Y :, i C :, p r U :, j C :, p r t 0 C :, p and r t f C :, p canbefoundinasparse manneras r Y :, i C :, p = diag @ c p @ y i 1N 0 N 1 # r U :, j C :, p = diag @ c p @ u j 1N r t 0 C :, p = @ c p @ t 1N r t f C :, p = @ c p @ t 1N (3–49) where ( i =1,..., n y ) ( j =1,..., n u ) ,and ( p =1,..., n c ) .Therstderivativesofthe integralconstraintsaregivenas r z r = r Y r r U r r q r r t 0 r r t f r r =1,..., n q (3–50) where r Y r = r Y :,1 r r Y :, n y r r U r = r U :,1 r r U :, n u r r q r = r q 1 r r q n q r r =1,..., n q (3–51) 59

PAGE 60

Thederivatives r Y :, i r r U :, j r r t 0 r and r t f r areobtainedas r Y :, i r = t f t 0 2 ( w @ g r @ y i 1N ) T 0 # r U :, j r = t f t 0 2 ( w @ g r @ u j 1N ) T r q k r = 8><>: 1, k = r 0, k 6 = r r t 0 r = 1 2 w T [ g r ] 1N t f t 0 2 w T ( @ g r @ t 1N ) r t f r = 1 2 w T [ g r ] 1N t f t 0 2 w T ( @ g r @ t 1N ) (3–52) where ( i =1,..., n y ) ( j =1,..., n u ) ,and ( k r =1,..., n q ) .Therstderivativesofthe boundaryconditionsaregivenas r z b m = r Y b m r U b m r q b m r t 0 b m r t f b m m =1,..., n q (3–53) where r Y b m = r Y :,1 b m r Y :, n y b m r U b m = 0 1 Nn u r q b m = r q 1 b m r q n q b m m =1,..., n q (3–54) Therstderivatives r Y :, i b m r t 0 b m and r t f b m canbefoundinasparsemanneras r Y :, i b m = @ b m @ Y 1, i 0 1 N 1 @ b m @ Y N +1, i r q k b m = @ b m @ q k r t 0 b m = @ b m @ t 0 r t f b m = @ b m @ t f (3–55) 60

PAGE 61

Defect 1 { State 1 { State 2 { State n y Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Zeros or Diagonal Block+ D -Matrix Zeros or Diagonal Block+ D -Matrix { Defect 2 { Defect n y {{ Control 1 { Control n u Path 1 Either Zeros or Diagonal Block { Path n c Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Boundary Conditions { Either Zeros or Endpoints only Either Zeros or Endpoints only All Zeros Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Zeros or Diagonal Block+ D -Matrix Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f q 1 q n q n q1 Identity All ZerosAll Zeros Figure3-3.GeneralJacobiansparsitypatternfortheLegen dre-Gauss-Radau orthogonalcollocationdifferentialScheme. where ( i =1,..., n y ) ( k =1,..., n q ) ,and ( m =1,..., n b ) ItisseenfromEqs.( 3–43 )–( 3–55 )thattheNLPconstraintJacobianrequiresthat therstderivativesof a c ,and bedeterminedwithrespecttothecontinuous-time state, y ,continuous-timecontrol, u ,andcontinuous-time, t ,andthatthederivatives of b becomputedwithrespecttotheinitialstate, Y 1 ,theinitialtime, t 0 ,thenalstate, Y N +1 ,thenaltime, t f ,andtheintegralvariables q .Furthermore,thesederivativesare computedateitherthe N collocationpoints(inthecaseofthederivativesof a c ,and )orarecomputedattheendpoints(inthecaseof b ).TheNLPconstraintJacobianis 61

PAGE 62

thenassembledusingtheequationsderivedinthissection. Thesparsitypatternfora generalLegendre-Gauss-Radauorthogonalcollocationmet hodNLPconstraintJacobian isshowninFig. 3-3 3.4.3ConstraintJacobianIntegralForm TheJacobianoftheconstraintsisdenedas r z h = 266666666666666666666666666666666664 r z :,1 ... r z :, n y r z C :,1 ... r z C :, n c r z 1 ... r z n b r z b 1 ... r z b n b 377777777777777777777777777777777775 (3–56) Therstderivativesofthedefectconstraintsareobtained as r z :, l = r Y :, l r U :, l r q :, l r t 0 :, l r t f :, l l =1,..., n y (3–57) where r Y :, l = r Y :,1 :, l r Y :, n y :, l r U :, l = r U :,1 :, l r U :, n u :, l r q :, l = 0 N n q l =1,..., n y (3–58) 62

PAGE 63

Therstderivatives r Y :, i :, l ,( i l =1,..., n y ), r U :, j :, l ,( j =1,..., n u l =1,..., n y ), r t 0 :, l ( l =1,..., n y ),and r t f :, l ( l =1,..., n y ) ,canbeobtainedas r Y :, i :, l = il E :,1: N t f t 0 2 I diag @ a l @ y i 1N E :, N +1 # r U :, j :, l = t f t 0 2 I diag @ a l @ u j 1N r t 0 :, l = 1 2 I [ a l ] 1N t f t 0 2 I @ a l @ t 1N r t f :, l = 1 2 I [ a l ] 1N t f t 0 2 I @ a l @ t 1N (3–59) where ( i l =1,..., n y ) ,and ( j =1,..., n u ) .Furthermore, il istheKroneckerdelta function il = 8><>: 1, i = l 0, otherwise Therstderivativesofthepathconstraintsaregivenas r z C :, p = r Y C :, p r U C :, p r q C :, p r t 0 C :, p r t f C :, p p =1,..., n c (3–60) where r Y C :, p = r Y :,1 C :, p r Y :, n y C :, p r U C :, p = r U :,1 C :, p r U :, n u C :, p r q C :, p = 0 N n q p =1,..., n c (3–61) 63

PAGE 64

Therstderivatives r Y :, i C :, p r U :, j C :, p r t 0 C :, p and r t f C :, p canbefoundinasparse manneras r Y :, i C :, p = diag @ c p @ y i 1N 0 N 1 # r U :, j C :, p = diag @ c p @ u j 1N r t 0 C :, p = @ c p @ t 1N r t f C :, p = @ c p @ t 1N (3–62) where ( i =1,..., n y ) ( j =1,..., n u ) ,and ( p =1,..., n c ) .Therstderivativesofthe integralconstraintsaregivenas r z r = r Y r r U r r q r r t 0 r r t f r r =1,..., n q (3–63) where r Y r = r Y :,1 r r Y :, n y r r U r = r U :,1 r r U :, n u r r q r = r q 1 r r q n q r r =1,..., n q (3–64) 64

PAGE 65

Thederivatives r Y :, i r r U :, j r r t 0 r and r t f r areobtainedas r Y :, i r = t f t 0 2 ( w @ g r @ y i 1N ) T 0 # r U :, j r = t f t 0 2 ( w @ g r @ u j 1N ) T r q k r = 8><>: 1, k = r 0, k 6 = r r t 0 r = 1 2 w T [ g r ] 1N t f t 0 2 w T ( @ g r @ t 1N ) r t f r = 1 2 w T [ g r ] 1N t f t 0 2 w T ( @ g r @ t 1N ) (3–65) where ( i =1,..., n y ) ( j =1,..., n u ) ,and ( k r =1,..., n q ) .Therstderivativesofthe boundaryconditionsaregivenas r z b m = r Y b m r U b m r q b m r t 0 b m r t f b m m =1,..., n q (3–66) where r Y b m = r Y :,1 b m r Y :, n y b m r U b m = 0 1 Nn u r q b m = r q 1 b m r q n q b m m =1,..., n q (3–67) Therstderivatives r Y :, i b m r t 0 b m and r t f b m canbefoundinasparsemanneras r Y :, i b m = @ b m @ Y 1, i 0 1 N 1 @ b m @ Y N +1, i r q k b m = @ b m @ q k r t 0 b m = @ b m @ t 0 r t f b m = @ b m @ t f (3–68) 65

PAGE 66

Defect 1 { State 1 { State 2 { State n y { Defect 2 { Defect n y {{ Control 1 { Control n u Path 1 Either Zeros or Diagonal Block { Path n c Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Boundary Conditions { Either Zeros or Endpoints only Either Zeros or Endpoints only All Zeros Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f q 1 q n q n q 1 Identity All ZerosAll Zeros Zeros or Integration Block+F-Matrix Zeros or Integration Block+F-Matrix Zeros or Integration Block+F-Matrix Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Figure3-4.GeneralJacobiansparsitypatternfortheLegen dre-Gauss-Radau orthogonalcollocationintegralscheme. where ( i =1,..., n y ) ( k =1,..., n q ) ,and ( m =1,..., n b ) ItisseenfromEqs.( 3–56 )–( 3–68 )thattheNLPconstraintJacobianrequiresthat therstderivativesof a c ,and bedeterminedwithrespecttothecontinuous-time state, y ,continuous-timecontrol, u ,andcontinuous-time, t ,andthatthederivatives of b becomputedwithrespecttotheinitialstate, Y 1 ,theinitialtime, t 0 ,thenalstate, Y N +1 ,thenaltime, t f ,andtheintegralvariables q .Furthermore,thesederivativesare computedateitherthe N collocationpoints(inthecaseofthederivativesof a c ,and )orarecomputedattheendpoints(inthecaseof b ).TheNLPconstraintJacobianis 66

PAGE 67

thenassembledusingtheequationsderivedinthissection. Thesparsitypatternfora generalLegendre-Gauss-Radauorthogonalcollocationmet hodNLPconstraintJacobian isshowninFig. 3-4 3.4.4LagrangianHessian TheLagrangianoftheNLPgiveninEqs.( 3–36 )and( 3–37 )isdenedas L = f ( z )+ T h ( z ), (3–69) where 2 R and 2 R N ( n y + n c )+ n q + n m isavectorofLagrangemultipliers.Thevector is givenas = 2666666666666666666664 :,1 ... :, n y :,1 ... :, n c 3777777777777777777775 (3–70) where i j ,( i =1,..., N j =1,..., n y ) aretheLagrangemultipliersassociatedwith thedefectconstraintsofEq.( 3–30 ), i j ,( i =1,..., N i =1,..., n c ) aretheLagrange multipliersassociatedwiththepathconstraintsofEq.( 3–32 ), i ,( i =1,..., n q ) arethe LagrangemultipliersassociatedwithEq.( 3–33 ),and i ,( i =1,..., n b ) aretheLagrange multipliersassociatedwiththeboundaryconditionsofEq. ( 3–34 ).TheLagrangiancan thenberepresentedas L = + n y X i =1 T:, i :, i + n c X p =1 T:, p C :, p + n q X r =1 r r + n b X m =1 m b m (3–71) 67

PAGE 68

Forconvenienceinthediscussionthatfollows,theHessian oftheLagrangianwillbe decomposedintotwopartsas r 2zz L = r 2zz L E + r 2zz L I (3–72) where L E representsthosepartsoftheLagrangianthatarefunctions oftheendpoints functions and b L E = + n b X q =1 q b q (3–73) while L I representsthosepartsoftheLagrangianthatarefunctions ofcollocationpoint functions, C and L I = n y X i =1 T:, i :, i + n c X p =1 T:, p C :, p + n q X r =1 r r (3–74) Inthenextsubsectionswedescribethesecondderivativeso fthefunctions L E and L I ItisnotedthattheHessianissymmetric,thus,onlythelowe rtriangularportionof r 2zz L E and r 2zz L I arecomputed. 3.4.4.1Hessianofendpointfunction TheHessianof L E withrespecttothedecisionvariablevector z ,denoted r 2zz L E ,is denedas r 2zz L E = 266666666664 r 2YY L E ( r 2U Y L E ) T ( r 2qY L E ) T ( r 2t 0 Y L E ) T ( r 2t f Y L E ) T r 2U Y L E r 2UU L E ( r 2q U L E ) T ( r 2t 0 U L E ) T ( r 2t f U L E ) T r 2qY L E r 2q U L E r 2qq L E ( r 2t 0 q L E ) T ( r 2t f q L E ) T r 2t 0 Y L E r 2t 0 U L E r 2t 0 q L E r 2t 0 t 0 L E ( r 2t f t 0 L E ) T r 2t f Y L E r 2t f U L E r 2t f q L E r 2t f t 0 L E r 2t f t f L E 377777777775 (3–75) 68

PAGE 69

wheretheblocksof r 2zz L E aredenedas r 2YY L E = 266666664 r 2Y :,1 Y :,1 L E r 2Y :,2 Y :,1 L E T r 2Y :, n y Y :,1 L E T r 2Y :,2 Y :,1 L E r 2Y :,2 Y :,2 L E r 2Y :, n y Y :,2 L E T ... ... ... r 2Y :, n y Y :,1 L E r 2Y :, n y Y :,2 L E r 2Y :, n y Y :, n y L E 377777775 r 2qY L E = 266664 r 2q 1 Y :,1 L E r 2q 1 Y :, n y L E ... ... r 2q n q Y :,1 L E r 2q n q Y :, n y L E 377775 r 2qq L E = 266666664 r 2q 1 q 1 L E r 2q 2 q 1 L E T r 2q n q q 1 L E T r 2q 2 q 1 L E r 2q 2 q 2 L E r 2q n q q 2 L E T ... ... ... r 2q n q q 1 L E r 2q n q q 2 L E r 2q n q q n q L E 377777775 r 2t 0 Y L E = r 2t 0 Y :,1 L E r 2t 0 Y :, n y L E r 2t 0 q L E = r 2t 0 q 1 L E r 2t 0 q n q L E r 2t f Y L E = r 2t f Y :,1 L E r 2t f Y :, n y L E r 2t f q L E = r 2t f q 1 L E r 2t f q n q L E where r 2U Y L E = 0 Nn u ( N +1) n y r 2UU L E = 0 Nn u Nn u r 2q U L E = 0 n q Nn u r 2t 0 U L E = 0 1 Nn u r 2t f U L E = 0 1 Nn u 69

PAGE 70

Thematrices r 2Y :, i Y :, j L E r 2q k Y :, j L E r 2q k q r L E r 2t 0 Y :, j L E r 2t 0 q r L E r 2t 0 t 0 L E r 2t f Y :, j L E r 2t f q r L E r 2t f t 0 L E and r 2t f t f L E areobtainedinasparsemanneras r 2Y :, i Y :, j L E = 2666664 @ 2 L E @ Y 1, i @ Y 1, j 0 1 N 1 @ 2 L E @ Y 1, i @ Y N +1, j 0 N 1 1 0 N 1 N 1 0 N 1 1 @ 2 L E @ Y N +1, i @ Y 1, j 0 1 N 1 @ 2 L E @ Y N +1, i @ Y N +1, j 3777775 ( i =1,..., n y ), ( j =1,..., i ), r 2t 0 Y :, j L E = @ 2 L E @ t 0 @ Y 1, j 0 1 N 1 @ 2 L E @ t 0 @ Y N +1, j ,( j =1,..., n y ), r 2q k Y :, j L E = @ 2 L E @ q k @ Y 1, j 0 1 N 1 @ 2 L E @ q k @ Y N +1, j ( k =1,..., n q ), ( j =1,..., n y ), r 2q k q r L E = @ 2 L E @ q k @ q r ( k =1,..., n q ), ( r =1,..., k ), r 2t 0 q r L E = @ 2 L E @ t 0 @ q r ,( r =1,..., n q ), r 2t 0 t 0 L E = @ 2 L E @ t 2 0 r 2t f Y :, j L E = @ 2 L E @ t f @ Y 1, j 0 1 N 1 @ 2 L E @ t f @ Y N +1, j ,( j =1,..., n y ), r 2t f q r L E = @ 2 L E @ t f @ q r ,( r =1,..., n q ), r 2t f t 0 L E = @ 2 L E @ t f @ t 0 r 2t f t f L E = @ 2 L E @ t 2 f (3–76) wherewerecallthat L E isitselfafunctionoftheMayercost, ,andtheboundary conditionfunction, b .Because and b arefunctionsofthecontinuous-timeoptimal controlproblem,theHessian r 2zz L E withrespecttotheNLPdecisionvector z canitself 70

PAGE 71

beobtainedbydifferentiatingthefunctionsofthe continuous-timeoptimalcontrolproblem ,andassemblingthesederivativesintothecorrectlocatio nsoftheNLPLagrangian Hessian.3.4.4.2Hessianofcollocationpointfunctiondifferentia lform TheHessian r 2zz L I isdenedas r 2zz L I = 266666666664 r 2YY L I ( r 2U Y L I ) T ( r 2qY L I ) T ( r 2t 0 Y L I ) T ( r 2t f Y L I ) T r 2U Y L I r 2UU L I ( r 2q U L I ) T ( r 2t 0 U L I ) T ( r 2t f U L I ) T r 2qY L I r 2q U L I r 2qq L I ( r 2t 0 q L I ) T ( r 2t f q L I ) T r 2t 0 Y L I r 2t 0 U L I r 2t 0 q L I r 2t 0 t 0 L I ( r 2t f t 0 L I ) T r 2t f Y L I r 2t f U L I r 2t f q L I r 2t f t 0 L I r 2t f t f L I 377777777775 (3–77) 71

PAGE 72

wheretheblocksof r 2zz L I aregivenas r 2YY L I = 266666664 r 2Y :,1 Y :,1 L I r 2Y :,2 Y :,1 L I T r 2Y :, n y Y :,1 L I T r 2Y :,2 Y :,1 L I r 2Y :,2 Y :,2 L I r 2Y :, n y Y :,2 L I T ... ... ... r 2Y :, n y Y :,1 L I r 2Y :, n y Y :,2 L I r 2Y :, n y Y :, n y L I 377777775 r 2U Y L I = 266664 r 2U :,1 Y :,1 L I r 2U :,1 Y :, n y L I ... ... r 2U :, n u Y :,1 L I r 2U :, n u Y :, n y L I 377775 r 2UU L I = 266666664 r 2U :,1 U :,1 L I r 2U :,2 U :,1 L I T r 2U :, n u U :,1 L I T r 2U :,2 U :,1 L I r 2U :,2 U :,2 L I r 2U :, n u U :,2 L I T ... ... ... r 2U :, n u U :,1 L I r 2U :, n u U :,2 L I r 2U :, n u U :, n u L I 377777775 r 2t 0 Y L I = r 2t 0 Y :,1 L I r 2t 0 Y :, n y L I r 2t 0 U L I = r 2t 0 U :,1 L I r 2t 0 U :, n u L I r 2t f Y L I = r 2t f Y :,1 L I r 2t f Y :, n y L I r 2t f U L I = r 2t f U :,1 L I r 2t f U :, n u L I where r 2qY L I = 0 n q ( N +1) n y r 2q U L I = 0 n q Nn u r 2qq L I = 0 n q n q r 2t 0 q L I = 0 1 n q r 2t f q L I = 0 1 n q 72

PAGE 73

Thematrices r 2Y :, i Y :, j L I r 2U :, i Y :, j L I r 2U :, i U :, j L I r 2t 0 Y :, j L I r 2t 0 U :, j L I r 2t 0 t 0 L I r 2t f Y :, j L I r 2t f U :, j L I r 2t f t 0 L I and r 2t f t f L I areobtainedinasparsemanneras r 2Y :, i Y :, j L I = 2664 diag @ 2 L I @ y i @ y j 1N 0 N 1 0 1 N 0 3775 ,( i =1,..., n y j =1,..., i ), r 2U :, i Y :, j L I = diag @ 2 L I @ u i @ y j 1N 0 N 1 # ,( i =1,..., n u j =1,..., n y ), r 2U :, i U :, j L I = diag @ 2 L I @ u i @ u j 1N ,( i =1,..., n u j =1,..., i ), r 2t 0 Y :, j L I = ( @ 2 L I @ t 0 @ y j 1N ) T 0 # ,( j =1,..., n y ), r 2t 0 U :, j L I = ( @ 2 L I @ t 0 @ u j 1N ) T ,( j =1,..., n u ), r 2t 0 t 0 L I = @ 2 L I @ t 2 0 r 2t f Y :, j L I = ( @ 2 L I @ t f @ y j 1N ) T 0 # ,( j =1,..., n y ), r 2t f U :, j L I = ( @ 2 L I @ t f @ u j 1N ) T ,( j =1,..., n u ), r 2t f t 0 L I = @ 2 L I @ t f @ t 0 r 2t f t f L I = @ 2 L I @ t 2 f (3–78) ItisseenthatthederivativesgiveninEq.( 3–78 )arefunctionsofthederivativesof L I withrespecttothecomponentsofthecontinuous-timestate y ( t ) ,thecomponents ofthecontinuous-timecontrol, u ( t ) ,theinitialtime, t 0 ,andthenaltime, t f .The derivatives h @ 2 L I @ y i @ y j i 1N h @ 2 L I @ u i @ y j i 1N h @ 2 L I @ u i @ u j i 1N h @ 2 L I @ t 0 @ y j i 1N h @ 2 L I @ t 0 @ u j i 1N @ 2 L I @ t 2 0 h @ 2 L I @ t f @ y j i 1N h @ 2 L I @ t f @ u j i 1N 73

PAGE 74

@ 2 L I @ t f @ t 0 ,and @ 2 L I @ t 2 f aregiven,respectively,as @ 2 L I @ y i @ y j 1N = t f t 0 2 ( n y X l =1 :, l @ 2 a l @ y i @ y j 1N + n q X k =1 k w @ 2 g k @ y i @ y j 1N ) + n c X p =1 :, p @ 2 c p @ y i @ y j 1N ,( i j =1,..., n y ), (3–79) @ 2 L I @ u i @ y j 1N = t f t 0 2 ( n y X l =1 :, l @ 2 a l @ u i @ y j 1N + n q X k =1 k w @ 2 g k @ u i @ y j 1N ) + n c X p =1 :, p @ 2 c p @ u i @ y j 1N ,( i =1,..., n u j =1,..., n y ), (3–80) @ 2 L I @ u i @ u j 1N = t f t 0 2 ( n y X l =1 :, l @ 2 a l @ u i @ u j 1N + n q X k =1 k w @ 2 g k @ u i @ u j 1N ) + n c X p =1 :, p @ 2 c p @ u i @ u j 1N ,( i j =1,..., n u ), (3–81) @ 2 L I @ t 0 @ y j 1N = 1 2 ( n y X l =1 :, l @ a l @ y j 1N + n q X k =1 k w @ g k @ y j 1N ) t f t 0 2 ( n y X l =1 :, l @ 2 a l @ t @ y j 1N + n q X k =1 k w @ 2 g k @ t @ y j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ y j 1N ) ,( j =1,..., n y ), (3–82) @ 2 L I @ t 0 @ u j 1N = 1 2 ( n y X l =1 :, l @ a l @ u j 1N + n q X k =1 k w @ g k @ u j 1N ) t f t 0 2 ( n y X l =1 :, l @ 2 a l @ t @ u j 1N + n q X k =1 k w @ 2 g k @ t @ u j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ u j 1N ) ,( j =1,..., n u ), (3–83) 74

PAGE 75

@ 2 L I @ t 2 0 = T ( n y X l =1 :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–84) @ 2 L I @ t f @ y j 1N = 1 2 ( n y X l =1 :, l @ a l @ y j 1N + n q X k =1 k w @ g k @ y j 1N ) t f t 0 2 ( n y X l =1 :, l @ 2 a l @ t @ y j 1N + n q X k =1 k w @ 2 g k @ t @ y j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ y j 1N ) ,( j =1,..., n y ), (3–85) @ 2 L I @ t f @ u j 1N = 1 2 ( n y X l =1 :, l @ a l @ u j 1N + n q X k =1 k w @ g k @ u j 1N ) t f t 0 2 ( n y X l =1 :, l @ 2 a l @ t @ u j 1N + n q X k =1 k w @ 2 g k @ t @ u j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ u j 1N ) ,( j =1,..., n u ), (3–86) @ 2 L I @ t f @ t 0 = 1 2 T ( n y X l =1 :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) + 1 2 T ( n y X l =1 :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–87) 75

PAGE 76

{ Control n u Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Diagonal Block With Corners Diagonal Block With Corners Diagonal Block With Corners Diagonal Block With Corners { Control 1 { State n y { State 1 q 1 q n q All Zeros All Zeros Figure3-5.GeneralHessiansparsitypatternfortheLegend re-Gauss-Radauorthogonal collocationdifferentialscheme. @ 2 L I @ t 2 f = T ( n y X l =1 :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–88) ItisseenfromtheabovederivationthattheHessianof L I withrespecttotheNLP decisionvector z isafunctionoftherstandsecondderivativesofthefuncti ons a and g ,andthesecondderivativesofthefunction c ,where a c ,and g aredenedinthe 76

PAGE 77

optimalcontrolproblemofSection 3.2 .Thus,theHessianof L I canbeobtainedasa functionofderivativesassociatedwiththefunctionsofth eoptimalcontrolproblemstated inSection 3.2 .Figure. 3-5 showsthesparsitypatternofageneralNLPLagrangian Hessianobtainedfromthediscretizationofthecontinuous -timeproblemusingthe Legendre-Gauss-Radauorthogonalcollocationmethod.3.4.4.3Hessianofcollocationpointfunctionintegralfor m TheHessian r 2zz L I isdenedas r 2zz L I = 266666666664 r 2YY L I ( r 2U Y L I ) T ( r 2qY L I ) T ( r 2t 0 Y L I ) T ( r 2t f Y L I ) T r 2U Y L I r 2UU L I ( r 2q U L I ) T ( r 2t 0 U L I ) T ( r 2t f U L I ) T r 2qY L I r 2q U L I r 2qq L I ( r 2t 0 q L I ) T ( r 2t f q L I ) T r 2t 0 Y L I r 2t 0 U L I r 2t 0 q L I r 2t 0 t 0 L I ( r 2t f t 0 L I ) T r 2t f Y L I r 2t f U L I r 2t f q L I r 2t f t 0 L I r 2t f t f L I 377777777775 (3–89) 77

PAGE 78

wheretheblocksof r 2zz L I aregivenas r 2YY L I = 266666664 r 2Y :,1 Y :,1 L I r 2Y :,2 Y :,1 L I T r 2Y :, n y Y :,1 L I T r 2Y :,2 Y :,1 L I r 2Y :,2 Y :,2 L I r 2Y :, n y Y :,2 L I T ... ... ... r 2Y :, n y Y :,1 L I r 2Y :, n y Y :,2 L I r 2Y :, n y Y :, n y L I 377777775 r 2U Y L I = 266664 r 2U :,1 Y :,1 L I r 2U :,1 Y :, n y L I ... ... r 2U :, n u Y :,1 L I r 2U :, n u Y :, n y L I 377775 r 2UU L I = 266666664 r 2U :,1 U :,1 L I r 2U :,2 U :,1 L I T r 2U :, n u U :,1 L I T r 2U :,2 U :,1 L I r 2U :,2 U :,2 L I r 2U :, n u U :,2 L I T ... ... ... r 2U :, n u U :,1 L I r 2U :, n u U :,2 L I r 2U :, n u U :, n u L I 377777775 r 2t 0 Y L I = r 2t 0 Y :,1 L I r 2t 0 Y :, n y L I r 2t 0 U L I = r 2t 0 U :,1 L I r 2t 0 U :, n u L I r 2t f Y L I = r 2t f Y :,1 L I r 2t f Y :, n y L I r 2t f U L I = r 2t f U :,1 L I r 2t f U :, n u L I where r 2qY L I = 0 n q ( N +1) n y r 2q U L I = 0 n q Nn u r 2qq L I = 0 n q n q r 2t 0 q L I = 0 1 n q r 2t f q L I = 0 1 n q 78

PAGE 79

Thematrices r 2Y :, i Y :, j L I r 2U :, i Y :, j L I r 2U :, i U :, j L I r 2t 0 Y :, j L I r 2t 0 U :, j L I r 2t 0 t 0 L I r 2t f Y :, j L I r 2t f U :, j L I r 2t f t 0 L I and r 2t f t f L I areobtainedinasparsemanneras r 2Y :, i Y :, j L I = 2664 diag @ 2 L I @ y i @ y j 1N 0 N 1 0 1 N 0 3775 ,( i =1,..., n y j =1,..., i ), r 2U :, i Y :, j L I = diag @ 2 L I @ u i @ y j 1N 0 N 1 # ,( i =1,..., n u j =1,..., n y ), r 2U :, i U :, j L I = diag @ 2 L I @ u i @ u j 1N ,( i =1,..., n u j =1,..., i ), r 2t 0 Y :, j L I = ( @ 2 L I @ t 0 @ y j 1N ) T 0 # ,( j =1,..., n y ), r 2t 0 U :, j L I = ( @ 2 L I @ t 0 @ u j 1N ) T ,( j =1,..., n u ), r 2t 0 t 0 L I = @ 2 L I @ t 2 0 r 2t f Y :, j L I = ( @ 2 L I @ t f @ y j 1N ) T 0 # ,( j =1,..., n y ), r 2t f U :, j L I = ( @ 2 L I @ t f @ u j 1N ) T ,( j =1,..., n u ), r 2t f t 0 L I = @ 2 L I @ t f @ t 0 r 2t f t f L I = @ 2 L I @ t 2 f (3–90) ItisseenthatthederivativesgiveninEq.( 3–90 )arefunctionsofthederivativesof L I withrespecttothecomponentsofthecontinuous-timestate y ( t ) ,thecomponents ofthecontinuous-timecontrol, u ( t ) ,theinitialtime, t 0 ,andthenaltime, t f .The derivatives h @ 2 L I @ y i @ y j i 1N h @ 2 L I @ u i @ y j i 1N h @ 2 L I @ u i @ u j i 1N h @ 2 L I @ t 0 @ y j i 1N h @ 2 L I @ t 0 @ u j i 1N @ 2 L I @ t 2 0 h @ 2 L I @ t f @ y j i 1N h @ 2 L I @ t f @ u j i 1N 79

PAGE 80

@ 2 L I @ t f @ t 0 ,and @ 2 L I @ t 2 f aregiven,respectively,as @ 2 L I @ y i @ y j 1N = t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ y i @ y j 1N + n q X k =1 k w @ 2 g k @ y i @ y j 1N ) + n c X p =1 :, p @ 2 c p @ y i @ y j 1N ,( i j =1,..., n y ), (3–91) @ 2 L I @ u i @ y j 1N = t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ u i @ y j 1N + n q X k =1 k w @ 2 g k @ u i @ y j 1N ) + n c X p =1 :, p @ 2 c p @ u i @ y j 1N ,( i =1,..., n u j =1,..., n y ), (3–92) @ 2 L I @ u i @ u j 1N = t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ u i @ u j 1N + n q X k =1 k w @ 2 g k @ u i @ u j 1N ) + n c X p =1 :, p @ 2 c p @ u i @ u j 1N ,( i j =1,..., n u ), (3–93) @ 2 L I @ t 0 @ y j 1N = 1 2 ( n y X l =1 ^ :, l @ a l @ y j 1N + n q X k =1 k w @ g k @ y j 1N ) t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ t @ y j 1N + n q X k =1 k w @ 2 g k @ t @ y j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ y j 1N ) ,( j =1,..., n y ), (3–94) @ 2 L I @ t 0 @ u j 1N = 1 2 ( n y X l =1 ^ :, l @ a l @ u j 1N + n q X k =1 k w @ g k @ u j 1N ) t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ t @ u j 1N + n q X k =1 k w @ 2 g k @ t @ u j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ u j 1N ) ,( j =1,..., n u ), (3–95) 80

PAGE 81

@ 2 L I @ t 2 0 = T ( n y X l =1 ^ :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 ^ :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–96) @ 2 L I @ t f @ y j 1N = 1 2 ( n y X l =1 ^ :, l @ a l @ y j 1N + n q X k =1 k w @ g k @ y j 1N ) t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ t @ y j 1N + n q X k =1 k w @ 2 g k @ t @ y j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ y j 1N ) ,( j =1,..., n y ), (3–97) @ 2 L I @ t f @ u j 1N = 1 2 ( n y X l =1 ^ :, l @ a l @ u j 1N + n q X k =1 k w @ g k @ u j 1N ) t f t 0 2 ( n y X l =1 ^ :, l @ 2 a l @ t @ u j 1N + n q X k =1 k w @ 2 g k @ t @ u j 1N ) + ( n c X p =1 :, p @ 2 c p @ t @ u j 1N ) ,( j =1,..., n u ), (3–98) @ 2 L I @ t f @ t 0 = 1 2 T ( n y X l =1 ^ :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) + 1 2 T ( n y X l =1 ^ :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 ^ :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–99) 81

PAGE 82

{ Control n u Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Diagonal Block With Corners Diagonal Block With Corners Diagonal Block With Corners Diagonal Block With Corners { Control 1 { State n y { State 1 q 1 q n q All Zeros All Zeros Figure3-6.GeneralHessiansparsitypatternfortheLegend re-Gauss-Radauorthogonal collocationintegralscheme. @ 2 L I @ t 2 f = T ( n y X l =1 ^ :, l @ a l @ t 1N + n q X k =1 k w @ g k @ t 1N ) t f t 0 2 T "( n y X l =1 ^ :, l @ 2 a l @ t 2 1N + n q X k =1 k w @ 2 g k @ t 2 1N ) # + T "( n c X p =1 :, p @ 2 c p @ t 2 1N ) # (3–100) whereitisnotedthat ^ = I (3–101) 82

PAGE 83

ItisseenfromtheabovederivationthattheHessianof L I withrespecttotheNLP decisionvector z isafunctionoftherstandsecondderivativesofthefuncti ons a and g ,andthesecondderivativesofthefunction c ,where a c ,and g aredenedinthe optimalcontrolproblemofSection 3.2 .Thus,theHessianof L I canbeobtainedasa functionofderivativesassociatedwiththefunctionsofth eoptimalcontrolproblemstated inSection 3.2 .Figure. 3-6 showsthesparsitypatternofageneralNLPLagrangian Hessianobtainedfromthediscretizationofthecontinuous -timeproblemusingthe Legendre-Gauss-Radauorthogonalcollocationmethod. 3.5Discussion Whileperhapsnotevidentatrstglance,theapproachofSec tion 3.4 onlyrequires differentiationofthemuchsmallerandsimplerfunctionso fthecontinuous-timeoptimal controlproblemofSection 3.2 asopposedtodifferentiationofthemuchlargerand morecomplicatedobjectiveandconstraintfunctionsofthe NLP.Forexample,usingour approach,theNLPconstraintJacobianofSection 3.4.2 isobtainedusingEqs.( 3–46 ), ( 3–49 ),and( 3–55 ),wheretherstderivativesofthedefectconstraintsandp ath constraintsareevaluatedatthe N collocationpoints,whilethederivativesofthe boundaryconditionfunctionareevaluatedattheendpoints oftheinterval.Thus,the Jacobianisobtainedbyevaluatingonlythefunctionsofthe continuous-timeoptimal controlproblemasopposedtodifferentiatingthemuchlarg erandmorecomplicated objectiveandconstraintfunctionsoftheNLP.Thesimplici tyoftheapproachdeveloped inthispaperoverdifferentiatingtheNLPisparticularlye videntwhencomputingthe LagrangianHessianofSection 3.4.4 .Specically,fromEqs.( 3–76 )and( 3–78 )itisseen thattheHessianisobtainedbydifferentiatingthefunctio ns L I and L E withrespectto thecontinuous-timestate,control,andtimeateitherthee ndpoints(inthecase L E ) orthe N collocationpoints(inthecaseof L I ).Furthermore,because L E and L I are scalarfunctions,avarietyofdifferentiationtechniques canbeutilizedinanefcientand easytounderstandmanner.Effectively,theNLPobjectivef unctiongradient,constraint 83

PAGE 84

Jacobian,andLagrangianHessianareobtainedbydifferent iatinga subset ofsimpler andsmallerfunctions.Becausethederivativesofthesesim plerandsmallerfunctions areevaluatedatonlythecollocationpointsortheendpoint softhetimeinterval,the expressionsderivedinSection 3.4 providethemostefcientwaytocomputetheNLP derivativefunctions. 3.6Example Considerthefollowingvariationoftheorbit-raisingopti malcontrolproblemtaken fromRef.[ 48 ].Minimizethecostfunctional J = r ( t f ) (3–102) subjecttothedynamicconstraints r = v r = v = r v r = v 2 = r = r 2 + au 1 v = v r v = r + au 2 (3–103) theequalitypathconstraint c = u 2 1 + u 2 2 =1, (3–104) andtheboundaryconditions b 1 = r (0) 1=0, b 2 = (0)=0, b 3 = v r (0)=0, b 4 = v (0) 1=0, b 5 = v r ( t f )=0, b 6 = p = r ( t f ) v ( t f )=0, (3–105) 84

PAGE 85

where =1 T =0.1405 m 0 =1 m =0.0749 t f =3.32 ,and a ( t )= T m 0 j m j t (3–106) Inthisexamplethecontinuous-timestateandcontrolaregi ven,respectively,as y ( t )= r ( t ) ( t ) v t ( t ) v ( t ) u ( t )= u 1 ( t ) u 2 ( t ) whiletheright-handsidefunctionofthedynamics,thepath constraintfunction,andthe boundaryconditionfunctionaregiven,respectively,as a ( y ( t ), u ( t ), t )= v r v = rv 2 = r = r 2 + au 1 v r v = r + au 2 c ( y ( t ), u ( t ), t )= u 2 1 + u 2 2 1 b ( y ( t 0 ), t 0 y ( t f ), t f )= r (0) 1 (0) v r (0) v (0) 1 v r ( t f ) p = r ( t f ) v ( t f ) Finally,thelowerandupperboundsonthepathconstraintsa ndboundaryconditions areallzero.Becausetherstveboundaryconditions, ( b 1 ,..., b 5 ) ,aresimplebounds ontheinitialandnalcontinuous-timestate,theywillbee nforcedintheNLPassimple boundsontheNLPvariablescorrespondingtotheinitialand terminalstate.The 6 th boundarycondition, b 6 ,ontheotherhand,isanonlinearfunctionoftheterminalst ate and,thus,willbeenforcedintheNLPasanonlinearconstrai nt. TheNLParisingfromtheLegendre-Gauss-Radauorthogonalc ollocation discretizationoftheoptimalcontrolproblemgiveninEqs. ( 3–102 )–( 3–105 )was solvedusingNLPsolver IPOPT [ 43 ].Itisnotedthat IPOPT canbeusedaseithera rst-derivativeNLPsolver(wheretheobjectivefunctiong radientandconstraintJacobian aresupplied)orcanbeusedasasecond-derivativeNLPsolve r(wheretheobjective functiongradient,constraintJacobian,andLagrangianHe ssianaresupplied).When usedasarst-derivativequasi-NewtonNLPsolver, IPOPT approximatestheLagrangian 85

PAGE 86

Hessianusingalimited-memoryBFGSupdate.Whenusedasase condderivativeNLP solver,thelower-triangularportionofthesparseLagrang ianHessianisused.Itisnoted thatthecomputationalefciencyandreliabilityof IPOPT areenhancedbyprovidingan accurate,sparse,andefcientlycomputedLagrangianHess ian. InordertoseetheeffectivenessofthederivationofSectio n 3.4 ,inthisexamplethe Legendre-Gauss-RadauorthogonalcollocationmethodNLPw assolvedusing IPOPT byeitherdirectlydifferentiatingtheNLPobjectivefunct ion, f ,theconstraints, h ,andthe Lagrangian, L ,orbydifferentiatingthefunctions g a c ,and b ofthecontinuous-time optimalcontrolproblemasgiveninEqs.( 3–1 )–( 3–5 ),respectivelyandusingthemethod derivedinSection 3.4 .WhentheNLPfunctionsaredirectlydifferentiatedand IPOPT isappliedasarst-derivativeNLP,therstderivativesof f and h arecomputedusing either (i)rstforward-differencing;(ii)theforward-modeobject-orientedMATLABautomaticdi fferentiator INTLAB [ 52 ]. WhentheNLPfunctionsaredirectlydifferentiatedand IPOPT isappliedasa second-derivativeNLPsolver,therstderivativesof f and h andthesecondderivatives of L arecomputedusing (iii)method(i)plusasecondforward-differencetoapprox imatetheHessianof L ; (iv)method(ii)plustheforward-modeobject-orientedMAT LABautomaticdifferentiator INTLAB [ 52 ]tocomputetheHessianof L Whentheoptimalcontrolfunctions g a c ,and b aredifferentiatedand IPOPT isused asarst-derivativeNLPsolver,therstderivativesof g a c ,and b arecomputed usingeither (v)rstforward-differencingof g a c ,and b ; (vi)analyticdifferentiationof g a c ,and b 86

PAGE 87

Whentheoptimalcontrolfunctions g a c ,and b aredifferentiatedand IPOPT isused asasecond-derivativeNLPsolver,therstandsecondderiv ativesof g a c ,and b arecomputedusingeither (vii)themethodof(v)plussecondforward-differencingto approximatethesecond derivativesof g a c ,and b ; (viii)analyticdifferentiationtoobtainthesecondderiv ativesof g a c ,and b Forcompleteness,theJacobianandHessiansparsitypatter nsforthisexampleare shown,respectively,inFigs. 3-8 and 3-9 .Whenusingnite-differencingor INTLAB to differentiatetheNLPconstraintfunction,onlythenonlin earpartsweredifferentiated;all knownlinearpartsoftheNLPconstraintfunctionwereobtai nedaprioriandstoredfor lateruse.WhenimplementingthemappingderivedinSection 3.4 ,onlythefunctions ofthecontinuous-timeproblemshowninSection 3.2 arecomputed;theappropriate NLPderivativematricesarethenobtainedbyinsertingthes ederivativesintothecorrect locationsintheappropriatematrixusingthemappingofSec tion 3.4 .Itisnotedthat theNLPconstraintJacobianandLagrangianHessiansparsit ypatterns,shownin Figs. 3-8 and 3-9 ,arefoundusingthederivationgiveninSection 3.4 bydifferentiating thecontinuous-timeoptimalcontrolproblem,andareimple mentedfor all derivative methods.AllcomputationswereperformedonanIntelCore2D uo6602.4GHz computerwith2GBofRAMrunning32-bitOpenSuseLinuxwithM ATLAB2010aand IPOPT version3.6,where IPOPT wascompiledwiththesparsesymmetriclinearsolver MA57[ 53 ].Finally,foreachofthemethods(i)–(viii)thevaluesint heNLPderivatives matriceswereveriedusingboth(a)thederivativechecker builtinto IPOPT and(b)a comparisonbetweenthederivativesobtainedusingthemeth odofSection 3.4 andthe derivativesobtainedusingtheautomaticdifferentiator INTLAB [ 52 ]. Theexamplewassolvedusing K =(16,32,64,128,256,512) equally-spaced meshintervalswith 4 LGRpointsineachmeshinterval.Atypicalsolutiontoobtai ned forthisexampleisshowninFig. 3-7 .Tables 3-1 and 3-2 summarizethecomputational 87

PAGE 88

performanceusingmethods(i)–(iv)andmethods(v)–(viii) ,respectively.Inparticular, Tables 3-1 and 3-2 showthatdifferentiatingthefunctionsoftheoptimalcont rolproblem andusingtheapproachofSection 3.4 issignicantlymorecomputationallyefcient thandirectdifferentiationoftheNLPfunctions.Morespec ically,itisseeninTables 3-1 and 3-2 that,regardlessofwhethertheNLPsolverisusedasaquasiNewton orNewtonmethod,thedifferenceincomputationalefcienc ybetweendirectNLP functiondifferentiationandtheapproachofthispapergro wstoseveralordersof magnitude.Asanexample,for N =2048 method(i)takes2246swhilemethod(v) takes27.1swhereasmethod(iii)takes5871swhilemethod(v ii)takes23.1s.Asa result,differentiatingonlythefunctionsoftheoptimalc ontrolproblemhasasubstantial computationalbenetforlargeproblemsoverdirectdiffer entiationoftheNLPfunctions. Next,itisusefultocomparenite-differencingagainstei therautomaticoranalytic differentiation.First,whencomparingmethods(i)and(ii )tomethods(iii)and(iv)in Table 3-1 [thatis,comparingnite-differencingagainstautomatic differentiationof theNLPfunctions],itisseenthatusing IPOPT withasaquasi-Newtonmethodwith INTLAB issignicantlymoreefcientthanusinganyothermethodwh eretheNLP functionsaredifferentiateddirectly.Correspondingly, directdifferentiationoftheNLP functionsusing IPOPT insecond-derivativemodeisbyfartheleastefcientbecau seit iscomputationallycostlytocomputetheHessianLagrangia ninthismanner.Inaddition tocomputationalcost, INTLAB suffersfromtheproblemthatMATLABrunsoutof memoryfor N =1024 or N =2048 .Thus,eventhough IPOPT convergesinmany feweriterationsinsecond-derivativemode,thecostperit erationrequiredtocompute theLagrangianHessianissignicantlyhigherthanthecost tousethequasi-Newton Hessianapproximation. Next,Table 3-3 summarizestheproblemsizeanddensityoftheNLPconstrain t JacobianandLagrangianHessianforthedifferentvaluesof K .Itisinterestingto observethatthedensitiesofboththeNLPconstraintJacobi anandLagrangianHessian 88

PAGE 89

decreasequicklyasafunctionoftheoverallproblemsize(n umberofvariablesand constraints).BecausethenumberofnonzerosintheJacobia nandHessianmatrices growsslowlyasafunctionof K ,onewouldexpectthattheexecutiontimewouldalso growslowly.AsseenfromtheresultsinTable 3-2 ,theapproachdevelopedinSection 3.4 ofthispaperexploitstheslowgrowthinthenumberofnonzer os,thusmaintaining computationaltractabilityastheNLPincreasesinsize.Ta ble 3-1 ontheotherhand showsthat,whentheNLPfunctionsaredirectlydifferentia ted,manyunnecessary calculationsareperformedwhichdegradesperformancetot hepointwheredirect differentiationbecomesintractableforlargevaluesof K Theresultsobtainedbydifferentiatingtheoptimalcontro lfunctionsusing thederivationofSection 3.4 aresignicantlydifferentfromthoseobtainedusing directdifferentiationoftheNLPfunctions.Inparticular ,itisseenthatusingeither nite-differencingoranalyticdifferentiation,thecomp utationtimesusingthemethod ofSection 3.4 aremuchlowerthanthoseobtainedbydirectdifferentiatio noftheNLP functions.Inaddition,thebenetofusingsecondanalytic derivatives(areduction incomputationtimebyafactoroftwooversecondnite-diff erencing)demonstrates that,withanaccurateHessian,onlyasmallfractionofthet otalexecutiontimeisspent insidetheNLPsolver.Instead,themajorityoftheexecutio ntimeisspentevaluating theHessian.Asaresult,thespeedwithwhich IPOPT cangenerateasolutionin second-derivativemodedependsheavilyupontheefciency withwhichtheLagrangian Hessiancanbecomputed.ReferringagaintoTable 3-3 ,itisseenthatthemethod ofthispapertakesadvantageofthesparsityintheNLPconst raintJacobianand LagrangianHessianas K increases.Becausethemethodpresentedinthispaperhas thebenetthatanaccurateHessiancanbecomputedquickly, thetimerequiredtosolve theNLPisgreatlyreducedoverdirectdifferentiationofth eNLPfunctions. 89

PAGE 90

ty ( t )=( r ( t ) ; ( t ) ;v r ( t ) ;v ( t ))r ( t ) ( t ) v r ( t ) v ( t ) 0 0 0.5 0.5 1 1 1.5 1.5 2 2 2.5 2.5 3 3.5 A t u ( t )=( u 1 ( t ) ;u 2 ( t ))u 1 ( t ) u 2 ( t ) -1 -0.8 -0.6 -0.4 -0.2 0 0 0.2 0.4 0.5 0.6 0.8 1 1 1.5 2 2.5 3 3.5 B Figure3-7.Solutiontoorbit-raisingoptimalcontrolprob lemfor 16 equally-spacedmesh intervalsof 4 LGRpointseach ( N =64) 90

PAGE 91

Defect r { { D-Matrix Plus Dia gonal D-Matrix Plus Diagonal D-Matrix Plus Diagonal D-Matrix Plus Diagonal State r State q { Defect q { Defect v q { {{ Control u 1 { Control u 2 Path { State v r { State v q Defect v r { b 6t 0 t f Figure3-8.NLPConstraintJacobiansparsitypatternforth eorbit-raisingoptimalcontrol problem. 91

PAGE 92

{ State r { State q { Control u 1 { Control u 2 t 0 t f { State v r { State v q Figure3-9.NLPLagrangianHessiansparsitypatternforthe orbit-raisingoptimalcontrol problem. 92

PAGE 93

Table3-1.DirectdifferentiationoftheNLPfunctionsusin gnite-differencingand INTLAB fortheorbit-raisingproblemusingtheLegendre-Gauss-Ra dauorthogonal collocationmethodwith K =(16,32,64,128,256,512) equally-spacedmesh intervals, N k =4 LGRpointspermeshinterval,andtheNLPsolver IPOPT DerivativeMethodfor IPOPT KN NLPMajorIterationsCPUTime(s) (i)166414136.2(i)3212812157.9(i)64256125133(i)128512176435(i)25610242121051(i)51220481962246 (ii)16641182.9(ii)321281153.6(ii)642561365.7(ii)12851215610.2(ii)256102415819.4(ii)512204814331.2 (iii)16643244.5(iii)3212835100(iii)6425646263(iii)12851249708(iii)2561024562058(iii)5122048675871 (iv)1664332.3(iv)32128395.4(iv)642564317.1(iv)12851277126(iv)2561024OutofMemoryOutofMemory(iv)5122048OutofMemoryOutofMemory 93

PAGE 94

Table3-2.Differentiationoftheoptimalcontrolproblemf unctionstogetherwiththe approachofsection 3.4 usingnite-differencingandanalyticdifferentiationfo r theorbit-raisingproblemusingtheLegendre-Gauss-Radau orthogonal collocationmethodwith K =(16,32,64,128,256,512) equally-spacedmesh intervals, N k =4 LGRpointsineachmeshinterval,andtheNLPsolver IPOPT DerivativeMethodfor IPOPT KN NLPMajorIterationsCPUTime(s) (v)16641441.7(v)321281141.9(v)642561323.5(v)1285121577.6(v)256102415213.7(v)512204816427.1 (vi)16641131.3(vi)321281061.7(vi)642561323.2(vi)1285121546.8(vi)256102415012.1(vi)512204813621.1 (vii)1664310.83(vii)32128351.3(vii)64256452.5(vii)128512484.9(vii)25610245611.0(vii)51220486023.1 (viii)1664300.54(viii)32128350.93(viii)64256411.6(viii)128512422.5(viii)2561024495.3(viii)51220486010.9 Table3-3.SummaryofproblemsizesanddensitiesofNLPcons traintJacobianand LagrangianHessianfortheorbit-raisingproblemusingtheLegendre-Gauss-RadauorthogonalcollocationmethodwithK =(16,32,64,128,256,512) equally-spacedmeshintervals, N k =4 LGR pointsineachmeshinterval,andtheNLPsolver IPOPT NLPNLPJacobianJacobianHessianHessian KN VariablesConstraintsNon-ZerosDensity (%) Non-ZerosDensity (%) 166439032124982.0019251.273212877464149941.0138450.642642561542128199860.50676850.323 12851230782561199700.253153650.162256102461505121399380.127307250.081251220481229410241798740.0634614450.0407 94

PAGE 95

3.7Conclusions Explicitexpressionshavebeenderivedfortheobjectivefu nctiongradient,constraint Jacobian,andLagrangianHessianofanonlinearprogrammin gproblemthatarises indirectorthogonalcollocationmethodsforsolvingconti nuous-timeoptimalcontrol problems.Akeyfeatureoftheproceduredevelopedinthispa peristhatonlythe functionsofthecontinuous-timeoptimalcontrolproblemn eedtobedifferentiated inordertodeterminethenonlinearprogrammingproblemder ivativefunctions.Asa result,itispossibletoobtainthesederivativefunctions muchmoreefcientlythan wouldbethecaseifthenonlinearprogrammingproblemfunct ionsweredirectly differentiated.Inaddition,theapproachderivedinthisp aperexplicitlyidentiesthe sparsestructureofthenonlinearprogrammingproblem.The approachdevelopedinthis papercansignicantlyimprovethecomputationalefcienc yandreliabilityofsolvingthe nonlinearprogrammingproblemarisingfromtheLegendre-G auss-Radauorthogonal collocationmethodapproximation,particularlywhenusin gasecond-derivativenonlinear programmingproblemsolverwheretheLagrangianHessianca nbeexploited.An examplehasbeenstudiedtoshowtheefciencyofvariousder ivativeoptionsandthe approachdevelopedinthispaperisfoundtoimprovesignic antlytheefciencywith whichthenonlinearprogrammingproblemissolved. 95

PAGE 96

CHAPTER4 HP ADAPTIVEMESHREFINEMENT Thepurposeofthischapteristodescribeasystematicwayto estimatetheerror intheRadaudiscretizationofanoptimalcontrolproblemus ingthefactthatRadau collocationisaGaussianquadratureintegrationmethod.B asedonthederivedestimate oftheerror,weprovideasimpleyeteffective hp variable-ordermeshrenementmethod thatallowsboththedegreeoftheapproximatingpolynomial andthenumberofmesh intervalstovary.Themethodisdemonstratedonthreenon-t rivialexamples,andis foundtobemorecomputationallyefcientandproducesasma llermeshforagiven accuracytolerancewhencomparedwithtraditionalxed-or dermethods. Thischapterisorganizedasfollows.InSection 4.1 weprovideamotivationfor ournew ph method.InSection 4.2 westatethecontinuous-timeBolzaoptimalcontrol problem.InSection 4.3 ,westatetheintegralformoftheasthebasisforthe ph mesh renementmethoddevelopedinthischapter.InSection 4.4 wedeveloptheerror estimateandournew ph adaptivemeshrenementmethod.InSection 4.5 weapplythe methodofSection 4.4 tothreeexamplesthathighlightdifferentfeaturesofthem ethod. InSection 4.6 weprovideadiscussionofthemethodandacomparisonwithtr aditional xed-order h methods.Finally,inSection 4.7 weprovideconclusionsonthemethod. 4.1MotivationforNew ph AdaptiveCollocationMethod Becausethemethoddescribedinthischapterincreasesthed egreeofthe approximatingpolynomialofameshintervalbeforeitsubdi videsthemeshintervalinto moremeshintervals,themethodisreferredtoasa ph method.considerthefollowing tworst-orderdifferentialequationsontheinterval 2 [ 1,+1] : dy 1 d = f 1 ( )= cos( ), y 1 ( 1)= y 10 (4–1) dy 2 d = f 2 ( )= 8>>>><>>>>: 0, 1 < 1 = 2 cos( ), 1 = 2 +1 = 2, 0,+1 = 2 < +1 y 2 ( 1)= y 20 (4–2) 96

PAGE 97

ThesolutionstothedifferentialequationsofEqs.( 4–1 )and( 4–2 )aregiven,respectively, as y 1 ( )= y 10 +sin( ), (4–3) y 2 ( )= 8>>>><>>>>: y 20 1 < 1 = 2, y 20 +1+sin( ), 1 = 2 +1 = 2, y 20 +2,+1 = 2 < +1. (4–4) Supposenowthatitisdesiredtoapproximatethesolutionst othedifferentialequations ofEqs.( 4–1 )and( 4–2 )usingthefollowingtwodifferentmethodsthatemploythe Legendre-Gauss-Radau[ 51 ]collocationmethodasdescribedinvariousformsin Refs.[ 18 – 20 27 29 ]:(1)a p methodbasedonan N th k degreeLegendre-Gauss-Radau orthogonalcollocationmethodon [ 1,+1] where N k isallowedtovary;and(2)an h methodusing K equallyspacedmeshintervalswhere K isallowedtovaryanda xedfourth-degreeLegendre-Gauss-Radauorthogonalcoll ocationmethodoneach meshinterval.Supposefurtherthat withinanymeshinterval [ T k 1 T k ] theLagrange polynomialapproximationshavetheform y ( k ) i ( ) Y ( k ) i ( )= N +1 X j =1 Y ( k ) ij ` ( k ) j ( ), ` ( k ) j ( )= N +1 Y l =1 l 6 = j ( k ) l ( k ) j ( k ) l (4–5) wherethesupportpointsfor ` ( k ) j ( ), j =1,..., N k +1 ,arethe N k Legendre-Gauss-Radau points[ 51 ] ( ( k ) 1 ,..., ( k ) N ) on [ T k 1 T k ] alongwithanon-collocatedpoint ( k ) N +1 = T k that denestheendofthemeshinterval.Withinanyparticularme shinterval [ T k 1 T k ] [ 1,+1] ,theapproximationsof y ( k ) i ( ), i =1,2 ,aregivenatthesupportpoints ( k ) j +1 j =1,..., N ,as y ( k ) i ( ( k ) j +1 ) Y ( k ) i ( ( k ) j +1 )= Y ( k ) i 1 + N X l =1 I ( k ) jl f i ( ( k ) l ),( i =1,2),( j =1,..., N ), (4–6) 97

PAGE 98

where Y ( k ) i 1 istheapproximationto y i ( ( k ) 1 ) atthestartofthemeshintervaland I ( k ) jl ( j l = 1,..., N k ) isthe N k N k Legendre-Gauss-Radauintegrationmatrix(seeRef.[ 18 ]for details)denedonthemeshinterval [ T k 1 T k ] Supposenowthatwedenethemaximumabsoluteerrorintheso lutionofthe differentialequationas E i =max j 2 [1,..., N k ] k 2 [1,..., K ] Y ( k ) ij y i ( ( k ) j ) ,( i =1,2). Figs 4-1A and 4-1B showthebase-10logarithmof E 1 asafunctionof N forthe p methodandasafunctionof K forthe h method.First,itisseenthatbecause y 1 ( ) is asmoothfunction,the p methodconvergesexponentiallyasafunctionof N whilethe h methodconvergessignicantlymoreslowlyasafunctionof K .Figures 4-1C and 4-1D show E 2 .Unlike y 1 ,thefunction y 2 iscontinuousbut notsmooth .Asaresult,the h methodconvergesfasterthanthe p methodbecausenosinglepolynomial(regardless ofdegree)on [ 1,+1] isabletoapproximatethesolutiontoEq.( 4–2 )asaccurately asapiecewisepolynomial.However,whilethe h methodconvergesmorequicklythan doesthe p methodwhenapproximatingthesolutionofEq.( 4–2 ),itisseenthatthe h methoddoesnotconvergeasquicklyasthe p methoddoeswhenapproximatingthe solutiontoEq.( 4–1 ).Infact,whenapproximatingthesolutionofEq.( 4–1 )itisseenthat the h methodachievesanerrorof 10 7 for K =24 whereasthe p methodconverges exponentiallyandachievesanerrorof 10 15 for N =20 .Asaresult,an h method doesnotprovidethefastestpossibleconvergenceratewhen approximatingthesolution toadifferentialequationwhosesolutionissmooth. Giventheaforementioned p and h analysis,supposenowthatitisdesiredto improveupontheconvergencerateofan h methodwhenapproximatingthesolution ofadifferentialequationwhosesolutionisnotaccurately approximatedusinga singlepolynomial.Inparticular,supposeitisdesiredtoa pproximatethesolutionof Eq.( 4–2 )usinganapproachthatisa hybrid ofa p andan h method,namelya ph 98

PAGE 99

Legendre-Gauss-Radauorthogonalcollocationmethod.Ass umeinthisexamplethata ph methodisconstructedsuchthatthetimeinterval [ 1,+1] isdividedintointothree meshintervals [ 1, 1 = 2] [ 1 = 2,+1 = 2] ,and [+1 = 2,+1] andLagrangepolynomial approximationsoftheformofEq.( 4–5 )ofdegree N 1 N 2 ,and N 3 ,respectively,are usedineachmeshinterval.Furthermore,suppose N 1 N 2 ,and N 3 areallowedto vary.Becausethesolution y 2 ( ) isaconstantintherstandthirdmeshintervals,itis possibletoset N 1 = N 3 =2 andvary only N 2 .Figure 4-1E showstheerrorin y 2 ( ) E 2 ph =max j y 2 Y 2 j usingtheaforementionedthreeinterval ph approach.Similartothe resultsobtainedusingthe p methodwhenapproximatingthesolutionofEq.( 4–1 ),inthis casetheerrorinthesolutionofEq.( 4–2 )convergesexponentiallyasafunctionof N 2 Thus,whilean h methodmayoutperforma p methodonaproblemwhosesolutionis notsmooth,itispossibleimprovetheconvergenceratebyus ingan ph adaptivemethod. Theforegoinganalysisprovidesamotivationforthedevelo pmentofthe ph method describedintheremainderofthischapter. 4.2BolzaOptimalControlProblem Withoutlossofgenerality,considerthefollowinggeneral optimalcontrolproblemin Bolzaform.Determinethestate, y ( t ) 2 R n y ,thecontrol u ( t ) 2 R n u ,theinitialtime, t 0 andtheterminaltime, t f ,onthetimeinterval t 2 [ t 0 t f ] thatminimizethecostfunctional J = ( y ( t 0 ), t 0 y ( t f ), t f )+ Z t f t 0 g ( y ( t ), u ( t ), t ) dt (4–7) subjecttothedynamicconstraints d y dt = a ( y ( t ), u ( t ), t ), (4–8) theinequalitypathconstraints c min c ( y ( t ), u ( t ), t ) c max (4–9) 99

PAGE 100

4 8 12 16 24 -15 -5 N log 10 E 1 p 0 20 -10 A log 10 E 1 p vs. N using p Radaumethod. 4 8 12 16 24 -15 -5 K log 10 E 1 h 0 20 -10 B log 10 E 1 h vs. K using h Radaumethodwith N =4 4 8 12 16 24 -3.5 -3 -2.5 -1.5 -1 -0.5 N log 10 E 2 p 0 20 -2 C log 10 E 2 p vs. N using p Radaumethod. 4 8 12 16 24 -3.5 -3 -2.5 -1.5 -1 -0.5 K log 10 E 2 h 0 20 -2 D log 10 E 2 h vs. K using h Radaumethodwith N =4 4 8 12 16 24 log 10 E 2 phN 2 0 20 -2 -4 -6 -8 -10 -12 -14 -16 E log 10 E 2 ph vs. N 2 using ph Radaumethod. Figure4-1.Base-10logarithmofabsoluteerrorsinsolutio nsofEqs.( 4–1 )and( 4–2 )at lagrangepolynomialsupportpointsusing p h methods,and ph methods. 100

PAGE 101

andtheboundaryconditions b min b ( y ( t 0 ), t 0 y ( t f ), t f ) b min (4–10) Thefunctions g a c and b aredenedbythefollowingmappings: : R n y R R n y R R g : R n y R n u R R a : R n y R n u R R n y c : R n y R n u R R n c b : R n y R R n y R R n b whereallvectorfunctionsoftimearetreatedas row vectors.Inthispresentationit willbeusefultomodifytheBolzaproblemgiveninEqs.( 4–7 )–( 4–10 )asfollows.Let 2 [ 1,+1] beanewindependentvariablesuchthat t = t f t 0 2 + t f + t 0 2 (4–11) TheBolzaoptimalcontrolproblemofEqs.( 4–7 )–( 4–10 )isthendenedintermsofthe variable asfollows.Determinethestate, y ( ) 2 R n y ,thecontrol u ( ) 2 R n u ,theinitial time, t 0 ,andtheterminaltime t f onthetimeinterval 2 [ 1,+1] thatminimizethecost functional J = ( y ( 1), t 0 y (+1), t f )+ t f t 0 2 Z +1 1 g ( y ( ), u ( ), ; t 0 t f ) d (4–12) subjecttothedynamicconstraints d y d = t f t 0 2 a ( y ( ), u ( ), ; t 0 t f ), (4–13) theinequalitypathconstraints c min c ( y ( ), u ( ), ; t 0 t f ) c max (4–14) 101

PAGE 102

andtheboundaryconditions b min b ( y ( 1), t 0 y (+1), t f ) b min (4–15) Supposenowthatthetimeinterval 2 [ 1,+1] isdividedintoa mesh consisting of K meshintervals S k =[ T k 1 T k ], k =1,..., K ,where ( T 0 ,..., T K ) arethe mesh points .Themeshintervals S k ,( k =1,..., K ) havethepropertiesthat K [ k =1 S k =[ 1,+1] and K \ k =1 S k = ; ,whilethemeshpointshavethepropertythat 1= T 0 < T 1 < T 2 < < T K =+1 .Let y ( k ) ( ) and u ( k ) ( ) bethestateandcontrolin S k .TheBolzaoptimal controlproblemofEqs.( 4–12 )–( 4–15 )canthenrewrittenasfollows.Minimizethecost functional J = ( y (1) ( 1), t 0 y ( K ) (+1), t f ) + t f t 0 2 K X k =1 Z T k T k 1 g ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ) d ,( k =1,..., K ), (4–16) subjecttothedynamicconstraints d y ( k ) ( ) d = t f t 0 2 a ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ),( k =1,..., K ), (4–17) thepathconstraints c min c ( y ( k ) ( ), u ( k ) ( ), ; t 0 t f ) c max ,( k =1,..., K ), (4–18) andtheboundaryconditions b min b ( y (1) ( 1), t 0 y ( K ) (+1), t f ) b max (4–19) Becausethestatemustbecontinuousateachinteriormeshpo int,itisrequiredthatthe condition y ( T k )= y ( T + k ),( k =1,..., K 1) besatisedattheinteriormeshpoints ( T 1 ,..., T K 1 ) 102

PAGE 103

4.3Legendre-Gauss-RadauCollocationMethod The ph formofthecontinuous-timeBolzaoptimalcontrolproblemi nSection 4.2 is discretizedusingcollocationatLegendre-Gauss-Radau(L GR)points[ 18 – 20 27 29 ]. IntheLGRcollocationmethod,thestateofthecontinuous-t imeBolzaoptimalcontrol problemisapproximatedin S k k 2 [1,..., K ] as y ( k ) ( ) Y ( k ) ( )= N k +1 X j =1 Y ( k ) j ` ( k ) j ( ), ` ( k ) j ( )= N k +1 Y l =1 l 6 = j ( k ) l ( k ) j ( k ) l (4–20) where 2 [ 1,+1] ` ( k ) j ( ), j =1,..., N k +1 ,isabasisofLagrangepolynomials, ( k ) 1 ,..., ( k ) N k aretheLegendre-Gauss-Radau[ 51 ](LGR)collocationpointsin S k = [ T k 1 T k ) ,and ( k ) N k +1 = T k isanoncollocatedpoint.Differentiating Y ( k ) ( ) inEq.( 4–20 ) withrespectto ,weobtain d Y ( k ) ( ) d = N k +1 X j =1 Y ( k ) j d ` ( k ) j ( ) d (4–21) ThecostfunctionalofEq.( 4–16 )isthenapproximatedusingamultiple-intervalLGR quadratureas J ( Y (1) 1 t 0 Y ( K ) N K +1 t f )+ K X k =1 N k X j =1 t f t 0 2 w ( k ) j g ( Y ( k ) j U ( k ) j ( k ) j ; t 0 t f ), (4–22) where w ( k ) j ( j =1,..., N k ) aretheLGRquadratureweights[ 51 ]in S k =[ T k 1 T k ] k 2 [1,..., K ] U ( k ) i i =1,..., N k ,aretheapproximationsofthecontrolatthe N k LGR pointsinmeshinterval k 2 [1,..., K ] Y (1) 1 istheapproximationof y ( T 0 ) ,and Y ( K ) N K +1 isthe approximationof y ( T K ) (wherewerecallthat T 0 = 1 and T K =+1 ).Collocatingthe dynamicsofEq.( 4–17 )atthe N k LGRpointsusingEq.( 4–21 ),wehave N k +1 X j =1 D ( k ) ij Y ( k ) j t f t 0 2 a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ), where D ( k ) ij = d ` ( k ) j ( ( k ) i ) d ,( i =1,..., N k j =1,..., N k +1), 103

PAGE 104

aretheelementsofthe N k ( N k +1) Legendre-Gauss-Radaudifferentiationmatrix [ 18 ] D ( k ) associatedwith S k k 2 [1,..., K ] .Whilethedynamicscanbecollocated indifferentialform,inthischapterwechoosetocollocate thedynamicsusingthe equivalent implicitintegralform (seeRefs.[ 18 – 20 ]fordetails).Theimplicitintegralform oftheLegendre-Gauss-Radaucollocationmethodisgivenas Y ( k ) i +1 Y ( k ) 1 t f t 0 2 N k X j =1 I ( k ) ij a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ), (4–23) where I ( k ) ij ,( i =1,..., N k j =1,..., N k k =1,..., K ) isthe N k N k Legendre-GaussRadauintegrationmatrix inmeshinterval k 2 [1,..., K ] ;itisobtainedbyinvertinga submatrixofthedifferentiationmatrixformedbycolumns 2 through N k +1 : I ( k ) = h D ( k ) 2 D ( k ) N k +1 i 1 Itisnotedforcompletenessthat I ( k ) D ( k ) 1 = 1 ,where 1 isacolumnvectoroflength N k ofallones.Next,thepathconstraintsofEq.( 4–18 )in S k k 2 [1,..., K ] areenforcedat the N k LGRpointsas c min c ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) c max ,( i =1,..., N k ). (4–24) TheboundaryconditionsofEq.( 4–19 )areapproximatedas b min b ( Y (1) 1 t 0 Y ( K ) N K +1 t f ) b max (4–25) Itisnotedthatcontinuityinthestateattheinteriormeshp oints k 2 [1,..., K 1] is enforcedviathecondition Y ( k ) N k +1 = Y ( k +1) 1 ,( k =1,..., K 1), (4–26) wherethe same variableisusedforboth Y ( k ) N k +1 and Y ( k +1) 1 .Hence,theconstraintof Eq.( 4–26 )iseliminatedfromtheproblembecauseitistakenintoacco untexplicitly.The 104

PAGE 105

NLPthatarisesfromtheLGRcollocationmethodisthentomin imizethecostfunctionof Eq.( 4–22 )subjecttothealgebraicconstraintsofEqs.( 4–23 )–( 4–25 ). 4.4 ph AdaptiveMeshRenementMethod Wenowdevelopa ph adaptivemeshrenementmethodthatusingtheLGR collocationmethoddescribedinSection 4.3 .Wecallourmethoda ph methodsince wersttrytoadjustthepolynomialdegreetoachieveconver gence,andifthisfails,we adjustthemeshspacing.The ph adaptivemeshrenementmethoddevelopedinthis chapterisdividedintotwoparts.InSection 4.4.1 ,themethodforestimatingtheerrorin thecurrentsolutionisderived,andinSection 4.4.4 ,the p thenh strategyisdeveloped forreningthemesh.4.4.1ErrorEstimateinEachMeshInterval InthisSectionanestimateoftherelativeerrorinthesolut ionwithinameshinterval isderived.BecausethestateistheonlyquantityintheLGRc ollocationmethodfor whichauniquelydenedfunctionapproximationisavailabl e,wedevelopanerror estimateforthestate.Theerrorestimateisobtainedbycom paringtwoapproximations tothestate,onewithhigheraccuracy.Thekeyideaisthatfo raproblemwhose solutionissmooth,anincreaseinthenumberofLGRpointssh ouldyieldastate thatmoreaccuratelysatisesthedynamics.Hence,thediff erencebetweenthesolution associatedwiththeoriginalsetofLGRpoints,andtheappro ximationassociatedwith theincreasednumberofLGRpointsshouldyieldanestimatef ortheerrorinthestate. AssumethattheNLPofEqs.( 4–22 )–( 4–25 )correspondingtothediscretized controlproblemhasbeensolvedonamesh S k =[ T k 1 T k ], k =1,..., K ,with N k LGRpointsinmeshinterval S k .Supposethatwewanttoestimatetheerrorinthestate atasetof M k = N k +1 LGRpoints ^ ( k ) 1 ,...,^ ( k ) M k ,where ^ ( k ) 1 = ( k ) 1 = T k 1 ,and that ^ ( k ) M k +1 = T k .Supposefurtherthatthevaluesofthestateapproximation givenin Eq.( 4–20 )atthepoints ^ ( k ) 1 ,...,^ ( k ) M k aredenoted Y (^ ( k ) 1 ),..., Y (^ ( k ) M k ) .Next,letthe 105

PAGE 106

controlbeapproximatedin S k usingtheLagrangeinterpolatingpolynomial U ( k ) ( )= N k X j =1 U ( k ) j ^ ` ( k ) j ( ), ^ ` ( k ) j ( )= N k Y l =1 l 6 = j ( k ) l ( k ) j ( k ) l (4–27) andletthecontrolapproximationat ^ ( k ) i bedenoted U (^ ( k ) i ) 1 i M k .Weusethe valueofthedynamicsat ( Y (^ ( k ) i ), U (^ ( k ) i ),^ ( k ) i ) toconstructanimprovedapproximation tothestate.Let ^ Y ( k ) beapolynomialofdegreeatmost M k thatisdenedontheinterval S k .Ifthederivativeof ^ Y ( k ) matchesthedynamicsateachoftheRadauquadrature points ^ ( k ) i 1 i M k ,thenwehave ^ Y ( k ) (^ ( k ) j )= Y ( k ) ( k 1 )+ t f t 0 2 M k X l =1 ^ I ( k ) jl a Y ( k ) (^ ( k ) l ), U ( k ) (^ ( k ) l ),^ ( k ) l j =2,..., M k +1, (4–28) where ^ I ( k ) jl j l =1,..., M k ,isthe M k M k LGRintegrationmatrixcorresponding totheLGRpointsdenedby ^ ( k ) 1 ,...,^ ( k ) M k .Usingthevalues Y (^ ( k ) l ) and ^ Y (^ ( k ) l ) l =1,..., M k +1 ,the absolute and relativeerrors inthe i th componentofthestateat (^ ( k ) 1 ,...,^ ( k ) M k +1 ) arethendened,respectively,as E ( k ) i (^ ( k ) l )= ^ Y ( k ) i (^ ( k ) l ) Y ( k ) i (^ ( k ) l ) e ( k ) i (^ ( k ) l )= E ( k ) i (^ ( k ) l ) 1+max j 2 [1,..., M k +1] Y ( k ) i (^ ( k ) j ) 264 l =1,..., M k +1, i =1,..., n y 375 (4–29) The maximumrelativeerror in S k isthendenedas e ( k ) max =max i 2 [1,..., n y ] l 2 [1,..., M k +1] e ( k ) i (^ ( k ) l ). (4–30) 4.4.2RationaleforErrorEstimate TheerrorestimatederivedinSection 4.4.1 issimilartotheerrorestimateobtained usingthemodiedEulerRunge-Kuttaschemetonumericallys olveadifferential 106

PAGE 107

equation y ( t )= f ( y ( t )) .Therst-orderEulermethodisgivenas y j +1 = y j + hf ( y j ), (4–31) where h isthestep-sizeand y j istheapproximationto y ( t ) at t = t j = jh .Inthe second-ordermodiedEulerRunge-Kuttamethod,therstst agegeneratesthefollowing approximation y to y ( t j +1 = 2 ) : y = y j + 1 2 hf ( y j ). Thesecondstagethenusesthedynamicsevaluatedat y toobtainanimproved estimate ^ y j +1 of y ( t j +1 ) : ^ y j +1 = y j + hf ( y ). (4–32) TheoriginalEulerschemestartsat y j andgenerates y j +1 .Therst-stagevariable y is theinterpolantoftheline(rstdegreepolynomial)connec ting ( t j y j ) and ( t j +1 y j +1 ) evaluatedatthenewpoint t j +1 = 2 .Thesecond-stagegivenEq.( 4–32 )usesthedynamics attheinterpolant y toobtainanimprovedapproximationto y ( t j +1 ) .Because ^ y j +1 isa second-orderapproximationto y ( t j +1 ) and y j +1 isarst-orderapproximationto y j +1 ,the absolutedifference j ^ y j +1 y j +1 j isanestimateoftheerrorin y j +1 inamannersimilarto theabsoluteerrorestimate E ( k ) i (^ ( k ) l )( l =1,..., M k +1) derivedinEq.( 4–29 ). TheeffectivenessofthederivederrorestimatederivedinS ection 4.4.1 canbe seenbyrevisitingthemotivatingexamplesofSection 4.1 .Figures 4-2A and 4-2B showthe p and h errorestimates,respectively, E 1 p and E 1 h ,inthesolutiontoEq.( 4–1 ), Figures. 4-2C and 4-2D showthe p and h errorestimates,respectively, E 2 p and E 2 h ,in thesolutiontoEq.( 4–2 ),andFig. 4-2E showsthe ph errorestimates, E 2 ph inthesolution toEq.( 4–2 ).Itisseenthattheerrorestimatesarenearlyidenticalto theactualerror. TherelativeerrorestimategiveninEq.( 4–30 )isusedinthenextsectionasthebasisfor modifyinganexistingmesh. 107

PAGE 108

4 8 12 16 24 -15 -5 Estimate Exact N log 10 E 1 p 0 20 -10 A log 10 e 1 p vs. N using p Radaumethod. 4 8 12 16 24 -15 -5 Estimate Exact K log 10 E 1 h 0 20 -10 B log 10 e 1 h vs. K Using h Radaumethodwith N =4 4 8 12 16 24 -3.5 -3 -2.5 -1.5 -1 -0.5 Estimate Exact N log 10 E 2 p 0 20 -2 C log 10 e 2 p vs. N Using p Radaumethod. 4 8 12 16 24 -3.5 -3 -2.5 -1.5 -1 -0.5 Estimate Exact K log 10 E 2 h 0 20 -2 D log 10 e 2 h vs. K Using h Radaumethodwith N =4 4 8 12 16 24 Estimate Exact log 10 E 2 phN 2 0 20 -2 -4 -6 -8 -10 -12 -14 -16 E log 10 e 2 ph vs. N 2 Using ph Radaumethod. Figure4-2.Base-10logarithmofabsoluteerrorestimatesi nsolutionsofEqs.( 4–1 )and ( 4–2 )atpoints ( ^ 2 ,...,^ M k ) using p h methods,and ph methods. 108

PAGE 109

4.4.3EstimationofRequiredPolynomialDegreewithinaMes hInterval SupposeagaintheLGRcollocationNLPofEqs.( 4–22 )–( 4–25 )hasbeensolved onamesh S k k =1,..., K .Supposefurtherthatitisdesiredtomeetarelativeerror accuracytolerance ineachmeshinterval S k k =1,..., K .Ifthetolerance isnot metinatleastonemeshinterval,thenthenextstepistoren ethecurrentmesh,either bydividingthemeshintervalorincreasingthedegreeofthe approximatingpolynomial withinthemeshinterval. Considerameshinterval S q q 2 [1,..., K ] where N q LGRpointswereused tosolvetheNLPofEqs.( 4–22 )–( 4–25 ),andagainlet bethedesiredrelativeerror accuracytolerance.Supposefurtherthattheestimatedmax imumrelativeerror, e ( q ) max hasbeencomputedasdescribedinSection 4.4.1 andthat e ( q ) max > (thatis,theaccuracy tolerance is not satisedintheexistingmeshinterval).Finally,let N min and N max be user-speciedminimumandmaximumboundsonthenumberofLG Rpointswithinany meshinterval.Accordingtotheconvergencetheorysummari zedin[ 54 ],theerrorina globalcollocationschemebehaveslike O ( N 2.5 k ) where N isthenumberofcollocation pointswithinameshintervaland k isthenumberofcontinuousderivativesinthe solution[ 30 31 ].Ifthesolutionissmooth,thenwecouldtake k = N .Hence,if N was replaceby N + P ,thentheerrorbounddecreasesbyatleastthefactor N P Basedontheseconsiderations,supposethatinterval S q employs N q collocation pointsandhasrelativeerrorestimate e ( q ) max whichislargerthanthedesiredrelativeerror tolerance ;toreachthedesirederrortolerance,theerrorshouldbemu ltipliedbythe factor = e ( q ) max .Thisreductionisachievedbyincreasing N q by P q where P q ischosenso that N P q q = = e ( q ) max ,orequivalently, N P q q = e ( q ) max Thisimpliesthat P q =log N q e ( q ) max (4–33) 109

PAGE 110

0 2 2 4 5 6 8 8 10 11 12 14 14 16 18 N P = d log N ( e max = ) elog 10 ( e max = )=5 log 10 ( e max = )=4 log 10 ( e max = )=3 log 10 ( e max = )=2 log 10 ( e max = )=1 log 10 ( e max = )=0 A P = d log N ( e max = ) e vs. N forxedvalues of log 10 ( e max = ) 0 0 N =2 N =5 N =8 N =11 N =14 1 2 2 3 4 4 5 6 8 10 12 14 16 18 log 10 ( e max = )P = d log N ( e max = ) e B P = d log N ( e max = ) e vs. log 10 ( e max = ) for xedvaluesof N Figure4-3.Functionthatrelatestheincreaseinthedegree oftheapproximating polynomialtotheratio e max = andthecurrentpolynomialdegree, N Sincetheexpressionontherightsideof( 4–33 )maynotbeaninteger,weroundupto obtain P q = & log N q e ( q ) max !' (4–34) Notethat P q 0 sinceweonlyuse( 4–34 )when e ( q ) max isgreaterthantheprescribederror tolerance .Thedependenceof P q on N q isshowninFig. 4-3 4.4.4 p Then h StrategyforMeshRenement UsingEq.( 4–34 ),thepredictednumberofLGRpointsrequiredinmeshinterv al S q ontheensuingmeshis ~ N q = N q + P q ,assuming e ( q ) max hasnotreachthespecied errortolerance .Theonlypossibilitiesarethat ~ N q N max (thatis, ~ N doesnotexceed themaximumallowablepolynomialdegree)orthat ~ N q > N max (thatis, ~ N exceedsthe maximumallowablepolynomialdegree).If ~ N q N max ,then N q isincreasedto ~ N q onthe ensuingmesh.If,ontheotherhand, ~ N q > N max ,then ~ N q exceeds theupperlimitandthe meshinterval S q mustbedividedintosub-intervals. Ourstrategyformeshintervaldivisionusesthefollowinga pproach.First,whenever ameshintervalisdivided,thesumofthenumberofcollocati onpointsinthenewly createdmeshintervalsshouldequalthepredictedpolynomi aldegreeforthenextmesh. 110

PAGE 111

Second,eachnewlycreatedsub-intervalshouldcontainthe minimumallowablenumber ofcollocationpoints.Inotherwords,ifameshinterval S q isdividedinto B q sub-intervals, theneachnewlycreatedsub-intervalwillcontain N min collocationpointsandthesumof thecollocationpointsinthesenewlycreatedsub-interval sshouldbe B q N min .Usingthis strategy,thenumberofsub-intervals, B q ,intowhich S q isdividediscomputedas B q =max & ~ N q N min ,2 (4–35) whereitisseeninEq.( 4–35 )that 2 B q d ~ N q = N min e .Itisseenthisstrategyfor meshintervaldivisionensuresthatthesumoftheLGR(collo cation)pointsinthe newlycreatedsub-intervalsontheensuingmeshequalsthen umberofLGRpoints that wouldbeused inthemeshintervalontheensuingmeshifthevalue ~ N q was accepted.Second,becausethenumberofLGRpointsinanewly createdmeshinterval isstartedat N min ,themethodusesthefullrangeofallowablevaluesof N .Becauseof thehierarchy,the ph methodofthischaptercanbethoughtofmorepreciselyasa“ p thenh ”methodwhere p renementisexhaustedpriortoperformingany h renement. Inotherwords,thepolynomialdegreewithinameshinterval isincreaseduntiltheupper limit N max isexceeded.The h renement(meshintervaldivision)isthenperformedafter whichthe p renementisrestarted. Itisimportanttonotethatthe ph methoddevelopedinthischaptercanbeemployed asaxed-order h methodsimplybysetting N min = N max .The h versionofthemethod ofthischapterissimilartoanadaptivestep-sizexed-ord erintegrationmethod,such asanadaptivestep-sizeRunge-Kuttamethod,inthefollowi ngrespect:Inbothcases, themeshisrened,oftenbystep-halvingorstep-doubling[ 55 ],whenthespeciederror toleranceisnotmet. Asummaryofouradaptivemeshrenementalgorithmappearsb elow.Here M denotesthemeshnumber,andineachloopofthealgorithm,th emeshnumber 111

PAGE 112

increasesby 1 .ThealgorithmterminatesinStep4whentheerrortolerance issatised orwhen M reachesaprescribedmaximum M max ph AdaptiveMeshRenementMethod Step1: Set M =0 andsupplyinitialmesh, S = K [ k S k =[ 1,+1] ,where K \ k S k = ; Step2: SolveRadaucollocationNLPofEqs.( 4–22 )–( 4–25 )oncurrentmesh S Step3: Computescalederror e ( k ) max in S k k =1,..., K ,usingmethodof Section 4.4.1 Step4: If e ( k ) max forall k 2 [1,..., K ] or M > M max ,thenquit.Otherwise,proceedto step5. Step5: UsingthemethodofSection 4.4.4 ,modifyallmeshintervals S k forwhich e ( k ) max > Step6: Set M = M +1 ,andreturntostep2. 4.5Examples InthisSectionthe ph adaptiveLegendre-Gauss-Radau(LGR)methoddescribed inSection 4.4 isappliedtothreeexamplesfromtheopenliterature.Ther stexample isavariationofthehyper-sensitiveoptimalcontrolprobl emoriginallydescribedin Ref.[ 56 ],wheretheeffectivenessoftheerrorestimatederivedinS ection 4.4.1 is demonstratedandtheimprovedefciencyofthe ph methodovervarious h methods isshown.Thesecondexampleisatumoranti-angiogenesisop timalcontrolproblem originallydescribedinRef.[ 57 ],whereitisseenthatthe ph methodofthischapter accuratelyandefcientlycapturesadiscontinuityinapro blemwhoseoptimalcontrol isdiscontinuous.Thethirdexampleisthereusablelaunchv ehicleentryproblemfrom Ref.[ 10 ],whereitisseenthatusingthe ph methodofthischapterleadstoasignicantly smallermeshthanwouldbeobtainedusingan h method.Thisthirdexamplealsoshows thatallowing N min tobetoosmallcanreducetheeffectivenessofthe ph method. Whenusinga ph adaptivemethod,theterminology ph ( N min N max ) referstothe ph adaptivemethodofthischapterwherethepolynomialdegree canvarybetween N min 112

PAGE 113

and N max ,respectively,whilean h N methodreferstoan h methodwithapolynomial ofxeddegree N .Forexample,a ph (2,8) methodisa ph adaptivemethodwhere N min =2 and N max =8 ,whilean h 2 methodisan h methodwhere N =2 .Allresults wereobtainedusingtheopen-sourceoptimalcontrolsoftwa re GPOPS-II runningwith theNLPsolverIPOPT[ 58 ]insecondderivativemodewiththemultifrontalmassively parallelsparsedirectsolverMUMPS,[ 59 ]defaultNLPsolvertolerances,andamesh renementaccuracytolerance =10 6 .Theinitialmeshfora ph ( N min N max ) or h N min methodconsistedoftenuniformly-spacedmeshintervalswi th N min LGRpointsineach interval,whiletheinitialguesswasastraightlinebetwee ntheknowninitialconditions andknownterminalconditionsfortheproblemunderconside rationwiththeguesson allothervariablesbeingaconstant.Therequiredrstands econdderivativesrequired byIPOPTwerecomputedusingthebuilt-insparserstandsec ondnite-differencing methodin GPOPS-II thatusesthemethodofRef.[ 29 ].Finally,allcomputationswere performedona2.5GHzIntelCorei7MacBookProrunningMacOS -XVersion10.7.5 (Lion)16GBof1333MHzDDR3RAMandMATLABVersionR2012b.Th ecentral processingunit(CPU)timesreportedinthischapterareten -runaveragesofthe executiontime.4.5.1Hyper-SensitiveProblem Considerthefollowingvariationofthe hyper-sensitive optimalcontrolproblem[ 56 ]. Minimizethecostfunctional J = 1 2 Z t f 0 ( x 2 + u 2 ) dt (4–36) subjecttothedynamicconstraint x = x + u (4–37) andtheboundaryconditions x (0)=1.5, x ( t f )=1, (4–38) 113

PAGE 114

where t f isxed.Itisknownthatforsufcientlylargevaluesof t f thatthesolutiontothe hyper-sensitiveproblemexhibitsasocalled“take-off”,“ cruise”,and“landing”structure wherealloftheinterestingbehavioroccursnearthe“takeoff”and“landing”segments whilethesolutionisessentiallyconstantinthe“cruise”s egment.Furthermore,the “cruise”segmentbecomesandincreasinglylargepercentag eofthetotaltrajectorytime as t f increases,while“take-off”and“landing”segmentshavera pidexponentialdecay andgrowth,respectively.Theanalyticoptimalstateandco ntrolforthisproblemare givenas x ( t )= c 1 exp( t p 2)+ c 2 exp( t p 2), u ( t )=_ x ( t )+ x ( t ), (4–39) where 264 c 1 c 2 375 = 1 exp( t f p 2) exp( t f p 2) 264 1.5exp( t f p 2) 1 1 1.5exp( t f p 2) 375 (4–40) Figures 4-4A and 4-4B showstheexactstateandcontrolforthehyper-sensitivepr oblem with t f =10000 andhighlightthe“take-off”,“cruise”,and“landing”feat ureoftheoptimal solution.Giventhestructureoftheoptimalsolution,itsh ouldbethecasethatamesh renementmethodplacemanymorecollocationandmeshpoint sneartheendsofthe timeintervalwhen t f islarge.Figures 4-4C showstheevolutionofthemeshpoints T k whileFigure 4-4D showstheevolutioncollocation(LGR)points ( k ) j oneachmesh renementiterationusingthe ph (3,14 )scheme.Twokeyrelatedfeaturesareseenin themeshrenement.First,Figure. 4-4C showsthatmeshintervalsareaddedoneach renementiterationonlyintheregionsnear t =0 and t = t f ,whilemeshintervals are not addedintheinteriorregion t 2 [1000,9000] .Second,Figure. 4-4D showsthat aftertherstmeshrenementiterationLGRpointsarealsoa ddedonlyintheregions regionsnear t =0 and t = t f andarenotaddedintheinteriorregion t 2 [1000,9000] Thisbehaviorofthe ph adaptivemethodshowsthaterrorreductionisachievedby addedmeshandcollocationpointsinregionsof t 2 [0, t f ] wherepointsareneeded 114

PAGE 115

tocapturethechangesinthesolution.Finally,forcompari sonwiththe ph adaptive method,Figures. 4-4E and 4-4F showthesolutionobtainedusingan h 2 method.Unlike the ph (3,14) method,wheremeshpointsareaddedonlywhereneededtomeet the accuracytolerance,the h 2 methodplacesmanymoremeshpointsovermuchlarger segmentsatthestartandendoftheoveralltimeinterval.Sp ecically,itisseenthatthe meshisquitedenseovertimeintervals t 2 [0,3000] and t 2 [7000,10000] whereas forthe ph (3,14) method,themeshremainsdenseoverthesmallerintervals [0,1000] and [9000,10000] .Admittedly,the ph (3,14) doesaddLGRpointsintheregions t 2 [1000,3000] and t 2 [7000,9000] whereasthe h 2 methodaddsmoremeshintervals, butthemeshobtainedusingthe ph (3,14) ismuchsmaller( 273 collocationpoints) thanthemeshobtainedusingthe h 2 method( 672 collocationpoints).Thusthe ph methodexploitsthesolutionsmoothnessontheintervals [1000,3000] and [7000,9000] toachievemorerapidconvergencebyincreasingthedegreeo ftheapproximating polynomialsinsteadofincreasingthenumberofmeshinterv als. Next,weanalyzethequalityoftheerrorestimateofSection 4.4.1 byexamining morecloselythenumericalsolutionnear t =0 and t = t f .Figures 4-5A and 4-5B showthestateandcontrolintheregions t 2 [0,15] and t 2 [9985,10000] oneach meshrenementiterationalongsidetheexactsolutionusin gthe ph (3,14) method, whileTable 4-1 showstheestimatedandexactrelativeerrorsinthestatean dthe exactrelativeerrorinthecontrolforeachmeshrenementi teration.First,itisseen inTable 4-1 thatthestateandcontrolrelativeerroronthenalmeshisq uitesmallat 10 9 forthestateand 10 8 forthecontrol.Inaddition,itisseenfromFigs. 4-5A and 4-5B thatthestateandcontrolapproximationsimprovewitheach meshrenement iteration.Moreover,theerrorestimateshowninTable 4-1 agreesqualitativelywith thesolutionsonthecorrespondingmeshasshowninFigs. 4-5A and 4-5B .Itisalso interestingtoseethatthestaterelativeerrorestimateis approximatelythesameon eachmeshiterationastheexactrelativeerror.Theconsist encyintherelativeerror 115

PAGE 116

Table4-1.Estimatedrelativestateerror, e max x ,exactrelativestateerror, e max x exact ,andexact relativecontrolerror, e max u exact ,forthehyper-sensitiveproblemwith t f =10000 Usinga ph (3,14) withanaccuracytolerance =10 6 .where M isthemesh number. Me max x e max x exact e max u exact 13.377 10 0 5.708 10 3 1.280 10 0 26.436 10 1 4.009 10 2 1.127 10 0 39.648 10 2 7.462 10 2 3.369 10 1 48.315 10 10 1.016 10 9 1.329 10 8 approximationandtheexactrelativeerrordemonstratesth eaccuracyoftheerror estimatederivedinSection 4.4.1 .Thus,theerrorestimatederivedinthischapter reectscorrectlythelocationswherethesolutionerroris largeand ph adaptivemethod constructsnewmeshesthatreducetheerrorwithoutmakingt hemeshoverlydense. Finally,weprovideacomparisonofthecomputationalefci encyandmeshsizes obtainedbysolvingtheHyper-SensitiveProblemusingthev arious ph adaptiveand h methodsdescribedSection 4.4 .Table 4-2 showstheCPUtimesandmeshsizes,where itisseenforthisexamplethatthe ph (3,14) and h 2 methodsresultinthesmallest overallCPUtimes(withthe ph (3,14) beingslightlymorecomputationallyefcient thanthe h 2 method).Interestingly,whilethe ph (3,14) and h 2 methodshavenearly thesamecomputationalefciency,the ph (3,14) producesasignicantlysmaller mesh( N =293 LGRpoints,nearlythesmallestamongstallofthemethods)w hile the h 2 meshproducedamuchlargermesh( N =672 LGRpoints,byfarthelargest amongstallofthedifferentmethods).InfactTable 4-2 showsforthisexamplethat, foranyxedvalue N min ,the ph ( N min N max ) methodsproducedsmallermeshsizes thanthecorresponding h N min method.Thus,whilean h methodmayperformwellon thisexampleduetothestructureoftheoptimalsolution,th e ph methodproducesthe solutioninthemostcomputationallyefcientmannerwhile simultaneouslyproducinga signicantlysmallermesh. 116

PAGE 117

6000 8000 tx ( t ) 0 0 1 10000 0.5 1.5 2000 4000 A x ( t ) vs. t for t f =10000 -1 6000 8000 t u ( t ) 0 0 1 2 10000 -0.5 0.5 1.5 2.5 2000 4000 B u ( t ) vs. t MeshRenementIteration 6000 8000 t 0 0 1 2 3 4 10000 2000 4000 CMeshpointhistoryusing ph (3,14) MeshRenementIteration 6000 8000 t 0 0 1 2 3 4 10000 2000 4000 DCollocationpointhistoryusing ph (3,14) MeshRenementIteration 6000 8000 t 0 0 1 2 3 4 5 10000 2000 4000 EMeshpointhistoryusing h 2 MeshRenementIteration 6000 8000 t 0 0 1 2 3 4 5 10000 2000 4000 FCollocationpointhistoryusing h 2 Figure4-4.Exactsolutiontothehyper-sensitiveproblemw ith t f =10000 andmesh renementhistorywhenusingthe ph (3,14) and h 2 methodswithan accuracytolerance =10 6 117

PAGE 118

MeshRenementIteration1 MeshRenementIteration2 MeshRenementIteration3 MeshRenementIteration4 ExactSolution tx ( t ) 0 0 1 5 10 15 -0.2 0.2 0.4 0.6 1.2 1.4 1.6 1.8 A x ( t ) vs. t near t =0 for t f =10000 MeshRenementIteration1 MeshRenementIteration2 MeshRenementIteration3 MeshRenementIteration4 ExactSolution tx ( t ) 0 1 9985 9990999510000 -0.2 0.2 0.4 0.6 1.2 1.4 1.6 1.8 B x ( t ) vs. t near t = t f for t f =10000 MeshRenementIteration1 MeshRenementIteration2 MeshRenementIteration3 MeshRenementIteration4 ExactSolution -1 t u ( t ) 0 0 5 10 15 -0.5 0.5 C x ( t ) vs. t near t =0 for t f =10000 MeshRenementIteration1 MeshRenementIteration2 MeshRenementIteration3 MeshRenementIteration4 ExactSolution -1 -2 t u ( t ) 0 1 2 3 4 5 99859990 9995 10000 D x ( t ) vs. t near t = t f for t f =10000 Figure4-5.Solutionnearendpointsof t 2 [0, t f ] forthehyper-sensitiveproblemwith t f =10000 usingthe ph (3,14) andanaccuracytolerance =10 6 Table4-2.Meshrenementresultsforthehyper-sensitivep roblemusingvarious ph adaptiveand h methods. InitialMeshMeshRenementTotalConstraint N min N max CPUTime(s)CPUTime(s)CPUTime(s) NKM JacobianDensity(%) 220.343.103.4467233650.629280.336.937.2663322250.9082100.336.777.1062421050.9712120.336.126.4558317061.2712140.335.175.5052014051.6722160.336.336.6651912641.839330.333.283.6141713961.229380.323.894.223699661.7483100.323.433.753477952.1653120.333.794.123436452.6063140.333.053.382934043.8473160.333.493.812904153.825440.343.864.203849671.580480.333.653.983246662.2694100.333.373.703115662.6374120.333.694.022914353.4544140.334.314.643063973.5994160.334.955.293204473.413 118

PAGE 119

4.5.2TumorAnti-AngiogenesisProblem Considerthefollowingtumoranti-angiogenesisoptimalco ntrolproblemtakenfrom Ref.[ 57 ].Theobjectiveistominimize J = y 1 ( t f ) (4–41) subjecttothedynamicconstraints y 1 ( t )= y 1 ( t )ln y 1 ( t ) y 2 ( t ) y 2 ( t )= q ( t ) h b dy 2 = 3 1 ( t ) Gu ( t ) i (4–42) withtheinitialconditions y 1 (0)= [ ( b ) = d ] 3 = 2 = 2, y 2 (0)= [ ( b ) = d ] 3 = 2 = 4, (4–43) thecontrolconstraint 0 u u max (4–44) andtheintegralconstraint Z t f 0 u ( ) d A (4–45) where G =0.15 b =5.85 d =0.00873 =0.02 u max =75 A =15 ,and t f isfree.A solutiontothisoptimalcontrolproblemisshownusingthe ph (3,10) methodisshownin Figs. 4-6A and 4-6B Uponcloserexamination,itisseenthatakeyfeatureintheo ptimalsolutionisthe factthatoptimalcontrolisdiscontinuousat t 0.2 .Inordertoimprovetheaccuracyof thesolutioninthevicinityofthisdiscontinuity,itisnec essarythatanincreasednumber ofcollocationandmeshpointsareplacednear t =0.2 .Figure 4-6B showsthecontrol obtainedonthenalmeshbythe ph (3,10) method.Interestingly,itisseenthatthe ph (3,10) methodconcentratesthecollocationandmeshpointsnear t =0.2 .Examining theevolutionofthemeshrenement,itisseeninFigs. 4-6C and 4-6D thatthemesh densityincreasesoneachsuccessivemeshiteration,butre mainsunchangedinregions 119

PAGE 120

distantfrom t 0.2 .Thereasonthatthemeshismodiednear t =0.2 isbecausethe accuracyofthestateislowestintheregionnearthediscont inuityinthecontrol.Inorder toimprovesolutionaccuracy,additionalcollocationandm eshpointsarerequirednear t =0.2 .Thus,the ph methodperformsproperlywhensolvingthisproblemasitlea ves themeshuntouchedinregionswherefewcollocationandmesh pointsareneeded,and itincreasesthedensityofthemeshwhereadditionalpoints arerequired. Next,Table 4-3 summarizestheCPUtimesandmeshsizesthatwereobtained bysolvingtheTumorAnti-AngiogenesisProblemusingtheva rious ph and h methods describedSection 4.4 .WhileforthisexampletheCPUtimesarequitesmall,itisst ill seenthatcomputationalefciencyisgainedbychoosinga ph methodoveran h method. Specically,itisseenthatthe ph (3,10) methodproducesthelowestCPUtimewithan h 3 methodbeingslightlylessefcientthanthe ph (3,10) method.Moreimportantly, Table 4-3 showsthesignicantreductioninmeshsizewhenusinga ph method.For example,usinga ph (3, N max ) or ph (4, N max ) ,themaximumnumberofLGRpoints is N =99 whereasthelowestnumberofLGRpointsusingeitheran h 2 h 3 ,or h 4 methodis N =116 .Moreover,whilethe ph (3,14) and h 2 methodshavenearlythe samecomputationalefciency,the ph (3,14) producesasignicantlysmallermesh ( N =293 LGRpoints,nearlythesmallestamongstallofthemethods)w hilethe h 2 meshproducedamuchlargermesh( N =672 LGRpoints,byfarthelargestamongst allofthedifferentmethods).Thus,whilean h methodmayperformwellonthisexample duetothestructureoftheoptimalsolution,the ph methodproducesthesolutioninthe mostcomputationallyefcientmannerwhilesimultaneousl yproducingthesmallest mesh.4.5.3ReusableLaunchVehicleEntry ConsiderthefollowingoptimalcontrolproblemfromRef.[ 10 ]ofmaximizingthe crossrangeduringtheatmosphericentryofareusablelaunc hvehicle.Minimizethecost 120

PAGE 121

t y 1 ( t ) y 2 ( t )( y 1 ( t ), y 2 ( t )) 0.2 0.4 0.6 0.8 1.2 1.4 0 0 1 1000 2000 3000 4000 5000 6000 7000 8000 9000 A ( p ( t ), q ( t )) vs. t t u ( t ) 0.2 0.4 0.6 0.8 1.2 1.4 10 20 30 40 50 60 70 80 0 0 1 B u ( t ) vs. t t MeshRenementIteration 0.2 0.4 0.6 0.8 2 3 4 1.2 1.4 0 0 1 1 CMeshpointhistory. t MeshRenementIteration 0.2 0.4 0.6 0.8 2 3 4 1.2 1.4 0 0 1 1 DCollocation(LGR)pointhistory. Figure4-6.Solutionandmeshrenementhistoryforthetumo ranti-angiogenesis problemusingthe ph (3,10) methodwithanaccuracytoleranceof 10 6 functional J = ( t f ) (4–46) subjecttothedynamicconstraints r = v sin r = v cos r sin r cos = v cos r cos r ,_ v = D m g sin r r = L cos mv g v v r cos r = L sin mv cos r + v cos r sin tan r (4–47) 121

PAGE 122

Table4-3.Meshrenementresultsforthetumoranti-agioge nesisproblemusingvarious ph adaptiveand h methods. InitialMeshMeshRenementTotalConstraint N min N max CPUTime(s)CPUTime(s)CPUTime(s) NKM JacobianDensity(%) 220.110.720.8327013530.979280.100.880.982458441.5692100.101.021.122376552.0882120.100.750.842044043.3542140.100.740.842044043.3542160.100.690.782132644.041330.170.550.721234142.746380.170.710.881042764.1143100.170.500.67951946.0403120.170.861.03991876.3103140.170.620.80891567.5273160.171.561.739915137.955440.160.901.051162963.587480.160.700.85871865.8984100.160.961.12851696.7024120.160.881.048216106.9294140.161.111.278316137.0474160.161.011.168714108.401 andtheboundaryconditions h (0)=79248 km h ( t f )=24384 km (0)=0 deg ( t f )= Free ,, (0)=0 deg ( t f )= Free v (0)=7.803 km/s v ( t f )=0.762 km/s r (0)= 1 deg r ( t f )= 5 deg (0)=90 deg ( t f )= Free (4–48) where r = h + R e isthegeocentricradius, h isthealtitude, R e isthepolarradiusof theEarth, isthelongitudeangle, isthelatitudeangle, v isthespeed, r istheight pathangle, istheazimuthangle,and isthebankangle(andistherstofthetwo controls).Thedragandliftaregiven,respectively,as D = qSC D and L = qSC L ,where q = v 2 = 2 isthedynamicpressure, istheatmosphericdensity, S isthereferencearea, C D isthecoefcientofdrag,and C L isthecoefcientoflift.Itisnotedthat C D and C L are functionsoftheangleofattack, (where isthesecondofthetwocontrols).Further detailsaboutthisproblemandthespecicmodelscanbefoun dinRef.[ 10 ].Atypical solutionofthisproblemisshowninFigs. 4-7A – 4-7F usingthe ph (4,14) method. Itisseenthatthesolutiontothisexampleisrelativelysmo oth;althoughthere seemstobearapidchangeintheangleofattackinFig. 4-7E near t =2000 ,thetotal 122

PAGE 123

deectionisatmost1degree.Asaresult,onemighthypothes izethatitispossible toobtainanaccuratesolutionwitharelativelysmallnumbe rofcollocationandmesh pointswhencomparedwithan h method.ThishypothesisisconrmedinTable 4-4 whereseveralinterestingtrendsareobserved.First,ifwe discounttheCPUtimefor solvingtheNLPontheinitialmesh(asthisinitialmeshCPUt imediffersgreatlybetween thedifferentmethods),itisseenthatatleastoneofthe ph ( N min N max ) methods outperformstheassociated h N min methodbothintermsofCPUtimeandmeshsize. Second,itisseenthatthemeshrenementCPUtimeforthe ph (4, N max ) methodsis halfthatoftheCPUtimeofthe ph (3, N max ) methodsandisalmostonequartertheCPU timeofthe ph (2, N max ) methods. Turningourattentiontomeshsize,itisseenthatthemeshsi zesforthe ph (4, N max ) methodsarebyfarthesmallestwithonly 89 LGRpointsforthe ph (4,12) ph (4,14) and ph (4,16) methods,whilethemeshsizesforthe ph (3, N max ) and ph (2, N max ) methodsaremuchlarger(producinganywherebetween 98 and 442 LGRpoints). Figures 4-8A and 4-8B showtheevolutionofthemeshesforthe ph (4,14) method, whereitisseenthatoneachmeshthenumberofmeshintervals isthesameasthat oftheinitialmesh(namely,tenmeshintervals),whilethen umberofcollocationpoints increasesoneachsuccessivemesh.Asaresult,forthisexam plethelargestdecrease inerrorerrorisobtainedbyusingaslightlylargervalueof N min andallowingfora muchlargermaximumdegree(inthiscase N max =14 ).Thefactthatthe ph (4, N max ) methodsaresomuchbetterisconsistentwiththefactthatth esolutiontothisproblem isverysmooth,havingonlyrelativelysmalloscillationsi nthealtitudeandightpath angle.Thus,theaccuracytolerancecanbeachievedbyusing asmallnumberofmesh intervalswitharelativelyhigh-degreepolynomialapprox imationineachinterval. 123

PAGE 124

Table4-4.Meshrenementresultsforthereusablelaunchve hicleentryproblemusing various ph adaptiveand h methods. InitialMeshMeshRenementTotalConstraint N min N max CPUTime(s)CPUTime(s)CPUTime(s) NKM JacobianDensity(%) 220.761.562.3348624330.314280.761.552.304428630.8712100.762.222.984046041.0612120.751.332.082273032.2072140.750.831.581701823.5602160.750.831.581701823.560331.311.532.842618740.795381.311.092.411953831.7403101.311.162.471141344.7623121.310.782.10981035.9653141.320.782.10981035.9653161.320.782.10981035.965443.190.904.091884731.396483.200.804.001272432.7664103.190.683.87971235.1344123.200.433.64891026.0254143.210.443.65891026.0254163.190.433.63891026.025 124

PAGE 125

t (sec)h ( t ) (km) 0 20 30 40 50 60 70 80 500 1500 2500 10002000 A h ( t ) vs. t t (sec) v ( t ) (km s 1 ) 0 0 1 2 3 4 5 500 1500 2500 6 7 8 10002000 B v ( t ) vs. t ( t ) (deg) ( t ) (deg) 0 0 5 15 20 20 25 30 30 35 40 50 60 70 80 10 10 C ( t ) vs. ( t ) -6 t (sec) r ( t ) (deg) 0 0 1 500 1500 2500 -1 -2 -3 -4 -5 10002000 D r ( t ) vs. t t (sec) ( t ) (deg) 16.5 17 17.5 0 500 1500 2500 1000 2000 E ( t ) vs. t t (sec) ( t ) (deg) -10-20-30-40-50-60-70-80 0 0 500 1500 2500 1000 2000 F ( t ) vs. t Figure4-7.Solutiontothereusablelaunchvehicleentrypr oblemusingthe ph (4,14) methodwithanaccuracytoleranceof 10 6 125

PAGE 126

0 0 t MeshRenementIteration 500 1000 150020002500 1 2 AMeshpointhistory. 0 0 t MeshRenementIteration 500 1000 150020002500 1 2 BCollocation(LGR)pointhistory. Figure4-8.Meshrenementhistorytothereusablelaunchve hicleentryproblemusing the ph (4,14) methodwithanaccuracytoleranceof 10 6 126

PAGE 127

4.6Discussion Eachoftheexamplesillustratesdifferentfeaturesofthe ph adaptivemesh renementmethoddevelopedinSection 4.4 .Therstexampleshowshowthe computationalefciencyofthe ph adaptiveadaptivemeshrenementschemeissimilar tothecomputationalefciencyofan h methodwhilesimultaneouslyhavingtheability togenerateamuchsmallermeshforgivenaccuracytolerance thanispossibleusing an h method.Thisexamplealsodemonstratestheeffectivenesso ftheerrorestimate derivedinSection 4.4.1 .Thesecondexampleshowshowthe ph adaptivemethodcan efcientlycaptureadiscontinuityinthesolutionbymakin gthemeshmoredensenear thediscontinuitywhilesimultaneouslynotplacingunnece ssarymeshandcollocation pointsinregionsdistantfromthediscontinuity.Furtherm ore,thesecondexampleagain showedthesignicantlysmallermeshthatwaspossibleusin gthe ph adaptivemethod overthe h method.Finally,thethirdexampledemonstratedhowthe ph adaptivemethod canidentifythatadditionalmeshintervalsarenotneededa nditisonlynecessaryto increasethedegreeofthepolynomialapproximationtoachi evethedesiredaccuracy tolerance.Thus,themethodofthischapterhasapotentiala dvantageoveran h method inthatitkeepsthenonlinearprogrammingproblem(NLP)muc hsmallerinsizethanmay betypicallyrequiredwhenusingan h method.Inapplicationslimitedbymemoryorif computationalefciencyisimportant,themethoddevelope dinthischaptermayhave advantagesoveran h method. 4.7Conclusions A ph adaptiveLegendre-Gauss-Radaucollocationmethodforsol ving continuous-timeoptimalcontrolproblemshasbeendevelop ed.Anestimateofthe errorwasobtainedinterpolatingthecurrentapproximatio nonanermeshandthen integratingthedynamicsevaluatedattheinterpolationpo intstogenerateamore accurateapproximationtothesolutionofthestateequatio n.Thisprocessisanalogous tothe2-stagemodiedEulerRunge-Kuttaschemewherether ststageyieldsa 127

PAGE 128

rst-orderapproximationtothesolutionofadifferential equation,andthesecondstage interpolatesthissolutionatanewpointandthenintegrate sthedynamicsatthisnew pointtoachieveasecond-orderapproximationtothesoluti on.Thedifferencebetween therstandsecond-orderapproximationisanestimatefort heerrorintherst-order scheme.Usingthiserrorestimate,ameshrenementmethodw asdevelopedthat iterativelyreducestheerrorestimateeitherbyincreasin gthedegreeofthepolynomial approximationinameshintervalorbyincreasingthenumber ofmeshintervals.An estimatewasmadeofthepolynomialdegreerequiredwithina meshintervaltoachieve agivenaccuracytolerance.Iftherequiredpolynomialdegr eewasestimatedtobe lessthananallowablemaximumallowablepolynomialdegree ,thenthedegreeofthe polynomialapproximationwasincreasedontheensuingmesh .Otherwise,themesh intervalwasdividedintosub-intervalsandtheminimumall owablepolynomialdegree wasusedineachnewlycreatedsub-intervalontheensuingme sh.Thisprocesswas repeateduntilaspeciedrelativeerroraccuracytoleranc ewasmet.Themethodwas appliedsuccessfullytothreeexamplesthathighlightvari ousfeaturesofthemethodand showthemeritsoftheapproachrelativetoaxed-ordermeth od. 128

PAGE 129

CHAPTER5 GPOPS-II :MULTIPLEPHASEOPTIMALCONTROLSOFTWARE Theobjectiveofthischapteristoprovidetoresearchersan ovelefcient general-purposeoptimalcontrolsoftwarethatiscapableo fsolvingawidevariety ofcomplexconstrainedcontinuous-timeoptimalcontrolpr oblems.Inparticular, thesoftwaredescribedinthischapteremploysan hp -adaptiveversionofthe Legendre-Gauss-Radauorthogonalcollocationmethod[ 18 – 20 29 ]employedin bothdifferentialandintegralform.TheLegendre-Gauss-R adauorthogonalcollocation methodischosenasthebasisofthesoftwarebecauseitprovi deshighlyaccurate primal(stateandcontrol)anddual(costate)approximatio nswhilemaintaininga relativelylow-dimensionalapproximationofthecontinuo us-timeproblem.Whilethe softwaredescribedinthischapteriswritteninMATLAB,the approachcanbeadapted foruseinanymodernprogramminglanguagesuchasC,C++,orF ORTRAN.After describingthekeycomponentsofthealgorithmandthecorre spondingsoftware, fourexamplesthathavebeenpreviouslystudiedintheopenl iteratureareprovided todemonstratetheexibility,utility,andefciencyofth esoftware.Inordertosee theimprovementoverpreviouslydevelopedoptimalcontrol software,thesoftwareis comparedwiththesoftware SparseOptimizationSuite (SOS)[ 60 ]. 5.1GeneralMultiplePhaseOptimalControlProblems Thegeneralmultiple-phaseoptimalcontrolproblemthatca nbesolvedby GPOPS-II isgivenasfollows.First,let p 2 [1,..., P ] bethephasenumberwhere P asthetotal numberofphases.Theoptimalcontrolproblemistodetermin ethestate, y ( p ) ( t ) 2 R n ( p ) y control, u ( p ) ( t ) 2 R n ( p ) u ,integrals, q ( p ) 2 R n ( p ) q ,starttimes, t ( p ) 0 2 R ,phaseterminus times, t ( p ) f 2 R ,inallphases p 2 [1,..., P ] ,alongwiththestaticparameters s 2 R n s ,that minimizetheobjectivefunctional J = h y (1) ( t (1) 0 ), t (1) 0 y (1) ( t (1) f ), t (1) f q (1) i ,..., h y ( P ) ( t ( P ) 0 ), t ( P ) 0 y ( P ) ( t ( P ) f ), t ( P ) f q ( P ) i s (5–1) 129

PAGE 130

subjecttothedynamicconstraints y ( p ) = a ( p ) ( y ( p ) u ( p ) t ( p ) s ),( p =1,..., P ), (5–2) theeventconstraints b min b h y (1) ( t (1) 0 ), t (1) 0 y (1) ( t (1) f ), t (1) f q (1) i ,..., h y ( P ) ( t ( P ) 0 ), t ( P ) 0 y ( P ) ( t ( P ) f ), t ( P ) f q ( P ) i s b max (5–3) theinequalitypathconstraints c ( p ) min c ( p ) ( y ( p ) u ( p ) t ( p ) s ) c ( p ) max ,( p =1,..., P ), (5–4) thestaticparameterconstraints s min s s max (5–5) andtheintegralconstraints q ( p ) min q ( p ) q ( p ) max ,( p =1,..., P ), (5–6) wheretheintegralsaredenedas q ( p ) i = Z t ( p ) f t ( p ) 0 g ( p ) i ( y ( p ) u ( p ) t ( p ) s ) dt ,( i =1,... n ( p ) q ),( p =1,..., P ). (5–7) ItisimportanttonotethattheeventconstraintsofEq.( 5–3 )cancontainanyfunctions thatrelateinformationatthestartand/orterminusofanyp hase(includingrelationships thatincludebothstaticparametersandintegrals)andthat thephasesthemselvesneed notbesequential.Itisnotedthattheapproachtolinkingph asesisbasedonwell-known formulationsintheliteraturesuchasthosegiveninRef.[ 61 ]and[ 10 ].Aschematicof howphasescanpotentiallybelinkedisgiveninFig. 5-1 5.2Legendre-Gauss-RadauCollocationMethod Inthissectionwedescribethevariable-orderLegendre-Ga uss-Radauorthogonal collocationmethod[ 18 – 20 29 ]thatformsthebasisfor GPOPS-II .Inordertoeffectively describetheLegendre-Gauss-Radauorthogonalcollocatio nmethod,inthissectionwe consideronlyaone-phaseoptimalcontrolproblem.Afterfo rmulatingtheone-phase 130

PAGE 131

Phase 1Phase 2 Phase 3 Phase 5 Phase 4 Trajectorytime Phases 1 and 2 Connected Phases 2 and 3 ConnectedPhases 2 and 5 Connected Phases 3 and 4 Connected Figure5-1.Schematicoflinkagesformultiple-phaseoptim alcontrolproblem.The exampleshowninthepictureconsistsofvephaseswherethe endsof phases1,2,and3arelinkedtothestartsofphases2,3,and4,respectively,whiletheendofphase2islinkedtothestarto fphase5. optimalcontrolproblemwedeveloptheLegendre-Gauss-Rad auorthogonalcollocation methoditself.5.2.1Single-PhaseOptimalControlProblem Inordertodescribethe hp Legendre-Gauss-Radauorthogonalcollocationmethod thatisimplementedinthesoftware,itwillbeusefultosimp lifythegeneraloptimal controlproblemgiveninEqs.( 5–1 )–( 5–7 )toaone-phaseproblemasfollows.Determine thestate, y ( t ) 2 R n y ,thecontrol, u ( t ) 2 R n u ,theintegrals, q 2 R n q ,theinitialtime, t 0 andtheterminaltime t f onthetimeinterval t 2 [ t 0 t f ] thatminimizethecostfunctional J = ( y ( t 0 ), t 0 y ( t f ), t f q ) (5–8) subjecttothedynamicconstraints d y dt = a ( y ( t ), u ( t ), t ), (5–9) 131

PAGE 132

theinequalitypathconstraints c min c ( y ( t ), u ( t ), t ) c max (5–10) theintegralconstraints q i = Z t f t 0 g i ( y ( t ), u ( t ), t ) dt ,( i =1,..., n q ), (5–11) andtheeventconstraints b min b ( y ( t 0 ), t 0 y ( t f ), t f q ) b min (5–12) Thefunctions q a c and b aredenedbythefollowingmappings: : R n y R R n y R R n q R g : R n y R n u R R n q a : R n y R n u R R n y c : R n y R n u R R n c b : R n y R R n y R R n q R n b whereweremindthereaderthatallvectorfunctionsoftimea retreatedas row vectors. Atthispoint,itwillbeusefultomodifytheoptimalcontrol problemgivenin Eqs.( 5–8 )–( 5–12 )asfollows.Let 2 [ 1,+1] beanewindependentvariable.The variable t isthendenedintermsof as t = t f t 0 2 + t f + t 0 2 (5–13) TheoptimalcontrolproblemofEqs.( 5–8 )–( 5–12 )isthendenedintermsofthevariable asfollows.Determinethestate, y ( ) 2 R n y ,thecontrol u ( ) 2 R n u ,theintegral q 2 R n q theinitialtime, t 0 ,andtheterminaltime t f onthetimeinterval 2 [ 1,+1] thatminimize thecostfunctional J = ( y ( 1), t 0 y (+1), t f q ) (5–14) 132

PAGE 133

subjecttothedynamicconstraints d y d = t f t 0 2 a ( y ( ), u ( ), ; t 0 t f ), (5–15) theinequalitypathconstraints c min c ( y ( ), u ( ), ; t 0 t f ) c max (5–16) theintegralconstraints q i = t f t 0 2 Z +1 1 g i ( y ( ), u ( ), ; t 0 t f ) d ,( i =1,..., n q ), (5–17) andtheeventconstraints b min b ( y ( 1), t 0 y (+1), t f q ) b min (5–18) Supposenowthattheinterval 2 [ 1,+1] isdividedintoa mesh consistingof K mesh intervals [ T k 1 T k ], k =1,..., K ,where ( T 0 ,..., T K ) arethe meshpoints .Themesh pointshavethepropertythat 1= T 0 < T 1 < T 2 < < T K = T f =+1 .Next, let y ( k ) ( ) and u ( k ) ( ) bethestateandcontrolinmeshinterval k .Theoptimalcontrol problemofEqs.( 5–14 )–( 5–18 )canthenwrittenasfollows.First,thecostfunctionalof Eq.( 5–14 )canbewrittenas J = ( y (1) ( 1), t 0 y ( K ) (+1), t f q ), (5–19) Next,thedynamicconstraintsofEq.( 5–15 )inmeshinterval k canbewrittenas d y ( k ) ( ( k ) ) d ( k ) = t f t 0 2 a ( y ( k ) ( ( k ) ), u ( k ) ( ( k ) ), ( k ) ; t 0 t f ),( k =1,..., K ). (5–20) Furthermore,thepathconstraintsof( 5–16 )inmeshinterval k aregivenas c min c ( y ( k ) ( ( k ) ), u ( k ) ( ( k ) ), ( k ) ; t 0 t f ) c max ,( k =1,..., K ). (5–21) 133

PAGE 134

theintegralconstraintsof( 5–17 )aregivenas q j = t f t 0 2 K X k =1 Z T k T k 1 g j ( y ( k ) ( ( k ) ), u ( k ) ( ( k ) ), ( k ) ; t 0 t f ) d ,( j =1,..., n q k =1..., K ). (5–22) Finally,theeventconstraintsofEq.( 5–18 )aregivenas b min b ( y (1) ( 1), t 0 y ( K ) (+1), t f q ) b max (5–23) Becausethestatemustbecontinuousateachinteriormeshpo int,itisrequiredthatthe condition y ( k ) ( T k )= y ( k +1) ( T k ) besatisedattheinteriormeshpoints ( T 1 ,..., T K 1 ) 5.2.2Variable-OrderLegendre-Gauss-RadauCollocationM ethod Themethodutilizedinthesoftwareisanimplementationoft hepreviously developedmultiple-intervalLegendre-Gauss-Radauortho gonalcollocationmethod [ 18 – 20 29 ].IntheLegendre-Gauss-Radauorthogonalcollocationmet hod,thestate ofthecontinuous-timeoptimalcontrolproblemisapproxim atedineachmeshinterval k 2 [1,..., K ] as y ( k ) ( ) Y ( k ) ( )= N k +1 X j =1 Y ( k ) j ` ( k ) j ( ), ` ( k ) j ( )= N k +1 Y l =1 l 6 = j ( k ) l ( k ) j ( k ) l (5–24) where 2 [ 1,+1] ` ( k ) j ( ), j =1,..., N k +1 ,isabasisofLagrangepolynomials, ( ( k ) 1 ,..., ( k ) N k ) aretheLegendre-Gauss-Radau[ 51 ](LGR)collocationpointsinmesh interval k denedonthesubinterval ( k ) 2 [ T k 1 T k ) ,and ( k ) N k +1 = T k isanoncollocated point.Differentiating Y ( k ) ( ) inEq.( 5–24 )withrespectto ,weobtain d Y ( k ) ( ) d = N k +1 X j =1 Y ( k ) j d ` ( k ) j ( ) d (5–25) ThecostfunctionalofEq.( 5–19 )isthenshownas J = ( Y (1) 1 t 0 Y ( K ) N K +1 t f q ), (5–26) 134

PAGE 135

where Y (1) 1 istheapproximationof y ( T 0 = 1) ,and Y ( K ) N K +1 istheapproximationof y ( T K =+1) .CollocatingthedynamicsofEq.( 5–20 )atthe N k LGRpointsusing Eq.( 5–25 ),wehave N k +1 X j =1 D ( k ) ij Y ( k ) j t f t 0 2 a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ). (5–27) where U ( k ) i i =1,..., N k ,aretheapproximationsofthecontrolatthe N k LGRpointsin meshinterval k 2 [1,..., K ] ,and t ( k ) i areobtainedfrom ( k ) k usingEq.( 5–13 )and D ( k ) ij = d ` ( k ) j ( ) d # ( k ) i ,( i =1,..., N k j =1,..., N k +1, k =1,..., K ), (5–28) isthe N k ( N k +1) Legendre-Gauss-Radaudifferentiationmatrix [ 18 ]inmesh interval k 2 [1,..., K ] .Whilethedynamicscanbecollocatedindifferentialform, an alternativeapproachtocollocatethedynamicsusingtheeq uivalentintegralformof theLegendre-Gauss-Radauorthogonalcollocationmethoda sdescribedin[ 18 – 20 ]. CollocatingthedynamicsusingtheintegralformoftheLege ndre-Gauss-Radau orthogonalcollocationmethodwehave Y ( k ) i +1 Y ( k ) 1 t f t 0 2 N k X j =1 I ( k ) ij a ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f )= 0 ,( i =1,..., N k ), (5–29) where I ( k ) ij ,( i =1,..., N k j =1,..., N k k =1,..., K ) isthe N k N k Legendre-GaussRadauintegrationmatrix inmeshinterval k 2 [1,..., K ] ,andisobtainedfromthe differentiationmatrixas I ( k ) h D ( k ) 2: N k +1 i 1 Finally,itisnotedforcompletenessthat I ( k ) D ( k ) 1 = 1 ,where 1 isacolumnvector oflength N k ofallones.ItisnotedthatEqs.( 5–27 )and( 5–29 )canbebeevaluated overallintervalssimultaneouslyusingthecompositeLege ndre-Gauss-Radau differentiationmatrix D ,andthecompositeLegendre-Gauss-Radauintegrationmatr ix I respectively.Furthermore,thestructureofthecomposite Legendre-Gauss-Radau 135

PAGE 136

differentiationmatrix D canbeseeninFig. 5-2 ,andthestructureofthecomposite Legendre-Gauss-Radauintegrationmatrix I canbeseeninFig. 5-3 .Next,thepath constraintsofEq.( 5–21 )inmeshinterval k 2 [1,..., K ] areenforcedatthe N k LGR pointsas c min c ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ) c max ,( i =1,..., N k ), (5–30) theintegralconstraintsofEq.( 5–22 )isthenapproximatedas q j K X k =1 N k X i =1 t f t 0 2 w ( k ) i g j ( Y ( k ) i U ( k ) i ( k ) i ; t 0 t f ),( i =1,..., N k j =1,..., n q ), (5–31) where w ( k ) j j =1,..., N k aretheLGRquadratureweights[ 51 ]inmeshinterval k 2 [1,..., K ] denedontheinterval 2 [ k 1 k ) .Furthermore,theeventconstraintsof Eq.( 5–23 )areapproximatedas b min b ( Y (1) 1 t 0 Y ( K ) N K +1 t f q ) b max (5–32) Itisnotedthatcontinuityinthestateattheinteriormeshp oints k 2 [1,..., K 1] is enforcedviathecondition Y ( k ) N k +1 = Y ( k +1) 1 ,( k =1,..., K 1), (5–33) wherewenotethatthe same variableisusedforboth Y ( k ) N k +1 and Y ( k +1) 1 .Hence,the constraintofEq.( 5–33 )iseliminatedfromtheproblembecauseitistakenintoacco unt explicitly.TheNLPthatarisesfromtheLegendre-Gauss-Ra dauorthogonalcollocation methodisthentominimizethecostfunctionofEq.( 5–26 )subjecttothealgebraic constraintsofEqs.( 5–27 )–( 5–32 ). 5.3MajorComponentsof GPOPS-II InthissectionwedescribethemajorcomponentsoftheMATLA Bsoftware GPOPSII thatimplementstheaforementionedLegendre-Gauss-Radau orthogonalcollocation method.InSection 5.3.1 wedescribethelargesparsenonlinearprogrammingproblem (NLP)associatedwiththeLegendre-Gauss-Radauorthogona lcollocationmethod.In 136

PAGE 137

Block 1 Block 2 Block 3 Block K (2) Zeros Except in Blocks (1) Block k is of Size N k by N k +1 (3) Total Size N by N +1 Figure5-2.Structureofsingle-phasecompositeLegendreGauss-Radaudifferentiation matrixwherethemeshconsistsof K meshintervals. Block 1 Block 2 Block 3 Block K (2) Zeros Except in Blocks (1) Block k is of Size N k by N k (3) Total Size N by N Figure5-3.Structureofsingle-phasecompositeLegendreGauss-Radauintegration matrixwherethemeshconsistsof K meshintervals. Section 5.3.2 weshowthestructureoftheNLPdescribedinSection 5.3.1 .InSection 5.3.3 wedescribethemethodforscalingtheNLPviascalingoftheo ptimalcontrol problem.InSection 5.3.4 wedescribetheapproachforestimatingthederivatives requiredbytheNLPsolver.InSection 5.3.5 wedescribethemethodfordetermining thedependenciesofeachoptimalcontrolfunctioninordert oprovidethemostsparse NLPtotheNLPsolver.InSection 5.3.6 wedescribethe hp -adaptivemeshrenement methodsthatareincludedinthesoftwareinordertoiterati vedetermineameshthat meetsauser-speciedaccuracytolerance.Finally,inSect ion 5.3.7 weprovideahigh leveldescriptionofthealgorithmicowof GPOPS-II 137

PAGE 138

5.3.1NLPStructure Thenonlinearprogrammingproblem(NLP)associatedwithth e hp Legendre-Gauss-Radauorthogonalcollocationmethodisgi venasfollows.Determine thedecisionvector Z thatminimizestheobjectivefunction ( Z ) (5–34) subjecttotheconstraints F min F ( Z ) F max (5–35) andthevariablebounds Z min Z Z max (5–36) ItisnotedthatthesizeoftheNLParisingfromthe hp Legendre-Gauss-Radau orthogonalcollocationmethodchangesdependinguponthen umberofmeshintervals andLGRpointsusedineachphasetodiscretizethecontinuou s-timeoptimalcontrol problem,butthestructureoftheNLPisthesameregardlesso fthenumberofmesh intervalsusedinthediscretization.5.3.1.1NLPvariables TheNLPdecisionvector Z isgivenas Z = 2666666666666664 z (1) ... z ( P ) s 1 ... s n s 3777777777777775 (5–37) where z ( p ) containsallthevariablesofphase p =1... P ,and s i ( i =1,..., n s ) are thestaticparametersintheproblem.Thephase-dependentv ariablesofEq.( 5–37 ) 138

PAGE 139

z ( p ) ( p =1,..., P ) ,aregivenas z ( p ) = 266666666666666666666666664 V ( p ) 1 ... V ( p ) n ( p ) y W ( p ) 1 ... W ( p ) n ( p ) u q ( p ) t ( p ) 0 t ( p ) f 377777777777777777777777775 ,( p =1,..., P ), (5–38) where V ( p ) i 2 R ( N ( p ) +1) ( i =1,..., n ( p ) y ) isthe i th columnofthematrix V ( p ) = 266664 Y ( p ) 1 ... Y ( p ) N ( p ) +1 377775 2 R ( N ( p ) +1) n ( p ) y (5–39) W ( p ) i 2 R N ( p ) ( i =1,..., n ( p ) u ) isthe i th columnofthematrix, W ( p ) = 266664 U ( p ) 1 ... U ( p ) N ( p ) +1 377775 2 R N ( p ) n ( p ) u (5–40) q ( p ) isacolumnvectorcontainingthe n ( p ) q integralconstraintvariables,and t ( p ) 0 2 R and t ( p ) f 2 R arescalarscorrespondingtotheinitialandterminaltimes inphase p 2 [1,..., P ] .Weremindthereaderagainthatbecausethestateandcontro larebeing treatedas row vectors,the i th rowinthematricesofEqs.( 5–39 )and( 5–39 )corresponds tothevalueofthediscretizedstateandcontrolatthetime t ( p ) i .Finally,thebounds Z min and Z max aredenedfromtheoptimalcontrolvariableboundsassuppl iedbytheuser. 139

PAGE 140

5.3.1.2NLPobjectiveandconstraintfunctions TheNLPobjectivefunction ( Z ) isdenedasfollows ( Z )= (5–41) where istheoptimalcontrolobjectivefunctionevaluatedatthed iscretevariables denedinfunctionofEq.( 5–1 ).TheNLPconstraintfunctionvector F ( Z ) isthen assembledas F = 2666666664 f (1) ... f ( P ) b 3777777775 (5–42) where f ( p ) aretheconstraintsinphase p 2 [1,..., P ] and b isthevectorof n ( p ) b event constraintsevaluatedatthediscretevariablesdenedinf unctionofEq.( 5–3 ).The phase-dependentconstraintsofEq.( 5–42 ) f ( p ) ( p 2 [1,..., P ] havethestructure f ( p ) = 26666666666666666664 ( p ) 1... ( p ) n ( p ) y C ( p ) 1 ... C ( p ) n ( p ) c ( p ) 37777777777777777775 ,( p =1,..., P ), (5–43) where ( p ) i 2 R N ( p ) ( i =1,..., n ( p ) y ) isthe i th columninthedefectconstraintmatrix thatresultsfromeitherthedifferentialorintegralformo ftheLegendre-Gauss-Radau orthogonalcollocationmethod.Thedefectmatrixthatresu ltsfromthedifferentialformis denedas ( p ) = D ( p ) Y ( p ) t ( p ) f t ( p ) 0 2 A ( p ) 2 R N ( p ) n ( p ) y (5–44) 140

PAGE 141

Thedefectmatrixthatresultsfromtheintegralformisden edas ( p ) = E ( p ) Y ( p ) t ( p ) f t ( p ) 0 2 I ( p ) A ( p ) 2 R N ( p ) n ( p ) y (5–45) wherethematrix A istherighthandsideofthedynamicsevaluatedateachcollo cation point A ( p ) = 266664 a ( Y ( p ) 1 U ( p ) 1 t ( p ) 1 s ) ... a ( Y ( p ) N ( p ) U ( p ) N ( p ) t ( p ) N ( p ) s ) 377775 2 R N ( p ) n ( p ) y (5–46) E ( p ) isan N ( p ) ( N ( p ) +1) matrixthatisusedtocomputethedifference Y ( p k ) i +1 Y ( p k ) 1 for eachinterval k =1,..., K ( p ) ,andeachphase p =1,..., P andhasthestructureshownin Fig. 5-4 C ( p ) i 2 R N ( p ) ,( i =1,..., n ( p ) c ) ,isthe i th columnofthepathconstraintmatrix C ( p ) = 266664 c ( Y ( p ) 1 U ( p ) 1 t ( p ) 1 s ) ... c ( Y ( p ) N ( p ) U ( p ) N ( p ) t ( p ) N ( p ) s ) 377775 2 R N ( p ) n ( p ) c (5–47) ( p ) isavectoroflength n ( p ) q ( p ) wherethe i th elementof ( p ) isgivenas ( p ) i = q ( p ) i t ( p ) f t ( p ) 0 2 w ( p ) T G ( p ) i ,( i =1,..., n ( p ) q ), (5–48) where G ( p ) i 2 R N ( p ) ( i =1,..., n ( p ) q ) isthe i th columnoftheintegrandmatrix G ( p ) = 266664 g ( Y ( p ) 1 U ( p ) 1 t ( p ) 1 s ) ... g ( Y ( p ) N ( p ) U ( p ) N ( p ) t ( p ) N ( p ) s ) 377775 2 R N ( p ) n ( p ) q (5–49) Itisnotedthatthedefectandintegralconstraintsarealle qualityconstraintsoftheform ( p ) = 0 ( p ) = 0 (5–50) 141

PAGE 142

Block 1 Block 2 Block 3 Block K (3) Zeros Except in Blocks (1) Block k is of Size N k by N k +1 (4) Total Size N by N +1 -1-1-1-1-1 1 1 1 1 1 -1-1-1-1-1 1 1 1 1 1 -1-1-1 1 1 1 -1-1-1-1 1 1 1 1 Figure5-4.Matrix E ofthedefectconstraintsofEq.( 5–45 )foronephaseofa P -phase optimalcontrolproblemdiscretizedusingtheLegendre-Ga uss-Radau orthogonalcollocationmethod. whilethediscretizedpathconstraintsandboundarycondit ionsareinequalityconstraints oftheform C ( p ) min C ( p ) C ( p ) max b min b b max (5–51) 5.3.2SparseStructureofNLPDerivativeFunctions ThestructureoftheNLPcreatedbytheLegendre-Gauss-Rada uorthogonal collocationmethodhasbeendescribedindetailin[ 29 ]and[ 50 ].Specically,[ 29 ] and[ 50 ]describe,respectively,thesparsestructureoftheNLPfo rthedifferential andintegralformsoftheLegendre-Gauss-Radauorthogonal collocationmethod. Figures 5-5 and 5-6 showthestructureoftheNLPconstraintJacobianandLagran gian Hessianforasingle-phaseoptimalcontrolproblemusingth edifferentialand integralformsoftheLegendre-Gauss-Radauorthogonalcol locationmethod.Fora multiple-phaseoptimalcontrolproblemtheconstraintJac obianstructureineither thedifferentialorintegralformisacombinationofablock -diagonalversionofthe single-phaseNLPconstraintJacobian,whereeachblockhas thestructureasseenin eitherFig. 5-5A or 5-6A withrowsaddedtothebottomoftheJacobianmatrixtoaccoun t forderivativesoftheeventconstraints.Similarly,foram ultiple-phaseoptimalcontrol problemtheNLPLagrangianHessianusingeitherthediffere ntialorintegralformofthe 142

PAGE 143

Legendre-Gauss-Radauorthogonalcollocationmethodcons istsofablock-diagonal versionofthesingle-phaseNLPLagrangianHessianwhereea chblockhasthestructure seenineitherFig. 5-5B or 5-6B ,withtheadditionalpointsfromthesecondderivatives oftheeventconstraints, b ,andtheobjectivefunction, .Formoredetailsdetailsonthe sparsestructureoftheNLParisingfromthemultiple-phase Legendre-Gauss-Radau orthogonalcollocationmethod,pleasesee[ 29 ]and[ 50 ]. 5.3.3OptimalControlProblemScalingforNLP TheNLPdescribedinSection 5.3.1 mustbewellscaledinorderfortheNLP solvertoobtainasolution. GPOPS-II includestheoptionfortheNLPtobescaled automaticallybyscalingthecontinuous-timeoptimalcont rolproblem.Theapproachto automaticscalingistoscalethevariablesandtherstderi vativesoftheoptimalcontrol functionstobe O (1) .First,theoptimalcontrolvariablesarescaledtolieonth eunit interval [ 1 = 2,1 = 2] andisaccomplishedasfollows.Supposeitisdesiredtoscal ean arbitraryvariable x 2 [ a b ] to ~ x suchthat ~ x 2 [ 1 = 2,1 = 2] .Thisvariablescalingis accomplishedviatheafnetransformation ~ x = v x x + r x (5–52) where v x and r x arethevariablescaleandshift,respectively,denedas v x = 1 b a r x = 1 2 b b a (5–53) Everyvariableinthecontinuous-timeoptimalcontrolprob lemisscaledusing Eqs.( 5–52 )and( 5–53 ).Next,theJacobianoftheNLPconstraintscanbemade O (1) byscalingthederivativesoftheoptimalcontrolfunctions tobeapproximatelyunity.First, usingtheapproachderivedin[ 10 ],in GPOPS-II thedefectconstraintsarescaledusing thesamescalefactorsaswasusedtoscalethestate.Next,th eobjectivefunction,event constraint,andpathconstraintscalefactorsareobtained bysamplingthegradientof 143

PAGE 144

Defect 1 { State 1 { State 2 { State n y Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Zeros or Diagonal Block+ D -Matrix Zeros or Diagonal Block+ D -Matrix { Defect 2 { Defect n y {{ Control 1 { Control n u Path 1 Either Zeros or Diagonal Block { Path n c Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Zeros or Diagonal Block+ D -Matrix Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f q 1 q n q 1 Identity All ZerosAll Zeros n q AOne-phaseNLPJacobian. { Control n u Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Control 1 { State n y { State 1 q 1 q n q All Zeros All Zeros All Zeros All Zeros All Zeros BOne-phaseNLPLagrangianHessian. Figure5-5.One-phaseLegendre-Gauss-Radauorthogonalco llocationmethod differentialschemeNLPconstraintJacobianandLagrangia nHessian. 144

PAGE 145

Defect 1 { State 1 { State 2 { State n y { Defect 2 { Defect n y {{ Control 1 { Control n u Path 1 Either Zeros or Diagonal Block { Path n c Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f q 1 q n q n q 1 Identity All ZerosAll Zeros Zeros or Integration Block+ E -Matrix Zeros or Integration Block+ E -Matrix Zeros or Integration Block+ E -Matrix Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block Either Zeros or Integration Block AOne-phaseNLPJacobian. { Control n u Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block t 0 t f Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block Either Zeros or Diagonal Block { Control 1 { State n y { State 1 q 1 q n q All Zeros All Zeros All Zeros All Zeros All Zeros BOne-phaseNLPLagrangianHessian. Figure5-6.One-phaseLegendre-Gauss-Radauorthogonalco llocationmethodintegral schemeNLPconstraintJacobianandLagrangianHessian. 145

PAGE 146

eachconstraintatavarietyofsamplepointswithintheboun dsoftheunscaledoptimal controlproblemandtakingtheaveragenormofeachgradient acrossallsamplepoints. 5.3.4ComputationofDerivativesRequiredbytheNLPSolver Theoptimalcontrolproblemderivativefunctionsareobtai nedbyexploitingthe sparsestructureoftheNLParisingfromthe hp Legendre-Gauss-Radauorthogonal collocationmethod.Specically,in[ 29 ]and[ 50 ]ithasbeenshownthatusingeitherthe derivativeorintegralformoftheLegendre-Gauss-Radauor thogonalcollocationmethod theNLPderivativescanbeobtainedbycomputingthederivat ivesoftheoptimalcontrol problemfunctionsattheLGRpointsandinsertingthesederi vativesintotheappropriate locationsintheNLPderivativefunctions.In GPOPS-II theoptimalcontrolderivative functionsareapproximatedusingsparseforward,central, orbackwardnite-differencing oftheoptimalcontrolproblemfunctions.Toseehowthisspa rsenitedifferencingworks inpractice,considerthefunction f ( x ) ,where f : R n R m isoneofthe optimalcontrol functions (thatis, n and m are,respectively,thesizeofanoptimalcontrolvariablea nd anoptimalcontrolfunction).Then @ f =@ x isapproximatedusingaforwardnitedifference as @ f @ x i f ( x + h i ) f ( x ) h i (5–54) where h i arisesfromperturbingthe i th componentof x .Thevector h i iscomputedas h i = h i e i (5–55) where e i isthe i th rowofthe n n identitymatrixand h i istheperturbationsize associatedwith x i .Theperturbation h i iscomputedusingtheequation h i = h (1+ j x i j ), (5–56) wherethebaseperturbationsize h ischosentobetheoptimalstepsizefora functionwhoseinputandoutputare O (1) asdescribedin[ 62 ].Secondderivative approximationsarecomputedinamannersimilartothatused forrstderivative 146

PAGE 147

approximationswiththekeydifferencebeingthatperturba tionsintwovariablesare performed.Forexample, @ 2 f =@ x i @ x j canbeapproximatedusingasecondforward differenceapproximationas @ 2 f @ x i @ x j f ( x + h i + h j )+ f ( x ) f ( x + h i ) f ( x + h j ) h i h j (5–57) where h i h j h i ,and h j areasdenedinEqs.( 5–55 )and( 5–56 ).Thebaseperturbation sizeischosentominimizeround-offerrorinthenitediffe renceapproximation. Furthermore,itisnotedthat h i h as j x i j! 0 5.3.5DeterminingtheOptimalControlFunctionDependenci es ItcanbeseenfromSection 5.3.2 thattheNLPassociatedwiththe Legendre-Gauss-Radauorthogonalcollocationmethodhasa sparsestructurewhere theblocksoftheconstraintJacobianandLagrangianHessia naredependentupon whetheraparticularNLPfunctiondependsuponaparticular NLPvariableaswas shownin[ 29 ].Themethodfordeterminingtheoptimalcontrolfunctiond ependencies in GPOPS-II utilizestheIEEEarithmeticrepresentationof“not-a-num ber”(NaN) inMATLAB.Specically,MATLABhasthefeaturethatanyfunc tionevaluatedat NaNwillproduceanoutputofNaNifthefunctiondependsupon thevariable.For example,supposethat f ( x ) isafunctionwhere f : R n R m and x = x 1 ... x n Supposefurtherthatweset x i = NaN .Ifanyofthecomponentsof f ( x ) isafunction of x i ,thenthosecomponentsof f ( x ) thatdependon x i willeachbeNaN.Inthis way,thedependenceoftheoptimalcontrolproblemfunction sonaparticularinput componentcanbedeterminedbyevaluatingthefunctionswit hthatcomponentof theinputsettoNaNusingasinglefunctionevaluation.Furt hermore,thecomplete dependenciesoftheoptimalcontrolproblemfunctionsaref oundbyrepeatingthis processforeachcomponentoftheinput.Thesedependencies thenprovideamapas towhichnitedifferencesneedtobetakenwhencomputingth erstderivativesofthe optimalcontrolfunctionsfordeterminingtheNLPderivati vefunctionsasdescribedin 147

PAGE 148

Section 5.3.4 .Furthermore,itisassumedin GPOPS-II thatthesecondderivativeof anyoptimalcontrolfunctionwillbenonzeroiftherstderi vativewithrespecttothat samevariableisnonzero.Forexample,ifitisfoundthatthe right-handsideofthe dynamicsdependsuponaparticularcomponentofthestate,t henitisassumedthat thesecondderivativealsodependsuponthissamecomponent ofthestate.Whilethis approachmayleadtoaslightover-estimateofthesecondder ivativedependencies, itwillgenerallybethecasethatthisover-estimatewillno tbesignicantlylargerthan theidealdependenciesbeenobtained.Moreover,thecomput ationalcostforobtaining thesecondderivativedependenciesinthemannerdescribed isessentiallyzerowhile theaddedcomputationaleffortrequiredtosolvetheNLPass umingthatsomeofthese dependenciesarenonzero(wheninfacttheymaybezero)ismi nimal. 5.3.6AdaptiveMeshRenement Inthepastfewyears,thesubjectofvariable-ordermeshre nementhasbeenof considerablestudyintheefcientimplementationofGauss ianquadraturecollocation methods.Theworkonvariable-orderGaussianquadratureme shrenementhasled toseveralarticlesintheliteratureincludingthosefound in[ 21 22 46 63 ]. GPOPS-II employsthetwolatestvariable-ordermeshrenementmetho dsasdescribedin[ 22 63 ]. Themeshrenementmethodsof[ 22 ]and[ 63 ]arereferredtoasthe hp andthe ph methods,respectively.Ineitherthe hp andthe ph meshrenementmethodsthenumber ofmeshintervals,widthofeachmeshinterval,andthedegre eoftheapproximating polynomialcanbevarieduntilauser-speciedaccuracytol erancehasbeenachieved. Whenusingeitherofthemethodsin GPOPS-II ,theterminology hp ( N min N max ) or ph ( N min N max ) referstoamethodwhoseminimumandmaximumallowablepolyn omial degreeswithinameshintervalare N min and N max ,respectively.Eachmethodestimates thesolutionerrorusingarelativedifferencebetweenthes tateestimateandtheintegral ofthedynamicsatamodiedsetofLGRpoints.Thekeydiffere ncebetweenthe hp and the ph methodsliesinthemannerinwhichthedecisionismadetoeit herincreasethe 148

PAGE 149

numberofcollocationpointsinameshintervalortoreneth emesh.In[ 22 ]thedegree oftheapproximatingpolynomialisincreasediftheratioof themaximumcurvatureover themeancurvatureofthestateinaparticularmeshinterval .Ontheotherhand,[ 63 ] usestheexponentialconvergencepropertyoftheLegendreGauss-Radauorthogonal collocationmethodandincreasesthepolynomialdegreewit hinameshintervalifthe estimateoftherequiredpolynomialdegreeislessthanause r-speciedupperlimit. Iftheestimateofthepolynomialdegreeexceedstheallowed upperlimit,themesh intervalisdividedintomoremeshintervals.In GPOPS-II andtheusercanchoose betweenthesetwomeshrenementmethods.Finally,itisnot edthat GPOPS-II has beendesignedinamodularwaymakingitpossibletoaddanewm eshrenement methodinarelativelystraightforwardwayifitissodesire d. 5.3.7AlgorithmicFlowof GPOPS-II Inthissectionwedescribetheoperationalowof GPOPS-II withtheaidofFig. 5-7 First,theuserprovidesadescriptionoftheoptimalcontro lproblemthatistobesolved. Thepropertiesoftheoptimalcontrolproblemarethendeter minedfromtheuser descriptionfromwhichthestate,control,time,andparame terdependenciesofthe optimalcontrolproblemfunctionsaredetermined.Subsequ ently,assumingthatthe userhasspeciedthattheoptimalcontrolproblembescaled automatically,theoptimal controlproblemscalingalgorithmiscalledandthesescale factorsareusedtoscale theNLP.Theoptimalcontrolproblemisthentranscribedtoa largesparseNLPandthe NLPissolvedontheinitialmesh,wheretheinitialmeshisei theruser-suppliedoris determinedbythedefaultssetin GPOPS-II .OncetheNLPissolved,itisuntranscribed toadiscreteapproximationoftheoptimalcontrolproblema ndtheerrorinthediscrete approximationforthecurrentmeshisestimated.Iftheuser -speciedaccuracytolerance ismet,thesoftwareterminatesandoutputsthesolution.Ot herwise,anewmeshis determinedusingoneofthesuppliedmeshrenementalgorit hmsandtheresultingNLP issolvedonthenewmesh. 149

PAGE 150

INPUT: Initial Setup for Optimal Control Problem Find Properties of Optimal Control Problem from the User-Provided Setup Find Derivative Dependencies of the Optimal Control Problem Functions Find Optimal Control Problem Variable and Function Scaling Optimal Control Problem Transcribed to Nonlinear Programming Problem on Current Mesh Is Estimated Error < Desired Error Tolerance? Determine New Mesh for the Optimal Contol Problem Set Initial Guess of the Optimal Control Problem to the Current Solution Estimate the Error of the Optimal Control Problem Solution False True OUTPUT: Solution to Optimal Control Problem Figure5-7.Flowchartofthe GPOPS-II algorithm. 5.4Examples GPOPS-II isnowdemonstratedonveexamplestakenfromtheopenliter ature. Therstexampleisthehyper-sensitiveoptimalcontrolpro blemfromRef.[ 56 ]and demonstratestheabilityof GPOPS-II toefcientlysolveproblemsthathaverapid changesindynamicsinparticularregionsofthesolution.T hesecondexampleis thereusablelaunchvehicleentryproblemtakenfromRef.[ 10 ]anddemonstratesthe efciencyof GPOPS-II onamorerealisticproblem.Thethirdexampleisthespace stationattitudeoptimalcontrolproblemtakenfrom[ 64 ]and[ 10 ]anddemonstrates theefciencyof GPOPS-II onaproblemwhosesolutionishighlynon-intuitive.The fourthexampleisakineticbatchreactorproblemtakenfrom [ 10 ]anddemonstrates theabilityof GPOPS-II tosolveanextremelybadlyscaledmultiple-phaseoptimal controlproblem.Thefthexampleisamultiple-stagelaunc hvehicleascentproblem takenfrom[ 10 17 23 ]anddemonstratestheabilityof GPOPS-II tosolveaproblem 150

PAGE 151

withmultiple-phases.Therstfourexamplesweresolvedus ingtheopen-sourceNLP solverIPOPT[ 58 ]insecondderivative(fullNewton)modewiththepubliclya vailable multifrontalmassivelyparallelsparsedirectlinearsolv erMUMPS[ 59 ],whilethefth examplewassolvedusingtheNLPsolverSNOPT[ 41 ].Allresultswereobtainedusing theintegralformoftheLegendre-Gauss-Radauorthogonalc ollocationmethodand variousformsoftheaforementioned ph meshrenementmethodusingdefaultNLP solversettingsandtheautomaticscalingroutinein GPOPS-II 5.4.1Hyper-SensitiveProblem Considerthefollowing hyper-sensitive optimalcontrolproblemtakenfrom[ 56 ]: minimize 1 2 Z t f 0 ( x 2 + u 2 ) dt subjectto 8>>>><>>>>: x = x 3 + u x (0)=1, x ( t f )=1.5, (5–58) where t f =10000 .Itisknownforasufcientlylargevalueof t f theinterestingbehavior inthesolutionoccursnear t =0 and t = t f (seeRef.[ 56 ]fordetails),whilethevast majorityofthesolutionisaconstant.Giventhestructureo fthesolution,amajorityof collocationpointsneedtobeplacednear t =0 and t = t f Thehyper-sensitiveoptimalcontrolproblemwassolvedusi ng GPOPS-II with the ph (3,10) methodananinitialmeshoftenevenlyspacedmeshintervalw ith threeLGRpointspermeshinterval.Thesolutionobtainedus ing GPOPS-II isshown inFig. 5-8 alongsidethesolutionobtainedwiththesoftware SparseOptimizationSuite (SOS)[ 60 ].Itisseenthatthe GPOPS-II andSOSsolutionsareinexcellentagreement. Moreover,theoptimalcostobtainedusing GPOPS-II andSOSareextremelyclose,with values 3.3620563 and 3.3620608 ,respectively.Inordertodemonstratehow GPOPS-II is capableofcapturingtheinterestingfeaturesoftheoptima lsolution,Figure. 5-9 shows thesolutionontheintervals t 2 [0,15] (neartheinitialtime)and t 2 [9985,10000] (nearthenaltime),whileFig. 5-10 showsthemeshrenementhistory.Itisseenthat GPOPS-II accuratelycapturestherapiddecayfrom x (0)=1 andtherapidgrowthto 151

PAGE 152

meettheterminalcondition x ( t f )=1.5 ,andthedensityofthemeshpointsnear t =0 and t = t f increasesasthemeshrenementprogresses.Finally,Table 5-1 showsthe estimatederroroneachmesh,whereitisseenthatthesoluti onerrordecreasessteadily witheachmeshrenementiteration,nallyterminatingont heeighthmesh(thatis,the seventhmeshrenement). GPOPS-II SOS tx ( t ) 0 0 1 10000 -0.2 0.2 0.4 0.6 1.2 1.4 1.6 1.8 2000 4000 60008000 A x ( t ) vs. t GPOPS-II SOS t u ( t ) 0 0 1 2 3 4 5 6 7 8 10000 -1 2000 4000 60008000 B u ( t ) vs. t Figure5-8. GPOPS-II and SparseOptimizationSuite solutionstohyper-sensitive optimalcontrolproblem. 152

PAGE 153

GPOPS-II SOS tx ( t ) 0 0 1 5 10 20 25 15 -0.2 0.2 0.4 0.6 1.2 1.4 1.6 1.8 A x ( t ) vs. t near t =0 GPOPS-II SOS tx ( t ) 0 1 99859990999510000 99759980 -0.2 0.2 0.4 0.6 1.2 1.4 1.6 1.8 B x ( t ) vs. t near t = t f GPOPS-II SOS t u ( t ) 0 0 1 5 10 2025 -0.8 -0.6 -0.4 15 -0.2 -1 0.2 0.4 0.6 1.8 C u ( t ) vs. t near t =0 GPOPS-II SOS t u ( t ) 0 1 2 3 4 5 6 7 8 99859990999510000 9975 9980 -1 D u ( t ) vs. t near t = t f Figure5-9. GPOPS-II and SparseOptimizationSuite solutionstohyper-sensitive optimalcontrolproblemnear t =0 and t = t f MeshRenementIterationMeshPointLocations 0 1 2 3 4 5 6 7 8 10000 2000 40006000 8000 Figure5-10.Meshrenementhistoryforhyper-sensitivepr oblemusing GPOPS-II 153

PAGE 154

Table5-1.Meshrenementhistoryforhyper-sensitiveprob lem. MeshRelativeErrorEstimate 1 2.827 10 1 2 2.823 10 0 3 7.169 10 1 4 1.799 10 1 5 7.092 10 2 6 8.481 10 3 7 1.296 10 3 8 5.676 10 7 5.4.2ReusableLaunchVehicleEntry Considerthefollowingoptimalcontrolproblemofmaximizi ngthecrossrangeduring theatmosphericentryofareusablelaunchvehicleandtaken from[ 10 ]wherethe numericalvaluesin[ 10 ]areconvertedfromEnglishunitstoSIunits.Maximizethec ost functional J = ( t f ) (5–59) subjecttothedynamicconstraints r = v sin r = v cos r sin r cos = v cos r cos r ,_ v = D m g sin r r = L cos mv g v v r cos r = L sin mv cos r + v cos r sin tan r (5–60) andtheboundaryconditions h (0)=79248 km h ( t f )=24384 km (0)=0 deg ( t f )= Free ,, (0)=0 deg ( t f )= Free v (0)=7.803 km/s v ( t f )=0.762 km/s r (0)= 1 deg r ( t f )= 5 deg (0)=90 deg ( t f )= Free (5–61) where r = h + R e isthegeocentricradius, h isthealtitude, R e isthepolarradiusof theEarth, isthelongitude, isthelatitude, v isthespeed, r istheightpathangle, and istheazimuthangle.Furthermore,theaerodynamicandgrav itationalforcesare 154

PAGE 155

computedas D = v 2 SC D = 2, L = v 2 SC L = 2, g = = r 2 (5–62) where = 0 exp( h = H ) istheatmosphericdensity, 0 isthedensityatsealevel, H is thedensityscaleheight, S isthevehiclereferencearea, C D isthecoefcientofdrag, C L isthecoefcientoflift,and isthegravitationalparameter. Thereusablelaunchvehicleentryoptimalcontrolproblemw assolvedwith GPOPSII usingthe ph (4,10) meshrenementmethodandaninitialmeshconsistingof tenevenlyspacedmeshintervalswithfourLGRpointspermes hintervalandamesh renementaccuracytoleranceof 10 7 .Theinitialguessofthestatewasastraightline overtheduration t 2 [0,1000] betweentheknowninitialandnalcomponentsofthe stateoraconstantattheinitialvaluesofthecomponentsof thestatewhoseterminal valuesarenotspecied,whiletheinitialguessofbothcont rolswaszero.Thesolution obtainedusing GPOPS-II isshowninFigs. 5-11A – 5-11F alongsidethesolutionobtained usingthesoftware SparseOptimizationSuite (SOS)[ 10 ],whereitisseenthatthe twosolutionsobtainedarevirtuallyindistinguishable.I tisnotedthattheoptimalcost obtainedby GPOPS-II andSOSarealsonearlyidenticalat 0.59627639 and 0.59587608 respectively.Table 5-2 showstheperformanceofboth GPOPS-II andSOSonthis example.Itisinterestingtoseethat GPOPS-II meetstheaccuracytoleranceof 10 7 in onlyfourmeshiterations(threemeshrenements)whileSOS requiresatotalofeight meshes(sevenmeshrenements).Finally,thenumberofcoll ocationpointsusedby GPOPS-II isapproximatelyonehalfthenumberofcollocationpointsr equiredbySOSto achievethesamelevelofaccuracy. 155

PAGE 156

SOS GPOPS-II t (s)h ( t ) (km) 0 20 30 40 50 60 70 80 500 1500 2500 1000 2000 A h ( t ) vs. t SOS GPOPS-II t (s) v ( t ) (km/s) 0 0 1 2 3 4 5 500 1500 2500 6 7 8 1000 2000 B v ( t ) vs. t SOS GPOPS-II t (s) ( t ) (deg) 0 0 5 15 20 25 30 35 500 1500 2500 10 10002000 C ( t ) vs. t SOS GPOPS-II t (s) r ( t ) (deg) 0 0 1 500 1500 2500 -6 -5 -4 -3 -2 -1 10002000 D r ( t ) vs. t SOS GPOPS-II t (s) ( t ) (deg) 16.5 17 17.5 0 500 1500 2500 10002000 E ( t ) vs. t SOS GPOPS-II t (s) ( t ) (deg) -10-20-30-40-50-60-70-80 0 0 500 1500 2500 10 10002000 F ( t ) vs. t Figure5-11.Solutiontoreusablelaunchvehicleentryprob lemusing GPOPS-II 156

PAGE 157

Table5-2.Performanceof GPOPS-II onthereusablelaunchvehicleentryoptimal controlproblem. MeshEstimatedNumberofEstimatedNumberof IterationError(GPOPS-II)CollocationPointsError(SOS) CollocationPoints 12.463 10 3 411.137 10 2 51 22.946 10 4 1031.326 10 3 101 31.202 10 5 1323.382 10 5 101 48.704 10 8 1751.314 10 6 101 5 –– 2.364 10 7 201 6 –– 2.364 10 7 232 7 –– 1.006 10 7 348 8 –– 9.933 10 8 353 5.4.3SpaceStationAttitudeControl Considerthefollowingspacestationattitudecontrolopti malcontrolproblemtaken from[ 64 ]and[ 10 ].Minimizethecostfunctional J = 1 2 Z t f t 0 u T u dt (5–63) subjecttothedynamicconstraints = J 1 f gg ( r ) n [ J + h ] u g r = 1 2 rr T + I + r [ ( r ) ] h = u (5–64) theinequalitypathconstraint k h k h max (5–65) 157

PAGE 158

andtheboundaryconditions t 0 =0, t f =1800, (0)= 0 r (0)= r 0 h (0)= h 0 0 = J 1 f gg ( r ( t f )) n ( t f ) [ J ( t f )+ h ( t f ) ] g 0 = 1 2 r ( t f ) r T ( t f )+ I + r ( t f ) [ ( t f ) 0 ( r ( t f )) ] (5–66) where ( r h ) isthestateand u isthecontrol.Inthisformulation istheangular velocity, r istheEuler-Rodriguesparametervector, h istheangularmomentum,and u is theinputmoment(andisthecontrol). 0 ( r )= orb C 2 gg =3 2 orb C n3 JC 3 (5–67) and C 2 and C 3 arethesecondandthirdcolumn,respectively,ofthematrix C = I + 2 1+ r T r r n r n r n (5–68) Inthisexamplethematrix J isgivenas J = 266664 2.80701911616 10 7 4.822509936 10 5 1.71675094448 10 7 4.822509936 10 5 9.5144639344 10 7 6.02604448 10 4 1.71675094448 10 7 6.02604448 10 4 7.6594401336 10 7 377775 (5–69) 158

PAGE 159

whiletheinitialconditions 0 r 0 ,and h 0 are 0 = 266664 9.5380685844896 10 6 1.1363312657036 10 3 +5.3472801108427 10 6 377775 r 0 = 266664 2.9963689649816 10 3 1.5334477761054 10 1 3.8359805613992 10 3 377775 h 0 = 266664 500050005000 377775 (5–70) Amoredetaileddescriptionofthisproblem,includingallo ftheconstants J 0 r 0 ,and h 0 ,canbefoundin[ 64 ]or[ 10 ]. Thespacestationattitudecontrolexamplewassolvedwith GPOPS-II usingthe ph (4,10) meshrenementmethodwithaninitialmeshconsistingoften uniformlyspaced meshintervalsandfourLGRpointspermeshinterval.Inaddi tion,anite-difference perturbationstepsizeof 10 5 wasused.Finally,theinitialguesswasaconstantover thetimeinterval t 2 [0,1800] ,wheretheconstantwas ( 0 r 0 h 0 ) forthestateandzero forthecontrol.Thestateandcontrolsolutionsobtainedus ing GPOPS-II areshown, respectively,inFig. 5-12 and 5-13 alongsidethesolutionobtainedusingtheoptimal controlsoftware SparseOptimizationSuite (SOS)[ 60 ].Itisseenthatthe GPOPS-II solutionisincloseagreementwiththeSOSsolution.Itisno tedforthisexamplethat themeshrenementaccuracytoleranceof 10 6 wassatisedonthesecondmesh(that is,onemeshrenementiterationwasperformed)usingatota lof46collocation(LGR) points(thatis,47totalpointswhenincludingthenaltime point). 159

PAGE 160

SOS GPOPS-II t (s)! 1 ( t ) 10 4 -8 -6 -4 -2 0 0 2 500 1500 6 4 10002000 A 1 ( t ) vs. t SOS GPOPS-II t (s) 2 ( t ) 10 4 -11.6 -11.5 -11.4 -11.3 -11.2 -11.1 -11 -10.9 0 500 1500 10002000 B 2 ( t ) vs. t SOS GPOPS-II t (s) 3 ( t ) 10 4 -3 -2 -1 0 0 1 2 3 5 500 1500 4 10002000 C 3 ( t ) vs. t SOS GPOPS-II t (s) r 1 ( t ) 0 0 500 1500 10002000 0.035 -0.05 0.05 0.1 0.15 D r 1 ( t ) vs. t SOS GPOPS-II t (s) r 2 ( t ) 0 500 1500 0.144 0.146 0.148 0.152 0.154 0.156 0.158 10002000 0.15 E r 2 ( t ) vs. t SOS GPOPS-II t (s) r 3 ( t ) 0 0 500 1500 10002000 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 F r 3 ( t ) vs. t SOS GPOPS-II t (s) h 1 ( t ) -5 -10 0 0 5 500 1500 10 10002000 G h 1 ( t ) vs. t SOS GPOPS-II t (s) h 2 ( t ) -4 -2 0 0 2 500 1500 6 8 4 10002000 H h 2 ( t ) vs. t SOS GPOPS-II t (s) h 3 ( t ) -6 -4 -2 0 0 2 500 1500 6 4 10002000 I h 3 ( t ) vs. t Figure5-12.Statesolutiontospacestationattitudecontr olproblemusing GPOPS-II withtheNLPsolverIPOPTandameshrenementtoleranceof 10 6 alongsidesolutionobtainedusingoptimalcontrolsoftwar e Sparse OptimizationSuite 5.4.4KineticBatchReactor Considerthefollowingthree-phasekineticbatchreactoro ptimalcontrolproblem thatoriginallyappearsintheworkof[ 65 ]andlaterappearsin[ 10 ].Minimizethecost functional J = r 1 t (3) f + r 2 p (5–71) 160

PAGE 161

SOS GPOPS-II t (s) u 1 ( t ) -150 -100 -50 0 0 50 100 500 1500 1000 2000 A u 1 ( t ) vs. t SOS GPOPS-II t (s) u 2 ( t ) -5 -15 -10 0 0 5 15 20 25 500 1500 10 1000 2000 B u 2 ( t ) vs. t SOS GPOPS-II t (s) u 3 ( t ) -10-20-30-40 -50 0 0 20 500 1500 10 10002000 C u 3 ( t ) vs. t Figure5-13.Controlsolutiontospacestationattitudecon trolproblemusing GPOPS-II withtheNLPsolverIPOPTandameshrenementtoleranceof 10 6 alongsidesolutionobtainedusingoptimalcontrolsoftwar e Sparse OptimizationSuite subjecttothedynamicconstraints (5–72) y ( k ) 1 = k 2 y ( k ) 2 u ( k ) 2 y ( k ) 2 = k 1 y ( k ) 2 y ( k ) 6 + k 1 u ( k ) 4 k 2 y ( k ) 2 u ( k ) 4 y ( k ) 3 = k 2 y ( k ) 2 u ( k ) 2 + k 3 y ( k ) 4 y ( k ) 6 k 3 u ( k ) 3 y ( k ) 4 = k 3 y ( k ) 4 y ( k ) 6 + k 3 u ( k ) 3 y ( k ) 5 = k 1 y ( k ) 2 y ( k ) 6 k 1 u ( k ) 4 y ( k ) 6 = k 1 y ( k ) 2 y ( k ) 6 + k 1 u ( k ) 4 k 3 y ( k ) 4 y ( k ) 6 + k 3 u ( k ) 3 ,( k =1,2,3), (5–73) 161

PAGE 162

theequalitypathconstraints p y ( k ) 6 +10 u ( k ) 1 u ( k ) 2 u ( k ) 3 u ( k ) 4 =0, u ( k ) 2 K 2 y ( k ) 1 = ( K 2 +10 u ( k ) 1 )=0, u ( k ) 3 K 3 y ( k ) 3 = ( K 3 +10 u ( k ) 1 )=0, u ( k ) 4 K 4 y 5 = ( K 1 +10 u ( k ) 1 )=0, ,( k =1,2,3), (5–74) thecontrolinequalitypathconstraint 293.15 u ( k ) 5 393.15,( k =1,2,3), (5–75) theinequalitypathconstraintinphases1and2 y ( k ) 4 a t ( k ) 2 ,( k =1,2), (5–76) theinteriorpointconstraints t (1) f =0.01, t (2) f = t (3) f = 4, y ( k ) i = y ( k +1) i ,( i =1,...,6, k =1,2,3), (5–77) andtheboundaryconditions y (1) 1 (0)=1.5776, y (1) 2 (0)=8.32, y (1) 3 (0)=0, y (1) 4 (0)=0, y (1) 5 (0)=0, y (1) 6 (0) p =0, y (3) 4 ( t (3) f ) 1, (5–78) 162

PAGE 163

where k 1 = ^ k 1 exp( 1 = u ( k ) 5 ), k 1 = ^ k 1 exp( 1 = u ( k ) 5 ), k 2 = ^ k 2 exp( 2 = u ( k ) 5 ), k 3 = k 1 k 3 = 1 2 k 1 ,( k =1,2,3), (5–79) andthevaluesfortheparameters ^ k j j ,and K j aregivenas ^ k 1 =1.3708 10 12 1 =9.2984 10 3 K 1 =2.575 10 16 ^ k 1 =1.6215 10 20 1 =1.3108 10 4 K 2 =4.876 10 14 ^ k 2 =5.2282 10 12 2 =9.599 10 3 K 3 =1.7884 10 16 (5–80) Thekineticbatchreactoroptimalcontrolproblemwassolve dusing GPOPS-II usingthe ph (3,6) meshrenementmethodwithaninitialmeshineachphase consistingoftenuniformlyspacedmeshintervalswiththre eLGRpointspermesh interval.Inaddition,abasederivativeperturbationstep sizeof 10 5 wasused.Finally,a straightlineinitialguesswasusedinphase1whileaconsta ntinitialguesswasusedin phases2and3.Thestateandcontrolsolutionsobtainedusin g GPOPS-II areshownin Figs. 5-14 – 5-17 ,respectively,alongsidethesolutionobtainedusingthes oftware Sparse OptimizationSuite (SOS)[ 60 ].Itisseenthatinthecompletethree-phaseproblemthe GPOPS-II andSOSsolutionshavethesametrend,thekeydifferencebei ngthatthe GPOPS-II solutionisshorterindurationthantheSOSsolution.Aclos erexamination, however,ofthesolutioninphase1revealsthatthetwosolut ionsareactuallyquite differentatthestartoftheproblem.The GPOPS-II solutionmovesawayfromtheinitial conditionmuchmorequicklythantheSOSsolution.Thus,the SOSsolutionexhibits stiffbehavioratthestartofthesolutionwhilethe GPOPS-II solutiondoesnotexhibit thisstiffness.Whilethesolutionsaresignicantlydiffe rentinphase1,theoptimalcost obtainedusing GPOPS-II is 3.1650187 whiletheoptimalcostobtainedusingSOS 163

PAGE 164

is 3.1646696 ,leadingtoabsoluteandrelativedifferencesofonly 3.4910 10 4 and 1.1031 10 4 ,respectively.Thus,whilethesolutionsobtainedbyeachs oftwareprogram differintherst(transient)phase,theoverallperforman ceof GPOPS-II issimilartothat obtainedusingSOS(particularlygiventhecomputationalc hallengeofthisexample). 164

PAGE 165

SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr)y 1 ( t ) 0 0 1 1 2 0.2 0.4 0.5 0.6 1.2 1.4 1.5 1.6 1.8 A y 1 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) y 2 ( t ) 0 1 2 6 7 8 0.5 1.5 5.5 6.5 7.5 8.5 B y 2 ( t ) vs. t 0.3 SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) y 3 ( t ) 0 0 1 2 0.2 0.4 0.5 0.5 0.6 0.7 1.5 0.1 C y 3 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) y 4 ( t ) 0 0 1 1 2 -0.2 0.2 0.4 0.5 0.6 1.2 1.5 1.8 D y 4 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) y 5 ( t ) 0 0 1 12 0.2 0.4 0.5 0.6 1.2 1.4 1.5 1.8 E y 5 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) y 6 ( t ) 0 0 12 0.5 1.5 0.005 0.01 0.015 F y 6 ( t ) vs. t Figure5-14.Statesolutiontokineticbatchreactoroptima lcontrolproblemusing GPOPS-II alongsidesolutionobtainedusingoptimalcontrolsoftwar e SparseOptimizationSuite 165

PAGE 166

SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr)u 1 ( t ) 0 1 2 7 8 9 10 11 0.5 1.5 6.5 7.5 8.5 9.5 10.5 11.5 A u 1 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr)u 1 ( t ) 0 1 2 7 8 9 10 11 0.5 1.5 6.5 7.5 8.5 9.5 10.5 11.5 B u 1 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) u 3 ( t ) 0 0 1 1 2 0.2 0.4 0.5 0.6 1.2 1.4 1.5 1.6 1.8 C u 3 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) u 4 ( t ) 0 0 1 1 2 0.2 0.4 0.5 0.6 1.2 1.4 1.5 1.8 D u 4 ( t ) vs. t SOS(Phase1)SOS(Phase2)SOS(Phase3) GPOPS-II(Phase1)GPOPS-II(Phase2)GPOPS-II(Phase3) t (hr) u 5 ( t ) 0 1 2 0.5 1.5 280 300 320 340 360 380 400 E u 5 ( t ) vs. t Figure5-15.Controlsolutiontokineticbatchreactoropti malcontrolproblemusing GPOPS-II alongsidesolutionobtainedusingoptimalcontrolsoftwar e SparseOptimizationSuite 166

PAGE 167

SOS(Phase1) GPOPS-II(Phase1) t (hr)y 1 ( t ) 0 1.540 1.545 1.550 1.555 1.560 1.565 1.570 1.575 1.580 1.585 0.002 0.004 0.006 0.008 0.01 A y 1 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) y 2 ( t ) 0 0.002 0.004 0.006 0.008 0.01 8.26 8.27 8.28 8.29 8.30 8.31 8.32 B y 2 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) y 3 ( t ) 0 0 0.002 0.004 0.005 0.006 0.008 0.01 0.01 0.015 0.02 0.025 0.03 0.035 C y 3 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) y 4 ( t ) 10 4 0 0 1 2 -0.5 0.5 1.5 2.5 0.002 0.004 0.006 0.008 0.01 D y 4 ( t ) vs. t 0.012 0.014 SOS(Phase1) GPOPS-II(Phase1) t (hr) y 5 ( t ) 0 0 0.002 0.002 0.004 0.004 0.006 0.006 0.008 0.008 0.01 0.01 E y 5 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) y 6 ( t ) 0 0 0.002 0.004 0.005 0.006 0.008 0.01 0.01 0.015 F y 6 ( t ) vs. t Figure5-16.Phase1statesolutiontokineticbatchreactor optimalcontrolproblem using GPOPS-II alongsidesolutionobtainedusingoptimalcontrolsoftwar e SparseOptimizationSuite 167

PAGE 168

SOS(Phase1) GPOPS-II(Phase1) t (hr)u 1 ( t ) 0 7 8 9 10 11 6.5 7.5 8.5 9.5 10.5 11.5 0.002 0.004 0.006 0.008 0.01 A u 1 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) u 2 ( t ) 0 0 2 4 6 8 10 12 14 0.002 0.004 0.006 0.008 0.01 B u 2 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) u 3 ( t ) 0 0 0.002 0.004 0.006 0.008 0.01 0.01 0.02 0.03 0.04 0.06 0.07 0.08 0.09 0.05 0.1 C u 3 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) u 4 ( t ) 0 0 0.002 0.004 0.006 0.008 0.01 0.01 0.02 0.03 0.04 0.06 0.05 D u 4 ( t ) vs. t SOS(Phase1) GPOPS-II(Phase1) t (hr) u 5 ( t ) 0 280 300 320 340 360 380 400 0.002 0.004 0.006 0.008 0.01 E u 5 ( t ) vs. t Figure5-17.Phase1controlsolutiontokineticbatchreact oroptimalcontrolproblem using GPOPS-II alongsidesolutionobtainedusingoptimalcontrolsoftwar e SparseOptimizationSuite 168

PAGE 169

5.4.5Multiple-StageLaunchVehicleAscentProblem Theproblemconsideredinthissectionistheascentofamult iple-stagelaunch vehicle.Theobjectiveistomaneuverthelaunchvehiclefro mthegroundtothetarget orbitwhilemaximizingtheremainingfuelintheupperstage .Itisnotedthatthisexample isisfoundverbatimin[ 23 ],[ 17 ],and[ 10 ].Theproblemismodeledusingfourphases wheretheobjectiveistomaximizethemassattheendofthefo urthphase,thatis maximize J = m ( t (4) f ) (5–81) subjecttothedynamicconstraints r ( p ) = v ( p ) v ( p ) = k r ( p ) k 3 r ( p ) + T ( p ) m ( p ) u ( p ) + D ( p ) m ( p ) m ( p ) = T ( p ) g 0 I sp ( p =1,...,4), (5–82) theinitialconditions r ( t 0 )= r 0 =(5605.2,0,3043.4) 10 3 m v ( t 0 )= v 0 =(0,0.4076,0) 10 3 m/s m ( t 0 )= m 0 =301454 kg (5–83) theinteriorpointconstraints r ( p ) ( t ( p ) f ) r ( p +1) ( t ( p +1 0 )= 0 v ( p ) ( t ( p ) f ) v ( p +1) ( t ( p +1) 0 )= 0 ,( p =1,...,3) m ( p ) ( t ( p ) f ) m ( p ) dry m ( p +1) ( t ( p +1) 0 )=0, (5–84) 169

PAGE 170

theterminalconstraints(correspondingtoageosynchrono ustransferorbit), a ( t (4) f )= a f =24361.14 km e ( t (4) f )= e f =0.7308, i ( t (4) f )= i f =28.5deg, ( t (4) f )= f =269.8deg, ( t (4) f )= f =130.5deg, (5–85) andthepathconstraints j r ( p ) j 2 R e k u ( p ) k 22 =1, ( p =1,...,4). (5–86) Ineachphase r ( t )=( x ( t ), y ( t ), z ( t )) isthepositionrelativetothecenteroftheEarth expressedinECIcoordinates, v =( v x ( t ), v y ( t ), v z ( t )) istheinertialvelocityexpressed inECIcoordinates, isthegravitationalparameter, T isthevacuumthrust, m isthe mass, g 0 istheaccelerationduetogravityatsealevel, I sp isthespecicimpulseof theengine, u =( u x u y u z ) isthethrustdirectionexpressedinECIcoordinates,and D =( D x D y D z ) isthedragforceexpressedECIcoordinates.Thedragforcei sdened as D = 1 2 C D S k v rel k v rel (5–87) where C D isthedragcoefcient, S isthevehiclereferencearea, = 0 exp( h = H ) istheatmosphericdensity, 0 isthesealeveldensity, h = r R e isthealtitude, r = k r k 2 = p x 2 + y 2 + z 2 isthegeocentricradius, R e istheequatorialradiusofthe Earth, H isthedensityscaleheight,and v rel = v r isthevelocityasviewed byanobserverxedtotheEarthexpressedinECIcoordinates ,and =(0,0,n) istheangularvelocityoftheEarthasviewedbyanobserveri ntheinertialreference frameexpressedinECIcoordinates.Furthermore, m dry isthedrymassofphases1,2, and3andisdened m dry = m tot m prop ,where m tot and m prop are,respectively,the totalmassanddrymassofphases1,2,and3.Finally,thequan tities a e i ,and are,respectively,thesemi-majoraxis,eccentricity,inc lination,longitudeofascending 170

PAGE 171

node,andargumentofperiapsis,respectively.Thevehicle dataforthisproblemand thehenumericalvaluesforthephysicalconstantscanbefou ndinTables 5-3 .and 5-4 respectively.Table5-3.Vehiclepropertiesformultiple-stagelaunchve hicleascentproblem. QuantitySolidBoostersStage1Stage2 m tot (kg)1929010438019300 m prop (kg)170109555016820 T (N)6285001083100110094 I sp (s)283.3301.7467.2 NumberofEngines911 BurnTime(s)75.2261700 Table5-4.Constantsusedinthelaunchvehicleascentoptim alcontrolproblem. ConstantValue PayloadMass 4164 kg S 4 m 2 C D 0.5 0 1.225 kg/m 3 H 7200 m t 1 75.2 s t 2 150.4 s t 3 261 s R e 6378145 m n7.29211585 10 5 rad/s 3.986012 10 14 m 3 /s 2 g 0 9.80665 m/s 2 Themultiple-stagelaunchvehicleascentoptimalcontrolp roblemwassolvedusing GPOPS-II withtheNLPsolverSNOPTandaninitialmeshineachphasecon sistingof tenuniformlyspacedmeshintervalswithfourLGRpointsper meshinterval.Theinitial guessofthesolutionwasconstructedsuchthattheinitialg uessofthepositionandthe velocityinphases1and2wasconstantat ( r (0), v (0)) asgiveninEq.( 5–83 )whilein phases3and4theinitialguessofthepositionandvelocityw asconstantat (~ r ,~ v ) ,where (~ r ,~ v ) areobtainedviaatransformationfromorbitalelementstoE CIcoordinatesusing theveknownorbitalelementsofEq.( 5–85 )andatrueanomalyofzero.Furthermore, inallphasestheinitialguessofthemasswasastraightline betweentheinitialand nalmass, m ( t ( p ) 0 ) and m ( t ( p ) f ) ( p 2 [1,...,4] ).Finally,inallphasestheguessofthe controlwasconstantat u =(0,1,0) .The GPOPS-II solutionisshowninFig. 5-18 171

PAGE 172

Inthisexamplethemeshrenementaccuracytoleranceof 10 6 issatisedonthe initialmeshand,thus,nomeshrenementisperformed.Thes olutionobtainedusing GPOPS-II matchescloselywiththesolutionobtainedusingthesoftwa re SOCS [ 10 ], whereitisnotedthattheoptimalobjectivevaluesobtained using GPOPS-II andSOCS are 7529.71229 and 7529.712412 ,respectively. 5.5Discussion TheveexamplesprovideinSection 5.4 highlightdifferentcapabilitiesof GPOPSII .First,itisseenthat GPOPS-II iscapableofsolvingawiderangeofproblemsand thesolutionsareinexcellentagreementwithestablishedo ptimalcontrolsoftware. Furthermore,itisseenthatthemeshrenementmethodsempl oyedin GPOPS-II provideaccuratesolutionswhileplacingmeshpointsinreg ionsoftheinteresting featuresinthesolution.Inaddition,fromthevarietyofex amplesstudieditisseen that GPOPS-II hasbeendesignedtoallowforgreatexibilityintheformul ationofan optimalcontrolproblem.Thefactthat GPOPS-II iscapableofsolvingthechallenging benchmarkoptimalcontrolproblemsshowninthischaptersh owsthegeneralutilityof thesoftwareonproblemsthatmayariseindifferentapplica tionareas. 5.6Limitationsof GPOPS-II Likeallsoftware, GPOPS-II haslimitations.First,itisassumedinthe implementationthatallfunctionshavecontinuousrstand secondderivatives.In someapplications,however,thefunctionsthemselvesmayb econtinuouswhilethe derivativesmaybediscontinuous.Insuchproblems GPOPS-II maystrugglebecause theNLPsolverisnotbeingprovidedwithaccurateapproxima tionstothederivative functions.Furthermore,theabilityofanygivenNLPsolver toobtainasolutionisalways problemdependent.Asaresult,forsomeexamplesitmaybeth ecasethatIPOPTwill performbetterthanSNOPT,butinsomecasesSNOPTitmaybeth eexactopposite inthatSNOPTmaysignicantlyoutperformIPOPT(thelaunch vehicleascentproblem isanexamplewhereSNOPToutperformsIPOPTwith GPOPS-II ).Also,problems 172

PAGE 173

Phase1 Phase2 Phase3 Phase4 t (s)h ( t ) (km) 50 100 150 0 0 200 200 250 400600 800 1000 A h ( t ) vs. t Phase1 Phase2 Phase3 Phase4 t (s) v ( t ) (m/s) 0 0 200 400600 800 1000 2000 4000 6000 8000 10000 12000 B v ( t ) vs. t Phase1 Phase2 Phase3 Phase4 t (s) m ( t ) 1000 (kg) 50 100 150 0 0 200 200 250 300 350 4006008001000 C m ( t ) vs. t Phase1 Phase2 Phase3 Phase4 t (s) u 1 ( t ) -0.8 -0.6 -0.4 -0.2 0.2 0.4 0.6 0.8 0 0 1 200 4006008001000 D u 1 ( t ) vs. t Phase1 Phase2 Phase3 Phase4 t (s) u 2 ( t ) 0.4 0.5 0.6 0.7 0.8 0.9 0 1 200 4006008001000 E u 2 ( t ) vs. t Phase1 Phase2 Phase3 Phase4 t (s) u 3 ( t ) -0.4 -0.3 -0.2 -0.1 0.1 0.2 0.3 0.4 0.5 0 0 200 4006008001000 F u 3 ( t ) vs. t Figure5-18.Solutionofmultiple-stagelaunchvehicleasc entproblemusing GPOPS-II withhigh-indexpathconstraintsmayresultintheconstrai ntqualicationconditions notbeingsatisedonnemeshes.Insuchcases,uniqueNLPLa grangemultipliers maynotexist.Insomecases,theseLagrangemultipliersmay becomeunbounded. Finally,asistrueformanyoptimalcontrolsoftwareprogra ms,applicationswhose 173

PAGE 174

solutionslieonasingulararccancreateproblemsduetothe inabilitytodeterminethe optimalcontrolalongthesingulararc.Insuchcaseshighly inaccuratesolutionmaybe obtainedintheregionnearthesingulararc,andmeshrenem entmayonlyexacerbate theseinaccuracies.Theapproachforproblemswhosesoluti onslieonasingulararc istomodifytheproblembyincludingtheconditionsthatde nethesingulararc(thus removingthesingularity). 5.7Conclusions Ageneral-purposeMATLABsoftwareprogramcalled GPOPS-II hasbeendescribed forsolvingmultiple-phaseoptimalcontrolproblemsusing variable-orderorthogonal collocationmethods.Inparticular,thesoftwareemployst heLegendre-Gauss-Radau orthogonalcollocationmethod,wherethecontinuous-time controlproblemistranscribed toalargesparsenonlinearprogrammingproblem.Thesoftwa reimplementstwo previouslydevelopedadaptivemeshrenementmethodsthat allowforexibilityinthe numberandplacementofthecollocationandmeshpointsinor dertoachieveaspecied accuracy.Inaddition,thesoftwareisdesignedtocomputea llderivativesrequiredby theNLPsolverusingsparsenite-differencingoftheoptim alcontrolfunctions.Thekey componentsofthesoftwarehavebeendescribedindetailand theutilityofthesoftware isdemonstratedonvebenchmarkoptimalcontrolproblems. Thesoftwaredescribedin thischapterprovidesresearchersausefulplatformuponwh ichtosolveawidevarietyof complexconstrainedoptimalcontrolproblems. 174

PAGE 175

REFERENCES [1]Kirk,D.E., OptimalControlTheory:AnIntroduction ,DoverPublications,Mineola, NewYork,2004. [2]Pontryagin,L.S., MathematicalTheoryofOptimalProcesses ,JohnWiley&Sons, NewYork,1962. [3]vonStryk,O.andBulirsch,R.,“DirectandIndirectMeth odsforTrajectory Optimization,” AnnalsofOperationsResearch ,Vol.37,1992,pp.357–373. [4]Betts,J.T.,“SurveyofNumericalMethodsforTrajector yOptimization,” Journalof Guidnance,Control,andDynamics ,Vol.21,No.2,March–April1998,pp.193–207. [5]Babuska,I.andRheinboldt,W.C.,“ASurveyofaPosterio riErrorEstimatorsand AdaptiveApproachesintheFiniteElementMethod,” Proc.oftheChina-France Symp.onFiniteElementMethods(Beijing,1982) ,SciencePress,1983,pp.1–56. [6]Babuska,I.,Zienkiewicz,O.C.,Gago,J.,anddeA.Olive ira,E.R., Accuracy EstimatesandAdaptiveRenementsinFiniteElementComput ations ,JohnWiley& Sons,Chichester,1986. [7]Babuska,I.andRheinboldt,W.C.,“ComputationalError EstimatesandAdaptive ProcessesforSomenonlinearStructuralProblems,” ComputerMethodsinApplied MechanicsandEngineering ,Vol.34,No.1–3,1982,pp.895–937. [8]Babuska,I.andRheinboldt,W.C.,“ReliableErrorEstim ationandMeshAdaptation fortheFiniteElementMethod,” Proc.SecondIntl.Conf.ComputationalMethodsin NonlinearMechanics(Univ.TexasAustin) ,North-Holland,Amsterdam-NewYork, 1979,pp.67–108. [9]Babuska,I.andRheinboldt,W.C.,“APosterioriErrorAn alysisofFiniteElement SolutionsforOne-DimensionalProblems,” SIAMJournalonNumericalAnalysis Vol.18,1981,pp.565–589. [10]Betts,J.T., PracticalMethodsforOptimalControlandEstimationUsing Nonlinear Programming ,SIAMPress,Philadelphia,2010. [11]Jain,D.andTsiotras,P.,“TrajectoryOptimizationUs ingMultiresolutionTechniques,” JournalofGuidance,Control,andDynamics ,Vol.31,No.5,September-October 2008,pp.1424–1436. [12]Zhao,Y.J.,“OptimalPatternofGliderDynamicSoaring ,” OptimalControlApplicationsandMethods ,Vol.25,2004,pp.67–89. [13]Elnagar,G.,Kazemi,M.,andRazzaghi,M.,“ThePseudos pectralLegendreMethod forDiscretizingOptimalControlProblems,” IEEETransactionsonAutomatic Control ,Vol.40,No.10,1995,pp.1793–1796. 175

PAGE 176

[14]Elnagar,G.andRazzaghi,M.,“ACollocation-TypeMeth odforLinearQuadratic OptimalControlProblems,” OptimalControlApplicationsandMethods ,Vol.18, No.3,1998,pp.227–235. [15]Benson,D.A.,Huntington,G.T.,Thorvaldsen,T.P.,an dRao,A.V.,“Direct TrajectoryOptimizationandCostateEstimationviaanOrth ogonalCollocation Method,” JournalofGuidance,Control,andDynamics ,Vol.29,No.6, November-December2006,pp.1435–1440. [16]Huntington,G.T., AdvancementandAnalysisofaGaussPseudospectralTranscriptionforOptimalControl ,Ph.D.thesis,MassachusettsInstituteofTechnology, Cambridge,Massachusetts,2007. [17]Rao,A.V.,Benson,D.A.,ChristopherDarby,M.A.P.,Fr ancolin,C.,Sanders,I., andHuntington,G.T.,“Algorithm902:GPOPS,AMATLABSoftw areforSolving Multiple-PhaseOptimalControlProblemsUsingtheGaussPs eudospectral Method,” ACMTransactionsonMathematicalSoftware ,Vol.37,No.2,April–June 2010,pp.22:1–22:39. [18]Garg,D.,Patterson,M.,Hager,W.W.,Rao,A.V.,Benson ,D.A.,andHuntington, G.T.,“AUniedFrameworkfortheNumericalSolutionofOpti malControlProblems UsingPseudospectralMethods,” Automatica ,Vol.46,No.11,November2010, pp.1843–1851. [19]Garg,D.,Hager,W.W.,andRao,A.V.,“PseudospectralM ethodsforSolving Innite-HorizonOptimalControlProblems,” Automatica ,Vol.47,No.4,April2011, pp.829–837. [20]Garg,D.,Patterson,M.,Francolin,C.,Darby,C.,Hunt ington,G.,Hager,W.W.,and Rao,A.V.,“DirectTrajectoryOptimizationandCostateEst imationofFinite-horizon andInnite-HorizonOptimalControlProblemsusingaRadau Pseudospectral Method,” ComputationalOptimizationandApplications ,Vol.49,No.2,June2011, pp.335–358. [21]Darby,C.L.,Hager,W.W.,andRao,A.V.,“DirectTrajec toryOptimizationUsinga VariableLow-OrderAdaptivePseudospectralMethod,” JournalofSpacecraftand Rockets ,Vol.48,No.3,May–June2011,pp.433–445. [22]Darby,C.L.,Hager,W.W.,andRao,A.V.,“An hp -AdaptivePseudospectralMethod forSolvingOptimalControlProblems,” OptimalControlApplicationsandMethods Vol.32,No.4,July–August2011,pp.476–502. [23]Benson,D.A., AGaussPseudospectralTranscriptionforOptimalControl ,Ph.D. thesis,DepartmentofAeronauticsandAstronautics,Massa chusettsInstituteof Technology,Cambridge,Massachusetts,2004. 176

PAGE 177

[24]Huntington,G.T.,Benson,D.A.,andRao,A.V.,“Optima lCongurationof TetrahedralSpacecraftFormations,” TheJournaloftheAstronauticalSciences Vol.55,No.2,April-June2007,pp.141–169. [25]Huntington,G.T.andRao,A.V.,“OptimalRecongurati onofSpacecraft FormationsUsingtheGaussPseudospectralMethod,” JournalofGuidance, Control,andDynamics ,Vol.31,No.3,May-June2008,pp.689–698. [26]Gong,Q.,Ross,I.M.,Kang,W.,andFahroo,F.,“Connect ionsBetweenthe CovectorMappingTheoremandConvergenceofPseudospectra lMethods,” ComputationalOptimizationandApplications ,Vol.41,No.3,December2008, pp.307–335. [27]Kameswaran,S.andBiegler,L.T.,“ConvergenceRatesf orDirectTranscription ofOptimalControlProblemsUsingCollocationatRadauPoin ts,” Computational OptimizationandApplications ,Vol.41,No.1,2008,pp.81–126. [28]Darby,C.L.,Garg,D.,andRao,A.V.,“CostateEstimati onUsingMultiple-Interval PseudospectralMethods,” JournalofSpacecraftandRockets ,Vol.48,No.5, September-October2011,pp.856–866. [29]Patterson,M.A.andRao,A.V.,“ExploitingSparsityin DirectCollocation PseudospectralMethodsforSolvingOptimalControlProble ms,” JournalofSpacecraftandRockets ,Vol.49,No.2,March–April2012,pp.364–377. [30]Canuto,C.,Hussaini,M.Y.,Quarteroni,A.,andZang,T .A., SpectralMethodsin FluidDynamics ,Spinger-Verlag,Heidelberg,Germany,1988. [31]Fornberg,B., APracticalGuidetoPseudospectralMethods ,CambridgeUniversity Press,1998. [32]Trefethen,L.N., SpectralMethodsUsingMATLAB ,SIAMPress,Philadelphia, 2000. [33]Broyden,C.G.,“TheConvergenceofaClassofDouble-Ra nkMinimization Algorithms,” JournaloftheInstituteofMathematicsandItsApplication s ,Vol.6, No.1,1970,pp.76–90. [34]Fletcher,R.,“ANewApproachtoVariableMetricAlgori thms,” ComputerJournal Vol.13,No.3,1970,pp.317–322. [35]Goldfarb,D.,“AFamilyofVariableMetricUpdatesDeri vedbyVariationalMeans,” MathematicsofComputation ,Vol.24,No.3,1970,pp.23–26. [36]Shanno,D.F.,“ConditioningofQuasi-NewtonMethodsf orFunctionMinimization,” MathematicsofComputation ,Vol.24,1970,pp.647–656. [37]Davidon,W.C.,“Variablemetricmethodforminimizati on,” SIAMJournalon Optimization ,Vol.1,No.1,1991,pp.1–17. 177

PAGE 178

[38]Fletcher,R., PracticalMethodsofOptimization ,JohnWileyandSons,NewYork, 1985. [39]Fletcher,R.andPowell,M.J.D.,“ARapidlyConvergent DescentMethodfor Minimization,” ComputerJournal ,Vol.6,No.2,1963,pp.163–168. [40]Gill,P.E.,Murray,W.,Saunders,M.A.,andWright,M.H ., User'sGuideforNPSOL (Version4.0):AFORTRANPackageforNonlinearProgramming ,Departmentof OperationsResearch,StanfordUniversity,January1986. [41]Gill,P.E.,Murray,W.,andSaunders,M.A.,“SNOPT:AnS QPAlgorithmfor Large-ScaleConstrainedOptimization,” SIAMReview ,Vol.47,No.1,January 2002,pp.99–131. [42]Gill,P.E.,Murray,W.,andSaunders,M.A., User'sGuideforSNOPTVersion7: SoftwareforLargeScaleNonlinearProgramming ,February2006. [43]Biegler,L.T.andZavala,V.M.,“Large-ScaleNonlinea rProgrammingUsingIPOPT: AnIntegratingFrameworkforEnterprise-WideOptimizatio n,” Computersand ChemicalEngineering ,Vol.33,No.3,March2008,pp.575–582. [44]Byrd,R.H.,Nocedal,J.,andWaltz,R.A.,“KNITRO:AnIn tegratedPackagefor NonlinearOptimization,” LargeScaleNonlinearOptimization ,SpringerVerlag, 2006,pp.35–59. [45]Betts,J.T.andHuffman,W.P.,“ExploitingSparsityin theDirectTranscription MethodforOptimalControl,” ComputationalOptimizationandApplications ,Vol.14, 1999,pp.179–201,10.1023/A:1008739131724. [46]Gong,Q.,Fahroo,F.,andRoss,I.M.,“SpectralAlgorit hmforPseudospectral MethodsinOptimalControl,” JournalofGuidance,ControlandDynamics ,Vol.31, No.3,May–June2008,pp.460–471. [47]Zhao,Y.andTsiotras,P.,“DensityFunctionsforMeshR enementinNumerical OptimalControl,” JournalofGuidance,Control,andDynamics ,Vol.34,No.1, January–February2011,pp.271–277. [48]Bryson,A.E.andHo,Y.-C., AppliedOptimalControl ,HemispherePublishing,New York,1975. [49]Lewis,F.L.andSyrmos,V.L., OptimalControl ,JohnWileyandSons,NewYork, 2nded.,1995. [50]Patterson,M.A.andRao,A.V.,“ExploitingSparsityof PseudospectralImplicit IntegralSchemesforSolvingOptimalControlProblems,” 2013AIAAGuidance, Navigation,andControlConference ,Boston,Massachusetts,Submittedfor Publication,19-22August2013. 178

PAGE 179

[51]Abramowitz,M.andStegun,I., HandbookofMathematicalFunctionswithFormulas,Graphs,andMathematicalTables ,DoverPublications,NewYork,1965. [52]Rump,S.M.,“INTLAB–INTervalLABoratory,” DevelopmentsinReliableComputing ,editedbyT.Csendes,KluwerAcademicPublishers,Dordrec ht,1999,pp. 77–104. [53]Duff,I.S.,“MA57—aCodefortheSolutionofSparseSymm etricDeniteand IndeniteSystems,” ACMTransactionsonMathematicalSoftware ,Vol.30,No.2, 2004,pp.118–144. [54]Hou,H.,Hager,W.W.,andRao,A.V.,“ConvergenceofaGa ussPseudospectral TranscriptionforOptimalControl,” 2012AIAAGuidance,Navigation,andControl Conference ,AIAAPaper2012-4452,Minneapolis,MN,August13-162012. [55]Press,W.H.,Teukolsky,S.A.,Vetterling,W.T.,andFl annery,B.P., Numerical Recipes:TheArtofScienticComputing ,CambridgeUniversityPress,Cambridge, UK,3rded.,2007. [56]Rao,A.V.andMease,K.D.,“EigenvectorApproximateDi chotomicBasisMethod forsolvingHyper-SensitiveoptimalControlProblems,” OptimalControlApplications andMethods ,Vol.21,No.1,January–February2000,pp.1–19. [57]Ledzewicz,U.andSch ¨ attler,H.,“AnalysisofOptimalControlsforaMathematica l ModelofTumourAnti-Angiogenesis,” OptimalControlApplicationsandMethods Vol.29,No.1,January–February2008,pp.41–57. [58]Biegler,L.T.,Ghattas,O.,Heinkenschloss,M.,andva nBloemenWaanders, B.,editors, Large-ScalePDEConstrainedOptimization ,LectureNotesin ComputationalScienceandEngineering,Vol.30,SpringerVerlag,Berlin,2003. [59] MultifrontalMassivelyParallelSolver(MUMPS4.10.0)Use r'sGuide ,May2011. [60]Betts,J.T.andGablonsky,J.M.,“AComparisonofInter iorPointandSQP MethodsonOptimalControlProblems,”Tech.Rep.M&CT-TECH -02-004,Boeing MathematicsandComputingTechnology,Seattle,Washingto n,March2002. [61]Betts,J.T.,“SparseJacobianUpdatesintheCollocati onMethodforOptimal ControlProblems,” JournalofGuidance,Control,andDynamics ,Vol.13,No.3, May–June1990,pp.409–415. [62]Gill,P.E.,Murray,W.,andWright,M.H., PracticalOptimization ,AcademicPress, London,1981. [63]Rao,A.V.,Patterson,M.A.,andHager,W.W.,“A ph CollocationSchemefor OptimalControl,” Automatica ,January2013,pp.SubmittedforPublication. 179

PAGE 180

[64]Pietz,J.A., PseudospectralCollocationMethodsfortheDirectTranscr iptionof OptimalControlProblems ,Master'sthesis,RiceUniversity,Houston,Texas,April 2003. [65]Leineweber,D.B., EfcientReducedSQPMethodsfortheOptimizationofChemicalProcessesDescribedbyLargeSpaceDAEModels ,Ph.D.thesis,Universit ¨ at Heidelberg,Interdisziplin ¨ aresZentrumf¨urWissenschaftlichesRechnen(IWR), 1998. 180

PAGE 181

BIOGRAPHICALSKETCH MichaelPattersonwasborninWestminster,Maryland.Hegre wupintheFlorida KeysandgraduatedCoralShoresHighSchoolinTavernier,Fl orida.Heearned hisBachelorofSciencedegreeinmechanicalengineeringin 2006fromFlorida InternationalUniversity,hisMasterofSciencedegreeinm echanicalengineeringin 2010fromtheUniversityofFlorida,andhisPh.D.fromtheUn iversityofFloridain2013. 181