PIDControllerBase can be used as a base class when implementing a custom Proportional, Integral, Derivative (PID) controller, and contains a considerable amount of shared implementation that conforms to the
IPIDController Interface. For example implementations that utilize the
PIDControllerBase class, see the
For a detailed discussion and explanation of the PID algorithm, see the Wilderness Labs PID Guide.
PIDControllerBase implements a number of properties and methods that simplify the task of creating a PID controller with a custom algorithm. Simply inherit from
PIDControllerBase and implement the
CalculateControlOutput method with your custom algorithm.
The source for
PIDControllerBase can be found here, and may be helpful in implementing controllers that derive from it.
The API of
PIDControllerBase conforms to
IPIDController Interface, so only the API marked as
virtual, and therefore up to the derivative implementation is documented here.
Abstract and Virtual Methods
public abstract float CalculateControlOutput()
This method should be implemented by any derivative classes and should calculate the control output based on the difference (error) between the
TargetInput, using the supplied