Time remaining for funky batteries

Peter Jones, you are a legend:

…use a matrix of previous discharge rate intervals indexed by the charge at the time and the actual average discharge rate during that interval….

I've prototyped this, and wow, it's accurate. I've used floating point least squares regression to find the rate of discharge. This trivially takes into account battery cell configuration and battery chemistry data, and continually 'tweaks' itself with the new data, i.e. getting more accurate in shape as you discharge and charge each time.


Sub-screenshot of my test program

I've still got to work on interpolation of data where the percentage wasn't hit (the start and end for me, but might happen anywhere), but this is not a big problem.

I'm now optimising my code for speed, making a suitable gobjects for the data structures and testing like mad. I hope to have some other battery discharge and charge curves from stuff like OLPC and my nearly completely broken battery iBook.

Before people ask, the graph widget is the one used in gnome-power-statistics, and that screenshot was taken of a custom hacky application that has far too many graphs to fit on one screen.

Published by

hughsie

Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

One thought on “Time remaining for funky batteries”

  1. Can you patent this and then submit the patent to the patent commons? That would prevent some evil company from patenting this and causing you problems by a lawsuit that you (or the gnome foundation) would have to invalidate through expensive lawsuits. http://www.patent-commons.org/

Comments are closed.