A method and apparatus for simulating the operation of a rechargeable
battery. A value is obtained for at least one parameter that describes an
internal state of the battery. The obtained value is used for calculating
a prediction value for a characteristic of the battery that is observable
outside the battery. These steps are repeated a multitude of times in
order to simulate the operation of the battery over a certain period of
time. A difference is detected between a calculated prediction value and
a known value of a corresponding characteristic in a corresponding
situation. The obtained value of the at least one parameter is corrected
before a further prediction value is calculated by an amount that is
proportional to the detected difference.