evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Draws from grid when house battery not full and 1p charge (maxGridSupplyWhileBatteryCharging)

Open toleabivol opened this issue 1 year ago • 12 comments

Describe the bug

Not totally sure if bug or my situation is really an edge case.

I have : go-e 3P charger, 1p AC charged Nissan Leaf 2018, Deye 3p Hybrid 8kW (3kW AC output per phase), 7,5kWp PV, HA When PV produces more than the inverter can output on one phase (3kW+) and the house battery is not full and the 1p car is charing then it will pull from the grid the remaining needed charging power. e.g. PV produces 7kW , then the inverter will supply 3kW to the charger and 4kW into the house battery and will draw 4kW from grid on the charging phase. I though using maxGridSupplyWhileBatteryCharging: 50 would fix the issue and make the car load with maximum possible power without drawing more than 50W from grid. But the result is that it switches back and forth from a low max current to a higher max current.

When the house battery if full, the inverter will send the excess current not in battery but to the other phase of the grid and "balance" the import on the other phase => 0 costs calculated by the grid meter.

Steps to reproduce

  1. Have house battery not full
  2. Have 1p charging AC car
  3. Have inverter that outputs less on one phase AC than there is total DC available
  4. Set evcc to charge with solar only
  5. set maxGridSupplyWhileBatteryCharging: 50
  6. Have PV that generates more than inverter can output on one phase
  7. Charge the car and watch the house grid meter
  8. The grid meter shows that on the charing phase it draws power from grid to match the current set by evcc -> KO
  9. Charge house battery till full
  10. Now watch the grid meter again - inverter will export current on one phase to balance the import on another phase which results the grid meter to stay at ~0 (no import and no export overall calculated and thus no grid costs) -> OK

Configuration details

# for home assistant
# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: info
levels:
  cache: error

# unique installation id
plant: xxx

interval: 30s # control cycle interval

mqtt:
  broker: core-mosquitto:1883
  user: xxx
  password: xxx

meters:
- type: custom
  name: grid
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/grid_power
  energy:
    source: mqtt
    topic: SUNSYNK/status/2210249218/day_grid_import
#  currents:
#    - source: mqtt
#      topic: deye/ac/l1/current
#   - source: mqtt
#      topic: deye/ac/l2/current
#    - source: mqtt
#      topic: deye/ac/l3/current

- type: custom
  name: pv1
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/pv1_power
- type: custom
  name: pv2
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/pv2_power

- type: custom
  name: battery
  soc:
    source: mqtt
    topic: SUNSYNK/status/2210249218/battery_soc
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/battery_power
  capacity: 9.6

chargers:
- type: template
  template: go-e
  host: 192.168.xx.xx
  name: go-eCharger

vehicles:
- type: template
  template: carwings
  title: Nissan Leaf 2018
  icon: car
  user: xxx
  password: xxx
  vin: xxx
  capacity: 40
  phases: 1
  cache: 60m
#  onIdentify:
#    mode: pv
#    minSoc: 20
#    targetSoc: 80
#    minCurrent: 6
#    maxCurrent: 32
  name: nissan

loadpoints:
- title: Garage
  charger: go-eCharger
  mode: pv
#  resetOnDisconnect: true
  vehicle: nissan

site:
  title: My home
  meters:
    grid: grid
    pv:
      - pv1
      - pv2
    battery:
      - battery
  residualPower: 100
  maxGridSupplyWhileBatteryCharging: 50
#  batteryDischargeControl: true

tariffs:
  currency: EUR # (default EUR)
  grid:
    # static grid price
    #type: fixed
    #price: 0.3246
    #price: 0.2367 # [currency]/kWh tibber 1ste Monat

    type: tibber
    token: xxx
    homeid: "xxx"

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.082 # [currency]/kWh
  co2:
    type: grünstromindex
    zip: xxxxx

Log details

Log when house battery not full (draws from grid)

