Skip to content

Active bat control improve pv mode#3382

Merged
LKuemmel merged 8 commits into
openWB:masterfrom
ndrsnhs:active-bat-control-improve-pv-mode
May 22, 2026
Merged

Active bat control improve pv mode#3382
LKuemmel merged 8 commits into
openWB:masterfrom
ndrsnhs:active-bat-control-improve-pv-mode

Conversation

@ndrsnhs
Copy link
Copy Markdown
Contributor

@ndrsnhs ndrsnhs commented May 22, 2026

Bei der aktiven Speichersteuerung soll im Modus "PV-Ertrag speichern" nur noch der verbleibende Überschuss nach Abzug Hausverbrauch an den Speicher übergeben werden.
So werden Fahrzeuge aus dem Netz beladen, Hausvebrauch durch PV gedeckt und überschüssiger PV-Ertrag in den Speicher geladen.
Ist PV-Ertrag zu gering darf Hausverbrauch aus dem Speicher gedeckt werden.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Die PR passt die aktive Speichersteuerung im Modus „PV-Ertrag speichern“ so an, dass als Lade-/Entlade-Limit nicht mehr die gesamte PV-Leistung, sondern der verbleibende PV-Überschuss nach Abzug des Hausverbrauchs verwendet wird (und bei zu geringem PV-Ertrag eine Entladung zur Deckung des Hausverbrauchs ermöglicht wird).

Changes:

  • Berechnung des Battery-Power-Limits für MODE_CHARGE_PV_PRODUCTION auf „PV minus Hausverbrauch“ umgestellt.
  • Erwartungswerte in den bestehenden Battery-Control-Tests an die neue Limit-Berechnung angepasst.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
packages/control/bat_all.py Anpassung der Power-Limit-Berechnung für PV-Überschussmodus (PV abzüglich Hausverbrauch).
packages/control/bat_all_test.py Aktualisiert Test-Erwartungswerte für PV-Überschussmodus entsprechend neuer Berechnung.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/control/bat_all.py Outdated
self.data.set.power_limit = data.data.pv_all_data.data.get.power * -1
# PV-Ueberschuss abzueglich Hausverbrauch als Ladeleistung des Speichers nutzen.
# Bei geringem Ueberschuss wird Hausverbrauch durch Speicher ausgeglichen
left_pv_power = (data.data.pv_all_data.data.get.power +
Comment thread packages/control/bat_all.py Outdated
left_pv_power = (data.data.pv_all_data.data.get.power +
data.data.counter_all_data.data.set.home_consumption)
self.data.set.power_limit = left_pv_power * -1
log.debug(f"Speicher in Höhe des PV-Ertrags laden: {self.data.set.power_limit/1000}kW")
Comment thread packages/control/bat_all.py Outdated
Comment on lines 587 to 592
# PV-Ueberschuss abzueglich Hausverbrauch als Ladeleistung des Speichers nutzen.
# Bei geringem Ueberschuss wird Hausverbrauch durch Speicher ausgeglichen
left_pv_power = (data.data.pv_all_data.data.get.power +
data.data.counter_all_data.data.set.home_consumption)
self.data.set.power_limit = left_pv_power * -1
log.debug(f"Speicher in Höhe des PV-Ertrags laden: {self.data.set.power_limit/1000}kW")
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread packages/control/bat_all.py Outdated
Comment on lines +593 to +594
log.debug("Speicher in Höhe des verbliebenen PV-Überschusses "
f"laden: {self.data.set.power_limit/1000}kW")
Comment thread packages/control/bat_all_test.py Outdated
BatControlParams("Fahrzeuge laden, Ladung PV Überschuss", 654,
BatControlParams("Fahrzeuge laden, Ladung PV Überschuss", 198,
power_limit_mode=BatPowerLimitMode.MODE_CHARGE_PV_PRODUCTION.value),
BatControlParams("Fahrzeuge laden, Ladung PV Überschuss, PV-Negativ", -456,
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread packages/control/bat_all.py Outdated
Comment on lines +587 to +588
# PV-Ueberschuss abzueglich Hausverbrauch als Ladeleistung des Speichers nutzen.
# Bei geringem Ueberschuss wird Hausverbrauch durch Speicher ausgeglichen
@ndrsnhs ndrsnhs requested a review from LKuemmel May 22, 2026 07:56
@ndrsnhs ndrsnhs added this to the 2.2.0-Patch.1 milestone May 22, 2026
@LKuemmel LKuemmel merged commit 778ded2 into openWB:master May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants