Class ImplicitModelFollower<States extends Num,Inputs extends Num,Outputs extends Num>

java.lang.Object
edu.wpi.first.math.controller.ImplicitModelFollower<States,Inputs,Outputs>
Type Parameters:
States - Number of states.
Inputs - Number of inputs.
Outputs - Number of outputs.

public class ImplicitModelFollower<States extends Num,Inputs extends Num,Outputs extends Num> extends Object
Contains the controller coefficients and logic for an implicit model follower.

Implicit model following lets us design a feedback controller that erases the dynamics of our system and makes it behave like some other system. This can be used to make a drivetrain more controllable during teleop driving by making it behave like a slower or more benign drivetrain.

For more on the underlying math, read appendix B.3 in https://file.tavsys.net/control/controls-engineering-in-frc.pdf.

  • Constructor Details

  • Method Details

    • getU

      public Matrix<Inputs,N1> getU()
      Returns the control input vector u.
      Returns:
      The control input.
    • getU

      public double getU(int i)
      Returns an element of the control input vector u.
      Parameters:
      i - Row of u.
      Returns:
      The row of the control input vector.
    • reset

      public final void reset()
      Resets the controller.
    • calculate

      Returns the next output of the controller.
      Parameters:
      x - The current state x.
      u - The current input for the original model.
      Returns:
      The next controller output.