Feature: Automated Solar Clipping Mitigation (using native clear-sky models)#4086
Feature: Automated Solar Clipping Mitigation (using native clear-sky models)#4086rholligan wants to merge 95 commits into
Conversation
… for flexible clearsky overlay
… to match legacy mockup
…o enable historical tracking
…e alignment mismatch
…er clipping_buffer_forecast_kwh is calculated
…e penalty by 12x, allowing negative grid rates to override clipping buffers
|
I'm very excited about this. I think this is the correct approach. The cloud model that mixes with the 90% solar scenario isn't sufficient to model the sporadic full-intensity bursts from clear skies between clouds. And Solcast's "peak power" is nowhere near the actually-observed peak power. So I think using this "clear skies" model instead (or in addition) is exactly what's needed. |
|
@rholligan thanks for this! I’m experiencing regular clipping at the moment so I’ll give this a spin later today and let you know if there are any issues. |
Hey @jkpe, Glad you’re giving the clipping buffer a spin! It's been working really well on my setup (6.4 kWp array / 5 kW inverter) over the last weeks, the battery gets just enough head room before peaks to prevent clipping, and the Please let us know how it behaves on your system and if you have any unique configuration we should accommodate. @springfall2008 – any update on the review status? Let me know if there’s anything we can do to move this into main. |
|
Apart from installing https://github.com/autoSteve/ha-solcast-clearsky do I need to make any changes to my Solcast configuration or integration? I’ve got a 5kW inverter so I’ve got that set as my AC limit on Solcast’s website, or should I remove this so that we’re getting unclipped data? I think Solcast clips it for you if you set an AC limit. |
As you say, set Solcast to your actual array capacity, and let Predbat handle the clipping calculation (so in my case I set both |
Introduction:
This PR introduces a native clipping buffer to Predbat. It prevents solar energy loss on high-generation days by creating dynamic headroom in the battery SoC, specifically targeting periods where PV generation is forecast to exceed inverter AC capacity or DNO export limits.
This implementation integrates with the existing cloud model. It extends
SolarAPIto compute and store newpv_clearskyarrays (supporting multiple native upstream sources likeha_solcast_clearsky,solcast_api, andopenmeteo). Clear-sky arrays are used alongside a lightweight auto-tuner to safely estimate peak generation and align it with hardware limits.Resolves issue #1206, supersedes PR #4036.
Key Features:
ha_solcast_clearskyintegration alongside a robustclipping_auto_tunemechanism. This explicitly accounts for those short "break in the clouds" spikes, ensuring the buffer is safely sized even when the standard hourly forecast is smoothed out.solcast.pywith safefloat(val or 0.0)casting to gracefully handle missing HA clear-sky sensor history without crashing.Configuration Parameters:
clipping_buffer_enable: Master toggle for the clipping buffer feature.clipping_clearsky_source: Selection of clear-sky forecast source (recommendsha_solcast_clearsky). This setting is fully exposed in the Home Assistant configuration panel.clipping_use_clearsky_peaks: Toggle to use Clear-Sky generation arrays rather than standard PV forecast arrays to size the buffer.clipping_auto_tune: Automatically learns the scale difference between standard forecasts and hardware limits based on past clipping behavior.clipping_amplification: Manual multiplier for the standard solar forecast (used if Auto-Tune is disabled).clipping_cost_weight: Multiplier to add a harsher financial penalty for clipping, forcing the optimizer to prioritize creating headroom.clipping_limit_override: Manual configuration of the inverter AC ceiling in Watts.clipping_buffer_max_kwh/start_time/end_time: Manual settings to force a fixed static buffer size and time window instead of using the dynamic calculation.Developed with Gemini ✦