This is the calculation for the PI values for the CR2031.

Vcom = KP*Ierr + KI*integral(Ierr)