ControlDesign[LQR]  design linear quadratic state feedback regulator (LQR) for a given statespace system

Calling Sequence


LQR(sys, Q, R, opts)


Parameters


sys



System; system object

Q



Matrix; state weighting matrix

R



Matrix; input weighting matrix

opts



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





Options



Weighting on the stateinput multiplication term in the cost function. If omitted, a zero matrix with appropriate dimensions will be considered.


True means the eigenvalues of ABK are returned. The default value is false.

•

riccati = true or false


True means the solution of the associated Riccati equation is returned.

For a continuous system, the infinite horizon solution of the following continuoustime Riccati equation (CARE) is returned.
The LQR feedback gain is calculated as
For a discrete system, the infinite horizon solution of the following discretetime Riccati equation (DARE) is returned
The LQR feedback gain is calculated as
The default value is false.
•

return_Kr = true or false


True means the direct gain Kr is returned. 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 righthand side of each equation is substituted for the name on the lefthand side in the sys equations. The default is the value of sys given by DynamicSystems:SystemOptions(parameters).



Solvability Conditions


•

The pair must be stabilizable.

•

The pair must have no unobservable modes on the imaginary axis in continuoustime domain or on the unit circle in discretetime domain.

•

(positive definite) and (positive semidefinite).



Description


•

The LQR command calculates the LQR state feedback gain for a system.

•

The system sys is a continuous or discrete time linear system object created using the DynamicSystems package. The system object must be in statespace (SS) form. The statespace system can be either singleinput/singleoutput (SISO) or multipleinput/multipleoutput (MIMO).

•

In continuous time, the optimal state feedback gain, , is calculated such that the quadratic cost function

is minimized by the feedback law u = Kx subject to the system dynamics
•

In discrete time, the optimal state feedback gain, , is calculated such that the quadratic cost function

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

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 (skewsymmetric) 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 closedloop eigenvalues and the solution of the associated Riccati equation.

•

The direct gain is computed as follows:

(continuous time)
(discrete time)
•

If sys contains structured uncontrollable states, they are removed before computing the LQR state feedback. The resulting gain 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


>


>


>


>


 (1) 
>


 (2) 
>


 (3) 
>


 (4) 
 (5) 
We can also use LQR with discrete models:
>


 (6) 
>


 (7) 
>


 (8) 
 (9) 


Download Help Document
Was this information helpful?