FUNCTION REFERENCE

dare

Solve the discrete algebraic Riccati equation.

Solve the discrete algebraic Riccati equation.

Syntax

[X,K,L] = dare(A,B,Q)

Syntax

[X,K,L] = dare(A,B,Q,R,S,E)

Solves A'*X*A-X-(A'*X*B+S)*((R+B'*X*B)\(B'*X*A+S'))+Q=0. R defaults to identity, S to zero; [] selects defaults. E must be identity or []. K=(R+B'*X*B)\(B'*X*A+S') and L=eig(A-B*K). Uses a balanced symplectic pencil with ordered QZ (Pappas, Laub and Sandell), including singular A, rather than an inverse of A. A relative residual above 1e-10 triggers one Newton correction using a discrete Lyapunov equation, converted to a Sylvester equation by a bilinear transform. Rejects non-stabilising results, nonfinite arithmetic, or a residual still above 1e-10 after refinement. Q and R must be symmetric to relative tolerance 1e-12; R must be positive definite.

Example

[X,K,L]=dare([1 1;0 1],[0;1],eye(2),1);

Example

[X,K,L]=dare(0.8,1,2,1,0.1,1);

Differences from MATLAB: output order is X, feedback gain K, closed-loop poles L. Only finite real double data, positive definite R and identity E; at most 128 states and inputs. No scaling/status outputs or descriptor equations.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.