hoylabs / OpenDTU-OnBattery

Software for ESP32 to talk to Hoymiles/TSUN/Solenso Inverters, VE.Direct devices, battery management systems, and related peripherals
GNU General Public License v2.0
301 stars 63 forks source link

chore: Improve overscaling for shaded inputs #1089

Closed AndreasBoehm closed 2 months ago

AndreasBoehm commented 3 months ago

It seems that the inverter does not react to shaded/limited inputs as we thought it would, see issue https://github.com/helgeerbe/OpenDTU-OnBattery/issues/1087

I am trying to further improve the logic with this PR.

Changes

schlimmchen commented 2 months ago

rebased onto current development branch. @AndreasBoehm please mark as ready if that is the case.

AndreasBoehm commented 2 months ago

Thanks.

I am not happy yet with reducing the expected power to 95% as this only makes sense with a power limit of up to 15% on a HMS-2000, would like to adjust this based on the limit in percentage but i don't have numbers for other inverters.

Do you know if other inverters have the same issue with not reaching the expected power per channel with low limits?

schlimmchen commented 2 months ago

Nope. I only know that the Hoymiles inverters don't behave well when forced to produce little power. The symptom is that the output power oscillates until the unit decides to stop producing power under those conditions. At least when battery-powered.

AndreasBoehm commented 2 months ago

Okay. Using 15% as the barrier should be fine as this applies to the biggest inverter and will have less effect the smaller the inverter gets. what do you think?

schlimmchen commented 2 months ago

Sorry, I can't help you here. I can tell this: We discussed that each input (or MPPT?!) should produce at least ~12W, then the inverter output is stable. This is an absolute value, not a relative one. Also, I don't know what happens if a 4-input/4-MPPT inverter is set to 48W output power, which should be fine, but only 24W can be produced due to shaded panels. Are my comments even helpful? Again, sorry, I can't give input here. Maybe @spcqike can?

spcqike commented 2 months ago

@schlimmchen it does. but i think @AndreasBoehm means, what i described here https://github.com/helgeerbe/OpenDTU-OnBattery/issues/1087#issuecomment-2216787552

the HMS-2000 (at least mine) doesn't "work well" with limits <15%. it is stable (within 1% of its max range, so the power fluctuates between 10-20W) but unter 15% it doesn't reach the desired limit at all.

i haven't tried what happens, if i only want to produce 12W per channel, as that won't happen, i guess. my baseload is set to 250W. so i only tested from 10% to 30%. the results are shown in the table I linked above.

i guess @AndreasBoehm can increase the "shaded threshold" back to 98%, even so i can't see any disadvantages with 95%, yet.

my main problem was fixed by the fact, that the new limit will be send, regardless of shading or not. (option B) https://github.com/helgeerbe/OpenDTU-OnBattery/issues/1087#issuecomment-2212421721)

from retro perspectiv: my problem is a mix of unfortunate events. my baseload is 250W, which is < 15% and therefore will never be satisfied, as i (we) know now. Next my Shelly 3EM seems to have poor WiFi, so i have Timeouts every now and than. so the DPL switches to baseload, which is fine and desired. as i started using a powermeter interval of 1s (with your PR :D) the probability of having/hitting a timeout moment increased alot. so once a powermeter timeout occured, DPL set the inverter to 250W which it never delivered, so the overscaling algorhythm always thought that all inputs are shaded, which just wasn't the case, and never updated the limit.

option B now makes sure, that the limit is updated anyway. which, i think, the normal DPL does, too, doesn't it?

AndreasBoehm commented 2 months ago

Let me split that PR into two separate ones.

The first one to make sure to always set the new limit when > current limt (option B) and in the second one we can check which shaded threshold works best under what condition.

AndreasBoehm commented 2 months ago

@schlimmchen this PR is ready now.

github-actions[bot] commented 1 month ago

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.