-
Notifications
You must be signed in to change notification settings - Fork 44
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
Predbat lets the battery discharge when 'hold charging' #435
Comments
It could be similar to the ticket I just raised at #443 where reserve and target soc are the same? |
I did wonder that myself @slopemad . I have seen this behaviour as well where the soc bounces either side of the reserve. The particular issue above was predbat changing its mind about the plan every 5 minutes it ran. Swapping from a charging plan to a 'hold charging' plan, but as I noted, some of the hold charges are with 4% reserve and so the battery then discharges. As you say, not good for battery cycles (as well as being not efficient with charging losses etc) |
Would setting the reserve say 1% higher than the hold level have any impact? |
If someone gets a chance to try this fix on main that would be great: 8700fcd |
Probably...
OK, so I was stil on 7.13.26, so I've just upgraded to 7.14.6 and will then see how that looks then have a try of this beta. |
I'll try this fix Trefor Here's the previous plan on 7.14.6: All the hold charges are with the soc on 4% so it might be a bit before I see what difference it makes |
I did some testing (without installing beyond 7.4.16) of various different values of target soc and reserve, and found the only way to reliably stop it going through regular charge and discharge modes was to set reserve to 100. Setting reserve to target + 1 (or +2) was not reliable for whatever reason. |
@springfall2008 I'm running the main version 8700fcd Two observations of behaviour today. First at 13:10, plan was hold charging with limit 33%. Actual soc was 44% so the battery discharged down to the 33% reserve. Following slots were cheaper so this may well have been a sensible plan, maybe a bit confusing to call it hold charging when it's actually discharging to a limit? |
Yes its a naming thing, hold charge is when the charge % is above the target and so it will hold at the given level once it's reached. Any ideas how it could be better described? I use the word 'charge' to mean importing from grid and 'discharge' to mean exporting currently. |
Logfile from 13:00: And 19:30: |
I think the problem is that 'charge' implies its charging, whereas its not, it could well be discharging. Maybe 'hold battery level'? But even then its open to mis-understanding because its only 'hold' when the battery reaches that level and if its above, it'll still discharge. |
Well tracked down I think I have found the bug, during a charge freeze when charge hold is enabled it disables charging and tries to hold on the reserve, but the reserve is set to the target (4%) rather than the current SOC and so it fails. I'm going to push a fix to main shortly. Also in your log you still have tweak optimisation enabled, I think I might just remove it as it doesn't help. |
I've made a fix on main, please can you beta test it for me? |
Great thanks Trefor, that does sound like it. Do you know why it's swapping between charging and hold charging over the slot, why not just charge for the whole period? Load for the next period is 1.43kW, which needs 27% charge of the 5.2 battery to support that. Even if the battery charged for the full 30 minute slot, it'd only charge 1.3kW into the battery so a full charge would have been justified I'd think? I turned the tweak optimisation on as the advice in the docs was that it could give slightly better results with agile tariffs https://springfall2008.github.io/batpred/customisation/ |
I think the swapping is as the hold isn't working, hopefully that will go away now. Let me know what you think, I can put the tweak back if it helped but it seems to had broken other stuff |
Will do. Might be tomorrow before it next tries hold charging |
I just spotted a bug, the nice re-format script showed I missed some brackets - now fixed! |
I think some of it comes down to losses, discharging effectively incurs a round trip loss (as you have to charge it back later as well). If you turn on plan debug you can see the rates after losses. Tweak plan was removed although maybe I should keep it as an advanced feature for now to see if it helps or not... |
I'm moving the points I was making about future slot plans to a new issue #449, so as to keep this one focussed on battery discharging when in hold charging mode. @springfall2008 Should I install the latest 7.14.7 or remain on the main branch? I will have a look what happens next time hold charging is planned/executed |
I released what was on main this morning but with the tweak optimisation still supported and some other documentation updates so yes please update. |
I think this is fixed now, I'm not seeing the hold charges being set to 4% soc which was causing a full discharge. I do see some discharging when in hold charge, eg this morning, plan was Hold Charge to 91% but actual soc was 98% so the battery discharged down which is fine. Maybe the label "hold charge" is a bit misleading and not always obvious what the intent is (compared to Freeze Charge and No Charge) |
Thanks for the fix |
Annoyingly some inverters refuse to be set to 100% reserve so I've had to make the default 99% (can be changed in apps.yaml). @gcoan - I should probably try the hold charge with the scheduled charge turned off? |
@springfall2008 I have to say I don't understand it. Last night as shown above #435 (comment) hold charging definitely wasn't working, but earlier in this issue #435 (comment) I have screen shots where hold charging was working and the battery wasn't discharging below reserve. In both cases scheduled charge wasn't set. The only difference I can see between the two is that in the non-discharging example the current time was not within the charging period set on the inverter, whereas on the last night example where hold charging didn't hold, the current time was within the inverter charging period. In both cases the inverter wasn't within the discharge period start/end times. This makes no sense to me. @slopemad I agree, it looks like an inverter bug and at best predbat has to work around it. I've also just turned predbat into read-only as well and set the battery to Eco to let it support some of the higher rate load this morning. Its very marginal, would have thought it'd have been better to hold/freeze charge at 09:00 and through the morning (then charge in the afternoon) rather than charge the inverter at 20.95p when cheaper slots are coming |
@gcoan I don't understand, what are you asking it to do? The battery reserve is 52%, the SOC is 51%, the battery isn't discharging, which sounds like desired behaviour from that current configuration? |
Absolutely @slopemad this is the correct desired behaviour this morning, the battery charge was held. But yesterday evening it wasn't held, it discharged below reserve soc and I don't know why. Was trying to find what was the triggering conditions, but couldn't work it out |
That is definitely a bug I've seen in GivEnergy, so it isn't the fault of PB that the GE isn't working right. PB could work around it by setting the reserve soc to maximum (100 or 99 on those inverters which don't work with 100). But then, I've also seen problems with the inverter going into Eco (Paused) mode and then refusing to go back into regular Eco mode without a reset and reboot. |
So my G1 is on 3006, and whilst I've noticed missing SOCs before, I've never looked at it particularly deeply and indeed, I now consistently see that several SOC points are missing : these ones: At 13:25 I set target soc and reserve to 77, and ensured the inverter was in a charge window with enable charge turned on, and this is what I saw, a tiny bit of charge leaking in, but no discharge observed, so no oscillation... @springfall2008 perhaps there could be some kind of apps.yaml setting where a user could define a list of missing SOCs, and so if Predbat wants to set the target and/or reserve to one of these values, then it actually sets it to either one above or one below? |
10, 16, 22, 28, 34, 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 99% were missing for me as well (I have 2 x 5.2kWh), but it did vary a little depending on types / multiples of batteries that different testers had. The good news is that it is fixed in all the latest battery firmware updates and all numbers are available, although I realise not everyone is always keen to update the BMS if things are working well. |
Yep, I have a couple of 5.2 batteries, and while I think about it I'm also missing 99. QUite impressive they managed to invent a computer which can't count. It doesn't even appear to be a logical place for a naturally occurring rounding error to be introduced. My main aversion to doing the upgrade is that no doubt it'll start doing the big calibrating import between 4pm and 7pm. |
Start the calibration after peak rate and will be done by morning On 18 Dec 2023, at 21:51, slopemad ***@***.***> wrote:
Yep, I have a couple of 5.2 batteries, and while I think about it I'm also missing 99. QUite impressive they managed to invent a computer which can't count. It doesn't even appear to be a logical place for a naturally occurring rounding error to be introduced.
My main aversion to doing the upgrade is that no doubt it'll start doing the big calibrating import between 4pm and 7pm.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
closing this as not seen it happen for a long time and not sure where the issue was going |
Predbat has set the mode to hold charging which should be holding the battery charge, but it is in fact discharging:
I believe this is caused by there being a discharge schedule set that covers the current time period. If I change the discharge period end time, the discharging stops (the soc had reached 4% as well, but I have seen this happen before that changing the discharge time to not include 'now' stops the discharging when in hold charging)
The whole behaviour in this half hour slot is a bit weird, it turned charging on, then hold charging, now back to charging again:
19:35 charging
19:40 hold charging (but doesn't)
19:45 charging
Here's the logfile:
appdaemon (2).log
Gen 1 hybrid inverter
The text was updated successfully, but these errors were encountered: