Package com.alumiboti5590.eop.pid
Class PIDGains
- java.lang.Object
-
- com.alumiboti5590.eop.pid.PIDGains
-
public class PIDGains extends java.lang.Object
PIDGains allows for easily storing PID values in an object that can be pulled out and used against PID controllers. There are a slew of constructors but the values given are final; they cannot be changed.
-
-
Field Summary
Fields Modifier and Type Field Description static double
DEFAULT_PEAK_OUTPUT
By default, let motors spin up to full speed.double
kD
double
kFF
double
kI
double
kIzone
double
kP
double
kPeakMaxOutput
double
kPeakMinOutput
-
Constructor Summary
Constructors Constructor Description PIDGains(double p, double i, double d)
PIDGains constructor with only the P, I, and D values providedPIDGains(double p, double i, double d, double feedForward, double izone, double peakOutput)
PIDGains constructor with all values but a mirrored peak value.PIDGains(double p, double i, double d, double feedForward, double izone, double peakMinOutput, double peakMaxOutput)
PIDGains constructor with all values potentially defined, including non-symmetrical values for the peak minimum and maximum values.
-
-
-
Field Detail
-
DEFAULT_PEAK_OUTPUT
public static final double DEFAULT_PEAK_OUTPUT
By default, let motors spin up to full speed. This should be adjusted using peak output parameters- See Also:
- Constant Field Values
-
kP
public double kP
-
kI
public double kI
-
kD
public double kD
-
kFF
public double kFF
-
kIzone
public double kIzone
-
kPeakMinOutput
public double kPeakMinOutput
-
kPeakMaxOutput
public double kPeakMaxOutput
-
-
Constructor Detail
-
PIDGains
public PIDGains(double p, double i, double d)
PIDGains constructor with only the P, I, and D values provided- Parameters:
p
- proportional control valuei
- integral control valued
- derivative control value
-
PIDGains
public PIDGains(double p, double i, double d, double feedForward, double izone, double peakOutput)
PIDGains constructor with all values but a mirrored peak value. Pass a number 'x' and the peak outputs will be [-x, x]- Parameters:
p
- proportional control valuei
- integral control valued
- derivative control valuefeedForward
- the feed forward that should be applied by default. This is added to the end resultizone
- the integral zone that allows for larger error tolerancespeakOutput
- a max value for the motors that will also be negated for the min peak output
-
PIDGains
public PIDGains(double p, double i, double d, double feedForward, double izone, double peakMinOutput, double peakMaxOutput)
PIDGains constructor with all values potentially defined, including non-symmetrical values for the peak minimum and maximum values.- Parameters:
p
- proportional control valuei
- integral control valued
- derivative control valuefeedForward
- the feed forward that should be applied by default. This is added to the end resultizone
- the integral zone that allows for larger error tolerancespeakMinOutput
- the minimum peak output allowedpeakMaxOutput
- the maximum peak output allowed
-
-