# PV-Powered Charging Station with Energy Cost Optimization via V2G Services
## 5 Energy Cost Analyses for PV-Powered Charging Station with V2G Service  
Table 3 demonstrates the energy injected into the grid for the two case studies. The energy is injected into the grid during V2G, where the EVs' contribution is significantly greater in the variable charging/discharging power scenario than the constant charging/discharging power scenario. The contribution of EVs is higher than 65% in the variable charging/discharging power scenario. Even in \"Sim w/ opti\", the energy share from EVs is similar to that in \"Sim w/o opti\" and considered significant. Furthermore, \"Sim w/o opti\" and \"Sim w/ opti\" are compared with an ideal case, which is considered as a reference: \"Opti for real conditions\". In this reference case, it is assumed that the real PV MPPT power production and the arrival times of all EVs are known, and hence there will be no uncertainty issues related to forecasting errors. Therefore, the optimization is executed only one time because the arrival times of EVs are considered known in \"Opti for real conditions\". The total energy costs of \"Sim w/ opti\" are closer to the ideal case than \"Sim w/o opti\" in the two cases, which indicates the effectiveness of the proposed optimization algorithm during different meteorological conditions. Table 4 presents the energy costs for the case studies. Only in case 1 \"Sim w/o opti\", with constant charging/discharging power, is the obtained dissatisfaction cost for EV users positive due to not having the desired SOC at the departure time. In the variable charging/discharging power scenario, the total energy cost is negative, which refers to selling energy to the public grid. Moreover, in \"Sim w/ opti\" the total energy cost is better due to power injection into the public grid, bringing more profits. In case 1 \"Sim w/ opti\", with constant charging/discharging power, the total cost is negative, as there is no penalization due to injecting power to the public grid. However, there is no V2G participation even though the users accept participating to meet the user requirement (minimum SOC of EV) at departure time. Tables 3 and 4 prove the unfeasibility of the constant charging/discharging scenario, as the energy injected into the public grid from EVs is not significant because they charge/discharge with constant power. The total final cost for this scenario is calculated without including the EV penalty cost, which is only included to optimization for modeling the dissatisfaction of the EV users. A high EV penalty indicates that EV users will be dissatisfied due to having low battery energy at departure time, which can cause risks of rejection of enabling V2G services by EV users or even losing clients in the future. The distribution of energy for EVs in \"sim w/o opti\" and \"sim w/ opti\" is also assessed in Figures 15 and 16 for case 1b and 2 respectively. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{1}{c}{\multirow{2}{*}{**Operation Case**}} & \multicolumn{5}{c}{**Energy Injected into the Public Grid during V2G Period**} & \multicolumn{2}{c}{**Energy Injected into the Grid**} \\ \cline{3-8}  & & **PV (kWh)** & **EVs (kWh)** & **during V2G (kWh)** & **\% EV/Total** & **\% PV/Total** & **the Grid during the Day (kWh)** \\ \hline Case 1—constant & Sim w/o opti & 5.88 & 2.91 & 8.79 & 33.10\% & 66.90\% & 44.03 \\ power scenario & Sim w/ opti & 0 & 0 & 0 & 0 & 58.85 \\ Case 1—variable & Sim w/o opti & 5.88 & 20.83 & 26.71 & 77.98\% & 22.02\% & 50.95 \\ power scenario & Sim w/ oti & 5.88 & 23.33 & 29.21 & 79.87\% & 20.13\% & 68.34 \\ Case 2—variable & Sim w/o opti & 6.21 & 20.83 & 27.04 & 77.04\% & 22.96\% & 30.52 \\ power scenario & Sim w/ oti & 7.45 & 25 & 32.45 & 77.04\% & 22.96\% & 40.91 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Energy injected into the public grid for the different cases. In Figures 15 and 16, PV sources mainly charge EV1 and EV3.