CNT-APG002-EN 55
®

Appendix A

The math behind PID loops
This appendix presents the mathematical formulas used for PID control
in Tracer MP580/581 controllers, the programmable control module
(PCM), and the universal programmable control module (UPCM).

Velocity model formula

The formula used to calculate the output in the ve locity model is shown
below. It uses the integral and proportional gain, but not the derivative
gain. The same formula is used in the PCM and the UP CM.
Where:
Kprop = proportional gain
Kint = integral gain
Kdiff = integral gain
c = 2.56 for the PCM and UPCM
c = 1.00 for Tracer MP580/581 controllers
= change in error
= change in the change squared
The factor 2.56 scales the PID output to a range of 0100% in the PCM
and UPCM.

Proportional control formula

The following formula shows the relationship between the error and the
output in proportional-only control:
The proportional bias calibrates the controller to some known output. So
when the error is zero (which makes the proportional gain zero), the out-
put is equal to the proportional bias.
output n() Kprop
c
-------------- error n()×Kint error n()×
c
-----------------------------------------
Kdiff
c
------------2error n()×++=
error n()
2error n()
Output n() Kprop
c
-------------- error n()×proportional bias+=