<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class=""><div text="#000000" bgcolor="#FFFFFF" class="">A better scheme would be to supply these as general / abstract "levels", i.e.<br class=""><br class=""><tt class="">v.b.c.level.min</tt><tt class=""><br class=""></tt><tt class="">v.b.c.level.max</tt><br class=""><br class="">So this can be either an SOC or an SOH or a normalized voltage or resistance level, whatever is appropriate and available for a vehicle. It just needs to be in the range 0-100%, so min and max can be put in relation. And we also should add…<br class=""><br class=""><tt class=""><tt class="">v.b.c.level.avg</tt><br class="">v.b.c.level.stddev</tt><br class=""><br class="">I think that would work better than "soc". Comments?</div></blockquote><div class=""><br class=""></div>OK. Done. Committed and pushed.<div class=""><br class=""></div><div class="">That also leaves the namespace v.b.c.* for whatever we do with individual cell voltages and temperatures. My preference for that seems to be an OvmsMetricArrayFloat type (the AsString result of which could be a comma-separated list, but we can provide individual value set/get functions for OVMS code). Roadster has 99 cells, and I really don’t want to create 198 metrics for this. What do you think?<div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div text="#000000" bgcolor="#FFFFFF" class="">To check if I got this right:<br class="">- "standard mode" means the battery will only be charged up to max 90% real, but the display makes that appear as 100%<br class="">- the battery actually had 68% SOC here, but the display showed this as 75%<br class="">- if you had switched to "range mode", the display would have dropped to 68%<br class=""><br class="">Is that correct?</div></blockquote><div class=""><br class=""></div>Again, a fictitious vehicle with cells in range 3v to 4v.</div><div class=""><br class=""></div><div class="">Assuming “range” mode is the full pack, so 0% is 3v and 100% is 4v.</div><div class=""><br class=""></div><div class="">Say “standard” mode hides the bottom and top 10% of the pack, now 0% is 3.1v and 100% is 3.9v.</div><div class=""><br class=""></div><div class="">If you charge to 100% in standard mode, then switch to range mode, it switches to show 90% SOC.</div><div class=""><br class=""></div><div class="">That is how the roadster behaves (although voltages and percentages are different).</div><div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 25 May 2018, at 9:33 PM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
  
  <div text="#000000" bgcolor="#FFFFFF" class="">
    <br class="">
    <div class="moz-cite-prefix">Am 25.05.2018 um 03:31 schrieb Mark
      Webb-Johnson:<br class="">
    </div>
    <blockquote type="cite" cite="mid:7D6D38A4-0186-4BA5-B9E4-8AA5D64694B7@webb-johnson.net" class="">
      <blockquote type="cite" class="">
        <pre wrap="" class="">a) Can we agree on a slightly different naming scheme?
I suggest adding an indicator for the cell level semantics to the "soc.min" and "soc.max" names, e.g.
</pre>
      </blockquote>
      <pre wrap="" class="">Yes, something like that is better. I did consider it, but couldn’t come up with a good name.

These min/max limiting values are normal at some sort of sub-module level. Cells grouped into sub-modules, sub-modules grouped into modules, and modules making up the battery pack. Voltages are normally available at the sub-module level, not individual cell.

In the Tesla Roadster these are called cells, bricks, sheets, and ESS.
In the Tesla Model S/X/3 these are called cells, bricks, modules, and ‘pack’.

