feat(prediction): model residual battery discharge during Freeze Export - #4575
feat(prediction): model residual battery discharge during Freeze Export#4575PlainSeer wants to merge 1 commit into
Conversation
|
Seems like a good idea, but 'loss' implies a factor and not a value. Is it really losing this 240w or is it just discharging at 240w rate? |
|
Yes, that’s a better description. The AlphaESS is not showing a percentage/factor loss; the battery is continuing to discharge at roughly 230–240 W while Freeze Export is active. I used “loss” to distinguish it from normal house/grid discharge, but inverter_freeze_export_discharge_rate would be clearer and better reflects the measured behaviour. |
ea05696 to
03a49f1
Compare
96f669f to
03a49f1
Compare
03a49f1 to
842d699
Compare
842d699 to
cac38ab
Compare
|
Superseded by #4651, which carries this feature forward on top of current `main` with fixes from review (mostly avoiding a startup crash on a blank `apps.yaml` value, and documenting/registering the new setting) — your original commit is preserved as the first commit there so the implementation stays credited to you. Thanks for the AlphaESS investigation behind this! |
Summary
Adds an optional prediction-only setting for inverters that continue a small residual battery discharge during Freeze Export:
The value is battery-side watts and defaults to
0, so existing behaviour is unchanged unless explicitly configured.Why this is needed
On the measured AlphaESS system, Freeze Export does not hold battery power at exactly zero. The battery continues to discharge at a low residual rate.
An earlier version of this change modelled that energy too narrowly as only supplying remaining house demand. Further live measurement showed that this is not the full behaviour.
During Freeze Export, the residual battery discharge enters the normal AC-side power balance:
This directly addresses the review concern about where the battery energy is actually going.
Observed behaviour
A live AlphaESS measurement showed approximately:
The remaining house demand after PV was only about 21 W, so the observed grid export confirms that the Freeze Export residual battery discharge is not capped at house demand.
Implementation
During Freeze Export, the configured residual battery-side discharge is fed into PredBat's normal energy-balance path.
The model now:
The configured residual discharge is only applied when Freeze Export is active and the battery is not already being charged.
Tests
Regression coverage verifies:
0 Wpreserves existing behaviour240 Wfor one hour removes0.24 kWhfrom the batteryThe native prediction kernels were rebuilt for all supported architectures, and the fork's normal
code-qualityCI passed on the final implementation.Scope
Prediction only.
This does not change inverter commands, charge/export control, or Freeze Export control behaviour. It only improves PredBat's prediction model for inverters that exhibit this residual discharge behaviour.