## 3 Methodology
### Physical Testbed  
The integration and deployment of OT systems, particularly those using protocols like IEC-61850 GOOSE, require rigorous testing to ensure they perform reliably and securely in real-world environments. Traditional simulation-based approaches, while useful, often fail to capture the complexities of actual system behavior. This approach enables more accurate assessments of performance, network behavior, and potential vulnerabilities than purely emulated environments, offering a practical solution for evaluating OT systems. A key benefit of a physical testbed is its ability to capture network behaviors such as message latency, jitter, and packet loss in real-time, which are often difficult to replicate in  
Figure 1: Framework overview. simulations. Testing with real devices also allows for evaluating interoperability between devices from different manufacturers, ensuring that communication protocols function as expected across diverse hardware platforms. Additionally, such testbeds provide an effective means of assessing security, as researchers can simulate real-world cyber threats to understand how OT devices and protocols respond to attacks like denial of service or message spoofing. This hands-on approach helps uncover vulnerabilities that may not be visible in theoretical models or simulation-based tests. Specifically, in this second framework stage, we couple the physical device under test with the real-time network emulation capabilities provided by OMNeT++ to perform HIL device profiling. This approach balances flexibility and scalability, making it adaptable to a wide range of testing scenarios. Researchers can configure the testbed to emulate various network topologies and test different OT protocols, enabling comprehensive device performance benchmarking and optimization of system configurations. In one of our previous works [24], we demonstrated how such testbeds can facilitate detailed evaluation, guiding improvements in OT system design and contributing to critical infrastructure systems' reliability, security, and overall robustness. By providing a realistic testing environment, on-device testbeds are invaluable tools for advancing the state-of-the-art in OT protocol validation. However, building testbeds for complicated systems may be prohibitively expensive for an organization and may make evaluations of individual device replacements impossible before installation. For the method proposed in this paper, we leverage a physical testbed to identify on-device parameters for production OT devices and translate those into nodes for network simulation. On the other hand, network emulation using OMNeT++ and the INET framework provides a robust platform for modeling and analyzing the behavior of complex networked systems or singular devices under test, as utilized in our framework. OMNeT++ is a discrete-event simulation environment that facilitates the construction of detailed, scalable network models [8]. The INET framework, an extension of OMNeT++, offers a comprehensive set of modules that enable the simulation of various networking protocols, devices, and application behaviors [9]. This combination allows for creating a wide range of realistic network topologies, the specification of communication protocols like TCP/IP, UDP, and routing protocols, and the emulation of network traffic and conditions, including latency, congestion, and packet loss. OMNeT++ and INET support the simulation of both wired and wireless networks, ranging from simple client-server models to more sophisticated, multi-node distributed systems. The process of network emulation within our framework involves defining network topologies and executing real-time simulations to assess key performance metrics such as throughput, delay, packet loss, and network stability for the connected physical device under test. OMNeT++ provides a graphical user interface for visualizing the network dynamics during simulation.