The positive base signal integrates to zero over a long time - a negative initial pulse followed by a positive overshoot that integrates to the area of the negative pulse. Over a shorter time, there is a finite correction due to the overshoot. There are two files here. One is a description of an algorithm assuming a single RC time constant, the other is the excel implementation of the algorithm