## 6 Experimental Scenarios and Results
### Latency  
The evaluation tests of this proposal consider the measurement of two types of latency. The first column in Figure 14 considers the response time when sending the first message from the MG architecture. This latency gives us a measure of the initial cost of the distributed controller as microservices and the time it takes to obtain a valid route. Once the entry in the flow table is updated, the rest of the packets do not need to go through the  
Figure 13: Proposed architecture for testing the metric performance. \begin{table}
\begin{tabular}{c c} \hline \hline
**Item** & **Value** \\ \hline \multicolumn{3}{c}{Microgrid parameter} \\ \hline Rated frequency & 60 [Hz] \\ Rated voltage & 4160\(\sqrt{2/3}\) [V] \\ Load power rating RES1 & 1 [MVA] \\ Load power rating RES2 & 500 [kVA] \\ Load power rating RES3 & 200 [kVA] \\ \(H_{Line_{1}}\) & 0.4 [mH] \\ \(H_{Line_{2}}\) & 0.65 [mH] \\ \(H_{Line_{3}}\) & 0.9 [mH] \\ Filter (L,C) & 1.8 [mH], [25 \(\mu\)F] \\ \(R_{o}\), \(L_{o}\), \(C_{o}\) & 80 [\(\Omega\)], 12.5 [mH], 5 [mF] \\ Sample time (Ts) & 10 [kHz] \\ \hline \multicolumn{3}{c}{Primary control parameters} \\ \hline P - \(\omega\) Droop Coeff. (\(m_{p}\)) & 1 [\(\frac{rad}{V\omega}\)] \\ Q - \(V\) Droop Coeff. (\(n_{q}\)) & 25 [\(\frac{rad}{V\omega}\)] \\ Frequency proportional term \(k_{p}f\) & 0.01 \\ Frequency integral term \(k_{i}f\) & 3 s\({}^{-1}\) \\ Voltage proportional term \(k_{p}v\) & 0.01 \\ Voltage integral term \(k_{i}v\) & 2 s\({}^{-1}\) \\ \hline \multicolumn{3}{c}{Secondary control parameters} \\ \hline Frequency proportional term \(k_{p}f\) & 0.001 \\ Frequency integral term \(k_{i}f\) & 4 s\({}^{-1}\) \\ Voltage proportional term \(k_{p}v\) & 0.001 \\ Voltage integral term \(k_{i}v\) & 6 s\({}^{-1}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Electrical and control parameters of the MG. The second experiment considers the average latency for the rest of the packets using OSPF routing and SDN technology. As shown in Figure 14, the performance of the OSPF-based strategy is slightly better. This is due to the additional processing overhead added by the distribution of microservices in three different Raspberry nodes to the processing time of the applications. The complexity of the network topology, as determined by the number of OpenFlow switches, notably impacts the number of controller connections and the processing capacity of Docker containers. The connections between two DGs are denoted by first1 and update1, while the connections between DG1 and the SDN controller are represented by first2 and update2. In OSPF, the connection is established between the two nearest DGs. As can be seen, the highest latency is originated when the first flow is sent between two nodes. Power data (frequency and voltage) shared by hierarchical control in PLECS are shipped using the SPI and CAN protocol, and the results are summarized as average round trip time. However, even though OSPF and SDN with centralized control have slightly higher performance, the need to use a load balancer is evident, especially in the topology with a monolithic SDN controller and multiple DGs. Furthermore, when the traffic increases, its performance starts to degrade. For the OSPF routing strategy, it can be seen that the sending of the first packet of the topology is slightly higher than its competitors. This is mainly due to the neighbor discovery algorithm and the SPF algorithm needing to know the entire topology for proper performance. To avoid a single point of failure, the proposal of this paper incorporates a distributed load balancer, following the recommendation in [59]. The researchers performed three communication tests to evaluate the response of the proposed alternatives as a solution to the hierarchical control problem in electrical microgrids. Figure 15 illustrates the percentages of packets successfully delivered on the first transmission, those requiring single retransmission, those requiring multiple retransmissions, and those experiencing packet loss for each scenario.