Citation
C++ Framework for Solving Nonlinear Optimal Control Problems

Material Information

Title:
C++ Framework for Solving Nonlinear Optimal Control Problems
Creator:
Agamawi, Yunus M
Place of Publication:
[Gainesville, Fla.]
Florida
Publisher:
University of Florida
Publication Date:
Language:
english
Physical Description:
1 online resource (212 p.)

Thesis/Dissertation Information

Degree:
Doctorate ( Ph.D.)
Degree Grantor:
University of Florida
Degree Disciplines:
Aerospace Engineering
Mechanical and Aerospace Engineering
Committee Chair:
Rao,Anil
Committee Co-Chair:
Conklin,John
Committee Members:
Bevilacqua,Riccardo
Hager,William Ward

Subjects

Subjects / Keywords:
derivative-estimation -- direct-collocation -- mesh-refinement -- nonlinear-programming-problem -- numerical-methods -- optimal-control -- software
Mechanical and Aerospace Engineering -- Dissertations, Academic -- UF
Genre:
bibliography ( marcgt )
theses ( marcgt )
government publication (state, provincial, terriorial, dependent) ( marcgt )
born-digital ( sobekcm )
Electronic Thesis or Dissertation
Aerospace Engineering thesis, Ph.D.

Notes

Abstract:
A C++ framework for solving nonlinear optimal control problems is described. The framework consists of utilizing a class of direct orthogonal collocation methods with sparse nonlinear programming problem (NLP) techniques combined with advanced derivative estimation techniques and hp adaptive mesh refinement methods. Specifically, in this research, the Legendre-Gauss-Radau collocation method is employed because of the high accuracy of the method and the elegant structure of the NLP that arises from the method. Next, a variety of advanced techniques for evaluating the derivatives necessary to exploit the sparse NLP derivative matrices are utilized which include sparse central finite-differencing, bicomplex-step derivative approximation, hyper-dual derivative approximation, and automatic differentiation. The performance of each of the four aforementioned derivative estimation techniques is compared in terms of their effectiveness of computing the necessary derivative estimates in order to facilitate the NLP solver employed to solve the transcribed NLP. Furthermore, a new hp adaptive mesh refinement method is developed for solving bang-bang optimal control problems. This mesh refinement method identifies the structure of the bang-bang optimal control problem and converges rapidly to obtain an accurate solution in fewer mesh iterations and less computation time than previously developed hp mesh refinement methods. Finally, the entire framework is implemented in a new C++ software called CGPOPS. The software is demonstrated on a variety of examples where it is shown to be capable of obtaining accurate solutions in a computationally efficient. ( en )
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.
Thesis:
Thesis (Ph.D.)--University of Florida, 2019.
Local:
Adviser: Rao,Anil.
Local:
Co-adviser: Conklin,John.
Statement of Responsibility:
by Yunus M Agamawi.

Record Information

Source Institution:
UFRGP
Rights Management:
Applicable rights reserved.
Classification:
LD1780 2019 ( lcc )

UFDC Membership

Aggregations:
University of Florida Theses & Dissertations

Downloads

This item has the following downloads:


Full Text

PAGE 1

C++FRAMEWORKFORSOLVING NONLINEAROPTIMALCONTROLPROBLEMS By YUNUSAGAMAWI ADISSERTATIONPRESENTEDTOTHEGRADUATESCHOOL OFTHEUNIVERSITYOFFLORIDAINPARTIALFULFILLMENT OFTHEREQUIREMENTSFORTHEDEGREEOF DOCTOROFPHILOSOPHY UNIVERSITYOFFLORIDA 2019

PAGE 2

c 2019YunusAgamawi

PAGE 3

Dedicatedtobreakingthebarrier.

PAGE 4

ACKNOWLEDGMENTS Iwouldliketoexpressmysincerestgratitudeandappreciationtothemanypeople whohavehelpedmethroughoutthisjourney.Firstandforemost,Iwouldliketothankmy advisor,Dr.AnilRao,forgivingmetheopportunitytoearnaPhDattheUniversityof Florida.Hisexpertiseandguidancethroughoutmygraduatecareerhavebeeninvaluable. Iwouldalsoliketothankthemembersofmysupervisorycommittee,Dr.WilliamHager, Dr.RiccardoBevilacqua,andDr.JohnConklin,fortheirtimeandsupportthroughout thedoctoralprocess. IwouldliketothankmyfellowVDOLmembers,JosephEide,AlexMiller,Mitzi Dennis,RachelKeil,ElishaPager,andBrittannyHolden,aswell,formakingtheeldof computationalresearcheversoslightlymorebearable.Specically,I'dliketothankJoe andAlexforalwaysbeingwillingtocriticallythinkwithme,andtothankMitzi,Rachel, Elisha,andBrittannyforcreatingsuchacopaceticworkenvironment.Havingintellectual peerswhocouldunderstandandrelatetothearduousprocessoflearningandapplying optimalcontrolandcomputationaltheorywasvitaltomaintainingmysanity. Last,butcertainlynotleast,I'dliketothankmylovingfamily.Myparentshave beennothingbutcompletelysupportiveandapprovingofmyacademicambitionssince Iwasinpreschool.Ithankmymotherforteachingmetheimportanceofdedicationand hardwork,andIthankmyfatherforinspiringmetobethebestversionofmyselfthat Icanbe.Iwouldalsoliketothankmybigbrother,Yusuf,forbeingaconstantbeacon ofsuccesswithwhichtocompete,andmyamazinggirlfriend,Amie,forherboundless patience,kindness,andlove. 4

PAGE 5

TABLEOFCONTENTS page ACKNOWLEDGMENTS.................................4 LISTOFTABLES.....................................8 LISTOFFIGURES....................................10 ABSTRACT........................................12 CHAPTER 1INTRODUCTION..................................14 2MATHEMATICALBACKGROUND........................25 2.1BolzaOptimalControlProblem.......................25 2.2NumericalMethodsforDierentialEquations................28 2.2.1ExplicitSimulationTime-Marching.................29 2.2.2ImplicitSimulationCollocation...................32 2.3NumericalMethodsforOptimalControl...................34 2.3.1IndirectMethods............................34 2.3.1.1IndirectShooting.......................35 2.3.1.2IndirectMultiple-Shooting..................36 2.3.1.3IndirectCollocation.....................37 2.3.2DirectMethods.............................38 2.3.2.1DirectShooting........................40 2.3.2.2MultipleDirectShooting...................40 2.3.2.3DirectCollocation......................41 2.4FamilyofLegendre-GaussDirectCollocationMethods...........42 2.4.1TransformedContinuousBolzaProblem................42 2.4.2LG,LGR,andLGLCollocationPoints................43 2.4.3Legendre-Gauss-LobattoOrthogonalCollocationMethod......45 2.4.4Legendre-GaussOrthogonalCollocationMethod...........46 2.4.5Legendre-Gauss-RadauOrthogonalCollocationMethod.......49 2.4.6BenetsofUsingLegendre-Gauss-RadauCollocationMethod....52 2.5NumericalOptimization............................53 2.5.1UnconstrainedOptimization......................53 2.5.2EqualityConstrainedOptimization..................54 2.5.3InequalityConstrainedOptimization.................56 3EXPLOITINGSPARSITYINLEGENDRE-GAUSS-RADAUCOLLOCATION METHOD.......................................58 3.1NotationandConventions...........................58 3.2GeneralMultiple-PhaseOptimalControlProblem..............61 3.3Variable-OrderLegendre-Gauss-RadauCollocationMethod.........65 5

PAGE 6

3.4FormofNLPResultingfromLGRTranscription...............71 3.4.1NLPDecisionVectorArisingfromLGRTranscription........72 3.4.2NLPObjectiveFunctionArisingfromLGRTranscription......72 3.4.3GradientofNLPObjectiveFunction.................73 3.4.4NLPConstraintVectorArisingfromLGRTranscription.......74 3.4.5NLPConstraintJacobian........................74 3.4.6NLPLagrangianArisingfromLGRTranscription..........80 3.4.7NLPLagrangianHessian........................82 3.5Conclusions...................................83 4COMPARISONOFDERIVATIVEESTIMATIONMETHODSINSOLVING OPTIMALCONTROLPROBLEMSUSINGDIRECTCOLLOCATION....84 4.1GeneralMultiple-PhaseOptimalControlProblem.............88 4.2Legendre-Gauss-RadauCollocation......................89 4.3NonlinearProgrammingProblemArisingfromLGRCollocation......93 4.4DerivativeApproximationMethods......................95 4.4.1Finite-DierenceMethods.......................95 4.4.2Bicomplex-stepDerivativeApproximation..............96 4.4.3Hyper-DualDerivativeApproximation................99 4.4.4AutomaticDierentiation.......................101 4.5ComparisonofVariousDerivativeApproximationMethods.........102 4.5.1DerivativeApproximationError....................102 4.5.2ComputationalEciencyExpectations................103 4.5.3IdenticationofDerivativeDependencies...............105 4.6Examples....................................107 4.6.1Example1:Free-FlyingRobotProblem...............109 4.6.2Example2:MinimumTime-to-ClimbSupersonicAircraftProblem111 4.6.3Example3:SpaceStationAttitudeControl.............113 4.7Discussion...................................117 4.8Conclusions...................................120 5MESHREFINEMENTMETHODFORSOLVINGBANG-BANGOPTIMAL CONTROLPROBLEMSUSINGDIRECTCOLLOCATION...........122 5.1Single-PhaseOptimalControlProblem....................125 5.2Legendre-Gauss-RadauCollocation......................126 5.3Control-LinearHamiltonian..........................130 5.4Bang-BangControlMeshRenementMethod................132 5.4.1MethodforIdentifyingBang-BangOptimalControlProblems...132 5.4.2EstimatingLocationsofSwitchesinControl.............134 5.4.3ReformulationofOptimalControlProblemIntoMultipleDomains.136 5.4.4SummaryofBang-BangControlMeshRenementMethod.....138 5.5Examples....................................138 5.5.1Example1:ThreeCompartmentModelProblem..........140 5.5.2Example2:RobotArmProblem...................142 6

PAGE 7

5.5.3Example3:Free-FlyingRobotProblem...............144 5.6Discussion...................................147 5.7Conclusions...................................148 6 CGPOPS :AC++SOFTWAREFORSOLVINGMULTIPLE-PHASE OPTIMALCONTROLPROBLEMSUSINGADAPTIVEGAUSSIAN QUADRATURECOLLOCATIONANDSPARSENONLINEAR PROGRAMMING..................................149 6.1GeneralMultiple-PhaseOptimalControlProblems.............151 6.2Legendre-Gauss-RadauCollocationMethod.................153 6.3MajorComponentsof CGPOPS ........................157 6.3.1SparseNLPArisingfromRadauCollocationMethod........157 6.3.1.1NLPVariables........................158 6.3.1.2NLPObjectiveandConstraintFunctions..........159 6.3.2SparseStructureofNLPDerivativeFunctions............160 6.3.3ScalingofOptimalControlProblemforNLP.............161 6.3.4ComputationDerivativesofNLPFunctions..............163 6.3.4.1CentralFinite-Dierence...................163 6.3.4.2Bicomplex-step........................164 6.3.4.3Hyper-Dual..........................165 6.3.4.4AutomaticDierentiation..................166 6.3.5MethodforDeterminingtheOptimalControlFunctionDependencies166 6.3.6AdaptiveMeshRenement.......................167 6.3.7AlgorithmicFlowof CGPOPS .....................168 6.4Examples....................................169 6.4.1Example1:Hyper-SensitiveProblem.................171 6.4.2Example2:ReusableLaunchVehicleEntry..............175 6.4.3Example3:SpaceStationAttitudeControl..............179 6.4.4Example4:Free-FlyingRobotProblem................185 6.4.5Example5:Multiple-StageLaunchVehicleAscentProblem.....191 6.5Capabilitiesof CGPOPS ............................195 6.6Limitationsof CGPOPS ............................195 6.7Conclusions...................................196 7SUMMARYANDFUTUREWORK........................198 REFERENCES.......................................202 BIOGRAPHICALSKETCH................................212 7

PAGE 8

LISTOFTABLES Table page 4-1PerformanceresultsforExample1using OC EC BC HD and AD methods forvaryingnumberofmeshintervals K using N k =5 collocationpointsineach meshinterval.....................................111 4-2PerformanceresultsforExample2using OC EC BC HD ,and AD methods forvaryingnumberofmeshintervals K using N k =5 ineachmeshinterval...114 4-3PerformanceresultsforExample3using OC EC BC HD ,and AD methods forvaryingnumberofmeshintervals K with N k =5 collocationpointsineach meshinterval......................................117 5-1MeshrenementperformanceresultsforExample1using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods....................142 5-2MeshrenementperformanceresultsforExample2using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods....................144 5-3MeshrenementperformanceresultsforExample3using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods....................146 6-1Performanceof CGPOPS onExample1using hp -I,10.............172 6-2Performanceof CGPOPS onExample1using hp -II,10.............172 6-3Performanceof CGPOPS onExample1using hp -III,10............173 6-4Performanceof CGPOPS onExample1using hp -IV,10............173 6-5Performanceof CGPOPS onExample2using hp -I,10.............176 6-6Performanceof CGPOPS onExample2using hp -II,10.............177 6-7Performanceof CGPOPS onExample2using hp -III,10............177 6-8Performanceof CGPOPS onExample2using hp -IV,10............177 6-9Performanceof CGPOPS onExample3using hp -I,10.............181 6-10Performanceof CGPOPS onExample3using hp -II,10.............182 6-11Performanceof CGPOPS onExample3using hp -III,10............182 6-12Performanceof CGPOPS onExample3using hp -IV,10............182 6-13Performanceof CGPOPS onExample4using hp -I,10.............187 6-14Performanceof CGPOPS onExample4using hp -II,10.............187 8

PAGE 9

6-15Performanceof CGPOPS onExample4using hp -III,10............187 6-16Performanceof CGPOPS onExample4using hp -IV,10............188 6-17Performanceof CGPOPS onExample4using hp -BB,10............188 6-18Vehiclepropertiesforthemultiple-stagelaunchvehicleascentproblem.....193 6-19Constantsusedinthemultiple-stagelaunchvehicleascentproblem........193 9

PAGE 10

LISTOFFIGURES Figure page 2-1Butcherarraysforcommonsingle-stageandmultiple-stagemethodsforsolving initial-valueproblems.................................33 2-2SchematicshowingLGL,LGR,andLGorthogonalcollocationpoints......44 3-1CompositeLegendre-Gauss-Radaudierentiationmatrix.............70 4-1ExampleNLPconstraintsJacobianandLagrangianHessiansparsitypatterns forsingle-phaseoptimalcontrolproblemwith n y statecomponents, n u control components, n q integralcomponents, n c pathconstraints, n s staticparameters, and n b eventconstraints...............................94 4-2Comparisonofrelativeerrorofderivativeapproximationsobtainedusing centralnite-dierence,bicomplex-step,andhyper-dualmethodsforexample functioninEq.4{42.................................104 5-1Estimatesofdiscontinuitylocation t i d k correspondingtocontrolcomponent u i inmeshinterval S k usingcorrespondingswitchingfunction i t withsix collocationpoints f t k 1 ,..., t k 6 g ...........................135 5-2Estimatesofdiscontinuitylocation t i d k correspondingtocontrol component u i acrossmeshintervals S k and S k +1 usingcorresponding switchingfunction i t andfourcollocationpointsineachmeshinterval f t k 1 ,..., t k 4 t k +1 1 ,..., t k +1 4 g ............................135 5-3Schematicofprocessthatcreatesamultiple-domainoptimalcontrolproblem with Q = n s +1 domainswherevariablemeshpointsareintroducedas optimizationparametersinordertodeterminethe n s optimalswitchtimes inthecomponentsofthecontrolforwhichtheHamiltoniandependsupon linearly.........................................137 5-4ComparisonofcontrolforExample1obtainedusing hp -BBand hp -IImesh renementmethods..................................142 5-5Estimatesoftheswitchingfunctions t = 1 t 2 t forExample1using solutionobtainedontheinitialmesh........................142 5-6ComparisonofcontrolforExample2obtainedusing hp -BBand hp -IVmesh renementmethods..................................144 5-7Estimatesoftheswitchingfunctions t = 1 t 2 t 3 t forExample2 usingsolutionobtainedontheinitialmesh.....................145 5-8Comparisonofcontrol F 1 t F 2 t = u 1 t )]TJ/F37 11.9552 Tf 9.82 0 Td [(u 2 t u 3 t )]TJ/F37 11.9552 Tf 9.82 0 Td [(u 4 t forExample 3obtainedusing hp -BB,and hp -IVmeshrenementmethods..........146 10

PAGE 11

5-9Estimatesoftheswitchingfunctions t = 1 t 2 t 3 t 4 t for Example3usingsolutionobtainedontheinitialmesh...............147 6-1Schematicoflinkagesformultiple-phaseoptimalcontrolproblem.Theexample showninthepictureconsistsofsevenphaseswheretheterminiofphases 1,2,and4arelinkedtothestartsofphases2,3,and5,respectively,while theterminiofphases1and6arelinkedtothestartsofphases6and4, respectively......................................153 6-2Examplesparsitypatternsforsinglephaseoptimalcontrolproblemcontaining n y statecomponents, n u controlcomponents, n q integralcomponents,and n c pathconstraints, n s staticparameters,and n b eventconstraints.........162 6-3Flowchartofthe CGPOPS algorithm........................169 6-4 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II meshrenementhistoryforExample1using hp -IV,10......................................173 6-5 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionstoExample1using hp -IV,10......174 6-6 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionstoExample1near t =0 and t = t f using hp -IV,10......................................174 6-7 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II statesolutionstoExample2using hp -III,10...178 6-8 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II controlsolutionstoExample2using hp -III,10..179 6-9 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II meshrenementhistoryforExample2using hp -III,10......................................179 6-10 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionstoExample3using hp -I,10.......183 6-11 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionstoExample3using hp -I,10.......184 6-12 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II meshrenementhistoryforExample4using hp -BB,10and hp -II,10,respectively......................188 6-13 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II statesolutionstoExample4using hp -BB,10and hp -II,10,respectively................................189 6-14 CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II controlsolutionstoExample4using hp -BB,10 and hp -II,10,respectively.............................190 6-15SolutionofExample5using CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II ..............194 11

PAGE 12

AbstractofDissertationPresentedtotheGraduateSchool oftheUniversityofFloridainPartialFulllmentofthe RequirementsfortheDegreeofDoctorofPhilosophy C++FRAMEWORKFORSOLVING NONLINEAROPTIMALCONTROLPROBLEMS By YunusAgamawi August2019 Chair:AnilV.Rao Major:AerospaceEngineering AC++frameworkforsolvingnonlinearoptimalcontrolproblemsisdescribed. Theframeworkconsistsofutilizingaclassofdirectorthogonalcollocationmethods withsparsenonlinearprogrammingproblemNLPtechniquescombinedwithadvanced derivativeestimationtechniquesand hp adaptivemeshrenementmethods.Specically, inthisresearch,theLegendre-Gauss-Radaucollocationmethodisemployedbecause ofthehighaccuracyofthemethodandtheelegantstructureoftheNLPthatarises fromthemethod.Next,avarietyofadvancedtechniquesforevaluatingthederivatives necessarytoexploitthesparseNLPderivativematricesareutilizedwhichinclude sparsecentralnite-dierencing,bicomplex-stepderivativeapproximation,hyper-dual derivativeapproximation,andautomaticdierentiation.Theperformanceofeachof thefouraforementionedderivativeestimationtechniquesiscomparedintermsoftheir eectivenessofcomputingthenecessaryderivativeestimatesinordertofacilitatethe NLPsolveremployedtosolvethetranscribedNLP.Furthermore,anew hp adaptivemesh renementmethodisdevelopedforsolvingbang-bangoptimalcontrolproblems.This meshrenementmethodidentiesthestructureofthebang-bangoptimalcontrolprole andconvergesrapidlytoobtainanaccuratesolutioninfewermeshiterationsandless computationtimethanpreviouslydeveloped hp meshrenementmethods.Finally,the entireframeworkisimplementedinanewC++softwarecalled CGPOPS .Thesoftware 12

PAGE 13

isdemonstratedonavarietyofexampleswhereitisshowntobecapableofobtaining accuratesolutionsinacomputationallyecient. 13

PAGE 14

CHAPTER1 INTRODUCTION Thegoalofanoptimalcontrolproblemistodeterminethestateandcontrolof adynamicalsystemaswellastheinitialandnaltimesthatoptimizeaspecied performancecriterionwhilesimultaneouslysatisfyingdynamicconstraints,path constraints,andboundaryconditions.Optimalcontrolproblemsariseinallbranches ofengineeringaswellasinsubjectssuchaseconomicsandmedicalsciences.Dueto theincreasingcomplexityofapplicationsandtheinabilitytoobtainanalyticsolutions, inthepastfewdecadesthesubjectofoptimalcontrolhastransitionedfromtheory tocomputation.Inparticular,computationaloptimalcontrolhasbecomeasciencein andofitself,resultinginavarietyofnumericalmethodsandcorrespondingsoftware implementationsofthosemethods. Numericalmethodsforsolvingoptimalcontrolproblemsfallintotwobroad categories:indirectmethodsanddirectmethods.Inanindirectmethod,therst-order optimalityconditionsarederivedusingthecalculusofvariations,leadingtoaHamiltonian boundary-valueproblemHBVP.TheHBVPisthensolvednumerically.Inadirect method,theoptimalcontrolproblemisapproximatedusingeithercontrolorstateand controlparameterization.Thecontinuousoptimalcontrolproblemisthenapproximated asanite-dimensionalnonlinearprogrammingproblemNLP.TheNLPisthensolved numericallyusingwelldevelopedsoftwaresuchas SNOPT [1], IPOPT [2],or KNITRO [3].Inthecontextofoptimalcontrol,manysoftwarepackageshavebeendeveloped forsolvingoptimalcontrolproblemsusingindirectanddirectmethods.Examplesof softwareimplementingindirectmethodsincludeBNDSCO[4],whileexamplesofsoftware implementingdirectmethodsinclude SOCS [5], DIRCOL [6], GESOP [7], OTIS [8], MISER [9], POST [10], PSOPT [11], GPOPS [12], ICLOCS [13], ACADO [14],and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]. 14

PAGE 15

Indirectanddirectmethodshavethefollowingadvantagesanddisadvantages.The advantageofanindirectmethodisthat,ifthevariationalconditionscanbesolved, anaccuratenumericalapproximationofanextremalsolutionisobtained.Itisnoted, however,thatindirectmethodshaveseveraldisadvantages.First,solvingthevariational conditionsisoftenextremelydicultifnotimpossible.Moreover,thechallengeinsolving thevariationalconditionsincreasesquicklywithincreasingproblemcomplexity.Second, includingpathconstraintsorinteriorpointconstraintsoftenmakesitdiculttoderive thevariationalconditions.Theadvantageofadirectmethodisthatinmanycasesthe nonlinearprogrammingproblemiscomputationallytractable.Itisnoted,however,that, likeindirectmethods,directmethodshavedisadvantages.First,thesolutionobtainedis onlyasgoodasthemethodusedtoapproximatetheoptimalcontrolproblem.Inother words,iftheoriginaloptimalcontrolproblemisapproximatedusingalow-accuracy method,theresultingsolutionwillgenerallybehighlysuboptimal.Second,aswithan indirectmethod,formanydirectmethodsforexample,shootingormultiple-shootingit isdiculttoincludeavarietyofconstraintsincludingpathconstraintsandinterior-point constraints. Inordertoimproveaccuracyandcomputationaleciency,overthepastfew decadestheclassofdirectmethodscalleddirectcollocationmethodshasbecomea popularchoiceforndingnumericalsolutionstooptimalcontrolproblems.Inadirect collocationmethod,thestateisapproximatedusingasetofbasistrialfunctionsand theconstraintsoftheproblemarecollocatedatadiscretesetofnodesinthetimeinterval ofinterest.Thekeyfeatureofadirectcollocationmethodisthattheresultingnonlinear programmingproblemissparse.Asaresult,asolutiontotheNLPcanbeobtainedina computationallyecientmannerusingmodernnonlinearoptimizationpackages[1,2,3]. Directcollocationmethodsareemployedaseither h p ,or hp -methods[16,17,18,19,20]. Inallmethods,thestateisapproximatedusingapolynomialapproximation.Inan h -method,thetimeintervalofinterestedisdividedintoasetofmeshintervalsandthe 15

PAGE 16

stateisapproximatedusingthesamexed-degreeapproximationineachmeshinterval. Convergenceinan h -methodisthenachievedbyincreasingthenumberofmeshintervals [21,22,23].Ina p -method,arelativelysmallandxednumberofmeshintervalsisused, andconvergenceisachievedbyincreasingthedegreeoftheapproximatingpolynomial withineachmeshinterval[24,25,26,27,12,28,29,30].Inan hp -method,convergenceis achievedbyincreasingthenumberofmeshintervalsand/orincreasingthedegreeofthe polynomialwithineachmeshinterval[31,32,15,33,34]. Inrecentyears,emphasishasbeenplacedonresearchingaparticularclassofdirect collocationmethodsknownasorthogonalcollocationmethods[24,25,12,35,26,30,28, 29,27,36,37,38,39,40].Orthogonalcollocationmethodsemploycollocationpoints thatarechosenbasedonaccuratequadraturerules,withthebasisfunctionstypically beingChebyshevorLagrangepolynomials.Originally,orthogonalcollocationmethods wereemployedas p -methodsduetothesimplestructureandtheexponentialconvergence rateexhibitedforproblemswhosesolutionsaresmoothandwell-behaved[41,42,43]. Themostwelldeveloped p -typeorthogonalcollocationmethodsaretheLegendre-Gauss orthogonalcollocationmethod[35,26],theLegendre-Gauss-Radauorthogonalcollocation method[28,29,39],andtheLegendre-Gauss-Lobattoorthogonalcollocationmethod [24].Morerecently,ithasbeenfoundthatcomputationaleciencyandaccuracymay beincreasedbyusingeitheran h [39]oran hp [31,32,15,33,34]orthogonalcollocation method. Althoughorthogonalcollocationmethodsarehighlyaccurate,properimplementation isimportantinordertoobtainsolutionsinacomputationallyecientmanner.In particular,inordertosolvetheresultingNLP,well-established,state-of-the-art NLPsolversmustbeemployed.Theselargescalegradient-basedNLPsolvers requirethatrstand/orsecondderivativesoftheNLPfunctionsbesupplied.Ina rst-derivativequasi-NewtonNLPsolver,theobjectivefunctiongradientandconstraint Jacobianareusedalongwithadensequasi-Newtonapproximationoftheinverseof 16

PAGE 17

theLagrangianHessiantypicallyaDavidon-Fletcher-PowellDFP[44,45,46]or Broyden-Fletcher-Goldfarb-ShannoBFGS[47,48,49,50]quasi-Newtonapproximation isused.Inasecond-derivativeNewtonNLPsolver,theobjectivefunctiongradient andconstraintJacobianareusedalongwiththeHessianoftheNLPLagrangian.Some examplesofrst-derivativeNLPsolversinclude NPSOL [51]and SNOPT [1,52],while somewell-knownsecond-derivativeNLPsolversinclude IPOPT [2]and KNITRO [3]. DuetothegreatchallengethatarisesfromcomputingtheNLPLagrangianHessian, second-derivativemethodsforsolvingNLPsareoftenavoidedinfavorofthesimpler andmorecommonlyusedrst-derivativemethods.If,however,theLagrangianHessian canbecomputedaccuratelyandeciently,thecomputationalperformanceofsolving anNLPusingasecond-derivativemethodcanbesignicantlyhigherthanwhenusinga quasi-Newtonmethod.Thispotentialforincreasedeciencyandreliabilityisparticularly evidentwhentheNLPissparse.Inparticular,ithasbeenshowninrecentyearsthatthe Legendre-Gauss-Radauorthogonalcollocationmethodhasanelegantblockstructurethat makesitpossibletocomputeboththeconstraintJacobianandtheLagrangianHessian inacomputationallyecientmanner[40,15,28,29,31,39,53].Specically,ithasbeen shownthattheseNLPderivativematricescanbederivedintermsofthederivativesofthe continuousoptimalcontrolproblemfunctions,wheresignicantcomputationalbenets areobtainedfromevaluatingderivativesofthecontinuousfunctionsinsteadofderivatives oftheNLPfunctions[40,15,53].Becauseofitselegantsparsestructureandtheability toecientlycomputetherst-andsecond-derivativesrequiredtoemployafull-Newton secondderivativeNLPsolver,theLegendre-Gauss-Radauorthogonalcollocationmethod servesasthebasisoftheresearchdescribedinthisdissertation. Theforegoingdiscussionprovidesamotivationfortheneedtodevelopmethods thataccuratelyandecientlycomputetherst-andsecond-derivativesrequiredby anNLPsolverwhensolvinganoptimalcontrolproblemcomputationallyusingthe Legendre-Gauss-Radauorthogonalcollocationmethod.Consequently,therstpartof 17

PAGE 18

thisdissertationfocusesontheevaluationoffourderivativeapproximationmethodsfor estimatingtherst-andsecond-derivativesrequiredwhenusingafull-NewtonNLPsolver tosolvetheapproximationofanoptimalcontrolproblemusinghpLegendre-Gauss-Radau collocation.Forcompleteness,theaforementionedsparsestructurearisingintheNLP resultingfromusingLegendre-Gauss-Radaucollocationisrstdescribed,alongwith thederivationoftheNLPderivativematricesintermsoftheoptimalcontrolproblem functions.Then,usingthissparsestructure,thefollowingfourderivativeestimation methodsarecompared:sparsecentralnite-dierencing[21,54,5],bicomplex-step derivativeapproximation[55],hyper-dualderivativeapproximation[56],andautomatic dierentiation[57].TherstthreemethodsareallTaylorseries-basedapproximation methods,whileautomaticdierentiationisanalgorithmicmethodthatcanbederived fromtheunifyingchainruledescribedinRef.[58].Theeectivenessofusingeachofthe aforementionedderivativeestimationtechniqueswhensolvingthesparseNLParisingfrom Legendre-Gauss-Radauorthogonalcollocationisdemonstratedbysolvingthreebenchmark optimalcontrolproblems.Theperformanceofthederivativeestimationtechniquesare thencomparedtooneanotherintermsofcomputationallyeciency.Thecomputationally eciencyofeachtechniqueismeasuredquantitativelybythenumberofNLPiterations toconverge,thetotalcomputationtimetosolve,andtheaveragetimeperNLPiteration spenttocomputethederivativeapproximation. Thesecondpartofthisdissertationfocusesonthedevelopmentofameshrenement methodforsolvingbang-bangoptimalcontrolproblems.Inrecentyears,severalmesh renementmethodsutilizingdirectcollocationmethodshavebeendescribed[59,60,31, 32,61,33,34,62,63,64].Ref.[59]describeswhatisessentiallya p -methodthatemploys adierentiationmatrixtoidentifyswitches,kinks,corners,andotherdiscontinuities inthesolutionalongwithGaussianquadraturerulestogenerateameshthatisdense neartheendpointsofthetimeintervalofinterest.ThemethoddescribedinRef.[60] employsadensityfunctionandattemptstogenerateaxed-ordermeshonwhichto 18

PAGE 19

solvetheproblemusingwhatisessentiallyan h -method.The hp adaptivemethod describedinRefs.[31,32]usesanerrorestimatebasedonthedierencebetweenthe derivativeapproximationofthestateandtheright-handsideofthedynamicsatthe midpointsbetweencollocationpoints.ThiserrorestimateemployedinRefs.[31,32] inducesagreatdealofnoise,however,makingthemethodcomputationallyintractable whenahigh-accuracysolutionisdesired,anddoesnottakeadvantageoftheexponential convergencerateofanorthogonalcollocationmethod.Ontheotherhand,theerror estimateusedinRefs.[61,33,34]takesadvantageoftheexponentialconvergencerateof anorthogonalcollocationmethodbyestimatingtheerrorusinganinterpolationofthe currentapproximationofthestateonanermeshandthenintegratingthedynamics evaluatedattheinterpolationpointstogenerateasecondapproximationtothesolution ofthedierentialequations.BasedontheerrorestimateusedinRefs.[61,33,34],these hp adaptivemeshrenementmethodsevaluatewhethertheaccuracytoleranceissatised withinagivenmeshinterval.Iftheaccuracytoleranceisnotsatised,theneitherthe polynomialdegreeisincreasedorthemeshisrenedbydividingthemeshintervalinto subintervals.Additionally,themeshrenementmethodsusedinRefs.[33,34]employa meshreductionschemethatcanreducethenumberofcollocationpointsusedinmesh intervalswhichalreadysatisfytheerrortoleranceandcanbeapproximatedusingalower orderdegreeLagrangepolynomial,and/ormergesneighboringmeshintervalstogether thatbothmeettheerrortoleranceandcanbeapproximatedusingthesameLagrange polynomialbasis. AlthoughRefs.[31,32,61,33,34]haveshownthatconvergenceusing hp methods canbeachievedwithasignicantlysmallernite-dimensionalapproximationthan wouldberequiredwhenusingeitheran h ora p -method,anundesirablylargeamount ofmeshrenementmaystillberequiredwhensolvinganoptimalcontrolproblemwith adiscontinuoussolution.Inparticular,typicallythe h -methodportionsof hp adaptive meshrenementmethodssimplyconsistsofcreatingequallysizedsubintervals[31,32, 19

PAGE 20

61,33,34].Thisnaivemannerofbreakingmeshintervalsintosubintervalsworkswell whenameshintervalonlyneedstobesubdividedinordertocaptureaquicklychanging solution.Ontheotherhand,whenthesolutionisdiscontinuous,increasingthenumber ofmeshintervalsnearadiscontinuityleadstoanexcessivelylargemeshnearthepoint ofdiscontinuity.Theerrortoleranceinintervalscontainingdiscontinuitiesoftencan notbemetuntilameshpointofanewlycreatedsubintervalisincloseproximityto thelocationofthediscontinuity.Recognizingthisneedtoplacenewmeshpointsnear thediscontinuity,the hp adaptivemeshrenementmethodsinRefs.[62,63]employ discontinuitydetectionandestimationschemesthatattempttoidentifyandlocate discontinuities.ForproblemswherethecontrolappearlinearlyintheHamiltonian ofthecontinuousoptimalcontrolproblem,Ref.[62]attemptstoplaceanewmesh pointinerroneousintervalsmarkedfor h -methodrenementatanestimatedpointof discontinuitybycomputingtheswitchingfunctionsassociatedwiththeHamiltonianat eachpointinthemeshintervalandthenndingwhereaninterpolationofthosevalues vanishthatis,wherethesignoftheswitchingfunctionestimateschange.Similarly, Ref.[63]alsoattemptstoplaceanewmeshpointatestimatedpointsofdiscontinuityby usingajumpfunctionapproximationwhichiscapableofobservinggapsinthesolution prolesoastorecognizediscontinuities;additionally,twonewothermeshpointsare alsocreatedcloselyaroundthenewlyplacedmeshpointtoattempttobracketthe estimateddiscontinuitylocations.Bothofthediscontinuitydetectionschemesemployed inRefs.[62,63]demonstratethepotentialtoreducethenumberofmeshrenementsand overallsizeofthemeshneededinordertomeetadesirederrortolerance;note,however, thatRefs.[62,63]relyontheaccuracyofthesolutionacquiredfromsolvingtheprevious meshandthusarevulnerabletoerrorsintheapproximatedsolution.Additionally,the methodsofRefs.[62,63]canstillrequireanundesirablylargeamountofmeshrenement, becausetheyarestilldependentonplacingmeshpointscloseenoughtothelocations 20

PAGE 21

ofthedetecteddiscontinuitiesinordertoapproximatethediscontinuoussolutionusing piecewisepolynomials. Themethoddevelopedinthisthesisaddressestheissueofmeshrenementinthe vicinityofpointsofdiscontinuityspecicallyforaclassofbang-bangoptimalcontrol problems.Bang-bangoptimalcontrolproblemsareaclassofproblemsinwhichthe controlappearslinearlyintheHamiltonian.Duetothislinearityofthecontroland assumingthatthesolutiondoesnotcontainanysingulararcs,Pontryagin'sminimum principlethenappliessuchthattheoptimalcontrollieseitheratitsmaximumor minimumvaluedependingonthesignofthecorrespondingswitchingfunctionassociated withtheHamiltonian.Asaresultofthecontrolbeingatitslimitsthroughouttheoptimal solution,abang-bangstructureoccurswheneverthecontrolswitchesfromitsmaximumto minimumvalueorvice-versaandcausesdistinctdiscontinuitieswithinthecontrolprole atthosepoints.Dierentfromthepreviouslydevelopedmeshrenementmethodswherea largenumberofcollocationpointsareplacedinsegmentsnearadiscontinuity,themethod developedinthisthesisemploysestimatesoftheswitchingfunctionsassociatedwiththe Hamiltonianinordertoalgorithmicallydetectedthestructureofthebang-bangcontrol solution.Bydetectingthestructureofthebang-bangoptimalcontrolprole,thetime intervalcanbepartitionedintotheappropriatenumberofdomainswherethedomains areconnectedbyvariablemeshpoints.Theuseofvariablemeshpointstoconnectthe domainsfacilitatestheintroductionofswitchtimeparameterswhichcanthenbesolved foronsubsequentmeshiterationsdirectlybytheNLPsolversoastoobtaintheoptimal switchtimesforthebang-bangcontrol.Moreover,thedegreesoffreedomoftheproblem aremaintainedbyholdingthecontrolatitsappropriatelimitwithineachdomainbased onthedetectedstructureobtainedusingtheestimatesoftheswitchingfunctions.Itis notedthattheLegendre-Gauss-Radauorthogonalcollocationmethodisparticularlyuseful inthecontextsofthisbang-bangmeshrenementmethod,asLegendre-Gauss-Radau collocationisabletoobtainaccurateapproximationsofthestate,control,andcostate 21

PAGE 22

whicharenecessaryforestimatingtheswitchingfunctionsoftheHamiltonianthebasis ofthemethod.Thusbydetectingthestructureofthebang-bangcontrolprole,the methodiscapableofsolvingfortheoptimalswitchtimesusingvariablemeshpointsto connectmultipledomainsemployingconstantcontrol.Theeectivenessofthemethod isdemonstratedonseveralexampleswhereitisshowntoreducethenumberofmesh iterations,collocationpoints,andcomputationtimerequiredtosatisfyaspeciedmesh accuracytolerancewhencomparedtothepreviouslydeveloped hp meshrenement methods. Finally,thisdissertationalsodescribesanewoptimalcontrolsoftwarecalled CGPOPS thatemploystheaforementionedvariable-orderLegendre-Gauss-Radau orthogonalcollocationmethod,derivativeestimationtechniques,andnovelbang-bang meshrenementmethod.Itisnotedthatalthough CGPOPS employsthesameoptimal controlframeworkutilizedbythepreviouslydevelopedoptimalcontrolsoftwareknown as GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II thatwaspublishedinRef.[15], CGPOPS isafundamentallydierent softwarepackage.First, CGPOPS iswritteninC++,acompiledlanguagemoresuitable forsoftwareinfrastructureandresource-constrainedapplications,while GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II isaMATLABsoftwarewhichisaninterpretedlanguage.BeingimplementedinC++ gives CGPOPS asignicantadvantageover GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II intermsofbothcomputational eciencyandsystemavailabilitythatis,portability.Moreover,MATLABsoftware requiresexpensivesubscriptioncoststobeusedwhileC/C++compilersarefreely available,thusmakingitmoreaccessiblerelativetoMATLAB. CGPOPS beingdevelopedintheC++object-orientedprogramminglanguagealso facilitatestheusageoftheaforementionedbicomplex-stepandhyper-dualderivative approximationswhichrelyondeningclassesforeachtypeofcomplexnumberand operatoroverloadinginordertoemploythenecessaryarithmetictoproducethe derivativeestimates.Whiledeningclassesandoperatoroverloadingispossiblein MATLAB,thefactthatMATLABisaninterpretedlanguageleadstoextremelyinecient 22

PAGE 23

computationwhenattemptingtoperformcomplexarithmeticwhencomparedwith C++.ThislimitationofMATLABineectivelyutilizingthecomplexnumberderivative estimationsgivesadistinctadvantageto CGPOPS over GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II ,astheaccuracy ofthebicomplex-stepandhyper-dualderivativesissuperiorrelativetothesparse nite-dierencingavailableineither CGPOPS or GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II .Although GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II also hastheautomaticdierentiationsoftware ADiGator [65]availableforcomputingmachine precisionderivatives, ADiGator haspotentialissueswhenattemptingtomigrateitforuse innewerversionsofMATLABdevelopedafterthereleaseof ADiGator .Furthermore,as aresultofhavingthebicomplex-stepandhyper-dualderivativeapproximationsavailable, CGPOPS isabletodeterminetheexactsparsitypatternsoftheNLPconstraintJacobian andNLPLagrangianHessian.Ontheotherhand, GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II usesanover-estimated sparsitypatternfortheNLPLagrangianHessian,asitisonlycapableofdetermining rst-orderderivativedependencies.Thisdierenceinthedeterminationofthesparsity patternsoftheNLPderivativematricesfurtherimprovesthecomputationaleciencyof CGPOPS over GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II asitreducesthenumberofoperationsperformedperNLP iterationtoprovidethenecessaryderivativematricestotheNLPsolver.Finally,the aforementionednovelbang-bangmeshrenementmethodemployedby CGPOPS utilizes thehyper-dualderivativeapproximationinordertoidentifywhenthecontrolappears linearlyintheHamiltonianandthusacandidateforbang-bangmeshrenement. Additionally,thehyper-dualderivativeapproximationisusedtoestimatethevaluesofthe switchingfunctionsatthecollocationpoints,thusservingasthemeansofalgorithmically detectingthestructureofthebang-bangcontrolprole. The CGPOPS softwaredescribedinthisdissertationemploystheaforementioned Legendre-Gauss-Radauorthogonalcollocationmethod[30,28,29,40]indierentialform. Additionally,thekeycomponentsofthesoftwarearedescribedindetail.Finally,the softwareisdemonstratedonvariousbenchmarkoptimalcontrolproblems,followedbya discussionofthecapabilitiesandpotentiallimitationsof CGPOPS 23

PAGE 24

Thisdissertationisorganizedasfollows.Chapter2describesthemathematical backgroundnecessarytounderstandtheconceptsofoptimalcontrol.Anonlinearoptimal controlproblemisdenedandthecontinuousrst-ordernecessaryconditionsforthis problemdenitionarederived.Next,numericalmethodsforsolvingoptimalcontrol problemsarediscussedusingbothindirectanddirectmethods.Furthermore,three orthogonalcollocationmethodsaredescribed.Chapter3providesadetaileddescriptionof thestructureoftheLegendre-Gauss-Radauorthogonalcollocationmethodindierential formwhenappliedtoageneralmultiple-phaseoptimalcontrolproblem.Moreover,an ecientmethodtocomputetheNLPderivativefunctionsdirectlyfromthederivatives ofthecontinuousoptimalcontrolproblemfunctionsisdescribed.Chapter4provides acomparisonofthefouraforementionedderivativeestimationtechniquesintermsof theircomputationaleciencyforuseinsolvingoptimalcontrolproblemsusingdirect collocation.Chapter5providesmotivationforusingdiscontinuitydetectioninmesh renementanddescribestheaforementionednovelbang-bangmeshrenementmethod. Chapter6describesindetailthenewC++implementedgeneral-purposeoptimalcontrol problemsoftware CGPOPS .Finally,Chapter7providesasummaryofthecontributionsof thisresearchandpossibledirectionsofinterestforfuturework. 24

PAGE 25

CHAPTER2 MATHEMATICALBACKGROUND Therstobjectiveofthischapteristoprovideanoverviewoftypesofnumerical methodsthatcanbeemployedtosolveoptimalcontrolproblems.Numericalmethods forsolvingoptimalcontrolproblemsaredividedintotwocategories:indirectmethods anddirectmethods.Thekeyapproacheswithineachcategoryindirectanddirectof methodsaredescribed.Next,theparticularmethodologythatformsthebasisofthis thesisisdescribed.Specically,thefamilyofGaussianquadratureorthogonalcollocation methodsisdescribedindetail.ThisfamilyofmethodsincludesLegendre-Gauss, Legendre-Gauss-Radau,andLegendre-Gauss-Lobattoquadraturecollocation. Furthermore,afterdescribingtheorthogonalcollocationmethodsthatarisefromusing thesepoints,ajusticationisprovidedforusingLegendre-Gauss-Radaucollocationasthe basisofthemethodsdevelopedintheremainderofthisdissertation.Finally,thethird objectiveofthischapteristoprovideashortintroductiontonite-dimensionalnumerical optimization. 2.1BolzaOptimalControlProblem Thegoalofanoptimalcontrolproblemistodeterminethestateandcontrolalong withtheinitialandterminaltimethatoptimizeaspeciedperformanceindexsubject todynamicconstraints,pathconstraints,andboundaryconditions.Withoutloss ofgenerality,considerthefollowinggeneraloptimalcontrolprobleminBolzaform. Determinethestate y t 2 R n y andthecontrol u t 2 R n u onthedomain t 2 [ t 0 t f ] ,the initialtime t 0 ,andtheterminaltime t f thatminimizetheobjectivefunctional J = M y t 0 t 0 y t f t f + Z t f t 0 L y t u t t dt {1 subjecttothedynamicconstraints y d y dt = a y t u t t {2 25

PAGE 26

thepathconstraints c y t u t t 0 {3 andtheboundaryconditions b y t 0 t 0 y t f t f = 0 {4 wherethefunctions M L a c ,and b aredenedbythefollowingmappings: M : R n y R R n y R R L : 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 Historically,theBolzaproblemofEqs.2{1to2{4hasbeensolvedusingabranchof mathematicscalledcalculusofvariationstoobtainasetofrst-ordernecessaryconditions foroptimality[66,67,68].Asolutiontotheoptimalityconditionsiscalledanextremal solution,andsecond-orderconditionscanbecheckedtoverifythattheextremalsolution isaminimumormaximum.Forunconstrainedoptimizationproblemsthatdepend oncontinuousfunctionsoftime,therstvariation, J y t y t ,oftheobjective functional, J y t ,onanoptimalpath, y t ,vanishesforalladmissiblevariations, y t ,suchthat J y t y t =0. {5 Foraconstrainedoptimizationproblem,thecalculusofvariationsareappliedtoan augmentedobjectiveinordertoderivethecontinuous-timerst-ordernecessaryconditions neededtogenerateanextremalsolution.Byappendingtheconstraintstotheobjective 26

PAGE 27

functionalusingLagrangemultipliers,theaugmentedobjectiveisobtainedas J a = M y t 0 t 0 y t f t f )]TJ/F43 11.9552 Tf 11.955 0 Td [( T b y t 0 t 0 y t f t f + Z t f t 0 h L y t u t t )]TJ/F43 11.9552 Tf 11.955 0 Td [( T t y t )]TJ/F42 11.9552 Tf 11.956 0 Td [(a y t u t t )]TJ/F43 11.9552 Tf 20.456 0 Td [( T t c y t u t t i dt {6 where t 2 R n y t 2 R n c ,and 2 R n b aretheLagrangemultiplierscorresponding toEqs.2{2,2{3,and2{4,respectively.Thequantity t iscalledthecostateorthe adjoint.Settingtherstvariationof J a givenin2-6tozeroleadstoasetofrst-order optimalityconditions.Theserst-orderoptimalityconditionsaregivenas y T t = @ H @ = a T y t u t t T t = )]TJ/F23 11.9552 Tf 10.494 8.087 Td [(@ H @ y 0 = @ H @ u T t 0 = )]TJ/F23 11.9552 Tf 16.01 8.088 Td [(@ M @ y t 0 + T @ b @ y t 0 T t f = @ M @ y t f )]TJ/F43 11.9552 Tf 11.955 0 Td [( T @ b @ y t f H t 0 = @ M @ t 0 )]TJ/F43 11.9552 Tf 11.955 0 Td [( T @ b @ t 0 H t f = )]TJ/F23 11.9552 Tf 10.494 8.088 Td [(@ M @ t f + T @ b @ t f {7 where H y t u t t t = L y t u t t t + T t a y t u t t )]TJ/F43 11.9552 Tf 19.261 0 Td [( T t c y t u t t {8 istheaugmentedHamiltonian.Itisnotedthatthethefourththroughseventhequations inEq.2{7arecalledthetransversalityconditionsandareapplicablecomponent-wisewhen eitherthecorrespondingvariationinthestateattheinitialorterminaltimeortheinitial orterminaltimeitselfisnotzero.Furthermore,thefollowingcomplementaryslackness 27

PAGE 28

conditionsonthepathconstraintsmustbesatised: 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 {9 wherethenegativevalueof i t 0 when c i t =0 isinterpretedsuchthatimproving theobjectivecanonlybeachievedbyviolatingtheconstraint[67]. ThestrongformofPontryagin'sminimumprincipleisthattheoptimalcontrolis obtainedfrom 0 = @ H @ u {10 asshowninthethirdequationofEq.2{7.Whenthecontrolliesontheboundaryofthe feasiblecontrolset,however,theoptimalcontrolmustbedeterminedusingtheweakform ofPontryagin'sminimumprinciple.Theweakformis u t =argmin u 2U H y t u t t t {11 where U isthepermissiblesetofcontrols. Asetofnecessaryconditionsthatmustbesatisedforanextremalsolutionofan optimalcontrolproblemisdenedbytherst-orderoptimalityconditionsofEq.2{7. Theextremalsolutioncanthenbeveriedasadesiredminimumormaximumby implementingsecond-ordersuciencyconditions. 2.2NumericalMethodsforDierentialEquations Thedierentialequationsgoverninganoptimalcontrolproblemmustoftenbesolved usingnumericalmethods.Considertheinitial-valueproblemIVP, x t = f x t t x t 0 = x 0 {12 Furthermore,consideraninterval [ t i t i +1 ] overwhichthesolutiontothedierential equationofEq.2{12isdesired;thatis,giventhevalueofthestateat t i x t i x i ,itis desiredtoobtainthevalueofthestateat t i +1 x t i +1 x i +1 .Integratingthedierential 28

PAGE 29

equationofEq.2{12,thestateat t i +1 isobtainedas x i +1 = x i + Z t i +1 t i x t dt = x i + Z t i +1 t i f x t t dt {13 wheretheintegralappearinginEq.2{13iscomputedusingnumericalmethods.Numerical methodsforsolvingdierentialequationsfromaninitialstateasshowninEq.2{13fall intotwocategories:explicitsimulationandimplicitsimulation.Inanexplicitsimulation, oratime-marchingmethod,thesolutionateachsuccessivetimestepisobtainedusing thesolutionatthecurrentand/orprevioustimesteps.Alternatively,inanimplicit simulation,oracollocationmethod,thecontinuous-timeintervalofinterestisdiscretized atanitesetofgridpoints,andthesolutionatalldiscretizationpointsisthenobtained simultaneously. 2.2.1ExplicitSimulationTime-Marching Anexplicitsimulation,orequivalently,time-marchingmethod,forsolvingdierential equationsobtainasolutionateachsuccessivetimestepbyusinginformationofthe solutionatthecurrentand/orprevioustimesteps.Time-marchingmethodsaredivided intotwocategories:multiple-stepmethods,andmultiple-stagemethods. Multiple-stepmethodsfortime-marchingobtainthesolutionateachsuccessivetime step t k +1 byusingtheinformationatthecurrentand/orprevioustimesteps t k )]TJ/F38 7.9701 Tf 6.587 0 Td [(j ,..., t k where j +1 isthenumberofstepsused.Thesimplestmultiple-stepmethodisasingle-step methodinwhichjustthesolutionatthecurrenttimestep, t k ,isused.Themostcommon explicitsingle-stepmethodistheEulerforwardmethod,givenas x k +1 = x k + h k f x k t k {14 where x k x t k .Themostcommonexplicitmultiple-stepmethodisthe Adams-Bashforthmethod,wherethethree-stepAdams-Bashforthmethodisgiven as x k +1 = x k + h k 23 12 f x k t k )]TJ/F20 11.9552 Tf 13.151 8.087 Td [(16 12 f x k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 t k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 + 5 12 f x k )]TJ/F21 7.9701 Tf 6.587 0 Td [(2 t k )]TJ/F21 7.9701 Tf 6.587 0 Td [(2 {15 29

PAGE 30

Implicitmultiple-stepmethodsarealsousedfortime-marching.Themostcommon implicitsingle-stepmethodsaretheEulerbackwardandCrank-Nicolsonmethods,givenas x k +1 = x k + h k f x k +1 t k +1 {16 and x k +1 = x k + h k 2 f x k t k + f x k +1 t k +1 {17 respectively.Themostcommonimplicitmultiple-stepmethodistheAdams-Moulton method,wherethethird-orderAdams-Moultonmethodisgivenas x k +1 = x k + h k 5 12 f x k +1 t k +1 + 2 3 f x k t k + 1 12 f x k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 t k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 {18 ByinspectionofEqs.2{14to2{18,itisobservedthatthedesiredvalueof x k +1 appears implicitlyontheright-handsideoftheformulasfortheimplicitmethodsofEqs.2{16 to2{18hencethename,while x k +1 doesnotappearontheright-handsideofthe formulasfortheexplicitmethodsEqs.2{14and2{15.Inordertoimplementtheimplicit methods,apredictor-correctorschemeisemployedwherethevalueofthestateat t k +1 is predictedusinganexplicitformula,andthenacorrectionfor x k +1 iscomputedusingthe implicitformula.Althoughimplicitmethodsaremorestablethanexplicitmethods[69], implicitmethodsrequiremorecomputationateachstepduetotheneedtoimplementa predictor-correctorschemewhenbeingusedforatime-marchingmethodapplication. Multiple-stagemethodsfortime-marchingobtainthesolutionateachsuccessivetime stepusinginformationatthecurrenttimestepandanapproximationtotheintegralof thedynamicsacrossthestep.Supposetheintervalacrossthestep [ t i t i +1 ] isdividedinto K subintervals [ j j +1 ] where j = t i + h i j j =1,..., K h i = t i +1 )]TJ/F37 11.9552 Tf 11.956 0 Td [(t i {19 30

PAGE 31

and 0 j 1, j =1,..., K .Eachvalueof j iscalledastage.Theintegralfrom t i to t i +1 canthenbeapproximatedviaaquadratureas Z t i +1 t i f x t t dt h i K X j =1 j f x j j {20 where x j x j .ItisseenfromEq.2{20thatthevaluesofthestateateachstageare requiredinordertocomputethequadratureapproximation.Theintermediatevaluesof x j j =1,..., K areobtainedusing x j )]TJ/F42 11.9552 Tf 11.955 0 Td [(x t i = Z j t i f x t t dt h i K X l =1 jl f x l l {21 CombiningEqs.2{20and2{21,thefamilyof K -stageRunge-Kuttamethods[5,70,71,72, 73,74,75]areobtainedas Z t i +1 t i f x t t dt h i K X l =1 j f ij f ij = f x i + h i K X l =1 jl f il t i + h i j {22 wherethevaluesof j j ,and jl for j l =1,..., K arecapturedsuccinctlyinthe well-knownButcherarrays[72,73], 1 11 1 K . . . . . . K K 1 KK 1 K Usingtheaforementioneddenitionsofexplicitandimplicitmethods,aRunge-Kutta methodisexplicitifitsassociatedButcherarrayhas jl =0 forall j l thatis,itis lowertriangular,andisimplicitotherwise.Theapproximationat t i +1 iscomputedusing informationpriorto t i +1 whenemployinganexplicitRunge-Kuttamethod,whereasan implicitRunge-Kuttamethodrequires x t i +1 inordertodeterminetheapproximation at t i +1 .ThuswhenanimplicitRunge-Kuttamethodisemployed,apredictor-corrector schemeisimplementedassimilarlydescribedfortheimplicitmultiple-stepmethods. 31

PAGE 32

Asitturnsout,theEulerforward,Eulerbackward,andCrank-Nicolsonsingle-step methodsofEqs.2{14,2{16,and2{17,respectively,arealsorst-orderRunge-Kutta methods.Typically,higher-orderRunge-Kuttamethodsareemployed.Themost well-knownhigher-ordermethodistheclassicalRunge-Kuttamethod,givenas k 1 = f i k 2 = f x i + h i 2 k 1 t i + h i 2 k 3 = f x i + h i 2 k 2 t i + h i 2 k 4 = f x i + h i k 3 t i + h i x i +1 = x i + h i 6 k 1 + k 2 + k 3 + k 4 {23 where f i f x i t i ,andEq.2{23isanexplicitfourth-ordermethod.Anotherhigher-order Runge-KuttamethodistheHermite-Simpsonmethod,givenas x = 1 2 x i + x i +1 + h i 8 f i )]TJ/F42 11.9552 Tf 11.955 0 Td [(f i +1 f = f x t i + h i 2 x i +1 = x i + h i 6 )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(f i +4 f + f i +1 {24 whereEq.2{24isanimplicitthird-ordermethod.TheButcherarraysforthecommonly usedRunge-KuttamethodsofEqs.2{14,2{16,2{17,2{23,and2{24areshownin Fig.2-1. 2.2.2ImplicitSimulationCollocation Animplicitsimulation,orequivalently,collocation,forsolvingdierentialequations istheprocessbywhichthetimeintervalofinterestisdiscretizedatasetofnodes,and thesolutionisthenobtainedsimultaneouslyatallthenodes.Specically,collocation isemployedbybreakingthetimeintervalofinterest [ t i t i +1 ] into K subintervals S k = [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k ] suchthat t i = T 0 < T 1 < ... < T K )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 < T K = t i +1 .Thecontinuous-time intervalisthendiscretizedatthe T k k =0,..., K nodeswhichdenethesubintervals S k k 2f 1,..., K g .Next,thestateisapproximatedusingapiecewisepolynomial 32

PAGE 33

0 0 1 aEulerforward 1 1 1 bEulerbackward 0 00 1 1 = 21 = 2 1 = 21 = 2 cCrank-Nicolson 0 0000 1 = 2 1 = 2000 1 = 2 01 = 200 1 0010 1 = 61 = 31 = 31 = 6 dClassicalRunge-Kutta 0 000 1 = 2 5 = 241 = 3 )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 = 24 1 1 = 62 = 31 = 6 1 = 62 = 31 = 6 eHermite-Simpson Figure2-1.Butcherarraysforcommonsingle-stageandmultiple-stagemethodsforsolving initial-valueproblems. consistingofknownbasisortrialfunctionsmultipliedbyunknowncoecientswhich interpolatesthevaluesofthestateatthe K +1 nodes.Additionally,thedierential equationasshowninEq.2{12iscollocatedatthe k =0,..., K )]TJ/F20 11.9552 Tf 11.955 0 Td [(1 nodessuchthat x k = x k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 + X x k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 x k h k h k = T k )]TJ/F37 11.9552 Tf 11.955 0 Td [(T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 k =1,..., K {25 where X x k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 x k h k isaquadraturemethodforapproximatingtheintegrationof thedierentialequationovereachinterval S k k 2f 1,..., K g .Asolutiontothe dierentialequationisthenobtainedbysatisfyingthecollocationconditionsofEq.2{25 viadeterminationoftheunknowncoecientsdeningtheinterpolatingpolynomials usedtoapproximatethestate.Thesecoecientsaresolvedforsimultaneouslyatall K collocationpointsinordertoobtainasolutiontothedierentialequation. UponinspectionofEq.2{22,Runge-Kuttamethodscanbethoughtofaseither atime-marchingmethodorcollocation.WhenaRunge-Kuttamethodisappliedas collocation,thedierentialequationsaresaidtobesolvedforsimultaneouslybecause thesolutionisobtainedforallunknownparametersatthesametime.Additionally,the solutionofthestateissaidtobeimplicitlysimulatedbecausethevaluesofthestateat eachnodearedeterminedatthesametime.Ontheotherhand,whenaRunge-Kutta methodisappliedasatime-marchingmethod,thesolutionisobtainedateachtimestep 33

PAGE 34

sequentially.Furthermore,akeydierencebetweenimplicitandexplicitsimulationis thatwhenusingcollocation,itisnotnecessarytoimplementapredictor-correctorscheme becausethesolutionofthestateisobtainedatalltimestepsnodesatsimultaneously. 2.3NumericalMethodsforOptimalControl Analyticsolutionstooptimalcontrolproblemsareoftendicult,ifnotimpossible, toobtain.Moreover,withincreasingcomplexityoftheoptimalcontrolproblem,nding solutionsusinganalyticalmethodsbecomesintractableorananalyticsolutionmaynot evenexist.Asaresult,almostalloptimalcontrolproblemsmustbesolvednumerically. Numericalmethodsforsolvingoptimalcontrolproblemsfallintooneofthefollowing twocategories:indirectmethodsanddirectmethods.Inanindirectmethod,the calculusofvariationsisemployedtoderivetherst-orderoptimalityconditionsof Eqs.2{7and2{9.Furthermore,anextremalsolutionisobtainedbysatisfyingthe derivedrst-orderoptimalityconditions.Inadirectmethod,thecontrolorthestate andthecontrolareparameterizedusinganappropriatebasisofapproximationfunctions forexample,apolynomialapproximationorpiecewiseconstantparameterization. Additionally,anobjectivefunctionisusedtoapproximatetheobjectivefunctionalof thecontinuous-timeproblem.Thecoecientsofthefunctionapproximationsarethen treatedasoptimizationvariables,eectivelytranscribingtheoptimalcontrolprobleminto anumericaloptimizationproblem. 2.3.1IndirectMethods Inanindirectmethod,thecalculusofvariationsisemployedtoobtaintherst-order optimalityconditionsshowninEqs.2{7and2{9.Theseconditionsresultinatwo-point or,inthecaseofacomplexproblem,amulti-pointboundary-valueproblem,alsoknown asaHamiltonianboundary-valueproblemHBVP.Anindirectmethodhasthefeature thatboththestateandcostateareobtainedaspartofthesolution.Asaresult,the proximityofthesolutiontotheHBVPtoanextremalsolutioncanbeveried.The disadvantageofanindirectmethodisthatitisoftenextremelydiculttosolvethe 34

PAGE 35

HBVP,particularlyforproblemswherethedynamicschangequicklyrelativetothetime intervalofinterestorforproblemswithinteriorpointconstraints. 2.3.1.1IndirectShooting ConsiderthefollowingHBVPthatresultsfromtherst-orderoptimalityconditionsof Eq.2{7, p t = 2 6 4 H T H T y 3 7 5 = g p t t {26 withtheboundaryconditions b p t 0 t 0 p t f t f = 0 {27 whereEq.2{27isdeterminedbythespeciedvaluesofthestateattheinitialand terminaltimesaswellastheactivetransversalityconditionsfromEq.2{7.Therst-order optimalityconditionsofEq.2{7donotprovidethecompletesetofboundaryconditions fortheinitialandterminalvaluesofthestateand/orcostate.Therefore,inorderto obtainasolutiontotheHBVP,aninitialguessforthestateandcostateat t 0 ,denoted p 0 ismadeandthedierentialequationofEq.2{26issolvedviaatime-marchingmethod from t 0 to t f inordertodeterminetheresultingvaluesofthestateandcostateat t f denoted p f ,asisdescribedinSection2.2.1.Aniterativeprocessisthenimplemented wherethe p 0 t 0 ,and t f areupdatedandthedierentialequationsaresolved.Thevalue of p 0 thatproducesavalue p f suchthat b p 0 t 0 p t t f iswithinaspeciedtolerance fromzeroisthenconsideredtobeanapproximationofanextremalsolution.Inessence, ashootingmethodisaroot-ndingmethodwheretheboundaryconditionfunctionof Eq.2{27isthefunctionwhoserootisobtained.Becausethesolutionobtainedfromthe HBVPsatisestherst-orderoptimalityconditionsofEq.2{7towithinaspecied tolerance,theproximityofthesolutionobtainedfromindirectshootingtoanextremal solutioncanbeveried. 35

PAGE 36

Althoughindirectshootingappearstobeasimpleapproachthatleadstoa low-dimensionalroot-ndingproblem,itcanbediculttoimplementinpractice.First, itisrequiredthattherst-orderoptimalityconditionsoftheoptimalcontrolproblem bederived,whichcanbeaverydicultprocess.Second,providinganinitialguess forunknownvaluesoftheproblemcanbedicult,asthevaluesofthecostateatthe boundaryconditionsareoftennon-intuitive.Finally,theerrorfromnumericalintegration cangrowrapidlyduetothedynamicschangingrapidlywithinthetimeintervalofinterest orintegratingoveralongtimespan[76]. 2.3.1.2IndirectMultiple-Shooting Considerthefollowingboundary-valueproblemthatresultsfromtherst-order optimalityconditionsofEq.2{7, p t = 2 6 4 H T H T y 3 7 5 = g p t t {28 withtheboundaryconditions b p t 0 t 0 p t f t f = 0 {29 whereEq.2{27isdeterminedbythespeciedvaluesofthestateattheinitialand terminaltimesaswellastheactivetransversalityconditionsfromEq.2{7forthecostate. Itisapparentthattherst-orderoptimalityconditionsofEq.2{7donotprovidethe completesetofboundaryconditionsfortheinitialandterminalvaluesofthestateand/or costate.InordertoobtainasolutiontotheHBVP,thetimedomainisdividedinto K intervals,wherethe k th intervalisonthedomain [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k ] suchthat t 0 = T 0 < T 1 < ... < T K = t f .Aninitialguessforthestateandcostateat T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 ,denoted p )]TJ/F38 7.9701 Tf 0 -8.277 Td [(k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 k =1,..., K ismadeandthedierentialequationofEq.2{26issolvedviaa time-marchingmethodfrom T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 to T k inordertodeterminetheresultingvaluesofthe stateandcostateat T k ,denoted p + k k =1,..., K ,asisdescribedinSection2.2.1. 36

PAGE 37

AsolutionfortheHBVPisthusobtainedbymeansoftherooting-ndingproblem b p )]TJ/F21 7.9701 Tf 0 -7.973 Td [(0 t 0 p + K t f = 0 with p )]TJ/F38 7.9701 Tf 0 -8.278 Td [(k )]TJ/F42 11.9552 Tf 12.132 0 Td [(p + k = 0 k =1,..., K )]TJ/F20 11.9552 Tf 12.131 0 Td [(1 .Itisnotedthatthecondition p )]TJ/F38 7.9701 Tf 0 -8.278 Td [(k )]TJ/F42 11.9552 Tf 12.445 0 Td [(p + k = 0 isincludedinordertoenforcecontinuityinthestateandcostatebetween adjacentintervals.BecausethesolutionobtainedfromtheHBVPsatisestherst-order optimalityconditionsofEq.2{7towithinaspeciedtolerance,theproximityofthe solutionobtainedfromindirectmultiple-shootingtoanextremalsolutioncanbeveried. Likeindirectshooting,indirectmultiple-shootingrequiresthattherst-order optimalityconditionsbederived.Unlikeindirectshooting,however,theintegration forindirectmultiple-shootingisperformedoversubintervalsoftheoriginaldomain. Moreover,morevariablesandconstraintsarisefromusingindirectmultiple-shootingthan indirectshooting.Despiteseemingmoredicultduetothelargerproblemsize,indirect multiple-shootingactuallyhasseveraladvantagesoverindirectshooting.Becausethe integrationisperformedoversubintervalsasopposedtoovertheentiretimeintervalas isthecasewithindirectshooting,instabilitiesinthedynamicsarenotallowedtogrow assignicantlyaswouldbethecaseifindirectshootingisused.Furthermore,thesmaller intervalsemployedcanalsobetterhandledynamicsthathavemultipletime-scales,thus increasingthesetofproblemsthatcanbesolved. 2.3.1.3IndirectCollocation Considerthefollowingboundary-valueproblemthatresultsfromtherst-order optimalityconditionsofEq.2{7, p t = 2 6 4 H T H T y 3 7 5 = g p t t {30 withtheboundaryconditions b p t 0 t 0 p t f t f = 0 {31 37

PAGE 38

whereEq.2{31isdeterminedbythespeciedvaluesofthestateattheinitialand terminaltimesaswellastheactivetransversalityconditionsfromEq.2{7.Itisimportant tonotethattherst-orderoptimalityconditionsofEq.2{7donotprovideafullsetof initialorterminalconditionsforthestateandcostatethatis,thefullstateandfull costatearenotknownatoneoftheendpoints.Usingindirectcollocation,thetrajectory p t isdiscretizedatanitesetofnodesasdescribedinSection2.2.2suchthatan implicitsimulationisusedtosolvethedierentialequationsforthestateandcostate ateachofthediscretizationpointssimultaneous.Theunknownvaluesoftheinitial andterminalstatealongwiththeunknowncoecientsdeningthestateandcostate approximationsaredeterminediterativelytosatisfythecollocationconditionsofEq.2{25 andtheboundaryconditionsofEq.2{31towithinaspeciedtolerance.Becausethe solutionobtainedfromtheHBVPsatisestherst-orderoptimalityconditionsofEq.2{7 towithinaspeciedtolerance,theproximityofthesolutionobtainedfromindirect collocationtoanextremalsolutioncanbeveried. Likeindirectshootingandindirectmultiple-shooting,indirectcollocationstill requiresthattherst-orderoptimalityconditionsbederived.Unlikeindirectshooting orindirectmultiple-shooting,animplicitsimulationofthepathtrajectoryisperformed. Moreover,morevariablesandconstraintsoftenarisefromusingindirectcollocationthan indirectshootingorindirectmultiple-shootinginordertoappropriatelyapproximate thesolutionusingthebasisfunctions.Furthermore,theresultsobtainedusingindirect collocationmaybelessaccuratethanthoseobtainedusinganindirectshootingorindirect multiple-shootingmethoddependingontheappropriatenessofthebasisfunctionsandset ofcollocationpointsusedtoapproximatethesolution. 2.3.2DirectMethods Itisoftendiculttoformulatetherst-orderoptimalityconditionsofEq.2{7. Moreover,anaccurateinitialguessthatcanoftenbenon-intuitiveisgenerallyrequired inordertousenumericalmethodsthatsolvetheseequationsindirectmethods.For 38

PAGE 39

thesereasons,directmethodshavebecomeaverypopularalternativetoindirectmethods. Insteadofformulatingasetofoptimalityconditionsasisdonewhenusingindirect methods,directmethodstranscribetheinnite-dimensionaloptimalcontrolprobleminto anite-dimensionaloptimizationproblemwithalgebraicconstraints.Therearethree fundamentalstepstoadirecttranscriptionmethod[21]: Step1: Convertthedynamicsystemintoaproblemwithanitesetofvariablesand algebraicconstraints. Step2: Solvethenite-dimensionalproblemusingaparameteroptimizationmethod. Step3: Determinetheaccuracyofthenite-dimensionalapproximationandif necessaryrepeatthetranscriptionandoptimizationsteps. Thesizeofthenonlinearoptimizationproblem[ornonlinearprogrammingproblem NLP]canberathersmallforexample,whenusingdirectshootingormaybequite largeforexample,whenusingdirectcollocationdependinguponthetypeofdirect methodemployed.AlthoughsolvingthelargerNLPresultingfromadirectmethod seemsintuitivelylessdesirablethansolvingtheHBVPofanindirectmethod,inpractice, theNLPcanbeeasiertosolveanddoesnotrequireasaccurateofaninitialguess. Additionally,severalpowerfulandwellknownNLPsolversexistsuchas SNOPT [1,52], IPOPT [2],and KNITRO [3]. Indirectmethods,thereisnoneedtodiscretizeandapproximatethecostatethat appearswhenusingindirectmethods.However,informationfromanaccuratecostate estimationcanhelpvalidatetheoptimalityofasolutionacquiredfromadirectapproach. Consequently,producingacostateapproximationbasedontheNLPLagrangemultipliers involvedinthenite-dimensionalnonlinearoptimizationproblemisoftenperformedwhen usingadirectmethod. 39

PAGE 40

2.3.2.1DirectShooting Inthedirectshootingmethod,thecontrolisparameterizedusingaspecied functionaloftheform ~ u t = p X i =1 i i t {32 where 1 ,..., p isthesetofcontrolparameters,and 1 t ,..., p t isasetofbasis ortrialfunctions.TheBolzaproblemofEqs.2{1to2{4isthentransformedtohavethe followingform.Minimizethecost J = M y 0 t 0 y f t f + Z t f t 0 L y t ,~ u t t dt {33 subjecttotheboundaryconditions b y 0 t 0 y f t f = 0 {34 wherethestateattheinitialandterminaltimesareapproximatedusing y 0 and y f respectively.Theunknowncomponentsoftheinitialstateapproximation, y 0 ,andthe unknownscoecients, 1 ,..., p ,ofthecontrolparameterizationarethendetermined bydirectlyminimizingtheobjectivefunctionofEq.2{33whilesatisfyingtheboundary conditionsofEq.2{34,wheretheterminalstateapproximation, y f ,isobtainedusinga time-marchingmethodasdescribedinSection2.2.1,andtheintegraloftheobjectivecost iscomputedusingaquadratureapproximation. 2.3.2.2MultipleDirectShooting Bydividingthetimedomaininto K multipletimeintervalswhereeachtimeinterval isonthedomain S k =[ T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T k ], k =1,..., K and t 0 = T 0 < T 1 < ... < T K = t f andthenapplyingthedirectshootingtechniqueineachofthe K intervals,themethod ofmultipledirectshootingisperformed.Thecontrolisparameterizedusingaspecied functionaloftheform ~ u k t = p k X i =1 k i k i t k =1,..., K {35 40

PAGE 41

where k 1 ,..., k p k isthesetofcontrolparameters,and k 1 t ,..., k p k t areaset ofbasisortrialfunctionsininterval k .TheBolzaproblemofEqs.2{1to2{4isthen transformedtohavethefollowingform.Minimizethecost J = M y )]TJ/F21 7.9701 Tf -0.182 -7.973 Td [(0 t 0 y + K t f + K X k =1 Z T k T k )]TJ/F21 5.9776 Tf 5.756 0 Td [(1 L y k t ,~ u k t t dt {36 subjecttotheboundaryconditions b y )]TJ/F21 7.9701 Tf -0.182 -7.973 Td [(0 t 0 y + K t f = 0 {37 andthecontinuityconstraints y + k = y )]TJ/F38 7.9701 Tf -0.183 -8.278 Td [(k k =1,..., K )]TJ/F20 11.9552 Tf 11.955 0 Td [(1, {38 wherethevalueofthestateatthetimesdeningthebeginningoftheintervals S k k = 1,..., K ,areapproximatedusingthevariables y )]TJ/F38 7.9701 Tf -0.182 -8.278 Td [(k k =0,..., K )]TJ/F20 11.9552 Tf 12.253 0 Td [(1 ,andthevalueofthe stateatthetimesdeningtheendoftheintervals S k k =1,..., K ,areapproximated usingthevariables y + k k =1,..., K .Furthermore,thevariables y + k k =1,..., K areobtainedbyusingatime-marchingmethodtosolvethedierentialequationineach interval S k k =1,..., K for y )]TJ/F38 7.9701 Tf -0.183 -8.278 Td [(k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 astheinitialcondition.Thesolutionisthenfoundby determiningtheunknownvariablesofthestateapproximation, y )]TJ/F38 7.9701 Tf -0.183 -8.278 Td [(k k =0,..., K )]TJ/F20 11.9552 Tf 12.165 0 Td [(1 ,and theunknowncoecients, k 1 ,..., k p k k =1,..., K ,ofthecontrolparameterization thatminimizetheobjectivefunctionofEq.2{36whilesatisfyingtheboundaryconditions andcontinuityconstraintsofEq.2{37andEq.2{38,respectively,wheretheintegralsof theobjectivecostareobtainedusingaquadratureapproximation. 2.3.2.3DirectCollocation Indirectcollocationmethods,boththestateandcontrolareparameterized,and thesolutionisobtainedusinganimplicitsimulationasdescribedinSection2.2.2.This classofnumericalmethodsforoptimalcontrolhasbecomeverypopularoverthelastfew decadesasaresultoftheimprovementandavailabilityoflargescaleNLPsolvers.Ina 41

PAGE 42

directcollocationmethod,aspeciedfunctionalformisusedtoapproximateboththe stateandcontrol,wherethetwomostcommonformsarelocalcollocationandglobal collocation.Inlocalcollocationmethods,thetimedomainisdividedinto K multipletime intervalssimilartomultipledirectshootingwhereeachtimeintervalisonthedomain [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k ], k =1,..., K and t 0 = T 0 < T 1 < < T K = t f .Moreover,afunctional approximationisappliedtothestateandcontrolineachofthe K intervals.Forglobal collocationmethods,afunctionalapproximationtoboththestateandcontrolisapplied overtheentiredomain.Additionally,localcollocationmethodstypicallyusealoworder functionalapproximationineachintervalovermanyintervalswhileglobalcollocation methodsuseamuchhigherorderfunctionalapproximationoverasingleinterval.In Section2.4,aspecicclassofdirectcollocationmethodscalledorthogonalcollocation methodsisdescribedindetailwherethecollocationisperformedatasetoforthogonal Gaussian-quadraturepoints. 2.4FamilyofLegendre-GaussDirectCollocationMethods Inthissection,adetaileddescriptionofdirectcollocationmethodsusing Legendre-Gauss-LobattoLGL,Legendre-GaussLG,andLegendre-Gauss-Radau LGRpointsisprovided.TherstapproachusingLGLcollocationisreferredtoas theLegendre-Gauss-Lobattocollocationmethod,whilethesecondapproachusingLG collocationiscalledtheLegendre-Gausscollocationmethod,andthethirdapproach usingLGRcollocationiscalledtheLegendre-Gauss-Radaucollocationmethod. Itisnotedthatonlythesingle-intervalformulationforthethreeaforementioned Gaussian-quadraturecollocationmethodsisdescribedinthissection.Adetailed descriptionofthemultiple-intervalformulationforGaussian-quadraturecollocation whichisusedwhenimplementing hp -adaptivemethodsispresentedinChapter3. 2.4.1TransformedContinuousBolzaProblem TheBolzaproblemofEqs.2{1to2{4isdenedonthetimehorizon t 2 [ t 0 t f ] wheretimeistheindependentvariable.Withoutlossofgenerality,itisusefultoredene 42

PAGE 43

theBolzaproblemsothattheindependentvariableiscontainedonaxeddomainby mapping t toanewindependentvariable 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1] viatheanetransformation t t 0 t f = 2 t t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 + t f + t 0 t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 {39 UsingEq.2{39theBolzaproblemofEqs.2{1to2{4canberedenedasfollows. Determinethestate y 2 R n y ,thecontrol u 2 R n u ,theinitialtime t 0 ,andthe terminaltime t f thatminimizetheobjectivefunctional J = M y )]TJ/F20 11.9552 Tf 9.299 0 Td [(1, t 0 y +1, t f + t f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t 0 2 Z +1 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 L y u t t 0 t f d {40 subjecttothedynamicconstraints d y d = t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a y u t t 0 t f {41 theinequalitypathconstraints c y u t t 0 t f 0 {42 andtheboundaryconditions b y )]TJ/F20 11.9552 Tf 9.298 0 Td [(1, t 0 y +1, t f = 0 {43 TheoptimalcontrolproblemofEqs.2{40to2{43willbereferredtoasthetransformed continuousBolzaproblem.Itisnotedthatthedomain 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] canbetransformed backtothetimehorizon t 2 [ t 0 t f ] viatheanetransformation t t t 0 t f = t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 + t f + t 0 2 {44 2.4.2LG,LGR,andLGLCollocationPoints TheLegendre-GaussLG,Legendre-Gauss-RadauLGR,and Legendre-Gauss-LobattoLGLcollocationpointslieontheopeninterval 2 )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1 thehalfopeninterval 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1 or 2 )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] ,andtheclosedinterval 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1] 43

PAGE 44

respectively.Fig.2-2depictsthesethreesetsofcollocationpointswhereitisseenthatthe LGpointscontainneither )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 or 1 ,theLGRpointscontainonlythepoint )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 or 1 ,and theLGLpointscontainboth )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 and 1 .Denoting N asthenumberofcollocationpoints and P N asthe N th -degreeLegendrepolynomialdenedas P N = 1 2 N N d N d N 2 )]TJ/F20 11.9552 Tf 11.956 0 Td [(1 N {45 theLGpointsaretherootsof P N ,theLGRpointsaretherootsof P N )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 + P N andtheLGLpointsaretherootsof P N )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 togetherwiththepoints-1and1.The polynomialswhoserootsaretherespectivepointsaresummarizedasfollows: LG:Rootsobtainedfrom P N LGR:Rootsobtainedfrom P N )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 + P N LGL:Rootsobtainedfrom P N )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 togetherwiththepoints-1and1. FromFig.2-2,itisseenthattheLGandLGLpointsaresymmetricabouttheorigin Figure2-2.SchematicshowingLGL,LGR,andLGorthogonalcollocationpoints. whereastheLGRpointsareasymmetric.Additionally,theLGRpointsarenotunique 44

PAGE 45

inthattwosetsofpointsexistoneincludingthepoint )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 andtheotherincludingthe point 1 .TheLGRpointsthatincludetheterminalendpointat1areoftencalledthe ippedLGRpoints;thisdissertation,however,focusesonthestandardsetofLGRpoints includesinitialendpointat )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 2.4.3Legendre-Gauss-LobattoOrthogonalCollocationMethod UsingtheLegendre-Gauss-Lobattoorthogonalcollocationmethod,both collocationandinterpolationareperformedattheLGLpoints.Thestateinthe Legendre-Gauss-Lobattocollocationmethodisapproximatedas y Y = N X i =1 Y i ` i {46 wherethebasisofLagrangepolynomials ` i i =1,..., N aredenedas ` i = N Y j =1 j 6 = i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j {47 Thederivativeofthestateisthenapproximatedas d y d d Y d = N X i =1 Y i d ` i d {48 TheapproximationtothederivativeofthestategiveninEq.2{48isthenappliedatthe N LGLcollocationpoints 1 ,..., N as d y j d d Y j d = N X i =1 Y i d ` i j d = N X i =1 Y i D LGL ji j =1,..., N {49 where D LGL ji j i =1,..., N isthe N N Legendre-Gauss-Lobattocollocationmethod dierentiationmatrix.Furthermore,itisnotedthattheLegendre-Gauss-Lobatto collocationmethoddierentiationmatrixissingular.Asaresultofthe Legendre-Gauss-Lobattocollocationmethoddierentiationmatrixbeingsingular,there isnoequivalentintegralformfortheLegendre-Gauss-Lobattocollocationmethod.The 45

PAGE 46

continuous-timedynamicsgiveninEq.2{41arethencollocatedatthe N LGLpointsas N X i =1 Y i D LGL ji )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y j U j t j t 0 t f = 0 j =1,..., N {50 where U j istheparameterizationofthecontrolatthe j th collocationpoint j =1,..., N Next,aGauss-Lobattoquadratureisusedtoapproximatethecontinuous-timeobjective functionalas JM Y 1 t 0 Y N t f + t f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t 0 2 N X i =1 w LGL i L Y i U i t i t 0 t f {51 where w LGL i i =1,..., N aretheLGLweightsateachcollocationpoint.Thepath constraintsarethenapproximatedatthe N LGLcollocationpointsas c Y i U i t i t 0 t f 0 i =1,..., N {52 Finally,thecontinuous-timeboundaryconditionsareapproximatedas b Y 1 t 0 Y N t f = 0 {53 ItisnotedthattheresultingnonlinearprogrammingproblemofEqs.2{50to2{53isfor thesingle-intervalformulation.Adetaileddescriptionofthemultiple-intervalformulation whenapplyingGaussian-quadratureforimplicitsimulationisgiveninChapter3. 2.4.4Legendre-GaussOrthogonalCollocationMethod IntheLegendre-Gaussorthogonalcollocationmethod,collocationisperformedatthe LGpoints,whileinterpolationisperformedattheLGpointsandtheinitialpoint 0 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 .Additionally,thesupportpoint N +1 =1 isaddedinordertoenforcetheboundary conditions.ThestateintheLegendre-Gausscollocationmethodisapproximatedas y Y = N X i =0 Y i ` i {54 46

PAGE 47

wheretheLagrangepolynomials ` i i =0,..., N aredenedas ` i = N Y j =0 j 6 = i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j {55 Thederivativeofthestateisthenapproximatedas d y d d Y d = N X i =0 Y i d ` i d {56 TheapproximationtothederivativeofthestategiveninEq.2{56isthenappliedatthe N LGcollocationpoints 1 ,..., N as d y j d d Y j d = N X i =0 Y i d ` i j d = N X i =0 Y i D LG ji j =1,..., N {57 where D LG ji j =1,..., N ; i =0,..., N isthe N [ N +1] Legendre-Gausscollocation methoddierentiationmatrix.Becausethestateisapproximatedusingadierent setofpointsthanareusedtocollocatethedynamics,theLegendre-Gausscollocation methoddierentiationmatrixisnotsquareithasmorecolumnsthanrows,unlikethe Legendre-Gauss-Lobattocollocationmethoddierentiationmatrixasquarematrix. Concurrently,theLegendre-Gausscollocationmethodcanbewritteninanequivalent integralformasfollows.Usingthedenitions Y i = Y i i =0,..., N Y i = Y i i =1,..., N {58 thederivativeofthestateapproximation, Y ,canbeinterpolatedexactlybythe Lagrangepolynomials ` y j as d Y d = Y = N X j =1 Y j ` y j {59 47

PAGE 48

Integrating Y from )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 to i ,thevalueofthestateatthe i th collocationpointis obtainedas Y i = Y 0 + N X j =1 Y j A ij {60 where A ij = Z i )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 ` y j d i =1,..., N {61 UtilizingthenotationofEq.2{58,Eq.2{60canbewrittenas Y i = Y 0 + )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(A Y i {62 where Y isamatrixwhoserowsaremadeupof Y i i =1,..., N ,and )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(A Y i isthe i th row ofthematrix A Y .Next,Eq.2{57canbewrittenas Y = D LG Y {63 where Y isamatrixwhoserowsaremadeupof Y i i =0,..., N .RewritingEq.2{63as Y = D LG 0 Y 0 + D LG 1: N Y 1: N {64 suchthat D LG 0 istherstcolumnof D LG D LG 1: N arethesecondthrough N +1 columnsof D LG ,Eq.2{63canthenbemultipliedby D LG 1: N )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 toobtain Y 1: N = 1Y 0 + D LG 1: N )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 Y {65 wherethepropertyof D LG 1: N )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 D 0 = )]TJ/F42 11.9552 Tf 9.299 0 Td [(1 isutilized.Finally,equatingEqs.2{62and Eq.2{65,itisseenthat A = D LG 1: N )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 {66 AlthoughtheLegendre-Gausscollocationmethodcanbewritteninboththeintegral anddierentialformsasshowninEqs.2{62andEq.2{65,itisoftenusefultousethe dierentialformduetotheelegantstructurethatresults.Inparticular,thedynamicsare 48

PAGE 49

collocatedatthe N LGpointsas N X i =0 Y i D LG ji )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y j U j t j t 0 t f = 0 j =1,..., N {67 Anadditionalvariable Y N +1 isthendenedviaGaussquadratureas Y N +1 Y 0 + t f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t 0 2 N X i =1 w LG i a Y i U i t i t 0 t f {68 inordertoaccountforboththeinitialandterminalpointsi.e.,theboundarypoints 0 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 and N +1 =1 .Additionally,aGaussquadratureisusedtoapproximatethe continuous-timeobjectivefunctionalas JM Y 0 t 0 Y N +1 t f + t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 N X i =1 w LG i L Y i U i t i t 0 t f {69 where w LG i i =1,..., N aretheLegendre-Gaussweightsateachcollocationpoint, andtheendpointobjectiveintheLegendre-Gausscollocationmethodisevaluatedatthe boundarypoints 0 = )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 and N +1 =1 .Thepathconstraintsarethenapproximatedat the N LGpointsas c Y i U i t i t 0 t f 0 i =1,..., N {70 Finally,similartothewaythattheendpointobjectiveisevaluatedattheboundary points,thecontinuous-timeboundaryconditionsarealsoapproximatedattheboundary pointsas b Y 0 t 0 Y N +1 t f = 0 {71 ItisnotedthattheresultingnonlinearprogrammingproblemofEqs.2{67to2{71isfor thesingle-intervalformulation.Adetaileddescriptionofthemultiple-intervalformulation whenapplyingGaussian-quadratureforimplicitsimulationisgiveninChapter3. 2.4.5Legendre-Gauss-RadauOrthogonalCollocationMethod IntheLegendre-Gauss-Radauorthogonalcollocationmethod,collocationisperformed attheLGRpoints,whileinterpolationisperformedattheLGRpointsandtheterminal 49

PAGE 50

non-collocatedpoint N +1 =1 .ThestateintheLegendre-Gauss-Radaucollocation methodisapproximatedas y Y = N +1 X i =1 Y i ` i {72 wheretheLagrangepolynomials ` i i =1,..., N +1, aredenedas ` i = N +1 Y j =1 j 6 = i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j i )]TJ/F23 11.9552 Tf 11.955 0 Td [( j {73 Thederivativeofthestateisthenapproximatedas d y d d Y d = N +1 X i =1 Y i d ` i d {74 TheapproximationtothederivativeofthestategiveninEq.2{74isthenappliedatthe N LGRcollocationpoints 1 ,..., N as d y j d d Y j d = N +1 X i =1 Y i d ` i j d = N +1 X i =1 Y i D LGR ji j =1,..., N {75 where D LGR ji j =1,..., N ; i =1,..., N +1, isthe N [ N +1] Legendre-Gauss-Radau collocationmethoddierentiationmatrix.ItisnotedthattheLegendre-Gauss-Radau collocationmethoddierentiationmatrixisnotsquareithasmorecolumnsthanrows becausethestateisapproximatedusingadierentsetofpointsthanareusedtocollocate thedynamics.Concurrently,theLegendre-Gausscollocationmethodcanbewritteninan equivalentintegralformasfollows.Usingthedenitions Y i = Y i i =1,..., N +1 Y i = Y i i =1,..., N {76 thederivativeofthestateapproximation, Y ,canbeinterpolatedexactlybythe Lagrangepolynomials ` y j as d Y d = Y = N X j =1 Y j ` y j {77 50

PAGE 51

Integrating Y from )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 to i ,thevalueofthestateatthe i th collocationpointis obtainedas Y i = Y 0 + N X j =1 Y j A ij {78 where A ij = Z i )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 ` y j d i =2,..., N +1. {79 UtilizingthenotationofEq.2{76,Eq.2{78canbewrittenas Y i = Y 0 + )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(A Y i {80 where Y isamatrixwhoserowsaremadeupof Y i i =1,..., N ,and )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(A Y i isthe i th row ofthematrix A Y .Next,Eq.2{75canbewrittenas Y = D LGR Y {81 where Y isamatrixwhoserowsaremadeupof Y i i =1,..., N +1 .RewritingEq.2{81 as Y = D LGR 1 Y 1 + D LGR 2: N +1 Y 2: N +1 {82 suchthat D LGR 1 istherstcolumnof D LGR and D LGR 2: N +1 arethesecondthrough N +1 columnsof D LG ,Eq.2{81canthenbemultipliedby D LG 2: N +1 )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 toobtain Y 2: N +1 = 1Y 0 + D LG 2: N +1 )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 Y {83 wherethepropertyof D LG 2: N +1 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 D 0 = )]TJ/F42 11.9552 Tf 9.298 0 Td [(1 isutilized.Finally,equatingEqs.2{80and Eq.2{83,itisseenthat A = D LG 2: N +1 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 {84 AlthoughtheLegendre-Gauss-Radaucollocationmethodcanbewritteninboththe integralanddierentialformsasshowninEqs.2{80andEq.2{83,itisoftenusefultouse thedierentialformduetotheelegantstructurethatresults.Inparticular,thedynamics 51

PAGE 52

arecollocatedatthe N LGRpointsas N +1 X i =1 Y i D LGR ji )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y j U j t j t 0 t f = 0 j =1,..., N {85 Next,aGauss-Radauquadratureisusedtoapproximatethecontinuous-timeobjective functionalas JM Y 1 t 0 Y N +1 t f + t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 N X i =1 w LGR i L Y i U i t i t 0 t f {86 whereitisnotedthattheendpointobjectiveintheLegendre-Gauss-Radaucollocation methodisevaluatedattheboundarypoints 1 = )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 and N +1 =1 .Thepathconstraints arethenapproximatedatthe N LGRpointsas c Y i U i t i t 0 t f 0 i =1,..., N {87 Finally,similartothewaythattheendpointobjectiveisappliedattheboundarypoints, thecontinuous-timeboundaryconditionsarealsoapproximatedattheboundarypointsas b Y 1 t 0 Y N +1 t f = 0 {88 ItisnotedthattheresultingnonlinearprogrammingproblemofEqs.2{85to2{88isfor thesingle-intervalformulation.Adetaileddescriptionofthemultiple-intervalformulation whenapplyingGaussian-quadratureforimplicitsimulationisgiveninChapter3. 2.4.6BenetsofUsingLegendre-Gauss-RadauCollocationMethod TheLegendre-Gauss-Radaucollocationmethodisthefocusofthisdissertation forthefollowingreasons.First,thedierentiationmatrixassociatedwith theLegendre-Gauss-Radaucollocationmethodisnotsingularasitisinthe Legendre-Gauss-Lobattocollocationmethod.Moreover,severalproblemsarisewiththe Legendre-Gauss-LobattocollocationmethodduetotheLGLdierentiationmatrixbeing singular,includingapoorcostateapproximationfromtheLagrangemultipliersandfor someproblems,afailuretondanaccuratecontrol.Second,theLegendre-Gauss-Radau 52

PAGE 53

collocationmethodhastheterminalstateandinitialstateasdiscretizedvariables, unliketheLegendre-Gausscollocationmethodthatdependsuponusinganintegration quadraturetoobtaintheterminalstate.Additionally,theLegendre-Gauss-Radau collocationmethodhasthefeatureofparameterizingthevalueofthecontrolatoneof theendpoints,makingtheLegendre-Gauss-Radaucollocationuniquelyvaluablewhen implementedasamultipleintervalmethodbecausethecontrolremainscollocatedatthe intervalpoints.Finally,theLGRcollocationmethodhasawellestablishedconvergence theoryasdescribedinRefs.[77,78,79,80,81]. 2.5NumericalOptimization Byusingadirectcollocationmethodtosolveanoptimalcontrolproblem,the continuous-timeoptimalcontrolproblemistranscribedintoanonlinearprogramming problemNLP.TheobjectiveofaNLPistondasetofparametersthatminimizes someobjectivefunctionthatissubjecttoasetofalgebraicequalityand/orinequality constraints.Thissectionwillprovideabackgroundofunconstrainedoptimization,equality constrainedoptimization,andinequalityconstrainedoptimizationsoastodescribehowa NLPyieldsanoptimalsolution. 2.5.1UnconstrainedOptimization Considerthefollowingproblemofdeterminingtheminimumofafunctionofmultiple variablessubjecttonoconstraints.Minimizetheobjectivefunction J x {89 where x 2 R n .Theobjectivefunctionmustbegreaterwhenevaluatedatanyneighboring point, x ,inorderfor x tobealocallyminimizingpoint,i.e., J x > J x {90 Inordertodevelopasetofsucientconditionsthatdenealocallyminimizingpoint, x rst,athreetermTaylorseriesexpansionaboutsomepoint, x ,isusedtoapproximatethe 53

PAGE 54

objectivefunctionas J x = J x + g x x )]TJ/F42 11.9552 Tf 11.955 0 Td [(x + 1 2 x )]TJ/F42 11.9552 Tf 11.955 0 Td [(x T H x x )]TJ/F42 11.9552 Tf 11.955 0 Td [(x {91 wherethegradientvector, g x 2 R 1 n ,is g x = @ J @ x 1 @ J @ x n {92 andthesymmetricHessianmatrix, H x 2 R n n is H x = 2 6 6 6 6 6 6 6 4 @ 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 3 7 7 7 7 7 7 7 5 {93 Twoconditionsmustbesatisedinorderfor x tobealocalminimizingpoint.First,itis anecessaryconditionthat g x mustbezero,i.e., g x = 0 {94 Becausetherst-ordernecessaryconditionbyitselfonlydenesanextremalpointwhich canbealocalminimum,localmaximum,orsaddlepoint,inordertoensure x isalocal minimum,anadditionalconditionwhichmustbesatisedis x )]TJ/F42 11.9552 Tf 11.955 0 Td [(x T H x )]TJ/F42 11.9552 Tf 11.955 0 Td [(x > 0. {95 Together,Eqs.2{94and2{95denethenecessaryandsucientconditionsforalocal minimum. 2.5.2EqualityConstrainedOptimization Considerthefollowingequalityconstrainedoptimizationproblem.Minimizethe objectivefunction J x {96 54

PAGE 55

subjecttotheequalityconstraints f x = 0 {97 where x 2 R n ,and f x 2 R m .Tondtheminimumoftheobjectivefunctionsubject toequalityconstraints,anapproachsimilartothecalculusofvariationsapproachfor determiningtheextremaloffunctionalsisused.TheLagrangianisdenedas ` x = J x )]TJ/F43 11.9552 Tf 11.955 0 Td [( T f x {98 where 2 R m isthesetofLagrangemultipliersassociatedwiththeequalityconstraints. Furthermore,thenecessaryconditionsfortheminimumoftheLagrangianisthat x satisestheconditions r x ` x = g x )]TJ/F43 11.9552 Tf 11.955 0 Td [( T G x = 0 r ` x = )]TJ/F42 11.9552 Tf 9.299 0 Td [(f x = 0 {99 wheretheJacobianmatrix, G x 2 R m n ,isdenedas G x = r x f x = 2 6 6 6 6 6 6 6 4 @ 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 3 7 7 7 7 7 7 7 5 {100 ItisnotedthattheequalityconstraintofEq.2{97issatisedatanextremalofthe Lagrangian.Moreover,thenecessaryconditionsofEq.2{99donotspecifyaminimum andaresatisedatanyextremalpoints.Inordertospecifyaminimum,theHessianofthe Lagrangianisdenedas H ` x = r 2 xx ` x = r 2 xx J x )]TJ/F38 7.9701 Tf 17.074 14.944 Td [(m X i =1 i r 2 xx f i x {101 suchthatasucientconditionforaminimumisgivenby v T H ` x v > 0, {102 55

PAGE 56

foranyvector v intheconstrainttangentspace. 2.5.3InequalityConstrainedOptimization Considerthefollowingoptimizationproblemthathasbothequalityconstraints,and inequalityconstraints.Minimizetheobjectivefunction J x {103 subjecttotheequalityconstraints f x = 0 {104 andtheinequalityconstraints c x 0 {105 where x 2 R n f x 2 R m ,and c x 2 R p .Someoftheinequalityconstraints c x are satisedasequalitiessuchthat c j x = 0 j 2 A c j x < 0 j 2 B {106 where A isconsideredtheactiveset,and B istheinactiveset.TheLagrangianisthen denedas ` x = J x )]TJ/F43 11.9552 Tf 11.956 0 Td [( T f x )]TJ/F20 11.9552 Tf 11.956 0 Td [( A T c A x {107 where 2 R m isthesetofLagrangemultipliersassociatedwiththeequalityconstraints, A 2 R q isthesetofLagrangemultipliersassociatedwiththeactivesetoftheinequality constraints c A ,and q isthenumberofactiveconstraintsof c x .Moreover,itisnoted that B = 0 suchthattheinactivesetofconstraintsareignored.Thenecessary conditionsfortheminimumoftheLagrangianarethatthepoint x , A satises r x ` x , A = g x )]TJ/F43 11.9552 Tf 11.955 0 Td [( T G f x )]TJ/F20 11.9552 Tf 11.955 0 Td [( A T G c A x = 0 r ` x , A = )]TJ/F42 11.9552 Tf 9.299 0 Td [(f x = 0 r A ` x , A = )]TJ/F42 11.9552 Tf 9.299 0 Td [(c A x = 0 {108 56

PAGE 57

where G f and G c A aretheJacobianmatricesassociatedwiththeequalityconstraints andactivesetofinequalityconstraints,respectively.Itisnotedthattheconstraints ofEqs.2{104and2{105aresatisedatanextremaloftheLagrangian.Moreover,a minimumisnotspeciedbythenecessaryconditionsofEq.2{108asthecondition issatisedatallextremalpoints.Inordertospecifyaminimum,theHessianofthe Lagrangianisdenedas H ` x , A = r 2 xx ` x , A = r 2 xx J x )]TJ/F38 7.9701 Tf 17.075 14.944 Td [(m X i =1 i r 2 xx f i x )]TJ/F38 7.9701 Tf 18.213 15.209 Td [(q X j =1 A j r 2 xx c j x {109 suchthatasucientconditionforaminimumisthat v T H ` x , A v > 0, {110 foranyvector v intheconstrainttangentspace. 57

PAGE 58

CHAPTER3 EXPLOITINGSPARSITYINLEGENDRE-GAUSS-RADAUCOLLOCATIONMETHOD Theobjectiveofthischapteristopresenttheformulationofthemultiple-interval Legendre-Gauss-Radauorthogonalcollocationmethodandthenite-dimensionalnonlinear programmingproblemNLPthatresultsfromtranscribingthecontinuousoptimalcontrol problemusingtheLegendre-Gauss-Radaucollocationmethod.Althoughanoverviewof thesingle-intervalformulationforGaussian-quadraturecollocationmethodswaspresented inChapter2,themultiple-intervalformulationisusedwhensolvingaprobleminpractice with hp -adaptivemethods.Thereaderisremindedthat hp -methodswerepreviously denedonpage16asachievingconvergenceusingdirecttranscriptionbyincreasingthe numberofmeshintervalsusedand/orthedegreeofthepolynomialwithineachmesh interval.ThedescriptionoftheresultingformoftheNLPincludesthesparsestructuresof theNLPderivativematricesattherst-andsecond-orderderivativelevels.Additionally, exploitationofthesparsityfoundintheNLPderivativematricesisachievedbyderiving expressionsfortheNLPderivativematricesintermsofthederivativesofthecontinuous functionsoftheoriginaloptimalcontrolproblem.Thematerialinthischapterisbasedon Ref.[53]. Thischapterisorganizedasfollows.InSection3.1thenotationandconventions usedthroughoutthischapterareprovided.Section3.2denesthegeneralmultiple-phase optimalcontrolproblem.Section3.3describestheLegendre-Gauss-Radaucollocation method.Section3.4describesthetranscribedNLPobjectivefunction,decisionvector, constraintvector,andLagrangianalongwiththesparsitypatternsthatariseintherstandsecond-orderderivativematricesrequiredbytheNLPsolver.Finally,Section3.5 providesconclusionsonthisresearch. 3.1NotationandConventions Throughoutthischapterthefollowingnotationandconventionswillbeemployed.All scalarswillberepresentedbylower-casesymbolsforexample, x u .Allvectorfunctions 58

PAGE 59

oftimewillbetreatedasrowvectorsandwillbedenotedbylower-caseboldsymbols. Thus,if p t 2 R 1 n isavectorfunctionoftime,then p t = [ p 1 t p n t ] .Any vectorthatisnotafunctionoftimewillbedenotedasacolumnvector,thatisastatic vector z 2 R n 1 willbetreatedasacolumnvector.Next,matriceswillbedenotedby uppercaseboldsymbols.Thus, P 2 R N n isamatrixofsize N n .Furthermore,if f p f : R 1 n R 1 m ,isafunctionthatmapsrowvectors p 2 R 1 n torowvectors f p 2 R 1 m ,thentheresultofevaluating f p atthepoints p 1 ,..., p N isthematrix F 2 R N m [ f p i ] 1 N ;thatis F [ f p i ] 1 N = 2 6 6 6 6 4 f p 1 . f p N 3 7 7 7 7 5 Asinglesubscript i attachedtoamatrixdenotesaparticularrowofthematrix;thatis, P i isthe i th rowofthematrix P .Adoublesubscript i j attachedtoamatrixdenotesthe elementlocatedinrow i andcolumn j ofthematrix;thatis, P i j isthe i j th elementof thematrix P .Furthermore,thenotation P :, j willbeusedtodenotealloftherowsand column j ofamatrix P asusedsimilarlyintheMATLABlanguagesyntax.Finally, P T willbeusedtodenotethetransposeofamatrix P Next,let P and Q be n m matrices.Thentheelement-by-elementmultiplicationof P and Q isdenedas P Q = 2 6 6 6 6 4 p 11 q 11 p 1 m q 1 m . . . . p n 1 q n 1 p nm q nm 3 7 7 7 7 5 Itisnotedfurtherthat P Q isnotstandardmatrixmultiplication.Furthermore,if p 2 R n thatis,acolumnorrowvectoroflength n ,thentheoperation diag p denotesthe n n 59

PAGE 60

diagonalmatrixformedbytheelementsof p diag p = 2 6 6 6 6 6 6 6 4 p 1 0 0 0 p 2 0 . . . . . . 00 p n 3 7 7 7 7 7 7 7 5 Finally,thenotation 0 n m representsan n m matrixofzeros,while 1 n m representan n m matrixofallones. Next,wedenethenotationforderivativesoffunctionsofvectors.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 @ p 1 @ f p @ p n Next,let f p f : R n R m ,where p maybeeitherarowvectororacolumnvectorand f p hasthesameorientationthatis,eitherrowvectororcolumnvectoras p .Then r p f p isthe m by n matrixwhose i th rowis r p f i p ;thatis, r p f p = 2 6 6 6 6 4 r p f 1 p . r p f m p 3 7 7 7 7 5 = 2 6 6 6 6 6 4 @ f 1 p @ p 1 @ f 1 p @ p n . . . . @ f m p @ p 1 @ f m p @ p n 3 7 7 7 7 7 5 Thefollowingconventionswillbeusedforsecondderivativesofscalarfunctions.Givena function f p q ,where f : R n R m R mapsapairofvectors p 2 R n and q 2 R m toa scalar f p q 2 R ,thenthemixedsecondderivative r 2 pq isan n by m matrix, r 2 pq f p q = 2 6 6 6 6 6 4 @ 2 f p q @ p 1 @ q 1 @ 2 f p q @ p 1 @ q m . . . . @ 2 f p q @ p n @ q 1 @ 2 f p q @ p n @ q m 3 7 7 7 7 7 5 = r 2 qp f p q T 60

PAGE 61

Thus,forafunctionoftheform f p ,where f : R n R wehave r 2 pp f p = 2 6 6 6 6 6 4 @ 2 f p @ p 2 1 @ 2 f p @ p 1 @ p n . . . . @ 2 f p @ p n @ p 1 @ 2 f p @ p 2 n 3 7 7 7 7 7 5 = r 2 pp f p T Additionally,thefollowingconventionwillbeusedfordistinguishingthevariablesof dierentphasesintheproblem.Givenavariable p 2 R n ,then p i designatesthe valuesof p inphase i oftheproblem.Moreover,thefollowingconventionwillbeused fordistinguishingthevariablesofdierentintervalsinthemeshusedtodiscretizeeach phaseoftheproblem.Givenavariable p 2 R n inphase i oftheproblem, p i ,then p i j designatesthevaluesofthevariable p ininterval j ofthemeshusedforphase i ofthe problem.Finally,itisnotedthataslightabuseofthenotationformatricesthatis,bold capitallettersisusedfordenotingtheapproximationsofthecontinuous-timevectors appearinginthetranscribedNLP;however,whenthisoccursthecontextisstatedovertly. 3.2GeneralMultiple-PhaseOptimalControlProblem Withoutlossofgenerality,considerthefollowinggeneralmultiple-phaseoptimal controlproblem.Firstlet p 2f 1,..., P g bethephasenumberwhere P isthetotalnumber ofphases.Determinethestate y p t 2 R 1 n p y andthecontrol u p t 2 R 1 n p u as functionsoftheindependentvariable t ,aswellastheintegrals q p 2 R n p q 1 ,thestart times t p 0 2 R ,andtheterminustimes t p f 2 R inallphases p ,alongwiththestatic parameters s 2 R n s 1 thatminimizetheobjectivefunctional J = e ,..., e P s {1 subjecttothedynamicconstraints d y p t dt = a p y p t u p t t s p 2f 1,..., P g {2 61

PAGE 62

theeventconstraints b min b e ,..., e P s b max {3 theinequalitypathconstraints c p min c p y p t u p t t s c p max p 2f 1,..., P g {4 theintegralconstraints q p min q p q p max p 2f 1,..., P g {5 andthestaticparameterconstraints s min s s max {6 where e p 2 R 2 n p y + n p q +2 isdenedas e p = y p t p 0 t p 0 y p t p f t p f q p T T p 2f 1,..., P g {7 andtheintegralvectorcomponentsineachphasearedenedas q p j = Z t p f t p 0 g p j y p t u p t t s dt j 2f 1,..., n p q g p 2f 1,..., P g {8 ItisnotedthattheeventconstraintsofEq.3{3containfunctionswhichcanrelate informationatthestartand/orterminusofanyphase.Thefunctions g p a p ,and c p ineachphase p 2f 1,..., P g ,and b aredenedbythefollowingmappings: : R [2 n y + n q +2] 1 R [2 n y + n q +2] 1 ... R [2 n P y + n P q +2] 1 R n s 1 R g p : R 1 n p y R 1 n p u R R n s 1 R 1 n p q a p : R 1 n p y R 1 n p u R R n s 1 R 1 n p y c p : R 1 n p y R 1 n p u R R n s 1 R 1 n p c b : R [2 n y + n q +2] 1 R [2 n y + n q +2] 1 ... R [2 n P y + n P q +2] 1 R n s 1 R n b 1 wherethereaderisremindedthatallvectorfunctionsoftimearetreatedasrowvectors. 62

PAGE 63

Inthischapter,itwillbeusefultomodifytheoptimalcontrolproblemgivenin Eqs.3{1to3{8asfollows.Let 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] beanewindependentvariable.Thevariable t isthendenedintermsof foreachphase p 2f 1,..., P g as t t t p 0 t p f = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 + t p f + t p 0 2 {9 TheoptimalcontrolproblemofEqs.3{1to3{8isthendenedintermsofthevariable asfollows.Determinethestate y p 2 R 1 n p y andthecontrol u p 2 R 1 n p u as functionsoftheindependentvariable ,aswellastheintegrals q p 2 R n p q 1 ,thestart times t p 0 2 R ,andtheterminustimes t p f 2 R inallphases p ,alongwiththestatic parameters s 2 R n s 1 thatminimizetheobjectivefunctional J = e ,..., e P s {10 subjecttothedynamicconstraints d y p d = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 a p y p u p t t p 0 t p f s p 2f 1,..., P g {11 theeventconstraints b min b e ,..., e P s b max {12 theinequalitypathconstraints c p min c p y p u p t t p 0 t p f s c p max p 2f 1,..., P g {13 theintegralconstraints q p min q p q p max p 2f 1,..., P g {14 andthestaticparameterconstraints s min s s max {15 63

PAGE 64

where e p = y p )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 t p 0 y p +1 t p f q p T T p 2f 1,..., P g {16 andtheintegralvectorcomponentsineachphasearedenedas q p j = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 Z +1 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 g p j y p u p t t p 0 t p f s d j 2f 1,..., n p q g p 2f 1,..., P g {17 Additionally,supposenowthatthemeshusedtodiscretizeeachphase p 2f 1,..., P g is furtherdividedinto K p multiple-intervalssuchthateachinterval S p k =[ T p k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T p k ] for k 2f 1,..., K p g and )]TJ/F20 11.9552 Tf 9.298 0 Td [(1= T p 0 < T p 1 < ... < T p K p =+1 .TheEqs.3{10to 3{17arethenwrittenasfollows.First,theformsofthecostfunctional,eventconstraints, integralconstraints,staticparameterconstraintsandendpointvectormaintainthesame formsasshowninEqs.3{10,3{12,3{14,3{15,and3{16,respectively.Next,thedynamic constraintsofEq.3{11arewrittenformeshinterval k ofphase p as, d y p k d = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 a p y p k u p k t t p 0 t p f s k 2f 1,..., K p g p 2f 1,..., P g {18 Furthermore,thepathconstraintsofEq.3{13arewrittenformeshinterval k ofphase p as, c p min c p y p k u p k t t p 0 t p f s c p max k 2f 1,..., K p g p 2f 1,..., P g {19 Additionally,theintegralvectorcomponentdenitionsofEq.3{17aregivenineachphase p as q p j = K p X k =1 Z T p k T p k )]TJ/F21 5.9776 Tf 5.756 0 Td [(1 g p j y p k u p k t t p 0 t p f s dt j 2f 1,..., n p q g p 2f 1,..., P g {20 64

PAGE 65

Finally,becausethestatemustbecontinuousateachinteriormeshpointforallphasesof theproblem,itisrequiredthatthecondition y p k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T p k = y p k T p k besatisedat theinteriormeshpoints T p 1 ,..., T p K p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 foreachphase p 2f 1,..., P g 3.3Variable-OrderLegendre-Gauss-RadauCollocationMethod Themultiple-intervalformofthemultiple-phasecontinuousoptimalcontrolproblem inSection3.2isdiscretizedusingthepreviouslydevelopedLegendre-Gauss-Radau orthogonalcollocationmethodasdescribedinRef.[30].WhiletheLegendre-Gauss-Radau orthogonalcollocationmethodischosen,theapproachdevelopedinthischaptercan beusedwithotherorthogonalcollocationmethodsforexample,theLegendre-Gauss orthogonalcollocationmethod[35,26,12]ortheLegendre-Gauss-Lobatto orthogonalcollocationmethod[24]bymakingonlyslightmodications.Usingthe Legendre-Gauss-Radauorthogonalcollocationmethodhastheadvantagethatthe continuityconditions y p k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T p k = y p k T p k k 2f 1,..., K p )]TJ/F20 11.9552 Tf 12.239 0 Td [(1 g p 2f 1,..., P g acrossinteriormeshpointsareparticularlyeasytoimplement. UsingtheLegendre-Gauss-Radaucollocationmethod,thestateofthecontinuous optimalcontrolproblemisapproximatedineachmeshinterval k 2f 1,..., K p g ofeach phase p 2f 1,..., P g as y p k Y p k = N p k +1 X j =1 Y p k j ` p k j ` p k j = N p k +1 Y l =1 l 6 = j )]TJ/F23 11.9552 Tf 11.955 0 Td [( p k l p k j )]TJ/F23 11.9552 Tf 11.955 0 Td [( p k l {21 where 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] ` p k j j 2f 1,..., N p k +1 g ,isabasisofLagrangepolynomials, p k 1 ,..., p k N p k arethe N p k Legendre-Gauss-Radau[82]LGRcollocationpointsin meshinterval k ofphase p denedonthesubinterval 2 [ T p k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T p k ,and p k N p k +1 = T p k isanon-collocatedendpoint.Dierentiating Y p k inEq.3{21withrespectto ,the derivativeofthestateapproximationisobtainedas d Y p k d = N p k +1 X j =1 Y p k j d ` p k j d k 2f 1,..., K p g p 2f 1,..., P g {22 65

PAGE 66

BythencollocatingthedynamicsofEq.3{18atthe N p k LGRpointsinmeshinterval k 2f 1,..., K p g ofphase p 2f 1,..., P g usingEq.3{22,thecollocationconditionis obtainedas 0 = N p k +1 X j =1 Y p k j D p k ij )]TJ/F37 11.9552 Tf 13.151 8.087 Td [(t p f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t p 0 2 a p Y p k i U p k i t p k i t p 0 t p f s i 2f 1,..., N p k g k 2f 1,..., K p g p 2f 1,..., P g {23 where U p k i i 2f 1,..., N p k g ,aretheapproximationsofthecontrolatthe N p k LGR pointsinmeshinterval k 2f 1,..., K p g ofphase p 2f 1,..., P g ,and D p k ij = d ` p k j d # p k i i 2f 1,..., N p k g j 2f 1,..., N p k +1 g {24 togetherformthe N p k [ N p k +1] Legendre-Gauss-Radauorthogonalcollocation dierentiationmatrix[30]inmeshinterval k 2f 1,..., K p g ofphase p 2f 1,..., P g .Next, thepathconstraintsofEq.3{19inmeshinterval k 2f 1,..., K p g ofphase p 2f 1,..., P g areenforcedatthe N p k LGRpointsas c p min c p Y p k i U p k i t p k i t p 0 t p f s c p max i 2f 1,..., N p k g k 2f 1,..., K p g p 2f 1,..., P g {25 TheintegralvectorcomponentdenitionofEq.3{20isthenapproximatedineachphase p as q p i Q p i = K p X k =1 N p k X j =1 t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 w p k j g p i Y p k j U p k j t p k j t p 0 t p f s i 2f 1,..., n p q g p 2f 1,..., P g {26 where w p k j j 2f 1,..., N p k g aretheLGRquadratureweights[82]atthecollocation pointsinmeshinterval k 2f 1,..., K p g ofphase p 2f 1,..., P g denedontheinterval 2 [ T p k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T p k .TheendpointvectorofEq.3{16foreachphase p isthenapproximated 66

PAGE 67

as e p E p = Y p 1 t p 0 Y p N p +1 t p f Q p T T p 2f 1,..., P g {27 where Y p 1 istheapproximationof y p T p 0 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 ,and Y p N p +1 istheapproximationof y p T p K p =+1 suchthat N p isthetotalnumberofcollocationpointsusedinphase p givenby N p = K p X k =1 N p k Furthermore,theevent,integral,andstaticparameterconstraintsofEqs.3{12,3{14,and 3{15,respectively,maintainthesameformusingtheapproximatedendpointvectorsand integralvectors;thatis,theeventconstraintsare b min b E ,..., E P s b max {28 theintegralconstraintsare q p min Q p q p max p 2f 1,..., P g {29 andthestaticparameterconstraintsare s min s s max {30 Itisnotedthatcontinuityinthestateattheinteriormeshpoints k 2f 1,..., K p )]TJ/F20 11.9552 Tf 12.139 0 Td [(1 g of phase p 2f 1,..., P g isenforcedviathecondition Y p k N p k +1 = Y p k +1 1 k 2f 1,..., K p )]TJ/F20 11.9552 Tf 11.955 0 Td [(1 g p 2f 1,..., P g {31 wherewenotethatthesamevariableisusedforboth Y p k N p k +1 and Y p k +1 1 .Hence, theconstraintofEq.3{31iseliminatedfromtheproblembecauseitistakeninto accountexplicitly.Finally,itisnotedthattheobjectivefunctionalofEq.3{10isnow approximatedwithanobjectivefunctionofthesameformsincetheintegralvectorisnow 67

PAGE 68

beingapproximatedusingGaussianquadrature;thatis, J = E ,..., E P s {32 TheNLPthatarisesfromtheLegendre-Gauss-Radauorthogonalcollocationmethodis thentominimizethecostfunctionofEq.3{32subjecttothealgebraicconstraintsof Eqs.3{23to3{30. Supposenowthatthefollowingquantitiesinmeshintervals k =1,..., K p )]TJ/F20 11.9552 Tf 12.351 0 Td [(1 and thenalmeshinterval K p ofphase p 2f 1,..., P g aredenedas p k = h p k i i 1 N p k k =1,..., K p t p k = h t p k i i 1 N p k t p k i = t p k i t p 0 t p f i =1,..., N p k k =1,..., K p w p k = h w p k i i 1 N p k k =1,..., K p Y p k = h Y p k i i 1 N p k k =1,..., K p )]TJ/F20 11.9552 Tf 11.956 0 Td [(1, Y p K p = h Y p K p i i 1 N p K p +1 U p k = h U p k i i 1 N p k k =1,..., K p A p k = h a p Y p k i U p k i t p k i t p 0 t p f i 1 N p k k =1,..., K p C p k = h c p Y p k i U p k i t p k i t p 0 t p f i 1 N p k k =1,..., K p G p k = h g p Y p k i U p k i t p k i t p 0 t p f i 1 N p k k =1,..., K p {33 68

PAGE 69

Furthermore,thefollowingquantitiesaredenedaswellforphase p 2f 1,..., P g : p = 2 6 6 6 6 4 p ,1 . p K p 3 7 7 7 7 5 t p = 2 6 6 6 6 4 t p ,1 . t p K p 3 7 7 7 7 5 w p = 2 6 6 6 6 4 w p ,1 . w p K p 3 7 7 7 7 5 Y p = 2 6 6 6 6 4 Y p ,1 . Y p K p 3 7 7 7 7 5 U p = 2 6 6 6 6 4 U p ,1 . U p K p 3 7 7 7 7 5 A p = 2 6 6 6 6 4 A p ,1 . A p K p 3 7 7 7 7 5 C p = 2 6 6 6 6 4 C p ,1 . C p K p 3 7 7 7 7 5 G p = 2 6 6 6 6 4 G p ,1 . G p K p 3 7 7 7 7 5 {34 Itisnotedforcompletenessthatforphase p 2f 1,..., P g p 2 R N p 1 t p 2 R N p 1 w p 2 R N p 1 Y p 2 R [ N p +1] n p y U p 2 R N p n p u A p 2 R N p n p y C p 2 R N p n p c ,and G p 2 R N p n p q .ThediscretizeddynamicconstraintsgiveninEq.3{23arethenwritten compactlyforeachphase p 2f 1,..., P g as p = D p Y p )]TJ/F37 11.9552 Tf 13.15 8.088 Td [(t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 A p = 0 {35 where p 2 R N p n p y and D p 2 R N p [ N p +1] are,respectively,thedefectconstraint matrixandthecompositeLegendre-Gauss-Radauorthogonalcollocationdierentiation matrixforphase p .AschematicofthecompositeLegendre-Gauss-Radauorthogonal collocationdierentiationmatrix D p foraphase p 2f 1,..., P g isshowninFig.3-1 69

PAGE 70

Figure3-1.StructureofcompositeLegendre-Gauss-Radauorthogonalcollocation dierentiationmatrixinphase p wherethemeshconsistsof K p mesh intervals. whereitisseenthat D p hasablockstructurewithnonzeroelementsintherow-column indices P k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 l =1 N p l +1 P k l =1 N p l P k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 l =1 N p l +1 P k l =1 N p l +1 for meshintervals k =1,..., K p suchthatthenonzeroelementsofeachmeshinterval k 2f 1,..., K p g aredenedbythematrixgiveninEq.3{24.Next,thediscretizedpath constraintsofEq.3{25foreachphase p 2f 1,..., P g areexpressedas C p min C p C p max {36 where C p isthediscretizedpathconstraintmatrixinphase p ,and C p min and C p max arematricesofthesamesizeas C p whoserowscontainthevectors c p min and c p max respectively,inphase p .Furthermore,thediscretizedintegralapproximationconstraintsof 70

PAGE 71

Eq.3{26foreachphase p 2f 1,..., P g areexpressedas p = Q p T )]TJ/F37 11.9552 Tf 13.15 8.088 Td [(t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 [ w p ] T G p = 0 p 2f 1,..., P g {37 where p 2 R 1 n p q istheintegralapproximationconstraintvectorinphase p .Moreover, thediscretizedeventconstraintsandthestaticparameterconstraintsofEq.3{28and 3{30,respectively,remainas b min b E ,..., E P s b max {38 and s min s s max {39 respectively.ThenonlinearprogrammingproblemNLPassociatedwiththe Legendre-Gauss-Radauorthogonalcollocationmethodisthentominimizethecost functionofEq.3{32subjecttothealgebraicconstraintsofEqs.3{35to3{39.Finally,let p p 2 R N p 1 foreachphase p 2f 1,..., P g bedenedas p = @ t p @ t p 0 = 1 )]TJ/F43 11.9552 Tf 11.955 0 Td [( p 2 p = @ t p @ t p f = 1 + p 2 {40 wherethederivativesinEq.3{40areobtainedfromEq.3{9. 3.4FormofNLPResultingfromLGRTranscription Inthissection,theformoftheresultingNLPfromtranscribingthecontinuous optimalcontrolproblemusingtheLegendre-Gauss-Radaucollocationmethoddevelopedin Section3.3isdescribed.Furthermore,thesparsestructureoftheresultingNLPderivative matricesisexploitedbyderivingtheNLPderivativematricesintermsofthederivatives ofthecontinuousoptimalcontrolproblemfunctionsandvariables.Exploitingthesparsity appearingintheNLPderivativematricessignicantlyimprovesthecomputational eciencyoftheNLPsolveremployedtosolvethetranscribedNLP. 71

PAGE 72

3.4.1NLPDecisionVectorArisingfromLGRTranscription Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,thefollowing NLPdecisionvector, z ,arises: z = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 z . z P s 1 . s n s 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 where z p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 Y p :,1 . Y p :, n p y U p :,1 . U p :, n p u Q p t p 0 t p f 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {41 Y p 2 R N p n p y isthestateapproximationmatrix, U p 2 R N p n p u isthecontrol approximationmatrix, Q p 2 R n p q 1 istheintegralapproximationvector,and t p 0 and t p f arescalarsoftheinitialandnaltimevariables,respectively,forphase p 2f 1,..., P g ,while s i for i 2f 1,..., n s g arethestaticparametersappearing throughouttheentireproblem.Thus z p 2 R [ N p +1 n p y + N p n p u + n p q +2] 1 and z 2 R f n s + P P p =1 [ N p +1 n p y + N p n p u + n p q +2] g 1 3.4.2NLPObjectiveFunctionArisingfromLGRTranscription Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,theNLP objectivefunction, f z ,iscalculatedas f z = E ,..., E P s {42 72

PAGE 73

andthetypicalcostfunctionalofageneralmultiple-phaseoptimalcontrolproblemhas beenturnedsimplyintoaMayercostfunctionbyusingtheintegralapproximationvector, Q p ,toapproximatetheLagrangecostineachphase p 2f 1,..., P g 3.4.3GradientofNLPObjectiveFunction Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,thegradient oftheNLPobjectivefunction, r z f z ,isgivenby r z f z = r z f z r z P f z r s 1 f z r s n s f z {43 where r z f z 2 R 1 f n s + P P p =1 [ N p +1 n p y + N p n p u + n p q +2] g isonlydependentonthevariables appearingintheapproximatedendpointvectors E p p =1,..., P andthestatic parametervector s .Furthermore,forforeachphase p 2f 1,..., P g ,the r z p f z isdened as r z p f z = r Y p :,1 f z r Y p :, n p y f z r U p :,1 f z r U p :, n p u f z r Q p f z r t p 0 f z r t p f f z 2 R 1 [ N p +1 n p y + N p n p u + n p q +2] {44 Thus, r z f z hasamaximumtotalof n s + P P p =1 [2 n p y + n p q +2] nonzeroelementsand theform r z f z = horzcat P p =1 @ @ y p 1 t p 0 0 1 [ N p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] @ @ y p 1 t p f @ @ y p n p y t p 0 0 1 [ N p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] @ @ y n p y t p f # 0 1 [ N p n p u ] @ @ q p 1 @ @ q p n p q @ @ t p 0 @ @ t p f # @ @ s 1 @ @ s n s # 2 R 1 f n s + P P p =1 [ N p +1 n p y + N p n p u + n p q +2] g {45 73

PAGE 74

wherehorzcatdenotesthehorizontalconcatenationofvectors/matricesasusedsimilarly intheMATLABlanguagesyntax.ItisnotedthatEq.3{45exploitsthesparsestructure ofthegradientoftheNLPobjectivefunctionbyderivingthegradientintermsofthe derivativesofthecontinuoustimefunctionsandvariablesoftheoriginaloptimalcontrol problem. 3.4.4NLPConstraintVectorArisingfromLGRTranscription Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,theNLP constraintvectorappearsas H = 2 6 6 6 6 6 6 6 4 h . h P b 3 7 7 7 7 7 7 7 5 where h p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 p :,1 . p :, n p y C p :,1 . C p :, n p c p T 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {46 p 2 R N p n p y C p 2 R N p n p c ,and p 2 R 1 n p q are,respectively,thedefectconstraint matrix,discretizedpathconstraintmatrix,andintegralapproximationconstraintvector forphase p 2f 1,..., P g ,and b 2 R n b 1 istheeventconstraintvectorfortheentire problem. 3.4.5NLPConstraintJacobian Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,theNLP 74

PAGE 75

constraintJacobianhastheform r z H = 2 6 6 6 6 6 6 6 4 r z h . r z h P r z b 3 7 7 7 7 7 7 7 5 where r z h p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 r z p :,1 . r z p :, n p y r z C p :,1 . r z C p :, n p c r z p 1 . r z p n p q 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {47 Thepartialofeachcolumn l 2f 1,..., n p y g ofthedefectconstraintmatrix, p ,inphase p 2f 1,..., P g withrespecttotheNLPdecisionvector, z ,isgivenby r z p :, l = r z p :, l r z P p :, l r s 1 p :, l r s n s p :, l l 2f 1,..., n p y g p 2f 1,..., P g {48 where r z r p :, l = r Y r :,1 p :, l r Y r :, n r y p :, l r U r :,1 p :, l r U r :, n r u p :, l r Q r p :, l r t r 0 p :, l r t r f p :, l r p 2f 1,..., P g {49 75

PAGE 76

ExpandingEq.3{48usingEq.3{49foreachcolumn l 2f 1,..., n p y g ofthedefect constraintmatrix, p inphase p 2f 1,..., P g yields r z p :, l = horzcat p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 r =1 0 N p [ N r +1 n r y + N r n r u + n r q +2] "" 1, l D p :,1: N p )]TJ/F38 7.9701 Tf 13.151 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 diag @ a p l @ y p 1 1 N p !# 1, l D p :, N p +1 # 2 4 2 4 n p y l D p :,1: N p )]TJ/F38 7.9701 Tf 13.151 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 diag 0 @ @ a p l @ y p n p y # 1 N p 1 A 3 5 n p y l D p :, N p +1 3 5 )]TJ/F38 7.9701 Tf 10.494 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 diag @ a p l @ u p 1 1 N p !# )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 diag @ a p l @ u p n p u 1 N p !# 0 N p n p q 1 2 a p l 1 N p )]TJ/F38 7.9701 Tf 13.15 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.586 0 Td [(t p 0 2 p @ a p l @ t 1 N p )]TJ/F21 7.9701 Tf 10.494 4.707 Td [(1 2 a p l 1 N p )]TJ/F38 7.9701 Tf 13.151 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 p @ a p l @ t 1 N p horzcat P r = p +1 0 N p [ N r +1 n r y + N r n r u + n r q +2] )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.586 0 Td [(t p 0 2 @ a p l @ s 1 1 N p )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 @ a p l @ s n s 1 N p 2 R N p h n s + P P r =1 [ N r +1 n r y + N r n r u + n r q +2] i {50 where r z p :, l hasamaximumtotalof N p N p + n p y + n p u +2+ n s nonzeroelements, and ij for i j 2 N istheKroneckerdeltafunctionsuchthat ij =1 for i = j ,and ij =0 for i 6 = j .ItisnotedthatEq.3{50exploitsthesparsestructureofthegradientoftheNLP defectconstraintsbyderivingthegradientintermsofthederivativesofthecontinuous timefunctionsandvariablesoftheoriginaloptimalcontrolproblem. Similarly,thepartialofeachcolumn m 2f 1,..., n p c g ofthediscretizedpath constraintmatrix, C p ,inphase p 2f 1,..., P g withrespecttotheNLPdecisionvector, z 76

PAGE 77

isgivenby r z C p :, m = r z C p :, m r z P C p :, m r s 1 C p :, m r s n s C p :, m m 2f 1,..., n p c g p 2f 1,..., P g {51 where r z r C p :, m = r Y r :,1 C p :, m r Y r :, n r y C p :, m r U r :,1 C p :, m r U r :, n r u C p :, m r Q r C p :, m r t r 0 C p :, m r t r f C p :, m r p 2f 1,..., P g {52 ExpandingEq.3{51usingEq.3{52foreachcolumn m 2f 1,..., n p c g ofthediscretized pathconstraintmatrix, C p inphase p 2f 1,..., P g yields r z C p :, m = horzcat p )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 r =1 0 N p [ N r +1 n r y + N r n r u + n r q +2] diag @ c p m @ y p 1 1 N p 0 N p 1 # 2 4 diag 0 @ @ c p m @ y p n p y # 1 N p 1 A 0 N p 1 3 5 diag @ c p m @ u p 1 1 N p diag @ c p m @ u p n p u 1 N p 0 N p n p q p @ c p m @ t 1 N p p @ c p m @ t 1 N p horzcat P r = p +1 0 N p [ N r +1 n r y + N r n r u + n r q +2] @ c p m @ s 1 1 N p @ c p m @ s n s 1 N p 2 R N p h n s + P P r =1 [ N r +1 n r y + N r n r u + n r q +2] i {53 where r z C p :, m hasamaximumtotalof N p n p y + n p u +2+ n s nonzeroelements.Itis notedthatEq.3{53exploitsthesparsestructureofthegradientoftheNLPdiscretized pathconstraintsbyderivingthegradientintermsofthederivativesofthecontinuoustime functionsandvariablesoftheoriginaloptimalcontrolproblem. 77

PAGE 78

Similarly,thepartialofeachcomponent j 2f 1,..., n p q g oftheintegralapproximation constraintvector, p ,inphase p 2f 1,..., P g withrespecttotheNLPdecisionvector, z isgivenby r z p j = r z p j r z P p j r s 1 p j r s n s p j j 2f 1,..., n p q g p 2f 1,..., P g {54 where r z r p j = r Y r :,1 p j r Y r :, n r y p j r U r :,1 p j r U r :, n r u p j r Q r p j r t r 0 p j r t r f p j r p 2f 1,..., P g {55 ExpandingEq.3{54usingEq.3{55foreachcomponent j 2f 1,..., n p q g oftheintegral approximationconstraintvector, p ,inphase p 2f 1,..., P g yields 78

PAGE 79

r z p j = horzcat p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 r =1 0 1 [ N r +1 n r y + N r n r u + n r q +2] )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 w p @ g p j @ y p 1 1 N p T 0 # 2 4 )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 0 @ w p @ g p j @ y p n p y # 1 N p 1 A T 0 3 5 )]TJ/F38 7.9701 Tf 10.494 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 w p @ g p j @ u p 1 1 N p T )]TJ/F38 7.9701 Tf 10.494 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 w p @ g p j @ u p n p u 1 N p T horzcat j )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 i =1 0 1 horzcat n p q i = j +1 0 1 2 w p T G p :, j )]TJ/F38 7.9701 Tf 13.151 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.586 0 Td [(t p 0 2 w p T p @ g p j @ t 1 N p !# )]TJ/F21 7.9701 Tf 10.494 4.707 Td [(1 2 w p T G p :, j )]TJ/F38 7.9701 Tf 13.15 6.546 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 w p T p @ g p j @ t 1 N p !# horzcat P r = p +1 0 1 [ N r +1 n r y + N r n r u + n r q +2] )]TJ/F38 7.9701 Tf 10.494 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.586 0 Td [(t p 0 2 w p T @ g p j @ s 1 1 N p )]TJ/F38 7.9701 Tf 34.405 6.547 Td [(t p f )]TJ/F38 7.9701 Tf 6.587 0 Td [(t p 0 2 w p T @ g p j @ s n s 1 N p 2 R 1 h n s + P P r =1 [ N r +1 n r y + N r n r u + n r q +2] i {56 where r z p j hasamaximumtotalof N p n p y + n p u +3+ n s nonzeroelements.It isnotedthatEq.3{56exploitsthesparsestructureofthegradientoftheNLPintegral approximationconstraintsbyderivingthegradientintermsofthederivativesofthe continuoustimefunctionsandvariablesoftheoriginaloptimalcontrolproblem. 79

PAGE 80

Similarly,thepartialofeachcomponent v 2f 1,..., n b g oftheeventconstraintvector, b p ,withrespecttotheNLPdecisionvector, z ,isgivenby r z b v = r z b v r z P b v r s 1 b v r s n s b v v 2f 1,..., n b g {57 where r z p b v = r Y p :,1 b v r Y p :, n p y b v r U p :,1 b v r U p :, n p u b v r Q p b v r t p 0 b v r t p f b v p 2f 1,..., P g {58 ExpandingEq.3{57usingEq.3{58foreachcomponent v 2f 1,..., n b g oftheevent constraintvector, b ,yields r z b v = horzcat P p =1 @ b v @ y p 1 t p 0 0 1 [ N p )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] @ b v @ y p 1 t p f @ b v @ y p n p y t p 0 0 1 [ N p )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] @ b v @ y p n p y t p f # 0 1 [ N p n p u ] @ b v @ q p 1 @ b v @ q p n p q @ b v @ t p 0 @ b v @ t p f # @ b v @ s 1 @ b v @ s n s # 2 R 1 h n s + P P p =1 [ N p +1 n p y + N p n p u + n p q +2] i {59 where r z b v hasamaximumtotalof 2 n p y + n p q +2+ n s nonzeroelements.Itisnoted thatEq.3{59exploitsthesparsestructureofthegradientoftheNLPeventconstraints byderivingthegradientintermsofthederivativesofthecontinuoustimefunctionsand variablesoftheoriginaloptimalcontrolproblem. 3.4.6NLPLagrangianArisingfromLGRTranscription Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,theNLP Lagrangianappearsas L = f z + T H z {60 80

PAGE 81

where = 2 6 6 6 6 6 6 6 4 . P 3 7 7 7 7 7 7 7 5 p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 )]TJ/F21 7.9701 Tf 6.941 5.889 Td [( p :,1 . )]TJ/F21 7.9701 Tf 6.941 5.889 Td [( p :, n p y p :,1 . p :, n p c p 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {61 )]TJ/F21 7.9701 Tf 6.941 4.338 Td [( p 2 R N p n p y p 2 R N p n p c ,and p 2 R n p q 1 are,respectively,theNLPLagrange multipliersassociatedwiththedefectconstraintmatrix,discretizedpathconstraint matrix,andintegralapproximationconstraintvectorforphase p 2f 1,..., P g 2 R isthe NLPLagrangemultiplierassociatedwiththeNLPobjectivefunction,and 2 R n b 1 are theNLPLagrangemultipliersassociatedwiththeeventconstraintvector. TheNLPLagrangianofEq.3{60canbereformulatedas L = + P X p =1 h p T h p i + T b {62 suchthat L = L E + L I {63 where L E = + n b X v =1 [ v b v ] {64 and L I = P X p =1 2 4 n p y X i =1 h )]TJ/F21 7.9701 Tf 6.94 5.889 Td [( p :, i T p :, i i + n p c X m =1 h p :, m T C p :, m i + n p q X j =1 h p j p j i 3 5 {65 ThustheNLPLagrangian, L ,hasbeenbrokenintothefollowingtwoparts:rst, L E whichcontainsfunctionsoftheendpointsofphases,andsecond, L I whichcontains functionsofthecollocationpointswithineachphase. 81

PAGE 82

3.4.7NLPLagrangianHessian Foracontinuousoptimalcontrolproblemconsistingof P phasesthathasbeen transcribedintoaNLPusingtheLegendre-Gauss-Radaucollocationmethod,theHessian oftheNLPLagrangianappearsas r 2 zz L = r 2 zz L E + r 2 zz L I {66 wherefor X2fE Ig ,theHessianof L X isgivenby r 2 zz L X = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 r 2 z z L X )]TJ/F19 11.9552 Tf 5.48 -9.684 Td [(r 2 z P z L X T r 2 s 1 z L X T r 2 s n s z L X T . . . . . . . . . r 2 z P z L X r 2 z P z P L X r 2 s 1 z P L X T r 2 s n s z P L X T r 2 s 1 z L X r 2 s 1 z P L X r 2 s 1 s 1 L X )]TJ/F19 11.9552 Tf 5.479 -9.683 Td [(r 2 s n s s 1 L X T . . . . . . . r 2 s n s z L X r 2 s n s z P L X r 2 s n s s 1 L X r 2 s n s s n s L X 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {67 where r 2 z r z p L X = 2 6 6 6 6 6 6 6 6 6 6 6 6 4 r 2 Y r Y p L X r 2 Y r U p L X r 2 Y r Q p L X r 2 Y r t p 0 L X r 2 Y r t p f L X r 2 U r Y p L X r 2 U r U p L X r 2 U r Q p L X r 2 U r t p 0 L X r 2 U r t p f L X r 2 Q r Y p L X r 2 Q r U p L X r 2 Q r Q p L X r 2 Q r t p 0 L X r 2 Q r t p f L X r 2 t r 0 Y p L X r 2 t r 0 U p L X r 2 t r 0 Q p L X r 2 t r 0 t p 0 L X r 2 t r 0 t p f L X r 2 t r f Y p L X r 2 t r f U p L X r 2 t r f Q p L X r 2 t r f t p 0 L X r 2 t r f t p f L X 3 7 7 7 7 7 7 7 7 7 7 7 7 5 r p 2f 1,..., P g {68 and r 2 s i z p L X = r 2 s i Y p L X r 2 s i U p L X r 2 s i Q p L X r 2 s i t p 0 L X r 2 s i t p f L X i 2f 1,..., n s g p 2f 1,..., P g {69 82

PAGE 83

FromEqs.3{68and3{69,thesparsityoftheNLPLagrangianHessianisexploitedby derivingitintermsofthederivativesofthecontinuousoptimalcontrolproblemfunctions inasimilarmannerasshownfortheNLPconstraintJacobianinSection3.4.5. 3.5Conclusions Theapproachforsparsityexploitationdevelopedinthischapterservesasanecient meanstoprovidetherst-andsecond-levelderivativeinformationfortheNLPsolver usedtosolvetheNLPresultingfromthedirecttranscriptionofamultiple-phaseoptimal controlproblemusingLegendre-Gauss-Radaucollocation.Theoriginalcontinuousoptimal controlproblemfunctionsgoverningtheproblemareevaluatedandsuperpositionedwith oneanotherappropriatelytoassemblethenecessaryrst-andsecond-levelderivative matricesofthetranscribedNLPproblem.Finally,exploitingthesparsitypatternsin theNLPderivativematricesarisingfromthetranscriptionofthecontinuousoptimal controlproblemgreatlyreducestheeortrequiredtosupplytheNLPsolverthenecessary derivatives. 83

PAGE 84

CHAPTER4 COMPARISONOFDERIVATIVEESTIMATIONMETHODSINSOLVINGOPTIMAL CONTROLPROBLEMSUSINGDIRECTCOLLOCATION Theobjectiveofthischapteristoevaluatetheeectivenessofusingthefollowing fourderivativeestimationmethodsforusewhensolvinganNLParisingfromthedirect collocationofanoptimalcontrolproblem:centralnite-dierencing,bicomplex-step, hyper-dual,andautomaticdierentiation.Avarietyofdierentapproacheshavebeen developedforestimatingderivatives.Theseapproachescanbedividedbroadlyinto algorithmicmethodsandapproximationmethods.Inanalgorithmicmethod,aderivative isobtainedbydecomposingthefunctionintoasequenceofelementaryoperations andapplyingrulesofdierentialcalculus.Algorithmicapproachesincludeanalytic dierentiation,symbolicdierentiation,andautomaticdierentiation[58].Analytic dierentiationistheprocessofobtainingthederivativemanuallybydierentiating eachstepinthechainrulebyhand[83].Asaresult,analyticdierentiationisoften referredtoashanddierentiation.Symbolicdierentiationistheprocessofobtaininga derivativeusingcomputeralgebrasuchasthatimplementedin Maple or Mathematica Finally,automaticdierentiationistheprocessofdecomposingacomputerprogram intoasequenceofelementaryfunctionoperationsandapplyingthecalculuschainrule algorithmicallythroughthecomputer[57].Itisnotedthatalloftheaforementioned algorithmicmethodscanbederivedfromtheunifyingchainruledescribedinRef.[58]. Finally,anapproximationmethodevaluatesthefunctionatoneormoreneighboring pointsandestimatesthederivativeusingthisinformation. Algorithmicandapproximationmethodsforcomputingderivativeshaverelative advantagesanddisadvantages.Thekeyadvantageofanalgorithmicmethodisthatan exactderivativethatis,aderivativeaccuratetomachineprecisiononacomputeris obtained.Inaddition,insomecasesusinganalgorithmicmethodmakesitpossibleto obtainaderivativeinacomputationallyecientmanner,thusmaximizingthereliability andcomputationaleciencyofsolvingthenonlinearprogrammingproblemarising 84

PAGE 85

fromadirectcollocationmethod.Itisnoted,however,thatalgorithmicmethodshave severallimitations.First,forapracticalproblemitisgenerallyintractabletoobtainan analyticderivative.Second,symbolicdierentiationusedincomputeralgebrasystems suerfromexpressionexplosionthatmakeitintractabletocomputederivativeswhose formsarealgebraicallycomplex.Third,automaticdierentiationcanonlybeperformed onfunctionswherethedierentiationrulehasbeendenedviaalibraryordatabaseof functions.Infact,itisoftenintractabletodenederivativerulesforhighlycomplicated functionsforexample,determiningthederivativeruleassociatedwiththeinterpolationof amulti-dimensionaltable. Inparticular,thewell-knownopensourceautomaticdierentiationsoftwareADOL-C [84,85],whichisincludedaspartofthecomparisoninthischapter,requiresatape recordingofthefunctionevaluationforeachderivativecalculation.Becausetherecord usedinADOL-Cdoesnotaccountforchangesinowcontrol,problemsutilizingpiecewise modelsorinterpolationoftabulardatamustbere-recordeduponeachinputinorderto ensuretheproperderivativecalculationisperformed.Althoughrecordingofthefunction evaluationforthederivativetobecalculatedcanbeecientifreused,theconditionalow controlnatureofmanyfunctionsrequiresre-recordinginordertoensuretheproperow controliscomputedforeachinput.Akeyadvantageofanapproximationmethodisthat onlythefunctionneedstobeevaluatedinordertoestimatethederivativewhichgenerally makesanapproximationmethodcomputationallyecient.Itisnoted,however,that typicalapproximationmethodsforexample,nite-dierencingarenotveryaccurate, therebyreducingtherobustnesswithwhichasolutiontotheNLPcanbeobtained. WhileageneralNLPmaynotcontainagreatdealofstructure,ithasbeenshown inRefs.[86,40,53]thatthederivativefunctionsofanNLParisingfromthedirect collocationofanoptimalcontrolproblemhaveaverywell-denedstructure.Inparticular, Refs.[86,40,53]haveshownthatthederivativefunctionsoftheNLParisingfrom adirectcollocationmethodcanbeobtainedwithincreasedeciencybycomputing 85

PAGE 86

thederivativesofthefunctionsassociatedwiththeoptimalcontrolproblematthe collocationpointsasopposedtocomputingthederivativesoftheNLPfunctions.This exploitationofsparsityinadirectcollocationNLPmakesitpossibletocomputethe derivativesofthelower-dimensionaloptimalcontrolproblemfunctionsrelativetothe muchhigher-dimensionalderivativesoftheNLPfunctions.Giventheincreasedeciency thatarisesfromsparsityexploitation,anyderivativemethodemployedwhensolvingan optimalcontrolproblemusingdirectcollocationshouldexploitthisNLPsparsity. Theaforementioneddiscussionmakesitrelevantandusefultoevaluatethe eectivenessofusingvariousapproximationmethodsforcomputingderivativesrequired whensolvinganNLParisingfromadirectcollocationmethod.Typically,nite-dierence approximationmethodsareusedwhensolvingadirectcollocationNLP[21,54,5]. Inrecentyears,however,muchmoreaccuratederivativeapproximationmethods havebeendeveloped.Twosuchrecentdevelopmentsthatenablethecomputationof higher-orderthatis,beyondrst-derivativederivativesarethebicomplex-step[55],and hyper-dual[56]derivativeapproximations.Inabicomplex-stepderivativeapproximation, anewclassofnumbers,called bicomplexnumbers ,iscreated.Asitsnameimplies,a bicomplexnumberisonethathasonerealcomponent,twoimaginarycomponents, andonebi-imaginarycomponent.Derivativeapproximationsarethenobtainedby evaluatingthefunctionsataparticularbicomplexinputargument.Whilemoreaccurate thannite-dierencemethods,thebicomplex-stepderivativeapproximationstillhas inaccuraciesstemmingfromthebicomplexarithmetic[55].Next,inahyper-dual derivativeapproximation,anewclassofnumbers,called hyper-dualnumbers ,iscreated [56].Asitsnameimplies,ahyper-dualnumberisonethathasonerealcomponent,two imaginarycomponents,andonebi-imaginarycomponent.Whilehyper-dualnumbers sharesomepropertieswiththoseofbicomplexnumbers,themathematicsassociatedwith ahyper-dualnumberarefundamentallydierentfromthoseofabicomplexnumber. Thedierenceinthemathematicsassociatedwithahyper-dualnumberrelativetoother 86

PAGE 87

approximationmethodsleadstoaderivativeapproximationthatdoesnotsuerfrom truncationerrorandisinsensitivetothestepsize.Finally,itisnotedthatallthreeof theaforementionedderivativeapproximationmethodsfallintothecategoryofTaylor series-basedapproximationmethods. Theobjectiveofthischapteristoprovideacomprehensivecomparisonofthe computationaleciencywithwhichadirectcollocationNLPcanbesolvedusinga NewtonNLPsolverwiththefouraforementionedderivativeestimationmethods.The evaluationisbasedonthenumberofiterationsrequiredtoobtainasolutiontotheNLP, theoverallcomputationtimerequiredtosolvetheNLP,andtheaveragecomputationtime requiredperiterationtocomputetherequiredderivatives.Itisfoundthatwhilecentral nite-dierencingistypicallymoreecientperiterationthaneitherthehyper-dualor bicomplex-step,thelattertwomethodshaveasignicantlyloweroverallcomputationtime duetothefactthatfeweriterationsarerequiredbythenonlinearprogrammingproblem solverusingtheselattertwomethodswhencomparedwithcentralnite-dierencing. Furthermore,itisfoundthatalthoughthebicomplex-stepandhyper-dualaresimilarin performance,thehyper-dualderivativeapproximationissignicantlyeasiertoimplement. Moreover,thethreeTaylorseries-basedderivativeapproximationsarefoundtobe substantiallymorecomputationallyecientmethodswhencomparedtoanautomatic dierentiationmethodprovidedbytheopensourcesoftwareADOL-C[84,85].Theresults ofthisstudyshowthatthehyper-dualderivativeapproximationoersseveralbenetsover theothertwoderivativeapproximationsandthetestedautomaticdierentiationderivative estimationmethod,bothintermsofcomputationaleciencyandeaseofimplementation. ThematerialinthischapterisbasedonRef.[87]. Thischapterisorganizedasfollows.Section4.1denesthegeneral multiple-phaseoptimalcontrolproblem.Section4.2describestherationaleforusing Legendre-Gauss-Radaucollocationpointsasthesetofnodestodiscretizethecontinuous optimalcontrolproblemandtheLegendre-Gauss-Radaucollocationmethod.Section4.3 87

PAGE 88

brieyoverviewstheformofthenonlinearprogrammingproblemthatresultsfrom transcribingtheoptimalcontrolproblem.Section4.4describesthebasisofthefour derivativeestimationmethods:centralnite-dierencing,bicomplex-stepderivative approximation,hyper-dualderivativeapproximation,andautomaticdierentiation. Section4.5brieycomparesthederivativeapproximationsobtainedwhenusing centralnite-dierencingversusabicomplex-stepderivativeapproximation,hyper-dual derivativeapproximation,orautomaticdierentiation.Section4.6providesexamples thatdemonstratetheperformanceoftheNLPsolverwhenusingacentralnite-dierence methodversusabicomplex-stepmethod,hyper-dualmethod,orautomaticdierentiation method.Section4.7providesadiscussionofboththeapproachandtheresults.Finally, Section4.8providesconclusionsonthisresearch. 4.1GeneralMultiple-PhaseOptimalControlProblem Withoutlossofgenerality,considerthefollowinggeneralmultiple-phaseoptimal controlproblem,whereeachphaseisdenedontheinterval 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1] .First,let p 2f 1,..., P g bethephasenumberwhere P isthetotalnumberofphases.Determinethe state y p 2 R 1 n p y ,thecontrol u p 2 R 1 n p u ,theintegrals q p 2 R 1 n p q ,the starttimes t p 0 2 R ,andtheterminustimes t p f 2 R inallphases p 2f 1,..., P g ,along withthestaticparameters s 2 R 1 n s thatminimizetheobjectivefunctional J = )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(e ,..., e P s {1 subjecttothedynamicconstraints dy d y p = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 a p y p u p t p t p 0 t p f s p 2f 1,..., P g {2 theeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(e ,..., e P s b max {3 88

PAGE 89

theinequalitypathconstraints c p min c p y p u p t p t p 0 t p f s c p max p 2f 1,..., P g {4 theintegralconstraints q p min q p q p max p 2f 1,..., P g {5 andthestaticparameterconstraints s min s s max {6 where e p = h y p )]TJ/F20 11.9552 Tf 9.299 0 Td [(1, t p 0 y p +1, t p f q p i p 2f 1,..., P g {7 t p t p t p 0 t p f = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 + t p f + t p 0 2 {8 andthevectorcomponentsoftheintegral q p aredenedas q p j = t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 Z +1 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 g p j y p u p t p t p 0 t p f s dt j 2f 1,..., n p q g p 2f 1,..., P g {9 ItisnotedthattheeventconstraintsofEq.4{3containfunctionswhichcanrelate informationatthestartand/orterminusofaphase. 4.2Legendre-Gauss-RadauCollocation Asstatedattheoutset,theobjectiveofthisresearchistocomparetheeciency ofvariousderivativeapproximationmethodsforuseinsolvinganonlinearprogramming problemNLParisingfromthedirectcollocationofanoptimalcontrolproblem.Inorder tomaketheanalysistractable,aparticulardirectcollocationmethodmustbechosen. Whileinprincipleanycollocationmethodcanbeusedtoapproximatetheoptimalcontrol problemgiveninSection4.1,inthisresearchthebasisofcomparisonwillbearecently developedadaptiveGaussianquadraturemethodcalledtheLegendre-Gauss-RadauLGR 89

PAGE 90

collocationmethod[30,28,29,39,61,33,34].ItisnotedthattheNLParisingfrom theLGRcollocationmethodhasanelegantstructure.Inaddition,theLGRcollocation methodhasawellestablishedconvergencetheoryasdescribedinRefs.[77,78,79]. Inthecontextofthisresearch,amultiple-intervalformoftheLGRcollocation methodischosen.Inthemultiple-intervalLGRcollocationmethod,foreachphase p of theoptimalcontrolproblemwherethephasenumber p 2f 1,..., P g hasbeenomittedin ordertoimproveclarityofthedescriptionofthemethod,thetimeinterval 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1] isdividedinto K meshintervals, S k =[ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k ] [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1], k 2f 1,..., K g suchthat K [ k =1 S k =[ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1], K k =1 S k = f T 1 ,..., T K )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 g {10 and )]TJ/F20 11.9552 Tf 9.298 0 Td [(1= T 0 < T 1 < ... < T K )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 < T K =+1 .Foreachmeshinterval,theLGR pointsusedforcollocationaredenedinthedomainof [ T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T k ] for k 2f 1,..., K g .The stateofthecontinuousoptimalcontrolproblemisthenapproximatedinmeshinterval S k k 2f 1,..., K g ,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 )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l k j )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l {11 where ` k j for j 2f 1,..., N k +1 g isabasisofLagrangepolynomialson S k k 1 ,..., k N k arethesetof N k Legendre-Gauss-RadauLGR[82]collocation pointsintheinterval [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k k N k +1 = T k isanon-collocatedsupportpoint,and Y k j Y k k j .Dierentiating Y k inEq.4{11withrespectto gives d Y k d = N k +1 X j =1 Y k j d ` k j d {12 Thedynamicsarethenapproximatedatthe N k LGRpointsinmeshinterval k 2f 1,..., K g as N k +1 X j =1 D k ij Y k j = t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y k i U k i t k i t 0 t f s i 2f 1,..., N k g {13 90

PAGE 91

where D k ij = d ` k j k i d i 2f 1,..., N k g j 2f 1,..., N k +1 g aretheelementsofthe N k N k +1 Legendre-Gauss-Radaudierentiationmatrix[30] inmeshinterval S k k 2f 1,..., K g ,and U k i istheapproximatedcontrolatthe i th collocationpointinmeshinterval S k .Finally,introducingthepreviouslyomittedphase number,the P phasesoftheproblemarelinkedtogetherbytheeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s b max {14 where E p istheendpointapproximationvectorinphase p denedas E p = h Y p 1 t p 0 Y p N p +1 t p f Q p i {15 suchthat N p isthetotalnumberofcollocationpointsusedinphase p givenby, N p = K p X k =1 N p k {16 and Q p 2 R 1 n p q istheintegralapproximationvectorinphase p TheaforementionedLGRapproximationofthecontinuousoptimalcontrolproblem leadstothefollowingNLPfora P -phaseoptimalcontrol.Minimizetheobjectivefunction J = )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s {17 subjecttothedefectconstraints p = D p Y p )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(t p f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t p 0 2 A p = 0 p 2f 1,..., P g {18 thepathconstraints c p min C p i c p max i 2f 1,..., N p g p 2f 1,..., P g {19 91

PAGE 92

theeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s b max {20 theintegralconstraints q p min Q p q p max p 2f 1,..., P g {21 thestaticparameterconstraints s min s s max {22 andintegralapproximationconstraints p = Q p )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 w p T G p = 0 p 2f 1,..., P g {23 where A p = 2 6 6 6 6 4 a p Y p 1 U p 1 t p 1 s . a p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p y {24 C p = 2 6 6 6 6 4 c p Y p 1 U p 1 t p 1 s . c p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p c {25 G p = 2 6 6 6 6 4 g p Y p 1 U p 1 t p 1 s . g p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p q {26 D p 2 R N p [ N p +1] istheLGRdierentiationmatrixinphase p 2f 1,..., P g ,and w p 2 R N p 1 aretheLGRweightsateachnodeinphase p .Itisnotedthat a p 2 R 1 n p y c p 2 R 1 n p c ,and g p 2 R 1 n p q correspond,respectively,tothefunctionsthatdene theright-handsideofthedynamics,thepathconstraints,andtheintegrandsinphase p 2f 1,..., P g ,where n p y n p c ,and n p q are,respectively,thenumberofstatecomponents, pathconstraints,andintegralcomponentsinphase p .Finally,thestatematrix, Y p ,and 92

PAGE 93

thecontrolmatrix, U p ,inphase p 2f 1,..., P g areformedas Y p = 2 6 6 6 6 4 Y p 1 . Y p N p +1 3 7 7 7 7 5 and U p = 2 6 6 6 6 4 U p 1 . U p N p 3 7 7 7 7 5 {27 respectively,where n p u isthenumbercontrolcomponentsinphase p 4.3NonlinearProgrammingProblemArisingfromLGRCollocation Inthissection,abriefoverviewoftheresultingnonlinearprogrammingproblem NLPthatariseswhendiscretizingacontinuousoptimalcontrolproblemusing Legendre-Gauss-RadauLGRcollocationisgiven.ThedecisionvectoroftheNLPis comprisedofthevaluesofthestateattheLGRpointsplusthenalpointineachphase, thevaluesofthecontrolattheLGRpointsineachphase,theinitialtimeofeachphase, thenaltimeofeachphase,thecomponentsoftheintegralvectorineachphase,and anystaticparameterswhichareindependentofphase.TheNLPconstraintsvectoris comprisedofthedefectconstraintsappliedattheLGRpointsineachphase,thepath constraintsattheLGRpointsineachphase,theintegralconstraintsineachphase,and theeventconstraintswhere,ingeneral,theeventconstraintsdependuponinformation atthestartand/orterminusofeachphase.Itisnotedforcompletenessthatsparsity exploitationasderivedinRefs.[40,15,53]requiresthattherst-andsecond-orderpartial derivativesofthecontinuousoptimalcontrolproblemfunctionsbecomputedatthe collocationpoints[40,15,53].Thesederivativesaretheninsertedintotheappropriate locationsintheNLPconstraintsJacobianandLagrangianHessian.Schematicsofthe LGRcollocationNLPderivativematricesareshowninFig.4-1forasinglephaseoptimal controlproblem.ItisnotedthatfortheNLPconstraintsJacobian,alloftheo-diagonal phaseblocksrelatingconstraintsinphase i tovariablesinphase j for i 6 = j areallzeros. Similarly,fortheNLPLagrangianHessian,alloftheo-diagonalphaseblocksrelating variablesinphase i tovariablesinphase j 93

PAGE 94

aNLPConstraintsJacobian bNLPLagrangianHessian Figure4-1.ExampleNLPconstraintsJacobianandLagrangianHessiansparsitypatterns forsingle-phaseoptimalcontrolproblemwith n y statecomponents, n u control components, n q integralcomponents, n c pathconstraints, n s staticparameters, and n b eventconstraints. 94

PAGE 95

for i 6 = j areallzerosexceptforthevariablesmakinguptheendpointvectorswhichmay berelatedviatheobjectivefunctionoreventconstraints.Thesparsitypatternsshownin Fig.4-1aredeterminedexplicitlybyidentifyingthederivativedependenciesoftheNLP objectiveandconstraintsfunctionswithrespecttotheNLPdecisionvectorvariables. Techniquesforidentifyingthederivativedependenciesofthecontinuousoptimalcontrol problemfunctionsintermsoftheproblemvariablescansignicantlyincreasethesparsity oftheNLPderivativematricesbyenablingtheremovalofanyelementswhicharesimply zero.ThederivationofthestructureoftheNLPderivativematricesandtheassociated sparsityexploitationhasbeendescribedindetailinRefs.[40,15,53]andisbeyondthe scopeofthischapter. 4.4DerivativeApproximationMethods Asstatedattheoutset,theobjectiveofthisresearchistoprovideacomparisonof theuseofvariousTaylorseries-basedderivativeapproximationmethodsforuseindirect collocationmethodsforoptimalcontrol.Tothisend,thissectionprovidesadescriptionof thefollowingthreeTaylorseries-basedapproximationmethods:nite-dierence, bicomplex-step,andhyper-dual.Inaddition,adescriptionisprovidedofautomatic dierentiation.ThecomputationaleciencyofallthreeTaylorseries-basedderivative approximationmethodsarecomparedtooneanotherandtoautomaticdierentiation. 4.4.1Finite-DierenceMethods Considerarealfunction, f x : R R suchthat f x isanalytic,innitely dierentiable,andisdenedonadomain D R .BytruncatingaTaylorseriesexpansion of f x 0 totherst-orderderivative, df dx x 0 ,thecentralnite-dierencerst-order derivativeapproximationcanbederivedas df dx x 0 f x 0 + h )]TJ/F37 11.9552 Tf 11.955 0 Td [(f x 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h 2 h {28 where h = j x )]TJ/F37 11.9552 Tf 12.377 0 Td [(x 0 j isthestepsizetakenfortheapproximationandthetruncationerror forEq.4{28isontheorder O h 2 .Similarly,thecentralnite-dierencesecond-order 95

PAGE 96

derivativeapproximationcanbewrittenas d 2 f dx 2 x 0 f x 0 + h )]TJ/F20 11.9552 Tf 11.955 0 Td [(2 f x 0 + f x 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h h 2 {29 wherethetruncationerrorforEq.4{29isontheorder O h 2 .Extendingtheconceptsof nite-dierencemethodstomultivariablefunctions,forarealfunction g x y : R R R thesecond-ordermixedpartialderivativeof g at x 0 y 0 2 R canbeapproximatedwiththe centralnite-dierencemethodas @ 2 g x 0 y 0 @ x @ y g x 0 + h x y 0 + h y )]TJ/F37 11.9552 Tf 11.955 0 Td [(g x 0 + h x y 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h y )]TJ/F37 11.9552 Tf 11.956 0 Td [(g x 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h x y 0 + h y + g x 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h x y 0 )]TJ/F37 11.9552 Tf 11.955 0 Td [(h y = 4 h x h y {30 where h x and h y arethestepsizestakenfortheindependentvariables x 0 and y 0 respectively.ThetruncationerrorforEq.4{30isontheorder O h x h y Inadditiontotruncationerror,thederivativeapproximationsinEqs.4{28to 4{30areallsubjecttoroundoerrorduetothedierencesbeingtakentocomputethe approximations.Duetonite-dierencemethodsbeingsubjecttobothtruncationand roundoerror,whenimplementingnite-dierencing,anappropriatestepsize, h ,mustbe choseninordertoreducethetruncationerrorwhilerefrainingfromexacerbatingroundo error.Forthepurposesofusingnite-dierencingasamethodforanoptimization software,theappropriatestepsize, h ,maybecomputedas, h = h O 1 + j x 0 j {31 where j x 0 j isthemagnitudeoftheindependentvariableatthepointofinterestandthe baseperturbationsize, h O 1 ,ischosentobetheoptimalstepsizeforafunctionwhose inputandoutputare O asdescribedinRef.[54]. 4.4.2Bicomplex-stepDerivativeApproximation Inthissection,thebasisofbicomplex-stepderivativeapproximationsarederived.As describedinRef.[55],anecientandaccuratewaytocomputederivativesrequiredby 96

PAGE 97

theNLPsolveristousethebicomplex-stepderivativeapproximation.Consideracomplex number c 2 C 1 = x + i 1 y {32 where x y 2 R C 0 and i 1 designatestheimaginarycomponentofthecomplexnumber inthecomplexplane C 1 andhastheproperty i 2 1 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 .Extendingtheconceptofcomplex numberstosecond-orderimaginarynumbers,abicomplexnumberisdenedas z 2 C 2 = c 1 + i 2 c 2 {33 where c 1 c 2 2 C 1 and i 2 designatesanimaginarycomponentdistinctfromthatofthe i 1 imaginarydirection.Theadditionalimaginarydirection, i 2 ,issimilarto i 1 inthat i 2 2 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 .Forbicomplexnumbers, i 1 i 2 remains i 1 i 2 thatis, i 1 i 2 isconsideredabi-imaginary componentdistinctfromeither i 1 or i 2 andthemultiplicativerelationshipbetween imaginarynumbercomponentsiscommutativethatis i 1 i 2 = i 2 i 1 .Usingthedenitions ofcomplexnumbersfromEq.4{32,Eq.4{33maybeexpandedandwrittenintermsofits realnumbercomponentsas z = x 1 + i 1 y 1 + i 2 x 2 + i 1 i 2 y 2 {34 Usingthisdenitionofbicomplexnumbers,considerabicomplexfunction f z : C 2 C 2 thatisanalyticinthedomain D2 C 2 .Becausethefunctionsofinterestare real-valued,thevaluesof z canberestrictedtothedomain D2 R suchthat f x : R R isisomorphicwithrespectto f z z 2D thatis,bicomplexnumberswithzero imaginarycomponents.For z 0 2D ,aTaylorseriesexpansionmaybetakenaboutthe realcomponent x ofthebicomplexnumber z 0 bytakingpurelyimaginarysteps hi 1 and hi 2 inboththeimaginarycomponentdirectionssuchthat z 0 = x z = x + i 1 h + i 2 h {35 97

PAGE 98

ExtendingtheconceptofaTaylorseriesexpansionofabicomplexfunctiontoa multivariablebicomplexfunction,thefollowingpartialderivativeapproximationscan bemadeforagivenanalyticfunction f x y : R R R : @ 2 f x y @ x 2 Im 1,2 [ f x + hi 1 + hi 2 y ] h 2 @ 2 f x y @ y 2 Im 1,2 [ f x y + hi 1 + hi 2 ] h 2 @ 2 f x y @ x @ y Im 1,2 [ f x + hi 1 y + hi 2 ] h 2 @ f x y @ x Im 1 [ f x + hi 1 + hi 2 y ] h = Im 2 [ f x + hi 1 + hi 2 y ] h @ f x y @ y Im 1 [ f x y + hi 1 + hi 2 ] h = Im 2 [ f x y + hi 1 + hi 2 ] h @ f x y @ x Im 1 [ f x + hi 1 y + hi 2 ] h @ f x y @ y Im 2 [ f x + hi 1 y + hi 2 ] h {36 where h > 0 isthestepsizetakeninagivenimaginarydirectionandtheTaylorseries expansionistruncatedtothesecond-orderderivativesuchthatthetruncationerror is O h 2 .Thusforanygivenfunction f x y evaluatedatinputs x y 2 R ,therstandsecond-orderpartialderivativesmaybeobtainedbyevaluatingthefunctionwith bicomplexinputsthathavethesamerealpartsandadditionallytheappropriateimaginary directioncomponentssotoobtainthedesiredpartialderivatives.Suchanapproximation fortherst-andsecond-orderderivativesisextremelyuseful,asitavoidstheneedto explicitlyorimplicitlyderivethedierentialequations.Additionally,bicomplex-step derivativeapproximationsdonotrequiretakinganydierences,thusavoidingroundo errorassociatedwithnite-dierencingandallowingthestepsizestakenintheimaginary directionstobemadearbitrarilysmallinordertoreducethetruncationerror.Itis notedthatalthoughbicomplex-stepderivativeapproximationsavoidroundoerror inthemethoditself,thebicomplexarithmeticnecessaryforevaluatingthefunctions arestillsubjecttoroundoerrorinimplementation,thuslimitingthestepsizefrom 98

PAGE 99

beingtoosmall[55].Moreover,theindependentnatureofthebicomplex-stepderivative approximationsforrst-orderderivativesenablestwoindependentrst-orderpartial derivativeapproximationstobecomputedforthesamefunctionusingasinglebicomplex evaluation.Furthermore,theeaseofusingthebicomplex-stepderivativeapproximation tosimplyevaluatethefunctionatthepointofinterestusingbicomplexinputswith appropriateimaginarycomponentscanbetakenadvantageofbyusingoperator overloadinginC++.Bydeningabicomplexclassandusingoperatoroverloadingfor allelementaryfunctions,afunctionwritteninC++canbeeasilyevaluatedwitha bicomplexinput,andtheresultingbicomplexoutputcanbeusedtodeterminethedesired partialderivatives.Thebicomplex-stepderivativeapproximationthusprovidesafastand accuratemeansofdeterminingtherst-andsecond-orderpartialderivativesofagiven function. 4.4.3Hyper-DualDerivativeApproximation Inthissection,thebasisofhyper-dualderivativeapproximationsarederived.As describedinRef.[56],anecientandexactwaytocomputederivativesrequiredbythe NLPsolveristousethehyper-dualderivativeapproximation.Consideradualnumber, d 2 D 1 = x + 1 y {37 where x y 2 R D 0 and 1 designatestheimaginarycomponentofthedualnumberin thedualplane D 1 andhastheproperty 2 1 =0 thatis, 1 isnilpotent.Extendingthe conceptofadualnumbertosecond-orderimaginarynumbers,ahyper-dualnumberis denedas w 2 D 2 = d 1 + 2 d 2 {38 where d 1 d 2 2 D 1 and 2 designatesanimaginarycomponentdistinctfromthatof the 1 imaginarydirection.Theadditionalimaginarydirection, 2 ,issimilarto 1 in that 2 2 =0 .Themultiplicativerelationshipbetweentheimaginarydirectionsofthe hyper-dualplaneisalsoanalogoustohowthebicompleximaginarydirectionsrelateas 99

PAGE 100

describedinSection4.4.2thatis 1 2 remains 1 2 andthemultiplicationofcomponents iscommutative. Usingthisdenitionofhyper-dualnumbers,considerahyper-dualfunction f w : D 2 D 2 thatisanalyticinthedomain E2 D 2 .Becausethefunctionsofinterestare real-valued,valuesof w canberestrictedtothedomain E2 R suchthat f w : R R isisomorphicwithrespectto f w w 2E thatis,hyper-dualnumberswithzero imaginarycomponents.For w 0 2E ,aTaylorseriesexpansionmaybetakenaboutthe realcomponent x ofthehyper-dualnumber w 0 bytakingpurelyimaginarysteps h 1 and h 2 inboththeimaginarycomponentdirectionssuchthat w 0 = x w = x + 1 h + 2 h {39 ExtendingtheconceptofaTaylorseriesexpansionofahyper-dualfunctiontoa multivariablehyper-dualfunction,thefollowingpartialderivativeapproximationscan bemadeforagivenanalyticfunction f x y : R R R : @ 2 f x y @ x 2 = Ep 1,2 [ f x + h 1 + h 2 y ] h 2 @ 2 f x y @ y 2 = Ep 1,2 [ f x y + h 1 + h 2 ] h 2 @ 2 f x y @ x @ y = Ep 1,2 [ f x + h 1 y + h 2 ] h 2 @ f x y @ x = Ep 1 [ f x + h 1 + h 2 y ] h = Ep 2 [ f x + h 1 + h 2 y ] h @ f x y @ y = Ep 1 [ f x y + h 1 + h 2 ] h = Ep 2 [ f x y + h 1 + h 2 ] h @ f x y @ x = Ep 1 [ f x + h 1 y + h 2 ] h @ f x y @ y = Ep 2 [ f x + h 1 y + h 2 ] h {40 where h > 0 isthestepsizetakeninagivenimaginarydirectionandthereisno truncationerrorinanyoftheapproximationsduetothenilpotentpropertyofthe hyper-dualnumberimaginarydirections.Thepartialderivativeapproximationsgivenin 100

PAGE 101

Eq.4{40areknownashyper-dualderivativeapproximations.Thusforanygivenfunction f x y evaluatedatinputs x y 2 R ,therst-andsecond-orderpartialderivativesmaybe obtainedbyevaluatingthefunctionwithhyper-dualinputsthathavethesamerealparts andadditionallytheappropriateimaginarydirectioncomponentssotoobtainthedesired partialderivatives.Suchanapproximationfortherst-andsecond-orderderivativesis extremelyuseful,asitavoidstheneedtoexplicitlyorimplicitlyderivethedierential equations.Additionally,hyper-dualderivativeapproximationsdonotrequiretaking anydierencesandavoidroundoerrorassociatedwithnite-dierencing.Duetothe propertiesofthehyper-dualarithmetic[56],thehyper-dualderivativeapproximations alsoavoidanysusceptibilitytoroundoerrorduringfunctionevaluationsoastomaintain machineprecisionforallstepsizes.Moreover,thereisnotruncationerrorwhenusingthe hyper-dualderivativeapproximationssothestepsizemaybechosenarbitrarily.Similar tothebicomplex-stepderivativeapproximation,theindependentnatureofthehyper-dual derivativeapproximationsforrst-orderderivativesenablestwoindependentrst-order partialderivativeapproximationstobecomputedforthesamefunctionusingasingle hyper-dualevaluation,andC++operatoroverloadingmaybeemployedtoalloweasy evaluationoffunctionswithhyper-dualinputs.Thehyper-dualderivativeapproximation thusprovidesafastandaccuratemeansofdeterminingtherst-andsecond-orderpartial derivativesofagivenfunction. 4.4.4AutomaticDierentiation Inthissection,thebasisofautomaticdierentiationisdiscussed.Asdescribedin Ref.[58],automaticalgorithmicdierentiationmaybederivedfromtheunifyingchain ruleandsuppliesnumericalevaluationsofthederivativeforadenedcomputerprogram bydecomposingtheprogramintoasequenceofelementaryfunctionoperationsand applyingthecalculuschainrulealgorithmicallythroughthecomputer[57].Theprocessof automaticdierentiationisdescribedindetailinRef.[57],andisbeyondthescopeofthis chapter.Itisnoted,however,thattheTaylorseries-basedderivativemethodsdescribedin 101

PAGE 102

Sections4.4.1through4.4.3arecomparedwiththeopensourceautomaticdierentiation softwareADOL-C[84,85]. 4.5ComparisonofVariousDerivativeApproximationMethods Thepurposeofthissectionistohighlighttheimportantaspectsanddierencesof implementingthederivativeestimationmethodsdescribedinSection4.4. 4.5.1DerivativeApproximationError Theestimatesofthetruncationerrorforthecentralnite-dierence,bicomplex-step, andhyper-dualderivativeapproximationmethodsderivedinSections4.4.1to4.4.3, respectively,arebasedonaTaylorseriesexpansionofananalyticfunction.Both thecentralnite-dierenceandthebicomplex-stepderivativeapproximationshave atruncationerrorthatis O h 2 ,where h isthestepsizeusedforthederivative approximation.Ontheotherhand,thehyper-dualderivativeapproximationhasno truncationerror.Moreover,nite-dierencemethodsareinherentlysubjecttoroundo errorsduetothedierencequotientusedinthemethod.Althoughthebicomplex-step derivativeapproximationdoesnotinherentlyappeartosuerfromroundoerror,the evaluationofthebicomplexarithmeticforcomplicatedfunctionsforexample,logarithmic, power,orinversetrigonometricfunctionscanleadtoroundoerrorinthederivative approximation.Ontheotherhand,thehyper-dualderivativeapproximationavoids roundoerroraltogether,asthemethoditselfrequiresnodierencestobetaken,andthe valuescomputedfortherst-andsecond-orderderivativelevelsareaccuratetomachine precisionregardlessofthestepsizeusedfortheperturbationsintheimaginarydirections. Supposenowthattherelativeerrorinaquantity d isdenedas r = j d )]TJ/F20 11.9552 Tf 12.48 2.656 Td [(^ d j 1+ j d j {41 where ^ d istheapproximationof d .Usingthedenitionoftherelativeerrorgivenin Eq.4{41,theaccuracyofthethreeTaylorseries-basedderivativeapproximationsisshown 102

PAGE 103

inFig.4-2fortheexamplefunction f x = x 2 sin x + x exp x {42 evaluatedat x =0.5 .Itisnotedforcompletenessthattheanalyticrst-andsecond-order derivativesofEq.4{42aregiven,respectively,as df x dx = x )]TJ/F20 11.9552 Tf 5.479 -9.684 Td [(2sin x )]TJ/F37 11.9552 Tf 11.955 0 Td [(x cos x + )]TJ/F37 11.9552 Tf 5.48 -9.684 Td [(x )]TJ/F37 11.9552 Tf 11.955 0 Td [(x 2 exp x sin x + x exp x 2 d 2 f x dx 2 = \000 x 2 +2 sin 2 x + )]TJ/F19 11.9552 Tf 5.479 -9.684 Td [()]TJ/F20 11.9552 Tf 9.299 0 Td [(4 x cos x )]TJ/F20 11.9552 Tf 11.955 0 Td [(6 x 2 exp x sin x +2 x 2 cos 2 x +4 x 3 exp x cos x + )]TJ/F37 11.9552 Tf 5.479 -9.684 Td [(x 4 )]TJ/F20 11.9552 Tf 11.955 0 Td [(2 x 3 exp x = sin x + x exp x 3 {43 ItisseenfromFig.4-2thatthederivativeapproximationerrorusingthecentral nite-dierencemethoddecreasesuntil h 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(5 andthenstartstoincreasefor h < 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(5 Next,itisseenfromFig.4-2thatthebicomplex-stepderivativeapproximationerror decreasesas h decreasesuntiltheerrorreachesnearmachineprecisionwithavalue r 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(15 .Finally,itisseenfromFig.4-2thatthehyper-dualderivativeapproximation errorremainsnearmachineprecisionregardlessofthevalueof h .Itisnotedthatthe derivativeapproximationerrorforautomaticdierentiationisnotshowninFig.4-2 becauseautomaticdierentiationseeSection4.4.4employsthecalculuschainruleand, thus,isaccuratetomachineprecision. 4.5.2ComputationalEciencyExpectations AsdescribedinSections4.4.1to4.4.3,forrst-andsecond-orderderivative approximations,centralnite-dierencingrequirestwoandfourrealfunctionevaluations, respectively,whileboththebicomplex-stepandhyper-dualderivativeapproximations requirejustonefunctionevaluationforbothrst-andsecond-derivatives.Althoughthe requirednumberoffunctionevaluationsmaymakeitappearasifthebicomplex-step andhyper-dualderivativeapproximationsaremorecomputationallyecient,neither ofthesetwomethodsisguaranteedtobemorecomputationallyecientthancentral nite-dierencing.Inparticular,despiterequiringmorefunctionevaluations,central 103

PAGE 104

aFirst-OrderDerivativeApproximation. bSecond-OrderDerivativeApproximation. Figure4-2.Comparisonofrelativeerrorofderivativeapproximationsobtainedusing centralnite-dierence,bicomplex-step,andhyper-dualmethodsforexample functioninEq.4{42. nite-dierencingonlyrequiresrealarithmetic,whilethebicomplex-stepandhyper-dual derivativeapproximationsrequirebicomplexandhyper-dualnumberarithmetic, respectively.Specically,bothbicomplexandhyper-dualnumbersconsistoffourreal componentsthatliealongdistinctdirections.Therefore,afunctionevaluationusingeither abicomplexorhyper-dualnumberrequiresatleastfourtimesasmanyoperationsasthe functionevaluationofarealnumber.Forexample,asingleadditionorsubtractionoftwo bicomplexnumbersrequiresfourrealnumberoperations.Furthermore,functionssuchas inversetrigonometricfunctionsandlogarithmicfunctionsrequireanevenlargernumber ofoperationsonrealnumberswhenusingeitherbicomplexorhyper-dualarithmetic.It isnotedthathyper-dualderivativeapproximationsrequirebetweenoneand 3.5 times moreoperationsthancentralnite-dierencing[56],andbicomplex-stepderivative approximationsmayrequireevenmoreoperationsduetothecomplexityofthebicomplex arithmetic[55].Consequently,althoughcentralnite-dierencingrequiresmultiplereal functionevaluationstocomputethederivativeapproximation,itmaystillbethecase thatcentralnite-dierencingwillrequirefewerrealarithmeticfunctionevaluationswhen 104

PAGE 105

comparedwithasinglehyper-dualorbicomplexfunctionevaluation.Itisnotedthatthe computationaleciencyofthebicomplex-stepandhyper-dualmethodscanbeimproved signicantlybytakingadvantageoftheabilitytocomputesimultaneouspartialderivatives ofthesamefunctionusingasinglebicomplexorhyper-dualfunctionevaluation.In fact,wheneverpossible,itisimportanttouseasinglebicomplexorhyper-dualfunction evaluationtosimultaneouslyestimatemultiplederivativessothatthenumberoffunction evaluationsisminimized.TheperformanceofthethreeTaylorseries-basedmethods relativetooneanotherinregardstocomputationaleciencywillthusdependonthe overallcomplexityofthefunctionwhosepartialderivativesareofinterest,aswellasthe numberofpartialderivativesneededforthefunction. Finally,althoughtheautomaticdierentiationdescribedinSection4.4.4utilizes realnumberarithmetic,thenumberofoperationsperformedtocomputethederivative estimationmaybesubstantialasaresultofthetracingprocessusedtotapetherecord ofthefunctionevaluationthatisofinterestthatisrequiredwhenusingautomatic dierentiationsoftwaresuchasADOL-C[84,85].Duetothecomplexnatureofoptimal controlproblems,theowcontrolofthecomputerprogramsdeningtheoptimalcontrol problemfunctionsareoftenconditionally-basedonthefunctioninputsforexample, asaresultofpiecewisemodelsorinterpolationoftabulardata.Anysuchconditional owcontrolrequiresthetracingprocessoftheautomaticdierentiationmethodtobe invokedeachtimeaderivativeisneeded,astheowcontrolmustbeproperlyrecorded foranygiveninputvalue,thusleadingtoasubstantialamountofcomputationtimeto supplyderivativeestimates[85].Consequently,eventhoughthederivativeobtainedusing automaticdierentiationisofveryhighquality,therepeatedretracingofthefunctionto computethederivativesignicantlydecreasescomputationaleciency. 4.5.3IdenticationofDerivativeDependencies InordertomaximizecomputationaleciencywhensolvinganNLParisingfrom adirectcollocationmethod,itisimportantthatthefewestnumberofderivativesbe 105

PAGE 106

computed.Inparticular,manyofthefunctionsoftheoriginalcontinuousoptimal controlproblemforexample,thevectoreldsthatdenetheright-handsideofthe dierentialequations,thepathconstraints,andtheintegrandsarefunctionsofonly someofthecomponentsofthestateandcontrol.Consequently,theprocessofexploiting thesparsestructureoftheNLPleadstomanyzeroblocksintheconstraintsJacobian andLagrangianHessianbecauseoftheindependenceofthesefunctionswithrespectto certainvariables.Moreover,eliminatingthesederivativesfromtheconstraintsJacobian andLagrangianHessiancansignicantlyimprovethecomputationaleciencywith whichtheNLPissolved.Theaforementioneddiscussionmakesitimportantanduseful todeterminetheNLPderivativedependenciesbasedonthedependenciesoftheoptimal controlproblemfunctions. Asitturnsout,thebicomplex-stepandhyper-dualderivativeapproximation methodsdescribedinSections4.4.2and4.4.3haveakeypropertythatthetheimaginary componentsforeitherofthesemethodshaveanindependentnaturethatenablesan accuratedeterminationoftheoptimalcontrolproblemderivativedependencieswhich,in turn,enablescomputingthefewestderivativesrequiredforusebytheNLPsolver.As stated,determiningthesederivativedependenciesleadstofullexploitationofthesparsity intheNLPasdescribedinSection4.3.Ontheotherhand,centralnite-dierencing asdescribedinSection4.4.1cannoteasilybeutilizedasatoolforidentifyingderivative dependenciesbecausecentralnite-dierencingishighlysusceptibletobothtruncation androundoerror.Inparticular,becausethestepsizeusedforcentralnite-dierencing cannotbemadearbitrarilysmall,anapproximationerrorisalwayspresent.Thus,when tryingtoidentifysecond-orderderivativesparsitypatterns,theevaluationofmixedpartial derivativesmaybenonzeroevenwhenthepartialderivativeitselfiszero. Becausecentralnite-dierencingcannotbeemployedeectivelyforthe determinationofderivativedependencies,otherapproachesneedtobeemployedif centralnite-dierencingischosenasthederivativeestimationmethodwhensolving 106

PAGE 107

theNLP.Onepossibilityfordeterminingderivativedependencieswhenusingcentral nite-dierencesistouseatechniquethatemploysNaNnotanumberorInfinnity propagation.MethodsthatemployNaNorInfpropagationinvolveevaluatingafunction ofinterestforvariabledependencebysettingavariableofinterestequaltoNaNorInf andseeingiftheoutputofthefunctionofinterestreturnsNaNorInf,whichwould indicatethefunctionofinterestisdependentonthevariableofinterest.Itisnoted, however,thatNaNandInfapproachesarelimitedinthattheycanonlyidentifyrst-order derivativedependencies.Asaresult,NaNandInfpropagationmethodsleadtoan over-estimationofsecond-orderderivativedependencieswheresomederivatives,whichmay actuallybezero,areestimatedtobenonzero.Thisover-estimationofthesecond-order derivativedependenciesleadstoadenserNLPLagrangianHessianwhichcansignicantly decreasecomputationaleciencywhensolvingtheNLP.Ontheotherhand,usingeither thebicomplex-steporhyper-dualderivativeapproximationmethods,thesparsitypatterns oftheNLPderivativematricescanbedeterminedexactlywhich,inturn,cansignicantly improvecomputationaleciencywhensolvingtheNLP.Itisnotedthattheautomatic dierentiationasdiscussedinSection4.4.4mayalsobeutilizedtoobtainanexactrstandsecond-orderNLPderivativematricessparsitypatternbecausetheobtainedderivative estimatesareaccuratetomachineprecision. 4.6Examples Inthissection,thederivativeestimationmethodsdescribedinSection4.4are comparedtooneanotherintermsoftheireectivenessasmethodsforusewhensolving thenonlinearprogrammingproblemNLPresultingfromthetranscriptionofthe continuousoptimalcontrolproblemusingLegendre-Gauss-RadauLGRcollocation,as developedinSections4.1through4.3.Therstexampleisthefree-yingrobotoptimal controlproblemtakenfromRef.[88].Thesecondexampleistheminimumtime-to-climb ofasupersonicaircraftoptimalcontrolproblemtakenfromRef.[89].Thethirdexample problemisthespacestationattitudecontroloptimalcontrolproblemtakenfromRef.[21]. 107

PAGE 108

Allthreeexamplesdemonstratethatthemoreaccuratederivativeestimatesofthe bicomplex-step,hyper-dual,andautomaticdierentiationmethodsasdescribedin Section4.5.1cansignicantlyreducethenumberofNLPsolveriterationsrequiredto solvetheNLPascomparedtowhenusingacentralnite-dierencemethod.Note, however,thattheresultsalsoshowtheimprovedcomputationaleciencyobtainedusing eitherthebicomplex-steporhyper-dualmethodsrelativetocentralnite-dierencing becausetheNLPsolverrequiresfewerNLPiterationstoconvergetoasolutionusing thebicomplex-stepandhyper-dualmethods.Furthermore,eventhoughthederivative obtainedusingautomaticdierentiationisaccuratetomachineprecision,thelower computationaleciencyoftheautomaticallycomputedderivativeresultsinasignicant decreaseincomputationaleciencywhensolvingtheNLP.Finally,theincreasein computationaleciencyprovidedbyexactlyidentifyingtherst-andsecond-order derivativedependenciesofthecontinuousfunctionsasdiscussedinSection4.5.3is highlightedbyallthreeexamples. Thefollowingterminologyisusedineachexample.First, K denotesthenumber ofmeshintervalsusedtodiscretizethecontinuousoptimalcontrolproblem,wherethe numberofcollocationpointsusedineachinterval k 2f 1,..., K g is N k .Furthermore, thenotation OC EC BC HD and AD isusedtodenotetheover-estimatedsparsity centralnite-dierence,exactsparsitycentralnite-dierence,bicomplex-step,hyper-dual, andautomaticdierentiationmethods,respectively.Theover-estimatedsparsitycentral nite-dierence OC methodreferstousingcentralnite-dierencingwiththeNLP derivativematricessparsitypatternobtainedfromidentifyingthederivativedependencies usingNaNpropagation,andtheexactsparsitycentralnite-dierence EC method referstousingcentralnite-dierencingwiththeNLPderivativematricessparsitypattern obtainedbyusingthehyper-dualderivativeapproximationstoidentifythederivative dependencies,asdiscussedinSection4.5.3.Itisnotedthatthebicomplex-step BC hyper-dual HD ,andautomaticdierentiation AD methodsutilizethesameNLP 108

PAGE 109

derivativematricessparsitypatternastheexactsparsitycentralnite-dierence EC method.Moreover, I T ,and denotethenumberofNLPsolveriterationstoconverge, thetotalcomputationtimerequiredtosolvetheNLP,andtheaveragecomputationtime expendedperiterationtocomputethederivativeapproximations.Finally,theuseof )]TJ/F26 7.9701 Tf 6.774 4.339 Td [(A for 2f I T g A2f EC BC HD AD g ,denotesthepercentreductionbetweenthe valueof requiredusingthe A methodversusthe OC method,asgivenby )]TJ/F26 7.9701 Tf 6.774 4.936 Td [(A = OC )]TJ/F23 11.9552 Tf 11.956 0 Td [( A OC 100, 2f I T g A2f EC BC HD AD g {44 Itisnotedthatthe OC methodisusedasabaselineofperformancecomparisoninorder tohighlightthereducedorincreasedcomputationalexpenseacquiredwhenutilizingthe othermethods. AllresultsshowninthischapterwereobtainedusingtheC++optimalcontrol software CGPOPS [90]usingtheNLPsolverIPOPT[2].TheNLPsolverwassettoan optimalitytoleranceof 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(7 forallthreeexamples.Allrst-andsecond-orderderivatives fortheNLPsolverwereobtainedusingthederivativeestimationmethodsdescribedin Section4.4.Allcomputationswereperformedona2.9GHzIntelCorei7MacBookPro runningMACOS-Xversion10.13.6HighSierrawith16GB2133MHzLPDDR3ofRAM. C++leswerecompiledusingAppleLLVMversion9.1.0clang-1000.10.44.2. 4.6.1Example1:Free-FlyingRobotProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[21]and[88]. Minimizethecostfunctional J = Z t f 0 u 1 t + u 2 t + u 3 t + u 4 t dt {45 subjecttothedynamicconstraints x t = v x t ,_ y t = v y t v x t = F 1 t + F 2 t cos t ,_ v y t = F 1 t + F 2 t sin t t = t ,_ t = F 1 t )]TJ/F23 11.9552 Tf 11.955 0 Td [( F 2 t {46 109

PAGE 110

thecontrolinequalityconstraints 0 u i t 1000, i =1,2,3,4, F i t 1, i =1,2, {47 andtheboundaryconditions x = )]TJ/F20 11.9552 Tf 9.299 0 Td [(10, x t f =0, y = )]TJ/F20 11.9552 Tf 9.298 0 Td [(10, y t f =0, v x =0, v x t f =0, v y =0, v y t f =0, = 2 t f =0, =0, t f =0, {48 where F 1 t = u 1 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 2 t F 2 t = u 3 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 4 t =0.2, =0.2. {49 TheoptimalcontrolproblemdescribedbyEqs.4{45to4{49wasapproximatedas anNLPusingLGRcollocationseeSection4.2using K =,4,8,16,32 mesh intervalswith N k =5 ineachmeshinterval.TheresultingsetofNLPsforthedierent valuesof K werethensolvedusinganover-estimatedandexactsparsitywithcentral nite-dierence,andusingexactsparsitypatternswithbicomplex-step,hyper-dual,and automaticdierentiation.Thesolutionsobtainedinallcasesareessentiallyidentical andconvergetotheexactsolutiongiveninRef.[21]as K increasesseepages 328 to 329 ofRef.[21].Comparisonsofthecomputationaleciencyintermsof I T ,and forvaryingvaluesof K aredisplayedinTable4-1.ItisobservedfromTable4-1athat boththebicomplex-step,hyper-dual,andautomaticdierentiationmethodsconsistently requirefewerNLPsolveriterationstoconvergethanthecentralnite-dierencemethod usingeitheranover-estimatedorexactsparsitypattern.Furthermore,Table4-1b showsthatboththehyper-dualandbicomplex-stepmethodsrequirelesscomputation timethanthecentralnite-dierencemethodbecausetheNLPsolverrequiredfewer iterationstoconvergeusingeitheroftheformertwomethods.Moreover,Table4-1c demonstrateshowidentifyingtheexactsparsitypatternoftheNLPderivativematrices cansignicantlyimprovethecomputationaleciencyofthemethod,astheexact 110

PAGE 111

sparsitycentralnite-dierencemethodtakesbetween 43 percentto 75 percentless timeonaverageperNLPsolveriterationrelativetotheover-estimatedsparsitycentral nite-dierencemethod.Finally,itisobservedfromTables4-1band4-1cthat automaticdierentiationrequiressubstantiallymorecomputationtimethananyof theTaylorseries-basedmethodsbecauseautomaticdierentiationmustrepeatedlyretrace thefunctioninordertoobtainthederivative. Table4-1.PerformanceresultsforExample1using OC EC BC HD and AD methods forvaryingnumberofmeshintervals K using N k =5 collocationpointsineach meshinterval. aNLPsolveriterations, I KI )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(EC I )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(BC I )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(HD I )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(AD I 240022.5022.5022.50 445028.8928.8928.89 86216.1319.3519.3519.35 1648022.9222.9222.92 3266021.2121.2121.21 bComputationTime, T K T s )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(EC T )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(BC T )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(HD T )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(AD T 20.087614.9629.5418.30-5982.22 40.12058.5429.2824.48-5741.15 80.251024.5127.4425.50-8390.67 160.297314.4327.3424.76-10326.47 320.77697.3229.3630.71-14885.30 cAverageTimeperNLPIteration, K ms )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(EC )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(BC )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(HD )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(AD 20.577764.0068.5064.08-28402.91 40.641159.7261.3256.49-32794.73 80.904157.7851.7852.59-45800.42 161.516448.4641.6338.81-53367.95 322.918035.0030.0134.96-74946.84 4.6.2Example2:MinimumTime-to-ClimbSupersonicAircraftProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[89].Minimizethe costfunctional J = t f {50 111

PAGE 112

subjecttothedynamicconstraints h t = v t sin t v t = T t cos t )]TJ/F37 11.9552 Tf 11.955 0 Td [(D t m t )]TJ/F23 11.9552 Tf 13.151 8.088 Td [( sin t r 2 t m t = )]TJ/F37 11.9552 Tf 10.494 8.088 Td [(T t g 0 I sp t = T t sin t + L t m t v t +cos t v t r t )]TJ/F23 11.9552 Tf 33.493 8.088 Td [( v t r 2 t {51 thecontrolinequalityconstraint )]TJ/F23 11.9552 Tf 10.494 8.088 Td [( 4 t 4 {52 andtheboundaryconditions h =0 m h t f =19994.88 m v =129.314 m/s v t f =295.092 m/s =0 deg t f =0 deg m =0 kg m t f = Free {53 where r t = h t + R e C L t = C L M t A t = A h t M t = v t A t C L t = C L t t T t = T h t M t t = h t C D 0 t = C D 0 M t q t = 1 2 t v 2 t t = M t L t = Sq t C L t D t = Sq t C D t C D t = C D 0 t + t C L t 2 t R e =6378145 m =3.986 10 14 m 3 /s 2 g 0 =9.80665 m/s 2 S =49.2386 m 2 I sp =1600 s {54 ThemodelsusedfortheproblemwerecreatedusingdatatakenfromRef.[89]. 112

PAGE 113

TheoptimalcontrolproblemdescribedbyEqs.4{50to4{54wasapproximatedusing LGRcollocationseeSection4.2using K =,4,8,16,32 meshintervalswith N k =5 collocationpointsineachmeshinterval.TheresultingsetofNLPsforthedierentvalues of K werethensolvedusinganover-estimatedandexactsparsitypatternwithcentral nite-dierence,andusingexactsparsitypatternswithbicomplex-step,hyper-dual,and automaticdierentiation.Thesolutionsobtainedinallcasesareessentiallyidenticaland convergetotheexactsolutionseepages 256 to 264 ofRef.[21].Comparisonsofthe computationaleciencyintermsof I T ,and forvaryingvaluesof K aredisplayed inTable4-2.ItisseeninTable4-2athatinnearlyallcasesthebicomplex-step, hyper-dual,andautomaticdierentiationmethodsrequirefewerNLPsolveriterations toconvergethanthecentralnite-dierencemethodusingeitheranover-estimatedor exactsparsitypattern.Furthermore,Table4-2bshowsthatboththehyper-dualand bicomplex-stepmethodsrequirelesscomputationtimethanthecentralnite-dierence methodbecausetheNLPsolverrequiresfeweriterationstoconvergeusingeitherof theformertwomethods.Moreover,Table4-2cshowsthatthebicomplex-stepand hyper-dualmethodscanbemorecomputationallyecientperNLPiterationthanthe centralnite-dierencemethod.Inparticular,forthisexamplethecentralnite-dierence methodtakesapproximately 30 percentlongeronaveragethaneitheroftheformertwo methods.Finally,itmaybeobservedfromTables4-2band4-2cthatthe AD method requiressubstantiallymorecomputationtimethananyoftheTaylorseries-basedmethods becauseautomaticdierentiationmustrepeatedlyretracethefunctioninordertoobtain thederivative. 4.6.3Example3:SpaceStationAttitudeControl Considerthefollowingspacestationattitudecontroloptimalcontrolproblemtaken fromRefs.[91]and[21].Minimizethecostfunctional J = 1 2 Z t f t 0 u T u dt {55 113

PAGE 114

Table4-2.PerformanceresultsforExample2using OC EC BC HD ,and AD methods forvaryingnumberofmeshintervals K using N k =5 ineachmeshinterval. aNLPSolverIterations, I KI )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(EC I )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(BC I )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(HD I )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(AD I 224826.6179.0366.9471.37 4306.67-43.33-43.33-43.33 852-1.9230.7730.7730.77 1670-7.1432.8632.8632.86 3253026.4226.4226.42 bComputationTime, T K T s )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(EC T )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(BC T )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(HD T )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(AD T 20.652931.2581.3969.64-1315.45 40.14285.09-14.69-12.51-7375.47 80.4029-1.3444.0241.11-4682.36 161.0057-1.1249.0648.54-4541.37 321.40720.7140.2642.88-5130.10 cAverageTimeperNLPIteration, K ms )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(EC )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(BC )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(HD )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(AD 21.52678.2137.4133.18-8227.16 42.70675.9232.0536.20-8781.22 85.21322.3836.3834.10-9851.17 1610.81107.9238.3038.23-8865.56 3220.38692.6932.1836.26-8895.19 subjecttothedynamicconstraints = J )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 gg r )]TJ/F43 11.9552 Tf 11.955 0 Td [(! [ J + h ] )]TJ/F42 11.9552 Tf 11.955 0 Td [(u r = 1 2 rr T + I + r [ )]TJ/F43 11.9552 Tf 11.955 0 Td [(! 0 r ] h = u {56 theinequalitypathconstraint k h k h max {57 114

PAGE 115

andtheboundaryconditions t 0 =0, t f =1800, = 0 r = r 0 h = h 0 0 = J )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 gg r t f )]TJ/F43 11.9552 Tf 11.955 0 Td [(! t f [ J t f + h t f ] 0 = 1 2 r t f r T t f + I + r t f [ t f )]TJ/F43 11.9552 Tf 11.956 0 Td [(! 0 r t f ] {58 where r h isthestateand u isthecontrol.Inthisformulation istheangular velocity, r istheEuler-Rodriguesparametervector, h istheangularmomentum,and u is theinputmomentandisthecontrol.Furthermore, 0 r = )]TJ/F23 11.9552 Tf 9.299 0 Td [(! orb C 2 gg r =3 2 orb C 3 JC 3 orb =0.06511 180 h max =10000, {59 and C 2 and C 3 arethesecondandthirdcolumn,respectively,ofthematrix C = I + 2 1+ r T r )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(r r )]TJ/F42 11.9552 Tf 11.955 0 Td [(r {60 Inthisexamplethematrix J isgivenas J = 2 6 6 6 6 4 2.80701911616 10 7 4.822509936 10 5 )]TJ/F20 11.9552 Tf 9.298 0 Td [(1.71675094448 10 7 4.822509936 10 5 9.5144639344 10 7 6.02604448 10 4 )]TJ/F20 11.9552 Tf 9.299 0 Td [(1.71675094448 10 7 6.02604448 10 4 7.6594401336 10 7 3 7 7 7 7 5 {61 115

PAGE 116

whiletheinitialconditions 0 r 0 ,and h 0 are 0 = 2 6 6 6 6 4 )]TJ/F20 11.9552 Tf 9.299 0 Td [(9.5380685844896 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 )]TJ/F20 11.9552 Tf 9.299 0 Td [(1.1363312657036 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 +5.3472801108427 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 3 7 7 7 7 5 r 0 = 2 6 6 6 6 4 2.9963689649816 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 1.5334477761054 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 3.8359805613992 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 3 7 7 7 7 5 h 0 = 2 6 6 6 6 4 5000 5000 5000 3 7 7 7 7 5 {62 Amoredetaileddescriptionofthisproblem,includingalloftheconstants J 0 r 0 ,and h 0 ,canbefoundinRefs.[91]or[21]. TheoptimalcontrolproblemdescribedinEqs.4{55to4{62wasapproximatedusing LGRcollocationseeSection4.2using K =,4,8,16,32 meshintervalswith N k =5 collocationpointsineachmeshinterval.TheresultingsetofNLPsforthedierentvalues of K werethensolvedusinganover-estimatedandexactsparsitypatternwithcentral nite-dierence,andanexactsparsitypatternusingbicomplex-step,hyper-dual,and automaticdierentiation.Thesolutionsobtainedinallcasesareessentiallyidenticaland convergetotheexactsolutionseepages 296 { 297 ofRef.[21].Comparisonsofthe computationaleciencyintermsof I T ,and forvaryingvaluesof K aredisplayed inTable4-3.ItisseeninTable4-3athatfor K < 32 meshintervalsthatthenumber ofNLPsolveriterationsisapproximatelythesameforanyofthevemethods.Onthe otherhand,for K =32 meshintervals,boththebicomplex-stepandhyper-dualmethods require 39.72 percentfeweriterationsthantheover-estimatedcentralnite-dierence method,whiletheexactsparsitycentralnite-dierenceandautomaticdierentiation methodsrequire 24.11 percentand 36.88 percentfeweriterations,respectively. Furthermore,Table4-3bshowsthatforallofthecasesstudiedboththehyper-dual andbicomplex-stepmethodsalsorequirelesscomputationtimethantheover-estimated sparsitycentralnite-dierencemethod.Moreover,Table4-3cshowstheincreasein 116

PAGE 117

computationaleciencyperiterationwhenusinganexactNLPsparsitypattern,asthe exactsparsitycentralnite-dierencemethodtakes 61 percentto 73 percentlesstime onaverageperNLPiterationthantheover-estimatedsparsitycentralnite-dierence methodonalltestedinstances.Finally,itisobservedinTables4-3band4-3cthatthe automaticdierentiationmethodrequiressubstantiallymorecomputationtimethanany oftheTaylorseries-basedmethods. Table4-3.PerformanceresultsforExample3using OC EC BC HD ,and AD methods forvaryingnumberofmeshintervals K with N k =5 collocationpointsineach meshinterval. aNLPSolverIterations, I KI )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(EC I )]TJ/F38 7.9701 Tf 6.774 4.338 Td [(BC I )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(HD I )]TJ/F38 7.9701 Tf 6.775 4.338 Td [(AD I 2220000 4330000 844-4.55-4.55-4.55-4.55 1650-6.00-10.00-6.00-8.00 3214124.1139.7239.7236.88 bComputationTime, T K T s )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(EC T )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(BC T )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(HD T )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(AD T 20.262853.7155.5352.39-7420.02 40.470350.8646.9849.26-11200.24 80.852243.7233.7533.63-16350.86 161.411840.6120.1027.41-22562.69 327.736153.2057.3857.50-12922.78 cAverageTimeperNLPIteration, K ms )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(EC )]TJ/F38 7.9701 Tf 6.774 4.339 Td [(BC )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(HD )]TJ/F38 7.9701 Tf 6.775 4.339 Td [(AD 28.287373.3874.4575.30-10222.58 49.295172.1368.5769.24-16673.23 811.608269.7554.4956.43-25547.80 1615.805665.0536.1340.89-36645.81 3226.115960.0626.0626.66-42707.56 4.7Discussion AsdevelopedinSections4.1through4.3,transcribingacontinuousoptimalcontrol problemintoalargesparsenonlinearprogrammingproblemNLPusingdirectcollocation introducesthenecessityofanecientmethodfortheNLPsolveremployedtosolvethe 117

PAGE 118

resultingNLP.Thecentralnite-dierencing,bicomplex-stepderivativeapproximation, andhyper-dualderivativeapproximationdescribedinSections4.4.1through4.4.3have truncationerrorestimatesbasedonTaylorseriesexpansions[54,55,56].Section4.5.1 demonstratedthat,whilethecentralnite-dierencingandthebicomplex-stepderivative approximationshavetruncationerrorsontheorderof O h 2 ,thebicomplex-step derivativeapproximationhasasignicantadvantageovercentralnite-dierencing becauseoftheroundoerrorassociatedwithcentralnitedierencing.Moreover,as seeninFig.4-2,thebicomplex-stepderivativeapproximationcanbeemployedusingan arbitrarilysmallstepsizesuchthatthetruncationerrorreachesnearmachineprecision [55].Conversely,whenemployingcentralnite-dierencing,astepsizemustbechosen inamannerthatminimizesthesumofthetruncationerrorandtheroundoerror[54]. Next,thehyper-dualderivativeapproximationdoesnotsuerfromeithertruncationerror orroundoerror.Asaresult,anarbitrarystepsizemaybeusedwhenimplementing thehyper-dualderivativeapproximation,andthisapproximationisalwaysaccurateto machineprecision.Theaccuracyofthehyper-dualderivativeapproximationisalsoshown inFig.4-2.Finally,thederivativeestimatesobtainedusingtheautomaticdierentiation discussedinSection4.4.4areaccuratetomachineprecision,becausethederivativeis computedalgorithmicallyusingthecalculuschainrule. Theimmunityofthebicomplex-stepandhyper-dualderivativeapproximations toroundoerrorenableseitherofthesederivativeapproximationmethodstoprovide extremelyaccuratederivativeapproximationsfortheNLPsolver.Infact,thederivative estimatesobtainedusingeitherofthesemethodsarecomparableinaccuracytothe derivativesobtainedusingautomaticdierentiation.Theaccuracyofthederivative estimatessuppliedtotheNLPsolverhasanenormousimpactonthesearchdirection takenbytheNLPsolverandtheassociatedrateofconvergence.Asdemonstratedbythe threeexampleproblemsshowninSection4.6,theincreasedaccuracyofthederivative estimatesprovidedbythebicomplex-step,hyper-dual,andautomaticdierentiation 118

PAGE 119

methodsmostoftenenablestheNLPsolvertoconvergeinfeweriterationswhencompared withusingthederivativeestimatesobtainedusingcentralnite-dierencing.Thereason thattheNLPsolverdoesnotinallcasesconvergeinfeweriterationsusingbicomplex-step, hyper-dual,orautomaticdierentiationwhencomparedwithcentralnite-dierencingis duetothefactthattheNLPsolveremploysaNewtonmethodtodeterminethesearch directiononeachiteration.Inparticular,theNewtonmethodisbaseduponaquadratic approximationwhichmaynotleadtothefastestconvergencerateinthecasewherethe NLPishighlynonlinear.Thuseventhoughthebicomplex-step,hyper-dual,andautomatic dierentiationmethodsprovidemoreaccurateapproximationsoftheNLPderivative matrices,thesearchdirectionschosenuponeachiterationusingthelessaccuratecentral nite-dierencemethodsmay,inarelativelyinfrequentnumberofcases,inadvertently causetheNLPsolvertoconvergeinfeweriterations. ForallthreeexampleproblemsinSection4.6,thefewernumberofNLPsolver iterationsleadstoreducedcomputationtimewhenusingeitherthebicomplex-stepor hyper-dualmethodascomparedtothecentralnite-dierencemethod.Thislower computationtimearisesfromthefactthatthemajorityofcomputationtimetosolvethe NLPisspentcomputingderivativeapproximations.Thesefeweriterationsleadtofewer computationsofthederivativeestimatesandmakesthebicomplex-stepandhyper-dual methodsadvantageousoverthecentralnite-dierencemethod.Interestingly,thefewer numberofiterationsrequiredwhenusingautomaticdierentiationisoutweighedbythe largecomputationtimeperiterationrequiredwhenusingautomaticdierentiationrelative totheotherderivativeapproximationmethods. Finally,forallthreeTaylorseries-basedderivativeapproximationspresentedin Sections4.4.1through4.4.3,aperturbationtotheinputsofthefunctionwhosederivative isofinterestisrequiredinordertocomputethederivativeapproximation.Asdiscussed inSection4.4.1,centralnite-dierencingissubjecttobothroundoandtruncation error,thuslimitingtheminimumstepsizethatcanbeused.Theeectoftheless 119

PAGE 120

accuratederivativeapproximationofcentralnite-dierencingisdemonstratedin Section4.6wherethecentralnite-dierencemethodsgenerallyrequiremoreNLP solveriterationstoconvergewhencomparedwitheitherbicomplex-step,hyper-dual,or automaticdierentiation.Whilethebicomplex-stepderivativeapproximationdescribed inSection4.4.2appearstobesubjecttoonlytruncationerror,inpracticeroundo errorcanoccurduetotheevaluationofthebicomplexnumberarithmeticwhenusing doubleprecisioncomputations.Thefactthatsomeofthederivativeapproximations becomelessaccurateforstepsizesbelowacertainmagnitudewhenimplementingthe bicomplex-stepderivativeapproximationisanartifactofusingdoubleprecisionarithmetic intheimplementation.Ontheotherhand,thehyper-dualderivativeapproximation presentedinSection4.4.3isimmunetobothroundoandtruncationerror.Thuswhen implementingthehyper-dualderivativeapproximation,theperturbationstepsizeis arbitraryanddoesnotaecttheaccuracyoftheapproximation.Conversely,theaccuracy ofcentralnite-dierencingandbicomplex-stepderivativeapproximationsaredependent uponthestepsize,leadingtoscalingandroundingissuesthatmakeimplementation moredicultandlessaccuratewhencomparedwiththehyper-dualapproximation. Finally,althoughautomaticdierentiationprovidesderivativeestimatesthatareaccurate tomachineprecision,thecomputationaloverheadrequiredisfoundtobeexcessively expensive,thusmakingimplementationimpracticalwhencomparedtoanyoftheTaylor series-basedderivativeapproximationmethods. 4.8Conclusions Fourderivativeestimationmethods,centralnite-dierencing,bicomplex-step, hyper-dual,andautomaticdierentiation,havebeencomparedintermsoftheir eectivenessforusewithdirectcollocationmethodsforsolvingoptimalcontrolproblems. Theprocessoftranscribingacontinuousoptimalcontrolproblemintoalargesparse nonlinearprogrammingproblemusingapreviouslydevelopedLegendre-Gauss-Radau directcollocationmethodisdescribed.Theformoftheresultantnonlinearprogramming 120

PAGE 121

problemandtheneedforanecientmethodtofacilitatetheNLPsolveremployed ispresented.ThethreeTaylorseries-basedderivativeapproximations,central nite-dierencing,bicomplex-step,andhyper-dual,arederived.ThesethreeTaylor series-basedmethodsarethencomparedtooneanotherandcomparedtoautomatic dierentiationintermsofaccuracy,computationaleciency,andimplementation. Theperformanceofanonlinearprogrammingproblemsolveristhendemonstrated onthreebenchmarkoptimalcontrolproblems.TheperformanceoftheNLPsolveris assessedintermsofnumberofiterationstosolve,computationtimeperiteration,and computationtime.Despitetheobservationthatcentralnite-dierencingrequiresless computationtimeperiterationthaneitherthebicomplex-steporthehyper-dualmethod, thelattertwomethodsrequiresignicantlylessoverallcomputationtimebecausethe NLPsolverrequiressignicantlyfeweriterationstoconvergetoasolution.Moreover,the bicomplex-stepandhyper-dualmethodsarefoundtohavesimilarperformance,although thehyper-dualmethodisfoundtobesignicantlyeasiertoimplement.Additionally, automaticdierentiationisfoundtorequiresubstantiallymorecomputationtimethanany oftheTaylorseries-basedmethods.Finally,apreliminarycomparisonofthederivative estimationmethodsforsolvingoptimalcontrolproblemsusingdirectcollocationis foundtofavorthehyper-dualmethodintermsofcomputationaleciencyandeaseof implementation. 121

PAGE 122

CHAPTER5 MESHREFINEMENTMETHODFORSOLVINGBANG-BANGOPTIMALCONTROL PROBLEMSUSINGDIRECTCOLLOCATION Theobjectiveofthischapteristodescribethedevelopmentofameshrenement methoddesignedforhandlingthediscontinuitieswhichappearinaparticularclassof optimalcontrolproblemsknownasbang-bangoptimalcontrolproblems.Bang-bang optimalcontrolproblemsariseinawidevarietyofwell-knownapplicationareas[92].A keyfeatureofanoptimalcontrolproblemwithabang-bangoptimalcontrolisthatthe Hamiltonianislinearwithrespecttooneormorecomponentsofthecontrol.Duetothe lineardependenceoftheHamiltonianonthecontrolandundertheassumptionthatthe solutiondoesnotcontainanysingulararcs,Pontryagin'sminimumprincipleappliessuch thattheoptimalcontrolliesateitheritsminimumormaximumlimit.Inthecontextof ameshrenementmethodusingcollocation,ifthemethodcouldalgorithmicallydetect thebang-bangstructureoftheoptimalsolution,itmaybepossibletoobtainanaccurate solutioninamorecomputationallyecientmannerthanwouldbepossibleusinga standardmeshrenementmethodthatdoesnotexploitthestructureofthesolution. Whilethe hp meshrenementmethodsasdescribedinRefs.[31,32,61,33,34]can improveaccuracyandcomputationaleciencywhencomparedwithtraditional h or p methods,akeymissingaspectofthesemethodsisthattheydonotexploitthestructure oftheoptimalsolution.Thereaderisremindedthat hp -methodswerepreviouslydened onpage16asachievingconvergenceusingdirecttranscriptionbyincreasingthenumber ofmeshintervalsusedand/orthedegreeofthepolynomialwithineachmeshinterval. Inparticular,inthecasewheretheoptimalsolutionisnonsmooth,ratherthanrening themeshbasedonknowledgeofthestructureofthesolution,thesepreviouslydeveloped methodsimproveaccuracybyincreasingthenumberofcollocationpointsinthevicinity ofadiscontinuity.Asaresult,thesemethodsoftenplaceanundesirablylargenumberof collocationpointsintheneighborhoodofadiscontinuity.Consequently,optimalcontrol 122

PAGE 123

problemswhosecontrolsarediscontinuouscanrequirealargenumberofmeshrenement iterationstoconvergeusingthepreviouslydeveloped hp -adaptivemethods. Theobjectiveofthisresearchistodevelopameshrenementmethodforsolving bang-bangoptimalcontrolproblemsbyalgorithmicallyexploitingthestructureofthe optimalsolution.Inparticular,thisresearchfocusesonthedevelopmentofamethod thatsignicantlyimprovescomputationaleciencywhilesimultaneouslyreducingthe meshsizeandthenumberofmeshrenementiterationsrequiredinordertoobtaina solutiontoabang-bangoptimalcontrolproblem.Previousresearchforsolvingbang-bang optimalcontrolproblemshasbeenconductedusingindirectmethods.Refs.[93,94,95, 96,97,98,99,100]employindirectshootingwhileRefs.[99,100]includethesecond-order optimalityconditionsforbang-bangoptimalcontrolproblems.Furthermore,Refs.[101, 102,103]employadirectshootingmethodforsolvingbang-bangoptimalcontrolproblems byparameterizingthecontrolusingpiecewiseconstantswherethedurationsofthe intervalsareaddedasoptimizationparametersinordertosolveforthebang-bang controlprole.Inparticular,Ref.[103]combinestheswitchtimecomputationandthe time-optimalswitchingmethoddevelopedinRefs.[101]and[102],respectively.Inthe contextof hp -adaptivemeshrenementmethods,knottingmethodshavebeendeveloped inRefs.[104,105]whichallowdiscontinuitiesinoptimalcontrolprolestobetakeninto accountbyexplicitlyintroducingaswitchtimevariabletotheproblemdenition.In particular,Ref.[104]utilizestheconceptofsuper-elementswhichintroduceswitchtime variablesthataretakenintoaccountasparametersintheresultingoptimizationprocess. ThemodiedLegendrepseudospectralschemedescribedinRef.[92]alsousesasimilar approachbyhandlingbang-bangoptimalcontrolproblemsusingaknottingmethodthat solvesfortheoptimalcontrolusinganassumednumberofswitchtimesandconstant controlarcs.Theassumednumberofswitchtimesisthenincreasedordecreasedfor eachiterationbasedontheapproximatedsolution,withtheschemeconverginguponthe solutionfortheoptimalnumberofswitchtimes.Additionally,Ref.[62]describesaslight 123

PAGE 124

modicationofthe hp -adaptivemeshrenementderivedinRef.[34],wherenewmesh pointsareplacedatdiscontinuitylocationsthatareestimatedbasedontheswitching functionsoftheHamiltonianoftheoptimalcontrolproblem.Finally,Ref.[63]describesa meshrenementmethodthatisusedinconjunctionwiththeaforementioned hp -adaptive meshrenementmethodsanddetectsdiscontinuitiesviajumpfunctionapproximations. Inthischapteranewdirectcollocationmeshrenementmethodisdevelopedfor solvingoptimalcontrolproblemswhosesolutionshaveabang-bangstructure.Whilein principlethemethodofthischaptercanbeusedwithanycollocationmethod,inthis chaptertheLegendre-Gauss-Radaucollocationmethod[39,30,28,29,77,80,81]is employedbecauseitproducesaccuratestate,control,andcostateapproximations[39,30, 28,29,81].Moreover,theapproachofthischapterisdesignedtobeusedinconjunction withapreviouslydeveloped hp meshrenementmethodsuchasthosedescribedin Refs.[31,32,61,33,34].First,asolutionisobtainedonacoarsemesh.Next,usingthe solutiononthiscoarsemesh,thecostateisestimatedatthecollocationpointsusingthe methodsdevelopedinRefs.[30,28,29].Then,thestateandcostateapproximations onthecoarsemeshareusedtodeterminealgorithmicallyiftheHamiltonianislinear withrespecttooneormorecomponentsofthecontrol.Usingthestateandcostate approximations,theswitchingfunctionsareestimatedatthecollocationpointsfor thosecomponentsofthecontrolforwhichtheHamiltoniandependsuponlinearly.The estimatesoftheswitchingfunctionsarethenusedtoestimateadiscontinuityinthe controlbetweenanytwocollocationpointswhereaswitchingfunctionchangessign.Using theseestimatesofthecontroldiscontinuities,thelocationsoftheswitchtimesinthe controlarethenintroducedasoptimizationvariablesandtheoptimalcontrolproblem isdividedintomultipledomains.Withineachdomain,thosecomponentsofthecontrol thathaveabang-bangsolutionstructurearexedateithertheirlowerorupperlimits dependinguponthesignoftheswitchingfunction.Itisimportanttonotethatthose controlcomponentsthatdonothaveabang-bangstructureremainfreetovarywithin 124

PAGE 125

theirdenedbounds.Furthermore,itisnotedthatthemultiple-domainformulationis analogoustousingsuper-elementsasdescribedinRef.[104],withakeydierencebeing thatthestructureofthebang-bangoptimalcontrolprolehasbeenalgorithmically detectedusingtheestimatesoftheswitchingfunctionsfoundontheinitialmesh.The multiple-domainoptimalcontrolproblemisthensolvedusingLGRcollocationwhere itisnotedagainthattheswitchtimesaredeterminedaspartoftheoptimization.The materialinthischapterisbasedonRef.[64]. Thischapterisorganizedasfollows.Section5.1denesthegeneralsingle-phase optimalcontrolprobleminBolzaform.Section5.2describestherationaleforusing Legend-Gauss-Radaucollocationpointsasthesetofnodestodiscretizethecontinuous optimalcontrolproblemandtheLegendre-Gauss-Radaucollocationmethod.Section5.3 brieyoverviewstheformofbang-bangoptimalcontrolproblems.Section5.4describes thebang-bangmeshrenementmethodofthischapter.Section5.5demonstratesthe performanceofthemeshrenementmethodofthischapterwhensolvingbang-bang optimalcontrolproblemsascomparedtothefourpreviouslydeveloped hp -adaptivemesh renementmethodsofRefs.[61,31,33,34].Section5.6providesadiscussionofboththe approachandtheresults.Finally,Section5.7providesconclusionsonthisresearch. 5.1Single-PhaseOptimalControlProblem Withoutlossofgenerality,considerthefollowinggeneralsingle-phaseoptimalcontrol probleminBolzaformdenedonthetimehorizon t 2 [ t 0 t f ] .Determinethestate y t 2 R 1 n y ,thecontrol u t 2 R 1 n u ,thestarttime t 0 2 R ,andtheterminustime t f 2 R thatminimizetheobjectivefunctional J = M y t 0 t 0 y t f t f + Z t f t 0 L y t u t t dt {1 subjecttothedynamicconstraints d y dt = a y t u t t {2 125

PAGE 126

theinequalitypathconstraints c min c y t u t t c max {3 andtheboundaryconditions b min b y t 0 t 0 y t f t f b max {4 5.2Legendre-Gauss-RadauCollocation Inordertodevelopthemethoddescribedinthischapter,adirectcollocation methodmustbechosen.Whileinprincipleanydirectcollocationmethodcan beusedtoapproximatetheoptimalcontrolproblemgiveninSection5.1,inthis researchthepreviouslydevelopedLegendre-Gauss-RadauLGRcollocationmethod [39,30,28,29,61,81]willbeusedbecauseithasbeenshownthattheLGRcollocation methodproducesanaccuratestate,control,andcostate[39,30,28,29,81].Itisnoted thattheaccuracyofthecostateestimateoftheLGRcollocationmethodplaysan importantroleinthemethodofthischapterbecausetheaccuracyofthecostatedirectly inuencestheaccuracyoftheestimatesoftheswitchingfunctionsoftheHamiltonian whichareinturnusedtoestimatetheswitchtimesintheoptimalcontrolformingthe basisofthemethodofthischapter. Inthecontextofthisresearch,amultiple-intervalformoftheLGRcollocation methodischosen.Thetimehorizon t 2 [ t 0 t f ] maybedividedinto Q timedomains, P d =[ t [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s t [ d ] s ] [ t 0 t f ], d 2f 1,..., Q g ,suchthat Q [ d =1 P d =[ t 0 t f ], Q d =1 P d = f t [1] s ,..., t [ Q )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s g {5 where t [ d ] s d 2f 1,..., Q )]TJ/F20 11.9552 Tf 12.648 0 Td [(1 g aretheswitchtimevariablesoftheproblem, t [0] s = t 0 and t [ Q ] s = t f .Thusinthecasewhere Q =1 thedomainconsistsofonlyasingledomain P 1 =[ t 0 t f ] and f t [1] s ,..., t [ Q )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s g = ; .Inthemultiple-intervalLGRcollocationmethod, eachofthetimedomains P d =[ t [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] s t [ d ] s ], d 2f 1,..., Q g ,isconvertedintothedomain 126

PAGE 127

2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] usingtheanetransformation, t = t [ d ] s )]TJ/F37 11.9552 Tf 11.955 0 Td [(t [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] s 2 + t [ d ] s + t [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] s 2 =2 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(t [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s t [ d ] s )]TJ/F37 11.9552 Tf 11.955 0 Td [(t [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s )]TJ/F20 11.9552 Tf 11.955 0 Td [(1. {6 Theinterval 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] foreachdomain P d isthendividedinto K meshintervals, S k =[ T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T k ] [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1], k 2f 1,..., K g suchthat K [ k =1 S k =[ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1], K k =1 S k = f T 1 ,..., T K )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 g {7 and )]TJ/F20 11.9552 Tf 9.298 0 Td [(1= T 0 < T 1 < ... < T K )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 < T K =+1 .Foreachmeshinterval,theLGR pointsusedforcollocationaredenedinthedomainof [ T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T k ] for k 2f 1,..., K g .The stateofthecontinuousoptimalcontrolproblemisthenapproximatedinmeshinterval S k k 2f 1,..., K g ,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 )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l k j )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l {8 where ` k j for j 2f 1,..., N k +1 g isabasisofLagrangepolynomialson S k k 1 ,..., k N k arethesetof N k Legendre-Gauss-RadauLGR[82]collocation pointsintheinterval [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k k N k +1 = T k isanon-collocatedsupportpoint,and Y k j Y k k j .Dierentiating Y k inEq.5{8withrespectto gives d Y k d = N k +1 X j =1 Y k j d ` k j d {9 Thedynamicsarethenapproximatedatthe N k LGRpointsinmeshinterval k 2f 1,..., K g as N k +1 X j =1 D k lj Y k j )]TJ/F37 11.9552 Tf 13.15 8.087 Td [(t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y k l U k l t k l t 0 t f = 0 l 2f 1,..., N k g {10 where D k lj = d ` k j k l d l 2f 1,..., N k g j 2f 1,..., N k +1 g 127

PAGE 128

aretheelementsofthe N k N k +1 Legendre-Gauss-Radaudierentiationmatrix[30] inmeshinterval S k k 2f 1,..., K g ,and U k l istheapproximationofthecontrolat the l th collocationpointinmeshinterval S k .Itisnotedthatcontinuityinthestateand timebetweenmeshintervals S k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 and S k k 2f 1,..., K g ,isenforcedbyusingthesame variablestorepresent Y k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 N k )]TJ/F21 5.9776 Tf 5.756 0 Td [(1 +1 and Y k 1 ,whilecontinuityinthestatebetweenthedomains P d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 and P d d 2f 2,..., Q g ,isachievedusingtheadditionalcontinuityconstraint Y [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] N [ d )]TJ/F21 5.9776 Tf 5.757 0 Td [(1] +1 = Y [ d ] 1 {11 wherethesuperscript [ d ] isusedtodenotethe d th timedomain, Y [ d ] j denotesthevalueof thestateapproximationatthe j th discretizationpointinthetimedomain P d ,and N [ d ] is thetotalnumberofcollocationpointsusedintimedomain P d computedby N [ d ] = K [ d ] X k =1 N [ d ] k {12 TheLegendre-Gauss-Radauapproximationofthemultiple-domainoptimalcontrol problemthenleadstothefollowingnonlinearprogrammingproblemNLP.Minimizethe objectivefunction J = M Y [1] 1 t 0 Y [ Q ] N [ Q ] +1 t f + Q X d =1 t [ d ] s )]TJ/F37 11.9552 Tf 11.955 0 Td [(t [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s 2 w [ d ] T L [ d ] {13 subjecttothedefectconstraints [ d ] = D [ d ] Y [ d ] )]TJ/F37 11.9552 Tf 13.15 8.088 Td [(t [ d ] s )]TJ/F37 11.9552 Tf 11.955 0 Td [(t [ d )]TJ/F21 7.9701 Tf 6.587 0 Td [(1] s 2 A [ d ] = 0 d 2f 1,..., Q g {14 thepathconstraints c min C [ d ] j c max j 2f 1,..., N [ d ] g d 2f 1,..., Q g {15 theboundaryconditions b min b Y [1] 1 t 0 Y [ Q ] N [ Q ] +1 t f b max {16 128

PAGE 129

andthecontinuityconstraints Y [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] N [ d )]TJ/F21 5.9776 Tf 5.756 0 Td [(1] +1 = Y [ d ] 1 d 2f 2,..., Q g {17 where A [ d ] = 2 6 6 6 6 4 a Y [ d ] 1 U [ d ] 1 t [ d ] 1 . a Y [ d ] N [ d ] U [ d ] N [ d ] t [ d ] N [ d ] 3 7 7 7 7 5 2 R N [ d ] n y {18 C [ d ] = 2 6 6 6 6 4 c Y [ d ] 1 U [ d ] 1 t [ d ] 1 . c Y [ d ] N [ d ] U [ d ] N [ d ] t [ d ] N [ d ] 3 7 7 7 7 5 2 R N [ d ] n c {19 L [ d ] = 2 6 6 6 6 4 L Y [ d ] 1 U [ d ] 1 t [ d ] 1 . L Y [ d ] N [ d ] U [ d ] N [ d ] t [ d ] N [ d ] 3 7 7 7 7 5 2 R N [ d ] 1 {20 D [ d ] 2 R N [ d ] [ N [ d ] +1] istheLGRdierentiationmatrixintimedomain P d d 2f 1,..., Q g and w [ d ] 2 R N [ d ] 1 aretheLGRweightsateachnodeintimedomain P d d 2f 1,..., Q g Itisnotedthat a 2 R 1 n y c 2 R 1 n c ,and L2 R 1 1 correspond,respectively,to thevectoreldsthatdenetheright-handsideofthedynamics,thepathconstraints, andtheintegrandoftheoptimalcontrolproblem,where n y and n c are,respectively,the numberofstatecomponentsandpathconstraintsintheproblem.Additionally,thestate matrix, Y [ d ] 2 R [ N [ d ] +1] n y ,andthecontrolmatrix, U [ d ] 2 R N [ d ] n u ,intimedomain P d d 2f 1,..., Q g ,areformedas Y [ d ] = 2 6 6 6 6 4 Y [ d ] 1 . Y [ d ] N [ d ] +1 3 7 7 7 7 5 and U [ d ] = 2 6 6 6 6 4 U [ d ] 1 . U [ d ] N [ d ] 3 7 7 7 7 5 {21 respectively,where n u isthenumberofcontrolcomponentsintheproblem.Finally, asdescribedinRef.[30],estimatesofthecostatemaybeobtainedateachofthe 129

PAGE 130

discretizationpointsinthetimedomain P d d 2f 1,..., Q g ,usingthetransformation [ d ] = W [ d ] )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 [ d ] [ d ] N [ d ] +1 = D [ d ] N [ d ] +1 T [ d ] {22 where [ d ] 2 R N [ d ] n y isamatrixofthecostateestimatesatthecollocationpointsintime domain P d W [ d ] = diag w [ d ] isadiagonalmatrixoftheLGRweightsatthecollocation pointsintimedomain P d [ d ] 2 R N [ d ] n y isamatrixoftheNLPmultipliersobtained fromtheNLPsolvercorrespondingtothedefectconstraintsatthecollocationpoints intimedomain P d [ d ] N [ d ] +1 2 R 1 n y isarowvectorofthecostateestimatesatthe non-collocatedendpointintimedomain P d ,and D [ d ] N [ d ] +1 2 R N [ d ] 1 isthelastcolumnof theLGRdierentiationmatrixintimedomain P d 5.3Control-LinearHamiltonian TheHamiltonianoftheBolzaoptimalcontrolproblemdenedinEqs.5{1to5{4is givenas H y t t u t t = L y t u t t + t a T y t u t t {23 AssumenowthattheHamiltoniangiveninEq.5{23hasthefollowingform: H y t t u t t = f y t t z t t + y t t t v T t {24 where f 2 R 2 R 1 I v t = u 1 t ,..., u I t 2 R 1 I and z t = u I +1 t ,..., u n u t 2 R 1 n u )]TJ/F38 7.9701 Tf 6.586 0 Td [(I .Itisnotedthat v t and z t arevectorsthatcorrespond,respectively,to thosecomponentsofthecontroluponwhichtheHamiltoniandependslinearlyand nonlinearly,while = 1 ,..., I isavectorthatdenesthe I switchingfunctions.In otherwords,thecomponents u 1 t ,..., u n u t ofthecontrolareorderedsuchthatany control-linearcomponenthasanindexthatislowerthananycontrol-nonlinearcomponent and 1 ,..., I arefunctionsofthestateandthecostatethatareusedtodetermine locationswhereaswitchinthecontrolmayoccur.Then,assumingthattheoptimal solutioncontainsnosingulararcs,theoptimalcontrolforanycontrol-linearcomponent, 130

PAGE 131

u i t i 2f 1,..., I g ,isobtainedfromPontryagin'sminimumprincipleas u i t = 8 > < > : u min i i y t t t > 0, u max i i y t t t < 0, i =1,..., I {25 wherethesignsoftheswitchingfunctions, i i 2f 1,..., I g ,aredeterminedbythestate y t ,thecostate t ,andthetime t .Thus,theoptimalcontrolwillhaveabang-bang structurewherediscontinuitiesinthesolutionoccurwheneveraswitchingfunction, i i 2f 1,..., I g ,changessignagain,assumingnosingulararcs. Assumenowthattheoptimalcontrolproblemhasbeenapproximatedusingthe LGRcollocationmethodasdescribedinSection5.2.Furthermore,assumethattheNLP resultingfromLGRcollocationhasbeensolvedtoobtainestimatesofthestate,control, andcostateasgiveninEqs.5{21and5{22.Thentheapproximationcanbeutilizedto detectpossibleswitchtimesintheoptimalcontrol.Thesepossiblediscontinuitylocations canbedetectedbyevaluatingtheswitchingfunctions i i 2f 1,..., I g ,ateachofthe collocationpointsandcheckingforsignchangesin i betweentwoadjacentcollocation points.Inparticular,asignchangein i betweenanytwoadjacentcollocationpoints t k and t k +1 indicatesthat i hasarootinthetimeinterval t 2 [ t k t k +1 ] ,thusindicating aswitchinthecontrolatatime t 2 [ t k t k +1 ] .AsdiscussedinRef.[106],therationale forusingchangesinthesignof i todetectswitchesinthecontrolisduetothefactthat thegradientoftheobjectivewithrespecttoaswitchingpointinabang-bangcontrolis proportionaltothecoecient i ofthecontrolintheHamiltonian.Consequently,the gradientoftheobjectivewithrespecttoaswitchingpointonlyvanishesatvaluesof timewherethecoecientofthecontrolvanishes,andthechangeinsignof i between apairofpointsprovidesanestimateofaswitchtimeinthecomponentofthecontrol correspondingtotheswitchingfunction i 131

PAGE 132

5.4Bang-BangControlMeshRenementMethod Inthissection,thebang-bangmeshrenementmethodisdeveloped.Themethod consistsofseveralsteps.Therststep,describedinSection5.4.1determinesifthe Hamiltonianislinearinoneormorecomponentsofthecontrol.Thesecondstep, describedinSection5.4.2computesestimatesofthelocationsofdiscontinuitiesin eachcomponentofthecontroluponwhichtheHamiltoniandependsuponlinearly. Thethirdstep,describedinSection5.4.3,reformulatestheoptimalcontrolprobleminto amultiple-domainoptimalcontrolproblemwherethedomainsaredeterminedbasedon theestimatesofthediscontinuitylocationsobtainedinthesecondstepofthemethod. Theinteriorendpointsofthesedomainsarethentreatedasoptimizationvariablesby introducinganappropriatenumberofswitchtimeparameterswhichusetheestimates ofthediscontinuitylocationsasinitialguessesforthesenewvariables.Inaddition,any componentofthecontrolforwhichtheHamiltonianhasbeendeterminedtodepend uponlinearlyisthenxedateitheritsminimumormaximumvalueineachdomain dependinguponthedirectionoftheswitchinsignofthecorrespondingswitchingfunction componentidentiedinthesecondstep.Themultiple-domainoptimalcontrolproblem isthensolvediterativelyusingtheLGRcollocationmethoddescribedinSection5.2 togetherwithapreviouslydeveloped hp -adaptivemeshrenementmethodtorene themeshbasedontheerrorinthesolutionforthosecontrolcomponentsforwhich theHamiltoniandoesnotdependuponlinearlyandprovidesucientresolutioninthe stateapproximation.Finally,Section5.4.4providesasummaryofthebang-bangmesh renementmethod. 5.4.1MethodforIdentifyingBang-BangOptimalControlProblems AssumenowthattheoptimalcontrolproblemasformulatedinSection5.1hasbeen transcribedintoanonlinearprogrammingproblemusingtheLGRcollocationmethod asdevelopedinSection5.2assumingthat Q =1 thatis,asingledomainisused. Furthermore,assumethattheresultingNLPhasbeensolvedtoobtainestimatesofthe 132

PAGE 133

state,control,andcostateasgiveninEqs.5{21and5{22,andthatthemeshrenement accuracytolerancehasnotbeensatisedand,thus,meshrenementisrequired.Asa result,itispossiblethattheoptimalsolutionmaypossessabang-bangoptimalcontrol. Therststepindeterminingifabang-bangoptimalcontrolisapossibilityistodetermine iftheHamiltonianislinearinoneormoreofthecomponentsofthecontrol.Moreover, themethodshouldbeabletodetectacontrol-linearHamiltonianwithoutrequiringany externalintervention. Inthisresearch,thedeterminationofacontrol-linearHamiltonianismadeusing hyper-dualderivativeapproximations[56].Inparticular,usingthestateandcostate approximationsobtainedfromtheLGRcollocationmethod,thehyper-dualderivative approximationofRef.[56]isusedtocomputetherst-andsecond-derivativesofthe Hamiltonianwithrespecttoeachcomponentofthecontrol.Inordertoidentifylinearity intheHamiltonianwithrespecttoagivencontrolcomponent,samplevaluesofthecontrol componentaretakenbetweentheboundsofthecontrolandpartialderivativesofthe Hamiltonianarethentakenwithrespecttothatcontrolcomponentwhileholdingallother variablesconstant.IfthepartialderivativesoftheHamiltonianobtainedusingthevarious samplevaluesofthecontrolcomponentarefoundtobeconstant,thentheHamiltonian isidentiedaspossiblybeinglinearwithrespecttothatcontrolcomponent.Moreover,if anycontrolcomponenthasbeenidentiedtohaveazerosecondderivativeandhaszero second-orderpartialderivativeswithrespecttoanyothercontrolcomponents[thatis,all crosspartialderivatives @ 2 H @ u i @ u j =0, i 6 = j ],thentheHamiltonianislinearwithrespect tothatcomponentofthecontrolandisthusacandidateforbang-bangcontrolmesh renement.EstimatesoftheswitchingfunctionsoftheHamiltonianarethenobtainedby computingthepartialoftheHamiltonianwithrespecttoeachcontrol-linearcomponent usinghyper-dualderivativeapproximations.Finally,itisnotedthatthehyper-dual derivativeapproximationisnotsubjecttotruncationerroruptosecondderivativesand, 133

PAGE 134

thus,providesexactthatis,tomachineprecisionrst-andsecond-derivativesofthe Hamiltonianwithrespecttothecontrol. 5.4.2EstimatingLocationsofSwitchesinControl OnceithasbeendeterminedthattheHamiltonianislinearinatleastonecontrol component,thenextstepistoestimatetimesatwhichacontrolcomponentmayswitch betweenitslowerandupperlimit,thusleadingtoadiscontinuityinthecontrolsolution prole.Assumingthattheoptimalsolutioncontainsnosingulararcs,adiscontinuityin thecontrolwilloccurwhenaswitchingfunction i i 2f 1,..., I g changessign.Given thatthesolutionoftheoptimalcontrolproblemhasbeenapproximatedusingtheLGR collocationasgiveninSection5.2,anestimateofadiscontinuityinacontrolcomponent willbewhenaswitchingfunction i changessignbetweentwoadjacentcollocation points.Furthermore,becauseanyswitchingfunction, i maychangesignoneormore times,itispossiblethatanyorallcomponentsofthecontrol v t mayhaveoneormore discontinuitiesandthatthediscontinuitytimeforaparticularcomponent, v i t ,may dierfromthediscontinuitytimeofanothercontrol-linearcomponent, v j t i 6 = j Inordertoaccommodatethepossibilityofmultiplediscontinuitieswithinagiven meshinterval, S k k 2f 1,..., K g ,eachdiscontinuityestimatetime t i d k in S k foragiven controlcomponent u i i 2f 1,..., I g iscomputedusing t i d k = t i k + t i u k 2 {26 where t i k isthemidpointtimebetweenthetwoadjacentdiscretizationpoints showingachangeinsignofthecorrespondingswitchingfunction i within S k ,and t i u k isthemidpointtimebetweenthetwoadjacentdiscretizationpointsdisplaying thelargestabsolutedierenceinthevalueofthe i th control-linearcomponent u i within S k .Anexampleschematicofestimatingthediscontinuitytime, t i d k ,forcontrol-linear component, u i ,formeshinterval S k isshowninFig.5-1. 134

PAGE 135

Figure5-1.Estimatesofdiscontinuitylocation t i d k correspondingtocontrolcomponent u i inmeshinterval S k usingcorrespondingswitchingfunction i t withsix collocationpoints f t k 1 ,..., t k 6 g Bytakingintoaccountbothofthemidpointtimes t i k and t i u k inestimating thediscontinuitytime t i d k ,thebang-bangcontrolprolecanbeproperlymaintained relativetoallcontrol-linearcomponentswithinameshinterval S k containingmultiple discontinuities.Furthermore,intheeventthattheswitchingfunction i changes signacrosstwoadjacentmeshintervals S k and S k +1 ,themeshpoint T k thatliesat theinterfacebetweenthemeshintervals S k and S k +1 isusedastheestimateforthe discontinuitytime t i d k thatis t i d k = T k asshowninFig.5-2. Figure5-2.Estimatesofdiscontinuitylocation t i d k correspondingtocontrolcomponent u i acrossmeshintervals S k and S k +1 usingcorrespondingswitchingfunction i t andfourcollocationpointsineachmeshinterval f t k 1 ,..., t k 4 t k +1 1 ,..., t k +1 4 g 135

PAGE 136

Aftercheckingallmeshintervals S k k 2f 1,..., K g ,forpossiblediscontinuities, thecomputeddiscontinuityestimates, t i d k i 2f 1,..., I g k 2f 1,..., K g ,are arrangedinascendingorderandusedasinitialguessesfortheswitchtimeparameters t [ S ] s S 2f 1,..., n s g ,thataretobeintroducedinthesubsequentmeshiterations,where n s isequaltothetotalnumberofdiscontinuitiesdetectedinthesolutionobtainedon theinitialmesh.Finally,thelimitofeachcontrol-linearcomponent u i i 2f 1,..., I g tobeusedonthesubsequentmeshiterationsineachofthenewlycreatedtimedomains P d d 2f 1,..., Q g ,isidentiedbycheckingthesignofthecorrespondingswitching function i within P d ,whileeachcontrol-nonlinearcomponent u i i 2f I +1,..., n u g is leftfreetovarybetweenitsdenedbounds,where Q = n s +1 onthesubsequentmesh iterations.Thus,byusingtheestimatesoftheswitchingfunctions,thestructureofthe bang-bangoptimalcontrolprolehasbeenautomaticallydetectedandusedtosetupthe subsequentmeshiterationstoinclude n s switchtimeparameters. 5.4.3ReformulationofOptimalControlProblemIntoMultipleDomains Assumingtheoptimalcontrolproblemhasbeenidentiedsuitableforbang-bang meshrenementasdescribedinSection5.4.1,themethodforautomaticallydetecting thestructureofthebang-bangcontrolasdescribedinSection5.4.2maybeemployed. Onceacquired,thedetectedstructureofthebang-bangcontrolmaybeusedtointroduce theappropriatenumberofswitchtimeparameters, t [ S ] s S 2f 1,..., n s g ,tobesolved foronsubsequentmeshiterations,wheretheinitialguessforeachswitchtimeparameter t [ S ] s istheestimateddiscontinuitytimethatwasfoundusingtheprocessdescribedin Section5.4.2.Theswitchtimeparametersareincludedbyusingvariablemeshpoints betweenthenewlycreatedtimedomains, P d d 2f 1,..., Q g ,where Q = n s +1 Specically,thevariablemeshpointsareemployedbydividingthetimehorizon t =[ t 0 t f ] oftheoptimalcontrolproblemidentiedasabang-bangcontrolinto Q = n s +1 time domainsasdescribedinSection5.2,where n s isthenumberofswitchtimeparameters introducedbasedonthedetectedstructureofthebang-bangcontrolproleforthe 136

PAGE 137

solutionontheinitialmesh.Eachofthetimedomains P d =[ t [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] s t [ d ] s ], d 2f 1,..., Q g hasboundsenforcedon t [ d )]TJ/F21 7.9701 Tf 6.586 0 Td [(1] s and t [ d ] s whichappropriatelybrackettheestimated discontinuitytimesdetectedfromthestructure.Additionally,theboundsofthe control-linearcomponents u i i 2f 1,..., I g withineachtimedomain P d d 2f 1,..., Q g aresettotheidentiedconstantbangcontrollimitforeachcontrol-linearcomponent duringthecorrespondingspansoftimebasedonthepreviouslydetectedstructure, whiletheboundsofthecontrol-nonlinearcomponents u i i 2f I +1,..., n u g areleft unchanged.Thusthebang-bangoptimalcontrolproblemiseectivelytranscribedintoa multiple-domainoptimalcontrolproblememployingconstantvaluesforthecontrol-linear componentsineachtimedomain P d d 2f 1,..., Q g suchthattheoptimalswitchtimes aresolvedforonthesubsequentmeshiterationswhilethecontrol-nonlinearcomponents areleftfreetovarybetweentheirrespectivebounds.Aschematicfortheprocessof dividingtheidentiedbang-bangoptimalcontrolproblemintoamultiple-domain optimalcontrolproblememployingconstantvaluesforthecontrol-linearcomponents u i i 2f 1,..., I g ineachtimedomainisshowninFig.5-3. Figure5-3.Schematicofprocessthatcreatesamultiple-domainoptimalcontrolproblem with Q = n s +1 domainswherevariablemeshpointsareintroducedas optimizationparametersinordertodeterminethe n s optimalswitchtimesin thecomponentsofthecontrolforwhichtheHamiltoniandependsupon linearly. 137

PAGE 138

5.4.4SummaryofBang-BangControlMeshRenementMethod Asummaryofthebang-bangcontrolmeshrenementmethoddevelopedinthis chapterappearsbelow.Here M denotesthemeshnumber,andineachloopofthe method,themeshnumberincreasesby 1 .ThemethodterminatesinStep4whenthe errortoleranceissatisedorwhen M reachesaprescribedmaximum M max Thebang-bangcontrolmeshrenementmethodstepsareasfollows: Step1: Specifyinitialmesh. Step2: SolveLGRcollocationNLPofEqs.5{13to5{17oncurrentmesh. Step3: Computerelativeerror e oncurrentmesh. Step4: If e < or M > M max ,thenquit.Otherwise,goto Step5 Step5: If M =1 ,determinethenumber I ofcontrolcomponentsforwhich HamiltonianislinearinthecontrolinmannerdescribedinSection5.4.1. Otherwise,goto Step6 Step6: If I =0 or M > 1 ,employstandardmeshrenementandreturnto Step2 Step7: If I > 0 and M =1 ,employbang-bangmeshrenementusingthefollowing steps: aEstimate n s discontinuitiesincontrolcomponentsusingmethoddescribedin Section5.4.2. bPartitiontimedomainintomultiple Q = n s +1 domainsusingmethodof Section5.4.3. cSolvemultiple-domainoptimalcontrolproblemthatincludesfollowing features: iInclude n s variablemeshpointsinmultiple-domainformulation. iiFix I bang-bangcontrolcomponentsateitherlower/upperlimitin eachofthe Q domains. dIncrement M )167(! M +1 andreturnto Step2 5.5Examples Inthissection,threenontrivialbang-bangoptimalcontrolproblemsaresolvedusing thebang-bangmeshrenementmethoddescribedinSection5.4.Therstexample 138

PAGE 139

isthethreecompartmentmodelproblemtakenfromRef.[99].Thesecondexample istherobotarmproblemtakenfromRef.[107].Thethirdexampleisthefree-ying robotproblemtakenfromRef.[108].Theeciencyofthebang-bangmeshrenement methoddevelopedinthischapterisevaluatedandcomparedagainstfourpreviously developed hp -adaptivemeshrenementmethodsdescribedinRefs.[61,31,33,34].For problemsrequiringmorethanasinglemeshrenementtomeetaccuracytolerance,the bang-bangmeshrenementmethodwillutilizethe hp -adaptivemethoddescribedin Ref.[34]tofurtherrenethephasesnotmeetingthespeciedmeshaccuracytolerance.It isnotedthatanyofthefourpreviouslydeveloped hp -adaptivemeshrenementmethods maybepairedwiththebang-bangmeshrenementmethod.Aninitialcoarsemesh oftenintervalswithvecollocationpointsineachintervalisusedforeachproblem. Furthermore,uponidenticationofthebang-bangcontrolsolutionprole,thebang-bang meshrenementmethodinitiallyemploystwomeshintervalstodiscretizeeachofthe newlycreatedtimedomainsemployingconstantvaluesforthecontrol-linearcomponents, withvecollocationpointsineachmeshintervalfortherstandsecondexamplesand sixcollocationpointsineachmeshintervalforthethirdexample.Theperformanceof themeshrenementmethodsareevaluatedbasedonthenumberofmeshiterations,total numberofcollocationpointsused,andthetotalcomputationtimefortheproblemtobe solvedsatisfactorilyforthespeciedmeshaccuracytolerance.Allplotswerecreatedusing MATLABVersionR2016abuild9.0.0.341360. Thefollowingconventionsareusedforalloftheexamples.First, M denotesthe numberofmeshrenementiterationsrequiredtomeetthemeshrenementaccuracy toleranceof =10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(6 ,where M =1 correspondstotheinitialmesh.Second, N f denotesthetotalnumberofcollocationpointsonthenalmesh.Third, T denotesthe totalcomputationtimerequiredtosolvetheoptimalcontrolproblem.Furthermore,the hp -adaptivemeshrenementmethodsdescribedinRefs.[61,31,33,34]arereferredto, respectively,asthe hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods.Additionally, 139

PAGE 140

thebang-bangmeshrenementmethoddevelopedinthischapterisreferredtoasthe hp -BBmeshrenementmethod.Finally,forallmeshrenementmethods,aminimum andmaximumnumberofthreeandtencollocationpointsineachmeshintervalis enforced,respectively.AllresultsshowninthischapterwereobtainedusingtheC++ optimalcontrolsoftware CGPOPS [90]usingtheNLPsolver IPOPT [2]infullNewton second-derivativemodewithanNLPsolveroptimalitytoleranceof 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(9 .Allrstandsecond-derivativesrequiredbytheNLPsolverwerecomputedusingthehyper-dual derivativeapproximationmethoddescribedinRef.[56].Allcomputationswereperformed ona2.9GHzIntelCorei7MacBookProrunningMACOS-Xversion10.13.6High Sierrawith16GB2133MHzLPDDR3ofRAM.C++leswerecompiledusingApple LLVMversion9.1.0clang-1000.10.44.2. 5.5.1Example1:ThreeCompartmentModelProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[99].Minimizethe objectivefunctional J = r 1 N 1 t + r 2 N 2 t + r 3 N 3 t + Z T 0 u 1 t dt {27 subjecttothedynamicconstraints N 1 t = )]TJ/F37 11.9552 Tf 9.298 0 Td [(a 1 N 1 t +2 a 3 N 3 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 1 t N 2 t = )]TJ/F37 11.9552 Tf 9.298 0 Td [(a 2 N 2 t u 2 t + a 1 N 1 t N 3 t = a 3 N 3 t + a 2 N 2 t u 2 t {28 thecontrolinequalityconstraints 0 u 1 t 1, u min 2 u 2 t 1, {29 140

PAGE 141

andtheboundaryconditions N 1 =38, N 1 t f = Free N 2 =2.5, N 2 t f = Free N 3 =3.25, N 3 t f = Free {30 where a 1 =0.197 a 2 =0.395 a 3 =0.107 r 1 =1 r 2 =0.5 r 3 =1 T =7 and u min 2 =0.70 .TheoptimalcontrolproblemgiveninEqs.5{27to5{30wassolved usingeachofthevemeshrenementmethods hp -BB, hp -I, hp -II, hp -III,and hp -IV. Thesolutionsobtainedusinganyofthesevemeshrenementmethodsareinclose agreementandmatchthesolutiongiveninRef.[99]seepages 200 { 203 ofRef.[99], andasummaryoftheperformanceofeachmethodisshowninTable5-1.Inparticular, itisseeninTable5-1thatthe hp -BBmethodismorecomputationallyecient,requires fewermeshiterations,andresultsinasmallernalmeshtomeetthemeshrenement accuracytoleranceof 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(6 whencomparedwithanyoftheothermeshrenement methods.Furthermore,asshowninFig.5-4,thesolutionobtainedusingthe hp -BB meshrenementmethodaccuratelycapturesthebang-bangcontrolproleoftheoptimal solution.Specically,itisseenthattheoptimalswitchtimesareobtainedtonearly machineprecision.Furthermore,estimatesoftheswitchingfunctionsobtainedusingthe solutionontheinitialmeshareshowninFig.5-5,whereitisseenthattherootsofthe switchingfunctionsareincloseproximitytothelocationsoftheoptimalswitchtimes. Thus,whilethepreviouslydeveloped hp -adaptivemeshrenementmethodsareableto satisfythemeshrenementaccuracytoleranceinareasonablenumberofiterations,the hp -BBmethodoutperformsallofthesemethods.Moreover,unliketheothermethods wherealargenumberofcollocationpointsareplacedinthevicinityofadiscontinuity asseeninFig.5-4,the hp -BBmethodplacesnounnecessarycollocationpointsat thediscontinuityduetothefactthatoptimalcontrolproblemhasbeendividedinto multipledomainsandvariablemeshpointsareincludedthatdenethelocationsofthe discontinuitiesinthecontrolagain,seeFig.5-4. 141

PAGE 142

Table5-1.MeshrenementperformanceresultsforExample1using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods. hp -BB hp -I hp -II hp -III hp -IV M 210455 N f 40858611595 T s 0.12340.48590.28260.41320.3054 Figure5-4.ComparisonofcontrolforExample1obtainedusing hp -BBand hp -IImesh renementmethods. Figure5-5.Estimatesoftheswitchingfunctions t = 1 t 2 t forExample1using solutionobtainedontheinitialmesh. 5.5.2Example2:RobotArmProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[107].Minimizethe objectivefunctional J = t f {31 subjecttothedynamicconstraints y 1 t = y 2 t ,_ y 3 t = y 4 t ,_ y 5 t = y 6 t y 2 t = u 1 t = L ,_ y 4 t = u 2 t = I t ,_ y 6 t = u 3 t = I t {32 142

PAGE 143

thecontrolinequalityconstraints )]TJ/F20 11.9552 Tf 11.956 0 Td [(1 u i t 1, i =1,2,3, {33 andtheboundaryconditions y 1 =9 = 2, y 1 t f =9 = 2, y 2 =0, y 2 t f =0, y 3 =0, y 3 t f =2 = 3, y 4 =0, y 4 t f =0, y 5 = = 4, y 5 t f = = 4, y 6 =0, y 6 t f =0, {34 where I t = L )]TJ/F37 11.9552 Tf 11.956 0 Td [(y 1 t 3 + y 3 1 t 3 sin 2 y 5 t I t = L )]TJ/F37 11.9552 Tf 11.956 0 Td [(y 1 t 3 + y 3 1 t 3 L =5. {35 TheoptimalcontrolproblemgiveninEqs.5{31to5{35wassolvedusingeachof thevemeshrenementmethods hp -BB, hp -I, hp -II, hp -III,and hp -IV.Thesolutions obtainedusinganyofthesevemeshrenementmethodsareincloseagreementand matchthesolutiongiveninRef.[107]seepage 20 ofRef.[107],andasummaryofthe performanceofeachmethodisshowninTable5-2.Inparticular,itisseeninTable5-2 thatthe hp -BBmethodismorecomputationallyecient,requiresfewermeshiterations, andresultsinasmallernalmeshtomeetthemeshrenementaccuracytoleranceof 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 whencomparedwithanyoftheothermeshrenementmethods.Furthermore,asshown inFig.5-6,thesolutionobtainedusingthe hp -BBmeshrenementmethodaccurately capturesthebang-bangcontrolproleoftheoptimalsolution.Specically,itisseenthat theoptimalswitchtimesareobtainedtonearlymachineprecision.Furthermore,estimates oftheswitchingfunctionsobtainedusingthesolutionontheinitialmeshareshownin Fig.5-7,whereitisseenthattherootsoftheswitchingfunctionsareincloseproximity tothelocationsoftheoptimalswitchtimes.Thus,whilethepreviouslydeveloped hp -adaptivemeshrenementmethodsareabletosatisfythemeshrenementaccuracy toleranceinareasonablenumberofiterations,the hp -BBmethodoutperformsallofthese 143

PAGE 144

methods.Moreover,unliketheothermethods,wherealargenumberofcollocationpoints areplacedinthevicinityofadiscontinuityasseeninFig.5-6,the hp -BBmethodplaces nounnecessarycollocationpointsatthediscontinuityduetothefactthatoptimalcontrol problemhasbeendividedintomultipledomainsandvariablemeshpointsareincluded thatdenethelocationsofthediscontinuitiesinthecontrolagain,seeFig.5-6. Table5-2.MeshrenementperformanceresultsforExample2using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods. hp -BB hp -I hp -II hp -III hp -IV M 27564 N f 60807811485 T s 0.21830.62340.50000.84610.4156 Figure5-6.ComparisonofcontrolforExample2obtainedusing hp -BBand hp -IVmesh renementmethods. 5.5.3Example3:Free-FlyingRobotProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[108].Minimizethe costfunctional J = Z t f 0 u 1 t + u 2 t + u 3 t + u 4 t dt {36 144

PAGE 145

Figure5-7.Estimatesoftheswitchingfunctions t = 1 t 2 t 3 t forExample 2usingsolutionobtainedontheinitialmesh. subjecttothedynamicconstraints x t = v x t ,_ y t = v y t v x t = F 1 t + F 2 t cos t ,_ v y t = F 1 t + F 2 t sin t t = t ,_ t = F 1 t )]TJ/F23 11.9552 Tf 11.955 0 Td [( F 2 t {37 thecontrolinequalityconstraints 0 u i t 1, i =1,2,3,4, F i t 1, i =1,2, {38 andtheboundaryconditions x = )]TJ/F20 11.9552 Tf 9.299 0 Td [(10, x t f =0, y = )]TJ/F20 11.9552 Tf 9.298 0 Td [(10, y t f =0, v x =0, v x t f =0, v y =0, v y t f =0, = 2 t f =0, =0, t f =0, {39 where F 1 t = u 1 t )]TJ/F37 11.9552 Tf 12.178 0 Td [(u 2 t and F 2 t = u 3 t )]TJ/F37 11.9552 Tf 12.178 0 Td [(u 4 t aretherealcontrol, =0.2 ,and =0.2 TheoptimalcontrolproblemgiveninEqs.5{36to5{39wassolvedusingeachof thevemeshrenementmethods hp -BB, hp -I, hp -II, hp -III,and hp -IV.Thesolutions obtainedusinganyofthesevemeshrenementmethodsareincloseagreementand matchthesolutiongiveninRef.[107]seepages 328 { 329 ofRef.[21],andasummary oftheperformanceofeachmethodisshowninTable5-3.Inparticular,itisseenin Table5-3thatthe hp -BBmethodismorecomputationallyecient,requiresfewermesh 145

PAGE 146

iterations,andresultsinasmallernalmeshtomeetthemeshrenementaccuracy toleranceof 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(6 whencomparedwithanyoftheothermeshrenementmethods. Furthermore,asshowninFig.5-8,thesolutionobtainedusingthe hp -BBmeshrenement methodaccuratelycapturesthebang-bangcontrolproleoftheoptimalsolution. Specically,itisseenthattheoptimalswitchtimesareobtainedtonearlymachine precision.Furthermore,estimatesoftheswitchingfunctionsobtainedusingthesolution ontheinitialmeshareshowninFig.5-9,whereitisseenthattherootsoftheswitching functionsareincloseproximitytothelocationsoftheoptimalswitchtimes.Thus,while thepreviouslydeveloped hp -adaptivemeshrenementmethodsareabletosatisfythe meshrenementaccuracytoleranceinareasonablenumberofiterations,the hp -BB methodoutperformsallofthesemethods.Moreover,unliketheothermethods,wherea largenumberofcollocationpointsareplacedinthevicinityofadiscontinuityasseenin Fig.5-8,the hp -BBmethodplacesnounnecessarycollocationpointsatthediscontinuity duetothefactthatoptimalcontrolproblemhasbeendividedintomultipledomainsand variablemeshpointsareincludedthatdenethelocationsofthediscontinuitiesinthe controlagain,seeFig.5-8. Table5-3.MeshrenementperformanceresultsforExample3using hp -BB, hp -I, hp -II, hp -III,and hp -IVmeshrenementmethods. hp -BB hp -I hp -II hp -III hp -IV M 216988 N f 90204235283194 T s 0.70198.43314.08334.79483.6157 Figure5-8.Comparisonofcontrol F 1 t F 2 t = u 1 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 2 t u 3 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 4 t for Example3obtainedusing hp -BB,and hp -IVmeshrenementmethods. 146

PAGE 147

Figure5-9.Estimatesoftheswitchingfunctions t = 1 t 2 t 3 t 4 t for Example3usingsolutionobtainedontheinitialmesh. 5.6Discussion TheresultsofSection5.5demonstratetheeectivenessofthemeshrenement methoddevelopedinthischapterforproblemswhoseoptimalcontrolhasabang-bang structure.Inparticular,theresultsofSection5.5showthat,whilethepreviously developedmeshrenementmethodsareabletondasolutionthatmeetsaspecied meshrenementaccuracytolerance,thesemethodsplaceanunnecessarilylargenumber ofcollocationpointsinthevicinityofadiscontinuityinthecontrol.Inaddition,these methodsoftenrequirealargeamountofmeshrenementtomeetadesiredaccuracy tolerance.Ontheotherhand,forproblemswhoseoptimalcontrolhasabang-bang structure,themeshrenementmethoddevelopedinthischapterlocatesdiscontinuities accurately.Thisimprovedaccuracyoverastandardmeshrenementmethodisdueto thefactthataccurateestimatesareobtainedoftheswitchingfunctionsassociatedwith thosecomponentsofthecontroluponwhichtheHamiltoniandependslinearlywherean accurateestimateoftheswitchingfunctionsisobtainedbecausethecostateoftheoptimal controlproblemisapproximatedaccuratelyusingtheLGRcollocationmethod.Then, bypartitioningthehorizonintomultipledomains,introducingvariablesthatdenethe locationsoftheswitchtimesinthecontrol-linearcomponents,andxingthecontrol-linear componentstolieateitheritslowerorupperlimitineachdomain,themethoddeveloped inthischapteraccuratelyidentiestheswitchtimes.Moreover,solutionsthatmeet 147

PAGE 148

thespeciedaccuracytoleranceareobtainedinfewermeshrenementiterationswhen comparedwithusingoneofthepreviouslydevelopedmeshrenementmethods. 5.7Conclusions Ameshrenementmethodhasbeendescribedforsolvingbang-bangoptimalcontrol problemsusingdirectcollocation.First,thesolutionoftheoptimalcontrolproblem isapproximatedonacoarsemesh.Iftheapproximationonthecoarsemeshdoesnot satisfythespeciedaccuracytolerance,themethoddeterminesautomaticallyifthe Hamiltonianoftheoptimalcontrolproblemislinearwithrespecttoanycomponents ofthecontrol.Then,foranycontrolcomponentuponwhichtheHamiltoniandepends linearly,thelocationsofthediscontinuitiesinthecontrolareobtainedbyestimatingthe rootsoftheswitchingfunctionsassociatedwithanycomponentofthecontrolthatappears linearlyintheHamiltonianusingestimatesoftheswitchingfunctionsobtainedusingthe stateandcostateobtainedfromthesolutionontheinitialmesh.Theestimatesofthe switchingfunctionsarethenusedtodeterminethebang-bangstructureoftheoptimal solution.Usingestimatesofthelocationsofdiscontinuitiesinthecontrolobtainedfrom thedetectedstructure,thehorizonispartitionedintomultipledomainsandparameters correspondingtothethelocationsoftheswitchtimesareintroducedasvariablesinthe optimization.Then,byxingineachdomainanycomponentofthecontrolthathasa bang-bangstructuretolieateitheritslowerorupperlimit,themultiple-domainoptimal controlproblemissolvedtoaccuratelydeterminetheswitchtimes.Themethodhasbeen demonstratedonthreeexampleswhereithasbeenshowntoecientlyobtainaccurate approximationstosolutionsofbang-bangoptimalcontrolproblems. 148

PAGE 149

CHAPTER6 CGPOPS :AC++SOFTWAREFORSOLVINGMULTIPLE-PHASEOPTIMAL CONTROLPROBLEMSUSINGADAPTIVEGAUSSIANQUADRATURE COLLOCATIONANDSPARSENONLINEARPROGRAMMING Inthischapteranewoptimalcontrolsoftwarecalled CGPOPS isdescribedthat employs hp directorthogonalcollocationmethods.Thereaderisremindedthat hp -methodswerepreviouslydenedonpage16asachievingconvergenceusingdirect transcriptionbyincreasingthenumberofmeshintervalsusedand/orthedegreeofthe polynomialwithineachmeshinterval.An hp methodisahybridbetweenan h anda p -method,where h and p -methodsarealsopreviouslydenedonpage16,inthatboth thenumberofmeshintervalsandthedegreeoftheapproximatingpolynomialwithineach meshintervalcanbevariedinordertoachieveaspeciedaccuracy.Asaresult,inan hp methoditispossibletotakeadvantageoftheexponentialconvergenceofaGaussian quadraturemethodinregionswherethesolutionissmoothandintroducemeshpoints onlywhennecessarytodealwithpotentialnonsmoothnessorrapidlychangingbehavior inthesolution.Originally, hp methodsweredevelopedasnite-elementmethodsfor solvingpartialdierentialequations[17,18,19,20].Inthepastfewyearstheproblem ofdeveloping hp methodsforsolvingoptimalcontrolproblemshasbeenofinterest [32,31,61,33,34].Theworkof[32,31,61,33,34]providesexamplesofthebenetsof usingan hp -adaptivemethodovereithera p methodoran h method.Thisrecentresearch hasshownthatconvergenceusing hp methodscanbeachievedwithasignicantlysmaller nite-dimensionalapproximationthanwouldberequiredwhenusingeitheran h ora p method. Itisnotedthatpreviouslythesoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II wasdevelopedasdescribed inRef.[15].Althoughboththe GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II and CGPOPS softwareprograms implementGaussianquadraturecollocationwith hp meshrenement, CGPOPS isa fundamentallydierentsoftwarefrom GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II .First, GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II isaMATLAB softwareprogram,while CGPOPS isaC++softwareprogram.Furthermore,because 149

PAGE 150

CGPOPS isimplementedinC++,ithasthepotentialforimprovedcomputational eciencyandportabilityoveraMATLABsoftwaresuchas GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II .Second,while GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II employsbothsparsenite-dierencingandautomaticdierentiationusing thesoftware ADiGator [65], CGPOPS employsthefollowingfourderivativeestimation methods:centralnitedierencing,bicomplex-step[55],hyper-dual[56],andautomatic dierentiation[57].Boththebicomplex-stepandhyper-dualderivativeapproximations arereferredtoassemi-automaticdierentiationmethodsandareimplementedvia sourcecodetransformationandoperatoroverloading.Third,while GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II isonly capableofidentifyingtherst-orderderivativedependenciesandover-estimatesthe dependenciesofthesecondderivatives, CGPOPS isabletoexactlyidentifyboththe rst-andsecond-orderderivativedependenciesofthecontinuousoptimalcontrolproblem functionswhenthederivativesareapproximatedusingthehyper-dualmethod.The improvementindeterminingthedependenciesatthelevelofsecondderivativesfurther improvescomputationaleciencyover GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II Theobjectiveofthischapteristodescribeacomputationallyecientgeneral-purpose C++optimalcontrolsoftwarethataccuratelysolvesawidevarietyofconstrained continuousoptimalcontrolproblems.Inparticular,thesoftwaredescribedinthischapter employsadierentialformofthemultiple-intervalversionoftheLegendre-Gauss-Radau LGRcollocationmethod[30,28,29,40].TheLGRcollocationmethodischosen foruseinthesoftwarebecauseitprovideshighlyaccuratestate,control,andcostate approximationswhilemaintainingarelativelylow-dimensionalapproximationofthe continuousproblem.Thekeycomponentsofthesoftwarearethendescribedandthe softwareisdemonstratedonveexamplesfromtheopenliterature.Eachexample demonstratesdierentcapabilitiesofthesoftware.Therstexampleisthehyper-sensitive optimalcontrolproblemtakenfromRef.[109]anddemonstratestheabilityofthesoftware toaccuratelysolveaproblemwhoseoptimalsolutionchangesrapidlyinparticularregions ofthesolution.Thesecondexampleisthereusablelaunchvehicleentryproblemtaken 150

PAGE 151

fromRef.[21]anddemonstratestheabilityof CGPOPS tocomputeanaccuratesolution usingarelativelycoarsemesh.Thethirdexampleisthespacestationattitudecontrol problemtakenfromRefs.[91,21]anddemonstratestheabilityofthesoftwaretogenerate accuratesolutionstoaproblemwhosesolutionisnotintuitive.Thefourthexampleisa free-yingrobotproblemtakenfromRefs.[21,88]andshowstheabilityofthesoftware tohandlebang-bangoptimalcontrolproblemsusingthenovelbang-bangcontrolmesh renementmethodincludedinthesoftware.Thefthexampleisalaunchvehicleascent problemtakenfromRefs.[35,12,21]thatdemonstratestheabilityofthesoftwaretosolve amultiple-phaseoptimalcontrolproblem.Inordertovalidatetheresults,thesolutions obtainedusing CGPOPS arecomparedagainstthesolutionsobtainedusingthesoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15].ThematerialinthischapterisbasedonRef.[90]. Thischapterisorganizedasfollows.InSection6.1thegeneralmultiple-phaseoptimal controlproblemispresented.InSection6.2theLegendre-Gauss-Radaucollocationmethod thatisusedasthebasisof CGPOPS isdescribed.InSection6.3thekeycomponentsof CGPOPS aredescribed.InSection6.4theresultsobtainedusingthesoftwareontheve aforementionedexamplesareshown.InSection6.5adiscussionofthecapabilitiesofthe softwarethataredemonstratedbytheresultsobtainedusingthesoftwareisprovided. InSection6.6possiblelimitationsofthesoftwarearediscussed.Finally,inSection6.7 conclusionsontheworkdescribedinthischapterareprovided. 6.1GeneralMultiple-PhaseOptimalControlProblems Thegeneralmultiple-phaseoptimalcontrolproblemthatcanbesolvedby CGPOPS isgivenasfollows.Withoutlossofgenerality,considerthefollowinggeneral multiple-phaseoptimalcontrolproblemwhereeachphaseisdenedontheinterval t 2 [ t p 0 t p f ] .Firstlet p 2f 1,..., P g bethephasenumberwhere P isthetotalnumberof phases.Determinethestate y p t 2 R 1 n p y ,thecontrol u p t 2 R 1 n p u ,theintegrals q p 2 R 1 n p q ,thestarttimes t p 0 2 R ,andtheterminustimes t p f 2 R inallphases p 2f 1,..., P g ,alongwiththestaticparameters s 2 R 1 n s thatminimizetheobjective 151

PAGE 152

functional J = )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(e ,..., e P s {1 subjecttothedynamicconstraints d y p dt y p = a p )]TJ/F42 11.9552 Tf 5.48 -9.684 Td [(y p t u p t t s p 2f 1,..., P g {2 theeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.683 Td [(e ,..., e P s b max {3 theinequalitypathconstraints c p min c p )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(y p t u p t t s c p max p 2f 1,..., P g {4 theintegralconstraints q p min q p q p max p 2f 1,..., P g {5 andthestaticparameterconstraints s min s s max {6 where e p = h y p t p 0 t p 0 y p t p f t p f q p i p 2f 1,..., P g {7 andtheintegralvectorcomponentsineachphasearedenedas q p j = Z t p f t p 0 g p j )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(y p t u p t t s dt j 2f 1,..., n p q g p 2f 1,..., P g {8 ItisimportanttonotethattheeventconstraintsofEq.6{3containfunctionswhichcan relateinformationatthestartand/orterminusofanyphaseincludinganyrelationships involvinganyintegralorstaticparameters,withphasesnotneedingtobeinsequential ordertobelinked.Moreover,itisnotedthattheapproachtolinkingphasesisbasedon 152

PAGE 153

well-knownformulationsintheliteraturesuchasthosegiveninRef.[110]and[21].A schematicofhowphasescanpotentiallybelinkedisgiveninFig.6-1. Figure6-1.Schematicoflinkagesformultiple-phaseoptimalcontrolproblem.The exampleshowninthepictureconsistsofsevenphaseswheretheterminiof phases1,2,and4arelinkedtothestartsofphases2,3,and5,respectively, whiletheterminiofphases1and6arelinkedtothestartsofphases6and4, respectively. 6.2Legendre-Gauss-RadauCollocationMethod Asstatedattheoutset,theobjectiveofthisresearchistoprovideresearchers acomputationallyecientgeneral-purposeoptimalcontrolsoftwareforsolvingofa widevarietyofcomplexconstrainedcontinuousoptimalcontrolproblemsusingdirect collocation.Whileinprincipleanycollocationmethodcanbeusedtoapproximatethe optimalcontrolproblemgiveninSection6.1,inthisresearchtheLegendre-Gauss-Radau LGRcollocationmethod[30,28,29,39,61,33,34]isemployed.Itisnotedthatthe NLParisingfromtheLGRcollocationmethodhasanelegantsparsestructurewhichcan beexploitedasdescribedinRefs.[15,40,53].Inaddition,theLGRcollocationmethod hasawellestablishedconvergencetheoryasdescribedinRefs.[77,78,79,80,81]. Inthecontextofthisresearch,amultiple-intervalformoftheLGRcollocation methodischosen.Inthemultiple-intervalLGRcollocationmethod,foreachphase p of theoptimalcontrolproblemwherethephasenumber p 2f 1,..., P g hasbeenomittedin 153

PAGE 154

ordertoimproveclarityofthedescriptionofthemethod,thetimeinterval t 2 [ t 0 t f ] is convertedintothedomain 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1] usingtheanetransformation, t = t f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t 0 2 + t f + t 0 2 =2 t )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 )]TJ/F20 11.9552 Tf 11.955 0 Td [(1. {9 Thedomain 2 [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1] isthendividedinto K meshintervals, S k =[ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k ] [ )]TJ/F20 11.9552 Tf 9.299 0 Td [(1,+1], k 2f 1,..., K g suchthat K [ k =1 S k =[ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1,+1], K k =1 S k = f T 1 ,..., T K )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 g {10 and )]TJ/F20 11.9552 Tf 9.298 0 Td [(1= T 0 < T 1 < ... < T K )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 < T K =+1 .Foreachmeshinterval,theLGR pointsusedforcollocationaredenedinthedomainof [ T k )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 T k ] for k 2f 1,..., K g Thecontrolisparameterizedatthecollocationpointswithineachmeshinterval.The stateofthecontinuousoptimalcontrolproblemisthenapproximatedinmeshinterval S k k 2f 1,..., K g ,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 )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l k j )]TJ/F23 11.9552 Tf 11.955 0 Td [( k l {11 where ` k j for j 2f 1,..., N k +1 g isabasisofLagrangepolynomials, k 1 ,..., k N k arethesetof N k Legendre-Gauss-RadauLGR[82]collocationpointsintheinterval [ T k )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 T k in S k k N k +1 = T k isanon-collocatedsupportpoint,and Y k j Y k k j Dierentiating Y k inEq.6{11withrespectto gives d Y k d = N k +1 X j =1 Y k j d ` k j d {12 Thedynamicsarethenapproximatedatthe N k LGRpointsinmeshinterval k 2f 1,..., K g as N k +1 X j =1 D k ij Y k j = t f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t 0 2 a Y k i U k i t k i t 0 t f s i 2f 1,..., N k g {13 154

PAGE 155

where D k ij = d ` k j k i d i 2f 1,..., N k g j 2f 1,..., N k +1 g aretheelementsofthe N k N k +1 Legendre-Gauss-Radaudierentiationmatrix [30]inmeshinterval S k k 2f 1,..., K g ,and U k i istheparameterizedcontrolat the i th collocationpointinmeshinterval k .Finally,reintroducingthephasenotation p 2f 1,..., P g ,thephasesoftheproblemarelinkedtogetherbytheeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s b max {14 where E p istheendpointapproximationvectorforphase p denedas E p = h Y p 1 t p 0 Y p N p +1 t p f Q p i {15 suchthat N p isthetotalnumberofcollocationpointsusedinphase p givenby, N p = K p X k =1 N p k {16 and Q p 2 R 1 n p q istheintegralapproximationvectorinphase p TheaforementionedLGRdiscretizationthenleadstothefollowingNLP.Minimize theobjectivefunction J = )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s {17 subjecttothedefectconstraints p = D p Y p )]TJ/F37 11.9552 Tf 13.151 8.087 Td [(t p f )]TJ/F37 11.9552 Tf 11.956 0 Td [(t p 0 2 A p = 0 p 2f 1,..., P g {18 thepathconstraints c p min C p i c p max i 2f 1,..., N p g p 2f 1,..., P g {19 theeventconstraints b min b )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(E ,..., E P s b max {20 155

PAGE 156

theintegralconstraints q p min Q p q p max p 2f 1,..., P g {21 thestaticparameterconstraints s min s s max {22 andtheintegralapproximationconstraints p = Q p )]TJ/F37 11.9552 Tf 13.151 8.087 Td [(t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(t p 0 2 w p T G p = 0 p 2f 1,..., P g {23 where A p = 2 6 6 6 6 4 a p Y p 1 U p 1 t p 1 s . a p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p y {24 C p = 2 6 6 6 6 4 c p Y p 1 U p 1 t p 1 s . c p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p c {25 G p = 2 6 6 6 6 4 g p Y p 1 U p 1 t p 1 s . g p Y p N p U p N p t p N p s 3 7 7 7 7 5 2 R N p n p q {26 D p 2 R N p [ N p +1] istheLGRdierentiationmatrixinphase p 2f 1,..., P g ,and w p 2 R N p 1 aretheLGRweightsateachnodeinphase p .Itisnotedthat a p 2 R 1 n p y c p 2 R 1 n p c ,and g p 2 R 1 n p q correspond,respectively,tothefunctions thatdenetheright-handsideofthedynamics,thepathconstraints,andtheintegrands inphase p 2f 1,..., P g ,where n p y n p c ,and n p q are,respectively,thenumberofstate components,pathconstraints,andintegralcomponentsinphase p .Finally,thestate matrix, Y p 2 R [ N p +1] n p y ,andthecontrolmatrix, U p 2 R N p n p u ,inphase 156

PAGE 157

p 2f 1,..., P g areformedas Y p = 2 6 6 6 6 4 Y p 1 . Y p N p +1 3 7 7 7 7 5 and U p = 2 6 6 6 6 4 U p 1 . U p N p 3 7 7 7 7 5 {27 respectively,where n p u isthenumberofcontrolcomponentsinphase p 6.3MajorComponentsof CGPOPS InthissectionwedescribethemajorcomponentsoftheC++software CGPOPS thatimplementstheaforementionedLGRcollocationmethod.InSection6.3.1,the largesparsenonlinearprogrammingproblemNLPassociatedwiththeLGRcollocation methodisdescribed.InSection6.3.2,thestructureoftheNLPdescribedinSection6.3.1 isshown.InSection6.3.3themethodforscalingtheNLPviascalingoftheoptimal controlproblemisover-viewed.InSection6.3.4,theapproachforestimatingthe derivativesrequiredbytheNLPsolverisexplained.InSection6.3.5,themethodfor determiningthedependenciesofeachoptimalcontrolfunctioninordertoprovidethe mostsparseNLPderivativematricestotheNLPsolverispresented.InSection6.3.6 the hp meshrenementmethodsthatareincludedinthesoftwareinordertoiteratively determineameshthatsatisesauser-speciedaccuracytolerancearedescribed.Finally, inSection6.3.7weprovideahighleveldescriptionofthealgorithmicowof CGPOPS 6.3.1SparseNLPArisingfromRadauCollocationMethod TheresultingnonlinearprogrammingproblemNLPthatariseswhenusingLGR collocationtodiscretizethecontinuousoptimalcontrolproblemisgivenasfollows. DeterminetheNLPdecisionvector, z ,thatminimizestheNLPobjectivefunction, f z {28 subjecttotheconstraints H min H z H max {29 157

PAGE 158

andthevariablebounds z min z z max {30 Itisnotedthat,whilethesizeoftheNLParisingfromtheLGRcollocationmethod changesdependinguponthenumberofmeshintervalsandLGRpointsusedineachphase, thestructureoftheNLPremainsthesameregardlessofthesizeoftheNLP.Finally,in thesectionsthatfollow,thesubscript : "denoteseitheraroworacolumn,wherethe : notationisanalogoustothesyntaxusedintheMATLABprogramminglanguage. 6.3.1.1NLPVariables Foracontinuousoptimalcontrolproblemtranscribedinto P phases,theNLPdecision vector, z ,hasthefollowingform: z = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 z . z P s 1 . s n s 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 where z p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 Y p :,1 . Y p :, n p y U p :,1 . U p :, n p u Q p T t p 0 t p f 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 {31 Y p 2 R [ N p +1] n p y isthestateapproximationmatrix[seeEq.6{27], U p 2 R N p n p u isthecontrolparameterizationmatrix[seeEq.6{27], Q p 2 R 1 n p q istheintegral approximationvector,and t p 0 and t p f arescalarsoftheinitialandnaltime, respectively,forphase p 2f 1,..., P g ,and s i for i 2f 1,..., n s g arethestaticparameters appearingthroughouttheentireproblem. 158

PAGE 159

6.3.1.2NLPObjectiveandConstraintFunctions TheNLPobjectivefunction, f z ,isgivenintheform f z = E ,..., E P s {32 where E p p 2f 1,..., P g ,istheendpointapproximationvectordenedinEq.6{15,and thetypicalcostfunctionalofageneralmultiple-phaseoptimalcontrolproblemhasbeen turnedsimplyintoaMayercostfunctionbyusingtheintegralapproximationvector, Q p toapproximatetheLagrangecostineachphase p .TheNLPconstraintvector, H z ,is givenintheform H z = 2 6 6 6 6 6 6 6 4 h . h P b 3 7 7 7 7 7 7 7 5 where h p = 2 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 4 p :,1 . p :, n p y C p :,1 . C p :, n p c p T 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 5 p = f 1,..., P g {33 p 2 R N p n p y p 2 R 1 n p q ,and C p 2 R N p n p c ,are,respectively,thedefect constraintmatrix,theintegralapproximationconstraintvector,andthepathconstraint matrixinphase p 2f 1,..., P g ,and b 2 R n b 1 istheeventconstraintvectorfortheentire problem.Thedefectconstraintmatrix,integralapproximationconstraintvector,andpath constraintmatrixinphase p aredenedbyEqs.6{18,6{23,and6{25,respectively.Itis notedthattheconstraintsaredividedintotheequalitydefectandintegralconstraints p = 0 p = 0 p 2f 1,..., P g {34 159

PAGE 160

andtheinequalitydiscretizedpathandeventconstraints c p min C p i c p max i 2f 1,..., n p c g p 2f 1,..., P g b min b b max {35 6.3.2SparseStructureofNLPDerivativeFunctions ThestructureoftheNLPcreatedbytheLGRcollocationmethodhasbeendescribed indetailinRefs.[40]and[53].Specically,Refs.[40]and[53]describethesparsestructure oftheNLPforthedierentialformoftheLGRcollocationmethodforthesingleand multiplephaseoptimalcontrolproblem,respectively.AsdescribedinSection6.3.1.1, thevaluesofthestateapproximationcoecientsatthediscretizationpoints,thecontrol parametersatthecollocationpoints,theinitialtime,thenaltime,andtheintegral approximationvectorofeachphase,aswellasanystaticparametersoftheproblem makeuptheNLPdecisionvector.TheNLPconstraintvectorconsistsofthedefect constraintsandpathconstraintsappliedateachofthecollocationpoints,aswellasany integralapproximationconstraints,foreachphase,andeventconstraints,asdescribed inSection6.3.1.2.ThederivationoftheNLPderivativematricesintermsoftheoriginal continuousoptimalcontrolproblemfunctionsisdescribedindetailinRefs.[15,40,53] andisbeyondthescopeofthischapter.Itisnotedthatthesparsityexploitationderived inRefs.[15,40,53]requirescomputingpartialderivativesofthecontinuousoptimal controlproblemfunctionsontherst-andsecond-orderderivativelevels. ExamplesofthesparsitypatternsoftheNLPconstraintJacobianandLagrangian Hessianareshown,respectively,inFigs.6-2aand6-2bforasingle-phaseoptimal controlproblem.ItisnotedthatfortheNLPconstraintJacobian,alloftheo-diagonal phaseblocksrelatingconstraintsinphase i tovariablesinphase j for i 6 = j areall zeros.Similarly,fortheNLPLagrangianHessian,alloftheo-diagonalphaseblocks relatingvariablesinphase i tovariablesinphase j for i 6 = j areallzerosexceptfor thevariablesmakinguptheendpointvectorswhichmayberelatedviatheobjective 160

PAGE 161

functionoreventconstraints.ThesparsitypatternsshowninFig.6-2aredetermined explicitlybyidentifyingthederivativedependenciesoftheNLPobjectiveandconstraints functionswithrespecttotheNLPdecisionvectorvariables.Itisnotedthatthephasesare connectedusingtheinitialandterminalvaluesofthetimeandstateineachphasealong withthestaticparameters. 6.3.3ScalingofOptimalControlProblemforNLP TheNLPdescribedinSection6.3.1mustbewellscaledinorderfortheNLPsolverto obtainasolution. CGPOPS includestheoptionfortheNLPtobescaledautomaticallyby scalingthecontinuousoptimalcontrolproblem.Theapproachtoautomaticscalingisto scalethevariablesandtherstderivativesoftheoptimalcontrolfunctionstobe O First,theoptimalcontrolvariablesarescaledtolieontheunitinterval [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 = 2,1 = 2] and isaccomplishedasfollows.Supposeitisdesiredtoscaleanarbitraryvariable x 2 [ a b ] to ~ x suchthat ~ x 2 [ )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 = 2,1 = 2] .Thisvariablescalingisaccomplishedviatheane transformation ~ x = v x x + r x {36 where v x and r x arethevariablescaleandshift,respectively,denedas v x = 1 b )]TJ/F37 11.9552 Tf 11.955 0 Td [(a r x = 1 2 )]TJ/F37 11.9552 Tf 23.5 8.088 Td [(b b )]TJ/F37 11.9552 Tf 11.955 0 Td [(a {37 EveryvariableinthecontinuousoptimalcontrolproblemisscaledusingEqs.6{36and 6{37.Next,theJacobianoftheNLPconstraintscanbemade O byscalingthe derivativesoftheoptimalcontrolfunctionstobeapproximatelyunity.First,using theapproachderivedin[21],in CGPOPS thedefectconstraintsarescaledusingthe samescalefactorsaswereusedtoscalethestate.Next,theobjectivefunction,event constraints,andpathconstraintsscalefactorsareobtainedbysamplingthegradientof eachconstraintatavarietyofsamplepointswithintheboundsoftheunscaledoptimal controlproblemandtakingtheaveragenormofeachgradientacrossallsamplepoints. 161

PAGE 162

aNLPConstraintJacobian bNLPLagrangianHessian Figure6-2.Examplesparsitypatternsforsinglephaseoptimalcontrolproblemcontaining n y statecomponents, n u controlcomponents, n q integralcomponents,and n c pathconstraints, n s staticparameters,and n b eventconstraints. 162

PAGE 163

6.3.4ComputationDerivativesofNLPFunctions TheNLPderivativefunctionsareobtainedbyexploitingthesparsestructureof theNLParisingfromthe hp LGRcollocationmethod.Specically,inRefs.[40,53]it hasbeenshownthatbyusingthederivativeformoftheLGRcollocationmethod,the NLPderivativescanbeobtainedbycomputingthederivativesoftheoptimalcontrol problemfunctionsattheLGRpointsandinsertingthesederivativesintotheappropriate locationsintheNLPderivativefunctions.In CGPOPS ,theoptimalcontrolderivative functionsareapproximatedusingoneoffourtypesofderivativeestimationmethods: sparsecentralnite-dierencing,bicomplex-stepderivativeapproximations,hyper-dual derivativeapproximations,andautomaticdierentiation. 6.3.4.1CentralFinite-Dierence Toseehowthecentralnite-dierencederivativeapproximationworksinpractice, considerthefunction f x ,where f : R n R m isoneoftheoptimalcontrolfunctionsthat is, n and m are,respectively,thesizeofanoptimalcontrolvariableandanoptimalcontrol function.Then @ f =@ x isapproximatedusingacentralnite-dierenceas @ f @ x i f x + h i )]TJ/F42 11.9552 Tf 11.955 0 Td [(f x )]TJ/F42 11.9552 Tf 11.955 0 Td [(h i 2 h {38 where h i arisesfromperturbingthe i th componentof x .Thevector h i iscomputedas h i = h i e i {39 where e i isthe i th rowofthe n n identitymatrixand h i istheperturbationsize associatedwith x i .Theperturbation h i iscomputedusingtheequation h i = h + j x i j {40 wherethebaseperturbationsize h ischosentobetheoptimalstepsizeforafunction whoseinputandoutputare O asdescribedinRef.[54].Secondderivative approximationsarecomputedinamannersimilartothatusedforrstderivative 163

PAGE 164

approximationswiththekeydierencebeingthatperturbationsintwovariablesare performed.Forexample, @ 2 f =@ x i @ x j canbeapproximatedusingacentralnite-dierence approximationas @ 2 f x @ x i @ x j f x + h i + h j )]TJ/F42 11.9552 Tf 11.955 0 Td [(f x + h i )]TJ/F42 11.9552 Tf 11.955 0 Td [(h j )]TJ/F42 11.9552 Tf 11.956 0 Td [(f x )]TJ/F42 11.9552 Tf 11.955 0 Td [(h i + h j + f x )]TJ/F42 11.9552 Tf 11.955 0 Td [(h i )]TJ/F42 11.9552 Tf 11.955 0 Td [(h j 4 h i h j {41 where h i h j h i ,and h j areasdenedinEqs.6{39and6{40.Thebaseperturbationsizeis chosentominimizeround-oerrorinthenite-dierenceapproximation.Furthermore,it isnotedthat h i h as j x i j! 0 6.3.4.2Bicomplex-step Toseehowthebicomplex-stepderivativeapproximationworksinpractice,consider thefunction f x ,where f : R n R m isoneoftheoptimalcontrolfunctionsthatis, n and m are,respectively,thesizeofanoptimalcontrolvariableandanoptimalcontrol function.Then @ f =@ x isapproximatedusingabicomplex-stepderivativeapproximation as @ f x @ x i Im 1 [ f x + i 1 h e i ] h {42 whereIm 1 [ ] denotestheimaginary i 1 componentofthefunctionevaluatedwiththe perturbedbicomplexinput, e i isthe i th rowofthe n n identitymatrix,andthe baseperturbationsize h ischosentobeastepsizethatwillminimizetruncationerror whilerefrainingfromencounteringroundoerrorduetobicomplexarithmetic,whichis describedindetailinRef.[55],andisbeyondthescopeofthischapter.Itisnotedthat theimaginarycomponent i 1 hastheproperty i 2 1 = )]TJ/F20 11.9552 Tf 9.299 0 Td [(1 .Secondderivativeapproximations arecomputedinamannersimilartothatusedforrstderivativeapproximations withthekeydierencebeingthatperturbationsintwovariablesareperformedintwo separateimaginarydirections.Forexample, @ 2 f =@ x i @ x j canbeapproximatedusinga bicomplex-stepderivativeapproximationas @ 2 f x @ x i @ x j Im 1,2 [ f x + i 1 h e i + i 2 h e j ] h 2 {43 164

PAGE 165

whereIm 1,2 [ ] denotestheimaginary i 1 i 2 componentofthefunctionevaluatedwiththe perturbedbicomplexinput,whereitisnotedthat i 2 2 = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 ,and i 1 i 2 isabi-imaginary directiondistinctfromeitherthe i 1 or i 2 imaginarydirectionsi.e. i 1 i 2 = i 2 i 1 6.3.4.3Hyper-Dual Toseehowthehyper-dualderivativeapproximationworksinpractice,considerthe function f x ,where f : R n R m isoneoftheoptimalcontrolfunctionsthatis, n and m are,respectively,thesizeofanoptimalcontrolvariableandanoptimalcontrolfunction. Then @ f =@ x isapproximatedusingahyper-dualderivativeapproximationas @ f x @ x i = Ep 1 [ f x + 1 h e i ] h {44 whereEp 1 [ ] denotestheimaginary 1 componentofthefunctionevaluatedwiththe perturbedhyper-dualinput, e i isthe i th rowofthe n n identitymatrix,andthe baseperturbationsize h ischosentobeunitybecauseforrst-andsecond-derivatives thehyper-dualarithmeticdoesnotsuerfromeithertruncationorroundoerror describedindetailinRef.[56]andbeyondthescopeofthischapter.Itisnotedthat theimaginarycomponent 1 hasthepropertyofbeingnilpotentthatis, 2 1 =0 Secondderivativeapproximationsarecomputedinamannersimilartothatusedfor rstderivativeapproximationswiththekeydierencebeingthatperturbationsintwo variablesareperformedintwoseparateimaginarydirections.Forexample, @ 2 f =@ x i @ x j can beapproximatedusingahyper-dualderivativeapproximationas @ 2 f x @ x i @ x j = Ep 1,2 [ f x + 1 h e i + 2 h e j ] h 2 {45 whereEp 1,2 [ ] denotestheimaginary 1 2 componentofthefunctionevaluatedwiththe perturbedhyper-dualinput,whereitisnotedthat 2 alsohasthepropertyofbeing nilpotenti.e. 2 2 =0 ,and 1 2 isabi-imaginarydirectiondistinctfromeitherthe 1 or 2 imaginarydirectionsi.e. 1 2 = 2 1 165

PAGE 166

6.3.4.4AutomaticDierentiation Inthissection,thebasisofautomaticdierentiationisdiscussed.Asdescribedin Ref.[58],automaticalgorithmicdierentiationmaybederivedfromtheunifyingchain ruleandsuppliesnumericalevaluationsofthederivativeforadenedcomputerprogram bydecomposingtheprogramintoasequenceofelementaryfunctionoperationsand applyingthecalculuschainrulealgorithmicallythroughthecomputer[57].Theprocess ofautomaticdierentiationisdescribedindetailinRef.[57],andisbeyondthescope ofthischapter.Itisnoted,however,thattherst-andsecond-orderpartialderivatives obtainedusingtheTaylorseries-basedderivativeapproximationmethodsdescribed inSections6.3.4.1to6.3.4.3maybecomputedtomachineprecisionusingautomatic dierentiation.Specically, CGPOPS employsthewell-knownopensourcesoftware ADOL-C[84,85]tocomputederivativesusingautomaticdierentiation. 6.3.5MethodforDeterminingtheOptimalControlFunctionDependencies ItcanbeseenfromSection6.3.2thattheNLPassociatedwiththeLGRcollocation methodhasasparsestructurewheretheblocksoftheconstraintJacobianandLagrangian HessianaredependentuponwhetheraparticularNLPfunctiondependsuponaparticular NLPvariable,aswasshowninRefs.[40,53].Themethodforidentifyingtheoptimal controlfunctionderivativedependenciesin CGPOPS utilizestheindependentnatureof thehyper-dualderivativeapproximations.Specically,sincetheimaginarydirections usedforhyper-dualderivativeapproximationsarecompletelyindependentofoneanother, second-orderderivativeapproximationsonlyappearnonzeroifthepartialactuallyexists sameforrst-orderderivativeapproximations.Forexample,supposethat f x isa functionwhere f : R n R m and x = [ x 1 ... x n ] .Thehyper-dualderivativeapproximation of @ 2 f x =@ x i @ x j willonlybenonzeroiftheactual @ 2 f x =@ x i @ x j existsandisnonzero. Giventhisknowledgeoftheexactcorrespondenceofhyper-dualderivativeapproximations totheactualderivativeevaluations,identifyingderivativedependenciesofoptimalcontrol problemfunctionswithrespecttooptimalcontrolproblemvariablesbecomessimple, 166

PAGE 167

asexistingpartialderivativeswillhavenonzerooutputswhenapproximatedbythe hyper-dualderivativeapproximations,whilenon-existingpartialderivativeswillsimplybe zeroalways.Inordertoensurethatderivativedependenciesaren'tmistakenlymisseddue toaderivativeapproximationhappeningtoequalzeroatthepointit'sbeingevaluated atforanexistingnonzeropartialderivative,thehyper-dualderivativeapproximations areevaluatedatmultiplesamplepointswithinthevariablebounds.Inthismanner,the derivativedependenciesoftheoptimalcontrolproblemfunctionscanbeeasilyidentied exactlyfortherst-andsecond-orderderivativelevels.Thecomputationalexpense ofidentifyingthederivativedependenciesinthismannerisminimal,whiletheexact second-orderderivativesparsitypatternthatisobtainedcansignicantlyreducethecost ofcomputingtheNLPLagrangianHessianwhencomparedtousinganover-estimated sparsitypatternasdonein GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]. 6.3.6AdaptiveMeshRenement Inthepastfewyears,thesubjectofadaptivemeshrenementhasbeenof considerablestudyintheecientimplementationofGaussianquadraturecollocation methods.TheworkonadaptiveGaussianquadraturemeshrenementhasledtoseveral articlesintheliteratureincludingthosefoundinRefs.[32,31,61,33,34,59]. CGPOPS employstherecentlydevelopedmeshrenementmethodsdescribedin[31,61,33,34,64]. ThemeshrenementmethodsofRefs.[61],[31],[33],[34],and[64]arereferredto, respectively,asthe hp -I, hp -II, hp -III, hp -IV,and hp -BBmethods.Inallveofthe hp -adaptivemeshrenementmethods,thenumberofmeshintervals,widthofeach meshinterval,andthedegreeoftheapproximatingpolynomialcanbevarieduntila user-speciedaccuracytolerancehasbeenachieved.Whenusinganyofthemethodsin CGPOPS ,theterminology hp -Method N min N max referstoamethodwhoseminimum andmaximumallowablepolynomialdegreeswithinameshintervalare N min and N max respectively.Allvemethodsestimatethesolutionerrorusingarelativedierence betweenthestateestimateandtheintegralofthedynamicsatamodiedsetofLGR 167

PAGE 168

points.Thekeydierencebetweenthevemethodsliesinthemannerinwhichthe decisionismadetoeitherincreasethenumberofcollocationpointsinameshintervalor torenethemesh.InRef.[31]thedegreeoftheapproximatingpolynomialisincreasedif theratioofthemaximumcurvatureoverthemeancurvatureofthestateinaparticular meshintervalisbelowauser-speciedthreshold.Ontheotherhand,Ref.[61]usesthe exponentialconvergencepropertyoftheLGRcollocationmethodandincreasesthe polynomialdegreewithinameshintervaliftheestimateoftherequiredpolynomial degreeislessthanauser-speciedupperlimit.Similarly,Refs.[33]and[34]employ nonsmoothnesscriteriontodeterminewhetheran h or p methodshouldbeusedfora givenmeshinterval,whilealsoutilizingmeshreductiontechniquesinordertominimize thesizeofthetranscribedNLPinregionsofthesolutionwheresuchhighresolutionis notrequired.Ifa p methodrenementisprescribedforagivenmeshintervalandthe estimateofthepolynomialdegreeexceedstheallowedupperlimit,themeshintervalis dividedintomoremeshintervalsi.e. h methodemployed.Lastly,themeshrenement methoddevelopedinRef.[64]isdesignedforbang-bangoptimalcontrolproblemsand employsestimatesoftheswitchingfunctionsoftheHamiltonianinordertoobtainthe solutionprole.In CGPOPS ,theusercanchoosebetweenthesevemeshrenement methods.Finally,itisnotedthat CGPOPS hasbeendesignedinamodularway,making itpossibletoaddanewmeshrenementmethodinarelativelystraightforwardwayifitis sodesired. 6.3.7AlgorithmicFlowof CGPOPS Inthissectionwedescribetheoperationalowof CGPOPS withtheaidofFig.6-3. First,theuserprovidesadescriptionoftheoptimalcontrolproblemthatistobesolved. Thepropertiesoftheoptimalcontrolproblemarethenextractedfromtheuserdescription fromwhichthestate,control,time,andparameterdependenciesoftheoptimalcontrol problemfunctionsareidentied.Subsequently,assumingthattheuserhasspeciedthat theoptimalcontrolproblembescaledautomatically,theoptimalcontrolproblemscaling 168

PAGE 169

Figure6-3.Flowchartofthe CGPOPS algorithm. algorithmiscalledandthesescalefactorsaredeterminedandusedtoscaletheNLP.The optimalcontrolproblemisthentranscribedtoalargesparseNLPandtheNLPissolved ontheinitialmesh,wheretheinitialmeshiseitheruser-suppliedorisdeterminedby thedefaultsettingsin CGPOPS .OncetheNLPissolved,theNLPsolutionisanalyzed asadiscreteapproximationoftheoptimalcontrolproblemandtheerrorinthediscrete approximationforthecurrentmeshisestimated.Iftheuser-speciedaccuracytolerance ismet,thesoftwareterminatesandoutputsthesolution.Otherwise,anewmeshis determinedusingoneofthesuppliedmeshrenementalgorithmsandtheresultingNLPis solvedonthenewmesh. 6.4Examples CGPOPS isnowdemonstratedonveexamplestakenfromtheopenliterature.The rstexampleisthehyper-sensitiveoptimalcontrolproblemtakenfromRef.[109]and demonstratestheabilityof CGPOPS toecientlysolveproblemsthathaverapidchanges 169

PAGE 170

indynamicsinparticularregionsofthesolution.Thesecondexampleisthereusable launchvehicleentryproblemtakenfromRef.[21]anddemonstratestheeciencyof CGPOPS onamorerealisticproblem.Thethirdexampleisthespacestationattitude optimalcontrolproblemtakenfromRefs.[91]and[21]anddemonstratestheeciencyof CGPOPS onaproblemwhosesolutionishighlynon-intuitive.Thefourthexampleisa free-yingrobotproblemtakenfromRef.[21]anddemonstratestheabilityof CGPOPS tosolveabang-bangoptimalcontrolproblemusingdiscontinuitydetection.Thefth exampleisamultiple-stagelaunchvehicleascentproblemtakenfromRefs.[12,21,35]and demonstratestheabilityof CGPOPS tosolveaproblemwithmultiple-phases. Allveexamplesweresolvedusingtheopen-sourceNLPsolver IPOPT [2]insecond derivativefullNewtonmodewiththepubliclyavailablemultifrontalmassivelyparallel sparsedirectlinearsolverMA57[111].Allresultswereobtainedusingthedierential formoftheLGRcollocationmethodandvariousformsoftheaforementioned hp mesh renementmethodusingdefaultNLPsolversettingsandtheautomaticscalingroutinein CGPOPS .For CGPOPS ,allrst-andsecond-orderderivativesfortheNLPsolverwere obtainedusinghyper-dualderivativeapproximationsasdescribedinSection6.3.4.3witha perturbationstepsizeof h =1 .Allsolutionsobtainedby CGPOPS arecomparedagainst thesolutionsobtainedusingthepreviouslydevelopedMATLABsoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]whichalsoemploys hp LGRcollocationmethods.For GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II ,therstandsecond-orderderivativesfortheNLPsolverwereobtainedusingtheautomatic dierentiationsoftwareADiGator[112]forallexamplesexceptthefthexamplewhich usedsparsecentralnite-dierences.Allcomputationswereperformedona2.9GHz IntelCorei7MacBookProrunningMACOS-Xversion10.13.6HighSierrawith16GB 2133MHzLPDDR3ofRAM.C++leswerecompiledusingAppleLLVMversion9.1.0 clang-1000.10.44.2.Allm-scriptswereexecutedusingMATLABVersionR2016abuild 9.0.0.341360.AllplotswerecreatedusingMATLABVersionR2016abuild9.0.0.341360. 170

PAGE 171

6.4.1Example1:Hyper-SensitiveProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[109].Minimizethe objectivefunctional J = 1 2 Z t f 0 x 2 + u 2 dt {46 subjecttothedynamicconstraints x = )]TJ/F37 11.9552 Tf 9.298 0 Td [(x 3 + u {47 andtheboundaryconditions x =1, x t f =1.5, {48 where t f =10000 .Itisknownforasucientlylargevalueof t f theinterestingbehavior inthesolutionfortheoptimalcontrolproblemdenedbyEqs.6{46to6{48occursnear t =0 and t = t f seeRef.[109]fordetails,whilethevastmajorityofthesolutionisa constant.Giventhestructureofthesolution,amajorityofcollocationpointsneedtobe placednear t =0 and t = t f TheoptimalcontrolproblemgiveninEqs.6{46to6{48wassolvedusing CGPOPS withthemeshrenementmethods hp -I,10, hp -II,10, hp -III,10,and hp -IV,10 onaninitialmeshoftenevenlyspacedmeshintervalswiththreeLGRpointsper meshinterval.Furthermore,theNLPsolverandmeshrenementaccuracytolerances weresetto 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(7 and 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 ,respectively.Thesolutionobtainedusing CGPOPS with the hp -IV,10methodisshowninFig.6-5alongsidethesolutionobtainedusing GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]withthe hp -IV,10method.Itisseenthatthe CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionsareinexcellentagreement.Moreover,theoptimalobjective obtainedusingboth CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II was 3.3620559 toeightsignicant gures.Additionally,thecomputationtimerequiredby CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II to solvetheoptimalcontrolproblemwas 0.2153 sand 1.5230 s,respectively.Inorderto demonstratehow CGPOPS iscapableofcapturingtheinterestingfeaturesoftheoptimal 171

PAGE 172

solution,Fig.6-6showsthesolutionontheintervals t 2 [0,25] neartheinitialtime and t 2 [9975,10000] nearthenaltime.Itisseenthat CGPOPS accuratelycaptures therapiddecayfrom x =1 andtherapidgrowthtomeettheterminalcondition x t f =1.5 ,withthedensityofthemeshpointsnear t =0 and t = t f increasingas themeshrenementprogresses.Additionally,Fig.6-4showsthemeshrenementhistory. Finally,Tables6-1to6-4showtheapproximationoftheerrorinthesolutiononeach mesh,whereitisseenthattheerrorapproximationdecreaseswitheachmeshrenement iterationusinganyofthe hp methods. Table6-1.Performanceof CGPOPS onExample1using hp -I,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -I,10Points hp -I,10Points 128.273128.2731 24.090674.09067 37.060 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 1017.060 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 101 41.661 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 1341.661 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 134 51.476 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 1581.476 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 158 61.139 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 1911.139 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 191 77.557 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 2187.557 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 218 Table6-2.Performanceof CGPOPS onExample1using hp -II,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -II,10Points hp -II,10Points 128.273128.2731 21.667651.66765 33.1931063.193106 41.557 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 1401.557 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 140 54.142 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 1654.142 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 165 61.261 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 1851.261 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 185 74.423 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 2044.423 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 204 84.707 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(4 2094.707 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(4 209 91.090 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 2261.090 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 226 107.742 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 2477.742 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 247 117.470 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 2507.470 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 250 172

PAGE 173

Table6-3.Performanceof CGPOPS onExample1using hp -III,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -III,10Points hp -III,10Points 128.273128.2731 25.207225.20722 35.848 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 1125.848 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 112 49.156 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 1399.156 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 142 55.732 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 1155.732 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 112 69.927 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 1469.927 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 146 72.451 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 1532.451 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 153 88.237 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 1608.237 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 160 Table6-4.Performanceof CGPOPS onExample1using hp -IV,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -IV,10Points hp -IV,10Points 128.273128.2731 24.763464.76346 38.214 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 528.214 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 55 41.813 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 551.813 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(1 58 52.114 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 612.114 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(2 61 61.688 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 871.688 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 87 78.991 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 1068.991 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 106 Figure6-4. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II meshrenementhistoryforExample1using hp -IV,10. 173

PAGE 174

a x t vs. t b u t vs. t Figure6-5. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionstoExample1using hp -IV,10. a x t vs. t near t =0 b x t vs. t near t = t f c u t vs. t near t =0 d u t vs. t near t = t f Figure6-6. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II solutionstoExample1near t =0 and t = t f using hp -IV,10. 174

PAGE 175

6.4.2Example2:ReusableLaunchVehicleEntry ConsiderthefollowingoptimalcontrolproblemtakenfromRef.[21]wherethe objectiveistomaximizethecrossrangeduringtheatmosphericentryofareusablelaunch vehiclewherethenumericalvaluesinRef.[21]havebeenconvertedfromEnglishunitsto SIunits.Maximizetheobjectivefunctional J = t f {49 subjecttothedynamicconstraints r = v sin = v cos sin r cos = v cos cos r ,_ v = )]TJ/F37 11.9552 Tf 10.576 8.088 Td [(D m )]TJ/F37 11.9552 Tf 11.955 0 Td [(g sin = L cos mv )]TJ/F28 11.9552 Tf 11.955 13.271 Td [( g v )]TJ/F37 11.9552 Tf 13.151 8.088 Td [(v r cos = L sin mv cos + v cos sin tan r {50 andtheboundaryconditions h =79248 km h t f =24384 km =0 deg t f = Free =0 deg t f = Free v =7.803 km/s v t f =0.762 km/s = )]TJ/F20 11.9552 Tf 9.298 0 Td [(1 deg t f = )]TJ/F20 11.9552 Tf 9.298 0 Td [(5 deg =90 deg t f = Free {51 where r = h + R e isthegeocentricradius, h isthealtitude, R e isthepolarradiusofthe Earth, isthelongitude, isthelatitude, v isthespeed, istheightpathangle, is theazimuthangle,and m isthemassofthevehicle.Furthermore,theaerodynamicand gravitationalforcesarecomputedas D = v 2 SC D = 2, L = v 2 SC L = 2, g = = r 2 {52 175

PAGE 176

where = 0 exp )]TJ/F37 11.9552 Tf 9.298 0 Td [(h = H istheatmosphericdensity, 0 isthedensityatsealevel, H isthe densityscaleheight, S isthevehiclereferencearea, C D isthecoecientofdrag, C L isthe coecientoflift,and isthegravitationalparameter. TheoptimalcontrolproblemgiveninEqs.6{49to6{52wassolvedusing CGPOPS withthe hp -I,10, hp -II,10, hp -III,10,and hp -IV,10methodsonaninitialmesh consistingoftenevenlyspacedmeshintervalswithfourLGRpointspermeshinterval. TheNLPsolverandmeshrenementaccuracytoleranceswerebothsetto 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(7 .The initialguessofthestatewasastraightlineovertheduration t 2 [0,1000] betweenthe knowninitialandnalcomponentsofthestateoraconstantattheinitialvaluesofthe componentsofthestatewhoseterminalvaluesarenotspecied,whiletheinitialguess ofbothcontrolswaszero.Tables6-5to6-8showtheperformanceofboth CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II onthisexampleforthefour hp methods,wherethemeshrenement historyisnearlyidenticalusinganyofthe hp methods.Thesolutionobtainedusing CGPOPS withthe hp -III,10methodisshowninFigs.6-7ato6-8balongsidethe solutionobtainedusingthesoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]withthe hp -III,10method, whereitisseenthatthetwosolutionsobtainedareessentiallyidentical.Moreover,the optimalobjectiveobtainedusingboth CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II was 0.59627639 toeight signicantgures.Finally,thecomputationtimeusedby CGPOPS isapproximatelyhalf theamountoftimerequiredby GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II tosolvetheoptimalcontrolproblem,taking 0.9105 sand 1.9323 s,respectively. Table6-5.Performanceof CGPOPS onExample2using hp -I,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -I,10Points hp -I,10Points 12.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 412.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 41 29.891 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 1039.896 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 103 33.559 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 1183.559 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 118 43.287 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 1333.287 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 133 58.706 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 1348.706 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 134 176

PAGE 177

Table6-6.Performanceof CGPOPS onExample2using hp -II,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -II,10Points hp -II,10Points 12.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 412.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 41 26.026 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 1936.023 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 193 38.227 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 2618.227 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 261 Table6-7.Performanceof CGPOPS onExample2using hp -III,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -III,10Points hp -III,10Points 12.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 412.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 41 22.850 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 712.850 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 71 32.065 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 1412.065 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 141 48.887 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 1488.887 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 148 Table6-8.Performanceof CGPOPS onExample2using hp -IV,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -IV,10Points hp -IV,10Points 12.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 412.463 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(3 41 22.364 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 1223.364 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 122 33.286 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 2003.286 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 192 49.561 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 2031.285 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 194 5 {{ 9.561 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 195 177

PAGE 178

a h t vs. t b v t vs. t c t vs. t d t vs. t e t vs. t f t vs. t Figure6-7. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II statesolutionstoExample2using hp -III,10. 178

PAGE 179

a t vs. t b t vs. t Figure6-8. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II controlsolutionstoExample2using hp -III,10. Figure6-9. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II meshrenementhistoryforExample2using hp -III4,10. 6.4.3Example3:SpaceStationAttitudeControl Considerthefollowingspacestationattitudecontroloptimalcontrolproblemtaken fromRefs.[91]and[21].Minimizethecostfunctional J = 1 2 Z t f t 0 u T u dt {53 subjecttothedynamicconstraints = J )]TJ/F21 7.9701 Tf 6.587 0 Td [(1 gg r )]TJ/F43 11.9552 Tf 11.955 0 Td [(! [ J + h ] )]TJ/F42 11.9552 Tf 11.955 0 Td [(u r = 1 2 rr T + I + r [ )]TJ/F43 11.9552 Tf 11.955 0 Td [(! 0 r ] h = u {54 179

PAGE 180

theinequalitypathconstraint k h k h max {55 andtheboundaryconditions t 0 =0, t f =1800, = 0 r = r 0 h = h 0 0 = J )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 gg r t f )]TJ/F43 11.9552 Tf 11.955 0 Td [(! t f [ J t f + h t f ] 0 = 1 2 r t f r T t f + I + r t f [ t f )]TJ/F43 11.9552 Tf 11.956 0 Td [(! 0 r t f ] {56 where r h isthestateand u isthecontrol.Inthisformulation istheangular velocity, r istheEuler-Rodriguesparametervector, h istheangularmomentum,and u is theinputmomentandisthecontrol.Furthermore, 0 r = )]TJ/F23 11.9552 Tf 9.299 0 Td [(! orb C 2 gg r =3 2 orb C 3 JC 3 orb =0.06511 180 h max =10000, {57 and C 2 and C 3 arethesecondandthirdcolumn,respectively,ofthematrix C = I + 2 1+ r T r )]TJ/F42 11.9552 Tf 5.479 -9.684 Td [(r r )]TJ/F42 11.9552 Tf 11.955 0 Td [(r {58 Inthisexamplethematrix J isgivenas J = 2 6 6 6 6 4 2.80701911616 10 7 4.822509936 10 5 )]TJ/F20 11.9552 Tf 9.298 0 Td [(1.71675094448 10 7 4.822509936 10 5 9.5144639344 10 7 6.02604448 10 4 )]TJ/F20 11.9552 Tf 9.299 0 Td [(1.71675094448 10 7 6.02604448 10 4 7.6594401336 10 7 3 7 7 7 7 5 {59 180

PAGE 181

whiletheinitialconditions 0 r 0 ,and h 0 are 0 = 2 6 6 6 6 4 )]TJ/F20 11.9552 Tf 9.299 0 Td [(9.5380685844896 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 )]TJ/F20 11.9552 Tf 9.299 0 Td [(1.1363312657036 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 +5.3472801108427 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 3 7 7 7 7 5 r 0 = 2 6 6 6 6 4 2.9963689649816 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 1.5334477761054 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(1 3.8359805613992 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(3 3 7 7 7 7 5 h 0 = 2 6 6 6 6 4 5000 5000 5000 3 7 7 7 7 5 {60 Amoredetaileddescriptionofthisproblem,includingalloftheconstants J 0 r 0 ,and h 0 ,canbefoundinRefs.[91]or[21]. TheoptimalcontrolproblemgiveninEqs.6{53to6{60wassolvedusing CGPOPS withthe hp -I,10, hp -II,10, hp -III,10,and hp -IV,10methodsonaninitial meshconsistingoftenuniformlyspacedmeshintervalsandfourLGRpointspermesh interval.TheNLPsolverandmeshrenementaccuracytolerancesweresetto 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(7 and 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 ,respectively.Theinitialguesswasaconstantoverthetimeinterval t 2 [0,1800] wheretheconstantwas 0 r 0 h 0 forthestateandzeroforthecontrol.Thestateand controlsolutionsobtainedusing CGPOPS areshown,respectively,inFig.6-10and6-11 alongsidethesolutionobtainedusingtheoptimalcontrolsoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]with the hp -I,10.Itisseenthatthe CGPOPS solutionmatchesextremelywellwiththe GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solution.Moreover,theoptimalobjectiveobtainedusingboth CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II was 3.5867511 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(6 toeightsignicantgures.Finally,thecomputation timerequiredby CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II tosolvetheoptimalcontrolproblemwas 0.5338 sand 2.7696 s,respectively. Table6-9.Performanceof CGPOPS onExample3using hp -I,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -I,10Points hp -I,10Points 19.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 419.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 41 26.496 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 476.496 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 47 181

PAGE 182

Table6-10.Performanceof CGPOPS onExample3using hp -II,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -II,10Points hp -II,10Points 19.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 419.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 41 22.389 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 502.387 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 50 37.125 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 557.130 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 55 Table6-11.Performanceof CGPOPS onExample3using hp -III,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -III,10Points hp -III,10Points 19.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 419.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 41 29.542 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 509.559 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 50 Table6-12.Performanceof CGPOPS onExample3using hp -IV,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -IV,10Points hp -IV,10Points 19.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 419.409 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(6 41 21.049 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 531.046 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 53 37.125 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 577.130 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(7 57 182

PAGE 183

a 1 t vs. t b 2 t vs. t c 3 t vs. t d r 1 t vs. t e r 2 t vs. t f r 3 t vs. t Figure6-10. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II solutionstoExample3using hp -I,10. 183

PAGE 184

a h 1 t vs. t b h 2 t vs. t c h 3 t vs. t d u 1 t vs. t e u 2 t vs. t f u 3 t vs. t Figure6-11. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II solutionstoExample3using hp -I,10. 184

PAGE 185

6.4.4Example4:Free-FlyingRobotProblem ConsiderthefollowingoptimalcontrolproblemtakenfromRefs.[21]and[88]. Minimizetheobjectivefunctional J = Z t f 0 u 1 + u 2 + u 3 + u 4 dt {61 subjecttothedynamicconstraints x = v x ,_ y = v y v x = F 1 + F 2 cos ,_ v y = F 1 + F 2 sin = ,_ = F 1 )]TJ/F23 11.9552 Tf 11.955 0 Td [( F 2 {62 thecontrolinequalityconstraints 0 u i 1, i =1,2,3,4, F i 1, i =1,2, {63 andtheboundaryconditions x = )]TJ/F20 11.9552 Tf 9.299 0 Td [(10, x t f =0, y = )]TJ/F20 11.9552 Tf 9.298 0 Td [(10, y t f =0, v x =0, v x t f =0, v y =0, v y t f =0, = 2 t f =0, =0, t f =0, {64 where F 1 = u 1 )]TJ/F37 11.9552 Tf 11.956 0 Td [(u 2 F 2 = u 3 )]TJ/F37 11.9552 Tf 11.955 0 Td [(u 4 =0.2, =0.2. {65 ItisknownthattheoptimalcontrolproblemdenedbyEqs.6{61to6{65isabang-bang optimalcontrol.Giventhestructureofthesolution,the hp -BB,10meshrenement method[64]isalsoemployedtosolvethisexample. TheoptimalcontrolproblemgiveninEqs.6{61to6{64wassolvedusing CGPOPS withthemeshrenementmethods hp -I,10, hp -II,10, hp -III,10, hp -IV,10,and hp -BB,10onaninitialmeshoftenevenlyspacedmeshintervalswithveLGRpoints permeshinterval.Moreover,theNLPsolverandmeshrenementaccuracytolerances weresetto 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(9 and 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(7 ,respectively.Thesolutionobtainedusing CGPOPS withthe 185

PAGE 186

hp -BB,10methodisshowninFigs.6-13and6-14alongsidethesolutionobtained with GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15]withthe hp -II,10method.Itisseenthatthe CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II solutionsareinexcellentagreement.Furthermore,theoptimalobjective obtainedusing CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II are 7.9101471 and 7.9101421 ,respectively, inagreementtosixsignicantgures.Additionally,thecomputationtimerequired by CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II tosolvetheoptimalcontrolproblemwas 0.6313 sand 9.1826 s,respectively.Inordertodemonstratehow CGPOPS iscapableofaccurately andecientlycapturingthebang-bangcontrolproleoftheoptimalsolution,Fig.6-14 showsthecontrolsolutionsobtainedusing CGPOPS employedwiththe hp -BB,10 meshrenementmethodand GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II withthe hp -II,10meshrenementmethod whereitisnotedthatthemeshrenementmethodsusedwerethemosteectiveforthat particularsoftwareprogram.Itisseenthat CGPOPS accuratelycapturestheswitching timesforalleightcontroldiscontinuities,whilethesolutionobtainedusing GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II islessaccuratenearthediscontinuitiesforthethirdandfourthcontrolcomponentssee Figs.6-14c,6-14d,and6-14f.Additionally,Fig.6-12showsthemeshrenement historyfor CGPOPS withthe hp -BB,10methodand GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II withthe hp -II,10 methodwhere CGPOPS onlyrequiresasinglemeshrenementiterationtoattainthe requestedaccuracy,while GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II takesninemeshrenementiterationstoattainthat sameaccuracy.Finally,Tables6-13to6-17showtheestimatederroroneachmesh,where itisseenthattheapproximationofthesolutionerrordecreaseswitheachmeshrenement iterationusinganyofthe hp methods. 186

PAGE 187

Table6-13.Performanceof CGPOPS onExample4using hp -I,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -I,10Points hp -I,10Points 15.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 505.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 50 22.3428 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 821.2977 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 82 37.5065 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1222.3256 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 120 46.2091 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1571.1175 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 161 59.4236 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 1846.2093 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 188 63.9835 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2094.8405 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 212 72.8105 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2242.8104 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 234 88.3276 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2371.5139 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 253 95.4493 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2506.9960 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 261 103.4339 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2587.5178 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 268 113.4145 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2682.7108 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 281 121.3458 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2745.5799 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 287 132.3812 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 2752.3815 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 295 149.0332 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 2789.0299 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(8 297 Table6-14.Performanceof CGPOPS onExample4using hp -II,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -II,10Points hp -II,10Points 15.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 505.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 50 22.3718 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 981.1649 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 98 36.4909 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1629.3164 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 146 42.1470 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 2191.1244 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 207 59.3539 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2633.2283 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 267 61.0198 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2973.5320 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 302 71.7028 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 3102.3505 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 320 89.8413 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 3151.3862 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 322 9 {{ 1.0431 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 325 10 {{ 9.5122 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 328 Table6-15.Performanceof CGPOPS onExample4using hp -III,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -III,10Points hp -III,10Points 15.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 505.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 50 21.8489 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 681.8489 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 68 35.8497 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1855.8497 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 185 44.3708 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2754.3709 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 264 58.2894 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 3492.3747 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 324 64.5337 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 3952.4780 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 389 78.1069 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 4601.5231 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 410 8 {{ 1.0142 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 436 9 {{ 2.1817 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 437 10 {{ 8.0985 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 458 187

PAGE 188

Table6-16.Performanceof CGPOPS onExample4using hp -IV,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -IV,10Points hp -IV,10Points 15.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 505.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 50 27.2614 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1007.2614 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 100 35.8350 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 1635.8350 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 163 47.0276 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2123.9712 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 203 52.9097 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 2591.9372 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 249 65.0338 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 3177.0224 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 301 72.1987 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 3621.1880 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 328 89.8979 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 3767.4092 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 347 9 {{ 1.9947 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 360 10 {{ 9.1526 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 373 Table6-17.Performanceof CGPOPS onExample4using hp -BB,10. MeshEstimatedNumberofEstimatedNumberof IterationError CGPOPS CollocationError GPOPS )]TJ/F34 9.9626 Tf 9.962 0 Td [(II Collocation Number hp -BB,10Points hp -II,10Points 15.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 505.7636 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 50 26.2675 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(9 1081.1649 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 98 3 {{ 9.3164 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(5 146 4 {{ 1.1244 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(4 207 5 {{ 3.2283 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(6 267 6 {{ 3.5320 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 302 7 {{ 2.3505 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 320 8 {{ 1.3862 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 322 9 {{ 1.0431 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(7 325 10 {{ 9.5122 10 )]TJ/F21 6.9738 Tf 6.226 0 Td [(8 328 Figure6-12. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II meshrenementhistoryforExample4using hp -BB,10and hp -II,10,respectively. 188

PAGE 189

a x t vs. t b y t vs. t c v x t vs. t d v y t vs. t e t vs. t f t vs. t Figure6-13. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II statesolutionstoExample4using hp -BB,10 and hp -II,10,respectively. 189

PAGE 190

a u 1 t vs. t b u 2 t vs. t c u 3 t vs. t d u 4 t vs. t e F 1 t vs. t f F 2 t vs. t Figure6-14. CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.956 0 Td [(II controlsolutionstoExample4using hp -BB,10 and hp -II,10,respectively. 190

PAGE 191

6.4.5Example5:Multiple-StageLaunchVehicleAscentProblem Considerthefollowingfour-phaseoptimalcontrolproblemwheretheobjectiveis tosteeramultiple-stagelaunchvehiclefromthegroundtotheterminalorbitwhile maximizingthenalmassofthevehicle[35,12,21].Theproblemismodeledasa four-phaseoptimalcontrolproblem.Maximizetheobjectivefunctional J = m t f {66 subjecttothedynamicconstraints r p = v p v p = )]TJ/F23 11.9552 Tf 24.182 8.088 Td [( k r p k 3 r p + T p m p u p + D p m p m p = )]TJ/F37 11.9552 Tf 10.764 8.088 Td [(T p g 0 I sp p =1,2,3,4, {67 theinitialconditions r t 0 = r 0 =.2,0,3043.4 10 3 m v t 0 = v 0 =,0.4076,0 10 3 m/s m t 0 = m 0 =301454 kg {68 theinteriorpointconstraints r p t p f )]TJ/F42 11.9552 Tf 11.955 0 Td [(r p +1 t p +1 0 = 0 v p t p f )]TJ/F42 11.9552 Tf 11.955 0 Td [(v p +1 t p +1 0 = 0 p =1,2,3, m p t p f )]TJ/F37 11.9552 Tf 11.955 0 Td [(m p dry )]TJ/F37 11.9552 Tf 11.955 0 Td [(m p +1 t p +1 0 =0, {69 theterminalconstraintscorrespondingtoageosynchronoustransferorbit a t f = a f =24361.14 km e t f = e f =0.7308, i t f = i f =28.5deg, t f = f =269.8deg, t f = f =130.5deg, {70 191

PAGE 192

andthepathconstraints j r p j 2 R e k u p k 2 2 =1, p =1,...,4. {71 Ineachphasethequantities r = x y z and v = v x v y v z represent,respectively, geocentricpositionmeasuredrelativetoaninertialreferenceframeandtheinertial velocitymeasuredinEarth-centeredinertialECIcoordinates, isthegravitational parameter, T isthevacuumthrust, m isthevehiclemass, g 0 istheaccelerationdueto gravityatsealevel, I sp isthespecicimpulseoftheengine, u = u x u y u z isthethrust directionandisthecontrol,and D = D x D y D z isthedragforce.Itisnotedthatthe dragforceisgivenas D = )]TJ/F21 7.9701 Tf 10.494 4.707 Td [(1 2 C D S k v rel k v rel {72 where C D isthedragcoecient, S isthevehiclereferencearea, = 0 exp )]TJ/F37 11.9552 Tf 9.298 0 Td [(h = H isthe atmosphericdensity, 0 isthesealeveldensity, h = r )]TJ/F37 11.9552 Tf 12.561 0 Td [(R e isthealtitude, r = k r k 2 = p x 2 + y 2 + z 2 isthegeocentricradius, R e istheequatorialradiusoftheEarth, H isthe densityscaleheight, v rel = v )]TJ/F43 11.9552 Tf 12.194 0 Td [(! r isthevelocityasviewedbyanobserverxedtothe EarthexpressedinECIcoordinates,and =,0, istheangularvelocityoftheEarth asviewedbyanobserverintheinertialreferenceframeexpressedinECIcoordinates. Furthermore, m dry isthedrymassofphases1,2,and3andisdened m dry = m tot )]TJ/F37 11.9552 Tf 11.959 0 Td [(m prop where m tot and m prop are,respectively,thetotalmassandpropellantmassofphases1, 2,and3.Finally,thequantities a e i ,and are,respectively,thesemi-majoraxis, eccentricity,inclination,longitudeofascendingnode,andargumentofperiapsis.The vehicledataforthisproblemandthenumericalvaluesforthephysicalconstantscanbe foundinTables6-18and6-19,respectively. Themultiple-stagelaunchvehicleascentoptimalcontrolproblemwassolvedusing CGPOPS withaninitialmeshineachphaseconsistingoftenuniformlyspacedmesh intervalswithfourLGRpointspermeshinterval.TheNLPsolverandmeshrenement 192

PAGE 193

Table6-18.Vehiclepropertiesforthemultiple-stagelaunchvehicleascentproblem. QuantitySolidBoostersStage1Stage2 m tot kg1929010438019300 m prop kg170109555016820 T N6285001083100110094 I sp s283.3301.7467.2 NumberofEngines911 BurnTimes75.2261700 Table6-19.Constantsusedinthemultiple-stagelaunchvehicleascentproblem. 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 7.29211585 10 )]TJ/F21 6.9738 Tf 6.227 0 Td [(5 rad/s 3.986012 10 14 m 3 /s 2 g 0 9.80665 m/s 2 accuracytolerancesweresetto 10 )]TJ/F21 7.9701 Tf 6.586 0 Td [(7 and 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(6 ,respectively.Theinitialguessofthe solutionwasconstructedsuchthattheinitialguessofthepositionandthevelocityin phases1and2wasconstantat r v asgiveninEq.6{68whileinphases3and 4theinitialguessofthepositionandvelocitywasconstantat ~ r ,~ v ,where ~ r ,~ v are obtainedviaatransformationfromorbitalelementstoECIcoordinatesusingtheve knownorbitalelementsofEq.6{70andatrueanomalyofzero.Furthermore,inallphases theinitialguessofthemasswasastraightlinebetweentheinitialandnalmass, m t p 0 and m t p f p 2 [1,...,4] .Finally,inallphasestheguessofthecontrolwasconstant at u =,1,0 .The CGPOPS solutionisshowninFig.6-15.Inthisexamplethemesh renementaccuracytoleranceof 10 )]TJ/F21 7.9701 Tf 6.587 0 Td [(6 issatisedontheinitialmeshusingboth CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II ,sonomeshrenementisnecessary.Thesolutionobtainedusing CGPOPS matchescloselywiththesolutionobtainedusingthesoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II [15], whereitisnotedthattheoptimalobjectiveobtainedusing CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II are 7547.9729 and 7547.9739 ,respectively,agreeingtosixsignicantgures.Finally,the 193

PAGE 194

computationtimerequiredby CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II tosolvetheoptimalcontrol problemwas 2.9466 sand 18.9401 s,respectively. a h t vs. t b v t vs. t c m t vs. t d u x t vs. t e u y t vs. t f u z t vs. t Figure6-15.SolutionofExample5using CGPOPS and GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II 194

PAGE 195

6.5Capabilitiesof CGPOPS TheveexamplesprovidedinSection6.4demonstratethevariouscapabilitiesof CGPOPS .First,thecapabilitiesofthe hp meshrenementmethodsweredemonstrated onthehyper-sensitiveproblemwherethemeshwasrenedinthesegmentswherethe solutionchangedrapidly.Additionally,theabilityofthe hp methodstomaintainasmall meshwhilesatisfyingaspeciedaccuracytolerancewasshowninthereusablelaunch vehicleentryproblem.Second,theexibilityofthesoftwaretoachievebetterperformance bymodifyingthedefaultsettingsofthemeshinitializationand/orrenementprocess isdemonstratedbythespacestationattitudecontrolproblemandfree-yingrobot problem.Third,allveexamplesdemonstratetheincreasedcomputationaleciency ofimplementingtheoptimalcontrolframeworkdevelopedinSections6.1and6.2in C++ascomparedwiththepreviousMATLABsoftware GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II .Inparticular, thespacestationattitudecontrolexampleshowsthecomputationalbenetsofusingan exactNLPLagrangianHessiansparsitypatternobtainedbyidentifyingthederivative dependenciesusingeitherhyper-dualorbicomplex-stepderivativeapproximationsas describedinSection6.3.5ascomparedtotheover-estimatedHessiansparsitypattern employedin GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II .Next,because CGPOPS includesanewlydevelopedmesh renementmethodforproblemswhosesolutionshaveabang-bangstructure,itispossible using CGPOPS toobtainanaccuratesolutiontobang-bangoptimalcontrolproblems muchmoreecientlythanwhenusingpreviouslydeveloped hp methods.Inaddition, theexamplesdemonstratethegeneralityoftheoptimalcontrolproblemthatcanbe formulatedandsolvedusing CGPOPS .Thefactthat CGPOPS iscapableofsolvingthe challengingbenchmarkoptimalcontrolproblemsshowninthischaptershowsthegeneral utilityofthesoftwareonproblemsthatmayariseindierentapplicationareas. 6.6Limitationsof CGPOPS Aswithanysoftware, CGPOPS haslimitations.First,itisassumedthatallfunctions usedtoformulateanoptimalcontrolproblemofinteresthavecontinuousrstandsecond 195

PAGE 196

derivatives.Itisnoted,however,thatforsomeapplicationsthefunctionsmayhave discontinuousderivativeswhilethefunctionsthemselvesarecontinuous.Incaseswherethe derivativesarediscontinuous CGPOPS mayhavedicultyobtainingasolutionbecause theNLPsolveroperatesundertheassumptionthatallrstandsecondderivativesare continuous.Second,because CGPOPS isadirectcollocationmethod,theabilityto obtainasolutiondependsupontheNLPsolverthatisused.Inparticular,whiletheNLP solver IPOPT [2]usedwith CGPOPS maybeeectiveforsomeexamples,otherNLP solversforexample, SNOPT [1]or KNITRO [3]maybemoreeectivethan IPOPT for certainproblems.Moreover,forproblemswithhigh-indexpathconstraints,theconstraint qualicationconditionsmaynotbesatisedwhenthemeshbecomesextremelyne. Insuchcases,uniqueNLPLagrangemultipliersmaynotexistor,insomecases,these Lagrangemultipliersmaybeunbounded.Furthermore,itmaybediculttoobtaina solutiontoapoorlyscaledproblem.Finally,asistrueforanyoptimalcontrolsoftware, optimalcontrolproblemswhosesolutionslieonasingulararccancreateproblemsdue totheinabilitytodeterminetheoptimalcontrolalongthesingulararc.Moreover,the problemsassociatedwithasingularoptimalcontrolproblemareexacerbatedwithmesh renement.Thus,whensolvingasingularoptimalcontrolproblem,itmaybenecessary tomodifytheoriginalproblembyincludingthehigher-orderoptimalityconditionsthat denethecontrolonthesingulararc. 6.7Conclusions Ageneral-purposeC++softwareprogramcalled CGPOPS hasbeendescribed forsolvingmultiple-phaseoptimalcontrolproblemsusingadaptivedirectorthogonal collocationmethods.Inparticular,thesoftwareemploysaLegendre-Gauss-Radau quadratureorthogonalcollocationwherethecontinuouscontrolproblemistranscribedto alargesparsenonlinearprogrammingproblem.Thesoftwareimplementsvepreviously developedadaptivemeshrenementmethodsthatallowforexibilityinthenumberand placementofthecollocationandmeshpointsinordertoachieveaspeciedaccuracy.In 196

PAGE 197

addition,thesoftwareisdesignedtocomputeallderivativesrequiredbytheNLPsolver usingoneoffourderivativeestimationmethodsfortheoptimalcontrolfunctions.Thekey componentsofthesoftwarehavebeendescribedindetailandtheutilityofthesoftwareis demonstratedonvebenchmarkoptimalcontrolproblems.Thesoftwaredescribedinthis chapterprovidesresearchersatransitionalplatformuponwhichtosolveawidevarietyof complexconstrainedoptimalcontrolproblemsforreal-timeapplications. 197

PAGE 198

CHAPTER7 SUMMARYANDFUTUREWORK TheresearchinthisdissertationhasbeenconcernedwithdevelopingaC++ frameworkforsolvingnonlinearoptimalcontrolproblems.Optimalcontrolproblems ariseinnearlyeverybranchofengineering,medicalsciences,andeconomics.Due totheincreasingsizeandcomplexityofthetypesofoptimalcontrolproblemsthat ariseintheseelds,numericalmethodsforobtainingsolutionstooptimalcontrol problemsmustbeemployed.Inparticular,theresearchinthisdissertationemploys Legendre-Gauss-RadauLGRcollocationtotranscribethecontinuousoptimalcontrol problemintoanite-dimensionalnonlinearprogrammingproblemNLPwhichcanthen besolvedusingwell-establishedNLPsolvers.Thedirecttranscriptionofanoptimal controlproblemusingLGRcollocationresultsinasparseNLPthathasawell-dened andelegantstructure.Furthermore,thesparsityoftheresultingNLPcanbeexploited byderivingtheNLPderivativematricesintermsofthederivativesofthecontinuous functionsoftheoriginaloptimalcontrolproblem.TofacilitatetheNLPsolveremployed tosolvethetranscribedNLP,derivativeestimatesofthecontinuousfunctionsmustbe computedaccuratelyandeciently.Additionally,theaccuracyoftheapproximated solutionreturnedbytheNLPsolverobtainedbydiscretizingthecontinuousoptimal controlproblemmustbeassessedandthemeshusedforthediscretizationmustbe appropriatelymodiedusingmeshrenementtechniquesinordertosatisfyaspecied accuracytolerance. Themannerbywhichacontinuousoptimalcontrolproblemistranscribedintoa large,sparseNLPusingLGRcollocationisdescribedinChapter3.Theformofageneral multiple-phaseoptimalcontrolproblemispresented,andtheprocessofusingLGR collocationtodiscretizethecontinuousintervalisdescribed.Furthermore,theformofthe transcribedNLPresultingfromtheLGRtranscriptionisdetailed.Finally,theexploitation 198

PAGE 199

ofthesparsityarisinginthetranscribedNLPderivativematricesisdevelopedandderived intermsofthederivativesofthecontinuousfunctionsoftheoptimalcontrolproblem. UponderivingtheNLPderivativematricesintermsofthecontinuousfunction derivatives,theneedforderivativeestimationtechniquestocomputethenecessary derivativestofacilitatetheNLPsolverbecomesapparent.Chapter4overviewsthetypes ofderivativeestimationtechniquesavailableforthispurpose.Inparticular,thefour derivativeestimationtechniquesofsparsecentralnite-dierencing,bicomplex-step derivativeapproximation,hyper-dualderivativeapproximation,andautomatic dierentiationarecomparedforuseinsolvingoptimalcontrolproblemsusingdirect collocation.Specically,theaforementionedderivativeestimationtechniquesarecompared intermsofcomputationaleciencymeasuredbythenumberofNLPiterationsto converge,totalcomputationtimetosolve,andaveragetimeperNLPiterationspent onderivativeestimation.Itisfoundthatthehyper-dualderivativeapproximationis best-suitedforoptimalcontrolapplications,asitprovidesmachine-precisionderivative estimatesandeaserelativelyeasytoimplementusingoperatoroverloading. InChapter5anovelmeshrenementmethodforsolvingbang-bangoptimalcontrol problemsisdeveloped.Meshrenementmethodsareessentialtoensuringthatthe approximatedsolutionobtainedusingdirecttranscriptionmethodssatisesaspecied accuracytolerance,andifnot,appropriatelymodiesthemeshusedtodiscretizethe continuousprobleminordertoobtainanaccuratesolutioninacomputationallyecient manner.Discontinuitiesappearinginoptimalsolutions,however,canoftenrequire anundesirablylargeamountofmeshrenement.Specically,theclassofbang-bang optimalcontrolproblemsinwhichtheoptimalcontroliseitheratitsmaximumor minimumvaluethroughoutthesolutioncontainsdiscontinuitieswhichoftenrequirea largeamountofmeshrenementinordertosatisfyhighaccuracytolerances.Byusing estimatesoftheswitchingfunctionsassociatedwiththeHamiltonianofbang-bang optimalcontrolproblems,thenovelmeshrenementmethoddevelopedinthisresearch 199

PAGE 200

iscapableofidentifyingthebang-bangcontrolproleofanoptimalcontrolproblemin whichthecontrolappearslinearlyintheHamiltonian.Thenusingthedetectedbang-bang structure,themethodemploysmultipledomainsconnectedbyvariablemeshpointssoas tointroducetheappropriatenumberofswitchtimeparameterstobesolvedfordirectly bytheNLPsolveronsubsequentmeshiterations.Thedegreesoffreedomaremaintained byholdingthecontrolconstantattheappropriatelimitwithineachdomainbasedonthe detectedstructure.Indoingso,thenovelbang-bangmeshrenementmethodisableto convergeinfeweriterations,usingfewercollocationpoints,andinlesscomputationtime thanpreviouslydeveloped hp meshrenementmethods. TheoptimalcontrolframeworkdescribedinChapters3to5isimplementedinthe C++object-orientedprogramminglanguage,resultingintheC++general-purpose optimalcontrolproblemsolver CGPOPS describedinChapter6. CGPOPS employsthe variable-orderLegendre-Gauss-Radaucollocationmethod,alongwiththeaforementioned derivativeestimationtechniquesand hp adaptivemeshrenementmethods.Inparticular, thedevelopmentof CGPOPS intheC++compiledlanguagefacilitatestheusageof bicomplex-stepandhyper-dualderivativeapproximationswhichrequiredeningclass typesandoperatoroverloadinginordertobeusedeectivelyandeciently.Furthermore, thehyper-dualderivativeapproximationisnecessaryforcomputingtheestimatesofthe switchingfunctionsassociatedwiththeHamiltonianwhichareusedtoalgorithmically detectthebang-bangcontrolprolewhenutilizingtheaforementionednovelbang-bang meshrenementmethod.The CGPOPS softwareisdemonstratedonseveralbenchmark optimalcontrolproblems,whereitisshowntobeabletoobtainaccuratesolutionsina computationallyecientmanner. TheC++frameworkforsolvingnonlinearoptimalcontrolproblemsdeveloped inthisdissertationrepresentsasignicantdevelopmentintheapplicationofsolving optimalcontrolproblemsforreal-timeoptimalguidance.BeingimplementedinC++ enablesthesoftwaretobecomputationallyecientandhighlyportablesuchthatthe 200

PAGE 201

softwarecouldbepotentiallyusedtocomputeonlinesolutionsforconstraineddynamical systems.Currentlythe CGPOPS softwareisinterfacedwiththewidelyusedopensource NLPsolver IPOPT whichusesaninteriorpointmethodtosolvethetranscribedNLP. Although IPOPT workswellformanyproblems,interfacing CGPOPS withasequential quadraticprogrammingSQPNLPsolversuchas WORHP [113]couldpotentially improvecomputationallyeciency,asSQPNLPsolversconvergefasterthaninterior pointmethodNLPsolverswhengivenagoodinitialguesswhichisoftenthecasewhen tryingtosolvethetranscribedNLPafterusingmeshrenement.Furthermore,since CGPOPS onlyrequiresaC++compilerinordertobeusedonagivensystem,testingthe softwareonasystemotherthanalaptopcouldproveusefulindeterminingthepotential forgeneratingonlinesolutionssuchasbeingemployedonaightcomputerorevena microcontroller.Inthisregards,includingmeshtruncationschemes[114]tothe CGPOPS softwarecouldfurtherfacilitatetheusageofthesoftwareforreal-timeoptimalguidance. 201

PAGE 202

REFERENCES [1]Gill,P.E.,Murray,W.,andSaunders,M.A.,SNOPT:AnSQPAlgorithmfor Large-ScaleConstrainedOptimization," SIAMReview ,Vol.47,No.1,January2002, pp.99{131.https://doi.org/10.1137/S0036144504446096. [2]Biegler,L.T.andZavala,V.M.,Large-ScaleNonlinearProgrammingUsing IPOPT:AnIntegratingFrameworkforEnterprise-WideOptimization," Computers andChemicalEngineering ,Vol.33,No.3,March2008,pp.575{582.https://doi.org/ 10.1016/j.compchemeng.2008.08.006. [3]Byrd,R.H.,Nocedal,J.,andWaltz,R.A.,KNITRO:AnIntegratedPackagefor NonlinearOptimization," LargeScaleNonlinearOptimization ,SpringerVerlag,2006, pp.35{59. [4]Oberle,H.J.andGrimm,W.,BNDSCO:AProgramfortheNumericalSolution ofOptimalControlProblems,"Tech.rep.,InstituteofFlightSystemsDynamics, GermanAerospaceResearchEstablishmentDLR,IB515-89/22,Oberpfaenhofen, Germany,1990. [5]Betts,J.T.,SurveyofNumericalMethodsforTrajectoryOptimization," Journalof Guidnance,Control,andDynamics ,Vol.21,No.2,March{April1998,pp.193{207. https://doi.org/10.2514/2.4231. [6]vonStryk,O., User'sGuideforDIRCOLVersion2.1:ADirectCollocation MethodfortheNumericalSolutionofOptimalControlProblems ,Technical University,Munich,Germany,2000. [7]Jansch,C.,Well,K.H.,andSchnepper,K., GESOP-EineSoftwareUmgebungZur SimulationUndOptimierung ,ProceedingsdesSFB,1994. [8]Vlases,W.G.,Paris,S.W.,Lajoie,R.M.,Martens,M.J.,andHargraves,C.R., OptimalTrajectoriesbyImplicitSimulation,"Tech.Rep.WRDC-TR-90-3056, BoeingAerospaceandElectronics,Wright-PattersonAirForceBase,Ohio,1990. [9]Goh,C.J.andTeo,K.L.,ControlParameterization:AUniedApproachto OptimalControlProblemswithGeneralConstraints," Automatica ,Vol.24,No.1, January1988,pp.3{18.https://doi.org/10.1016/0005--1098--9. [10]Brauer,G.L.,Cornick,D.E.,andStevenson,R.,CapabilitiesandApplicationsof theProgramtoOptimizeandSimulateTrajectories,"Tech.Rep.NASA-CR-2770, NationalAeronauticsandSpaceAdministration,1977. [11]Becerra,V.M., PSOPT OptimalControlSolverUserManual ,Universityof Reading,2009,http://www.psopt.org. 202

PAGE 203

[12]Rao,A.V.,Benson,D.A.,Darby,C.L.,Francolin,C.,Patterson,M.A.,Sanders, I.,andHuntington,G.T.,Algorithm902:GPOPS,AMATLABSoftwarefor SolvingMultiple-PhaseOptimalControlProblemsUsingtheGaussPseudospectral Method," ACMTransactionsonMathematicalSoftware ,Vol.37,No.2,April{June 2010,pp.22:1{22:39.https://doi.org/10.1145/1731022.1731032. [13]Falugi,P.,Kerrigan,E.,andvanWyk,E., ImperialCollegeLondonOptimalControl SoftwareUserGuideICLOCS ,DepartmentofElectricalEngineering,Imperial CollegeLondon,London,UK,May2010. [14]Houska,B.,Ferreau,H.J.,andDiehl,M.,ACADOToolkit{AnOpen-Source FrameworkforAutomaticControlandDynamicOptimization," OptimalControl ApplicationsandMethods ,Vol.32,No.3,May{June2011,pp.298{312.https: //doi.org/10.1002/oca.939. [15]Patterson,M.A.andRao,A.V., GPOPS )]TJ/F34 11.9552 Tf 11.955 0 Td [(II ,AMATLABSoftwareforSolving Multiple-PhaseOptimalControlProblemsUsing hp -AdaptiveGaussianQuadrature CollocationMethodsandSparseNonlinearProgramming," ACMTransactions onMathematicalSoftware ,Vol.41,No.1,October2014,pp.1:1{1:37.https: //doi.org/10.1145/2558904. [16]Babuska,I.andSuri,M.,The p and hp VersionoftheFiniteElementMethod,an Overview," ComputerMethodsinAppliedMechanicsandEngineering ,Vol.80,1990, pp.5{26.https://doi.org/10.1016/0045--7825--A. [17]Babuska,I.andSuri,M.,The p and hp VersionoftheFiniteElementMethod, BasicPrinciplesandProperties," SIAMReview ,Vol.36,1994,pp.578{632.https: //doi.org/10.1137/1036141. [18]Gui,W.andBabuska,I.,The h p ,and hp VersionsoftheFiniteElementMethod in1Dimension.PartI.TheErrorAnalysisofthe p Version," NumerischeMathematik ,Vol.49,1986,pp.577{612.https://doi.org/10.1007/BF01389733. [19]Gui,W.andBabuska,I.,The h p ,and hp VersionsoftheFiniteElementMethod in1Dimension.PartII.TheErrorAnalysisofthe h and h )]TJ/F37 11.9552 Tf 9.596 0 Td [(p Versions," Numerische Mathematik ,Vol.49,1986,pp.613{657.https://doi.org/10.1007/BF01389734. [20]Gui,W.andBabuska,I.,The h p ,and hp VersionsoftheFiniteElementMethod in1Dimension.PartIII.TheAdaptive h )]TJ/F37 11.9552 Tf 12.521 0 Td [(p Version," NumerischeMathematik Vol.49,1986,pp.659{683.https://doi.org/10.1007/BF01389734. [21]Betts,J.T., PracticalMethodsforOptimalControlandEstimationUsingNonlinear Programming ,SIAMPress,Philadelphia,2nded.,2009. [22]Jain,D.andTsiotras,P.,TrajectoryOptimizationUsingMultiresolution Techniques," JournalofGuidance,Control,andDynamics ,Vol.31,No.5, September-October2008,pp.1424{1436.https://doi.org/10.2514/1.32220. 203

PAGE 204

[23]Zhao,Y.J.,OptimalPatternofGliderDynamicSoaring," OptimalControl ApplicationsandMethods ,Vol.25,2004,pp.67{89. [24]Elnagar,G.,Kazemi,M.,andRazzaghi,M.,ThePseudospectralLegendreMethod forDiscretizingOptimalControlProblems," IEEETransactionsonAutomatic Control ,Vol.40,No.10,1995,pp.1793{1796.https://doi.org/10.1109/9.467672. [25]Elnagar,G.andRazzaghi,M.,ACollocation-TypeMethodforLinearQuadratic OptimalControlProblems," OptimalControlApplicationsandMethods ,Vol.18, No.3,1998,pp.227{235.https://doi.org/10.1002/SICI--1514/06: 3 h 227::AID--OCA598 i 3.0.CO;2--A. [26]Benson,D.A.,Huntington,G.T.,Thorvaldsen,T.P.,andRao,A.V.,Direct TrajectoryOptimizationandCostateEstimationviaanOrthogonalCollocation Method," JournalofGuidance,Control,andDynamics ,Vol.29,No.6, November-December2006,pp.1435{1440.https://doi.org/10.2514/1.20478. [27]Huntington,G.T., AdvancementandAnalysisofaGaussPseudospectralTranscriptionforOptimalControl ,Ph.D.thesis,MassachusettsInstituteofTechnology, Cambridge,Massachusetts,2007. [28]Garg,D.,Patterson,M.A.,Hager,W.W.,Rao,A.V.,Benson,D.A.,and Huntington,G.T.,AUniedFrameworkfortheNumericalSolutionofOptimal ControlProblemsUsingPseudospectralMethods," Automatica ,Vol.46,No.11, November2010,pp.1843{1851.https://doi.org/10.1016/j.automatica.2010.06.048. [29]Garg,D.,Hager,W.W.,andRao,A.V.,PseudospectralMethodsforSolving Innite-HorizonOptimalControlProblems," Automatica ,Vol.47,No.4,April2011, pp.829{837.https://doi.org/10.1016/j.automatica.2011.01.085. [30]Garg,D.,Patterson,M.A.,Darby,C.L.,Francolin,C.,Huntington,G.T.,Hager, W.W.,andRao,A.V.,DirectTrajectoryOptimizationandCostateEstimation ofFinite-HorizonandInnite-HorizonOptimalControlProblemsviaaRadau PseudospectralMethod," ComputationalOptimizationandApplications ,Vol.49, No.2,June2011,pp.335{358.https://doi.org/10.1007/s10589--00--09291--0. [31]Darby,C.L.,Hager,W.W.,andRao,A.V.,An hp -AdaptivePseudospectral MethodforSolvingOptimalControlProblems," OptimalControlApplicationsand Methods ,Vol.32,No.4,July{August2011,pp.476{502.https://doi.org/10.1002/ oca.957. [32]Darby,C.L.,Hager,W.W.,andRao,A.V.,DirectTrajectoryOptimizationUsing aVariableLow-OrderAdaptivePseudospectralMethod," JournalofSpacecraftand Rockets ,Vol.48,No.3,May{June2011,pp.433{445.https://doi.org/10.2514/1. 52136. 204

PAGE 205

[33]Liu,F.,Hager,W.W.,andRao,A.V.,AdaptiveMeshRenementforOptimal ControlUsingNonsmoothnessDetectionandMeshSizeReduction," Journal oftheFranklinInstitute ,Vol.352,No.10,October2015,pp.4081{4106.https: //doi.org/10.1016/j.jfranklin.2015.05.028. [34]Liu,F.,Hager,W.W.,andRao,A.V.,AdaptiveMeshRenementforOptimal ControlUsingUsingDecayRatesofLegendrePolynomialCoecients," IEEE TransactionsonControlSystemTechnology ,Vol.26,No.4,2018,pp.1475{1483. https://doi.org/10.1109/TCST.2017.2702122. [35]Benson,D.A., AGaussPseudospectralTranscriptionforOptimalControl ,Ph.D. thesis,DepartmentofAeronauticsandAstronautics,MassachusettsInstituteof Technology,Cambridge,Massachusetts,2004. [36]Huntington,G.T.,Benson,D.A.,andRao,A.V.,OptimalCongurationof TetrahedralSpacecraftFormations," TheJournaloftheAstronauticalSciences Vol.55,No.2,April-June2007,pp.141{169.https://doi.org/10.1007/BF03256518. [37]Huntington,G.T.andRao,A.V.,OptimalRecongurationofSpacecraft FormationsUsingtheGaussPseudospectralMethod," JournalofGuidance,Control,andDynamics ,Vol.31,No.3,May-June2008,pp.689{698. https://doi.org/10.2514/1.31083. [38]Gong,Q.,Ross,I.M.,Kang,W.,andFahroo,F.,ConnectionsBetweenthe CovectorMappingTheoremandConvergenceofPseudospectralMethods," ComputationalOptimizationandApplications ,Vol.41,No.3,December2008,pp.307{335. https://doi.org/10.1007/s10589--007--9102--4. [39]Kameswaran,S.andBiegler,L.T.,ConvergenceRatesforDirectTranscription ofOptimalControlProblemsUsingCollocationatRadauPoints," Computational OptimizationandApplications ,Vol.41,No.1,2008,pp.81{126.https://doi.org/10. 1007/s10589--007--9098--9. [40]Patterson,M.A.andRao,A.V.,ExploitingSparsityinDirectCollocation PseudospectralMethodsforSolvingContinuous-TimeOptimalControlProblems," JournalofSpacecraftandRockets, ,Vol.49,No.2,March{April2012,pp.364{377. https://doi.org/10.2514/1.A32071. [41]Canuto,C.,Hussaini,M.Y.,Quarteroni,A.,andZang,T.A., SpectralMethodsin FluidDynamics ,Spinger-Verlag,Heidelberg,Germany,1988. [42]Fornberg,B., APracticalGuidetoPseudospectralMethods ,CambridgeUniversity Press,NewYork,1998. [43]Trefethen,L.N., SpectralMethodsUsingMATLAB ,SIAMPress,Philadelphia,2000. [44]Davidon,W.C.,Variablemetricmethodforminimization," SIAMJournalon Optimization ,Vol.1,No.1,1991,pp.1{17. 205

PAGE 206

[45]Fletcher,R., PracticalMethodsofOptimization ,JohnWileyandSons,NewYork, 1985. [46]Fletcher,R.andPowell,M.J.D.,ARapidlyConvergentDescentMethodfor Minimization," ComputerJournal ,Vol.6,No.2,1963,pp.163{168. [47]Broyden,C.G.,TheConvergenceofaClassofDouble-RankMinimization Algorithms," JournaloftheInstituteofMathematicsandItsApplications ,Vol.6, No.1,1970,pp.76{90. [48]Fletcher,R.,ANewApproachtoVariableMetricAlgorithms," ComputerJournal Vol.13,No.3,1970,pp.317{322. [49]Goldfarb,D.,AFamilyofVariableMetricUpdatesDerivedbyVariationalMeans," MathematicsofComputation ,Vol.24,No.3,1970,pp.23{26. [50]Shanno,D.F.,ConditioningofQuasi-NewtonMethodsforFunctionMinimization," MathematicsofComputation ,Vol.24,1970,pp.647{656. [51]Gill,P.E.,Murray,W.,Saunders,M.A.,andWright,M.H., User'sGuidefor NPSOLVersion4.0:AFORTRANPackageforNonlinearProgramming DepartmentofOperationsResearch,StanfordUniversity,January1986. [52]Gill,P.E.,Murray,W.,andSaunders,M.A., User'sGuideforSNOPTVersion7: SoftwareforLargeScaleNonlinearProgramming ,February2006. [53]Agamawi,Y.M.andRao,A.V.,ExploitingSparsityinDirectOrthogonal CollocationMethodsforSolvingMultiple-PhaseOptimalControlProblems," 2018SpaceFlightMechanicsMeeting ,AIAAPaper2018-0724,Kissimmee,Florida. https://doi.org/10.2514/6.2018-0724,8-12January.2018. [54]Gill,P.E.,Murray,W.,andWright,M.H., PracticalOptimization ,AcademicPress, London,1981. [55]Lantoine,G.,Russell,R.P.,andDargent,T.,UsingMulticomplexVariables forAutomaticComputationofHigh-OrderDerivatives," ACMTransactionson MathematicalSoftware ,Vol.38,April2012,pp.16:1{16:21.10.1145/2168773. 2168774. [56]Fike,J.andAlonso,J.,TheDevelopmentofHyper-DualNumbersforExact Second-DerivativeCalculations," 49thAIAAAerospaceSciencesMeetingincluding theNewHorizonsForumandAerospaceExposition ,AIAAPaper2011-886,Orlando, Florida.https://doi.org/10.2514/6.2011-886,4-7January2011. [57]Griewank,A.andWalther,A., EvaluatingDerivatives:PrinciplesandTechniquesof AlgorithmicDierentiation ,SIAMPress,Philadelphia,Pennsylvania,2nded.,2008. 206

PAGE 207

[58]Martins,J.R.andHwang,J.T.,ReviewandUnicationofMethodsfor ComputingDerivativesofMultidisciplinaryComputationalModels," AIAAJournal Vol.51,No.11,September2013,pp.2582{2599.https://doi.org/10.2514/1.J052184. [59]Gong,Q.,Fahroo,F.,andRoss,I.M.,SpectralAlgorithmforPseudospectral MethodsinOptimalControl," JournalofGuidance,Control,andDynamics ,Vol.31, No.3,May-June2008.,pp.460{471.https://doi.org/10.2514/1.32908. [60]Zhao,Y.andTsiotras,P.,DensityFunctionsforMeshRenementinNumerical OptimalControl," JournalofGuidance,Control,andDynamics ,Vol.34,No.1, January{February2011,pp.271{277.https://doi.org/10.2514/1.45852. [61]Patterson,M.A.,Hager,W.W.,andRao,A.V.,A ph MeshRenementMethod forOptimalControl," OptimalControlApplicationsandMethods ,Vol.36,No.4, July{August2015,pp.398{421.https://doi.org/10.1002/oca.2114. [62]Agamawi,Y.M.,Hager,W.W.,andRao,A.V.,MeshRenementMethodfor OptimalControlProblemswithDiscontinuousControlProles," 2017AIAA Guidance,Navigation,andControlConference ,Grapevine,Texas,9-13January 2017.https://doi.org/10.2514/6.2017-1506. [63]Miller,A.T.,Hager,W.W.,andRao,A.V.,APreliminaryAnalysisofMesh RenementforOptimalControlUsingDiscontinuityDetectionviaJumpFunction Approximations," 2018Guidance,Navigation,andControlConference ,Kissimmee, Florida,8-11January2018.https://doi.org/10.2514/6.2018-0852. [64]Agamawi,Y.M.,Hager,W.W.,andRao,A.V.,MeshRenementMethodfor SolvingBang-BangOptimalControlProblemsUsingDirectCollocation,"2019. https://arXiv.org/abs/1905.11895. [65]Weinstein,M.J.andRao,A.V.,Algorithm:ADiGator,aToolboxforthe AlgorithmicDierentiationofMathematicalFunctionsinMATLAB," ACMTransactionsonMathematicalSoftware ,Vol.44,No.2,October2017,pp.21:1{21:25. https://doi.org/10.1145/3104990. [66]Kirk,D.E., OptimalControlTheory:AnIntroduction ,DoverPublications,Mineola, NewYork,2004. [67]Bryson,A.E.andHo,Y.-C., AppliedOptimalControl ,HemispherePublishing,New York,1975. [68]Lewis,F.L.andSyrmos,V.L., OptimalControl ,JohnWileyandSons,NewYork, 2nded.,1995. [69]Gear,W.C., NumericalInitial-ValueProblemsinOrdinaryDierentialEquations Prentice-Hall,EnglewoodClis,NewJersey,1971. [70]Dahlquist,G.andBjorck,A., NumericalMethods ,DoverPublications,Mineola,New York,2003. 207

PAGE 208

[71]Stoer,J.andBulirsch,R., IntroductiontoNumericalAnalysis ,Springer-Verlag, 2002. [72]Butcher,J.C.,ImplicitRunge-KuttaProcesses," MathematicsofComputation Vol.18,No.85,1964,pp.50{64. [73]Butcher,J.C., NumericalMethodsforOrdinaryDierentialEquations ,JohnWiley andSons,NewYork,2008. [74]Hairer,E.,Norsett,S.P.,andWanner,G., SolvingOrdinaryDierentialEquations I:NonstiProblems ,Springer-Verlag,NewYork,1993. [75]Hairer,E.andWanner,G., SolvingOrdinaryDierentialEquationsII:Sti Dierential-AlgebraicProblems ,Springer-Verlag,NewYork,1996. [76]Carraro,T.,Geiger,M.,andRannacher,R.,IndirectMultipleShootingfor NonlinearParabolicOptimalControlProblemswithControlConstraints," SIAM JournalonScienticComputing ,Vol.36,2011,pp.A452{A481. [77]Hager,W.W.,Hou,H.,andRao,A.V.,LebesgueConstantsArisinginaClassof CollocationMethods," IMAJournalofNumericalAnalysis ,Vol.13,No.1,October 2017,pp.1884{1901.https://doi.org/10.1093/imanum/drw060. [78]Hager,W.W.,Hou,H.,andRao,A.V.,ConvergenceRateforaGaussCollocation MethodAppliedtoUnconstrainedOptimalControl," JournalofOptimization TheoryandApplications ,Vol.169,No.3,2016,pp.801{824.https://doi.org/10. 1007/s10957--016--0929--7. [79]Hager,W.W.,Liu,J.,Mohapatra,S.,Rao,A.V.,andWang,X.-S.,Convergence RateforaGaussCollocationMethodAppliedtoConstrainedOptimalControl," SIAMJournalonControlandOptimization ,Vol.56,No.2,2018,pp.1386{1411. https://doi.org/10.1137/16M1096761. [80]Du,W.,Chen,W.,Yang,L.,andHager,W.W.,BoundsforIntegrationMatrices ThatAriseinGaussandRadauCollocation," ComputationalOptimizationand Applications ,2019.http://doi.org/10.1007/s10589-019-00099-5. [81]Hager,W.W.,Hou,H.,Mohapatra,S.,Rao,A.V.,andWang,X.-S.,Convergence RateforaRadau hp CollocationMethodAppliedtoConstrainedOptimalControl," ComputationalOptimizationandApplications ,May2019.https://doi.org/10.1007/ s10589-019-00100. [82]Abramowitz,M.andStegun,I., HandbookofMathematicalFunctionswithFormulas, Graphs,andMathematicalTables ,DoverPublications,NewYork,1965. [83]Sobieszczanski-Sobieski,J.,SensitivityofComplex,InternallyCoupledSystems," AIAAJournal ,Vol.28,No.1,January1990,pp.153{160.https://doi.org/10.2514/ 3.10366. 208

PAGE 209

[84]Griewank,A.,Juedes,D.,andUtke,J.,Algorithm755:ADOL-C:APackage fortheAutomaticDierentiationofAlgorithmsWritteninC/C++," ACM TransactionsonMathematicalSoftware ,Vol.22,No.2,1996,pp.131{167. https://doi.org/10.1145/229473.229474. [85]Walther,A.,Griewank,A.,andVogel,O.,ADOL-C:AutomaticDierentiation UsingOperatorOverloadinginC++," ProceedingsinAppliedMathematicsand Mechanics ,Vol.2,No.1,2003,pp.41{44.https://doi.org/10.1002/pamm.200310011. [86]Betts,J.T.andHuman,W.P.,ExploitingSparsityintheDirectTranscription MethodforOptimalControl," ComputationalOptimizationandApplications Vol.14,1999,pp.179{201.https://doi.org/10.1023/A:1008739131724. [87]Agamawi,Y.M.andRao,A.V.,ComparisonofDerivativeEstimationMethods inSolvingOptimalControlProblemsUsingDirectCollocation,"2019.https: //arXiv.org/abs/1905.12745. [88]Sakawa,Y.,TrajectoryPlanningofaFree-FlyingRobotbyUsingtheOptimal Control," OptimalControlApplicationsandMethods ,Vol.20,1999,pp.235{248. https://doi.org/10.1002/SICI--1514/10:5 h 235::AID--OCA658 i 3.0. CO;2--I. [89]Bryson,A.E.,Desai,M.N.,andHoman,W.C.,Energy-StateApproximationin PerformanceOptimizationofSupersonicAircraft," AIAAJournalofAircraft ,Vol.6, No.6,November{December1969,pp.481{488.https://doi.org/10.2514/3.44093. [90]Agamawi,Y.M.andRao,A.V.,CGPOPS:AC++SoftwareforSolving Multiple-PhaseOptimalControlProblemsUsingAdaptiveGaussianQuadrature CollocationandSparseNonlinearProgramming,"2019.https://arXiv.org/abs/1905. 11898. [91]Pietz,J.A., PseudospectralCollocationMethodsfortheDirectTranscriptionof OptimalControlProblems ,Master'sthesis,RiceUniversity,Houston,Texas,April 2003. [92]Shamsi,M.,AModiedPseudospectralSchemeforAccurateSolutionof Bang-BangOptimalControlProblems," OptimalControlApplicationsandMethods Vol.32,2011,pp.668{680.https://doi.org/10.1002/oca.967. [93]Maurer,H.,Buskens,C.,Kim,J.H.R.,andKaya,C.Y.,OptimizationMethods fortheVericationofSecondOrderSucientSonditionsforBang-BangControls," OptimalControlApplicationsandMethods ,Vol.26,2005,pp.129{156.https: //doi.org/10.1002/oca.756. [94]Kim,J.H.R.,Maurer,H.,Astrov,Y.A.,Bode,M.,andPurwins,H.G., High-SpeedSwitch-OnofaSemiconductorGasDischargeImageConverterUsing OptimalControlMethods," JournalofComputationalPhysics ,Vol.170,June2001, pp.395{414.https://doi.org/10.1006/jcph.2001.6741. 209

PAGE 210

[95]Meier,E.andRyson,A.E.,EcientAlgorithmforTime-OptimalControlofa Two-linkManipulator," JournalofGuidance,Control,andDynamics ,Vol.13, September1990,pp.859{866.https://doi.org/10.2514/3.25412. [96]Hu,G.S.,Ong,C.J.,andTeo,C.L.,Minimum-TimeControlofaCranewith SimultaneousTraverseandHoistingMotions," JournalofOptimizationTheoryand Applications ,Vol.120,February2004,pp.395{416.https://doi.org/10.1023/B: JOTA.0000015690.02820.ea. [97]Bertrand,R.andEpenoy,R.,NewSmoothingTechniquesforSolvingBangBang OptimalControlProblems-NumericalResultsandStatisticalInterpretation," Optim. ControlAppl.Meth. ,Vol.23,July2002,pp.171{197.https://doi.org/10.1002/oca. 709. [98]Huang,W.andRussell,R.D., AdaptiveMovingMeshMethods ,Springer-Verlag, NewYork,2011. [99]Ledzewicz,U.andSchttler,H.,AnalysisofaCell-CycleSpecicModelfor CancerChemotherapy," JournalofBiologicalSystems ,Vol.10,September2002, pp.183{206.https://doi.org/10.1142/S0218339002000597. [100]Maurer,H.andOsmolovskii,N.,SecondOrderSucientConditionsfor Time-OptimalBang-BangControl," SIAMJournalonControlandOptimization Vol.42,January2004,pp.2239{2263.https://doi.org/10.1137/S0363012902402578. [101]Kaya,C.Y.andNoakes,J.L.,ComputationsandTime-OptimalControls," OptimalControlApplicationsandMethods ,Vol.17,July1996,pp.171{185.https:// doi.org/10.1002/SICI--1514/09:3 h 171::AID--OCA571 i 3.0.CO;2--9. [102]Kaya,C.Y.andNoakes,J.L.,ComputationalMethodforTime-OptimalSwitching Control," JournalofOptimizationTheoryandApplications ,Vol.117,April2003, pp.69{92.https://doi.org/10.1023/A:1023600422807. [103]Kaya,C.Y.,Lukas,S.K.,andSimakov,S.T.,ComputationsforBang-Bang ConstrainedOptimalControlUsingaMathematicalProgrammingFormulation," OptimalControlApplicationsandMethods ,Vol.25,2004,pp.295{308.https: //doi.org/10.1002/oca.749. [104]Cuthrell,J.E.andBiegler,L.T.,OntheOptimizationofDierential-Algebraic Processes," AICheJournal ,Vol.33,No.8,August1987,pp.1257{1270. [105]Ross,I.M.andFahroo,F.,PseudospectralKnottingMethodsforSolvingOptimal ControlProblems," JournalofGuidance,Control,andDynamics ,Vol.27,No.3, 2004,pp.397{405. [106]Hager,W.W.andRostamian,R.,Optimalcoatings,bang-bangcontrols,and gradienttechniques," Optim.ControlAppl.Meth. ,Vol.8,1987,pp.1{20.https: //doi.org/10.1002/oca.4660080102. 210

PAGE 211

[107]Dolan,E.,More,J.J.,andMunson,T.S.,BenchmarkingOptimizationSoftware withCOPS3.0,"Tech.Rep.ANL/MCS-273,ArgonneNationalLaboratory, Argonne,IL,2004. [108]Sakawa,Y.,TrajectoryPlanningofaFree-FlyingRobotbyUsingtheOptimal Control," OptimalControlApplicationsandMethods ,Vol.20,1999,pp.235{248. https://doi.org/10.1002/SICI--1514/10:5 h 235::AID--OCA658 i 3.0. CO;2--I. [109]Rao,A.V.andMease,K.D.,EigenvectorApproximateDichotomicBasisMethod forSolvingHyper-SensitiveoptimalControlProblems," OptimalControlApplicationsandMethods ,Vol.21,No.1,January{February2000,pp.1{19.https: //doi.org/10.1002/SICI--1514/0221:1 h 1::AID--OCA646 i 3.0.CO;2--V. [110]Betts,J.T.,SparseJacobianUpdatesintheCollocationMethodforOptimal ControlProblems," JournalofGuidance,Control,andDynamics ,Vol.13,No.3, May{June1990,pp.409{415.https://doi.org/10.2514/3.25352. [111]Du,I.S.,MA57|aCodefortheSolutionofSparseSymmetricDeniteand IndeniteSystems," ACMTransactionsonMathematicalSoftware ,Vol.30,No.2, April{June2004,pp.118{144.http://doi.acm.org/10.1145/992200.992202. [112]Weinstein,M.J.andRao,A.V.,ASourceTransformationviaOperator OverloadingMethodfortheAutomaticDierentiationofMathematicalFunctionsin MATLAB," ACMTransactionsonMathematicalSoftware ,Vol.42,No.1,May2016, pp.11:1{11:44.https://doi.org/10.1145/2699456. [113]Buskens,C.andWassel,D., TheESANLPSolverWORHP.In:FasanoG.,Pinter J.edsModelingandOptimizationinSpaceEngineering ,Vol.73of Springer OptimizationandItsApplications ,SpringerNewYork,NewYork,NY,2012,pp. 85{110.https://doi.org/10.1007/978--1--4614--4469--5 4. [114]Dennis,M.E.,Hager,W.W.,andRao,A.V.,ComputationalMethodforOptimal GuidanceandControlUsingAdaptiveGaussianQuadratureCollocation," Journal ofGuidance,Control,andDynamics ,2019,pp.1{16.https://doi.org/10.2514/1. G003943. 211

PAGE 212

BIOGRAPHICALSKETCH YunusAgamawigraduatedwithaBachelorofScienceinAerospace&Mechanical EngineeringfromtheUniversityofMinnesota-TwinCitiesinMay2015.Shortlyafter graduating,hebegangraduatelevelstudyintheDepartmentofMechanical&Aerospace EngineeringattheUniversityofFloridainsummer2015.HejoinedtheVehicleDynamics andOptimizationLaboratoryVDOLatUFasagraduateassistantinspring2016. Hisinterestsincludecomputationalmethodsforsolvingoptimalcontrolproblemsand applicationsforoptimalcontroltheory.HereceivedhisMasterofScienceDegreein AerospaceEngineeringfromUFinDecember2017.HeisontracktoreceivehisDoctorof PhilosophyDegreeinAerospaceEngineeringfromUFinAugust2019.Hehasaccepteda positionattheJohnsHopkinsUniversityAppliedPhysicsLaboratorybeginningattheend ofAugust2019. 212