-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminating the 15m charge/Export slots #1888
Comments
The most efficient plan would be a long charge, then a long discharge then a long charge finishing at the end of the cheap rate period with the battery at 100% 'long' is relative but basically to reduce inverter writes you don't want to be swapping between charging every 15 or every 30 minutes, just as few times as possible overnight |
yep agree - if there is a 2.5 hour window to play with as there is in my current plan, I would expect a big chunk of charge, a big chunk of export. I dont mind having one 15/15 split but having them consistently for 2.5 hours seems an odd choice. |
have you got combine charge slots on? |
have you tried turning combine charge slots off, this is giving the long charge block and maybe preventing the exporting happening |
strangely with having them both turned ON (with 24 hour plan in YAML), its planning to do a full export until the cheap window closes, also the day ends at 5.30am not at 24 hours. If I turn off |
I also dislike predbats tendency towards this oscillatory behaviour. I use a little bit of Metric Battery Cycle Cost to help tune some of this out. Start with 0.5 and see if it makes much difference. |
I've also noticed some odd plan durations when I was playing about with the charge slots - never really figured out why but I'll try and have another look. If you have 3 hours after you have hit max battery then it doesn't really make a difference if it does 15min on/off repeatedy or a single 90min on/off in terms of the end result, however Predbat will achieve a (slightly) more accurate discharge on the smaller slots because it is adjusting, so any unexpected load (eg heating system kicking in) will be accounted for quickly which is, I suspect, why the default is the short slots. Another advantage is that if there is a power outage, going 100>90% three times means the minimum battery level is 90% whereas 100>70% once means you could be left with 70% However, I don't think charging to 100% is most efficient as the last few % are often slower - I've tried adjusting the battery curve but that doesn't seem to stop it - it would make sense for it to go from wherever the battery curve is <1 but it doesn't seem to do that (I was expecting it to shift to 95>85%). Inverter writes is another good reason to do the bigger slots with fewer changes - lots of tradeoffs! |
OK, so I tested again. The only difference between the 13:45 plan and the 13:55 plan is that I had changed both predbat_combine_charge_slots and predbat_combine_export_slots to be set to True. Firstly, why does that change the end time of the calculations? I've noticed this before but surely that doesn't make sense and suggests there's a bug somewhere. Also, why does that stop Predbat from exporting from 16:30 to 20:00? On the original, it starts that period at 99% and plans to export for the entire four hours getting down to 9% Once the combine_slots are changed to True, it abandons that plan and for some reason only intends to export briefly, starting the next cheap rate period at 20:30 with 47% battery. The upshot is that when arriving at 08:00 tomorrow, the yo-yo charge/discharge cycle has a 'cost' of £2.57 but due to less planned export the combined plan has a 'cost' of £3.56. I'd like to combine the slots but the plan is far more expensive when doing so. |
Regarding calculations. It is somewhere in the documentation and Trevor mentions it occasionally. The plan is only fully calculated up to a few planned charges ahead. So if it schedules several charges then the accurate plan doesn’t go as far into the future. On your wider point a good place to be on IOG import and fixed export is combine charge=true and combine export = false. As far as price the combine plan looks expensive because it isn’t exporting before the cheap rate starts. Potentially a symptom of combine export slots. Or perhaps just my next point; I also find that generally two runs of the plan are needed to see something sensible after a setting change is made. |
I've been struggling to figure out how it works and which settings are best. Whilst the actual figures are wrong on my system (due to ad-hoc IOG slots disappearing) the comparison is all I have when changing the parameters. That does make it hard to compare changes later in the day as the total never matches the plan because of that issue. Having both = false should be more accurate but only because the in-day adjustments are more frequent and granular to account for solar/load differences. I don't really understand why the planned figures differ so much. With a given load and solar forecast and unchanged IOG hours, the amount of import/export should be very close between the combined and not combined as the amount of import/export planned will be the same, just divided up differently, so I was expecting the cost to be similar. The plan hasn't changed much after more/longer runs, unless you mean enabling predbat_calculate_second_pass is required? If I put combine_export back to false, then I again get lots of charge/discharge cycles overnight - this has two issues: a) lots more register writes (unclear on SE but better safe than sorry) |
I know its not letting Predbat handle it all automatically, but what if you set a force charge at 23:00 every night? I used to have a similar behaviour of Predbat doing a 3pm discharge that I stopped with the following automation:
|
I'm looking at this again today and trying to break it down, changing one flag at a time to figure out what the combine flag is doing. Looking at Export alone, there's definitely something wrong with the way Predbat is calculating export slots when I set it to combine them as it moves them far too early in the day. For some reason has put the evening export at 17:00 to 20:00 - I don't understand why it has moved that export slot so that it finishes three hours before the cheap rate starts. That makes no sense, because any increased load in the evening will cause grid import during the high rate period - I think that's probably why I'm seeing issues with the final costs. Something about combine_export_slots is moving that export away from the end of the period which is not correct as it should be at the end (which will move through the evening depending on load) but this way there's no way to adjust as the export will happen far too early. Having gone through the code, does anyone know why the export slots are hard limited to 4 hours? It seems like that could cause issues when they are combined for me - I have 29kWh of batteries and a 3.68kW export limit, so could, in theory export for almost 8 hours during the summer
|
I decided to change the code to increase the export slot limit to 8 hours and thought that might fix the early slot issue but it actually made it worse! Having changed that, it moved the slot to begin four hours earlier at 13:30, but that does mean there is 8 hours between the end of the slot and the rate change. Odd. Being curious, I changed it to 2 hours and that then move it to start at 19:00, ending two hours before the rate change. But, the comment suggests that the intent is to limit the overall duration of an export slot - this is now set to two hours, but the slot is still the same length of 3 hours that it always was, so this hardcoded limiting is not affecting the slot length but merely it's positioning within the possible export windows. Setting it below the other hardcoded value that is used in the calculations I don't think it is working as intended but can't quite figure out how to change things so it does. |
Describe the bug
I am trying to reduce or remove the 15m charge/export slots in the plan to 30m increments of charge or export (I presume it will also reduce writes to register too).
I've switched
switch.predbat_calculate_export_oncharge
off, but this gives me a plan that has eliminated all exporting:Interestingly, if I change the plan generation to 24 hours only, it shows a big export straight after charging (assume thats some kind of defect with the plan on 24 hours as no idea why you would export in the morning like that)
Expected behaviour
I want the plan to change the 15m charge/export to a 30m charge, then a 30m export, then a 30m charge etc..
Predbat version
8.11.2
Environment details
The text was updated successfully, but these errors were encountered: