MILP-Based Profit Maximization of Electric Vehicle Charging Station Based on Solar and EV Arrival Forecasts

<jats:p>Electric vehicles (EVs) will be dominating the modes of transport in the future. Current limitations discouraging the use of EVs are mainly due to the characteristics of the EV battery and lack of easy access to charging stations. Charging schedules of EVs are usually uncoordinated, whereas coordinated charging offers several advantages, including grid stability. For a solar photovoltaic (PV)-based charging station (CS), optimal utilization of solar power results in an increased revenue and efficient utilization of related equipment. The solar PV and the arrival of EVs for charging are both highly stochastic. This work considers the solar PV forecast and the probability of EV arrival to optimize the operation of an off-grid, solar PV-based commercial CS with a battery energy storage system (BESS) to realize maximum profit. BESS supports the sale of power when the solar PV generation is low and subsequently captures energy from the solar PV when the generation is high. Due to contrasting characteristics of the solar PV and EV charging pattern, strategies to maximize the profit are proposed. One such strategy is to optimally size the BESS to gain maximum profit. A mixed integer linear programming (MILP) method is used to determine the optimal solution.</jats:p>

section_content: One of the major environmental concerns is the gas emissions from the use of fossil fuels. As such, renewable energy (RE) is considered the most crucial replacement for fossil-fueled energy, which also supports energy security. The share of RE worldwide continues to grow, which is also evident from the growth in the EU-28 countries, where the usage of RE sources by all sectors of the economy increased from 5. 1% in 2004 to 10. 2% in 2019 [1]. From among the various RE sources, solar PV continues to see a steep growth globally [2], from just 72,216 MW in 2011 to 843,086 MW in 2021 [3]. 

In addition to increased use of RE sources, strenuous effort is made to maximize the use of electric vehicles (EV). Electric vehicles include Battery Electric Vehicles (BEV), Hybrid Electric Vehicles (HEV), Plug-in Hybrid Electric Vehicles (PHEV), and Fuel Cell Electric Vehicles (FCEV). Despite the promotion of EVs, sales have not been promising, primarily due to the limited driving range, charging time, battery replacement cost, and other limitations of the EV batteries [4] [5] [6]. Therefore, efforts are being made to enhance the effectiveness of batteries used in EVs. Additionally, usage of EVs is also affected by the lack of EV charging infrastructure [7]. 

On the use of solar energy for charging EVs, the characteristic of the solar irradiance is such that it is higher during mid-day and low in the morning and night hours. Therefore, it is expected that surplus energy would be available during mid-day, but the availability of EVs for charging during mid-day is generally low. Any surplus energy will have to be saved using a battery energy storage system (BESS), which will be used when solar PV generation is low. In addition to the stochastic nature of solar power, the system performance also depends on the state-of-charge (SOC) of the battery. Although solar Energies 2022, 15, 5760 2 of 14 power charging stations are convenient for EVs, the solar and EV characteristics are not well-synchronized, as EVs are generally charged at night when solar power is at its lowest. The charging of EVs is preferred at night, as the load is lower at night, which is also called 'valley filling' [8]. This is one of the reasons why a BESS is required to support the operation of a solar PV-based charging station effectively. 

There are three levels of charging standards for EVs based on the speed and power. The Electric Power Research Institute (EPRI) and Society of Automotive Engineers (SAE) have categorized EV charging levels as alternating current (AC) level-1, AC level-2, and direct current (DC) fast charging, i. e., level-3 [9] [10] [11]. These standards are, briefly:

(i) Level-1, AC voltage at 120/240 V with a maximum current of 15 A and a maximum power of 3. 3 kW; (ii) Level-2, AC voltage at 240 V with a maximum current of 60 A and a maximum power of 14. 4 kW; and (iii) Level-3, through a charging station, DC voltage directly to the battery via a DC connector, with a maximum power of 240 kW. 

