design linear quadratic state feedback regulator (LQR) with output weighting - 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

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

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:

csys:=NewSystemMatrix3s+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)

sys:=StateSpacecsys

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)

Q:=1LinearAlgebra:-IdentityMatrix25;R:=2LinearAlgebra:-IdentityMatrix2

Q:=150015

R:=2002

(5)

K:=LQROutputsys,Q,R

K:=0.71703466815744314.24233926275838.973250402122570.9923216307682800.01789144271597020.01160540563669640.003038342555018620.03174496209404570.5654277776750890.06037114822809910.003038342555018620.09529899857415240.2984252458452400.0577917808525738

(6)

Kpr:=LQROutputsys,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.18968411573884I0.4942287591938122.18968411573884I2.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:

dsys:=ToDiscretecsys,1,method=bilinear

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

(8)

dsys:-tf

0.7500000000z+1.29.z+5.z0.3333333333z+1.z0.33333333330.4444444444z+1.z2.z2+0.2222222222z+1.0.06666666667z+1.2z20.4000000000z0.3333333333

(9)

sys:=StateSpacedsys

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)

Q:=5LinearAlgebra:-IdentityMatrix2;R:=3LinearAlgebra:-IdentityMatrix2

Q:=5005

R:=3003

(11)

K:=LQROutputsys,Q,R

K:=0.002891647834148830.5110898496009390.9426426737165630.02545286097296910.005082369953667470.008613184659040090.004837010266302430.02848822304936120.07091407669299700.02534397388667150.1226196028603450.08296447665997560.08489022226134800.281359899325681

(12)

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

0.002891647834148830.5110898496009390.9426426737165630.02545286097296910.005082369953667470.008613184659040090.004837010266302430.02848822304936120.07091407669299700.02534397388667150.1226196028603450.08296447665997560.08489022226134800.281359899325681

0.773065105685236+0.I0.135739649381088+0.I0.0557580864370439+0.259472233818867I0.05575808643704390.259472233818867I0.135260362641226+0.I0.554016124981297+0.I0.408363577422424+0.I

0.0347222222222222222222222222222222222222222222222880.0578703703703703703703703703703703703703703703704130.0458676268861454046639231824417009602194787379983460.0501543209876543209876543209876543209876543209876330.0617283950617283950617283950617283950617283950616640.0740740740740740740740740740740740740740740740741480.185185185185185185185185185185185185185185185184670.0578703703703703703703703703703703703703703703704133.76361617514093230714965839742191737306855879223797.75778717053334061177752935668795893048943290138062.04031893528199359066843798149335245960642439482470.0128662293121285987293091564078189009608629701802430.253754175966944098684055864622604531283602052442030.165706980229331960776166160014481994829141666992720.0458676268861454046639231824417009602194787379983467.757787170533340611777529356687958930489432901380619.61846342066004492812283215178936988245484459756710.4000320199553011899009393498513989200185246430240.156619648938219491861056350113643568849434267752290.382124610496142408194063319078239129457845433494551.17940736218183716441660424370816922816150808914950.0501543209876543209876543209876543209876543209876332.040318935281993590668437981493352459606424394824710.40003201995530118990093934985139892001852464302412.3498670218096635825778035379292399570430233982140.0376609233467863241074549542651824434890013654891750.209211305463178610308457948871070509972426961107640.730046079786253420172736121665952686796637165316610.0617283950617283950617283950617283950617283950616640.0128662293121285987293091564078189009608629701802430.156619648938219491861056350113643568849434267752290.0376609233467863241074549542651824434890013654891750.125900253942968118059131595248642015510827720861300.137373739132075796548254554214519435502103045409410.397922753289358126112551795898224224052091540847940.0740740740740740740740740740740740740740740740741480.253754175966944098684055864622604531283602052442030.382124610496142408194063319078239129457845433494550.209211305463178610308457948871070509972426961107640.137373739132075796548254554214519435502103045409410.180490698068273803400191521590995928290164476049780.392061489720740915673524908561191945567176234057820.185185185185185185185185185185185185185185185184670.165706980229331960776166160014481994829141666992721.17940736218183716441660424370816922816150808914950.730046079786253420172736121665952686796637165316610.397922753289358126112551795898224224052091540847940.392061489720740915673524908561191945567176234057821.3424980423389175800286495870462148046887275198045

0.8647947175018420.9690403955832151.044039608973620.594427142734114

(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