Hello,
I’m trying to implement a supervisory control system using optimization codes in PSIM to generate the reference signals for converters in the simulation environment. The optimization code is written in C++ and implemented as a DLL block in PSIM. I’m using the Gurobi solver to handle the energy management optimization problem.
My issue is that the converter-level (primary) controllers in the simulation run with a time step of 1 μs, while the supervisory control operates with a time step of 15 minutes. I’m wondering how I can properly integrate this high-level controller and synchronize it with the local controllers to apply the converter setpoints. 
I’m looking for an approach that is as close to real-time implementation as possible, I’ve already tested an offline version before.