How about v.b.m.soc.[min|max] (with the ‘m’ denoting module)? Or is ‘cell’ ok, even though we are not really talking about individual cells but bricks/sub-modules?</pre>
    </blockquote>
    <br class="">
    My "cell" is your "sub-module".<br class="">
    <br class="">
    I use "cell" and "module" from a logical rather than a physical
    perspective, with a "cell" being the smallest individually
    addressable / measurable unit of a battery pack, regardless of how
    many physical cells that actually consists of. A "module" is a group
    of "cells" sharing some functions / measurements, for example
    temperature sensors / control. A "pack" is n "cells" connected in
    series, so the weakest cell defines the pack.<br class="">
    <br class="">
    So I think "cell" would fit better than "module", as we're trying to
    get the highest level of detail available here.<br class="">
    <br class="">
    The physical cells in a logical cell normally can't be addressed
    individually, they build a macro cell. Especially if building from
    18650 or other small units, monitoring the physical cells would be
    overkill and also wouldn't really help much in monitoring or
    securing the battery. Normally an 18650 based pack will even omit
    monitoring of the cell level fuses -- if they blow, they've done
    their job, the overall macro cell capacity drops and that will be
    measured by the BMS, that's sufficient.<br class="">
    <br class="">
    On packs using prismatic or pouch cells, monitoring the physical
    cells could be done, and could help in better degradation diagnosis,
    but in reality also is not essential for security or performance
    monitoring. Physical cells put in parallel are selected carefully to
    match in terms of age, capacity and resistance. So they also degrade
    very closely unless one has a production fault, in which case the
    overall macro cell performance also drops sufficiently to detect the
    problem.<br class="">
    <br class="">
    <br class="">
    <blockquote type="cite" cite="mid:7D6D38A4-0186-4BA5-B9E4-8AA5D64694B7@webb-johnson.net" class=""><br class="">
      <blockquote type="cite" class="">
        <pre wrap="" class="">b) What is the technical definition of the "soc.min" metric?
Normally I would expect "soc.min" to be identical to the overall pack SOC -- the Roadster certainly doesn't allow cells to be discharged below 0% SOC?
What are typical values for "min" and "max" in reference to the overall SOC and voltage?
I mean, if that's really a normalized cell voltage level, we shouldn't name it "soc".
</pre>
      </blockquote>
      <pre wrap="" class="">Very good question. I wish I knew the answer. Here is an example from a Tesla Roadster:

OVMS# metrics list v.b
v.b.cac                                  156.988Ah
v.b.health                               CAC 156.99Ah SOC 75% LIM 68% MIN 68% MAX 70%
v.b.soc                                  75%
v.b.soc.max                              70%
v.b.soc.min                              68%
v.b.soh                                  95.1741%

Firstly: SOC LIM vs SOC. In it’s diagnostics screen, the Tesla Roadster displays these as “SOC: LIM 68% MIN 68% MAX 70%”, separately from the SOC displayed to the user. I guess the user SOC is dependent on current mode (primarily standard or range), and the SOC LIM/MIN/MAX is normalised to always be in one mode? 68% vs 75% is about 10% which seems about right for standard vs range mode.</pre>
    </blockquote>
    <br class="">
    To check if I got this right:<br class="">
    - "standard mode" means the battery will only be charged up to max
    90% real, but the display makes that appear as 100%<br class="">
    - the battery actually had 68% SOC here, but the display showed this
    as 75%<br class="">
    - if you had switched to "range mode", the display would have
    dropped to 68%<br class="">
    <br class="">
    Is that correct?<br class="">
    <br class="">
    <br class="">
    <blockquote type="cite" cite="mid:7D6D38A4-0186-4BA5-B9E4-8AA5D64694B7@webb-johnson.net" class="">
      <pre wrap="" class="">So, let’s just concentrate on SOC LIM/MIN/MAX. SOC LIM is the limiting SOC. For a discharge, the limit is based on SOC MIN, and for a charge it would be SOC MAX. But I am not sure if SOC LIM tracks that, or just always shows the minimum? I’ve only really looked at it after a charge has been completed (discharge mode), but have never seen it show anything other than SOC MIN. Anyway, we don’t publish SOC LIM.

Fundamentally, SOC MIN/MAX is supposed to give us an indication of the imbalance in the pack. That will limit how high the pack can be charged, and how low it can be discharged.

The overall goal here is to come up with a standard framework into which all cars can fit (and we can display in the Apps in a standard way). Individual car modules can also produced extra information they have available, but that doesn’t have to apply to all car types.

I suggest we start from the premise that the car is measuring voltage to determine SOC (a simplification, I know, but let’s go with it). So in a simplified ideal car with 100 cells in series making up the pack, and a voltage range 300v (empty) to 400v (full), that would result in 0% to 100% SOC. 350v would be 50% SOC. Let’s assume those cells are grouped into bricks of 10 cells (again in series) and we can measure those, so we’d end up with brick voltages of 30v to 40v. We can then determine 10 brick SOCs (30v or less is 0% brick SOC, 40v is 100% brick SOC, and 35v is 50% brick SOC). We can then determine brick SOC MIN and MAX, as well as LIM (depending on charging/discharging). So, I think the technical definitions are:

