design discrete-time linear quadratic state feedback regulator (LQR) for a given pair - 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

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

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.04812023136563610.3016034841234630.4208348950165690.05115143025951990.0.0.0.0.0.0.0.0.03724081407012741.6957458239175510-50

(7)

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

0.04812023136563610.3016034841234630.4208348950165690.05115143025951990.0.0.0.0.0.0.0.0.03724081407012741.6957458239175510-50

0.0959924471141893+0.725780367537388I0.09599244711418930.725780367537388I0.597646681622232+0.I0.133580894353374+0.I0.+0.I0.271790906819696+0.I0.271790906819696+0.I

0.342082466311878242371531572864956503609278376051700.0548369971320015874453322979671680126791009534428520.0765154354835731722076993713204211295435088438590460.00930026005034752459581011853863548971243280755447190.0.0.0.0548369971320015874453322979671680126791009534428521.01907954391333324478867282779146001227052426435760.424672649233236577232128032563762331172893999589420.0161167277015403230959726324754276462041553947111510.0.0.0.0765154354835731722076993713204211295435088438590460.424672649233236577232128032563762331172893999589422.02146219736302309604530790205228839403533562030630.509659956602684599352910119056372560318246175029490.0.0.0.00930026005034752459581011853863548971243280755447190.0161167277015403230959726324754276462041553947111510.509659956602684599352910119056372560318246175029492.24919438584273073925621631927013280105734502167420.0.0.0.0.0.0.0.333333333333333333333333333333333333333333333333332.427009469103400288034419882770445884213990576029910-511.000794776960814411211494124573928190219249320763310-500.0.0.0.2.427009469103400288034419882770445884213990576029910-510.674942403125867398096137593981206415196581814763515.101271017293181184787359721434823824276933993430210-500.0.0.0.1.000794776960814411211494124573928190219249320763310-505.101271017293181184787359721434823824276933993430210-501.0082757364592007314294709273145397485299151480967

(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