mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Add RamseteController comparison to LTV controller docs (NFC) (#5559)
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user