Public commercial charging stations worldwide use both Level-2 and Level-3 [8]. As per [12], it has been estimated that every 1 million EVs with a 322 km range in the United States (US) require 500 fast charging sessions per day, and that 45% of this charging would take place between 15 h and 19 h. The EV charging fee varies from region to region. To understand the charging pattern of EVs by the users, ref. [13] has found that most EV users charge their vehicle when the EV battery SOC is between 25% and 75% and that the EVs are likely to be charged shortly after the users return home from work during weekdays or leisure activities during weekends. They further state that the pattern does not significantly change as per seasons and therefore, the charging of EVs is categorized into weekdays and weekends. As per [14], 50% to 80% of charging events for plug-in EVs (PEVs) occur at home, approximately 15% to 20% at the workplace, and approximately 5% of the charging events occur at public locations such as shopping malls or parking lots and those located on travel corridors. Although there is a low share of charging points at public locations, infrastructure is still required to encourage adoption of the EVs. As per [14], publicly available fast charging options can reduce range anxiety and encourage adoption of EVs. In the recent years, DC fast charging options are being offered in public charging stations and these chargers are generally more crucial for long-range BEV owners. 

In this paper, a commercial off-grid solar PV-based charging station is considered, where the mismatch issue of solar PV characteristics and EV charging patterns is prioritized to gain maximum profit from the sale of electricity with the support of a BESS. 

Several papers related to profit maximization of charging stations are available, and various features have been highlighted and methods proposed. For example, [15] considers profit maximization in a variable electricity price market where the charging station is directly connected to the grid, while in [16], an algorithm to reduce the operational costs is proposed. In [17], a novel joint admission and pricing mechanism of EVs are considered and [18] considers long-term profit for the charging station owner considering the delays in the charging of the EV. Further, in [19], optimal investment in the equipment is proposed so that profit can be maximized from the charging station operator's perspective. For a grid-connected charging station, usually the charging location of CS is not considered in scheduling and related work; however, it is important to note that several EVs concentrated in a narrow area supplied by an undersized capacity feeder and line could lead to breakdown of the distribution system. Therefore, grid capacity constraints must be included in such formulation [20]. Further, while integrating the CS with the grid, it is necessary to prevent EV charging from occurring at peak demand to avoid constraints due to the distribution feeders. A grid may have sufficient power to charge EVs; however, there would be few residential areas that would be heavily loaded during certain instants. Therefore, the concentration of EVs at a particular location may lead to network loading, voltage profile, phase imbalance, and power quality issues [21]. Additionally, for a larger EV market penetration, electricity demand patterns change significantly because of EV charging. Ref. [22] proposes a strategy to coordinate the decentralized charging of a large population of autonomous EVs using concepts from noncooperative games. However, in this work, the analysis is restricted to smaller-sized, publicly available charging stations. Ref. [23] proposes a distributed waterfilling algorithm for networked control systems to minimize the energy cost of the EV fleet while satisfying all constraints of the individual EVs under charge. 

In this paper, we consider the probability of EV arrival, or the probability of load demand and the solar PV forecast data, and subsequently make use of a mixed integer linear programming (MILP) method to determine the optimal solution. 

The problem is typical, as the solar power characteristics and EV charging pattern contrast with one another. In such a case, strategies are necessary to ensure maximum profit for the charging stations. Strategies include the following:

(i) Using different sizes of batteries; and/or (ii) Connecting to the grid and importing power when solar power is inadequate. 

The main contributions of the paper are as follows:

(1) Scheduling strategy for an off-grid solar PV charging station based on 24-h day-ahead solar forecast and probability of vehicle arrival for charging. (2) Emphasizing and illustrating the dependency of a solar PV-based charging station on the size of the BESS, and subsequently indicating that the net profit is dependent on the size of the BESS. (3) Offering an optimization technique to realize maximum profit from an off-grid solar PV charging station. (4) Highlighting the shortfalls of an off-grid solar PV charging station. 

(5) Demonstrating an application of the MILP method in determining the solution for such optimization problem. 

The remainder of this paper is organized as follows: Section 2 gives the model and formulation of solar PV, EV load, BESS, and the overall system, followed by Section 3, where results and analysis are presented. In Section 4, conclusions are drawn on the results and the overall formulation.
section_name: Introduction

section_content: For a known solar irradiance at a location, the solar PV output power P pv t can be calculated as [24] :

