Main Content

dlqr

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

Syntax

[K,S,e] = dlqr(A,B,Q,R,N)

Description

[K,S,e] = dlqr(A,B,Q,R,N) calculates the optimal gain matrix K such that the state-feedback law

u[n]=Kx[n]

minimizes the quadratic cost function

J(u)=n=1(x[n]TQx[n]+u[n]TRu[n]+2x[n]TNu[n])

for the discrete-time state-space model

x[n+1]=Ax[n]+Bu[n]

The default value N=0 is assumed when N is omitted.

In addition to the state-feedback gain K, dlqr returns the infinite horizon solution S of the associated discrete-time Riccati equation

ATSAS(ATSB+N)(BTSB+R)1(BTSA+NT)+Q=0

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

K=(BTSB+R)1(BTSA+NT)

Limitations

The problem data must satisfy:

  • The pair (A,B) must be stabilizable.

  • R must be positive definite.

  • [QNNTR] must be positive semidefinite (equivalently, QNR1NT0).

  • (QNR1NT,ABR1NT) must have no unobservable mode on the unit circle.

Version History

Introduced before R2006a

See Also

| | | |