ControlDesign
LQRContinuous
design continuous-time linear quadratic state feedback regulator (LQR) for a given pair
Calling Sequence
Parameters
Options
Solvability Conditions
Description
Examples
LQRContinuous(A, B, Q, R, opts)
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 LQRContinuous command
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 continuous-time Riccati equation (CARE) is returned.
ATX+XA−XB+NR−1XB+NT+Q=0
The LQR feedback gain is calculated as
K=R−1XB+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).
The pair A,B must be stabilizable.
The pair Q−NR−1NT,A−BR−1NT must have no unobservable modes on the imaginary axis.
R>0 (positive definite) and Q−NR−1NT≥0 (positive semidefinite).
The LQRContinuous command calculates the LQR state feedback gain for a given pair.
The optimal state feedback gain, K, is calculated such that the quadratic cost function
Ju=∫0∞xTQx+uTRu+2⁢xTΝu⁢ⅆt
is minimized by the feedback law u = -Kx subject to the system dynamics
x·=Ax+Bu
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 continuous-time LQR feedback gain for the given input pair even if that pair is initially extracted from a discrete-time state-space. If the gain is then used for feedback stabilization in discrete time domain, obviously such a mistake in command usage leads to a result which is not theoretically valid.
with⁡ControlDesign:
with⁡DynamicSystems:
csys≔NewSystem⁡Matrix⁡2s2+3⁢s+1,1s+2,s−1s2+5,7s+1⁢s+4
csys≔Transfer Functioncontinuous2 output(s); 2 input(s)inputvariable=u1⁡s,u2⁡soutputvariable=y1⁡s,y2⁡s
sys≔StateSpace⁡csys
sys≔State Spacecontinuous2 output(s); 2 input(s); 7 state(s)inputvariable=u1⁡t,u2⁡toutputvariable=y1⁡t,y2⁡tstatevariable=x1⁡t,x2⁡t,x3⁡t,x4⁡t,x5⁡t,x6⁡t,x7⁡t
sys:-a;sys:-b;sys:-c;sys:-d
010000000100000001000−5−15−6−3000000001000000010000−8−14−7
00000010000001
10020451−1−2211470
0000
Q≔13⁢LinearAlgebra:-IdentityMatrix⁡7;R≔2⁢LinearAlgebra:-IdentityMatrix⁡2
Q≔13000000013000000013000000013000000013000000013000000013
R≔2002
K≔LQRContinuous⁡sys:-a,sys:-b,Q,R
K≔0.01663898109747050.2994436759550440.8677764521914780.3018509310763290.0.0.0.0.0.0.0.01040989379861050.01954395072894290.0146813589873455
Kpr≔LQRContinuous⁡sys:-a,sys:-b,Q,R,poles=true,riccati=true:Kpr1;Kpr2;Kpr3
0.01663898109747050.2994436759550440.8677764521914780.3018509310763290.0.0.0.0.0.0.0.01040989379861050.01954395072894290.0146813589873455
−2.62756665299744+0.⁢I−0.145624709217511+2.22784297750641⁢I−0.145624709217511−2.22784297750641⁢I−0.383034859643869+0.⁢I−1.00185981437603+0.⁢I−1.98515367555330+0.⁢I−4.02766786905801+0.⁢I
3.50357106780249636427356983347380869701730928710788.90631012705411115311675810756718031049477924614583.12838818122098082686058820294514592760627824361050.0332779621949409374206603236526689213529915396260090.0.0.8.906310127054111153116758107567180310494779246145827.01792983748675985061180093742507824269810008618110.9996867306090944849060693759024372654302363650350.598887351910087243343592782953780547783773573792700.0.0.3.128388181220980826860588202945145927606278243610510.9996867306090944849060693759024372654302363650358.75386079427495244526889789195148694929582021351381.73555290438295551200857175359974385723535498487790.0.0.0.0332779621949409374206603236526689213529915396260090.598887351910087243343592782953780547783773573792701.73555290438295551200857175359974385723535498487790.603701862152658441644654693320879940510941682759390.0.0.0.0.0.0.0.604587138927168509676898420793792313225217218130870.380945919753830599663964618798960532181765706634190.0208197875972210396136451371378709701895903592627870.0.0.0.0.380945919753830599663964618798960532181765706634190.664447437767019541498152361507087810149285907951570.0390879014578858512583266659427122986389872752131640.0.0.0.0.0208197875972210396136451371378709701895903592627870.0390879014578858512583266659427122986389872752131640.029362717974691029572229097828269653238134822396934
See Also
ControlDesign[LQR]
ControlDesign[LQRDiscrete]
ControlDesign[LQROutput]
ControlDesign[StateFeedback][Ackermann]
ControlDesign[StateFeedback][PolePlacement]
Download Help Document