Sebastián Escobar Rojas
This research introduces a real-time distributed co-simulation architecture designed for modern electrical systems. The framework seamlessly integrates MATLAB/Simulink for dynamic system modeling, the OPAL-RT OP4200 platform for rigorous Hardware-in-the-Loop (HIL) simulation, and Connext® as the high-performance communication layer. By executing Simulink models on OPAL-RT’s dedicated digital simulator hardware and leveraging RTI Connext to share data in real time via a publish-subscribe model, this architecture provides a highly robust methodology for evaluating complex electrical grids under strict distributed and real-time constraints.
The proposed co-simulation framework is structured into two primary nodes, entirely decoupled and interconnected by Connext:
Node 1 (Master & Control): Integrates the Master Subsystem (MS) responsible for power generation and the Control System (CS). It calculates and publishes the system's state variables.
Node 2 (Electrical Load): Models the consumption device (e.g., an R-L-C network). It is excited by the Thévenin equivalent voltage source (V_MS) received from Node 1 and dynamically returns the demand current (I_demand) back to the co-simulation loop.
To ensure deterministic, real-time interaction, communication is governed by a strict signal contract divided into two distinct flows: Flow 1 (Node 1 --> DDS) and Flow 2 (Node 2 --> Node 1). Both flows use DDS to communicate between them.
This architecture leverages Quality of Service (QoS) policies of Connext to optimize data delivery for HIL testing. The communication layer is explicitly configured to prioritize the most recent data sample and completely eliminate message queuing. This ensures that the simulation loops never suffer from stale data or artificial delays, maintaining strict temporal alignment between the physical hardware and the digital models.
In summary, this work successfully demonstrates the feasibility, scalability, and good performance of a distributed real-time co-simulation architecture built on Connext and OPAL-RT. By establishing rigorous experimental guidelines, this research quantifies the direct impacts of network latency and sampling granularity on both temporal and electrical metrics. Ultimately, it offers a highly replicable, industrial-grade foundation for future studies in smart grid integration and distributed power systems.
code