v.b.soc is the overall state of charge of the entire battery pack. It should show 0% for an empty, and 100% for a full pack.

A sub-module soc is the state of charge of an individual sub-module in the pack. It should show 0% for an empty, and 100% for a full sub-module.
v.b.m.soc.min is the sub-module soc of the sub-module with the lowest soc. This is the limiting factor for discharging. The SOC displayed to the user is based on this.
v.b.m.soc.max is the sub-module soc of the sub-module with the highest soc. This is the limiting factor for charging.

v.b.soh is an overall indicator for the health of the entire battery pack. It should show 100% for a new pack, and 0% for a completely dead and unusable pack. It should give some idea of the health, lifetime used, and degradation of the pack.

Does that work?</pre>
    </blockquote>
    <br class="">
    If I got it right v.b.soc
    is also always the SOC that is shown to the user by the car. That
    may be a logical value, not the real physical SOC.<br class="">
    <br class="">
    The cell level values need not be compatible with the user SOC, they
    may be internal / physical values.<br class="">
    <br class="">
    So I really don't think we should call them "soc", as that will
    confuse users even if they are SOCs, and can be completely
    misleading on a car that derives these values from voltages or
    something else.<br class="">
    <br class="">
    A better scheme would be to supply these as general / abstract
    "levels", i.e.<br class="">
    <br class="">
    <tt class="">v.b.c.level.min</tt><tt class=""><br class="">
    </tt><tt class="">v.b.c.level.max</tt><br class="">
    <br class="">
    So this can be either an SOC or an SOH or a normalized voltage or
    resistance level, whatever is appropriate and available for a
    vehicle. It just needs to be in the range 0-100%, so min and max can
    be put in relation. And we also should add…<br class="">
    <br class="">
    <tt class=""><tt class="">v.b.c.level.avg</tt><br class="">
      v.b.c.level.stddev</tt><br class="">
    <br class="">
    I think that would work better than "soc". Comments?<br class="">
    <br class="">
    Regards,<br class="">
    Michael<br class="">
    <br class="">
    <br class="">
    <blockquote type="cite" cite="mid:7D6D38A4-0186-4BA5-B9E4-8AA5D64694B7@webb-johnson.net" class="">
      <pre wrap="" class="">
Regards, Mark.

</pre>
    </blockquote>
    <blockquote type="cite" cite="mid:7D6D38A4-0186-4BA5-B9E4-8AA5D64694B7@webb-johnson.net" class="">
      <blockquote type="cite" class="">
        <pre wrap="" class="">On 25 May 2018, at 12:59 AM, Michael Balzer <a class="moz-txt-link-rfc2396E" href="mailto:dexter@expeedo.de"><dexter@expeedo.de></a> wrote:

Mark,

two questions…


a) Can we agree on a slightly different naming scheme?

I suggest adding an indicator for the cell level semantics to the "soc.min" and "soc.max" names, e.g.

v.b.cell.soc.min
v.b.cell.soc.max

…or abbreviated…

v.b.c.soc.min
v.b.c.soc.max

That way we can add further cell related metrics (e.g. ".cnt", ".soc.stddev") in a consistent name space.


b) What is the technical definition of the "soc.min" metric?

Normally I would expect "soc.min" to be identical to the overall pack SOC -- the Roadster certainly doesn't allow cells to be discharged below 0% SOC?

What are typical values for "min" and "max" in reference to the overall SOC and voltage?

I mean, if that's really a normalized cell voltage level, we shouldn't name it "soc".


Regards,
Michael


Am 24.05.2018 um 04:20 schrieb Mark Webb-Johnson:
</pre>
        <blockquote type="cite" class="">
          <pre wrap="" class="">Michael,

Thanks for the explanation. That makes good sense.