where P e is the PV-rated power which is measured at a standard solar irradiance (1000 W/m 2 ) and 25 • C, R is the hourly mean value of the solar irradiance at the Earth's surface in sunny days, γ T is the temperature coefficient of photovoltaic cells, and T is the working temperature. Therefore, the discussion in this paper pertains to solar PV power output, P pv t, at time t. The general layout of the proposed system structure is shown in Figure 1. The solar PV and the BESS provide power to the load EV.
section_name: Solar PV Charging System Model and Formulation

section_content: In this work, the total profit for the day, i. e., for an NT period of 24 h, is considered. A fixed EV charging rate α is considered instead of two different 'peak' and 'off-peak' charging rates for EVs. Therefore, the revenue from the sale of electricity to the EVs at the tth hour with a net power output P oev t will be:

Further, when the solar power P pv = P which is stored in the battery to be used at a favorable time. The surplus power at the tth time is:

An off-grid solar PV charging station is considered in this study and therefore it does not draw power from the grid. However, in the event that P sp is substantially high, the system can be connected to the grid, and the surplus power can be sold to the grid to generate maximum revenue.
section_name: EV Charging Modality, Grid, and Revenue

section_content: In this work, the total profit for the day, i. e., for an NT period of 24 h, is considered. A fixed EV charging rate α is considered instead of two different 'peak' and 'off-peak' charging rates for EVs. Therefore, the revenue from the sale of electricity to the EVs at the tth hour with a net power output will be:

Further, when the solar power =,,, …, is higher than the EV load = [,,, …, ], which usually occurs during mid-day or when there are fewer EVs at the charging station, it results in surplus power =,,, …, which is stored in the battery to be used at a favorable time. The surplus power at the tth time is:

An off-grid solar PV charging station is considered in this study and therefore it does not draw power from the grid. However, in the event that is substantially high, the system can be connected to the grid, and the surplus power can be sold to the grid to generate maximum revenue.
section_name: EV Charging Modality, Grid, and Revenue

section_content: The solar irradiance can be satisfactorily described by a Beta distribution [25] [26] [27]. As such, the median of the Beta probability density function is considered the best forecast [28]. Therefore, the median of the day-ahead solar PV forecast is considered the best forecast, which is then constrained by a binary variable, a component of =,,, …, that represents the operational status of the solar PV. At the tth hour, the solar PV output is constrained as:

To proceed further with the economic model of the PV system, we also take into consideration both fixed and linearly varying costs of the solar PV plant. We consider the
section_name: Solar PV Economic Model

section_content: The solar irradiance can be satisfactorily described by a Beta distribution [25] [26] [27]. As such, the median of the Beta probability density function is considered the best forecast [28]. Therefore, the median of the day-ahead solar PV forecast P pv is considered the best forecast, which is then constrained by a binary variable U

To proceed further with the economic model of the PV system, we also take into consideration both fixed and linearly varying costs of the solar PV plant. We consider the fixed cost, A pv, and linearly varying costs, B pv, as given in [29]. The total cost at the tth hour CPV t is then:

(5)
section_name: Solar PV Economic Model

section_content: As per [30], fast chargers between 7 kWh to 22 kWh are the most common in the parking lots. Therefore, we consider a commercial EV charging station of 36 units with each unit of 22 kWh. As the arrival of EV for charging is highly stochastic, it is not possible to accurately predict the demand for a charging station. Although accurate demand forecasting remains a challenge, there are various works that model such EV charging demand forecasts so that successful management and planning of EV charging can be executed [31] [32] [33]. In our work, we base our analysis on the EV arrival probability as given Energies 2022, 15, 5760 5 of 14 in [13]. The EV load P ev t at every tth hour is the probability of EV arrival, which is defined in terms of percentage ρ ev t of the capacity of the charging station K, as given below.
section_name: EV-Load Model

section_content: Solar power is one of the variable renewable energy sources, as it cannot be dispatched whenever required due to its fluctuating nature. Solar power is affected by various factors. It is generally high during the day and low in the morning and night hours, which is in contrast with EV charging patterns. Therefore, this has an impact on the overall revenue generation. To mitigate this undesirable effect, a BESS is used. However, for a BESS, costs are functions of the battery charging, discharging, efficiency, and charge cycle costs. The net power output from the combined solar PV and BESS at the tth hour P oev t is:

