LQR - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

ControlDesign

  

LQR

  

design linear quadratic state feedback regulator (LQR) for a given state-space system

 

Calling Sequence

Parameters

Options

Solvability Conditions

Description

Examples

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

• 

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. 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 continuous-time Riccati equation (CARE) is returned.

The LQR feedback gain is calculated as

For a discrete system, the infinite horizon solution of the following discrete-time 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 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  must be stabilizable.

• 

The pair  must have no unobservable modes on the imaginary axis in continuous-time domain or on the unit circle in discrete-time 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 state-space (SS) form. The state-space system can be either single-input/single-output (SISO) or multiple-input/multiple-output (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 (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.

• 

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)

See Also

ControlDesign

ControlDesign[LQRContinuous]

ControlDesign[LQRDiscrete]

ControlDesign[LQROutput]

ControlDesign[StateFeedback][Ackermann]

ControlDesign[StateFeedback][PolePlacement]

 


Download Help Document