lqry
Linear-quadratic regulator with output weighting.
Inputs
Continuous or discrete-time LTI model (p-by-m, n states).
Outputs weighting matrix (p-by-p).
Input weighting matrix (m-by-m).
Optional cross term matrix (p-by-m). If s is not specified, a zero matrix is assumed.
Outputs
State feedback matrix (m-by-n).
Unique stabilizing solution of the continuous-time Riccati equation (n-by-n).
Closed-loop poles (n-by-1).
Equations $$ \dot{x} = A\,x + B\,u,\quad x(0) = x_0 $$$$ y = C\,x + D\,u $$$$ J(x_0) = \int_0^\infty y^T Q\, y + u^T R\, u + 2\, y^T S\, u \,\, dt $$$$ L = \sigma (A - B\, G) $$
Source Code: lqry