where P d t and P c t are the power delivered/discharged and consumed/charged by the battery at the tth hour, respectively, and η b is the battery's efficiency. Further, using the binary variables U c t and U d t to denote the operational status of the battery while charging and discharging at time t, respectively, the following constraints are used for the battery.
section_name: BESS Model

section_content: For the battery, limitation on the charging power is given by, where P c t and P d t are the upper bounds of the charging and discharging power, respectively. In order to ensure that the battery either charges or discharges only at any given time t, the following constraint is implemented:
section_name: Limitation While Getting Charged at the tth Hour

section_content: The number of charging cycles that a battery undergoes limits its life; therefore, the cost of a battery is apportioned to each charging cycle as a constant C b. To keep track of one complete charge-discharge cycle of the battery, a binary variable S = [S 1, S 2, S 3,. . ., S NT ] is used. At the tth hour, S is given by:

Taking C b as the cost per cycle, the costs associated with the battery charge-discharge cycle κ b are:

2. 4. 4. Limits on the Total Amount of Battery Energy E t For the given system, the features of the BESS have a significant impact on the overall outcome. Both the size of the battery and the initial SOC of the battery E(0) impact the performance. The total amount of battery energy E t at the tth hour is then:

Energies 2022, 15, 5760 6 of 14

The battery energy E t has the following limit:

where E is the upper bound for the battery energy. 

Next, we take into consideration the fixed and linearly varying costs for the BESS. The fixed and linearly varying costs during charging and discharging periods are A c and B c, and A d andB d, respectively. The total cost for the battery TC b is then:
section_name: Minimizing Costs Related to Charge-Discharge Cycle

section_content: The overall profit PR from the sale of electricity to the EV load for the entire day is given by the difference between the revenue given in Equation ( 2 ) and the combined battery costs given in Equations ( 5 ) and (15), which is:

Or:

Therefore, the complete solution is then defined by:

It is also observed that the size of the battery required to satisfy the constraint in Equation ( 14 ) is considerably higher than the capacity of the charging station. Therefore, the formulation was revised to include both E t and E(0) as decision variables so that the optimal size and SOC of the battery could be determined. In the revised case, the complete solution is given by:

Considering the formulation from Equations ( 2 )-( 19 ) with the given restrictions/limits, we can observe that the problem conveniently translates to an MILP problem. Therefore, we make use of the MILP solver function 'intlinprog' of MATLAB R2022a to solve the MILP problem. The objective is to maximize the profit given in Equation ( 17 ) subject to the given constraints. The revised solution in Equation ( 19 ) is used to determine the battery size and the SOC that results in an optimal solution. 

In the next section, we present the results, analysis, and strategies to derive maximum profit.
section_name: Profit and the Overall System Output

section_content: This section provides information on the data used, results, analysis, and subsequent explanations. angle of 35 • PV system has been considered. The fixed and linearly varying costs of solar PV station and other data that affect the financial operation of a solar PV plant have been taken from [29].
section_name: Results and Analysis

section_name: Data

section_content: The proposed formulation is implemented on a solar PV-based EV charging station of 1 MWp capacity located at 52. 2297° N, 21. 0122° E (Warsaw, Poland). The 24 h dayahead solar PV generation data have been taken from [34] for summer days (19 July 2019) when the value is at its highest, and is shown in Figure 2. A fixed-type solar panel with a tilt angle of 35° PV system has been considered. The fixed and linearly varying costs of solar PV station and other data that affect the financial operation of a solar PV plant have been taken from [29]. Further, a lithium-ion (Li-ion) battery is considered as the energy storage device in the BESS. Related costs of the Li-ion battery were obtained from [35]. The battery cycle cost has been computed for 3500 cycles at 80% depth of discharge (DoD) and a total life of 10 years as given in [35]. These costs, including relevant data, are given in Table 1.
section_name: Solar PV and BESS