Given that at least three vehicles support SOC MIN and MAX, I’ve gone ahead and made standard metrics for those. I haven’t modified all the vehicle modules to store them, but think that can be done for at least Roadster, Kia Soul and Twizy (and maybe Nissan Leaf). Can the maintainers of those modules set appropriately? Should be very simple.

I’ve also created a generic textual v.b.health metric that can be used to record a textual indication of vehicle health (perhaps the calculations behind v.b.soh). Very vehicle specific.

I’ve then modified the Tesla Roadster module to store v.b.soc.min and v.b.soc.max, and to calculate v.b.soh (based on %cac remaining x %soc inbalance). Maybe tune it later, but I think it should give a pretty good rough indication of health. That is all in an edge release ready to go out tonight.

Regards, Mark.

</pre>
          <blockquote type="cite" class="">
            <pre wrap="" class="">On 24 May 2018, at 12:12 AM, Michael Balzer <<a class="moz-txt-link-abbreviated" href="mailto:dexter@expeedo.de">dexter@expeedo.de</a> <a class="moz-txt-link-rfc2396E" href="mailto:dexter@expeedo.de"><mailto:dexter@expeedo.de></a>> wrote:

Mark,

I introduced this originally, it's meant to be (1), the overall indication of battery health.

As the wikipedia article says, there is no general industry definition on how to calculate this.

On the Twizy, the SOH is given by the BMS, while the CAC is calculated by the OVMS by monitoring the charge process and counting coulombs. The BMS SOH is the (normally invisible) limit for the usable capacity, as the Twizy always shows a range of 0-100% SOC regardless of the SOH. It's also the base for any warranty replacement of the battery (if it's rented you'll get a new one when SOH is below 75%).

The BMS is proprietary and without any available documentation, it's a complete mystery how it calculates the SOH.

While the capacity would normally be the major factor in a SOH, the Twizy BMS (LG Chem) has actually other ideas on this. For example it's been at 100% for the first three years, then at 99% for another two years, while my CAC value showed the actual degradation (long term linear with cycles). It's then begun to drop rapidly over a short period of time and is now close to my CAC level. My cells are still pretty good balanced under load as well as open circuit, the balance also degraded more or less linearly. There are also no obvious temperature indications that could explain the SOH curve.


Generally I recommend to use this for the value the car provides, if any.

If the car doesn't provide an SOH, any calculation that fits…

</pre>
            <blockquote type="cite" class="">
              <pre wrap="" class="">An overall indication of battery health? 100% being perfect, and 0% a brick?
</pre>
            </blockquote>
            <pre wrap="" class="">…will do.


</pre>
            <blockquote type="cite" class="">
              <pre wrap="" class="">Kia Soul seems to be closest to the implementation I was thinking of. Find out the difference between SOC LIM MIN and LIM MAX, and use that as an indication of imbalance in the pack. But Nissan Leaf seems to be more like (CAC/160)*100 (where 160 is the CAC for a brand new vehicle).

Or should we just add SOC_MIN and SOC_MAX if these are used in many cars? Or an imbalance percentage?

Or should we combine the both (so CAC/160*100 gives us percentage capacity loss, and SOCMAX-SOCMIN/SOCMAX*100 gives us imbalance of the pack, then we perhaps multiply the two together to give an overall indication of health)?
</pre>
            </blockquote>
            <pre wrap="" class="">If breaking down SOC into the peak min and max cell values I suggest also adding the average and peak standard deviation, plus either the average cell SOC or the number of cells to derive that.

Interior resistance of cells would be another option for standard metrics of cell health, but seems to be rarely available (and needs a reference).

I've got the cell module voltages and temperatures on the Twizy. I record their peak values and deviations under load and calculate the standard deviation. This monitoring shows only a minor difference against the values I recorded five years ago. I'm pretty sure if I also had the internal resistance, that would give a much clearer image.

Regards,
Michael


Am 23.05.2018 um 16:42 schrieb Mark Webb-Johnson:
</pre>
            <blockquote type="cite" class="">
              <pre wrap="" class="">What is MS_V_BAT_SOH used for?

For Tesla Roadster, as well as SOC, we have SOC LIM MIN and SOC LIM MAX. I want to make those available.

