[wpimath] Add RamseteController comparison to LTV controller docs (NFC) (#5559)

This commit is contained in:
Tyler Veness
2023-08-24 00:04:54 -07:00
committed by GitHub
parent b3ef536677
commit 7889b35b67
4 changed files with 31 additions and 10 deletions

View File

@@ -22,9 +22,16 @@ import edu.wpi.first.math.trajectory.Trajectory;
/**
* The linear time-varying differential drive controller has a similar form to the LQR, but the
* model used to compute the controller gain is the nonlinear model linearized around the
* drivetrain's current state. We precomputed gains for important places in our state-space, then
* interpolated between them with a LUT to save computational resources.
* model used to compute the controller gain is the nonlinear differential drive model linearized
* around the drivetrain's current state. We precompute gains for important places in our
* state-space, then interpolate between them with a lookup table to save computational resources.
*
* <p>This controller has a flat hierarchy with pose and wheel velocity references and voltage
* outputs. This is different from a Ramsete controller's nested hierarchy where the top-level
* controller has a pose reference and chassis velocity command outputs, and the low-level
* controller has wheel velocity references and voltage outputs. Flat hierarchies are easier to tune
* in one shot. Furthermore, this controller is more optimal in the "least-squares error" sense than
* a controller based on Ramsete.
*
* <p>See section 8.7 in Controls Engineering in FRC for a derivation of the control law we used
* shown in theorem 8.7.4.

View File

@@ -21,8 +21,11 @@ import edu.wpi.first.math.trajectory.Trajectory;
/**
* The linear time-varying unicycle controller has a similar form to the LQR, but the model used to
* compute the controller gain is the nonlinear model linearized around the drivetrain's current
* state.
* compute the controller gain is the nonlinear unicycle model linearized around the drivetrain's
* current state.
*
* <p>This controller is a roughly drop-in replacement for {@link RamseteController} with more
* optimal feedback gains in the "least-squares error" sense.
*
* <p>See section 8.9 in Controls Engineering in FRC for a derivation of the control law we used
* shown in theorem 8.9.1.

View File

@@ -23,9 +23,17 @@ namespace frc {
/**
* The linear time-varying differential drive controller has a similar form to
* the LQR, but the model used to compute the controller gain is the nonlinear
* model linearized around the drivetrain's current state. We precomputed gains
* for important places in our state-space, then interpolated between them with
* a LUT to save computational resources.
* differential drive model linearized around the drivetrain's current state. We
* precompute gains for important places in our state-space, then interpolate
* between them with a lookup table to save computational resources.
*
* This controller has a flat hierarchy with pose and wheel velocity references
* and voltage outputs. This is different from a Ramsete controller's nested
* hierarchy where the top-level controller has a pose reference and chassis
* velocity command outputs, and the low-level controller has wheel velocity
* references and voltage outputs. Flat hierarchies are easier to tune in one
* shot. Furthermore, this controller is more optimal in the "least-squares
* error" sense than a controller based on Ramsete.
*
* See section 8.7 in Controls Engineering in FRC for a derivation of the
* control law we used shown in theorem 8.7.4.

View File

@@ -20,8 +20,11 @@ namespace frc {
/**
* The linear time-varying unicycle controller has a similar form to the LQR,
* but the model used to compute the controller gain is the nonlinear model
* linearized around the drivetrain's current state.
* but the model used to compute the controller gain is the nonlinear unicycle
* model linearized around the drivetrain's current state.
*
* This controller is a roughly drop-in replacement for RamseteController with
* more optimal feedback gains in the "least-squares error" sense.
*
* See section 8.9 in Controls Engineering in FRC for a derivation of the
* control law we used shown in theorem 8.9.1.