section_content: Referring to several papers that forecast EV arrival, mainly in terms of the power demand [36, 37], it has been observed that the variation in the loading pattern, which refers to EV arrival, does not differ much. In [36], forecasts have been made based on the power demand due to one million EVs for charging. 

Likewise, in [37], they have carried out a short-term load forecasting for EV charging stations in terms of the probability of EV arrival for charging in a 24 h period. As the study has been carried out for a substantial number of EVs, we make use of the EV probability data from [37]. However, for suitability, the data have been normalized to the CS capacity and further translated in terms of percentage of as given by Equation ( 6 ). We consider the capacity of the charging station K = 36 units × 22 kWh = 792 kWh. We further assume a maximum occupancy of 70% at a given instant in NT period which occurs at 15 h. Therefore, the EV load at 15 h is 554 kW. The data are given in Table 2. We do not consider the effect of the SOCs of the EVs but rather consider the load as a percentage of the charging station capacity. 

As per Greenway Poland [38], the standard cost of charging an EV at public charging facility for DC ≤ 100 kW chargers is 2. 09 PLN/kWh (0. 44 USD/kWh). Therefore, α is taken as 0. 44 USD/kWh in this paper. Further, a lithium-ion (Li-ion) battery is considered as the energy storage device in the BESS. Related costs of the Li-ion battery were obtained from [35]. The battery cycle cost has been computed for 3500 cycles at 80% depth of discharge (DoD) and a total life of 10 years as given in [35]. These costs, including relevant data, are given in Table 1. Battery: A c ($/kWh) 0. 0011 Fixed cost of charging Li-ion battery [35] Battery: B c ($/kWh) 0. 0011 Variable cost of charging Li-ion battery [35] Battery: A d ($/kWh) 0. 0011 Fixed cost of charging Li-ion battery [35] Battery: B d ($/kWh) 0. 0011 Variable cost of charging Li-ion battery [35] Battery: C b ($/Cycle) 0. 134 Cost-per-cycle of Li-ion battery [35] Referring to several papers that forecast EV arrival, mainly in terms of the power demand [36, 37], it has been observed that the variation in the loading pattern, which refers to EV arrival, does not differ much. In [36], forecasts have been made based on the power demand due to one million EVs for charging. 

Likewise, in [37], they have carried out a short-term load forecasting for EV charging stations in terms of the probability of EV arrival for charging in a 24 h period. As the study has been carried out for a substantial number of EVs, we make use of the EV probability data from [37]. However, for suitability, the data have been normalized to the CS capacity K and further translated in terms of percentage of K as given by Equation (6). We consider the capacity of the charging station K = 36 units × 22 kWh = 792 kWh. We further assume a maximum occupancy of 70% at a given instant in NT period which occurs at 15 h. Therefore, the EV load at 15 h is 554 kW. The data are given in Table 2. We do not consider the effect of the SOCs of the EVs but rather consider the load as a percentage of the charging station capacity ρ ev. 

As per Greenway Poland [38], the standard cost of charging an EV at public charging facility for DC ≤ 100 kW chargers is 2. 09 PLN/kWh (0. 44 USD/kWh). Therefore, α is taken as 0. 44 USD/kWh in this paper.
section_name: EV Arrival and Tariff

section_content: Lithium-ion batteries have one of the highest efficiencies. Therefore, in this work, the efficiency of the battery, η b, is considered to be 90%, and depth of discharge (DoD) is considered to be 80%. For the initial analysis, the capacity of the battery is taken as 1 MWh. As the battery size E and initial state of charge E(0) have a significant influence on the results, we present the discussions based on these data.
section_name: Analysis

section_content: The solar PV generation and EV arrival data are shown in Figure 2. Solar power is zero during hours 0 to 4 h and 20 h to 23 h in NT period, during which, BESS must supply power to meet the EV load demand. Only between 7 h and 12 h, that is, for a total of 6 h, is P pv higher than P ev ; therefore, the battery must get charged during this period. In case of any substantial P sp, it must be sold to the grid to gain maximum profit. During this Energies 2022, 15, 5760 9 of 14 period, solar power is adequate to meet the load demand and simultaneously charge the battery. The constraint in Equation ( 14 ) suffers violation as the initial battery size of 1 MWh is unable to meet the total load demand. Therefore, the constraint E t ≥ 0 in Equation ( 14 ) is relaxed to allow the change in the battery size, which is indicated by relaxing and allowing battery discharge power P d to vary to realize optimal solution. 

