PDController

A PIDF controller with no feedforward or integral. Source

Since

1.0.0-pre

Inheritors

Constructors

Link copied to clipboard
constructor(kp: Double, kd: Double)
Default constructor with just the coefficients
constructor(kp: Double, kd: Double, sp: Double, pv: Double)
The extended constructor.

Inherited properties

Link copied to clipboard
open val period: Double
Link copied to clipboard
open var setPoint: Double

Inherited functions

Link copied to clipboard
open fun atSetPoint(): Boolean
Returns true if the error is within the percentage of the total input range, determined by setTolerance.
Link copied to clipboard
abstract fun calculate(process: Double, setpoint: Double): Double
Calculate the next output of this control algorithm.
open fun calculate(): Double
open fun calculate(pv: Double, sp: Double): Double
Calculates the next output of the PIDF controller.
open fun calculate(pv: Double): Double
Calculates the control value, u(t).
Link copied to clipboard
open fun clearTotalError()
Clear the integral term.
Link copied to clipboard
Link copied to clipboard
open fun getD(): Double
Link copied to clipboard
open fun getF(): Double
Link copied to clipboard
open fun getI(): Double
Link copied to clipboard
open fun getP(): Double
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun reset()
Resets the PIDF controller.
Link copied to clipboard
open fun setCoefficients(coeffs: Array<Double>)
Sets the coefficients for this controller.
Link copied to clipboard
open fun setD(kd: Double)
Link copied to clipboard
open fun setF(kf: Double)
Link copied to clipboard
open fun setI(ki: Double)
Link copied to clipboard
open fun setIntegrationBounds(integralMin: Double, integralMax: Double)
Set the bounds for the integral term.
Link copied to clipboard
open fun setP(kp: Double)
Link copied to clipboard
open fun setPID(coefficients: PIDCoefficients)
open fun setPID(kp: Double, ki: Double, kd: Double)
Set the current controller PID coefficients to the given coefficients.
Link copied to clipboard
open fun setPIDF(coefficients: PIDFCoefficients)
open fun setPIDF(kp: Double, ki: Double, kd: Double, kf: Double)
Set the current controller PID coefficients to the given coefficients.
Link copied to clipboard
open fun setTolerance(positionTolerance: Double)
open fun setTolerance(positionTolerance: Double, velocityTolerance: Double)
Sets the error which is considered tolerable for use with atSetPoint.
Link copied to clipboard
open fun updatePID(coefficients: PIDCoefficients)
Update the supplied PID coefficients with the current controller values.
Link copied to clipboard
open fun updatePIDF(coefficients: PIDFCoefficients)
Update the supplied PID coefficients with the current controller values.