-
Derivative term amplifies high frequency noise, must apply low pass filter.
-
Derivative spikes during change in setpoint, must take derivative on measurements not error.
-
Integral can saturate output if held at one point for awhile: Use integral anti-windup. (clamping integral when control signal is at max for a long time)
-
Real world actuators have limits, U term must be clamped.
- Create a pid object and call init().
- During each iteration of a control loop pass in measurement data and a desired output to update().
- Convert output signal to inputs to actuators