As shown in Figure 3, battery supplies power to the load and subsequently gets charged at 7 h. For the remaining period after 13 h, the battery must support the solar power to meet the load demand, which is higher during this period. However, as the size of the battery is limited to 1 MWh, and the EV load demand continues to be higher than the solar power after 12 h, the battery continues to supply power to the load. The battery energy E < 0 eventually at 15 h, indicating the need for a larger-sized battery, as shown in Figure 4. In this case, a total of 1900 kWh of additional energy is required to meet the load demand at the same costs. 

The solar PV generation and EV arrival data are shown in Figure 2. Solar power is zero during hours 0 to 4 h and 20 h to 23 h in NT period, during which, BESS must supply power to meet the EV load demand. Only between 7 h and 12 h, that is, for a total of 6 h, is higher than ; therefore, the battery must get charged during this period. In case of any substantial, it must be sold to the grid to gain maximum profit. During this period, solar power is adequate to meet the load demand and simultaneously charge the battery. The constraint in Equation ( 14 ) suffers violation as the initial battery size of 1 MWh is unable to meet the total load demand. Therefore, the constraint ≥ 0 in Equation ( 14 ) is relaxed to allow the change in the battery size, which is indicated by relaxing and allowing battery discharge power to vary to realize optimal solution. 

As shown in Figure 3, battery supplies power to the load and subsequently gets charged at 7 h. For the remaining period after 13 h, the battery must support the solar power to meet the load demand, which is higher during this period. However, as the size of the battery is limited to 1 MWh, and the EV load demand continues to be higher than the solar power after 12 h, the battery continues to supply power to the load. The battery energy E < 0 eventually at 15 h, indicating the need for a larger-sized battery, as shown in Figure 4. In this case, a total of 1900 kWh of additional energy is required to meet the load demand at the same costs. The profit from the sale of electricity to the EV without the implementation of any optimization algorithm is computed at $1977. 4. The net profit after optimization is $2723. 3. power to meet the EV load demand. Only between 7 h and 12 h, that is, for a total of 6 h, is higher than ; therefore, the battery must get charged during this period. In case of any substantial, it must be sold to the grid to gain maximum profit. During this period, solar power is adequate to meet the load demand and simultaneously charge the battery. The constraint in Equation ( 14 ) suffers violation as the initial battery size of 1 MWh is unable to meet the total load demand. Therefore, the constraint ≥ 0 in Equation ( 14 ) is relaxed to allow the change in the battery size, which is indicated by relaxing and allowing battery discharge power to vary to realize optimal solution. 

As shown in Figure 3, battery supplies power to the load and subsequently gets charged at 7 h. For the remaining period after 13 h, the battery must support the solar power to meet the load demand, which is higher during this period. However, as the size of the battery is limited to 1 MWh, and the EV load demand continues to be higher than the solar power after 12 h, the battery continues to supply power to the load. The battery energy E < 0 eventually at 15 h, indicating the need for a larger-sized battery, as shown in Figure 4. In this case, a total of 1900 kWh of additional energy is required to meet the load demand at the same costs. The profit from the sale of electricity to the EV without the implementation of any optimization algorithm is computed at $1977. 4. The net profit after optimization is $2723. 3. The profit from the sale of electricity to the EV without the implementation of any optimization algorithm is computed at $1977. 4. The net profit after optimization is $2723. 3. 

It must be noted that in this case, no lower limit constraint on the size of the battery E has been imposed, thereby indicating negative energy. This also indicates that the size of the battery is not suitable. Therefore, the battery with a size of 1 MWh and initial SOC of 500 kWh is insufficient to meet the load demand. In this case, there are two viable options: (i) Buy additional power from the grid at the prevailing price of the hour and resell to the EV; or (ii) Use a larger-sized battery to meet the load demand, in which case, the fixed and linearly varying costs of the BESS will increase. 

