If I remember correctly
Proportional Gain = Kp
Integral Gain = Ki
Output = (error * Kp) + (error * Ki * Time in error) // I am sure there are variations on this.
Time in error = Time in error + 1 // until error = 0 then reset the Time in error to zero
In software what is the standard method used to cancel out (reduce) the time factor as I get closer to zero error? In my logic my time increases continuously until I hit zero error and then time suddenly equals zero.
Is there an acceptable (standard) way to make time smaller as I approach my error = 0 cross over?