-
Notifications
You must be signed in to change notification settings - Fork 66
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
[Tester Wanted] Feature: DPL: support for multiple inverters #1216
base: development
Are you sure you want to change the base?
Conversation
96b0689
to
0c1909e
Compare
Läuft seit heute im Produktivsystem meines Vaters mit 2x hm-600, aufgefallen ist mir auf die schnelle, das sich die regel gschwindigkeit der DTU addiert, was aber irgedwie logisch ist. 1 sek = 2 sek pro wechselrichter. Ansonsten läuft es bestechend gut, bei leistungen ab 300w sind die wechselrichter nahe bei einander 155w/145w o.ä. Bei kleineren leistungen hab ich auch schon 45w/93w geshen. Das eingestellte Limit wird jedoch tadellos getroffen. Ansonsten ist mir soweit nichts negatives aufgefallen 😁 Da das Sytem leider nicht bei mir steht, kann ich leider nur alle paar Tage draufschauen. Laut Shelly ist der Verbrauch aber da wo er sein sollte. Vielen Dank @schlimmchen für deinen betriebenen Aufwand. Funktioniert grossartig bis jetzt 👍 Soll ich bei Gelegenheit irgend etwas speziell testen? Lg |
@DonJohnLong Vielen Dank fürs mutige Testen und deine Rückmeldung!
Naja, nachregeln sollte eigentlich so schnell sein wie zuvor, denn es sollte in aller Regel ja weiterhin nur ein Inverter ein Update erhalten müssen, um den neuen Haushaltsverbrauch zu kontern. Wenn du allerdings vorher nur einen WR an je einer OpenDTU hattest, dann dauert es natürlich etwas länger als zuvor. Da möchte ich noch dran schrauben, aber bisher sind wir da auf 1s zwischen den WR und 1s Pause zwischen den Runden beschränkt. Dass die Leistungen der Inverter nahe beieinander sind ist nur ein Bonbon und kann nicht garantiert werden. Es kommt drauf an, wie der Haushaltsverbrauch schwankt und wie die Hysterese eingestellt ist, etc. Aber in der Tat, wenn die Hysterese klein ist und die Inverter gleiche maximale Ausgangsleistung haben und die PowerMeter Schwankungen eher klein sind, aber größer als die Hysterese, dann nähern sich die Leistungen über die Zeit an.
Lieb, dass du fragst, aber ich finds schon total super, dass du hilfst zu testen und Rückmeldung gibst, ob dir etwas negativ auffällt, das ist erstmal mehr als ausreichend 💪 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
installed the build today and apart from not seeing the power limits in the webapp it seems to do its job so far. Thank you very much for implementing this, I will monitor the behavior closely and report if I stumble upon anything out of the ordinary👍 edit: small correction - I can see the power limits now (was "0" before for both already working inverters) |
No worries and no rush. Let's do a maintenance release soon to fix issues users reported, then take a couple of weeks to finalize and merge this as well as other features/PRs (which there are quite a lot all of a sudden).
Yes. This |
Fancy dashboard. So what you haven't observed, obviously, is that one inverter might be off for a longer period of time simply because it is not needed. This night, my inverters were shut off as the battery was depleted. After solar power was available again, one started producing power (the bigger one with 2kW output, as that is sorted to the front of the queue). Since then, there was no situation where the first one produced at least 500W such that the second one (1.5kW output) would have been sorted to the front of the list as more power was needed. I don't like that. I anticipated that this could happen while writing the code, and I think I am going to sort inverters in shutdown to the front of the list when an increase is needed. This still requires a jump of at least the lower power limit of that inverter such that it will turn on, but I guess that happens rather frequently, even if it's not a busy day. Also I want to find a way to decide when to sort the list by a different metric, i.e., such that the output power of both inverters align (in absolute output or relative output?!). Probably it's a good idea to so that every time any inverter can take the update to achieve the new total output. |
I thought that we want to keep the number of active inverters low to prevent that we are running them on low limits which results in the output not being what we set as the limit (HMS-2000 below 15%) and because every extra MPPT brings more voltage variance in to the system. Please correct me if i misunderstood something. |
Hm. Good point. Do you have suggestions on how to implement it? Right now I did the implementation with the opposite assumption in mind. In particular, an inverter will not be turned off unless it has to be. I need to think about that a little. And if we do it like this, I really think that there needs to be some kind of load balancing to spread the aging across the inverters somewhat evenly. Maybe we keep the inverter running which, proportional to its max output, has produced less energy? However, it would also be very nice if we switch inverters based on their temperatures, so that we allow them to run cooler? You opened a can of worms 😉 |
0c1909e
to
5cb9b75
Compare
I would like to test this once i am back home and can flash my devices. |
Nice!
No, why do you think so? The answer is no because the current implementation sorts the inverters by the amount they can increase or decrease their output, and the one with the biggest difference is at the front This means only one inverter is updated at a time.
Are there other reasons from your perspective other than the speed argument, which I think is not a concern? |
Efficiency and Simplicity If one inverter is enough to cover the household, it should be more efficient as two running at low load. |
thank you, I can see your points, very good arguments! let me skip waiting for inverter data if the inverter is currently not in use to speed up the DPL loop, possibly considerably. and let me change the "algorithm" to use as little inverters as possible. I still need to think about it, though. any ideas from you guys? |
To be honest i dont think its as easy to say that the minimum number of inverters is the best way to go. If we are close to the limit of the first inverter we will have issues to react to increased power requirements quickly. Because it takes before production starts and because we need to reach the minimum limit of the second inverter. what about setting an upper limit of, i dont know, maybe 75% and then we start a second inverter to be able to quickly increase the output? |
I also think it’s better if all inverters run in a low but stable level. I’m not to sure if efficiency is a real problem. A inverter at 70% load may be more efficient than on 15%. But losses across the cables will be lower when using two inverters, as you reduce the current for each pair of cable and so you basically double the wire diameter. And I think two inverters at 30% are cooler than one at 60%. Low temperatures are better for the hardware in the long run I don’t know if the inverters need to reach their lowest limit where they can hold the desired power (like ~15% for the HMS-2000) or if it’s enough when the first one runs stable (10-15W per MPPT, so no communication errors but also not reaching the target limit) and the second produces the missing power to hold your overall power target.
is that true? I thought it doesn’t matter if the inverter is stopped or does produce, as long as it’s not disconnected from the grid or restarts. The first start takes time for grid Synchronisation, but after that it is quite fast, I thought. |
I read this and I am not confident that we can reach a common ground in this. Maybe we don't need to. It is understandable that ine strategy does not fit all use cases or setups. Using different sorting of the inverters, I think we can quite easily implement very different strategies. Towards the extremes, all inverters should be on or off in any case. So I dont' think that changing the implementation design to iterate the sorted inverters and call the respective increase or decrease method is required. It is also easy to drop an inverter from the sorted list, if the sorting strategy decides that it does not want an inverter to be considered in the current round. The algorithm could also cap the increase or decrease for the current round. Adding methods for that to the DPLinverter class is straightforward. The implementation of these strategies can go into their own class each, implementing a particular interface, which is simple to read and maintain. I had this in mind before, that's why I was very happy with the approach to sort inverters, as I realized that this could easily be adapted. We can make this even more flexible as described above. |
This comment was marked as resolved.
This comment was marked as resolved.
Fixed ✅@AndreasBoehm There are two problems here:
Done ✅Also, I continue to get headaches thinking about how to tweak the methods that calculate the possible reduction/increase as well as those applying them, because they need to deal with solar-powered inverters as welll as battery-powered inverters. I think I want to split PowerLimiterInverter into PowerLimiterSolarInverter and PowerLimiterBatteryInverter (with PowerLimiterInverter being an abstract base class). Unfortunately, we then have to organize the instances using pointers to the base class... However, since I already use a deque, those objects already "float around" in the heap. |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, of course. I did not want to suggest that you are at fault, I just wanted to point out how you managed to trigger this issue. Good job 😉 However, I still maintain that your lower limit is too low, given the joint experience we shared in this project. Did you not notice that the inverter is shutting itself off at these low limits? Is the DPL restarting the inverter because of that (check the logs). Maybe your specific inverter is not prone to shutting itself down due to oscillations... |
This comment was marked as resolved.
This comment was marked as resolved.
I have observed the oscillations until the inverter shuts off with my HM-1500. My HMS-2000 never had very low limits set. Mine is week 31 of 2023 and has firmware 1.0.16. My das has one such model as well, and one the same as yours. Maybe I will torture them with very low limits and see how they behave -- some day. |
Fixed ✅There is another stupid mistake, another underflow: It occurs if some non-DPL-managed inverter or completely other power source makes the power meter value go "too negative". The DPL will consider the DPL-manged inverters' output, but if the result is still negative, we (I...) interpret this value as an Log when requested power value underflows
Kudos to @AndreasBoehm for showing us that collapsible sections are available in Github comments. ❤️ |
Fixed ✅Aaaand another stupid mistake... This is definitely not as robust as I had hoped 😞 At least not yet... My HM-1500 is not turned off even though the battery stop threshold is reached. That's because it has a limit of 49W set (guess that's a rounding error), whereas the lower power limit is 50W, so the Log of inverter not being shut down
|
67c03f5
to
1fe0a60
Compare
91cc2fc
to
8ff94e7
Compare
if an inverter is unreachable or it is not configured to receive commands, the DPL cannot control it and as such it cannot be considered when trying to match the household consumption.
avoid picking up settings from the previously added or edited inverter when adding a new inverter by creating a new object instance.
this change allows to support overscaling for all inverters, as the configuration of inputs (which one is part of a particular MPPT) is now provided from withing the code. this information is used to implement overscaling for any of the inverters (which are generally compatible with OpenDTU(-OnBattery)).
* avoid v-show, use v-if * do not add space to top of first card * fix table with managed inverters
in order to avoid a negation, the switch is re-labelled to "use voltage thresholds only". the hint text explains that SoC thresholds can be configured once the switch is turned off. this also allows to move the switch to the voltage thresholds card, so the whole SoC thresholds card can be removed if the switch is enabled. as the usage of SoC thresholds is not recommended in general, the default value for "ignore SoC" is changed to true.
* remove the table of managed inverters with the row element before it, breaking the style of the webapp itself. * ditch the modals: all inverter settings are now visible if the respective inverter is selected to be governed. * solves the issue where changes to the inverter settings are not applied when the modal closes, as is expected by the users, but only when the whole DPL settings form is submitted. now it is intuitive that changed settings only apply once the whole form is submitted.
4766f79
to
236c172
Compare
@AndreasBoehm I fixed that in babb24a already (start of September, part of the development branch). However, for systems initialized with a firmware that did not include that fix, the values 100 are already part of the config. We could limit those values to 66 when reading the config. I am not sure it is worth even those two lines of code, as I am confident that the amount of affected users is very low. And the workaround (update the fields manually after the browser complains) is easy to apply and needs only be applied once. |
Hey @schlimmchen thanks for your response. How long until the inverters work as expected again? Regarding uptime of DTU, I've noticed that if I enable any of the verbose logging settings, DTU is not stable and often crash. |
@schlimmchen: Danke für die Rückmeldung. Zu Deinen Fragen:
Ich meine damit, dass falls ein Inverter mit gutem Wirkungsgrad die geforderte Leistung erbringen kann, kein weiterer Inverter laufen muss. Ein zweiter Inverter sollte aber automatisch aktiviert werden, wenn der Wirkungsgrad des ersten Inverters sinkt und spätestens dann, wenn der laufende Inverter an seine Maximalleistung kommt und noch mehr Leistung gefordert werden muss. Das hat bei mir nicht zuverlässig funktioniert. Bei abnehmendem Leistungsbedarf und geringer Aussteuerung kann dann ein Inverter abgeschaltet werden, wenn ein Inverter allein die Leistung erbringen kann.
Die Grafik zeigt, was heute passiert ist: Legende: Sinkt die Batteriespannung unter 50V, steuere ich den DPL in den Modus 1. der Huawei ist im Modus 3 und wird durch den POWER-Pin gesteuert AC-seitig ein- und ausgeschaltet. Steigt die Batteriespannung über 51V wird der DPL in den automatischen Modus 0 geschaltet. Da die Batterie am Morgen fast leer war, beginnt der Ladevorgang um ca. 10:15 Uhr. Um 10:38 ist die Batteriespannung über 51V und der DPL geht in Modus 0. Die Inverterleistung steigt kurzzeitig auf 1170W (davon macht der HM600 etwa 70W) und der Huawei liefert keine Leistung mehr. Danach wird die Batterie weder geladen noch entladen. Der Netzstrom wird nicht auf Null geregelt. Erst als ich um 14:18 Huawei und HM1200 über die Web GUI wieder manuell einschaltete, wurde der Netzstrom wieder ausgeregelt. Ich erwarte, dass nach DPL-Moduswechseln oder nach dem Einschalten die Inverter entsprechend aktiviert werden und der AC-Charger nicht seinen Betrieb einstellt.
Vielleicht lag es daran: Ich hatte nach der Limit-Änderung die DTU nicht neu gestartet. Wenn die Batterie mal wieder etwas voller ist, werde ich die neue Version testen. Wenn ich die neue Version wieder OTA flashe, muss ich die Konfiguration wieder anpassen oder sind die Konfigurationsdaten, die in der single inverter Version nicht benötigt werden, noch vorhanden? |
@schlimmchen Its fine as it is now, code has been fixed, browser complaints can be resolved by the user 👍 |
Ich habe gerade die Version [b82de85] geflashed. Zuvor lief die Version 2024.10.22. Nach dem Start arbeiten Inverter und Huwaei gegeneinander (siehe Grafik, Legende wie oben). Der Strom fließt somit im Kreis. Der Inverter liefert konstant ca. 320W der Huawei regelt den Netzstrom auf etwa 0W. In der Konfiguration des DPL sind die Inverter unbekannt die Limits aber schon: Nach dem Löschen der unbekannten Inverter und Neueinfügen der beiden Inverter bleibt der Kreisstrom bestehen. Fazit: Huawei macht, was er soll. DPL arbeitet leider überhaupt nicht! Edit: Zurück auf Version [509c062]: Da arbeitet zumindest der HM1200 wieder, wie er soll. Das Problem mit den Leistungslimits konnte ich leider nicht mehr untersuchen. |
Das kommt drauf an, ob du zwischenzeitlich aus irgendeinem Grund die Konfiguration (irgendeine Änderung, muss nicht DPL sein) gespeichert hast. Leider muss ich dir ehrlich gestehen, dass ich deinen Ausführungen nicht folgen kann, bzw. dass ich gerade keine Kapaziät habe, mich da ne Stunde reinzufuchsen. Ich hab verstanden, dass das Zusammenspiel mit dem AC charger nicht mehr so funktioniert wie vorher. Das schauen wir uns dann nochmal im Detail an, sobald dieses Feature im development branch gelandet ist. |
@schlimmchen: Ich habe heute noch einmal mit Version b82de85 einen Versuch gemacht mit folgender Konfiguration des DPL: |
@dragricola Das sind ja schöne Neuigkeiten. Danke, dass du es nochmal versuchst hast. Es ist normal, dass nur der vorher ausgewählte Inverter im DPL "aktiviert" wird. Weitere Inverter musst du dann erst auswählen ("Steuere Wechselrichter "). Also der HM-1200 sollte von selbst ausgewählt worden sein, und dass du den HM-600 erst zuschalten musstest, ist normal.
Da müssen wir im Detail nochmal genauer hinschauen. Also ganz frech behaupte ich, dass das korrekt funktioniert. Aber wir sollten zumindest eine Erklärung finden, warum du diesen Zustand beobachtest. Kannst du mal künstlich (bei genügend Batterieladung) eine große Last erzeugen und mal die Konsolenausgaben zeigen? Bist du denn sicher, dass der HM-1200 in diesem Zustand nicht schon bei einem Limit von 100% ist und schlicht keine 1200W erreicht (Verkabelung suboptimal beispielsweise). Das erscheint mit einigermaßen plausibel. Auch bei meinem Vater ist das so, der hat nicht auf mich gehört und die DC Leitungen unterschiedlich lang gemacht bei seinem HMS-2000 und der kann nur maximal 1800W. |
I am delighted to share this changeset with all of you: This implements my approach to support multiple inverters by the DPL.
Design
Very shortly (to be explained in the docs in detail):
Status
Still a work in progress, but usable. My setup is running variants of this implementation since early September and from what I see it does what it is supposed to do.
OpenDTU-OnBattery/src/PowerLimiterInverter.cpp
Line 267 in 96b0689
PowerLimiterInverter::isValid()
and integrate intoPowerLimiterInverter::create()
.PowerLimiter*.cpp
files that need to be addressed.v-show
in DPL admin view of web UI.Preliminary Results
These logs are now outdated, as the implementation progressed since they were recorded.
Breakfast:
The power meter reading is not very impressive 😞 I hope that it is okay since the issue of stoves using power in intervals is well known. The resolution of the power meter graph is only 10s. I don't know why, it should be 1s, I never bothered to check.
Testing
As stated above, this is usable, at least for systems with multiple battery-powered inverters, and I deployed it to my productive system with one HMS-2000 and one HM-1500. I would be very happy to receive your feedback on this. Firmware can be downloaded from the respective PR build run.
Please do not open issues but answer to this PR when giving feedback.
Related
Closes #230.
Closes #1032.
Closes #1071.
Closes #1387.