PIDController
class PIDController @JvmOverloads constructor(val coefficients: PIDCoefficients, val resetIntegralOnZeroCrossover: Boolean = true)(source)
Traditional proportional-integral-derivative controller.
Parameters
coefficients
the PIDCoefficients that contains the PID gains
resetIntegralOnZeroCrossover
whether to reset the integral term when the error crosses
Constructors
Functions
Link copied to clipboard
fun calculate(timestamp: ComparableTimeMark = TimeSource.Monotonic.markNow(), error: MotionState<*>): Double
Calculates the PID output from an error MotionState.
fun <U : Unit<U>> calculate(timestamp: ComparableTimeMark = TimeSource.Monotonic.markNow(), reference: MotionState<U>, measured: MotionState<U>): Double
Calculates the PID output from reference and measured MotionStates.
fun calculate(timestamp: ComparableTimeMark = TimeSource.Monotonic.markNow(), error: Double, errorDerivative: Double? = null): Double
Calculates the PID output
fun calculate(timestamp: ComparableTimeMark = TimeSource.Monotonic.markNow(), reference: Double, measured: Double, measuredDerivative: Double? = null): Double
Calculates the PID output from a reference (setpoint) and measured value.
fun calculate(timestamp: ComparableTimeMark = TimeSource.Monotonic.markNow(), reference: Double, measured: Double, referenceDerivative: Double, measuredDerivative: Double): Double
Calculates the PID output from a reference (setpoint) and measured value, with their respective derivatives.