-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
DPL: Design flaw causing unexpected limits to be set (only battery-powered inverters?) #1577
Comments
OptionsStop caring about the inverter's actual productionThis would mean we have to calculate the diff based on the inverter's current limit. Issues (assuming a stable power meter reading):
Stop caring about the inverter's current limitDPL says "please produce Issues:
We could assume that nudging occurs eventually as the household consumption is not stable anyways. We could also implement some sort of integral part "I" as in "PID algorithm", where the difference between the setpoint and the current value is integrated over time into the new limit. I guess this is the best approach. Unfortunately, from experience, I am no good at this. Maybe AI can help me out to come up with something reasonable. |
That's for sure. The good news are: "Were are several ways out of this issue" |
I would recommend using 2 different methods to regulate battery powered inverter. Method 1: Method 2: At first glance, this may sound contradictory, but I will explain why I think this is a good compromise. First, a few basic considerations of the situation. The P-Errors that come from the inverter can be reduced to:
Both problems interfere with the control loop. If you regulate according to the limit, then you have to live with the transfer function error and if you regulate according to the AC value, then you have to live with the AC measurement error and with the error of the transfer function. But if you regulate according to the power meter, then the two P-Errors from the inverter no longer play a role, because they are automatically corrected when method 1 is used. That changes, the moment, we no longer regulate according to the power meter. That is, when any power limits come into effect. For example, the lower or upper DPL power limit, but also other "limits" such as surplus power or battery limitations. Then the power meter is no longer part of the control loop. Now method 1 is problematic because both inverter P-Problems come into play. That's why my proposed solution is: If the power meter is in the control loop, then use method 1. Otherwise, use method 2. Just for the sake of completeness, I want to mention that there are other solutions. I've been trying to find a slightly more complex solution for a few weeks and it looks like this: I've eliminated both inverter problems. I replace the inverter AC measurement with an additional external AC measuring device (Shelly) and I correct the non-linear transfer function of the inverter using a transfer correction table. @schlimmchen, If I understood you right. "Stop caring about the inverter's current limit" is identical to "Method 1" |
See also this potential new feature. @SW-Niko @schlimmchen The two core parts: calculation of the mismatch Getting the data via mqtt:
@schlimmchen Since yesterday I switched to two inverters on one board, so I use your parallel DPL version now. (don't ask, after replacing the 4MB ESP32 with the 8MB ESP32, I can't get connection to the HMT anymore! Tried everything, swapping RF modules etc, no idea why its broken now. I'm a bit sad...). Edit: done implementing the shelly script for the parallel DPL version, see details here. |
What happened?
@Sorbat kept nagging me that the DPL would not work as expected. I kept nagging for proof in the logs. We finally found it, see below.
The DPL calculates how much more or less power the inverters shall produce to achieve the desired total output. The change is then applied to a list of inverters, one by one, until it is expected that the inverters will match the expected output.
However, the diff is calculated based on the inverter's actual output, whereas the diff is applied based on the inverter's current limit. If the actual output and the current limit don't match, which can indeed happen even for battery-powered inverters, the new limit will be way off.
To Reproduce Bug
Somehow cause the actual inverter output to be significantly different from the current limit and this issue will present itself.
Expected Behavior
The DPL must somehow take into account that the actual inverter output can be significantly different than the current limit.
Install Method
Pre-Compiled binary from GitHub releases
What git-hash/version of OpenDTU-OnBattery?
2025.01.23
What firmware variant (PIO Environment)?
generic_esp32s3_usb
Relevant log/trace output
Anything else?
No response
Please confirm the following
The text was updated successfully, but these errors were encountered: