ControlDesign - MapleSim Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MapleSim Toolboxes : MapleSim Control Design Toolbox : ControlDesign Package : State Feedback : ControlDesign/LQROutput

ControlDesign

  

LQROutput

  

design linear quadratic state feedback regulator (LQR) with output weighting

 

Calling Sequence

Parameters

Options

Solvability Conditions

Description

Examples

Calling Sequence

LQROutput(sys, Q, R, opts)

Parameters

sys

-

System; system object

Q

-

Matrix; output weighting matrix

R

-

Matrix; input weighting matrix

opts

-

(optional) equation(s) of the form option = value; specify options for the LQROutput command

Options

• 

N = Matrix or Vector

Weighting on the output-input multiplication term in the cost function. If omitted, a zero matrix with appropriate dimensions will be considered.   

• 

poles  = true or false True means the eigenvalues of A-BK are returned. See LQR for details. The default value is false.    

• 

riccati  =  true or false True means the solution of the associated Riccati equation is returned. The default value is false.

• 

return_Kr  =  true or false True means the direct gain Kr is returned. The default value is false.

• 

parameters = {list, set}(name = complexcons)

  

Specifies numeric values for the parameters of sys. These values override any parameters previously specified for sys. The numeric value on the right-hand side of each equation is substituted for the name on the left-hand side in the sys equations. The default is the value of sys given by DynamicSystems:-SystemOptions(parameters).

Solvability Conditions

• 

The data A,B,Q_,R_,N_ must satisfy the solvability conditions of the standard LQR problem described in the LQR help page.

Description

• 

The LQROutput command calculates the LQR state feedback gain for a system with output weighting.

• 

The system sys is a continuous or discrete-time linear system object created using the DynamicSystems package. The system object must be in state-space (SS) form.

• 

In continuous-time domain, the optimal state feedback gain, K, is calculated such that the quadratic cost-function

Ju=0yTQy+uTRu+2yTΝuⅆt 

is minimized by the feedback law u = -Kx subject to the following state-space

x·=Ax+Bu

y=Cx+Du

• 

In discrete-time domain, the optimal state feedback gain, K, is calculated such that the quadratic cost-function

Ju=n=0yTQy+uTRu+2yTΝu

is minimized by the feedback law u[n] = -Kx[n] subject to the following state-space

xn+1=Axn+Bun

yn=Cxn+Dun

• 

Q and R are expected to be symmetric. If the input Q and/or R are not symmetric, their symmetric part will be considered since their antisymmetric (skew-symmetric) part has no role in the quadratic cost function.

• 

In LQR with output weighting, the weighting matrix Q acts on the outputs rather than the states as in the standard LQR. Also, the weighing matrix N acts on the inner product of the outputs and inputs (creating a bilinear form) rather than the inner product of the states and inputs.  

• 

In addition to the state feedback gain, depending on the corresponding option values, the command returns the closed-loop eigenvalues and the solution of the associated Riccati equation.

• 

The output weighting LQR problem is equivalent to the standard LQR problem with the following weighting matrices:

Q_=CTQC

R_=DTQD+N+NTD+R

N_=CTQD+N     

• 

The direct gain Kr is computed as follows:

CD.K.1A+B.K.B+D

CD.K.1A+I+B.K.B+D (discrete time)

• 

If sys contains structured uncontrollable or unobservable states, they are removed using ReduceSystem before computing the LQR state feedback.  The resulting gain K is then filled with zeros at positions corresponding to the removed states; however, the other outputs are not filled and, consequently, they may have lower dimensions as expected.

Examples

withControlDesign:

withDynamicSystems:

csysNewSystemMatrix3s+2s+7,1s+1,3s2s2+5,1s2+5s+1

csys:=Transfer Functioncontinuous2 output(s); 2 input(s)inputvariable=u1s,u2soutputvariable=y1s,y2s

(1)

csys:-tf

3s2+9s+141s+13s2s2+51s2+5s+1

(2)

sysStateSpacecsys

sys:=State Spacecontinuous2 output(s); 2 input(s); 7 state(s)inputvariable=u1t,u2toutputvariable=y1t,y2tstatevariable=x1t,x2t,x3t,x4t,x5t,x6t,x7t

(3)

sys:-a;sys:-b;sys:-c;sys:-d

0100000001000000010007045199000000001000000010000166

00000010000001

150301512824253110

0000

(4)

Q1LinearAlgebra:-IdentityMatrix25;R2LinearAlgebra:-IdentityMatrix2

Q:=150015

R:=2002

(5)

KLQROutputsys,Q,R

K:=0.71703466815744314.24233926275838.973250402122570.9923216307682800.01789144271597020.01160540563669640.003038342555018620.03174496209404570.5654277776750890.06037114822809910.003038342555018620.09529899857415240.2984252458452400.0577917808525738

(6)

KprLQROutputsys,Q,R,poles=true,riccati=true,return_Kr=true:Kpr1;Kpr2;Kpr3;Kpr4

0.71703466815744314.24233926275838.973250402122570.9923216307682800.01789144271597020.01160540563669640.003038342555018620.03174496209404570.5654277776750890.06037114822809910.003038342555018620.09529899857415240.2984252458452400.0577917808525738

6.99856378303373+0.I4.79073410146029+0.I0.494228759193812+2.18968411573883I0.4942287591938122.18968411573883I2.00557177848028+0.I1.04883795460929+0.I0.217948275649673+0.I

2213.32101790119251056614903597299886356235231057771427.3744698955260840335662780084477714201028438168170.054903260978427885633257662450797110563540776981.43406933631488562102091405216891601168405158007398.15848679586649271906114771998919840077603893525643.81433389250755237927560235970330962865173521714250.0634899241880913820491764690309541509151427896382431427.37446989552608403356627800844777142010284381681314.4149489966517127605774990095472393845261805749358.1063827353889479110097065599029297325930670438328.4846785255166988812248328469662403229446639074246.73321253069214984634433653788446285985174889541277.14699460522546601672899862022424916090163700257611.1308555553501777075201057104844140218420156581446170.05490326097842788563325766245079711056354077698358.10638273538894791100970655990292973259306704383173.5511184829945201990789415563781807942889617308417.9465008042451415939197559090888743685870800745090.964209887228555403303093738554825491870314173112490.370560769921366289820817064140903685604633577569190.120742296456198253508795432334679555298369741690351.434069336314885621020914052168916011684051580073928.48467852551669888122483284696624032294466390742417.9465008042451415939197559090888743685870800745091.98464326153656013334951100979862005269789251331390.0357828854319403925390248349881317236941744240707440.0232108112733928584705643694260839985601669014608730.00607668511003723657599060898972922261029910592719098.15848679586649271906114771998919840077603893525646.73321253069214984634433653788446285985174889541270.964209887228555403303093738554825491870314173112490.0357828854319403925390248349881317236941744240707440.596902453836612549593454762987320081129922419261371.07029526294066028705460631327280618439874299115450.190597997148304850980212870409175628541353905502583.81433389250755237927560235970330962865173521714257.14699460522546601672899862022424916090163700257610.370560769921366289820817064140903685604633577569190.0232108112733928584705643694260839985601669014608731.07029526294066028705460631327280618439874299115453.11842885364735590608559173893899972252920058178000.596850491690479378879749688540071271896933355623950.0634899241880913820491764690309541509151427896382431.13085555535017770752010571048441402184201565814460.120742296456198253508795432334679555298369741690350.00607668511003723657599060898972922261029910592719090.190597997148304850980212870409175628541353905502580.596850491690479378879749688540071271896933355623950.11558356170514763732723892618907256020381429737325

1.632931959816521.650823402532490.7124796976274940.382819300946659

(7)

We can also use LQROuput with discrete models:

dsysToDiscretecsys,1,method=bilinear

dsys:=Transfer Functiondiscrete; sampletime = 12 output(s); 2 input(s)inputvariable=u1z,u2zoutputvariable=y1z,y2z

(8)

dsys:-tf

