Battery Modelling

Hi all,

Anyone have a battery model?

@macsky ,

How sophisticated a battery model do you want?

The best way I know to create a battery model is to use a custom C-Block.

You can create a table that has an open circuit voltage (Voc) based on battery capacity remaining.

The C-Block model would determine how much current is being used in time. This would subtract from the remaining capacity and therefore lower the Voc as sim time is executed.

Most battery suppliers will give you a mAh vs. time based on a known battery load. This you can translate into a table. You can then perform a PWL (piece-wise-linear) interpolation of the present state of battery capacity to provide an immediate Voc from the battery.

The above is simple but provides at least support for battery voltage depletion.

It doesn’t take into account, internal source resistance (Rs), Voc recovery time when the load is removed on a pulse. and other potential factors such as Temperature factor corrections.

Trying to make the battery model more complicated and more realistic is going to be a challenge since the battery supplier rarely, if ever, provides you this type of data.

To achieve a more realistic battery model with the additional factors, I’ve had to resort to getting new batteries from the supplier and actually create my load pulses and perform measurements and collect the data. On one battery type, it took me 5 months to collect enough data on 4 battery samples to be reasonably accurate.


I have several models of batteries of different chemical types in my LTspice. They are available on


Depending on the use case …

For the study of CC/CV charger, simple implementation is adequate.

Anyway, do you mind to explain why do you need a very detailed model?