FUNCTION REFERENCE

care

Solve the continuous algebraic Riccati equation.

Solve the continuous algebraic Riccati equation.

Syntax

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

Syntax

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

Solves A'*X+X*A-(X*B+S)*(R\(B'*X+S'))+Q=0. R defaults to identity and S to zero; [] selects either default. E must be identity or []. K=R\(B'*X+S') and L=eig(A-B*K). Uses Laub's balanced Hamiltonian real Schur method with stable eigenvalue reordering and a linear solve for the invariant subspace. A relative residual above 1e-10 triggers one Newton-Kleinman correction using a Lyapunov solve. 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]=care([0 1;0 0],[0;1],eye(2),1);

Example

[X,K,L]=care(-1,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.