lqr

Linear-quadratic (LQ) state-feedback regulator for state-space system

Syntax

[K,S,e] = lqr(SYS,Q,R,N)
[K,S,e] = LQR(A,B,Q,R,N)

Description

[K,S,e] = lqr(SYS,Q,R,N) calculates the optimal gain matrix K such that:

For a continuous time system, the state-feedback law 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 Riccati equation

and the closed-loop eigenvalues e = eig(A-B*K). Note that is derived from by

For a discrete-time state-space model, u[n]=-Kx[n] minimizes

subject to x[n+1]=Ax[n]+Bu[n].

[K,S,e] = LQR(A,B,Q,R,N) is an equivalent syntax for continuous-time models with dynamics dx/dt=Ax+Bu.

In all cases, the default value N=0 is assumed when N is omitted.

Limitations

The problem data must satisfy:

See Also

care, dlqr, lqgreg, lqrd, lqry

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS