[Ovmsdev] Battery capacity metrics (for the Leaf, and in general)

Robin O'Leary ovmsdev at caederus.org
Sun Feb 24 07:42:08 HKT 2019


Prompted by the recent discussion about auto-detecting Leaf battery
pack size, I was looking at the somewhat convoluted way the Leaf code
is currently dealing with battery charge level and capacity to see why
it was thought necessary in the first place.

The Leaf's BMS gives us both an estimate of battery energy currently
available (which we quaintly called "xnl.v.b.gids" and didn't convert
to standard units), and estimated total battery energy capacity (which
wasn't available at all).  Perhaps this was discouraged by the lack
of standard metrics for energy (*), which I find this quite surprising,
given that these two values are so useful in basic calculations like:

	range = (energy available) / (driving efficiency)
or
	charge time = (energy capacity - available) / (charge rate)

So here is a pull request to expose those values as Leaf-specific metrics:

  m_battery_energy_capacity	Float	"xnl.v.b.e.capacity"	kWh
  m_battery_energy_available	Float	"xnl.v.b.e.available"	kWh

  https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/pull/206

But I would go further and suggest that these deserve to be standard
metrics so other vehicle modules can also report their own equivalent
values.  My hope is that we can then start improving the accuracy of range
and charge time estimates for all vehicles; most already attempt one or
both in their own ways, some more sophisicated than others.  At least
basing everything on standard energy units means there is a better chance
that work already done by one model might be useful to another.

--

(*) The only related standard metric I can see is ms_v_bat_cac, which is
a measure of battery charge capacity (in Amp.hours), rather than energy.
Although closely related, charge is less convenient to work with, as
most calculations will also need to account for varying pack voltage.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20190223/a9992d09/attachment-0002.sig>


More information about the OvmsDev mailing list