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