# Why is this op amp configuration used in Ah method SOC estimation?

While reading a research paper about enhanced coulomb counting, I found this peculiar sensing circuit (inside the red lines). (Research paper: Xie, Jiale, Jiachen Ma, and Kun Bai. “Enhanced Coulomb Counting Method for State-of-Charge Estimation of Lithium-Ion Batteries Based on Peukert’s Law and Coulombic Efficiency.” Journal of Power Electronics 18, no. 3 (May 20, 2018): 910–22. doi:10.6113/JPE.2018.18.3.910)

From the context given in the research paper, one would guess that it is an integrator circuit even if it is called otherwise (Coulomb counting). After simulating the circuit using a universal 4 terminal op amp in LTspice, (all resistances set to 1 kΩ and capacitances to 0.1 µF) I found that for a sinusoidal input (1 Vpp, 1 kHz, 0°), we get an attenuated sine shifted by 180°. My question is, why not use a simple integrator circuit like this one, or the one below it instead if DC gain was an issue? And what purpose does resistor R3 (on the circuit above) serve?  (Image source: Electronics Tutorials - The Integrator Amplifier)

That circuit is not used for the measurement of the charge passing through the shunt for the coulomb counting.

It is used to give additional information for the controller to adjust the sampling rate of the main current measurement and integration part of the system.

As explained elsewhere in the paper at low sampling rates there can be significant error in the coulomb counting function but by adjusting the frequency of sampling depending upon how rapidly the load current is changing (the differentiator is used for this) the sampling rate can be optimized without having to have an excessively high sampling rate that would take additional power and require more processing.

The differentiator is fairly standard with R1 and C2 included to limit response at high frequencies, and R3 to balance the error caused by the amplifier bias current.

• That would make a lot of sense. It appears I have misunderstood the paper. Apr 1, 2022 at 17:05

That is a simple integrator circuit, with some bells and whistles.

Integrators saturate in situations where you don't expect them to, because of bias and leakage currents. This makes integrators not a very robust circuit. We make them leaky integrators by including a large resistor in the feedback path, essentially making them low pass filters. This is a more robust implementation. Whether it's "OK" depend on what the goals of the circuit really are.

Also, the input is AC coupled.

• Understood, but what is the point of R3 in that case? Apr 1, 2022 at 15:11
• R3 is there to try and balance out the input offset voltage caused by op amp input bias currents. In an ideal op amp, it would not be needed. If your input bias currents are low enough, it might not be needed also. Depends on your application. Apr 1, 2022 at 15:16

Because of C1 it can't be an integrator -- C1 blocks DC to the amplifier, making it anything but an integrator.

C1 & R2 make it a differentiator, and are the "main" components to consider. R1 is either parasitic, or is there to stabilize the amplifier (because trying to make a "naked" differentiator with an op-amp just makes an oscillator). C2 is there to stabilize the circuit, and also serves to limit its bandwidth, if necessary.

• Can you please explain why blocking undermines the possibility of the circuit being an integrator? since integrators saturate with DC inputs shouldn't removing the DC make the integrator more stable? Apr 1, 2022 at 15:13
• Because the whole point of an integrator is that it has infinite gain at DC. Something with zero gain at DC is certainly not an integrator! Typically if you have an integrator then it's either "naked" (my term, meaning it nominally implements $H(s) = \frac{k}{s}$) or it's deliberately made into a low-pass filter; the term to search on is "leaky integrator"; it implements $H(s) = \frac{k}{s + \omega_0}$ where $\omega_0$ is very small compared to your frequencies of interest. Apr 1, 2022 at 19:43

I think R3 is used for bias current cancellation, but it may be not useful for some real opamps. Read this for example https://e2e.ti.com/blogs_/archives/b/thesignal/posts/internal-input-bias-current-cancellation