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:

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.99856378303372+0.I4.79073410146029+0.I0.494228759193797+2.18968411573884I0.4942287591937972.18968411573884I2.00557177848031+0.I1.04883795460928+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

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)

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.146877156240930+0.I0.0598533454582570+0.309176357637631I0.05985334545825700.309176357637631I0.132589590854146+0.I0.554251178458365+0.I0.405472587458188+0.I

0.0304211358227157467005543906951323438055442800709560.0659099074660814464866140846601837954666603482344250.0778639938919282034195701967333119114744656103581390.0591128866340468760492622977533425610637662411582360.0501886444139765455777150878763689945722966392629340.0624339422311989140056823110869810886775951163882370.146474409167257925221797295002152204385412477938100.0659099074660814464866140846601837954666603482344252.28477019723166848584077630881853341062246359420664.78473065161356360332440959381716442491114958292331.52007312820281952471142352341705450411831246241050.0513811850709266237958871151758886927087522427281740.242481172280760220583130975586693917216007343380740.0180264651866313701925664662684845212960870286185910.0778639938919282034195701967333119114744656103581394.784730651613563603324409593817164424911149582923312.2175965875913100640469879241522339814686942584926.87145338284372246907564845282747979249894886066470.0332191174398384628391048073797592055799759143241740.417575156312238037904590570278160495205801550808560.689897742178268572052058300650292428660761981612470.0591128866340468760492622977533425610637662411582361.52007312820281952471142352341705450411831246241056.87145338284372246907564845282747979249894886066477.72901893032814340093573911650395682484833557742950.000897857112778654261901163098031425525103818516262550.250473454358134086285949312191307832934601641227920.524143916172433640894890466341089304748601845015650.0501886444139765455777150878763689945722966392629340.0513811850709266237958871151758886927087522427281740.0332191174398384628391048073797592055799759143241740.000897857112778654261901163098031425525103818516262550.0963038091252386619754565519003090396258804952588120.105273215175328611083972055495954679471365834849730.304228733547223371606531829692031428911227679953350.0624339422311989140056823110869810886775951163882370.242481172280760220583130975586693917216007343380740.417575156312238037904590570278160495205801550808560.250473454358134086285949312191307832934601641227920.105273215175328611083972055495954679471365834849730.150172444795081062930327317139766189003714734432280.279101552027404058117577280692586899543926769682850.146474409167257925221797295002152204385412477938100.0180264651866313701925664662684845212960870286185910.689897742178268572052058300650292428660761981612470.524143916172433640894890466341089304748601845015650.304228733547223371606531829692031428911227679953350.279101552027404058117577280692586899543926769682851.0680116872765629156652847804822787297172979448887

0.8798316506502610.9930459423137261.096222039531690.561082720473644

(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