| Function Reference | ![]() |
Solve continuous-time algebraic Riccati equations (CARE)
Syntax
[X,L,G,rr] = care(A,B,Q) [X,L,G,rr] = care(A,B,Q,R,S,E) [X,L,G,report] = care(A,B,Q,...,'report') [X1,X2,L,report] = care(A,B,Q,...,'implicit')
Description
[X,L,G,rr] = care(A,B,Q) computes the unique solution
of the algebraic Riccati equation
such that
has all its eigenvalues in the open left-half plane. The matrix
is symmetric and called the stabilizing solution of
. [X,L,G,rr] = care(A,B,Q) also returns:
[X,L,G,rr] = care(A,B,Q,R,S,E) solves the more general Riccati equation
Here the gain matrix is
and the "closed-loop" eigenvalues are L = eig(A-B*G,E).
Two additional syntaxes are provided to help develop applications such as
-optimal control design.
[X,L,G,report] = care(A,B,Q,...,'report')turns off the error messages when the solution
fails to exist and returns a failure report instead.
-1 when the associated Hamiltonian pencil has eigenvalues on or very near the imaginary axis (failure)
-2 when there is no finite solution, i.e.,
with
singular (failure)
defined above when the solution exists (success)
Alternatively, [X1,X2,L,report] = care(A,B,Q,...,'implicit') also turns off error messages but now returns
in implicit form.
Note that this syntax returns report = 0 when successful.
Example 1
you can solve the Riccati equation

You can verify that this solution is indeed stabilizing by comparing the eigenvalues of a and a-b*g.
Finally, note that the variable l contains the closed-loop eigenvalues eig(a-b*g).
Example 2
To solve the
-like Riccati equation
rewrite it in the care format as
You can now compute the stabilizing solution
by
B = [B1 , B2] m1 = size(B1,2) m2 = size(B2,2) R = [-g^2*eye(m1) zeros(m1,m2) ; zeros(m2,m1) eye(m2)] X = care(A,B,C'*C,R)
Algorithm
care implements the algorithms described in [1]. It works with the Hamiltonian matrix when
is well-conditioned and
; otherwise it uses the extended Hamiltonian pencil and QZ algorithm.
Limitations
The
pair must be stabilizable (that is, all unstable modes are controllable). In addition, the associated Hamiltonian matrix or pencil must have no eigenvalue on the imaginary axis. Sufficient conditions for this to hold are
detectable when
and
, or
See Also
dare Solve discrete-time Riccati equations
lyap Solve continuous-time Lyapunov equations
References
[1] Arnold, W.F., III and A.J. Laub, "Generalized Eigenproblem Algorithms and Software for Algebraic Riccati Equations," Proc. IEEE, 72 (1984),
pp. 1746-1754.
| canon | chgunits | ![]() |