## 4 Simulation Results and Discussion
### Frequency Stability Analysis with/without EVPC  
To investigate the effect of EVPC on the MG frequency stability, it is assumed that at time 1:00, the MG switches into isolated mode and remains in this mode during the scheduling horizon. Due to a fault occurrence in the upstream at time 1:00, the MG switches into the isolated mode. In isolated mode, MG frequency response is studied in two cases. In the first case, EVs do not participate in load frequency control, while, in the second one, EVs contribute in the MG frequency regulation. Figure 12 shows the MG frequency variations in two cases. Comparison of the two cases shows that the application of EVPC results in a lower frequency deviation. As can be seen in the same figure, with EVPC, frequency varies in the range between 59 and 61.4 Hz; however, without it, the frequency drops to less than 57 Hz when the MG enters the isolated mode. As can be observed from Figure 13, the minimum value of SMI occurs at 6:00. It can be shown that, at this time, the system is in the critical condition without the application of EVPC. During islanded operation, due to low inertia of MG and intermittent nature of RESs and load, there might be some frequency deviations beyond the acceptable range. As depicted in Figure 14, due to a sudden load change of 20 kW at 6:30, the system frequency becomes unstable without EVPC. Figure 11: The exchanged power between EVs and the MG with/without EVPC. Figure 12: Frequency variation in two cases over a 24-h horizon. Figure 13: Variation of SMI with and without EVPC. At this time, EVs are charged 140 kW without EVPC; however, with the application of that, they are discharged at the rate of 68 kW/h. In fact, when the load demand increases suddenly, the amount of reserve reduces. In this condition, generation of RESs is very low (7 kW) and so EVs' high charging leads to frequency drop. However, with the application of EVPC, due to a low amount of reserve and the SMI index, EVs assist in the discharge process and the system obtains a proper margin for its reserve and, consequently, frequency remains within its limitation. It should be mentioned that, without EVPC, the frequency instability occurs at 11:00 due to surplus energy produced by RESs. In order to assess fluctuation of frequency accurately, the frequency deviation with and without EVPC is shown in Figure 15. At this time, without the EVPC scheme, EVs are discharged up to 56 kW and with EVPC EVs are charged 142 kW, accordingly. On the other hand, with EVPC, EVs are charged with lower power and frequency variation is less than the other case where there is no EVPC. Thus, the value of SMI without EVPC is more than 1 and the system is unstable at 11:00. However, with the application of DL, frequency remains within its expected value. In this case, DL consists of a bank of resistive loads each with a consumption level of 1.75 kW (up to 175 kW). As it can be observed from Figure 16, to keep the system power balance at 11:00, 30 kW of DL activated. Thus, with the application of DL in the case without EVPC, the system remains stable at all times. The maximum load demand occurs at 14:00 (368 kW), and frequency variation at this time is shown in Figure 17. At this time, load has its maximum value and the production of RESs is 300 kW. Based on both cost signals, EVs are charged 152 kW and 168 kW in cases with and without EVPC, respectively, and the frequency is kept in its limitations in both cases. As can be observed in Figure 12, frequency has an overshoot at 8:00 and 18:00 that is zoomed in on in Figure 18. At these times, since SMI is higher in conditions without EVPC than that of in circumstances with EVPC; hence, frequency deviation is further in the former conditions than the latter ones. The optimization results of the under-study system with and without the application of EVPC are presented in Table 1. As it can be seen, the implementation of EVPC achieves better economic results as compared to the case without it.