Figure 5 shows the operational status of the battery represented by the binary variables U c t and U d t. The BESS delivers power to meet the load demand until 6 h. It also ensures that the battery is either charging or discharging only at a given instant. The charge-discharge cycle S, which is one of the optimization variables, is shown in Figure 6. For the entire day, S is maintained at 1, which is seen at 6 h. 

been imposed, thereby indicating negative energy. This also indicates that the size of the battery is not suitable. Therefore, the battery with a size of 1 MWh and initial SOC of 500 kWh is insufficient to meet the load demand. In this case, there are two viable options:

(i) Buy additional power from the grid at the prevailing price of the hour and resell to the EV; or (ii) Use a larger-sized battery to meet the load demand, in which case, the fixed and linearly varying costs of the BESS will increase. 

Figure 5 shows the operational status of the battery represented by the binary variables and. The BESS delivers power to meet the load demand until 6 h. It also ensures that the battery is either charging or discharging only at a given instant. The charge-discharge cycle S, which is one of the optimization variables, is shown in Figure 6. For the entire day, S is maintained at 1, which is seen at 6 h. The proposed formulation enables the surplus power, which is otherwise wasted instead of being used for charging the battery or sold to the grid at the prevailing price of the day, thereby making optimum use of the available solar power and the BESS. To ensure that the battery size ≥ 0, the proposed formulation is revised to determine the optimal battery size and the initial state of charge (0), which are now considered to be decision variables. cle S, which is one of the optimization variables, is shown in Figure 6. For the entire day, S is maintained at 1, which is seen at 6 h. The proposed formulation enables the surplus power, which is otherwise wasted instead of being used for charging the battery or sold to the grid at the prevailing price of the day, thereby making optimum use of the available solar power and the BESS. To ensure that the battery size ≥ 0, the proposed formulation is revised to determine the optimal battery size and the initial state of charge (0), which are now considered to be decision variables. The proposed formulation enables the surplus power, which is otherwise wasted instead of being used for charging the battery or sold to the grid at the prevailing price of the day, thereby making optimum use of the available solar power and the BESS.
section_name: Battery Size, E = 1000 kWh, E(0) = 500 kWh

section_content: To ensure that the battery size E ≥ 0, the proposed formulation is revised to determine the optimal battery size E and the initial state of charge E(0), which are now considered to be decision variables. 

The revised algorithm is rerun to determine the optimal values of E and E(0), and the values are found to be:

-E opt = 2746 kWh; and -E(0) opt = 2400 kWh These values are for load at 70% maximum CS capacity at any instant during the entire NT period. The size of the battery and the initial SOC are dependent on the loading capacity of the CS. As the associated costs of the BESS need to be accordingly revised, for suitability, the following values of battery size and E(0) are used: The proposed formulation is further rerun with the above data. The profit with the proposed formulation is found to be USD 2674. 3 for the entire day. There is no significant change in the profit compared to the profit where the constraint E ≥ 0 was relaxed. This is because the revised costs for the larger-sized battery are used in the subsequent analysis. The corresponding battery power, EV load, and solar PV generation are shown in Figure 7. As seen, battery energy is maintained at E ≥ 0, thereby satisfying all constraints and meeting the load demand even when the solar PV is lower or absent. An alternative solution to maximizing the profit without changing the size of the BESS is to purchase power from the grid at the prevailing rate and sell it to the EVs. 

- = 2746 kWh; and -(0) = 2400 kWh These values are for load at 70% maximum CS capacity at any instant during the entire NT period. The size of the battery and the initial SOC are dependent on the loading capacity of the CS. As the associated costs of the BESS need to be accordingly revised, for suitability, the following values of battery size and E(0) are used:

- = 3000 kWh; -E(0) = 2500 kWh; and -Revised fixed and linearly varying costs of the BESS. 

