PIDFController
This is a PID controller for your robot. Internally, it performs all the calculations for you. This controller also includes a feedforward, kF
, which is multiplied by the setpoint. Additional features such as output clamping, integral clamping, integral zone, continuous input, derivative smoothening, and auto-integral clearing are also included.
You need to tune your values to the appropriate amounts in order to properly utilise these calculations.
The equation we will use is: u(t) = kP * e(t) + kI * int(0,t)[e(t')dt'] + kD * e'(t) + kF * setPoint
where e(t) = r(t) - y(t)
and r(t)
is the setpoint and y(t)
is the measured value. If we consider e(t)
the positional error, then int(0,t)[e(t')dt']
is the total error and e'(t)
is the derivative error. Source
This controller can be combined with a feedforward controller to create a CompositeController, via the SystemController interface.
Since
1.0.0-pre