您好,欢迎访问三七文档
当前位置:首页 > 建筑/环境 > 工程监理 > 最优控制的LQR案例
1OptimalControl:LQRCase2OptimalControlFormulation•Thesystem•Performancecostfunction00,,,xxuxfxttTmdttlJTtxux0,,3TheControlProblemFindthecontrolu=u*that:•minimizes(ormaximizes)theperformanceindexJ•subjecttotheconstraintofthesystemdynamicsf(x,u,t)4ApplyingOptimalityPrinciple11*,*,,,min,11tJdttltJttttxuxxuthispartisoptimalfor[t1,T]ifthewholetrajectoryisoptimalu*(t)tt1T5ApplyingOptimalityPrinciple11*,*,,,min,11tJdttltJttttxuxxuNote:11*????**,,,tJtJtJxxx6TheHamiltonian,HtJtltH,,,,,,*uxfxuxux7Hamilton-Jacobi-BellmanEq.tHtJ,,min*uxu8Optimalsolutionu*satisfiesHamilton-Jacobi-BellmanEq.tHtJ,,min*uxu0HuTmTTJ**,xx9Today'sFocusOptimalcontrolforthelineardynamicsystem00xxuBxAxttt10QuadraticCostFunction•Qpos.semi-definite,symmetric•Rpositivedefinite,symmetric–guaranteeseveryelementofuisconstrainedTTdtJTTtxQxRuuQxxTTT02111BuAxxRuuQxx*TT21JHHamiltonian:LinearCase12BuAxxRuuQxx*TT21JH0*TBxRuuJHGradientofH13TheOptimalControlu*Remember:RissymmetricT*T1*JxBRu14TheOptimalControlu*Remember:RissymmetricQ:WhatisXJ*?…T*T1*JxBRu15WhatisXJ*?TryacostsolutionJ*=1/2(xTPx)–quadraticinthestatex–P(t)isnn–Takeasymmetricmatrix–SolutionsatisfiesH-J-Bequation,socompute(J*/t)andXJ*…16WhatisXJ*?TryacostsolutionJ*=1/2(xTPx)–quadraticinthestatex–P(t)isnn–TakeasymmetricmatrixtJttJPxxxPxT*T*,2117Substituteu*intoH-J-B…T*T1**T***2121,,JJJtHtJxBBRxAxxQxxux18Substitute(J*/t),XJ*PxBPBRxPAxxQxxxPxT1TTTT21212119Substitute(J*/t),XJ*NotethatSinceH-J-Beq.istrueforallx…PxBPBRxPAxxQxxxPxT1TTTT212121PA12ATPPA20Substitute(J*/t),XJ*NotethatSinceH-J-Beq.istrueforallx…PxBPBRxPAxxQxxxPxT1TTTT212121PA12ATPPA21TheRiccatiEquationPBPBRPAPAQPT1T22TheRiccatiEquationAsolutionmustsatisfytheboundarycondition:PBPBRPAPAQPT1TTTTmTTJQPxx**,23SummaryLQRoptimalcontrolu*isgivenby:wherePsatisfiestheRiccatieqn:PBPBRPAPAQPT1TTTQPPxBRuT1*24NotesontheLQRsolution…•astatefeedbacksolutionK=R-1BTP•n(n+1)/2termsinPtosolve•Doesnotrequirex(t0)tosolvethisproblem!Optimalsolutionisindependentofinitialstate!25InfiniteHorizonCase,T=0021=,TT0TTRRQQRuuQxxCxyBuAxxdtJ26InfiniteHorizonRegulatorNotesSinceT=,additionalconditions:1.(A,B)stabilizable;preventsu*frombeingunstable2.(A,C)detectable;letQ=CTCsounstablemodesmustcontributetocostJ27AlgebraicRiccatiEquationInfinitetimehorizonmeansRiccatiequationbecomesalgebraic:QPBPBRPAPAT1T28TheoremforT=caseIf1)and2)hold,thenu*=–R-1BTPxisastabilizingfeedbackcontrolthatminimizesJ,wherePistheuniquesymmetricpositivedefinitesolutionoftheAlgebraicRiccatiEquation.29NoteonTheorem•Toproveasymptoticstability,trytheLyapunovfunctionV(x)=(1/2)xTPx–NotethatPisconstant•Therearen(n+1)/2equationstosolveintheA.R.E.30UsefulMatlabCommand[K,P,E]=LQR(A,B,Q,R)•K:optimalfeedbackgainforu=-Kx•P:steady-statesolutiontotheassociatedalgebraicRiccatiequationATP+PA–PBR-1BTP=–Q•E:closed-loopeigenvalues(A-B*K)31Example(simplemagneticlevitationmodel)•A=[01;10]•B=[0;1]•Q=eye(2,2)•R=1•[K,P,E]=LQR(A,B,Q,R)32MatlabSolutionK=2.41422.4142P=3.41422.41422.41422.4142E=-1.4142-1.000033Comparetoapoleplacement•A=[01;10]•B=[0;1]•Po=[–1+j–1–j]•K=PLACE(A,B,Po)K=[32]34poleplacedLQR0246810-0.200.20.40.60.81time(s)35Comments•TrysolvingtheAREfortheexampleproblembyhand!•RememberthatLQRisoptimalwithrespecttothecostfunctionJ.•ThereexistsQandRthatyieldpoleplacementresults!•Otheroptimalitycriteriaabound!
本文标题:最优控制的LQR案例
链接地址:https://www.777doc.com/doc-4843939 .html