The proposed formulation is further rerun with the above data. The profit with the proposed formulation is found to be USD 2674. 3 for the entire day. There is no significant change in the profit compared to the profit where the constraint E ≥ 0 was relaxed. This is because the revised costs for the larger-sized battery are used in the subsequent analysis. The corresponding battery power, EV load, and solar PV generation are shown in Figure 7. As seen, battery energy is maintained at E ≥ 0, thereby satisfying all constraints and meeting the load demand even when the solar PV is lower or absent. An alternative solution to maximizing the profit without changing the size of the BESS is to purchase power from the grid at the prevailing rate and sell it to the EVs.
section_name: Optimal Battery

section_content: To carry out a comparative analysis of the results obtained through the proposed formulation, the analysis has been divided into the following three cases: (i) Case A: solution without BESS and optimization;

(ii) Case B: solution with BESS, but without optimization; and (iii) Case C: solution with the proposed formulation.
section_name: Optimal Solution with and without the Formulation

section_content: The profit is generated only from the sale of electricity when is available. Therefore, the profit is given by:

where is the revenue for Case A at time t.
section_name: Case A:

section_content: To carry out a comparative analysis of the results obtained through the proposed formulation, the analysis has been divided into the following three cases: (i) Case A: solution without BESS and optimization; (ii) Case B: solution with BESS, but without optimization; and (iii) Case C: solution with the proposed formulation.
section_name: Optimal Solution with and without the Formulation

section_content: The profit is generated only from the sale of electricity when P pv is available. Therefore, the profit is given by:

where Rev A t is the revenue for Case A at time t. Case B: The solution is obtained without the implementation of any optimization algorithm but through direct computation based on the availability of P pv, P ev, and E data of the CS. The profit is given by:

where Rev B t is the revenue for Case B at time t. To appreciate the effectiveness of the proposed formulation, comparative results of the three cases are shown in Table 3. As seen from Table 3, the proposed formulation gives a total profit of USD 2674. 3 for the entire day. The total simulation time taken to run the above three cases is 2. 038 s.
section_name: Case A:

section_content: In this paper, an MILP formulation is carried out on a solar PV-based commercial EV charging station to derive maximum profit from the sale of electricity to the EVs. As most EVs are charged at night when the solar PV is at its lowest, a battery energy storage system (BESS) is used to meet the load demand. Day-ahead solar PV forecast and the probability of EV arrival for charging during the entire 24 h period are considered. However, the solar power and the EV arrival for charging are both highly stochastic. During the NT period, when the solar PV generation is low, BESS delivers power to the load, while it consumes/charges during the period when the solar power is high. Further, the operation of the BESS and solar PV are conditioned in a manner to derive maximum profit. The desired operation of these entities is made possible through binary variables U pv t, U c t, and U d t, thereby resulting in a coordinated charging schedule for EVs. Due to the contrasting characteristics of solar power and EV charging, BESS has a significant influence on the profit margin. Solar PV alone is unable to meet the load demand and therefore, such demands can be met by: (i) Increasing the size of battery; or (ii) Importing additional power from the grid. 

The worst-case scenario would be to increase the capacity of the charging station for the same load. To determine the optimal size of the battery and E(0) for maximum profit, the formulation is revised using Equation (19). Both the optimal size of the battery and the maximum profit are then determined. Using the revised size of the battery, the initial SOC, and the revised battery costs in the proposed formulation, it is observed that the total profit for the entire day is increased compared to the case without the implementation of any optimization algorithm.
section_name: Conclusions

section_name: Institutional Review Board Statement: Not applicable.

section_content: Funding: This research received no external funding; however, the APC was funded by the Ministry of Education and Science, Poland, at the Bialystok University of Technology (Politechnika Białostocka), Faculty of Electrical Engineering, under research project WZ/WE-IA/2/2020.

section_content: Informed Consent Statement: Not applicable.
section_name: Institutional Review Board Statement: Not applicable.

section_name: Data Availability Statement:

section_content: The datasets are publicly available. Solar PV data can be obtained from: https://www. renewables. ninja/ (accessed on 9 June 2022). EV arrival data is given in Section 3, for which the raw dataset has been obtained from the reference as provided.
section_name: Data Availability Statement:

section_name: Conflicts of Interest:

section_content: The authors declare no conflict of interest.
section_name: Conflicts of Interest: