lqr
Linear-Quadratic Regulator (LQR) design.
Syntax
[K, S, P] = lqr(sys, Q, R, N)
[K, S, P] = lqr(A, B, Q, R, N)
Input argument
sys - LTI model
Q - State-cost weighted matrix
R - Input-cost weighted matrix
N - Optional cross term matrix: 0 by default.
A - State matrix: n x n matrix.
B - Input-to-state matrix: n x m matrix.
Output argument
K - Optimal gain: row vector.
S - Solution of the Algebraic Riccati Equation.
p - Poles of the closed-loop system: column vector.
Description
In the context of continuous-time state-space matrices A and B, the command [K, S, P] = lqr(A, B, Q, R, N) computes the optimal gain matrix K, the solution S to the associated algebraic Riccati equation, and the closed-loop poles P.
This syntax is applicable exclusively to continuous-time models.
When applied to a continuous-time or discrete-time state-space model represented by sys, the command [K, S, P] = lqr(sys, Q, R, N) computes the optimal gain matrix K, the solution S to the associated algebraic Riccati equation, and the closed-loop poles P.
The weight matrices Q and R govern the importance of states and inputs, and the cross term matrix N is zero by default when not specified.
Example
See also
History
1.0.0
initial version
Author
Allan CORNET
Last updated