Skip to content

Improve convergence of DTU DPL algorithm by adding delta "Inverter Total Power" to "Current Limit" to power calculation #9

Description

@gitisgreat2023

Here I raised an issue which is in principle a DTU-OB issue.
Basically the DPL doesn't convergence to the target value (say 0 W) if the inverter total power doesn't match the limit set.

This can be avoided by adding the difference between the inverter total power and the limit set to the inverter to the power calculation.

@genmad
I could start messing in the code but I prefer to let you do that because I'm not experienced in Javascript and neither in the Shelly environment.

I have some programming experience howerver and look at the code. First in processHttpResponseForInverterPower the limit_absolute has to read out as well. (or a new routine is added, but I would generalize this process function and name it differently)
Then in calculateVirtualPowerReadings, when the limit_absolute is larger than the minRequiredPower_Watt, the difference between set (body.inverters[0].limit_absolute) and get (body.inverters[0].AC[0].Power.v) has to be added to line 262. It can be a negative as well as positive value!

My idea would be that we could show schlimmchen a proof of principle that it works stable and reliable in the Shelly environment. It's a bit slower as the Shelly adds delay to the feedback loop, but it should work in principle I would say. I would be happy to test it! Then it might make it as an improvement to the DTU-OnBattery code. Because in principle it's a DPL issue IMHO.

Did I oversee something? You think it's worth trying out?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions