# PV Benefits Assessment for PV-Powered Charging Stations for Electric Vehicles
## 2 PV Benefits Assessment Methodology
### Phase 3: PVCS Performance Assessment
#### 2.3.4 Algorithmic Logic  
From the OR and the number of terminals \(N_{terminals}\) chosen in phase 2, the algorithm is able to calculate the number of terminals used \(N_{terminal-used}\) per 2-hours' time slot. Then, one of the four possible scenarios is chosen and the algorithm determines the number of fast charging \(N_{terminal-red}\) and slow charging \(N_{terminal-green}\) terminals, and afterwards, calculates the total demanded power \(P_{demand}\) as expressed in Equation (13):  
\[P_{demand}=N_{terminal-red}\cdot P_{T-red}+N_{terminal-green}\cdot P_{T- green} \tag{13}\]  
The algorithm then calculates the difference between the power requested by all the used terminals and the power supplied by the PV panels. If this difference \(P_{diff}\) is greater than or equal to zero, then the EV is recharged only by a power \(P\) coming from the PV panels. By contrast, if the power \(P\) is less than the difference \(P_{diff}\), the excess noted \(P_{s}\) is sent to stationary storage provided that it has not reached a SOC greater than 80%. In case of stationary batteries are fully recharged, the surplus is injected into the power grid. If the difference \(P_{diff}\) is less than zero, then the EV cannot be fully recharged by the power supplied by the PV panels. To achieve the required charging power, the complement \(P_{s}\) is provided by stationary storage, provided that it has not reached a charge level below 10%. In this specific case, it is the power grid that completes the charge of the EV. To illustrate the simulation, based on arbitrary inputs data and the PVCS sizing adjusted in phase 2, some results are given in Figure 7. The energy rating is based on the share of energy supplied by the PV panels compared to that supplied by the power grid. With the reduction in the number of EVs in fast charge, PV benefits increase for the EV charging, and the dependency on the public grid is reduced. The simulation presents three predefined scenarios with three predefined hourly occupancy percentage. The realistic scenario is proposed by default (Figure 7a). If one of the scenarios is chosen from the scrolling menu, the table indicating the number and type of terminals occupied per time slot is pre-filled (Figure 7b). Following the choice of scenario, the energy balance comes in three types of days:  
* An average sunny day, resulting from an average obtained over a period extending between 2005 and 2016 (Figure 7c);
* A poorly sunny day, corresponding to an average carried out over the least sunny month (Figure 7d);
* A very sunny day, corresponding to an average carried out over the sunniest month (Figure 7e). The results are available in two forms:
* A circular diagram, representing the percentage of each energy source to ensure the recharging of EVs. It makes it possible to account for the distribution of energy from PVCS (energy from PV) and external energy (from power grid);
* A histogram, allowing a more detailed analysis of the energy distribution per two-hour time slot. If the scenario is changed, the results are updated automatically. Figure 7 shows that, obviously, the participation of PV production in EV charging in-creases for the very sunny days than less sunny days. In this support tool, it is the user who chooses the charging mode (slow or fast) that suits him best (parking time, electricity bill, etc.). For slow charging mode, the level of the delivered power is low, which enables PV and stationary storage system to share the requested charging power of the EVs, without the need to the public grid (histogram of Figure 7c during time slot 16 h to 18 h). Whereas, in fast charging mode, the level of the delivered power is high. Therefore, EVs are charged mainly with the public grid and small portion with PV, because the stationary storage system will reach rapidly its minimum limit, and PV production is not sufficient for charging (histogram of Figure 7c during time slot 14 h to 16 h). In conclusion, the slow charging mode improves the PV benefits, where EVs are charged mainly with PV energy.