## 1 Introduction
However, they did not mention any analysis regarding the impact of communication on the proposed scheme. An accurate simulation of frequency support through elaborate models was demonstrated in [26] by integrating the power adjustments of prosumers, besides offering an enhancement in MG frequency control, employing a fuzzy logic-based estimation method. The authors in [27] proposed a centralized secondary frequency control scheme based on the model predictive control (MPC) method for an inverter-based MG; however, they did not consider the impact of communication delay between the implemented MPC-based secondary control and the local controllers. A frequency restoration algorithm in an islanded MG based on an event-driven method was developed in [28]. The control mechanism generated the control action by sensing the change in the load demand and the power generation. In [29], the authors proposed a power control mechanism for MG, optimized through the combination of the genetic algorithm (GA) and particle swarm (PSO). The proposed scheme proved its effectiveness under different operating conditions, though they did not include the cyber aspect impact on the presented analysis. A cascade-forward neural networks-based droop control algorithm for the inverter-based MG was developed in [30]; the authors proposed real-time experimental tests. However, they did not introduce the impact of cyberattacks on the proposed system. Although the previously mentioned proposed control strategies successfully control the MG and enhance its performance, most research studies have not examined the inverter-based MG as a cyber-physical system. Furthermore, they have not considered the diverse impact of communication delays and cyber-attacks on the proposed control schemes. Upon reviewing the studies mentioned above, there is a research gap, prompting more exploration in studying the inverter-based MG as a cyber-physical system, including the impact of communication networks and cyber-attacks on overall system performance. In addition, there is a need to develop a flexible tool that can be used for several cyber-physical power system studies, combining both the physical and cyber layers in a single platform. Considering the above discussion, this paper proposes an innovative approach for assessingthe frequency performance of an islanded cyber-physical inverter-based microgrid in different real-world scenarios. The experimental study incorporates realistic and non-ideal cyber scenarios using the proposed sophisticated cyber-physical co-simulation platform. The integration of OPAL-RT and the network simulator ns3 in a single co-simulation framework offers a flexible platform that can be a basis for several power systems studies as a cyber-physical system, encompassing real-time simulation of power and communication systems. RT-LAB has different packages and models, enabling integration with MATLAB/Simulink and facilitating the simulation of various power system applications. Network simulator ns3 is an open-source tool that supports the simulation of IP-based communication network applications. Furthermore, using Docker containers as a virtual interface network enables seamless data exchange between the local measurements and the secondary controller through the ns3-based communication model, which is also freely accessible. Thus, the open-source accessibility nature of both ns3 and Docker containers notably minimizes the overall computational cost of the proposed approach. Within the proposed cyber-physical MG, we utilize a centralized secondary control strategy; it runs asynchronously in the secondary control layer with the primary control layer in the physical system. The central controller collects information from all the individual DGs' local controllers within the physical MG. After that, it sends the control signal back to the local controllers in the primary control layer via the proposed ns3-based communication network, effectively restoring the frequency value to its reference.