Categories &

Functions List

Function Reference: lqr

Function File: [g, x, l] = lqr (sys, q, r)
Function File: [g, x, l] = lqr (sys, q, r, s)
Function File: [g, x, l] = lqr (a, b, q, r)
Function File: [g, x, l] = lqr (a, b, q, r, s)
Function File: [g, x, l] = lqr (a, b, q, r, [], e)
Function File: [g, x, l] = lqr (a, b, q, r, s, e)

Linear-quadratic regulator.

Inputs

sys
Continuous or discrete-time LTI model (p-by-m, n states).
a
State matrix of continuous-time system (n-by-n).
b
Input matrix of continuous-time system (n-by-m).
q
State weighting matrix (n-by-n).
r
Input weighting matrix (m-by-m).
s
Optional cross term matrix (n-by-m). If s is not specified, a zero matrix is assumed.
e
Optional descriptor matrix (n-by-n). If e is not specified, an identity matrix is assumed.

Outputs

g
State feedback matrix (m-by-n).
x
Unique stabilizing solution of the continuous-time Riccati equation (n-by-n).
l
Closed-loop poles (n-by-1).

Equations $$ \dot{x} = A\,x + B\,u,\quad x(0) = x_0 $$$$ J(x_0) = \int_0^\infty x^T Q\, x + u^T R\, u + 2\, x^T S\, u \,\, dt $$$$ L = \sigma (A - B\, G) $$

See also: care, dare, dlqr, lqry, lqi, lqg

Source Code: lqr