The PID Control Object provides a PID controller with Proportional, Derivative and Integral action.
The controller acts on the error signal that is the input of the controller. The output \( u(t) \) is calculated according to:
\( u(t) = K_\text{p} e(t) + K_\text{i} \int_0^t e(t') \,dt' + K_\text{d} \frac{de(t)}{dt} \).
where \( e \) is the error signal, and \( K_\text{p} \), \( K_\text{i} \) and \( K_\text{d} \) are the proportional, derivative and integral gains respectively.
\u200b
- Parameters
-
| [in] | error | - the error signal, which is the difference between the reference (command value) and the actual value of signal we are trying to control |
| [in] | actual | - the actual value of signal we are trying to control, it is only used to determine if the actual signal is beyond the velocity threshold of the reference signal. If the velocity threshold is set to zer this input can be left at zero. |
| [in] | iReset | - reset signal for the integral action. The integrator output is set to zero when this signal is true. |
| [out] | output | - the controller output signal |
| [out] | iTerm | - the current value of the integral term |
| [out] | dTerm | - the current value of the derivative term |
| kp | - the proportional gain |
| ki | - the integral gain |
| kd | - the derivative gain |
| iMin | - lower limit value of the integral action |
| iMax | - upper limit value of the integral action |
| iPositionErrorThresholdNeg | - lower threshold value of the error for enabling the integral action |
| iPositionErrorThresholdPos | - upper threshold value of the error for enabling the integral action |
| iActualVelocityThresholdNeg | - lower threshold value of the actual velocity for enabling the integral action |
| iActualVelocityThresholdPos | - upper threshold value of the actual velocity for enabling the integral action |
| iMin | - lower limit for the integral action |
| iMax | - upper limit for the integral action |