From e322ab8e4629634077880ec215330a1511ba6cd7 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Mon, 28 Aug 2023 15:10:42 -0700 Subject: [PATCH] [wpimath] Fix docs for DARE ABQRN stabilizability check (NFC) (#5579) --- wpimath/src/main/java/edu/wpi/first/math/DARE.java | 4 ++-- wpimath/src/main/java/edu/wpi/first/math/WPIMathJNI.java | 4 ++-- wpimath/src/main/native/include/frc/DARE.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/DARE.java b/wpimath/src/main/java/edu/wpi/first/math/DARE.java index d9d0b55877..af2a0217af 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/DARE.java +++ b/wpimath/src/main/java/edu/wpi/first/math/DARE.java @@ -90,7 +90,7 @@ public final class DARE { * * @@ -199,7 +199,7 @@ public final class DARE { * @return Solution of DARE. * @throws IllegalArgumentException if Q − NR⁻¹Nᵀ isn't symmetric positive semidefinite. * @throws IllegalArgumentException if R isn't symmetric positive definite. - * @throws IllegalArgumentException if the (A, B) pair isn't stabilizable. + * @throws IllegalArgumentException if the (A − BR⁻¹Nᵀ, B) pair isn't stabilizable. * @throws IllegalArgumentException if the (A, C) pair where Q = CᵀC isn't detectable. */ public static Matrix dare( diff --git a/wpimath/src/main/java/edu/wpi/first/math/WPIMathJNI.java b/wpimath/src/main/java/edu/wpi/first/math/WPIMathJNI.java index a13726ffb7..71046c8c58 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/WPIMathJNI.java +++ b/wpimath/src/main/java/edu/wpi/first/math/WPIMathJNI.java @@ -109,7 +109,7 @@ public final class WPIMathJNI { *
    *
  • Q − NR⁻¹Nᵀ isn't symmetric positive semidefinite *
  • R isn't symmetric positive definite - *
  • The (A, B) pair isn't stabilizable + *
  • The (A − BR⁻¹Nᵀ, B) pair isn't stabilizable *
  • The (A, C) pair where Q = CᵀC isn't detectable *
* @@ -195,7 +195,7 @@ public final class WPIMathJNI { * @param S Array storage for DARE solution. * @throws IllegalArgumentException if Q − NR⁻¹Nᵀ isn't symmetric positive semidefinite. * @throws IllegalArgumentException if R isn't symmetric positive definite. - * @throws IllegalArgumentException if the (A, B) pair isn't stabilizable. + * @throws IllegalArgumentException if the (A − BR⁻¹Nᵀ, B) pair isn't stabilizable. * @throws IllegalArgumentException if the (A, C) pair where Q = CᵀC isn't detectable. */ public static native void dareABQRN( diff --git a/wpimath/src/main/native/include/frc/DARE.h b/wpimath/src/main/native/include/frc/DARE.h index 9a9e0fa22e..cc7c141d6f 100644 --- a/wpimath/src/main/native/include/frc/DARE.h +++ b/wpimath/src/main/native/include/frc/DARE.h @@ -213,7 +213,7 @@ performance. The solver may hang if any of the following occur:
  • Q − NR⁻¹Nᵀ isn't symmetric positive semidefinite
  • R isn't symmetric positive definite
  • -
  • The (A, B) pair isn't stabilizable
  • +
  • The (A − BR⁻¹Nᵀ, B) pair isn't stabilizable
  • The (A, C) pair where Q = CᵀC isn't detectable
Only use this function if you're sure the preconditions are met. @@ -336,7 +336,7 @@ J = Σ [uₖ] [0 R][uₖ] ΔT @throws std::invalid_argument if Q − NR⁻¹Nᵀ isn't symmetric positive semidefinite. @throws std::invalid_argument if R isn't symmetric positive definite. -@throws std::invalid_argument if the (A, B) pair isn't stabilizable. +@throws std::invalid_argument if the (A − BR⁻¹Nᵀ, B) pair isn't stabilizable. @throws std::invalid_argument if the (A, C) pair where Q = CᵀC isn't detectable. */ template