@@ -411,25 +411,27 @@ def dlyap(A,Q,C=None,E=None):
411
411
#### Riccati equation solvers care and dare
412
412
413
413
def care (A ,B ,Q ,R = None ,S = None ,E = None ):
414
- """ (X,L,G) = care(A,B,Q) solves the continuous-time algebraic Riccati
414
+ """ (X,L,G) = care(A,B,Q,R=None ) solves the continuous-time algebraic Riccati
415
415
equation
416
416
417
- :math:`A^T X + X A - X B B^T X + Q = 0`
417
+ :math:`A^T X + X A - X B R^{-1} B^T X + Q = 0`
418
418
419
- where A and Q are square matrices of the same dimension. Further, Q
420
- is a symmetric matrix. The function returns the solution X, the gain
421
- matrix G = B^T X and the closed loop eigenvalues L, i.e., the eigenvalues
422
- of A - B G.
419
+ where A and Q are square matrices of the same dimension. Further,
420
+ Q and R are a symmetric matrices. If R is None, it is set to the
421
+ identity matrix. The function returns the solution X, the gain
422
+ matrix G = B^T X and the closed loop eigenvalues L, i.e., the
423
+ eigenvalues of A - B G.
423
424
424
425
(X,L,G) = care(A,B,Q,R,S,E) solves the generalized continuous-time
425
426
algebraic Riccati equation
426
427
427
428
:math:`A^T X E + E^T X A - (E^T X B + S) R^{-1} (B^T X E + S^T) + Q = 0`
428
429
429
- where A, Q and E are square matrices of the same dimension. Further, Q and
430
- R are symmetric matrices. The function returns the solution X, the gain
431
- matrix G = R^-1 (B^T X E + S^T) and the closed loop eigenvalues L, i.e.,
432
- the eigenvalues of A - B G , E. """
430
+ where A, Q and E are square matrices of the same
431
+ dimension. Further, Q and R are symmetric matrices. If R is None,
432
+ it is set to the identity matrix. The function returns the
433
+ solution X, the gain matrix G = R^-1 (B^T X E + S^T) and the
434
+ closed loop eigenvalues L, i.e., the eigenvalues of A - B G , E."""
433
435
434
436
# Make sure we can import required slycot routine
435
437
try :
@@ -531,7 +533,7 @@ def care(A,B,Q,R=None,S=None,E=None):
531
533
e .info = ve .info
532
534
elif ve .info == 1 :
533
535
e = ValueError ("The matrix A is (numerically) singular in \
534
- discrete -time case." )
536
+ continuous -time case." )
535
537
e .info = ve .info
536
538
elif ve .info == 2 :
537
539
e = ValueError ("The Hamiltonian or symplectic matrix H cannot \
0 commit comments