+2 votes
253 views
by Ioannis Poursanidis (71 points)
Hi,
I have developed a rule-based controller in Python language for the active power management of a renewable energy community (microgrid) that I am developing.

What options do I have for integrating the controller logic into my model in the Schematic Editor? Shall I transform the code to a C-function, first?

Is there any tool for the automated mapping between my Python code to a C-function?

Any other potential suggestions/solutions?

Would be happy to get some feedback!

1 Answer

+1 vote
by Ricardo Morim (152 points)
selected by Dusan Kostic
 
Best answer
Hello Ioannis,

If you want to do the integration in the Schematic Editor, you would need to code it in C or by using the library components.

Depending on your timing needs for your controller and its complexity, you can run python code in the SCADA environment setting the references for your model (for instance using macro component in SCADA).

Regards,

Ricardo
by Ioannis Poursanidis (71 points)
Thanks Ricardo.
My inputs have a granularity of 1s. If that is not enough, I can interpolate to 'msec' as well.

My controller is a simple rule-based controller for charging/discharging a grid-following battery. Nothing too sophisticated.

Thanks for the helpful and  clarifying feedback.
Best,
...