[site ] DEBUG 2024/08/05 12:05:09 ----
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge power: 1840W
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge currents: [8.3 0.1 0.1]A
[site ] DEBUG 2024/08/05 12:05:09 pv power: 4718W
[site ] DEBUG 2024/08/05 12:05:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:09 battery power: -2095W
[site ] DEBUG 2024/08/05 12:05:09 grid meter: 6W
[site ] DEBUG 2024/08/05 12:05:09 site power: -1989W
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:05:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:05:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:05:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:05:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:05:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:05:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:05:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:05:09 pv charge current: 16.6A = 8A + 8.65A (-1989W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:05:09 max charge current: 16A
[site ] DEBUG 2024/08/05 12:05:39 ----
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge power: 3670W
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge currents: [16.4 0 0.1]A
[site ] DEBUG 2024/08/05 12:05:39 pv power: 4785W
[site ] DEBUG 2024/08/05 12:05:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:39 battery power: -892W
[site ] DEBUG 2024/08/05 12:05:39 grid meter: 773W
[site ] DEBUG 2024/08/05 12:05:39 site power: 873W
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:05:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:05:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:05:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:05:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:05:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:05:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:05:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:05:39 pv charge current: 12.2A = 16A + -3.8A (873W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:05:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:06:09 ----
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge power: 2690W
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge currents: [11.9 0 0]A
[site ] DEBUG 2024/08/05 12:06:09 pv power: 4728W
[site ] DEBUG 2024/08/05 12:06:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:06:09 battery power: -1022W
[site ] DEBUG 2024/08/05 12:06:09 grid meter: 17W
[site ] DEBUG 2024/08/05 12:06:09 site power: -905W
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge voltages: [220 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:06:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:06:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:06:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:06:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:06:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:06:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:06:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:06:09 pv charge current: 15.9A = 12A + 3.93A (-905W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:06:09 max charge current: 15A
[site ] DEBUG 2024/08/05 12:06:39 ----
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge power: 3390W
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge currents: [15.1 0.1 0]A
[site ] DEBUG 2024/08/05 12:06:39 pv power: 4940W
[site ] DEBUG 2024/08/05 12:06:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:06:39 battery power: -1096W
[site ] DEBUG 2024/08/05 12:06:39 grid meter: 586W
[site ] DEBUG 2024/08/05 12:06:39 site power: 686W
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge voltages: [219 220 221]V
[lp-1 ] DEBUG 2024/08/05 12:06:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:06:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:06:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:06:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:06:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:06:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:06:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:06:39 pv charge current: 12A = 15A + -2.98A (686W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:06:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:07:09 ----
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge power: 2710W
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge currents: [12.1 0.1 0]A
[site ] DEBUG 2024/08/05 12:07:09 pv power: 5149W
[site ] DEBUG 2024/08/05 12:07:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:07:09 battery power: -1425W
[site ] DEBUG 2024/08/05 12:07:09 grid meter: 13W
[site ] DEBUG 2024/08/05 12:07:09 site power: -1312W
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:07:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:07:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:07:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:07:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:07:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:07:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:07:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:07:09 pv charge current: 17.7A = 12A + 5.7A (-1312W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:07:09 max charge current: 17A
[site ] DEBUG 2024/08/05 12:07:39 ----
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge power: 3830W
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge currents: [17.2 0 0]A
[site ] DEBUG 2024/08/05 12:07:39 pv power: 5143W
[site ] DEBUG 2024/08/05 12:07:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:07:39 battery power: -1255W
[site ] DEBUG 2024/08/05 12:07:39 grid meter: 993W
[site ] DEBUG 2024/08/05 12:07:39 site power: 1093W
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge voltages: [219 221 221]V
[lp-1 ] DEBUG 2024/08/05 12:07:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:07:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:07:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:07:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:07:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:07:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:07:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:07:39 pv charge current: 12.2A = 17A + -4.75A (1093W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:07:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:08:09 ----
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge power: 2690W
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge currents: [12 0 0.1]A
[site ] DEBUG 2024/08/05 12:08:09 pv power: 5149W
[site ] DEBUG 2024/08/05 12:08:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:08:09 battery power: -1457W
[site ] DEBUG 2024/08/05 12:08:09 grid meter: 9W
[site ] DEBUG 2024/08/05 12:08:09 site power: -1348W
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge voltages: [219 221 221]V
[lp-1 ] DEBUG 2024/08/05 12:08:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:08:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:08:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:08:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:08:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:08:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:08:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:08:09 pv charge current: 17.9A = 12A + 5.86A (-1348W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:08:09 max charge current: 17A
[site ] DEBUG 2024/08/05 12:08:39 ----

Log when house battery full (does not draw from grid)

[site ] DEBUG 2024/08/05 12:50:09 ----
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge power: 4220W
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge currents: [19 0 0]A
[site ] DEBUG 2024/08/05 12:50:09 pv power: 5498W
[site ] DEBUG 2024/08/05 12:50:09 battery soc: 100%
[site ] DEBUG 2024/08/05 12:50:09 battery power: 1W
[site ] DEBUG 2024/08/05 12:50:09 grid meter: -213W
[site ] DEBUG 2024/08/05 12:50:09 site power: -112W
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge voltages: [217 219 221]V
[lp-1 ] DEBUG 2024/08/05 12:50:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:50:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:50:09 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:50:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:50:09 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:50:09 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:50:09 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:50:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:50:09 pv charge current: 19.5A = 19A + 0.489A (-112W @ 1p)
[site ] DEBUG 2024/08/05 12:50:39 ----
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge power: 4220W
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge currents: [18.9 0.1 0]A
[site ] DEBUG 2024/08/05 12:50:39 pv power: 5498W
[site ] DEBUG 2024/08/05 12:50:39 battery soc: 100%
[site ] DEBUG 2024/08/05 12:50:39 battery power: 1W
[site ] DEBUG 2024/08/05 12:50:39 grid meter: -213W
[site ] DEBUG 2024/08/05 12:50:39 site power: -112W
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge voltages: [218 219 220]V
[lp-1 ] DEBUG 2024/08/05 12:50:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:50:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:50:39 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:50:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:50:39 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:50:39 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:50:39 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:50:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:50:39 pv charge current: 19.5A = 19A + 0.489A (-112W @ 1p)
[site ] DEBUG 2024/08/05 12:51:09 ----
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge power: 4260W
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge currents: [19.1 0 0]A
[site ] DEBUG 2024/08/05 12:51:09 pv power: 5428W
[site ] DEBUG 2024/08/05 12:51:09 battery soc: 100%
[site ] DEBUG 2024/08/05 12:51:09 battery power: 0W
[site ] DEBUG 2024/08/05 12:51:09 grid meter: -225W
[site ] DEBUG 2024/08/05 12:51:09 site power: -125W
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge voltages: [218 220 220]V
[lp-1 ] DEBUG 2024/08/05 12:51:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:51:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:51:09 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:51:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:51:09 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:51:09 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:51:09 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:51:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:51:09 pv charge current: 19.5A = 19A + 0.542A (-125W @ 1p)

What type of operating system are you running?

Linux

Version

1.129.0

toleabivol avatar Aug 05 '24 10:08 toleabivol

Thank you for the report.

@andig I think we have to investigate a bit deeper what exactly happens here.

premultiply avatar Aug 05 '24 11:08 premultiply

Das Problem ist das nichtlineare Verhalten. Bei Bezug wird die WB-Leistung zurück gefahren. Wird die aber zu klein- und kann die Batterie die zusätzliche Leistung nicht aufnehmen (die ist am Ladeende!)- so kommt es zu Einspeisung. Die wird dann wieder zugunsten der WB umgeshiftet.

Das eigentliche Problem hier scheint mir aber zu sein, dass die Batterie einfach nicht liefert:

[site ] DEBUG 2024/08/05 12:05:39 pv power: 4785W
[site ] DEBUG 2024/08/05 12:05:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:39 battery power: -892W
[site ] DEBUG 2024/08/05 12:05:39 grid meter: 773W
[site ] DEBUG 2024/08/05 12:05:39 site power: 873W

Warum liefert hier der Akku nicht die 870W die aus dem Netz gezogen werden???

Ich sehe da kein Problem bei evcc.

andig avatar Aug 08 '24 18:08 andig

Warum liefert hier der Akku nicht die 870W die aus dem Netz gezogen werden???

Because inverter cannot output more on that one phase that is used and draws from grid and the rest of PV generation goes to battery even if battery.

PV produces more than the inverter can output on one phase (3kW+) and the house battery is not full and the 1p car is charing then it will pull from the grid the remaining needed charging power.

Deye 3p Hybrid 8kW (3kW AC output per phase)

When PV produces more than the inverter can output on one phase (3kW+) and the house battery is not full and the 1p car is charing then it will pull from the grid the remaining needed charging power.

And this sounds exactly what maxGridSupplyWhileBatteryCharging should do as it also answer your question :

Normally, the current battery charging power is considered as additional available vehicle charging power (once prioritySoc is reached). In the above example, grid consumption could occur equal to the current battery charging power since the inverter cannot provide this power to the grid (and thus the vehicle). The fully utilized AC path of the hybrid inverter creates an unexpected bottleneck for the standard regulation.

the DC power generated in combination with a directly connected storage system can be greater than the AC output power of the inverter. This can result in grid consumption during vehicle charging, even when the battery is being charged simultaneously.

In this case evcc should do (and from docs it's exactly what it's already thought to do as I read it) :

  • if battery not full : detect grid import and allow only the threshold specified in maxGridSupplyWhileBatteryCharging
  • if battery full : ignore setting of maxGridSupplyWhileBatteryCharging

From my logs you can see it is detecting grid import, lowers the current BUT then it switches back. And then it switches back and forth.

it switches back and forth from a low max current to a higher max current.

And this back and forth switch makes me believe it's a bug

toleabivol avatar Aug 09 '24 07:08 toleabivol

Because inverter cannot output more on that one phase that is used and draws from grid and the rest of PV generation goes to battery even if battery.

Maybe I misunderstand. But we've said the inverter has 3kW per phase. Where is that power?

andig avatar Aug 09 '24 08:08 andig

Most of it goes into the car charger and some goes to appliances in the house that are on the same phase. From the part of the log you quoted, PV outputs 4785 Charger sends to car 3670W Drawn from grid 773 (this is ~what inverter cannot output on the phase so it draws from grid, and what we want to keep at ~0) Charging house battery 892W (This is what's left from PV output - max phase output - other house appliances on other phases)

[lp-1 ] DEBUG 2024/08/05 12:05:09 max charge current: 16A
[site ] DEBUG 2024/08/05 12:05:39 ----
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge power: **3670W**  <---Here is most of the output power of AC + grid import
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge currents: [16.4 0 0.1]A
[site ] DEBUG 2024/08/05 12:05:39 pv power: 4785W
[site ] DEBUG 2024/08/05 12:05:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:39 battery power: -892W
[site ] DEBUG 2024/08/05 12:05:39 grid meter: 773W
[site ] DEBUG 2024/08/05 12:05:39 site power: 873W

toleabivol avatar Aug 09 '24 08:08 toleabivol

Not sure if it's the same issue, but it seems to be, because after adding this parameter it behave strange, here is one example when it went to full 32A (6.3kW) when PV has only ~4.5KW generation and battery SOC is not at 95%+ when it should support charging.

[site ] DEBUG 2024/08/09 11:51:43 ----
[lp-1 ] DEBUG 2024/08/09 11:51:43 charge power: 1320W
[lp-1 ] DEBUG 2024/08/09 11:51:43 charge currents: [5.9 0 0]A
[site ] DEBUG 2024/08/09 11:51:43 pv power: 4598W
[site ] DEBUG 2024/08/09 11:51:43 battery soc: 77%
[site ] DEBUG 2024/08/09 11:51:43 battery power: -2497W
[site ] DEBUG 2024/08/09 11:51:43 grid meter: 7W
[site ] DEBUG 2024/08/09 11:51:43 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:51:43 charge voltages: [220 221 222]V
[lp-1 ] DEBUG 2024/08/09 11:51:43 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:51:43 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:51:43 !! session: chargeRater.chargedEnergy=1.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:51:43 charge total import: 1794.000kWh
[lp-1 ] DEBUG 2024/08/09 11:51:43 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:51:43 soc estimated: 54.00% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:51:43 vehicle soc: 54%
[lp-1 ] DEBUG 2024/08/09 11:51:43 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:51:43 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:51:43 pv charge current: 16.4A = 6A + 10.4A (-2390W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:51:44 max charge current: 16A
[site ] DEBUG 2024/08/09 11:52:13 ----
[lp-1 ] DEBUG 2024/08/09 11:52:13 charge power: 3600W
[lp-1 ] DEBUG 2024/08/09 11:52:13 charge currents: [16.1 0 0.1]A
[site ] DEBUG 2024/08/09 11:52:13 pv power: 4598W
[site ] DEBUG 2024/08/09 11:52:13 battery soc: 77%
[site ] DEBUG 2024/08/09 11:52:13 battery power: -2497W
[site ] DEBUG 2024/08/09 11:52:13 grid meter: 7W
[site ] DEBUG 2024/08/09 11:52:13 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:52:13 charge voltages: [219 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:52:13 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:52:13 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:52:13 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:52:13 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:52:13 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:52:13 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:52:13 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:52:13 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:52:13 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:52:13 pv charge current: 26.4A = 16A + 10.4A (-2390W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:52:14 max charge current: 26A
[site ] DEBUG 2024/08/09 11:52:43 ----
[lp-1 ] DEBUG 2024/08/09 11:52:44 charge power: 5860W
[lp-1 ] DEBUG 2024/08/09 11:52:44 charge currents: [26.2 0.1 0]A
[site ] DEBUG 2024/08/09 11:52:44 pv power: 4598W
[site ] DEBUG 2024/08/09 11:52:44 battery soc: 77%
[site ] DEBUG 2024/08/09 11:52:44 battery power: -2497W
[site ] DEBUG 2024/08/09 11:52:44 grid meter: 7W
[site ] DEBUG 2024/08/09 11:52:44 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:52:44 charge voltages: [218 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:52:44 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:52:44 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:52:44 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:52:44 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:52:44 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:52:44 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:52:44 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:52:44 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:52:44 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:52:44 pv charge current: 36.4A = 26A + 10.4A (-2390W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:52:44 max charge current: 32A
[site ] DEBUG 2024/08/09 11:53:13 ----
[lp-1 ] DEBUG 2024/08/09 11:53:13 charge power: 6370W
[lp-1 ] DEBUG 2024/08/09 11:53:13 charge currents: [28.5 0 0]A
[site ] DEBUG 2024/08/09 11:53:13 pv power: 4598W
[site ] DEBUG 2024/08/09 11:53:13 battery soc: 77%
[site ] DEBUG 2024/08/09 11:53:13 battery power: -2497W
[site ] DEBUG 2024/08/09 11:53:13 grid meter: 7W
[site ] DEBUG 2024/08/09 11:53:13 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:53:14 charge voltages: [217 222 223]V
[lp-1 ] DEBUG 2024/08/09 11:53:14 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:53:14 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:53:14 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:53:14 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:53:14 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:53:14 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:53:14 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:53:14 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:53:14 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:53:14 pv charge current: 40.9A = 30.5A + 10.4A (-2390W @ 1p)
[site ] DEBUG 2024/08/09 11:53:43 ----
[lp-1 ] DEBUG 2024/08/09 11:53:43 charge power: 6350W
[lp-1 ] DEBUG 2024/08/09 11:53:43 charge currents: [28.4 0.1 0.1]A
[site ] DEBUG 2024/08/09 11:53:43 pv power: 4598W
[site ] DEBUG 2024/08/09 11:53:43 battery soc: 77%
[site ] DEBUG 2024/08/09 11:53:44 battery power: -2497W
[site ] DEBUG 2024/08/09 11:53:44 grid meter: 7W
[site ] DEBUG 2024/08/09 11:53:44 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:53:44 charge voltages: [217 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:53:44 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:53:44 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:53:44 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:53:44 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:53:44 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:53:44 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:53:44 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:53:44 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:53:44 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:53:44 pv charge current: 40.8A = 30.4A + 10.4A (-2390W @ 1p)
[site ] DEBUG 2024/08/09 11:54:13 ----
[lp-1 ] DEBUG 2024/08/09 11:54:13 charge power: 6350W
[lp-1 ] DEBUG 2024/08/09 11:54:13 charge currents: [28.5 0 0.1]A
[site ] DEBUG 2024/08/09 11:54:13 pv power: 4598W
[site ] DEBUG 2024/08/09 11:54:13 battery soc: 77%
[site ] DEBUG 2024/08/09 11:54:13 battery power: -2497W
[site ] DEBUG 2024/08/09 11:54:13 grid meter: 7W
[site ] DEBUG 2024/08/09 11:54:13 site power: -2390W
[lp-1 ] DEBUG 2024/08/09 11:54:13 charge voltages: [218 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:54:13 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:54:13 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:54:13 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:54:13 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:54:13 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:54:13 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:54:13 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:54:13 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:54:13 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:54:13 pv charge current: 40.9A = 30.5A + 10.4A (-2390W @ 1p)
[site ] DEBUG 2024/08/09 11:54:43 ----
[lp-1 ] DEBUG 2024/08/09 11:54:43 charge power: 6350W
[lp-1 ] DEBUG 2024/08/09 11:54:43 charge currents: [28.6 0 0]A
[site ] DEBUG 2024/08/09 11:54:43 pv power: 4672W
[site ] DEBUG 2024/08/09 11:54:43 battery soc: 77%
[site ] DEBUG 2024/08/09 11:54:43 battery power: -941W
[site ] DEBUG 2024/08/09 11:54:44 grid meter: 3653W
[site ] DEBUG 2024/08/09 11:54:44 site power: 3753W
[lp-1 ] DEBUG 2024/08/09 11:54:44 charge voltages: [217 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:54:44 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:54:44 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:54:44 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:54:44 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:54:44 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:54:44 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:54:44 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:54:44 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:54:44 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:54:44 pv charge current: 14.3A = 30.6A + -16.3A (3753W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:54:44 max charge current: 14A
[site ] DEBUG 2024/08/09 11:55:13 ----
[lp-1 ] DEBUG 2024/08/09 11:55:13 charge power: 3150W
[lp-1 ] DEBUG 2024/08/09 11:55:13 charge currents: [14 0 0]A
[site ] DEBUG 2024/08/09 11:55:13 pv power: 4650W
[site ] DEBUG 2024/08/09 11:55:13 battery soc: 78%
[site ] DEBUG 2024/08/09 11:55:13 battery power: -944W
[site ] DEBUG 2024/08/09 11:55:13 grid meter: 349W
[site ] DEBUG 2024/08/09 11:55:13 site power: 449W
[lp-1 ] DEBUG 2024/08/09 11:55:13 charge voltages: [219 222 222]V
[lp-1 ] DEBUG 2024/08/09 11:55:13 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:55:13 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:55:13 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:55:13 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:55:13 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:55:13 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:55:13 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:55:13 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:55:13 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:55:13 pv charge current: 12A = 14A + -1.95A (449W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:55:14 max charge current: 12A
[site ] DEBUG 2024/08/09 11:55:43 ----
[lp-1 ] DEBUG 2024/08/09 11:55:43 charge power: 2700W
[lp-1 ] DEBUG 2024/08/09 11:55:43 charge currents: [12 0.1 0]A
[site ] DEBUG 2024/08/09 11:55:43 pv power: 4650W
[site ] DEBUG 2024/08/09 11:55:43 battery soc: 78%
[site ] DEBUG 2024/08/09 11:55:43 battery power: -1173W
[site ] DEBUG 2024/08/09 11:55:43 grid meter: 17W
[site ] DEBUG 2024/08/09 11:55:43 site power: -1056W
[lp-1 ] DEBUG 2024/08/09 11:55:43 charge voltages: [220 221 222]V
[lp-1 ] DEBUG 2024/08/09 11:55:43 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/09 11:55:43 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/09 11:55:43 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/09 11:55:43 charge total import: 1795.000kWh
[lp-1 ] DEBUG 2024/08/09 11:55:43 charger status: C
[lp-1 ] DEBUG 2024/08/09 11:55:43 soc estimated: 56.25% (vehicle: 54.00%)
[lp-1 ] DEBUG 2024/08/09 11:55:43 vehicle soc: 56%
[lp-1 ] DEBUG 2024/08/09 11:55:43 vehicle range: 125km
[lp-1 ] DEBUG 2024/08/09 11:55:43 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/09 11:55:43 pv charge current: 16.6A = 12A + 4.59A (-1056W @ 1p)
[lp-1 ] DEBUG 2024/08/09 11:55:44 max charge current: 16A

toleabivol avatar Aug 09 '24 09:08 toleabivol

Wie erfolgt denn die Batterieladung? Benötigt die auch den (limitierenden) AC Pfad oder direkt über DC?

andig avatar Aug 09 '24 09:08 andig

House battery is connected to DC port of the inverter. In the case above it will be charged directly from PV via inverter via the DC path.

toleabivol avatar Aug 09 '24 10:08 toleabivol

// sitePower returns the available delta power that the charger might additionally consume
// negative value: available power (grid export), positive value: grid import
func sitePower(log *util.Logger, maxGrid, grid, battery, residual float64) float64 {
	// For hybrid inverters, battery can be charged from DC power in excess of
	// inverter AC rating. This battery charge must not be counted as available for AC consumption.
	// https://github.com/evcc-io/evcc/issues/2734, https://github.com/evcc-io/evcc/issues/2986
	if maxGrid > 0 && grid > maxGrid && battery < 0 {
		log.TRACE.Printf("ignoring excess DC charging due to grid consumption: %.0fW > %.0fW", grid, maxGrid)
		battery = 0
	}

	return grid + battery + residual
}

Das produziert bei Über/Unterschreitung der Schwelle einen Sprung um battery. Das ist hier das Problem.

andig avatar Aug 09 '24 11:08 andig

So it's a bug ?

toleabivol avatar Aug 16 '24 06:08 toleabivol

I am also troubled by this issue, see https://github.com/evcc-io/evcc/discussions/15329 Losing about 10 % of solar charging share because of this bug.

jmtatsch avatar Aug 24 '24 04:08 jmtatsch

Same here. I have a 32 A wallbox and a 12 kW inverter which cannot deliver (convert from PV or battery DC to AC) more than 5 kW per phase. The automated phase switching is enabled, and occasionally evcc remains at 1 phase and approaches 22 A (5 kW) instead of switching to three phase mode. The inverter reaches its limit on one phase, and the remaining power is drawn from the grid: Bildschirmfoto vom 2024-08-25 14-23-58 As a workaround I now manually limit to 16 A when charging in PV mode.

WordsOfMe avatar Aug 27 '24 19:08 WordsOfMe

Is there a timeline when the bug will be fixed?

Peter54879 avatar Sep 04 '24 17:09 Peter54879

Today I lost around 2 kwh (20%) while only slow charging (3,5kw) with a charging brick on one phase.

image

jmtatsch avatar Sep 08 '24 15:09 jmtatsch

@premultiply hast du eine Idee?

andig avatar Sep 20 '24 16:09 andig

Aus dem code:

// For hybrid inverters, battery can be charged from DC power in excess of
// inverter AC rating. This battery charge must not be counted as available for AC consumption.
// https://github.com/evcc-io/evcc/issues/2734, https://github.com/evcc-io/evcc/issues/2986

Das Limit ist doch die Inverterleistung. Wäre es eine Option, bei der Berechnung der sitePower, die PV-Leistung, die über dieses Limit hinausgeht, von der batteryPower abzuziehen, wenn prioritySoc überschritten ist? Inverterleistung wäre u.U. ein neuer Parameter, aber dafür könnte dann maxGridSupply.... weg.

VolkerK62 avatar Sep 20 '24 16:09 VolkerK62

The bug was already described several times. Here I have proposed a detailed solution: https://github.com/evcc-io/evcc/discussions/14565#discussioncomment-10059785 This is exactly what @VolkerK62 has proposed.

buennerbernd avatar Oct 07 '24 12:10 buennerbernd

@buennerbernd die Formel verstehe ich. Müsste man aber pro WR betrachten statt global, oder? Hast Du das mal lokal mit dieser Lösung ausprobiert?

andig avatar Oct 07 '24 15:10 andig

@andig Bisher habe ich mich gescheut, eine Entwicklungsumgebung aufzusetzen. Mein Vorschlag passt für einen Hybridwechselrichter mit dort angeschlossener Batterie. Ich war nicht so tief in die Materie eingetaucht um zu verstehen, was das im Code für mehrere Wechselrichter und Batterien bedeutet. Deshalb hatte ich auch einem Pull-Request geringe Chancen zugerechnet. Die korrekte Lösung müsste für jeden Hybridwechselrichter seine DC angeschlossene Batterie mit seiner max AC Power verrechnen.

Es wäre super, wenn es diese Lösung in den Code findet. EVCC funktioniert so toll, nur gerade, wenn es darum geht, den Strom oberhalb der maximalen AC Leistung des WR abzuernten, dann wird es echt holperig und man kauft die Hälfte der Zeit noch etwas Strom dazu.

buennerbernd avatar Oct 08 '24 08:10 buennerbernd

Technisch müssten wir das allerdings (leider) anders umsetzen da die Limitierung ja WR passier und nicht global. Deshalb bräuchte pro WR (und damit je meter) einen MaxACPower parameter der für alle Hybrid WR als Teil der battery Usage zu pflegen wäre.

Ich würde mir hier noch etwas mehr Feedback wünschen. Insbesondere ist mir nicht klar, warum der ursprüngliche Lösungsansatz überhaupt für einige Anwender zu funktionieren scheint.

Einen zweiten inhaltlichen Klemmer habe ich nochmal bei der Problemstellung. Wenn wir DC als "verfügbar" zählen dann würde der Ladepunkt die Leistung erhöhen (DC "verfügbar"). Dadurch steigt der Netzbezug. Die Regelung erfolgt ja nach verfügbarer sitepower, also grid plus battery. Da wir bei grid jetzt in Bezug rutschen würde ich eigentlich erwarten, dass dieser Bezug die zusätzliche DC Verfügbarkeit wieder canceled. Das scheint ja aber nicht zu passieren. Ich sehe spontan aber nicht, warum eigentlich?

andig avatar Oct 08 '24 10:10 andig

Ich beschreibe noch einmal, was ich beim SMA STP 10.0 + BYD HVS 7,7 beobachtet habe. Die Batterie-Regelung im WR hat hier definitiv einen Einfluss. Das könnte begründen, warum der Parameter maxGridSupplyWhileBatteryCharging bei manchen Nutzern doch eine Verbesserung gebracht hat.

Bei mir läuft das so: Voraussetzung ist, dass noch Platz in der Hausbatterie ist, sonst tritt der Fehler nicht auf.

Sagen wir, die Sonne scheint mit 8 kW, das Auto lädt so, dass die 8 kW abgeholt werden. Die Hausbatterie verhält sich weitestgehend ruhig. Plötzlich scheint die Sonne mit 12 kW -> Der WR schickt 4 kW in die Hausbatterie. EVCC erhöht nun die Ladeleistung um 4 kW. (Hier dürfte es die 10 kW AC des WR nicht überschreiten und nur um 2 kW erhöhen.)

Jetzt verbraucht das Haus + Auto 12 kW. -> 2kW werden vom Netz bezogen. Scheinbar regelt der WR die Solarproduktion in solchen Situationen auf die 10 kW zurück und lädt erstmal nicht mehr die Hausbatterie. EVCC korrigiert das Laden des Autos so, dass kein Bezug mehr notwendig ist: Haus + Auto 10 kW.

Wenn sich alles beruhigt hat, regelt der WR die Solarproduktion wieder auf 12 kW hoch und schickt 2 kW in die Hausbatterie. Jetzt erhöht EVCC die Ladeleistung wieder um 2 kW. (Was es nicht tun sollte) Es werden wieder 2 kW vom Netz bezogen. Und so fängt es an zu schwingen.

Einen zweiten inhaltlichen Klemmer habe ich nochmal bei der Problemstellung. Wenn wir DC als "verfügbar" zählen dann würde der Ladepunkt die Leistung erhöhen (DC "verfügbar"). Dadurch steigt der Netzbezug. Die Regelung erfolgt ja nach verfügbarer sitepower, also grid plus battery. Da wir bei grid jetzt in Bezug rutschen würde ich eigentlich erwarten, dass dieser Bezug die zusätzliche DC Verfügbarkeit wieder canceled. Das scheint ja aber nicht zu passieren. Ich sehe spontan aber nicht, warum eigentlich?

Falls ich nichts übersehe, wird im Code die Batterie bei Netzbezug ignoriert und nicht verrechnet. Ich denke, deshalb hebt es sich nicht auf. Auch wenn es sich aufheben würde, käme es trotzdem zum Schwingen. Der Effekt wird umso größer, je höher die Überdimensionierung der PV ist.

buennerbernd avatar Oct 08 '24 12:10 buennerbernd

Voraussetzung ist, dass noch Platz in der Hausbatterie ist, sonst tritt der Fehler nicht auf.

Das ist klar- sonst gibts kein DC Charging.

Jetzt verbraucht das Haus + Auto 12 kW. -> 2kW werden vom Netz bezogen. Scheinbar regelt der WR die Solarproduktion in solchen Situationen auf die 10 kW zurück und lädt erstmal nicht mehr die Hausbatterie.

Das ist merkwürdig. Warum sollte er das tun- für den WR hat sich ja nichts geändert? Idee: kann es sein, dass der WR hier "Hausunterstützung" vor "Batterieladung" priorisiert und dabei vergisst, dass er bzgl. Hausunterstützung schon am Limit ist? Wäre das nicht eigentlich ein Supportticket wert?

Falls ich nichts übersehe, wird im Code die Batterie bei Netzbezug ignoriert und nicht verrechnet. Ich denke, deshalb hebt es sich nicht auf.

Ich frag mich in der Tat warum es notwendig war das so zu bauen.

Auch wenn es sich aufheben würde, käme es trotzdem zum Schwingen. Der Effekt wird umso größer, je höher die Überdimensionierung der PV ist.

Schwingen sehe ich jetzt nur weil Dein WR so merkwürdig reagiert (und vllt. aufgrund der aktuellen Implementierung).

andig avatar Oct 08 '24 16:10 andig

Das Problem resultiert aus der maximal möglichen Schieflast, und die ist geräteabhängig. Mein Wechselrichter kann nominal 12 kW. Wenn ich jetzt zB 8 kW Überschuss habe wird er den gleichmäßig über 3 Phasen ins Netz einspeisen. Wenn evcc nun diesen Überschuss für ein 1-phasiges Laden heranzieht, dann müsste der Wechselrichter auf nur einer Phase diese 8 kW bereitstellen - das funktioniert aber nicht, denn die maximal mögliche Leistung pro Phase beträgt (bei mir) nur 5 kW.

WordsOfMe avatar Oct 08 '24 17:10 WordsOfMe

Das ist merkwürdig. Warum sollte er das tun- für den WR hat sich ja nichts geändert? Idee: kann es sein, dass der WR hier "Hausunterstützung" vor "Batterieladung" priorisiert und dabei vergisst, dass er bzgl. Hausunterstützung schon am Limit ist? Wäre das nicht eigentlich ein Supportticket wert?

Das ist auch meine Theorie. Aber ich würde mich nicht daran festbeißen, weil ich denke, dass man das nur mit der max-AC-Power Konfiguration sauber und allgemeingültig lösen kann.

Auch wenn es sich aufheben würde, käme es trotzdem zum Schwingen. Der Effekt wird umso größer, je höher die Überdimensionierung der PV ist.

Schwingen sehe ich jetzt nur weil Dein WR so merkwürdig reagiert (und vllt. aufgrund der aktuellen Implementierung).

Angenommen, alles ist momentan im optimalen Zustand und ignorieren wir mal, dass der WR auch noch regelt: PV produziert 12 kW, Haus + Auto bekommen 10 kW und die Hausbatterie bekommt 2 kW. Was wird EVCC im nächsten Intervall machen, wenn es nichts von der max-AC-Power weiß? Es wird 2 kW draufpacken. Dann läuft es mindestens ein Intervall schlecht und dann wird wieder nachgeregelt.

Ich sehe die max-AC-Power Konfiguration als einzige saubere Lösung.

Zusätzlich sehe ich bei der max-AC-Power Konfiguration noch einen weiteren Vorteil: Eine Hausbatterie kann es gut ausgleichen, wenn EVCC mal ein wenig drüber oder drunter liegt. Sie regelt ja schneller. Im Bereich von 10 kW klappt das bei einem 10 kW Hybridwechselrichter nicht mehr. Wenn dann der Herd zuschaltet, dann kann die Hausbatterie nicht helfen und es wird Strom gekauft. Hier könnten die Nutzer sich bewusst für eine etwas kleinere max-AC-Power entscheiden, um noch etwas Spielraum für die Unterstützung durch die Hausbatterie zu haben.

buennerbernd avatar Oct 08 '24 18:10 buennerbernd

Das Problem resultiert aus der maximal möglichen Schieflast, und die ist geräteabhängig. Mein Wechselrichter kann nominal 12 kW. Wenn ich jetzt zB 8 kW Überschuss habe wird er den gleichmäßig über 3 Phasen ins Netz einspeisen. Wenn evcc nun diesen Überschuss für ein 1-phasiges Laden heranzieht, dann müsste der Wechselrichter auf nur einer Phase diese 8 kW bereitstellen - das funktioniert aber nicht, denn die maximal mögliche Leistung pro Phase beträgt (bei mir) nur 5 kW.

Sorry, das Thema ist ja auch noch einphasiges Laden. Das habe ich mal komplett ignoriert.

buennerbernd avatar Oct 08 '24 18:10 buennerbernd

Hier zum Verständnis auch nochmal eine Zeitreihe in 1min Auflösung mit 10 kW Hybridwechselrichter und 15 kWp Photovoltaik.

grafik

Streetscooter ist nicht steuerbar. Aber evcc könnte den MG ZS EV in der Leistung runter regeln, so dass es nicht zu Netzbezug kommt. Hinweis: Der MG ZS EV lägt einphasig, aber das sollte nicht das Problem sein.

Hier noch die Rohdaten 1min Ladepunkte-data-as-seriestocolumns-2024-10-08 22_17_22.csv

ttjaden avatar Oct 08 '24 20:10 ttjaden

Hier nochmal besser sichtbar in 1sek Auflösung: grafik

ttjaden avatar Oct 08 '24 20:10 ttjaden

Zoom in -> Das ist das Schwingen, was @buennerbernd meint: grafik

ttjaden avatar Oct 08 '24 20:10 ttjaden

@buennerbernd könntest Du den angehängten PR bitte mal probieren? Dazu muss bei der Batteries (Achtung: geht noch nicht bei den Templates!) zusätzlich

MaxACPower: 123 # W

konfiguriert sein. Die Ermittlung erfolgt das je Inverter einzeln.

andig avatar Oct 11 '24 14:10 andig

Danke, dass du dich kümmerst. Am Wochenende werde ich verreisen. Wird also frühestens am Montag was. Kannst du mir noch Tipps geben, wie ich das bei mir einspiele?

buennerbernd avatar Oct 11 '24 21:10 buennerbernd