Hi everyone,
I’m working on a microgrid simulation and I want to connect OpenDSS (for grid simulation) with OpenEMS (for energy management). My goal is to use OpenDSS to simulate power flows and send the data (e.g., voltages, currents, SOC) to OpenEMS, then let OpenEMS calculate control actions and send them back to OpenDSS.
Has anyone done something similar before? Is there any example or guideline available to interface OpenDSS with OpenEMS (e.g., via Python, Modbus, or JSON-RPC)? Any help, tips, or references would be greatly appreciated.
Thanks!
Sharokh
1 Like
Hi Sharokh, and welcome to the OpenEMS Community.
I myself have not worked with OpenDSS. You already mention the main possible ways of interaction. I assume the first decision has to be, which system is opening the connection, i.e. does OpenEMS push data to or poll data from OpenDSS or the other way around? Which interfaces does OpenDSS provide?
Regards,
Stefan
Hi Stefan, thanks for your reply!
My goal is to simulate a realistic and customized microgrid in OpenDSS, then interface it with OpenEMS to act as the energy manager. OpenDSS will simulate real-time voltages, currents, and SOC values, which I plan to push or poll into OpenEMS. OpenEMS will then run optimization or control logic and send the resulting setpoints back to OpenDSS to act as if controlling real actuators. Ultimately, I want this setup to mimic how my real microgrid would operate under an EMS. I’m also exploring the possibility of developing the optimizer/controller entirely in Python for greater flexibility, while letting OpenEMS handle integration, coordination, and communication with the simulated microgrid.
-
Does this workflow make sense for what I’m trying to achieve? (is there a better, more common suggested alternative way???)
-
Is it reasonable to keep the optimizer/controller logic in Python and still rely on OpenEMS for system-level integration?
Appreciate your insights.
Shahrokh
- Does this workflow make sense for what I’m trying to achieve? (is there a better, more common suggested alternative way???)
Yes, absolutely. As I said I have no experience with OpenDSS, but if it “should behave like an energy storage system” in OpenEMS, the most straight forward way would be to communicate via Modbus/TCP, i.e. poll power, voltage, SoC, etc. from OpenDSS and then send also the power-setpoint via Modbus registers.
- Is it reasonable to keep the optimizer/controller logic in Python and still rely on OpenEMS for system-level integration?
It’s possible, but not quite reasonable - at least in the beginning. We have been playing in the past with use-cases where we would use advanced python libraries for optimization - but you are just not there yet. In the beginning try to use one of the existing Controllers (like Balancing or Peak-Shaving). Once its working, try to adjust it. If you then feel, that you need to write your code in Python (and its not sufficient to let ChatGPT translate your code to Java…) then we can re-open that topic.
Regards,
Stefan