Kia Soul seems to use:

StdMetrics.ms_v_bat_soh->SetValue( 110 - ( m_b_cell_det_max->AsFloat(0) + m_b_cell_det_min->AsFloat(0)) / 2 );

Nissan Leaf uses:

StandardMetrics.ms_v_bat_soh->SetValue(ah / newCarAh * 100);

Twizy uses:

CAN_BYTE(5) on ID 0x424

Which is it?

An overall indication of battery health? 100% being perfect, and 0% a brick?
Or battery capacity (100% being a new car, and 50% being one who’s range is only half that of a new car)?

The definition here seems to lean towards #2 (capacity related), but seems arguable:

<a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/State_of_health">https://en.wikipedia.org/wiki/State_of_health</a> <a class="moz-txt-link-rfc2396E" href="https://en.wikipedia.org/wiki/State_of_health"><https://en.wikipedia.org/wiki/State_of_health></a>

State of health (SoH) is a figure of merit of the condition of a battery (or a cell, or a battery pack), compared to its ideal conditions. The units of SoH are percent points (100% = the battery's conditions match the battery's specifications).

Typically, a battery's SoH will be 100% at the time of manufacture and will decrease over time and use. However, a battery's performance at the time of manufacture may not meet its specifications, in which case its initial SoH will be less than 100%.

As SoH does not correspond to a particular physical quality, there is no consensus in the industry on how SoH should be determined. The designer of a battery management system may use any of the following parameters (singly or in combination) to derive an arbitrary value for the SoH.

Internal resistance / impedance / conductance
Capacity
Voltage[2]
Self-discharge
Ability to accept a charge
Number of charge–discharge cycles

In addition, the designer of the battery management system defines an arbitrary weight for each of the parameter's contribution to the SoH value. The definition of how SoH is evaluated can be a trade secret.

Kia Soul seems to be closest to the implementation I was thinking of. Find out the difference between SOC LIM MIN and LIM MAX, and use that as an indication of imbalance in the pack. But Nissan Leaf seems to be more like (CAC/160)*100 (where 160 is the CAC for a brand new vehicle).

Or should we just add SOC_MIN and SOC_MAX if these are used in many cars? Or an imbalance percentage?

Or should we combine the both (so CAC/160*100 gives us percentage capacity loss, and SOCMAX-SOCMIN/SOCMAX*100 gives us imbalance of the pack, then we perhaps multiply the two together to give an overall indication of health)?

Thoughts?

Regards, Mark



_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a> <a class="moz-txt-link-rfc2396E" href="mailto:OvmsDev@lists.openvehicles.com"><mailto:OvmsDev@lists.openvehicles.com></a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <a class="moz-txt-link-rfc2396E" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"><http://lists.openvehicles.com/mailman/listinfo/ovmsdev></a>
</pre>
            </blockquote>
            <pre wrap="" class="">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a> <a class="moz-txt-link-rfc2396E" href="mailto:OvmsDev@lists.openvehicles.com"><mailto:OvmsDev@lists.openvehicles.com></a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <a class="moz-txt-link-rfc2396E" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"><http://lists.openvehicles.com/mailman/listinfo/ovmsdev></a>
</pre>
          </blockquote>
          <pre wrap="" class="">

_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a> <a class="moz-txt-link-rfc2396E" href="mailto:OvmsDev@lists.openvehicles.com"><mailto:OvmsDev@lists.openvehicles.com></a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a> <a class="moz-txt-link-rfc2396E" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev"><http://lists.openvehicles.com/mailman/listinfo/ovmsdev></a>
</pre>
        </blockquote>
        <pre wrap="" class="">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
      </blockquote>
      <pre wrap="" class="">
</pre>
      <!--'"--><br class="">
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br class="">
      <pre wrap="" class="">_______________________________________________
OvmsDev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="moz-txt-link-freetext" href="http://lists.openvehicles.com/mailman/listinfo/ovmsdev">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
    </blockquote>
    <br class="">
    <pre class="moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
  </div>

_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.openvehicles.com" class="">OvmsDev@lists.openvehicles.com</a><br class="">http://lists.openvehicles.com/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></div></body></html>