Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
522 stars 164 forks source link

Battery gets charged above 55.2V #859

Closed codeworkx closed 9 months ago

codeworkx commented 10 months ago

Describe the bug

We use a dynamic electricity tariff and control the charging and discharging of our battery via a node red flow. If the battery is to be charged to 100%, we set the minimum SoC to 100%. The charging process would now stop at 100%, even if the battery voltage has not reached 55.2V. To counter this problem, we set the mains setpoint to 32767W, which results in the battery becoming full.

Now it has already happened twice that the battery voltage of 55.2V has been exceeded. It looks like the regulation is slowly building up. The first time, the BMS disconnected due to overvoltage. The second time we were able to intervene manually at just under 56V and stopped the process. Important note: As the battery had not been full for some time, there was a large imbalance of 0.09V between the lowest and highest cell. We are not sure whether this could have had an influence. Maybe it's a VenusOS bug.

We are currently using the ESS mode "Keep batteries charged" to achieve our goal. So far, we have not encountered any problems with this. battery

How to reproduce

Set min SoC to 100% and grid setpoint to 32767W.

Expected behavior

The charging process should not exceed a battery voltage of 55.2V.

Driver version

v1.0.20230531

Venus OS device type

Raspberry Pi

Venus OS version

v3.11

BMS type

JKBMS / Heltec BMS

Cell count

16

Connection type

Serial USB adapter to TTL

Config file

[DEFAULT]

; --------- Battery Current limits ---------
MAX_BATTERY_CHARGE_CURRENT    = 100.0
MAX_BATTERY_DISCHARGE_CURRENT = 125.0

; -- CVL reset based on cell voltage diff (linear mode)
; Specify cell voltage diff where CVL limit is kept until diff is equal or lower
CELL_VOLTAGE_DIFF_KEEP_MAX_VOLTAGE_UNTIL = 0.005

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
CELL_VOLTAGES_WHILE_CHARGING   = 3.55, 3.50, 3.47, 3.45, 3.40, 3.30
MAX_CHARGE_CURRENT_CV_FRACTION =    0, 0.02, 0.05,  0.3,  0.5,    1

; Set steps to reduce battery current
; The current will be changed linear between those steps if LINEAR_LIMITATION_ENABLE is set to True
TEMPERATURE_LIMITS_WHILE_CHARGING = 0,   2,   5,  10,  12, 14, 35,  40, 55
MAX_CHARGE_CURRENT_T_FRACTION     = 0, 0.1, 0.2, 0.4, 0.8,  1,  1, 0.4,  0

TEMPERATURE_LIMITS_WHILE_DISCHARGING = -20,   0,   5,  10, 12, 40,  45, 55
MAX_DISCHARGE_CURRENT_T_FRACTION     =   0, 0.2, 0.3, 0.4,  1,  1, 0.5,  0

; Charge current limits
CC_CURRENT_LIMIT1_FRACTION = 0.2
CC_CURRENT_LIMIT2_FRACTION = 0.4
CC_CURRENT_LIMIT3_FRACTION = 0.6

; Discharge current limits
DC_CURRENT_LIMIT1_FRACTION = 0.2
DC_CURRENT_LIMIT2_FRACTION = 0.3
DC_CURRENT_LIMIT3_FRACTION = 0.5

; --------- Additional settings ---------
; Specify only one BMS type to load else leave empty to try to load all available
; -- Available BMS:
; Daly, Ecs, HeltecModbus, HLPdataBMS4S, Jkbms, Lifepower, LltJbd, Renogy, Seplos
; -- Available BMS, but disabled by default:
; https://louisvdw.github.io/dbus-serialbattery/general/install#how-to-enable-a-disabled-bms
; Ant, MNB, Sinowealth
BMS_TYPE = Jkbms

; Battery capacity (amps), if the BMS does not support reading it
BATTERY_CAPACITY = 125

Relevant log output

See Picture

Any other information that may be helpful

No response

mr-manuel commented 10 months ago

The charging process would now stop at 100%, even if the battery voltage has not reached 55.2V.

