## 5 Simulation Results  
To prove and validate the explanations described in previous sections, it is significant that the outcome of this article resulted according to the vulnerability analysis for technical and cyber-aspects. To this end, we try to first execute a microgrid deployment into the smart grid structure in normal and contingency conditions. From a technical standpoint, this section will examine and assess the critical areas of the smart grid and represent the overthrow of the vulnerability indices for the sake of exchanging power between the microgrid and the grid in the most proper time. In the case of the second viewpoint, we check the successful probability of the launching attack in the smart grid regarding the multi-layer-based proposed security scheme compared to the other approaches. It is axiomatic that the smart grid structure comprises fossil fuel, buses, feeders, and loads, all of which are located in the IEEE 24-bus case study. Figure 6 shows the single line schematic of the IEEE 24-bus grid. The technical characteristics of smart grid and microgrid are taken by [37; 39], respectively. Table 2 also expresses some parameters related to each bus that are part of a criterion for assessing the vulnerability. It should be mentioned that each of the buses is also a node that connects the blockchain platform to the smart grid [44]. In addition, the microgrid aims to supply the load demands embedded in the far away from the grid with the use of some renewable resources, including photovoltaic, wind unit, tidal unit, and storage. The point of common coupling (PCC) will be in the place of the bus if the operation of the bus is the responsibility of RES. On the other hand, the primary controller sends out the command of islanding mode when the voltage security margin is endangered; however, the aim of the simulation is to improve the vulnerability through the RESs. Therefore, the scenarios are designed to realize the aim of the investigation. For more clarification about the above concepts, we try to first find and assess the vulnerable areas related to the smart grid taking into account the objective functions (13), (14), and (27) and the relevant constraints (3-13) and (15-35) based on case (I). Then, we implement the multi-layer security platform proposed in Section 3 on the vulnerable points of the smart grid and prove the usefulness of this framework compared to other methods in case II. In addition, case III aims to fulfill the modeling of uncertain parameters in accordance with relations (39-44) and examinants its effects on the vulnerability assessment process. Simulation executed utilizing a computer with 4 GHz processor, core i7, and 16 GB of RAM in GAMS software environment using CPLEX solver for MILP problems, which is linked with MATLAB software. power is transferred between them. These results can be seen in Figures 7 and 8. Assume that the positive value of power represents the power exchanging from the microgrid to the smart grid and vice versa. As it can be seen in Figure 7, the microgrid transfers the different ranges of power to the smart grid during the 24-h scheduling horizon. Such power fluctuations may have resulted from reasons such as the profile of loads located in the smart grid and the vulnerable areas of the grid. For instance, the maximum exchanging power is taken to be nearly 92 kW in hour 21 due to the load-peak at the same time. On the contrary, the power broadcasted from the microgrid to the smart grid shows a marked decline of almost 34 kW at hour 4. As it is mentioned in a previous part, the microgrid comprises the PV, WT, and tidal units. In addition, the battery system is used to satisfy the power balance in uncertain conditions pertaining to renewable resources. Hence, the output power of these units is represented in the form of generation power percent in Figure 8. It is clear that the range of utilizing PV units to supply the load demands and the needed power transaction is almost from \(t=7\) to \(t=16\).