ControlDesign - MapleSim Help

Online Help

All Products    Maple    MapleSim


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

ControlDesign

  

LQRDiscrete

  

design discrete-time linear quadratic state feedback regulator (LQR) for a given pair

 

Calling Sequence

Parameters

Options

Solvability Conditions

Description

Examples

Calling Sequence

LQRDiscrete(A, B, Q, R, opts)

Parameters

A

-

Matrix; system matrix of a state-space system

B

-

Matrix or Vector; input matrix of a state-space system

Q

-

Matrix; state weighting matrix

R

-

Matrix; input weighting matrix

opts

-

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

Options

• 

N = Matrix or Vector

Weighting on the state-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 infinite horizon solution of the following discrete-time Riccati equation (DARE) is returned.

ATXAXATXB+NBTXB+R1BTXA+NT+Q=0

The LQR feedback gain is calculated as

K=BTXB+R1BTXA+NT

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 pair A,B must be stabilizable.

• 

The pair QNR1NT,ABR1NT must have no unobservable modes on the unit circle.

• 

R>0 (positive definite) and QNR1NT0 (positive semidefinite).

Description

• 

The LQRDiscrete command calculates the discrete-time LQR state feedback gain for a given pair.  

• 

The optimal state feedback gain, K, is calculated such that the quadratic cost function

Ju=n=0xTQx+uTRu+2xTΝu

is minimized by the feedback law u[n] = -Kx[n] subject to the system dynamics

xn+1=Axn+Bun

• 

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 addition to the state feedback gain, depending on the corresponding option values, the command also returns the closed-loop eigenvalues and the solution of the associated Riccati equation.

• 

Note that the time domain is inherent to the command regardless of the any time domain implications the input pair might have. To be more specific, this command calculates a discrete-time LQR feedback gain for the given input pair even if that pair is initially extracted from a continuous-time state-space. If the gain is then used for feedback stabilization in continuous time domain, obviously such a mistake in command usage leads to a result which is not theoretically valid.

Examples

withControlDesign:

withDynamicSystems:

csysNewSystemMatrix2s2+3s+1,1s+2,s1s2+5,7s+1s+4

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

(1)

sysStateSpacecsys

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

(2)

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

010000000100000001000515630000000010000000100008147

00000010000001

1002045112211470

0000

(3)

Q1LinearAlgebra:-IdentityMatrix73;R2LinearAlgebra:-IdentityMatrix2

Q:=13000000013000000013000000013000000013000000013000000013

R:=2002

(4)

dsysToDiscretecsys,1,method=bilinear

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

(5)

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

(6)

KLQRDiscretesys:-a,sys:-b,Q,R

K:=0.04812023135835660.3016034842584310.4208348953190100.05115143018465260.0.0.0.0.0.0.0.0.03724081407389232.0465743788778910-50

(7)

KprLQRDiscretesys:-a,sys:-b,Q,R,poles=true,riccati=true:Kpr1;Kpr2;Kpr3

0.04812023135835660.3016034842584310.4208348953190100.05115143018465260.0.0.0.0.0.0.0.0.03724081407389232.0465743788778910-50

0.0959924471219734+0.725780367562653I0.09599244712197340.725780367562653I0.597646681572767+0.I0.133580894281149+0.I0.+0.I0.271790906833210+0.I0.271790906833210+0.I

0.342082466307579979569800296497885639351786335687550.0548369971378965590654637950597903150590926056978780.0765154355125472252954240980794033938116281948301510.00930026003357319396900145495172223394826444362655160.0.0.0.0548369971378965590654637950597903150590926056978781.01907954415193860086632049992599115220506595692030.424672649695827014147293330267357013243466775911940.0161167278036927530850684604787121942357286736344510.0.0.0.0765154355125472252954240980794033938116281948301510.424672649695827014147293330267357013243466775911942.02146219843574167873194137399185520663834165900390.509659957013962976642303115028964333925822866013650.0.0.0.00930026003357319396900145495172223394826444362655160.0161167278036927530850684604787121942357286736344510.509659957013962976642303115028964333925822866013652.24919438674456099003047869510800776268589222479490.0.0.0.0.0.0.0.333333333333333333333333333333333333333333333333332.286503920910418537254314005804672176930459767147310-502.867550220258307872173625381299495790508558951522110-500.0.0.0.2.286503920910418537254314005804672176930459767147310-500.674942403127531625737466343897601256870546126025706.156660046840823987378891839852322924159876916961410-500.0.0.0.2.867550220258307872173625381299495790508558951522110-506.156660046840823987378891839852322924159876916961410-501.0082757364608649590707996772309345902038794593591

(8)

See Also

ControlDesign

ControlDesign[LQR]

ControlDesign[LQRContinuous]

ControlDesign[LQROutput]

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