You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4d33dc3
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: scheduler/config.go
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,24 @@ type Config struct {
91
91
BatteryBalancingEfficiencyFactorfloat64`json:"battery_balancing_efficiency_factor"`// multiplier on BatteryEfficiency during CV phase (e.g. 0.3); 0 disables
92
92
BatteryBalancingBonusfloat64`json:"battery_balancing_bonus"`// one-time profit bonus awarded when battery first reaches BatteryMaxSOC within the horizon; 0 disables
93
93
94
+
// Top-of-charge hold parameters.
95
+
//
96
+
// When the battery sits at/above BatteryBalancingSOCThreshold and weekly
97
+
// cell-balancing is not due, opportunistic charging is blocked so the pack
98
+
// is not pushed into its low-efficiency CV phase. Releasing that block the
99
+
// moment SOC dips back below the threshold produces a limit cycle: the
100
+
// inverter's auxiliary draw slowly depletes the pack, charging is
101
+
// re-enabled, PV tops it straight back up, and the block re-engages — the
102
+
// battery micro-cycles around the threshold for hours.
103
+
//
104
+
// BatteryBalancingSOCReleaseBand adds hysteresis: once blocked, charging is
105
+
// only re-enabled after SOC falls below (threshold - releaseBand).
106
+
// BatteryTopHoldPower allows a small trickle while blocked so the inverter's
107
+
// own consumption is served from PV/grid rather than from the pack, which
108
+
// removes the drift that drives the cycle in the first place.
109
+
BatteryBalancingSOCReleaseBandfloat64`json:"battery_balancing_soc_release_band"`// SOC hysteresis band (0-1) below BatteryBalancingSOCThreshold; 0 disables hysteresis
110
+
BatteryTopHoldPowerfloat64`json:"battery_top_hold_power"`// kW trickle charge permitted while the top-of-charge block is engaged; 0 forces a hard idle
111
+
94
112
// Price adjustments
95
113
ImportPriceOperatorFeefloat64`json:"import_price_operator_fee"`// EUR/MWh - Operator fee for import
96
114
ImportPriceDeliveryFeefloat64`json:"import_price_delivery_fee"`// EUR/MWh - Delivery fee for import
returnfmt.Errorf("battery_balancing_soc_release_band (%f) must be smaller than battery_balancing_soc_threshold (%f), otherwise charging would never resume",
// headroom up to BatteryMaxSOC. Doing so would push the battery into
772
815
// its low-efficiency CV/balancing phase every time PV surplus is
773
816
// available, rather than only once a week as intended.
817
+
//
818
+
// The guard is a Schmitt trigger (see topSOCGuard): it engages at the
819
+
// threshold and only releases once SOC has fallen clear of the
820
+
// hysteresis band, and it leaves a small trickle enabled so the
821
+
// inverter's auxiliary draw does not slowly empty the pack. Together
822
+
// these stop the battery micro-cycling around the threshold.
774
823
chargeLimit:=maxCharge
775
824
logMsg:=fmt.Sprintf("Setting battery to SELF-CONSUMPTION mode (no active charge/discharge planned, absorbing any actual PV excess up to %.1f kW): GridImport: %.1f kW, GridExport: %.1f kW",
logMsg=fmt.Sprintf("Setting battery to SELF-CONSUMPTION mode (SOC %.1f%% within top-of-charge hold: engage >= %.1f%%, release < %.1f%%, balancing not currently needed — charge capped at %.2f kW to hold SOC without entering the CV/balancing phase): GridImport: %.1f kW, GridExport: %.1f kW",
0 commit comments