# CoSimulating Communication Networks and Electrical System for Performance Evaluation in Smart Grid
## 5 Simulation Study
### Simulation Results  
We conducted the simulation as follows:  
* OOCoSim creates events for the wind generator according to the pre-defined wind generator profile. * The CoSim module calculates the load based on the forecasted 5 min electricity cost information. * Every second, OOCoSim makes message communications through OPNET simulation and receives the response time information of each bus. * Based on the calculated load and the response time information, CoSim module creates new events for OpenDSS simulation and assigns them to the global scheduler. * When the scheduler encounters OpenDSS event, it applies the event to OpenDSS. * After each event is applied to OpenDSS, OOCoSim dispatches the distribution system information--the _total power loss_ and _voltage._  
In our simulation study, we used energy consumption data of Almanac of Minutely Power Dataset-AMPds [36], which provides minute-level observed electricity metering data. We compared the impact of the DR application with the data. The tagging \"w/o DR\" in the following figures and tables represents the results of the profile which follows AMPds data. Table 1 denotes total energy consumption cost during 5 min, and Figure 10 describes the power consumption of the 13 and 34 node system. We can easily note from the table that the DR model achieved its goal--minimizing the electricity usage cost. In both systems, we could save approximately 15% of electricity usage cost while consuming the same amount of electricity energy. Moreover, through Figure 10, we can also note that the application also achieved its another goal--distributing the peak load. Based on the results, we can conclude that the application tried to use large amount of the electricity when the electricity price is cheap and it also uses small amount of the electricity when the electricity price is expensive while successfully minimizing the total budget of electricity consumption and distributing the peak load. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **13 Node System** & **34 Node System** \\ \hline w/o DR & 679.272 & 362.568 \\ DR & 579.617 & 308.449 \\ Saving & 14.7\% & 14.9\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Total cost of each scenario. Figure 9: The operational flow of the application model. The next step is to consider the following questions \"How the DR application affects the distribution system?\" and \"How the underlying network system affects the performance of the DR application?\" These are more important questions to analyze in the smart grid where the power system and IT infrastructure are tightly coupled. To answer these questions, we analyzed the impact of the DR application in perspective of the power loss and voltage of the distribution system. To represent the impact of the networking system, we devised an ideal network scenario where the network delay and the packet error rate are 0. Figure 10(a) shows the power loss of the 13 Node system. We can observe that if we enable energy management function, we can obtain much benefit in perspective of the power loss since the lines tagged with \"DR\" shows much lower power loss than that of \"w/o DR\". A notable point is that through the DR application, small power loss can be achieved when the output power of the renewable energy generation is very low (from 60 s to 180 s). Since deficient energy provision can lead serious results such as \"blackout\", it is much more important to reduce power loss when power availability is very low. Therefore, we can conclude that the real time price based DR application contributed greatly to stability and efficiency of the distribution system in our simulation study. On the other hand, Figure 10(b) shows the voltage profile of the bus 652 at which the voltage is increased mostly when we do not use energy management functions. We can identify from the results that the energy management function can also contribute to the stability of the distribution grid since the lines tagged with \"DR\" have values closer to the voltage of 1 pu.