Main Content

care

(Not recommended) Continuous-time algebraic Riccati equation solution

careis not recommended. Useicareinstead. For more information, see兼容性的考虑.

Syntax

[X,L,G] = care(A,B,Q)
[X,L,G] = care(A,B,Q,R,S,E)
[X,L,G,report] = care(A,B,Q,...)
[X1,X2,D,L] = care(A,B,Q,...,'factor')

Description

[X,L,G] = care(A,B,Q)computes the unique solutionXof the continuous-time algebraic Riccati equation

A T X + X A X B B T X + Q = 0

Thecarefunction also returns the gain matrix, G = R 1 B T X E .

[X,L,G] = care(A,B,Q,R,S,E)solves the more general Riccati equation

A T X E + E T X A ( E T X B + S ) R 1 ( B T X E + S T ) + Q = 0

When omitted,R,S, andEare set to the default valuesR=I,S=0, andE=I. Along with the solutionX,carereturns the gain matrix G = R 1 ( B T X E + S T ) and a vectorLof closed-loop eigenvalues, where

L=eig(A-B*G,E)

[X,L,G,report] = care(A,B,Q,...)returns a diagnosisreportwith:

  • -1when the associatedHamiltonian pencil has eigenvalues on or very near the imaginary axis (failure)

  • -2when there is no finite stabilizing solutionX

  • The Frobenius norm of the relative residual ifXexists and is finite.

This syntax does not issue any error message when X fails to exist.

[X1,X2,D,L] = care(A,B,Q,...,'factor')returns two matricesX1,X2and a diagonal scaling matrixDsuch thatX = D*(X2/X1)*D.

The vector L contains the closed-loop eigenvalues. All outputs are empty when the associated Hamiltonian matrix has eigenvalues on the imaginary axis.

Examples

Example 1

Solve Algebraic Riccati Equation

Given

A = [ 3 2 1 1 ] B = [ 0 1 ] C = [ 1 1 ] R = 3

you can solve the Riccati equation

A T X + X A X B R 1 B T X + C T C = 0

by

a = [-3 2;1 1] b = [0 ; 1] c = [1 -1] r = 3 [x,l,g] = care(a,b,c'*c,r)

This yields the solution

x x = 0.5895 1.8216 1.8216 8.8188

You can verify that this solution is indeed stabilizing by comparing the eigenvalues ofaanda-b*g.

[eig(a) eig(a-b*g)] ans = -3.4495 -3.5026 1.4495 -1.4370

Finally, note that the variablelcontains the closed-loop eigenvalueseig(a-b*g).

l l = -3.5026 -1.4370

Example 2

Solve H-infinity ( H )-like Riccati Equation

To solve the H -likeRiccati equation

A T X + X A + X ( γ 2 B 1 B 1 T B 2 B 2 T ) X + C T C = 0

rewrite it in thecareformat as

A T X + X A X [ B 1 , B 2 ] B [ γ 2 I 0 0 I ] R 1 [ B 1 T B 2 T ] X + C T C = 0

You can now compute the stabilizing solution X 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)

Limitations

The ( A , B ) pair must bestabilizable (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 ( Q , A ) detectable when S = 0 and R > 0 , or

[ Q S S T R ] > 0

Algorithms

careimplements the algorithms described in[1]. It works with the Hamiltonian matrix when R is well-conditioned and E = I ; otherwise it uses the extended Hamiltonian pencil and QZ algorithm.

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

Version History

之前介绍过的R2006a

expand all

Not recommended starting in R2019a

See Also