batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Compare function giving consistently inaccurate data

Open discodancerstu opened this issue 8 months ago • 6 comments

Hi Trefor,

The compare function does not appear to be providing accurate results (for me anyway!); as you can see from the graphs and data below it is consistently under-predicting the cost.

Image

Our usage is pretty consistent.

Image

System setup -GivTCP v3 beta -PredAI -Dual Gen3 inverters, each with 9.5kw battery

apps(yaml).txt predbat.log cc2581ab_predai_2025-03-21T11-02-21.052Z.log

discodancerstu avatar Mar 21 '25 11:03 discodancerstu

I wouldn't say mine is perfect, but its a reasonably good prediction, and with the heat pump the usage varies day to day anyway:

Image

Would be checking your losses firstly to check whether they are sensible, and look at load_scaling because if this is set it will put the prediction off. Have a look at how accurate your solar prediction is and your blend of PV10/PV50

The compare is just running the predbat prediction engine for each tariff so if your prediction factors are off then that would explain the issue

gcoan avatar Mar 21 '25 11:03 gcoan

Thanks, yes I agree the usage varies a little but mineis very consistent.

I'm unsure how to look at losses etc, please can you explain?

Also PredAI is regularly adjusting the forecast to 0.0 on the plan for a whole day, I can't seem to understand why.

discodancerstu avatar Mar 21 '25 13:03 discodancerstu

the inverter and battery losses are described in the documentation here: https://springfall2008.github.io/batpred/customisation/#battery-loss-options

you can tweak these up or down if you find predbat is predicting more/less output from your batteries than you are achieving.

if predai is forecasting 0.0 load then this suggests a problem with the historical sensors that provide house load. Are you using the standard givtcp load sensor or a custom one, are you purging them too aggressively so there's insufficient history?

if there are gaps in the load history then predbat should fill them in (its in the logfile if this happens), but a zero load will really mess up your prediction and predbat can't guess from that

gcoan avatar Mar 21 '25 15:03 gcoan

Something is wrong with your PredAI data as the predicted load goes down

springfall2008 avatar Mar 22 '25 16:03 springfall2008

Something is wrong with your PredAI data as the predicted load goes down

Here is my PredAI yaml:

Image

And this is the sensor it is looking at:

Image

As I have dual inverters, this sensor only increments (as the GivTCP sensor decreases for some reason), it does not decrease.

So why would the PredAI predicted load reduce?

discodancerstu avatar Mar 22 '25 17:03 discodancerstu

I have run predai. It has generally performed well but I alternate its use with the HA standard historical data.

Like you, my predai.yaml is based on that provided my Trefor. I notice that your starting entity isn't a direct lift from the GE load energy entity. But I have 1 inverter. I obtained an AI prediction chart similar to yours. I also obtained a temperature chart using my weather compensation sensor for my HP as the source.

sensors:
  - name: sensor.givtcp_ce2218g352_load_energy_today_kwh
    #subtract: sensor.myenergi_zappi_20464051_energy_used_today
    subtract: sensor.myenergi_zappi_20464051_charge_added_session
    days: 14
    incrementing: True
    reset_daily: True
    interval: 30
    units: kWh
    future_periods: 100
    database: True
    reset_low: 1.0
    reset_high: 2.0
    country: UK
    max_age: 365
  - name: sensor.e3_tcu10_x07_outside_temperature
    days: 14
    interval: 30
    incrementing: False
    units: c

Rob

SwiftRR avatar Mar 23 '25 11:03 SwiftRR