# Calculating battery current during charging in CCCV

I am researching how (lithium-ion) batteries are charged using CCCV. Specifically, I am interested in the "constant-voltage" part of the process: My question is - how do I calculate current $$\i\$$ during constant-voltage? I have found idealized simple R-only or RC circuits as possible battery models. I have found multiple definitions for open circuit voltage ($$\V_{ocv}\$$) as a function of capacity ($$\Q\$$). Assuming a simple R-only equivalent circuit such as the following: I have found variations of the following formula including terminal battery voltage ($$\ V_t \$$) and internal impedance ($$\ R_i \$$) of a single battery cell 3:

$$\ V_t = V_{ocv} - R_i * i \$$

where

$$\ V_{ocv}(Q) = V_0 - \frac{K*Q_{nom}}{Q_{nom}-Q} + A * e^{-B * Q} \$$

Thus, should following not hold?

$$\ i = \frac{V_{ocv} - V_t}{R_i} \$$

To my understanding, $$\V_t\$$ is constant (say $$\4V\$$ or $$\4.2V\$$) during constant-voltage. $$\V_{ocv}(Q)\$$ is assumed to be known, see plot and sample reference below. In the literature, $$\i\$$ is always shown with an exponential decrease during constant-voltage but not how it is actually calculated. I am unsure as to whether $$\R_i\$$ is constant.

My background is in Computer Science so please feel free to recommend literature for additional reading - I feel like I'm probably missing something obvious here. 3 Marra, F., Yang, G. Y., Træholt, C., Larsen, E., Rasmussen, C. N., & You, S. (2012). Demand Profile Study of Battery Electric Vehicle under Different Charging Options. In Proceedings of the 2012 IEEE Power & Energy Society General Meeting IEEE.

EDIT: Added $$\V_{ocv}\$$ equation and CCCV plot.

EDIT 2: Added R-only circuit diagram.

EDIT 3: For posterity, here are two helpful lectures on how CCCV may be simulated by describing a circuit as a system of differential equations and converting them to a discrete time model that can be simulated easily:

There are several effects that can be modeled with increasing complexity, among them:

• Open Circuit Voltage (ideal voltage source, current unrelated to voltage)
• Stage of charge (tracks capacity/efficiency and has memory)
• Linear polarization (adds series resistance)
• Diffusion voltages (discharge creates polarization, and departure from Open Cell Voltage)
• Warburg impedance (models electrolyte)

What you want to model at minimum would be a state of charge model.

Edit:

If your confused about how to calculate the current and voltage for a simple model this is how it works. Lets look at a simple battery model

v(t) = OCV(z(t)) − i (t)*R0. To calculate the voltage the first thing you will need is the OCV vs state of charge curve, which you have shown above. OCV(z(t)) can run from 0 to 100% or in your case 0 to 40Ah. (If you wanted to you could multiply the graph by 100/40Ah to get the SOC in percent)

You then need to keep track of where you are on the SOC curve, so in time the update state would be

$$\z[k + 1] = z[k] − i[k]\frac{\Delta t}{Q} \$$

to find the new SOC (z[k] is the SOC and it could be in Ah or percent depending on how you keep track of it, k is the current time step, k+1 is the new time step). i[k] is calculated from your circuit model, the battery needs to be connected to some kind of circuit. The circuit model needs to be a descrete time circuit model. If you don't know how to convert a circuit to a discrete time circuit model, this is the subject of a few EE courses and would take a few pages which is beyond the scope of this site. You need to know:

1) How to convert a circuit model to a system of equations

2) How to convert memory elements to discrete time.

• Thanks for your suggestion, I've actually come across that source: However, SoC is given as a function of (past) current and OCV is given as a function of SoC. The only reference I can find to how current $i(t)$ is calculated is "where the sign is positive on discharge". I think my question is much more basic - how do I calculate $i(t)$ given that SoC and $V_{ocv}$ is known? – Oliver Frendo Jun 28 '19 at 6:57
• Sorry, I thought that was pretty apparent from the math. Are you familiar with discrete time models? I edited the question. – Voltage Spike Jun 28 '19 at 15:39
• Discrete time models seems to be exactly the term I was looking for, thank you very much! Solving for $i(t)$ seems to be the correct approach, however differential equations must be used instead of the simple equations above. – Oliver Frendo Jul 2 '19 at 10:29
• Right, the simple equation above actually is kind of a differential equation because of the delta-t component – Voltage Spike Jul 2 '19 at 14:56

The simplest of all implementations will be using a current sensing resistor - a very low value, high precision resistor (0.1 - 1ohm). The voltage drop across the resistor can be fed to an opamp amplifier, configured to amplify input signal to 0-5V range. You can interpret this signal on a microcontroller and using ohms law, thus print the current. There is limitation to this method too like the drift in opamp, resistance, opamp offset, temperature variance etc. However, if you demand a simple and not-so-accurate solution, this will do

• Thanks for your suggestion. While I assume this would be the approach in practice I am interested in how $i$ is calculated in the equivalent circuit above. I assume I am making a mistake somewhere... – Oliver Frendo Jun 28 '19 at 11:27
• Most chargers employ a current sense resistor to measure the voltage drop and hence the current. – Pranit Pawar Jun 29 '19 at 5:52
• Also, the cell model you have assumed is near ideal. When you assume a 1R model for a Li-ion cell, you are assuming that your cell exhibits a linear behaviour. If you look at the OCV curve of the cell, you can spot the working range (3 - 4V region) to be APPROX. linear. But before 3V and after 4V you wont find any linear nature thus, 1R model is poor cell model. – Pranit Pawar Jun 29 '19 at 5:58
• A slightly better (but still not good) model is a 1RC model. It properly accounts for the non-linearities in the cell's behaviour. Now coming to your equation of i, it is not a good one. Cell resistance will change over time, moreover the OCV-SOC relation itself changes over time, so your entire current calculation will be tremendously off if you use i=V/r formula. Read up on 1RC model if you are interested in better results – Pranit Pawar Jun 29 '19 at 6:02
• As far as the exponential current calculation is considered, formulae aren't used in lab setup during characterisation. This is the whole point of characterisation - you are measuring the actual behaviour of the product. Formulae consider an approximate model/circuit. So formulae driven characterisation will you an approximated behaviour. To measure current, current measuring equipments/circuits are employed. You will get a voltage feedback from an equipment/circuit and it is converted to a current reading using the datasheet. Simplest way to measure current is using a current sense resistor – Pranit Pawar Jun 29 '19 at 6:07