Class PIDProfile


  • public class PIDProfile
    extends java.lang.Object
    Used to store PID control data
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double kd  
      double ki  
      double kp  
    • Constructor Summary

      Constructors 
      Constructor Description
      PIDProfile​(double kp)  
      PIDProfile​(double kp, double ki)  
      PIDProfile​(double kp, double ki, double kd)  
    • Field Detail

      • kp

        public double kp
      • ki

        public double ki
      • kd

        public double kd
    • Constructor Detail

      • PIDProfile

        public PIDProfile​(double kp)
      • PIDProfile

        public PIDProfile​(double kp,
                          double ki)
      • PIDProfile

        public PIDProfile​(double kp,
                          double ki,
                          double kd)
    • Method Detail

      • autoConfig

        public static PIDProfile autoConfig​(double max_p,
                                            double osc_period)
        Generate a PIDProfile using the Zeigler-Nichols tuning method. More info: https://frc-pdr.readthedocs.io/en/latest/control/pid_control.html#tuning-methods
        Parameters:
        max_p - Maximum P to cause oscollation in the system
        osc_period - Period of oscillation. This must be a full cycle of the system (in whatever unit. Generally, seconds)
        Returns:
        Generated PIDProfile
      • modify

        public PIDProfile modify​(PIDProfile mod)
        Modify the profile
        Parameters:
        mod - Profile to add
        Returns:
        This profile