34z+129z+5z13z+1z1349z+1z2z2+29z+1115z+12z225z13

(9)

sysStateSpacedsys

sys:=State Spacediscrete; sampletime = 12 output(s); 2 input(s); 7 state(s)inputvariable=u1q,u2qoutputvariable=y1q,y2qstatevariable=x1q,x2q,x3q,x4q,x5q,x6q,x7q

(10)

Q5LinearAlgebra:-IdentityMatrix2;R3LinearAlgebra:-IdentityMatrix2

Q:=5005

R:=3003

(11)

KLQROutputsys,Q,R

K:=0.003561601336473770.4941913077665420.9148923556890410.02644035060399620.007538445973978120.01021618796729200.002372351128087200.03007742174232820.06566315985251580.001650753519376000.05789158500302730.08120159317031880.08125490227687810.279310675111098

(12)

KprLQROutputsys,Q,R,poles=true,riccati=true,return_Kr=true:Kpr1;Kpr2;Kpr3;Kpr4

0.003561601336473770.4941913077665420.9148923556890410.02644035060399620.007538445973978120.01021618796729200.002372351128087200.03007742174232820.06566315985251580.001650753519376000.05789158500302730.08120159317031880.08125490227687810.279310675111098

0.767828122439181+0.I0.146877156240929+0.I0.0598533454582571+0.309176357637630I0.05985334545825710.309176357637630I0.132589590854146+0.I0.554251178458365+0.I0.405472587458189+0.I

0.0304211358227157466614831194656197507800796442265190.0659099074660814459436517252170818377316774848883810.0778639938919282025540123145365663168952319487223720.0591128866340468767852104929496165373954217618970850.0501886444139765458174200783673317783128950211114040.0624339422311989134570067174457702429138821687094310.146474409167257927641059579380656139496582643985180.0659099074660814459436517252170818377316774848883812.28477019723166846331403326445603696983752922740174.78473065161356356386017678923536749986041051670751.52007312820281954347313448340604596904374150270440.0513811850709266210760180219105515089072054224238870.242481172280760222527887403209922802625298331985570.0180264651866313856169280255933313781299352734938210.0778639938919282025540123145365663168952319487223724.784730651613563563860176789235367499860410516707512.2175965875913100118031195237014211975844533348016.87145338284372248472282497087245857492745737283530.0332191174398384708184258679471586669562196398996750.417575156312238045551769543894376786582137155881950.689897742178268626241699688484998807893682197828190.0591128866340468767852104929496165373954217618970851.52007312820281954347313448340604596904374150270446.87145338284372248472282497087245857492745737283537.72901893032814328252644020374962820336200510844640.000897857112778652823879936049410834661680876240321890.250473454358134088359159113976280424017304494300880.524143916172433659706147151710542430081099962185940.0501886444139765458174200783673317783128950211114040.0513811850709266210760180219105515089072054224238870.0332191174398384708184258679471586669562196398996750.000897857112778652823879936049410834661680876240321890.0963038091252386614415155578358141646605783019810600.105273215175328611572976052299658687264738005621740.304228733547223367564370434938177805063513592007220.0624339422311989134570067174457702429138821687094310.242481172280760222527887403209922802625298331985570.417575156312238045551769543894376786582137155881950.250473454358134088359159113976280424017304494300880.105273215175328611572976052299658687264738005621740.150172444795081061848753573075891867613011023496600.279101552027404064051986259212816877521143037057940.146474409167257927641059579380656139496582643985180.0180264651866313856169280255933313781299352734938210.689897742178268626241699688484998807893682197828190.524143916172433659706147151710542430081099962185940.304228733547223367564370434938177805063513592007220.279101552027404064051986259212816877521143037057941.0680116872765628785913505609708284332160101080345

0.8798316510673620.9930459419638381.096222040127400.561082720692690

(13)

See Also

ControlDesign

ControlDesign[LQR]

ControlDesign[LQRContinuous]

ControlDesign[LQRDiscrete]

ControlDesign[StateFeedback][Ackermann]

ControlDesign[StateFeedback][PolePlacement]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam