1. Scope, temporal resolution and causality.
The battery is simulated sequentially at quarter-hour resolution
(Δt = 0.25 h). Decisions for interval t use the battery state resulting
from intervals before t, the grid import and PV surplus measured during interval
t, historical observations, and, where price control is enabled, prices assumed to have
been published by that time. Realised load or PV production from a future interval is never used.
“Causal” therefore means causal across quarter-hours: the current quarter's aggregate energy is
treated as a contemporaneous feedback measurement and the battery response is credited within that
quarter. Sub-quarter metering, controller delay and a separate start-of-quarter forecast are not
modelled.
The four selectable modes use the same physical battery limits:
- Self-consumption: store PV surplus and discharge to serve later import; no peak reserve or economic grid charging.
- Self-consumption + peak shaving: protect energy for forecast peaks and allow preventive grid charging below the peak target; available with fixed or dynamic tariffs.
- Self-consumption + price control: combine PV self-consumption with eligible low-price grid purchases for later consumption; available only with a dynamic import tariff. No peak target, peak reserve or preventive peak charging applies. Purchases are screened against full variable import costs and any additional capacity-tariff cost implied by the already observed monthly peak.
- Self-consumption + peak shaving + price control: jointly schedule stored energy, forecast solar surplus and grid purchases under a dynamic import tariff. A rolling-horizon optimisation runs normally every four hours, with earlier adaptive replans, and considers energy and capacity costs. It protects the reserve needed for the effective monthly target: the greater of the user target and the peak already measured that month. A separate four-hour deadline limits discretionary withholding of energy above that reserve.
The peak-specific equations below apply only to the two modes that include peak shaving.
Price control uses published import prices and historical load/PV estimates; it does not imply
knowledge of future actual consumption. Neither adding peak shaving nor adding price control
guarantees a higher financial return.
2. Notation and units
Upper-case P denotes power (kW), upper-case E denotes energy during one
interval (kWh), and lower-case p denotes an electricity price (EUR/kWh). The superscript
“tar” denotes a user-defined target; it is not an exponent or an optimised solution. Superscripts
PV, grid, PS, AR and SC are category labels for PV charging, grid charging, peak shaving, price
arbitrage and self-consumption. Parenthesised superscripts such as (j) identify a
historical scenario and are not powers.
Symbols used in the battery-dispatch model
| Symbol |
Definition |
Unit |
| t, Δt | Current interval and interval duration | —, h |
| C | Nominal installed battery energy capacity | kWh |
| Bt | Energy stored at the start of interval t | kWh |
| zt = Bt/C | Fractional state of charge; 100zt is SOC in percent | — |
| smin, smax, s0 | Configured minimum, maximum and initial-state fractions | — |
| Lt | Non-negative grid-import energy after PV and EMS, before the battery | kWh/interval |
| St | Non-negative PV/export surplus after PV and EMS, before the battery | kWh/interval |
| Pt = Lt/Δt | Mean pre-battery import power in interval t | kW |
| Ptar | User-defined maximum quarter-hour mean import target | kW |
| Etar = PtarΔt | The same target expressed as interval energy | kWh/interval |
| rc, rd | Maximum charge and discharge rates relative to capacity | h−1 |
| Pcmax, Pdmax | Maximum AC-side charge and discharge powers | kW |
| Ecmax, Edmax | Maximum AC-side charge and discharge energies per interval | kWh/interval |
| Pmin, Emin | Minimum non-zero action power and energy, with Emin = PminΔt | kW, kWh/interval |
| η, ηc, λd | Nominal efficiency parameter, stored-energy gain per AC charging kWh, and stored-energy withdrawal per AC discharge kWh | — |
| U | Usable stored-energy band, Bmax − Bmin | kWh |
| ct, dt | AC-side charging and discharging energies, with categorical superscripts | kWh/interval |
| o, k, g, H | Forecast-plan origin, future interval, elapsed plan age and total number of forecast intervals | — |
| j, v | Historical scenario and reserve variant (hard, preferred or gross) | — |
| xk(j), uv,k(j) | Forecast AC peak discharge and credited AC charging opportunity | kWh/interval |
| Rv,k(j) | Usable stored energy required immediately before forecast interval k | kWh |
| pt | Full variable import cost used by both price-control modes in interval t | EUR/kWh, excluding VAT |
| γ | Physical delivery ratio used by both price-control modes: ηc/λd | — |
| κ, δ | Cycle penalty and additional minimum price spread | EUR/kWh |
The positive-part operator is [x]+ = max(x, 0). The clipping
operator used below is
Π[a,b](x) = min{b, max(a, x)}.
All variables L, S, c, d, x and
u are non-negative AC-side interval energies unless stated otherwise.
3. Energy balance and physical constraints
The user-defined relative charge and discharge rates imply
Pcmax = C rc and
Pdmax = C rd. Their interval-energy limits are
Ecmax = C rcΔt and
Edmax = C rdΔt.
Thus, a 10 kWh battery with a 0.50 h−1 discharge rate is limited to 5 kW, or
1.25 kWh in one quarter-hour.
Bmin = max{Csmin, Emin},
Bmax = max{Bmin, Csmax},
U = Bmax − Bmin,
B0 = Π[Bmin,Bmax](s0Bmax).
Here, smin, smax and s0 are the
configured minimum, maximum and initial-state fractions. The initial fraction is applied to
Bmax in the current implementation.
Bt+1 = Π[Bmin,Bmax][Bt
+ ηc(ctPV + ctgrid)
− λd(dtPS + dtAR + dtSC)].
The nominal efficiency parameter is split as
ηc = 1 − (1 − η)/2 and
λd = 1 + (1 − η)/2.
The symbol λd is a withdrawal multiplier, not an efficiency: delivering
1 kWh on the AC side removes λd kWh from storage. The implied AC-to-AC
ratio is ηc/λd. For example,
η = 0.90 gives ηc = 0.95,
λd = 1.05 and a ratio of approximately 0.9048. This symmetric-loss
approximation is close to, but not exactly equal to, the nominal input η.
Charging and discharging never occur simultaneously, and their category totals cannot exceed the
corresponding interval limits. Standalone ordinary PV charging, self-consumption and
price-arbitrage actions below Emin are suppressed. A qualifying peak-shaving or
reserve-charging request may instead be raised to Emin, but is executed only when
that minimum action remains physically feasible. A smaller economic grid-charge component may be
combined with a qualifying reserve charge when their shared total action remains feasible.
4. Sequential dispatch and immediate peak shaving
The first three modes use the following within-interval priority order, omitting actions disabled
in the selected mode. The combined causal mode instead uses the joint plan in Section 8, with
current PV capture and immediate peak protection retaining priority in actual execution.
- charge contemporaneous PV surplus;
- discharge to reduce import above the peak target;
- discharge economically acquired energy when price arbitrage is eligible;
- charge from the grid to repair a peak-reserve shortfall;
- charge economically in an eligible low-price interval; and
- serve remaining import from unprotected battery energy for self-consumption.
The user target Ptar is a maximum quarter-hour mean import, not a
limit on sub-quarter electrical transients. It is converted to interval energy as
Etar = PtarΔt. With an 8 kW target,
for example, the corresponding quarter-hour target is 2 kWh.
In the combined causal mode, the effective target defined in Section 8 replaces
Ptar after a higher monthly peak has already been measured.
Default target selection. Without a positive user override, the suggested target
is 80% of the initial average monthly peak:
Ptar = 0.8 × meanm(maxt in m Pinitial,t).
This uses the selected reference profile and period, including any annual-consumption scaling,
before simulated profile adjustments, extra loads, additional PV, EMS or battery effects.
Months included in that profile, including partial months, contribute to the average.
The displayed suggestion is rounded; the automatic simulation uses the unrounded value.
A manually entered positive target takes precedence.
The 80% factor is a configurable starting choice, not a financially optimised or guaranteed target.
Target selection from the supplied historical reference profile is a scenario-setting step;
it is not an online forecast or access to later measurements during dispatch. In an operational
controller, this reference must be historical data available before operation, such as the
preceding year. The causal dispatch rules below continue to use only current and past measurements.
et = [Lt − Etar]+,
dtPS = min{max(et, Emin),
Edmax, Lt,
(Bt − Bmin)/λd}
when et > 0.
If the resulting feasible action is smaller than Emin, no peak-shaving action
is performed. Apart from that edge case, a single-interval target can be met only if
et ≤ Edmax and
λdet ≤
Bt − Bmin. Sustained peak shaving additionally
requires sufficient energy and charging opportunities across consecutive intervals. The target is
therefore a control objective, not a guarantee. Reducing 12.5 kW to 2.5 kW, for example, requires
10 kW discharge and is impossible for a battery limited to 5 kW, even when that battery is full.
5. Construction of the causal historical ensemble
The historical ensemble is constructed when causal peak-reserve or price forecasts are required.
The peak-specific recurrences and reserve floors in Sections 6–7 apply only when peak shaving is
enabled with a positive Ptar. Pure self-consumption operation constructs neither
an ensemble nor a peak reserve.
A new forecast plan is normally constructed every hour. The historical peak-risk forecast described
in Sections 5–7 is distinct from the combined mode's 24 h economic forecast in Section 8.
With the current peak-risk controller defaults, the
horizon is 48 h, or H = 48/0.25 = 192 future quarter-hours. Let o be the plan
origin and k = 1, …, H a future position. Candidate scenario
j uses the same local quarter-hours exactly j calendar weeks earlier, with
j = 1, …, 8 under the current default. All 192 positions use the same week lag.
Consequently, one member is one coherent historical 48 h path; quarters from different weeks are
never mixed within a scenario.
Example. For a plan made on Monday 10 March at 10:00, the forecast covers Monday
10:15 through Wednesday 10:00. Scenario 1 takes the complete path from Monday 3 March 10:15 through
Wednesday 5 March 10:00; scenario 2 takes 24–26 February at the same local quarter-hours; and
scenario 8 takes 13–15 January. The algorithm does not select the “eight most similar” days or
weather-matched weeks.
Define observed pre-battery net energy at historical time τ as
Nτ = Lτ −
Sτ. The analogue at source time
τo,k(j) becomes
L̂o,k(j) = [Nτ(o,k,j)]+,
Ŝo,k(j) = [−Nτ(o,k,j)]+,
τ(o,k,j) = the local wall-clock counterpart of interval o+k, shifted 7j days backwards.
This is a historical net-load analogue rather than separate gross-load and gross-PV
forecasting. A candidate is valid only if all 192 source quarters exist and every source quarter is
strictly earlier than origin o. If one source quarter is missing, the complete member is
rejected; missing positions are not filled from another week. “Up to eight” therefore means eight
fixed candidate lags, one through eight weeks, of which zero to eight may be valid. Eight is a
configurable default, not a mathematical optimum or a statistically calibrated sample size.
Normally, zero members are available during the first week, one after approximately one week, and
all eight after approximately eight weeks of complete history. Diagnostic confidence labels reflect
only this count: 0 is cold start, 1–3 limited history, 4–7 partial history and 8 full history.
They do not express forecast accuracy. Plans are refreshed hourly; between replans, the applicable
remaining part of the most recent plan is used, while immediate peak shaving still reacts every
quarter-hour.
The future calendar is constructed on a continuous UTC timeline and converted to Europe/Brussels.
Historical matching first uses local wall-clock time together with its UTC offset, distinguishing
the repeated autumn clock hour. If an offset-specific match is unavailable, the implementation
falls back to the same local wall-clock timestamp. A missing counterpart can temporarily reduce the
number of valid members around a daylight-saving transition.
Peak protection additionally uses a conservative risk ensemble. With the default
48 h horizon, the weekly paths are supplemented by complete paths three, four, five and six
calendar days earlier. For each candidate, the historical net-load path is extended by one hour
on both sides of the forecast window. At every forecast quarter the largest net load within
one hour before or after its historical counterpart is selected. This envelope allows a past
peak to start earlier, finish later and last longer; it is a safety scenario, not an expected-load
forecast. The extended historical path must exist in full and lie strictly before the forecast
origin. Import and PV surplus are then derived from the envelope's signed net load, so the same
quarter cannot count as both high demand and a solar recharging opportunity.
The weekly paths alone supply the expected load and PV estimates used by price control without
peak shaving. The combined mode uses the separate causal trajectories described in Section 8.
The additional days and timing envelope affect only peak protection. Diagnostic scenario counts
and confidence labels refer to weekly members; a recent-day risk scenario can therefore already
inform the reserve while that label still says cold start.
6. Scenario-specific reserve calculation
For each valid member, the forecast peak-shaving discharge in future interval k is
xk(j) = min{max(L̂k(j) − Etar, Emin),
Edmax, L̂k(j)}
if L̂k(j) > Etar; otherwise xk(j) = 0.
The recurrence is evaluated for both the weekly and risk ensembles.
Three charging assumptions are evaluated independently. The hard variant credits
predicted PV charging or feasible grid charging within unused headroom below the target. The
preferred variant credits predicted PV only. The gross variant
credits no future charging. In a non-peak forecast interval, define
ukPV,(j) = min{Ŝk(j), Ecmax},
ukgrid,(j) = min{[Etar − L̂k(j)]+, Ecmax},
uhard,k(j) = max{ukPV,(j),ukgrid,(j)},
upreferred,k(j) = ukPV,(j),
ugross,k(j) = 0.
The grid term is set to zero where PV surplus exists. Charging opportunities below
Emin are set to zero, and no forecast charging is credited in an interval that
requires peak discharge. For reserve variant v, let
Rv,k(j) be the usable stored energy required immediately before
future interval k. With the terminal condition
Rv,H+1(j) = 0, the controller evaluates backwards for
k = H, …, 1:
Rv,k(j) = Π[0,U][Rv,k+1(j)
+ λdxk(j)
− ηcuv,k(j)].
A future AC discharge x raises the reserve by the stored-energy withdrawal
λdx. A feasible future AC charge u lowers the energy
that must already be present by ηcu. For example, an interval with
3 kWh forecast import and a 2 kWh target requires 1 kWh AC discharge. With
λd = 1.05, 1.05 kWh must be stored before that peak. If a preceding
interval can charge 1 kWh with ηc = 0.95, only 0.10 kWh must be present before
that charging opportunity. The zero terminal condition imposes no additional reserve beyond the
48 h horizon; hourly receding-horizon replanning mitigates, but does not remove, this finite-horizon
assumption.
7. Ensemble aggregation, cold start and adaptive reserve
The complete backward recurrence is solved separately for every valid scenario and for all three
reserve variants. For the weekly ensemble, only afterwards is the linearly interpolated
empirical 90th percentile taken.
If g quarter-hours have elapsed since origin o, intervals 1 through
g are already complete and the applicable reserve is the requirement immediately before
the next interval, g + 1:
Fv,o,g = Q0.90({Rv,g+1(j) : j is valid at origin o}).
Thus, at the plan origin (g = 0), the controller applies the ensemble of
Rv,1(j); after three completed quarters it applies the ensemble of
Rv,4(j).
For eight sorted values r1 ≤ … ≤
r8, linear interpolation uses position
(8 − 1)×0.90 = 6.3 and therefore
Q0.90 = r7 +
0.3(r8 − r7). With one valid member, its value is
used directly. This small empirical P90 is not a calibrated statement that the target will be met
with 90% probability. The risk ensemble instead contributes the maximum requirement
across its valid members, denoted Av,o,g. If neither a weekly nor a risk member
is valid, the forecast component is 50% of the usable band, 0.50U. If only a risk member
is available, it replaces that fallback and the weekly component is zero. A missing risk ensemble
contributes zero when weekly members are available.
A separate bounded uncertainty buffer learns from completed intervals that
exceeded the target. For an already observed interval q, the AC excess that the
battery could address is
aq = min{[Lq − Etar]+, Edmax}.
Let M be the number of quarters per replan period (normally four), and let
Du be the stored-energy stress observed immediately before interval
u. The current defaults apply a multiplier of 1.25, cap each observation at
50% of usable capacity before ageing, halve its contribution every seven days,
and discard it after 56 days:
Du = min{0.50U, 1.25λd
Σq=max(0,u−M)u−1aq},
Runc,o = maxu: 0 ≤ (o−u)Δt < 56×24 h
{Du 2−(o−u)Δt/(7×24 h)}.
Empty sums and an empty history contribute zero. The one-interval shift prevents the current
interval from teaching its own reserve requirement. At the beginning of a profile, the rolling
statistic uses available partial history. This buffer addresses unanticipated excess during one
replan period; longer expected events and intervening recharge are handled by the scenario paths.
At each plan origin the controller adds the uncertainty buffer to the larger of the weekly and
risk requirements, then applies a 20% standing floor and the physical capacity limit:
R̄v,o,g = min{U, max{0.20U,
max(Fv,o,g, Av,o,g) + Runc,o}},
Rhard = R̄hard,o,g,
Rpreferred = max{Rhard, min{0.90U, R̄preferred,o,g}}.
The weekly and risk requirements are combined by a maximum; the uncertainty buffer is then added.
The hard plan drives preventive grid charging. Energy already present when PV is charging or an
eligible cheap interval occurs can be protected up to the preferred plan. This preference normally
retains at most 90% of usable capacity, but never reduces the hard requirement: a concrete
scenario can still require the full battery after crediting recharging opportunities.
In peak shaving without price control, at every quarter the remaining protection from an earlier interval is clipped to the current
PV-aware preferred plan, allowing released energy to serve self-consumption again. The operative
protection is the larger of this remaining lock and the hard requirement. The gross calculation
is retained as a no-recharge reference; it does not impose a persistent lock when a newer
preferred plan allows release. Ordinary self-consumption uses only energy
above the operative protection; immediate peak shaving may consume that protected energy.
The combined causal mode retains a bounded preferred buffer only after actual PV charging,
alongside the hard requirement. This solar-derived preferred buffer remains limited to 90% of
usable capacity unless the hard requirement itself is higher, and is clipped to the current PV-aware plan. Merely labelling a quarter as
cheap, or making an optional grid purchase, cannot create an extra preferred reserve.
If usable stored energy Bt − Bmin is below the
operative reserve R, preventive grid charging is limited by charge power, free capacity,
the minimum-action rule and contemporaneous headroom
[Etar − Lt]+. Reserve charging therefore
cannot itself raise the quarter-hour import above the applicable target. In the combined causal
mode, this is the effective monthly target described in Section 8.
8. Price-responsive operation
Price control is available only under a dynamic import tariff. In both price-control modes,
pt is the published
import energy price plus the seven configured per-kWh charges: distribution, public-service
obligations, surcharges, energy contribution, special excise, green certificates and
cogeneration certificates. These costs and the capacity rate below are expressed excluding VAT;
export opportunity values in the joint objective are converted to the same billing basis.
Before 14:00 local time, only the remaining published prices of the
current day are visible; from 14:00 onward, the assumed published next-day prices are also visible.
The modes use different decision rules, described separately below.
Price control without peak shaving. There is no peak reserve; the full usable
band is eligible, subject to existing stored energy and the following economic conditions.
A future discharge interval f is economically eligible from current interval
t only if it has forecast residual load and
γpf − pt − κ − δ > 0,
where the current defaults are κ = 0.005 EUR/kWh for the cycle penalty and
δ = 0.03 EUR/kWh for the additional minimum spread. Here
γ is the physical delivery ratio
ηc/λd. Candidate charging normally occurs at a
visible local price minimum; the minimum price in the visible window is the fallback.
Positive price spread alone is not sufficient. The margin
mt,f = γpf − pt
− κ − δ must also exceed the estimated opportunity value of
retaining free capacity for forecast PV self-consumption. Denote this opportunity value by
vPVt,f. This value is
[pf]+φ; the full variable price already contains
the retail charges. Here
[pf]+ = max(pf, 0),
φ is the forecast PV-utilisation fraction. The latter is the smaller of one and the
forecast PV energy absorbable by visible load divided by the available free economic charging band.
This gate prevents grid arbitrage from occupying capacity whose expected PV self-consumption value
is higher.
The weekly ensemble supplies median forecasts of physically dispatchable residual load and PV.
Forecast PV is replayed chronologically and first allocated to ordinary load;
forecast PV and existing unprotected stored energy reduce the economic purchase target. Grid
charging is further limited by forecast profitable load, charge and discharge power, free battery
capacity and the PV opportunity-value test. Part of the free energy band is kept available for
forecast PV capture, limited by forecast profitable consumption.
The observed monthly peak is an input to the incremental-cost test below, rather than a separate
hard limit on price-driven charging.
With no valid weekly historical member, no speculative price purchase is initiated.
Capacity-cost screening without peak shaving. Each eligible additional
price-driven purchase is evaluated using the capacity cost it
would add. Let Mt be the largest import power actually observed earlier in
the current month, P0,t the feasible current import if no economic purchase
is made, and a the configured annual capacity rate in EUR/kW/year.
The no-purchase alternative includes self-consumption discharge that is physically possible
now; charging would suppress that discharge. The already payable baseline is
Btpeak = max(2.5 kW, Mt, P0,t).
For candidate AC purchase q, with current import energy Ltrem
before that optional purchase, the estimated additional capacity cost is
ΔCcap(q) =
(a/12)[(Ltrem + q)/Δt
− Btpeak]+.
The controller chooses the feasible purchase with the greatest positive value
q(mt,f − vPVt,f)
− ΔCcap(q).
It compares no purchase, the minimum non-zero action when feasible, the purchase that just
fills any capacity-cost-free headroom, and the maximum purchase allowed by the physical and
forecast constraints. The minimum action can be worthwhile even when it slightly exceeds
the free headroom. Equal values favour less charging.
A peak increase from price-driven charging is allowed only if this estimated margin covers its
additional capacity cost.
The monthly coefficient a/12 is a controller assumption for a twelve-month year;
it does not use the eventual number of months or the future peak in the supplied profile.
Financial reporting independently uses the actual simulated flows and its average over the
months available in the profile.
Grid-purchased energy is tracked in a separate economic buffer. For arbitrage, it is discharged only
when the realised current price exceeds its allocated average acquisition cost per deliverable AC
kWh plus the cycle penalty. This buffer tracks the full
variable acquisition cost; the capacity charge was evaluated when buying and is not added again
to the discharge threshold. This energy serves local import; the controller does not discharge
for export arbitrage. Ordinary self-consumption uses the PV/self-consumption inventory.
Joint price control with peak shaving. The combined causal mode replans a linear
optimisation normally every four hours and when a newly published price horizon becomes available.
At hourly checkpoints, an additional solve can be triggered if measured stored energy differs
from the last plan by more than max(0.5 kWh, 15% of usable capacity), or if the measured monthly
peak rises above the target represented in the last plan. Unexpected current net load also
triggers an adaptive solve when it exceeds the issued forecast by more than
max(0.1 kWh, 15% of the quarter-hour discharge limit) and usable energy remains above the
operative reserve. These adaptive solves do not override an expired economic-hold deadline.
An adaptive solve reuses the last
issued forecast, sliced to the current quarter, and replaces only the current net load/PV entry
with the actual measurement. It never fills later entries with realised future observations.
The separate 48 h peak-risk forecast remains hourly. The economic planning
horizon is at most 24 h, including the measured current quarter, and stops at the last published
price. Future net-load quarters use the median of the same local quarter one to eight weeks
earlier; only source observations strictly before the planning origin are eligible. Missing
weekly history falls back to the same local quarter one to six days earlier, again using only
completed source quarters, then to the
preceding day's mean import with no assumed PV surplus. A separate P90 historical net-load
trajectory informs the future reserve. Actual future consumption and solar output are never
inputs to these trajectories. DST matching preserves local clock time.
Solar and purchased energy share one physical inventory. Let Ik be forecast
grid import, Xk export, rk the net export value on
the import objective's excluding-VAT basis, and Qm the planned peak for calendar month m. Apart from
priority penalties for unavoidable reserve shortfalls or target breaches, the linear objective is
min Σk[pkIk − rkXk
+ (κ/2)(ckPV + ckgrid + dk)]
+ (a/12)Σm(Qm − Qmbase)
− vHBH.
Export value follows the financial calculation's actual configured VAT and injection grid fee.
For private injection without output VAT, the published export price is divided by
(1 + VAT) to compare it with excluding-VAT import costs. Where the financial calculation
applies output VAT and an injection grid fee, the equivalent value is the published export
price minus that fee. This conversion affects the internal opportunity value only; reported
market prices and the actual financial calculation remain unchanged.
Import and export follow the same battery energy balance and efficiency factors as Section 3.
The monthly baseline is the greater of 2.5 kW and the peak already observed in the current
month; a future calendar month starts at 2.5 kW. The optimisation accounts for displaced
injection revenue when storing solar surplus, future PV capture opportunities, conversion
losses and the cycle penalty. Remaining terminal energy receives a conservative value
vH = max(0, minkpk)/λd,
with a terminal safety floor. Neither an average historical purchase cost nor a cheap-price
label is a condition for releasing stored energy in this mode. Source-specific accounting
remains available for reporting.
Already measured monthly peaks. Let Mt be the largest
grid import already measured in the current calendar month. The combined mode's effective
target is max(Ptar, Mt): maintaining a lower target
cannot undo a peak already billed. A new calendar month starts again at
Ptar. This uses measured past import only; it never uses the eventual
monthly maximum. Grid purchases must stay below the effective target.
Before a target breach, the peak-risk reserve from Sections 5–7 remains protected: the operative floor is
the greater of the hard requirement and any remaining bounded preferred buffer created by actual
PV charging. After a measured breach, that reserve is capped by its remaining usefulness for
the effective target. The ceiling is recomputed from issued historical P90 peak forecasts,
already observed load peaks and forecast recharge opportunities; the stress allowance scales
down with the remaining peak exposure, while the basic safety floor remains. Future floors are
constructed at the current origin from historical P90 peak demand, predicted recharge
opportunities and the current safety/stress allowance. The controller never reads future rows
of a reserve series that would have been replanned using later observations. Immediate peak
shaving has priority over rebuilding the reserve; grid charging itself cannot exceed the
effective monthly target. Cheap-price labels and optional grid purchases do not increase the preferred
buffer; the PV-derived preference remains limited to 90% of usable capacity. Only a higher
hard requirement can raise the operative reserve above that bound.
Reserve protection is therefore a constraint on the joint economic plan, not a separately
owned compartment of battery energy.
Execution and bounded economic waiting. Every quarter, actual meter readings
and physical limits constrain movement toward that quarter's scheduled stored-energy level.
The optimisation normally refreshes every four hours, with adaptive hourly checks; it is not
solved again every quarter. Intervening actions follow the latest plan while responding to
current measurements. Current PV
capture and immediate peak shaving take priority. If a plan is infeasible or the solver fails,
deterministic self-consumption and necessary reserve restoration remain available.
When serving current load from energy above the operative peak reserve is feasible but is partly withheld
for later use, a four-hour clock starts. Hourly replanning, changed prices and a short pause in
load do not restart that clock. At expiry, local consumption takes priority for the available
energy above the operative peak reserve, and optional grid replenishment remains disabled until that
originally withheld free inventory has been used. Purchases and changes in the reserve floor
do not renew its deadline. Necessary reserve restoration remains possible.
A separate clock also counts continuous full-battery waiting with usable local load: after
four hours, energy subsequently released from the reserve serves that load immediately,
without adding another economic waiting period or discharging below the necessary reserve.
This bounds discretionary economic withholding; it does not promise that a battery is never
full for more than four hours. Peak protection, absent load or minimum-power limits can
legitimately prevent discharge for longer.
9. Interpretation and limitations
The controls use causal forecasts. The combined mode optimises a finite forecast horizon,
while the other modes use the sequential rules above; none knows the realised future.
In particular:
- Ptar applies to quarter-hour mean import, not instantaneous power.
- The expected-load members use fixed weekly lags; neither these nor the additional peak-risk paths are selected by weather, temperature, occupancy or similarity.
- The P90 of at most eight serially related members is not a calibrated probability guarantee.
- The 48 h horizon, hourly replan, eight weekly lags, recent-day risk scenarios, one-hour timing margin, 50% cold start, 20% safety floor, 50% uncertainty cap, 1.25 multiplier, seven-day half-life, 56-day history and 90% preferred-reserve limit are controller settings rather than profile-specific statistical estimates.
- The present quarter's aggregate flow is treated as contemporaneously measurable; intra-quarter latency is omitted.
- The reserve recurrence imposes no terminal reserve beyond 48 h.
- The combined economic plan uses at most 24 h of published prices, a four-hour routine replan with hourly adaptive checks, a conservative terminal energy value and a separate four-hour discretionary-hold limit; these are controller settings, not fitted guarantees.
- The algebraic loss split approximates, but does not exactly reproduce, nominal efficiency η.
- Missing history and daylight-saving transitions can change the number of valid scenarios.
Forecast error, low initial stored energy, insufficient charging headroom, minimum-action limits,
limited usable energy or limited discharge power can cause realised import to exceed
Ptar. Once a higher monthly peak has been measured, the combined mode may
deliberately allow later import above the original requested target while remaining below its
effective target. Such later quarters do not necessarily indicate a physical limitation: the
earlier monthly peak cannot be undone. Reported monthly target compliance still compares the
realised peaks with the original requested target.
Financial interpretation. Peak shaving pursues the selected power target; it
does not minimise the complete electricity bill or optimise the battery investment. Reserving
energy can reduce PV self-consumption, and preventive grid charging incurs energy costs and
conversion losses. Those costs can exceed the capacity-tariff saving, especially when capacity
is scarce. Conversely, sufficient capacity and power can make peak shaving financially beneficial.
A particularly low target can require a large share of the usable battery capacity to remain
reserved for peak shaving, leaving less energy and storage room for self-consumption and
solar surplus. The resulting loss of self-consumption value and extra charging costs may
outweigh the capacity-tariff benefit. Lowering the target therefore does not necessarily
improve the financial result.
Peak shaving without price control keeps the requested target active even after a higher peak
has occurred. The combined causal mode instead protects against further increases above the
already measured monthly peak and revalues the reserve accordingly; the next month restores
the requested target.
Price control without peak shaving screens individual purchases using expected margins,
PV opportunity value and the incremental capacity-cost test. The combined causal mode instead
jointly schedules the available stored energy, purchases and expected solar surplus, subject
to mandatory peak protection and the economic waiting deadline. Optimising those forecasts
does not guarantee the lowest realised bill: forecast errors, unused purchased energy, a later unpredicted monthly peak
and differences between a twelve-month assumption and the supplied reporting period can change
the eventual benefit. Price control without peak shaving creates no peak reserve and adds no
peak-specific discharge. Those peak functions remain active only
in the modes that explicitly include peak shaving.
Compare the simulated total costs and financial results for the selected profile, tariffs,
battery capacity, power and investment rather than assuming that an additional control function
necessarily increases the return.