Why should the charging stop, if the battery has not reached CVL? What is your CVL in this case and what is the voltage drop between charger and battery?

Now it has already happened twice that the battery voltage of 55.2V has been exceeded. It looks like the regulation is slowly building up.

Probably because of linear charging mode and the cell imbalance. You set CELL_VOLTAGES_WHILE_CHARGING to 3.55 V. Try to change it to 3.46 V. A cell difference of 5 % of the nominal cell voltage is not a big problem.

Please post also your CVL, CCL and DCL graph from the same moment.

Are you aware of Dynamic ESS?

codeworkx commented 10 months ago

If you set the minimum soc in the ess menu to 100 %, it will be charged exactly to 100%, even if CVL has not been reached. This happens when the battery has not been fully charged for a long time and the SOC display is therefore inaccurate.

CVL is 55.2V.

MAX_CELL_VOLTAGE = 3.450 16 Cells.

Does this mean that CVL will exceed the desired charging voltage of 55.2 V due to the linear limitation? I assumed this was just limiting the charging current? That would be quite dangerous if the cells are heavily unbalanced for some reason.

Dynamic ESS is known. But we're not happy with it in its current state. Guess there are some bugs left.

mr-manuel commented 10 months ago

Does this mean that CVL will exceed the desired charging voltage of 55.2 V due to the linear limitation? I assumed this was just limiting the charging current?

It should not. Please post the requested screenshots to verify that.

Dynamic ESS is known. But we're not happy with it in its current state. Guess there are some bugs left.

They just released some bug fixes yesterday.

codeworkx commented 10 months ago

IMG_20231119_120056 IMG_20231119_120122 IMG_20231119_120153

Seems to always happen in "Absorption dynamic" when SoC is inaccurate.

I've disconnected the JK from battery to make the SoC inaccurate. Screenshots are from the first charge cycle after JK reset.

Voltage difference between Multi and Jk is mostly around 0,12V. I've already connected the V-Sense cable from Multi to battery cells.

We're able to reproduce this on two different installations. Multi 3000 and Multi 5000.

mr-manuel commented 10 months ago

Please post also your CVL, CCL and DCL graph from the same moment.

This was requested in https://github.com/Louisvdw/dbus-serialbattery/issues/859#issuecomment-1806452721. You can enable it in the VRM Portal under Advanced -> Settings (top right) -> Battery Monitor -> BMS Charge and Discharge Limits.

It looks like this:

grafik

codeworkx commented 9 months ago

limits min_max jk vebus

Would it hurt to set CCL to 0 if battery pack voltage goes above CVL ?

codeworkx commented 9 months ago

jk_limit jk_min_max jk_soc jk_v_c

Happened again today.

Seems to start doing weird stuff when the battery pack is full (55.2V) and the SoC drops below or is already below 100%.

mr-manuel commented 9 months ago

Are you off or ongrid? I think the driver cannot do mucn in this case, since the charger is not doing what the driver needs.

codeworkx commented 9 months ago

Ongrid.

mr-manuel commented 9 months ago

Please open a question in the Victron Energy Community forum. The driver sets the voltage correctly.

mr-manuel commented 9 months ago

You could test https://github.com/Louisvdw/dbus-serialbattery/pull/882, maybe it‘s changing something for you.

pos-ei-don commented 9 months ago

Isnt it this Feature? Search for 0.4V in this link. Somwwhere with mqtt, you can change this value to a more narrow value.

https://www.victronenergy.com/media/pg/Venus_GX/en/dvcc---distributed-voltage-and-current-control.html

mr-manuel commented 9 months ago

@pos-ei-don thank you, for sharing this link. Indeed it has to be this. Therefore it's not a driver bug.

11.6. DVCC for systems with the ESS Assistant

A fixed solar offset of 0.4V (value for 48V system, divide by 4 for 12V) is applied when ESS-mode is set to Optimised in combination with the Feed-in excess solar charger power-setting enabled, or when ESS-mode is set to Keep batteries charged.