question

milu avatar image
milu asked

Algorithm of BMV-712 SOC calculation?

Hello community,

I have BMV-712+shunt connected to 2x24V LIFEPO4 batteries in series (48V) system, capacity 200Ah. System cabling is verified and OK. My re-charger specs are: max 58.4V, ("48V"), 230V AC, 10A.

Both batteries are 200Ah and both have BMS computer built-in. Both batteries have a small LCD display in them that can display the SOC percentage, voltage and temperature of the battery.

This is a new system and I have had only a few days to play with this.

Questions:

1. Does the BMV-712 perform SOC calculation solely based on the battery voltage? If not, why not?

2. Does the BMV-712 only use current (amps in/out) when it calculates the SOC? If yes, then why?

3. Is the SOC calculation a hybrid model (based selectively on voltage and current) ?

The problem with method 2 is that the battery BMS eats current all the time (unless if the battery is completely shutdown from the battery power switch). Normally the BMS is "ON" and it eats amps but Victron BMV is blind to this consumption because it happens inside the battery (=this battery consumption DOES NOT flow thru the + and - minus cables of the battery).

Thus, if the BMV SOC calculation is solely based on current (A, in/out) them the SOC can not be correctly calculated: battery is slowly consumed by BMS but SOC will remain 100% all the time because BMV can not see any current. This is (IMHO) clearly the wrong way to do this.

I suspect that the method 1 is not used. In order for this to be useful the user should be able to type in the battery MAX voltage (=100%) and battery MIN voltage (=0%). Because the BMV DOES KNOW what the voltage is, at any given moment, it would be easy to use voltage as a basis for SOC calculation. However, the VictronConnect app does not have any battery "MIN Voltage" and "MAX voltage" fields that could be inputted into the app, thus, I suspect that method 1 is not in use.

The method 3 would be the best (imho) way to calculate the SOC.

I would be very happy to get some feedback to this matter from somebody who works in the software team at Victron Energy and who could give me an exact answer: how does the SOC algoritm exactly work and what the algorithm takes as input. If only "current" then I think it is simply the wrong way.

Comments, anybody?


Thanks!

Cheers,

-M


BMV Battery MonitorSOC
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
Alexandra avatar image
Alexandra answered ·

They coloumb count...

But on your specific questions...

1. No, it does not as voltage is not accurate as an SOC indicator. Voltage drops under load.

2. Uses amps the rating of a batteries AH - amps drawn over hours.... can shrink if drawn faster than the battery C rating. Or be larger based on drawing lower than the c rating of the battery.

3. Hybrid with adjustments made with the Peukerts exponent.


Charging also is affected with rate of charge and efficiency. So also factors on the calculation.

Then to trigger 100% incase you have your settings all wrong (within reason), there is tail current and target voltage. Plus the discharge floor so you know how long you have to go to a set use of the battery capacity.

It is all explained in the manuals.

To clarify, no I am not on the software team. Also why would they tell you all their secrets ;)?

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

milu avatar image milu commented ·

Thanks for your answer !

I was suspecting this, that "it does not use voltage because voltage drops under load" and it would thus give "wrong SOC value". Yes, the voltage drop under load is a known fact.

However, at the moment it ALSO gives wrong SOC values because it can not know how much the BMS eats away the battery.

Thus the SOC (when there is no external load) remains 100% when in reality the battery eventually goes 95... 93... 91... 86 % etc.

The battery BMS display shows the actual reality and the VictronConnect app shows the fantasy based on the "non-existent" current.

The SOC calculation is simply wrong at the moment for the reason that the person who needs to know the state of charge can not, at the moment, know what it is. The BMS steals amps and BMV is not aware of those = SOC is eventually wrong.

The best methods to calculate SOC would be the hybrid model ("3").

In this model, the app should first check the amount of current, if the current is BELOW a given value (that the user has entered in the app settings), then the SOC is calculated solely based using the voltage of the system. This calculation is based on battery MIN and MAX voltages entered by user (=this is the no load scenario).

If there IS load on the system (=that is, current is ABOVE the value given by user) then the SOC calculation is based on the current drawn from the battery.

If we want to be more precise with the SOC calculation under load, we can also add the current that the BMS is using (provided by battery manufacturer) that the user can enter in the app settings.

I believe that the hybrid model would be the best model to calculate SOC, both during the "no load" and also "during load".

This method ("3") would also liberate us from the unnecessary functions of "Sync SOC to 100%" or "enter current SOC value.".

I fail to see why the user should have any need to enter the SOC under any circumstances.

After all, isn't the whole purpose of the BMV system to tell the human what the state of the system is, not that the human needs to tell the system how it is going?


Cheers,

-M


PS. I have read the manuals.

PS2. Looks like this site throws people out too quickly. Original response was lost due to something expiring somewhere. I had to sign in again...

0 Likes 0 ·
kevgermany avatar image
kevgermany answered ·
@Milu

Be aware that:

Battery voltage drops under load and recovers once the load is taken off.

The BMV has to cater for the wide range of batteries on the market.

A decent BMS will account for internal losses, but this is only good for lithium batteries and the cheap consumer BMS that may be used may not cater for its own consumption

The BMV cannot measure any battery self discharge.

The BMV cannot measure battery capacity loss due to age/wear/poor maintenance

Battery SOC is not an exact science. It's a best effort.

The BMV will resynchronise every time it registers a full battery. This stops drift and effectively covers your concerns. I.e. good enough for purpose. But still cannot adjust for capacity loss.



3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

milu avatar image milu commented ·

Hi !

BMV app itself does not have to know all the batteries in the market.


It is enough that the user types in the battery parameters. These would be the following:

- max battery voltage (=that would be the 100% state)

- min battery voltage (=that would be 0% state)

- how much current does the BMS take (A)

- type of battery (for predefined sensible settings that all can be overwritten by user in the app, if needed)

- user could also additionally choose himself that what method (algorithm) he prefers to use for SOC calculation (1, 2 or 3)


In brief, one of the most important things that any battery monitor software should provide to the user is the state of charge. That is the information that is most often needed and used for multitude of purposes.

I am pretty sure, confident even, that the software engineers in Victron Energy can implement much much better SOC algorithm than what they currently have.

They are free to use the ideas provided above, if they so choose to do. I hope it helps.


See also the comment I wrote (above) to @Alexandra


Cheers,

-M


0 Likes 0 ·
kevgermany avatar image kevgermany ♦♦ milu commented ·
Sorry, but no. Victron decided on this method because of the need to supply a universal product at reasonable cost and accuracy. As stated many times in many threads and in reference sources, voltage is not an accurate indicator of state of charge unless specific chemistry is known and the battery has no load and has been resting until fully recovered.

It's simply the way batteries work.

We see posts here complaining about differences between the Victron values and BMS values. This is because the cheap BMSs used in some batteries work on voltage, not current measurements.


1 Like 1 ·
milu avatar image milu kevgermany ♦♦ commented ·
I think you completely fail to see the whole point.


Currently Victron BMV simply does not know what the SOC is, because it is only watching amps thru the shunt. as a basis for SOC calculation.


In its current form of implementation the SOC provided by BMV/VictronConnect is useless. It simply can not be correct, and during time, it will drift further and further away from the actual state of the battery and therefore all kinds of foolish "SYNC to 100%" workaround buttons are provided for the user.


Everything and anything (like BMS inside the battery), that is eating the battery, is simply ignored in the current SOC calculation model, because it does not look voltage at all.

Now, how could SOC be correct ?

If you ignore voltage completely (and in all situations) when SOC is calculated you get nonsensical SOC.

Yes, it is that simple.

The proposed "Method-3" is the only rational way to calculate SOC.

If Victron would open source the VictronConnect QT-application the open source ecosystem could fix this idiocy properly.


And once again, something to keep in mind: people buy these products so that the system will inform the human, what the state of the battery is. People don't buy these products so that the human has to inform the system manually what the state of the battery is.

The VictronConnect fails here with its SOC implementation. Luckily, the fix is trivial and simple.

Implementing correct SOC calculation in VictronConnect takes (roughly) less than a day+testing on top.


I don't see that as a big investment for a product line, that eventually becomes useful.
0 Likes 0 ·
Guy Stewart (Victron Community Manager) avatar image
Guy Stewart (Victron Community Manager) answered ·

