lqr
Linear-Quadratic Regulator (LQR) design
Description
[
calculates the optimal gain matrix K
,S
,P
] = lqr(sys
,Q
,R
,N
)K
, the solution
S
of the associated algebraic Riccati equation, and the closed-loop
poles P
for the continuous-time or discrete-time state-space model
sys
. Q
and R
are the weight
matrices for states and inputs, respectively. The cross term matrix N
is set to zero when omitted.
Examples
Input Arguments
Output Arguments
Limitations
The input data must satisfy the following conditions:
The pair (A,B) must be stabilizable.
R must be positive definite.
must be positive semidefinite (equivalently, ).
must have no unobservable mode on the imaginary axis (or unit circle in discrete time).
Tips
lqr
supports descriptor models with nonsingularE
. The outputS
oflqr
is the solution of the algebraic Riccati equation for the equivalent explicit state-space model:
Algorithms
For continuous-time systems, lqr
computes the state-feedback control that minimizes the quadratic cost function
subject to the system dynamics .
In addition to the state-feedback gain K
, lqr
returns the solution S
of the associated algebraic Riccati equation
and the closed-loop poles . The gain matrix K
is derived from
S
using
For discrete-time systems, lqr
computes the state-feedback control that minimizes
subject to the system dynamics .
In all cases, when you omit the cross term matrix N
,
lqr
sets N
to 0.
Version History
Introduced before R2006a