# CoSimulating Communication Networks and Electrical System for Performance Evaluation in Smart Grid
## 5 Simulation Study
### Discussions on Simulation Scalability and Stability  
Table 4 summarizes execution time of simulation study using a computing system which has core2 duo 2.4 GHz CPU and 8 GB physical memory. The simulation time was 600 s for each scenario and network topology. Basically, in WLAN Mesh network scenarios, many more events were generated and processed in OPNET due to the CSMA/CA based channel access and multi-hop transmission, and therefore, longer execution time was reported. In addition, the number of events of OpenDSS is smaller in WLAN Mesh network because its poor network performance created fewer number of application events. We can observe that the execution time of both simulation tool is well proportional to the number of events. Although the number of events can differ according to the simulation configuration, the linearity can guarantee the scalability of the simulation [26]. Therefore, we can conclude that the both simulation tools have enough scalability to perform simulation on the smart grid application. Figure 14a represents the usage of memory resource for the scenarios described in previous subsection. We can observe that OOCoSim has a linearly increasing pattern of the memory usage for all scenarios. The linearity can guarantee that simulations of the smart grid application can be performed within expected size of memory resource [37]. Therefore, we can conclude that OOCoSim is scalable and stable in the perspective of memory usage. The cpu usage of OOCoSim is represented in Figure 14b. For four scenarios, stable cpu usage pattern in which most of values are positioned between 44% and 52% was reported. The results indicate that regardless of the configuration of simulations, OOCoSim requires similar amount of CPU usage, therefore, OOCoSim can perform stable and sustainable simulations for applications in distribution and customer domain.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **13 Node** & **34 Node** & **13 Node** & **34 Node** \\  & **WLAN Mesh** & **WLAN Mesh** & **WiMax-Ether** & **WiMax-Ether** \\ \hline OPNET execution time & 75.4 s & 568.4 s & 12.7 s & 57.3 s \\ \# of OPNET events & 15,520,75 & 136,464,504 & 2,563,603 & 10,880,800 \\ OpenDSS execution time & 6.2 s & 38.7 s & 6.3 s & 43.7 s \\ \# of OpenDSS events & 3764 & 16,497 & 3900 & 20,700 \\ Total execution time & 81.6 s & 607.1 s & 19.0 s & 101.0 s \\ \hline \hline \end{tabular}
\end{table}
Table 4: Execution time of simulation study.  
Figure 13: The CDF of the packet transmission delay.  
To verify the scalability of the simulation system further, we duplicated 13 node WiFi Mesh system for two to eight times and ran each case. Since OpenDSS only can run a single circuit, we utilized Direct connection Shared Library for OpenDSS. With this engine, multiple OpenDSS simulations can be executed in parallel. Figure 15 shows the simulation time of OPNET, OpenDSS, and the total simulation time including OOCoSim operations with respect to the number of 13 node WiFi Mesh systems. As shown in Figure 15, OPNET simulation highly accounts for a high proportion of the total simulation time. In addition, since OpenDSS can simulate multiple circuits concurrently, the simulated time of OpenDSS grows much slower than OPNET. Regardless of the proportion of the simulation time, Figure 15 shows that the total simulation time of OOCoSim linearly increases as the number of system increases. The observation shows that OOCoSim has enough scalability to perform the simulation on the smart grid system and its application.  
Figure 14: The usage of memory and cpu of simulation scenarios. (**a**) Memory usage; (**b**) CPU usage.  
Figure 15: The simulation time of multiple smart grid systems.