Hi @Milu,

I appreciate the enthusiasm.


To set everyones expectations;

I agree with everything else that has already been said by Alexandra and Kev here.

The SOC will always be wrong in some regard. It's a pretty complex chemical reaction that is occuring, and is subject to complex matrix of variables, some you have identified, but there are also others such as temperature, cell imbalance, and more.

Accepting that perfection is out of reach, Victron has gone for the most efficient route we could for an SOC that serves the most people, with the least complexity.

I think it's one of the best value battery monitors on the market, and any additional accuracy usually comes from a dedicated BMS that is paired and calibrated with a specific battery by the manufacturer.


# Accounting for Phantom loads

Phantom loads that come off the battery without being counted by the BMV can be a issue.

A BMS is one example of these, but batteries will also naturally self discharge over time as well, some chemistries quite a lot.

There is a work around that you can do to account for this using the the zero current calibration feature.

We normally recommend doing this to find the zero point of the shunt by fully isolating everything, but it can be used as you want it.

You will need to know the power consumption of the phantom load.

When the meter is reading a charge equal to the known self discharge phantom load from your BMS (e.g 5 watts), run the zero point calibration.

When you remove the supply, the zero current flow state will now be detected as a permanant 5 w load, accounting for the permanant phantom load.


# Setting SOC to 100% on high battery voltage

In a normally functioning system the battery State of Charge should be fully recharged every sunny day, at a minimum every 5 days, and that will automically reset the SOC to 100%

That shouldn't be enough time for a BMS to consume enough energy to make a difference to the usable accuracy of the reading. It won't be perfect, but it should be good enough.

If the battery is not getting fully charged, then that is a bigger issue than a drift of the SOC reading. Additional solar or battery charger time needs to be added.

If the battery is getting fully charged but the SOC is not automatically resetting to 100%, then adjustments need to be made to the "Charged Voltage" and "Tail current" settings until it does.

It should not be necessary to manually set the SOC to 100%, it is designed to occur automatically when those two settings are correct.


# Setting SOC to 0% on low battery voltage

There is a 'low voltage alarm' setting VictronConnect, and I would suggest that is a good way to get attention if the system isn't performing properly.

A low battery voltage does not always indicate a low state of charge.

There can be many other reasons for it, and using it as a gauge of the state of charge would be misleading for someone trying to troubleshoot why their battery voltage is low, thinking that the battery is flat, when actually a load might be too large, or there might be bad electrical connection, both are equally possible with a fully charged battery.

In those cases, the BMV is a very useful diagnostic tool.


3 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

milu avatar image milu commented ·

Thanks for the comment.

The way how SOC is calculated at the moment in Victron products can be improved.

As a trivial example, just take a few minutes to study how the Kalman Filter (based on NN modeling) works:

https://se.mathworks.com/videos/how-to-estimate-battery-state-of-charge-using-deep-learning-part-1-an-introduction-to-battery-state-of-charge-estimation-1622098521470.html

There are also other methods to improve SOC calculation in a battery based system.

The way how Victron products calculate SOC is not very suitable (nor smart) for our modern world. There is plenty of room to improve the SOC calculation in the products (and with minimal cost).

Anyways, I will leave this subject now. I am in the process of implementing a much improved SOC algorithm primarily based on the "hybrid model". The Kalman Filter "gets pretty close" estimating the SOC, but it can still be further improved and quite easily too. Perhaps time to write some patents...

-M

0 Likes 0 ·
Nev avatar image Nev milu commented ·

Please report back when you have perfected your SOC algorithms.

In the meantime I will continue to use our two series installed battery monitors for SOC monitoring of our 2P4S 600Ah battery pack in the RV. No internal BMS circuitry involved.

500A Victron SmarShunt and 400A Junctek.

Similar shunt based monitors have kept us well informed for nine years of full-time travel and counting.

Could you please inform us all which monitor display in this mornings photo from our setup below is inaccurate and why.

battery-monitors.jpg


1 Like 1 ·
battery-monitors.jpg (336.0 KiB)
Show more comments

Related Resources

Victron BMV battery monitors product page

Additional resources still need to be added for this topic