## 5 Cyber-Physical Inverter-Based Microgrid Implementation and Experimental Results
### Scrutinizing the Impact of Communication Delay on Frequency Response  
The communication infrastructure facilitates the control signals broadcasting from the secondary controller to the local controllers. However, these communication links may induce delays that can degrade the control performance and affect the system stability. In this experiment, to evaluate the impact of communication delay on the MG frequency performance, the assessment involved manipulating the communication delay value within the innovative communication model between LAN-2 (central controller) and LAN-1 (local controllers). Here, we assessed communication delays of 25 ms, 50 ms, 75 ms, and 100 ms while recording the frequency responses correlated to each value to illustrate how communication latency influences the MG's frequency stability, considering the same four phases of operation stated in the previous case study. Figure 13 depicts the impact of increasing communication latency between the central and local controllers under different operating conditions. In Phase 1, the frequency was stable at 59.8 Hz without oscillations; unfortunately, the MG encountered challenges in precisely tracking the reference frequency, revealing limitations in the droop control as one of the state-of-the-art control schemes in controlling multiple parallel inverter-based resources. Although it could effectively manage the power-sharing between the parallel inverters, it struggled to mitigate the steady-state deviation during operation. Subsequently, at t = 36.5 s (Phase 2), the activation of the centralized secondary control, employing the PI-conventional controller, occurs and accesses the local frequency measurements from the primary control layer via the ns3-based communication channels. It compares the measured value with the reference frequency (60 Hz), leveraging the integral term in the PI controller to eliminate the steady-state error in frequency. The communication links relay the resultant control signal to the primary control layer, rectifying any frequency response inconsistencies within the parallel inverters. In this experiment, non-ideal communication channels between the primary and secondary control levels introduce delays, significantly impacting the transient frequency performance during the secondary control connection. These delays contribute to amplifying the maximum overshoot and longer settling times. Furthermore, the analysis of load variations in Phase 3 and Phase 4, as presented in Figure 14, depicts that elevating the delay value from 25 ms to 100 ms intensifies frequency oscillations and prolongs the system convergence to the steady state, especially at delay values of 75 ms and 100 ms during load changes compared to the ideal communication scenario. Figure 12: The frequency response with the proposed centralized secondary controller compared to the droop control only. The experimental results demonstrate that changing communication delay up to 100 ms affects the transient performance of frequency without compromising its stability. By contrast, instability issues arise when the communication delay exceeds 100 ms and the system cannot reach the reference value, as depicted in Figure 15, during step changes in the connected load under a delay of 120 ms. The frequency is critically stable and oscillates around the reference value. The observed fluctuations in frequency are due to a mismatch between the control signal transmitted to local controllers and the system's actual status. For instance, receiving delayed control signals with high values after the system has already reached a new state of operation makes the system critically stable. The system will be unstable if we increase the communication delays above 120 ms.  
Figure 14: Enlarged view of the impact of communication latency on the frequency response under load changes: (**a**) step-up change in the load; (**b**) step-down change in the load. Figure 13: The impact of communication latency on the frequency response under different operating conditions.