# PV-Powered Charging Station with Energy Cost Optimization via V2G Services
## 4 Simulation Results for PVCS with V2G Service
### Case 2: Cloudy Day  
For case 2, a cloudy day with high irradiation was considered, specifically, 10 May 2019 in Compiegne. The real and predicted PV powers are shown in Figure 10, where it can be observed that the predicted PV power is slightly higher than the real PV power, and the fluctuations are hard to predict due to hourly provision of forecasts and their inconsistent trends. As a result, these uncertainties have an impact on the optimization results that potentially lead to supplying power from the public grid instead of discharging energy from the stationary storage. In this case, the power flow of the PVCS with V2G service in \"Sim w/o opti\" and \"Sim w/ opti\" is shown in Figure 11, where the predicted PV power is used only to run the optimization, and the real PV power is used in both simulation scenarios. Figure 11a shows that EV1 and EV3 are discharged at peak periods for 15 min with 50 kW each, and they are then recharged after V2G with the appropriate charging power to meet the needs of the users. As the PV power is not very significant and is fluctuating, the stationary storage is discharged to support the charging of EVs. The PVCS operates in storage-priority mode, meaning any excess PV power is initially used to charge the stationary storage. Once the stationary storage is either full or its maximum charging power is reached, which occurs at around 11:30, any additional PV power is injected into the  
Figure 9: Power (**a**) and SOC of the EVs (**b**)—scenario b in “Sim w/ opti”. public grid. However, once the storage is empty, which occurs around 17:00, the public grid supplies power to continue charging the EVs. Furthermore, the public grid supplies power when EV2 charges in fast mode and during peak periods, when EV1 and EV3 recharge after V2G. Therefore, charging EVs during peak periods will increase the energy cost. On the other hand, in Figure 11b, EV1 and EV3 are discharged simultaneously during peak periods (serving total 100 kW power to the grid), and they are then recharged after V2G with optimized power to meet the needs of the users. The power injected into the public grid is defined by the optimization result to maximize profits in the event of excess PV power, which occurs before 09:30, around 11:30 during V2G service, and from 13:15 until 13:45. Figures 12 and 13 show the power and SOC of the EVs for the \"Sim w/o opti\" and \"Sim w/ opti\" algorithms, respectively. In Figure 12a, similarly to case 1 scenario b under \"sim w/o opti\", EV1 and EV3 are discharged at peak periods for 15 min at 50 kW each, and then they continue charging until their departure times to meet the needs of the EV users at 50 kW and 22 kW, respectively. However, in Figure 13a, the charging and discharging profiles of EV1 and EV3 are the optimized profiles that allow them to participate in V2G service, reach the desired SOC at the time of departure, and satisfy the users with the lowest cost. PV power is not very significant; therefore, EV1 keeps charging even when EV2 comes to charge in fast mode. During peak periods, the charging power of EV1 and EV3 is provided by PV sources. Consequently, all EVs have achieved their desired SOC at the time of departure, as shown in Figures 12b and 13b. Figure 14 compares the dynamic SOC of the stationary storage for case 1, scenario b, and case 2. Figure 11: Power flow with V2G service—case 2 (a) in “Sim w/o opti” and (b) in “Sim w/ opti”. Figure 10: Real PV power \(p_{PV}\) MPPT and predicted PV power \(p_{PV}\) MPPT pred—10 May 2019. For Figure 14a, the dynamic SOC of the stationary storage is shown for case 1, where the real PV power is high. In \"sim w/o opti\", where the storage priority is applied, the storage is always used for either charging or discharging. The storage becomes full around 11:30 and 16:30, when the charging demand of EVs is not significant.