## 5 Case Studies and Co-Simulation Validation
### Co-Simulation Performance  
In order to assess the performance of mosaik co-simulation, the root square deviation (RSD) index is used and is defined by  
Figure 21: Dynamic response of the wind turbine to the reference fault (weak-grid condition), with and without PSS for the mosaik co-simulation.  
Figure 22: Time-domain response of the wind turbine to a voltage dip in islanded operation, with and without auxiliary damping signal for the mosaik based co-simulation.  
\[RSD=\sqrt{\sum_{t=1}^{\mathsf{T}}(u_{\mathsf{tmono,}t}-u_{\mathsf{tmoz,}t})^{2}} \tag{13}\]  
where \(u_{\mathsf{tmono}}\) and \(u_{\mathsf{tmoz}}\) are the wind terminal voltage p.u. of the monolithic simulation and MOSAIK co-simulation, respectively. T is the end of simulation time. RSD is considered as a measure of the similarity of the responses of both the co-simulation and its monolithic reference simulation.  
Table 1 shows the RSDs of the responses obtained with the two co-simulation methods (MOSAIK and FMI-based) for the case studies of Sections 5.1-5.5. The wind terminal voltage has been chosen as the performance indicator as it is of particular importance for the efficacy of the grid forming controller. All RSDs are based on 10 s simulation time. As can be seen from Table 1, there is a relatively small difference in performance of two co-simulation approaches. Though, MOSAIK co-simulation has smaller difference with the reference monolithic simulation than the FMI-based co-simulation, especially for the weak grids and islanded operation. Another observation is that for more severe voltage dips, especially in weak grids and islanded operation mode, the difference between co-simulation response and the monolithic response is more prominent. This can be attributed to the inherent synchronisation delay between the the FMUs.  
Another performance comparison is accomplished by measuring the wall-clock execution time of the above-mentioned cases. These are displayed in Table 2. It illustrates that the simulation duration for the co-simulation takes much more time than for the monolithic case. This had been noticed in [34] as well and is caused by the network license of Power-Factory, which is checked at each synchronisation step and is causing noticeable overhead in simulation time. It can also be observed that the execution time of MOSAIK is slightly faster than the traditional FMI-based co-simulation using the Python code as a scheduler. As MOSAIK uses production-grade (Python) code, this is to be expected and trivial.  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Case Study** & MOSAIK & **FMI-Based** \\  & **Co-Simulation** & **Co-Simulation** \\ \hline
5.1 Step in the voltage & 0.2368 & 0.2416 \\ set-point & & \\ \hline
5.2 Controller parameter & & \\ modification & 0.2851 & 0.2880 \\ (for \(k_{\mathsf{droop}}\) = 0.02) & & \\ \hline
5.3 Response during & 3.2738 & 3.2751 \\ faults (for FCT = 150 ms) & & \\ \hline
5.4 Weak-grids & 4.5903 (with PSS), & 4.6589 (with PSS), \\  & 4.9599 (without PSS) & 4.9668 (without PSS) \\ \hline
5.5 Islanded operation & 4.6979 (with PSS), & 4.7705 (with PSS), \\  & 9.4237 (without PSS) & 9.4863 (without PSS) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Root square deviation (RSD) [p.u.] for the applied case studies in Section 5.1 to Section 5.5.