8000 Merge pull request #47 from roryyorke/care-doc-fix · basicmachines/python-control@770c4d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 770c4d7

Browse files
committed
Merge pull request python-control#47 from roryyorke/care-doc-fix
care doc fix
2 parents 38d7125 + 065b2cf commit 770c4d7

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

control/mateqn.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -411,25 +411,27 @@ def dlyap(A,Q,C=None,E=None):
411411
#### Riccati equation solvers care and dare
412412

413413
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
415415
equation
416416
417-
A^T X + X A - X B B^T X + Q = 0
417+
A^T X + X A - X B R^-1 B^T X + Q = 0
418418
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.
423424
424425
(X,L,G) = care(A,B,Q,R,S,E) solves the generalized continuous-time
425426
algebraic Riccati equation
426427
427428
A^T X E + E^T X A - (E^T X B + S) R^-1 (B^T X E + S^T) + Q = 0
428429
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."""
433435

434436
# Make sure we can import required slycot routine
435437
try:
@@ -531,7 +533,7 @@ def care(A,B,Q,R=None,S=None,E=None):
531533
e.info = ve.info
532534
elif ve.info == 1:
533535
e = ValueError("The matrix A is (numerically) singular in \
534-
discrete-time case.")
536+
continuous-time case.")
535537
e.info = ve.info
536538
elif ve.info == 2:
537539
e = ValueError("The Hamiltonian or symplectic matrix H cannot \

0 commit comments

Comments
 (0)
0