An Optimization Approach Considering User Utility for the PV ‐ Storage Charging Station Planning Process

: Based on the comprehensive utilization of energy storage, photovoltaic power generation, and intelligent charging piles, photovoltaic (PV) ‐ storage charging stations can provide green energy for electric vehicles (EVs), which can significantly improve the green level of the transportation industry. However, there are many challenges in the PV ‐ storage charging station planning process, making it theoretically and practically significant to study approaches to planning. This paper promotes a bi ‐ level optimization planning approach for PV ‐ storage charging stations. First, taking PV ‐ storage charging stations and EV users as the upper ‐ and lower ‐ level problems, respectively, during the planning process, a bi ‐ level optimization model for PV ‐ storage charging stations considering user utility is established for capacity allocation and user behavior ‐ based electricity pricing. Second, the model is converted into a single ‐ level mixed ‐ integer linear programming model using the piecewise linear utility function, Karush–Kuhn–Tucker (KKT) conditions, and linearization methods. Finally, to verify the validity of the proposed model and the solution algorithm, a commercial solver is used to solve the optimization model and obtain the planning scheme. The results show that the proposed bi ‐ level optimization model can provide a more economical and reasonable planning scheme than the single ‐ level model, and can reduce the investment cost by 8.84%, operation and maintenance cost by 13.23%, and increase net revenue by 5.11%.


Introduction
Advances in energy storage technology and grid intelligence and increased electric vehicle (EV) ownership have greatly promoted the development of EV charging infrastructure. However, the existing charging stations are neither low-carbon nor friendly to the distribution system because they have no energy storage facilities and must obtain electric power from the distribution network [1]. In order to take advantage of the bi-directional flow between renewable energy and energy storage systems, green photovoltaic (PV)-storage charging stations, installed with both a photovoltaic power generation system and an energy storage system, were developed based on the existing traditional charging stations. A PV-storage charging station is a microgrid that integrates the technologies of photovoltaic power generation, energy storage (ES), and smart charging station (SCS). The associated operation between photovoltaic power generation and EV charging and discharging can help

PV-Storage Charging Station System
The PV-storage charging station system, the upper-level problem studied in this paper, is shown in Figure 1. A PV-storage charging station is usually composed of multiple EV charging facilities (CFs), energy storage (ES) units, and photovoltaic units. A charging station that is connected to an external distribution network via a power electronic converter can obtain its energy supply from the main power grid in case of insufficient power generation. ES units are installed in the system in order to make full use of renewable energy (RES). When the PV output power is higher than the charging demand of the connected EV, the ES can start power charging to store excess energy. When the PV output is insufficient, the ES can perform power discharging to supply energy. Therefore, the PVstorage charging station can achieve minimal energy consumption by coordinately controlling the ES and PV output. All of the above components are assumed to be integrated into the charging station based on the AC interface and controlled centrally by the system operator. Both the charging station operator (CSO) and EV users are considered in this paper. The CSO is responsible for the construction and operation of the charging station and will consider the EV users' selection strategy in charging storage planning. The CSO considers the construction cost, operation, and maintenance cost, and power sales revenue to determine capacity allocation and electricity pricing, based on the premise of satisfying the internal balance and security constraints. EV users can choose from the electricity pricing schemes offered by the CSO to obtain better economic benefits. This paper assumes that the investment and operation of the PV-storage charging station are performed by the CSO. The PV-storage charging station earns revenue by providing EV users with energy from PV units or the external power grid. In addition, the CSO can also profit from trading with the power grid via PV power generation in a deregulated environment. The electricity exchange price is determined through bilateral negotiation between the CSO and the main power grid and remains unchanged during the contract period. The operational performance of the charging station varies with floating EV charge demand. The CSO must fully consider the potential response of EV users, participate in the design of electricity pricing, and coordinately determine the optimal configuration and control strategies in order to maximize profits.
On the other hand, EV users have to decide on their charging load at the charging station each time they charge (provided that the minimum charging demand is large enough to power the next driving distance), and their charging demand is affected by the electricity price. Therefore, the optimal decision for EV users depends not only on their own preference but also on the CSO's electricity pricing, which may conflict with their goals.
The optimal planning and decision problem for the CSO can be expressed as a bi-level planning model, as shown in Figure 2. The upper-level problem represents the CSO's decision in relation to the PV, ES, CS configuration, and electricity pricing to maximize the expected revenue. The lowerlevel problem considers the CSO's pricing scheme and predicts the EV users' response by calculating the optimal charging benefits for each user. The price implemented by the CSO is in real-time and can be adjusted to influence the users' behavior so that they can be encouraged to actively respond to the RES output curve. The construct of this model will help to obtain an optimal capacity configuration and price scheme.

Objective Function
According to the description of the model framework in the previous section, the upper-level optimization problem involves optimal configuration and pricing of PV-storage charging stations, i.e., determining PV, ES, and CS capacity and pricing. The objective function for the upper-level model is shown in Equation (1):   int   , , , In the bi-level model, the objective function for the upper-level model is the maximum revenue of the CSO, and expected revenue is the difference between the expected revenue ( Ope B ) and the investment cost ( Inv C ). In Equation (2)  represent the annual unit operation cost of the CF, PV, and ES facilities, respectively. In Equation (4), k represents the capital recovery factor, and d and ζ represent the facility lifetime and discount rate, respectively.

Constraints
The CSO needs to consider constraints during facility construction and operation, including constraints of investment, balance, and security. The specific constraints are shown in Equations (5)- (19).
Equations (5)-(9) are investment and price constraints: Equations (5)-(7) represent the maximum installable rated power constraints for CF, PV, and ES in the charging station, and their investment capacity has an upper limit due to capital or space limitations. Equation (8) represents the maximum installable storage capacity of ES. Equation (9) represents the price constraints by the CSO that can help ensure the stability of the EV charging market. Equations (10)- (19) Equation (10) specifies that the exchange power between the charging station and the main power grid should not exceed the substation transformer capacity. Equations (11) and (12) specify the maximum PV scheduling power and CF capacity constraint, where rd g t  represents the photovoltaic output factor. Equations (13) and (14) Equations (15) and (16)  is a constraint that connects the upper and lower levels, including the upper variable ch t P and lower decision variable, where t  represents the time scale, set as 0.5 h in this paper. For the sake of simplicity, it is assumed that each EV user charges in the charging station only during a single time period t, regardless of the charging behavior across multiple time periods.

Objective Function
The lower-level optimization problem in Figure 2 is the behavior selection problem of EV users based on real-time pricing. The charging demand at each period is determined. The objective function of the lower-level problem is shown in Equation (20): The objective function for the lower-level problem is the maximum EV user benefits, and the benefits are expressed as the difference between user utility , ( ) ev v vt U d and the electricity charging cost. v U in the equation represents the utility function of the electric vehicle user, and its specific form will be described in detail in the next section, and the other symbols have the same meanings as in the previous section.

Constraints
Equation (21) is the EV power demand constraint, which is used to ensure that the user's charging demand meets the minimum charging load and maximum charging limit, i.e., the EV capacity is kept between the minimum mileage power and the rated battery capacity.
The essence of the lower-level optimization is that EV users make their choices according to the electricity price, i.e., users just need to consider their own benefits and costs and do not need to consider the constraints of the charging station and the power grid, since the capacity configuration and price-based optimal charging load in each period are determined by the CSO in the upper-level model.

KKT Algorithm Analysis
In the previous section, a bi-level planning model was established to solve user behavior-based PV-storage charging station planning, but the specific form of the benefits function for the lowerlevel problem was not described. This section elaborates EV user benefits using the piecewise linear function, where the lower-level problem is linearized and, based on this, the KKT conditions are used to convert the bi-level optimization problem into a single-level optimization problem. Then linear approximation is used to transform the single-level problem into a mixed-integer linear programming problem that is finally solved using the classical solutions.
As shown in Figure 3, the bi-level optimization problem is converted into a single-level mixedinteger linear programming problem through the following three steps: first, the lower-level function is piecewise linearized to represent user utility. Second, the KKT conditions, which are used to replace the lower-level problem, are included in the upper-level problem, thus obtaining an equivalent single-level problem. Finally, the nonlinear terms in the obtained single-level problem are linearized to obtain a single-level mixed-integer linear program. In this way, the original problem is transformed and can be efficiently solved.

Linear Description of Lower-Level Problem
The utility function is used to measure consumer satisfaction as a function of consumption of a vested commodity combination. The consumers in this paper are EV users, and the commodity is charging power. According to the utility function, the utility increases as a function of increasing purchased commodities, while the marginal utility of unit commodity decreases.
As shown in Figure 4, this paper assumes that EV user utility is a piecewise linear function of charge capacity, given that the piecewise function is a typical function representing the relationship between welfare utility and energy consumption [21,22], and linearization of the EV user benefits utility can be applied to the proposed bi-level optimization model and solution method. Without loss of generality, this paper assumes that the segmentation function is divided into five segments (M = 5), and each segment corresponds to a predetermined marginal utility value. , , ev v t m d represents the charging demand of EV users in each segment, and the total utility from the CSO can be expressed as piecewise linearized using Equations (22) and (23): The original lower-level model can be expressed as Equation (24): Equations (25) , m a x , 0: , m i n , 0: represent the minimum and maximum SOCs of EV batteries and the initial SOC at the charging station. Equation (28) indicates that the EVs' charge capacity in each segment is smaller than the upper limit of this segment. Equation (29) indicates that the charge capacity of each segment is positive. It should be noted that the subsequent variable of each equation is its dual variable. Based on this, the linear expression of the bi-level problem can be obtained.

Reducing a Bi-Level Problem to a Simple Level Problem
The lower-level problem in the previous section was linearized. In the proposed bi-level problem, according to its structural and form transformation, the upper-level variable can be considered as a parameter in the lower-level problem, and for a given variable t  , each lower-level problem is a linear optimization problem that is continuous and convex in structure. Therefore, the KKT conditions can be used to replace the lower-level problems in Equations (24)-(29) with their corresponding KKT optimality conditions and then be included in the upper-level problem. By doing this, the original bi-level model is transformed into an equivalent single-level problem [23].
The equations for the KKT conditions are as follows: Equation (32) represents the Lagrangian function of the lower-level problem, and , , By substituting Equations (24)-(29) for the lower-level problem with Equations (33)-(38), a single-level model equivalent to the bi-level optimization can be obtained.

Linear Description of Lower-Level Problem
We can transform the bi-level model into a single-level problem, but this single-level problem is bilinear and has nonlinear terms, and cannot obtain an exact solution using the classical algorithm. Therefore, the nonlinear terms in the single-level problem described in the previous section should be linearized. The nonlinear terms in the single-level constraints are generated when the KKT conditions are introduced to achieve single-level transformation. The relaxing complementarity conditions introduced in the constraint have nonlinear terms by multiplying two variables, and these nonlinear terms can be transformed into a mixed-integer linear program [24]. The specific transformation for 0 0 d     is as follows: where M is a sufficiently large constant, and w is a variable between 0 and 1. It should be pointed out that since the value of M will affect the accuracy of the problem and the efficiency of the calculation, decision-makers need to make appropriate choices. Some studies have given alternatives. By using the above method, the nonlinear complementarity constraints in Equations (35)-(38) can be rewritten as follows: 1 , , t , m i n ,  1  2  3  4  ,  , , In addition to the upper-level objective function, the above process linearizes the nonlinear constraints using an equivalent mixed-integer linear programming model. Here we linearized the nonlinear terms in the upper-level objective function using a classical linear approximation method. Owing to its simplicity and easy access to a solution, this method has been fully applied in some studies [25,26]. The specific method is as follows.
According to the linearized model and assuming z a b   represents a bilinear term,  z a b b a a b   z a b b a a b   z a b b a a b   z a b b a a Applying this method to the upper-level objective function, the converted objective function can be expressed as: where constraints are added correspondingly: The nonlinear terms in the upper-level objective function are effectively linearized using the above method. As a result, the nonlinear bi-level optimization programming model is transformed into a single-level mixed-integer linear program, which can be effectively solved through commercial solvers such as CPLEX (12.7.1, IBM, Armonk, NY, USA, 2018).

Case Analysis
Numerical simulations of the model mentioned in the first two sections were conducted to obtain planning results of power pricing and capacity allocation. The planning results of the existing bi-level optimization model were compared with those of the common single-level optimization model and their differences were summarized. The superiority of the bi-level model was verified

Basic Data
In this paper, solar photovoltaic panels and lithium-ion batteries were used as photovoltaic power generation and energy storage equipment. Relevant data shown in Table 1 were obtained from the website and merchant research. Assuming that the total area of the PV-storage charging station is 3000 m 2 , the maximum installation power and capacity of CF, PV, and ES is 5000 kW, 500 kW, and 900 kW (2500 kWh), respectively, and the basic discount rate is 6%, based on compound interest. The transformer-capacitor connecting the PV-storage charging station to the external power grid is set as 4000 kVA, the real-time price of a certain power market is set as the real-time electricity price, and the output parameter curve of a certain PV plant is used the PV output factor. The specific parameters are shown in Figure 5. For simplicity, the simulation example uses Nissan's electric vehicles to represent the EV user community. Each EV has a battery capacity of 40 kWh and a power consumption of 0.18 kWh/km. The lower and upper limits of SOC are set as 30% and 90%, respectively. To be consistent with the proposed model framework, EV users in the charging station system are assumed to be classified into three categories based on daily driving distance: remote range (LR), medium-range (MR), and shortrange (SR). In addition, the CSO can predict EV traffic and the proportion of EV users in the three driving distance groups at the charging station at different times of the day. The numbers of LR, MR, and SR EV users are shown in Figure 6, and their parameters are shown in Table 2.

Simulation Example Results
Based on the above basic data, the commercial solver CPLEX (12.7.1, IBM, Armonk, New York, USA, 2018) was used to perform the example simulation in the MATLAB environment (2018a, MathWorks, Natick, MA, USA, 2018), and the obtained PV-storage charging planning results and economic cost are shown in Table 3. The real-time electricity pricing profile is shown in Figure 7.  It can be seen from Table 3 that the daily sales of the PV-storage charging station is 8.764 MWh, with an annual net revenue of $752,485. The photovoltaic installation is at the boundary of the maximum installed capacity, indicating that during operation of the charging station, photovoltaic power generation can achieve higher revenue compared with purchasing electricity from the main power grid. Therefore, the planning results show that under sufficient load, the PV-storage charging station should use more available space to install photovoltaics. In this operation, the photovoltaic output accounts for nearly 30% and can be fully consumed owing to more energy storage facilities, indicating that overall advances in energy storage technology can help cost reduction.
It can be seen from Figure 7 (the real-time electricity price profile) that the highest electricity price in a day is $0.40/kWh, which occurs between 19:00 and 21:00, while the lowest electricity price is $0.32/kWh, which occurs between 03:00 and 04:00. From the perspective of the price changing trend, the electricity price peaks from 09:00 to 11:00 and from 19:00 to 21:00, during which it reaches the highest limit peak. There is a small fluctuation in the afternoon, which is consistent with the charging behavior of EV users. EV users charge their batteries mainly in the morning and evening, so the charging load is greater during those periods. The photovoltaic output is low and even reaches zero at night, and the electricity from the main power grid is also priced higher during this period. Therefore, the PV-storage charging station has to turn to the main power grid or energy storage system to meet the users' load demand. At this time, the CSO should set a higher electricity price to ensure the profitability of the system.
The planning results of the simulation of the PV-storage charging station system are shown in Figure 8. The red bars represent the power demand of EV users, the blue and orange bars represent the charge and discharge states of the ES and the charge and discharge amounts, respectively, and the purple bars represent PV output. If a green bar is positive, it means the charging station purchased electricity from the main grid. If the green bar is negative, it means the charging station sold electricity to the main grid. The figure is based on the internal power balance of PV-storage charging stations. The area above the time axis represents the power source of the charging station, while the area below represents the power output. Total power generation is equal to total power consumption, so the figure has vertical symmetry. It can be seen from Figure 8 that the EV load is greater in the morning and the evening, and smaller at night. From the perspective of time, the energy storage system works more between 22:00 and 05:00 the next day, because the electricity price of the main power grid is lower at this time, and the CSO purchases electricity from the main grid and continuously charges electricity in the ES system to maintain storage power. In addition, three ES discharges occur between 00:00 and 02:00 at night. Since the night electricity price is floating, the CSO is profitable by using low-price charging and selling high-priced electricity at the next moment. In general, the charging station performs ES at night, and between 05:00 and 09:00, the EV load is relatively small and the photovoltaic power generation is also very small. At this time, the load is mainly satisfied by the power supply purchased from the main power grid without using the stored energy in the ES system. However, during the peak charging period in the morning, the CSO calls up a large amount of nighttime energy storage and uses PV power to meet the EV charging demand, while the charging station can transfer electricity to the external grid until the SOC of the ES reaches the lower limit. This is the main period when the charging station can generate a profit. From 11:00 to 13:00, the CSO directly purchases electricity from the main power grid and photovoltaic power to meet the EV user load without activating the ES system. The ES is charged to store energy until 13:00-15:00 when the PV output is large and the electricity purchased from the main power grid is low-priced. The situation from 16:00 to 18:00 is similar to that from 11:00 to 13:00. From 18:00 to 21:00, the CSO meets the needs of EV users by discharging the energy stored in the afternoon and sending electric power to the main grid to obtain greater benefits.
Looking at Figures 7 and 8, we discuss the impact of electricity price on PV-storage charging station operation strategy. When the electricity price and load are low at night, charging stations carry out arbitrage by providing ES charging at a low price and discharging at a high price. From 19:00 to 21:00, the charging demand increases and the PV output is low, and the charging station raises the price, making a profit from the price difference between purchase and sale. Electricity prices are also appropriately raised as demand increases further when PV power generation increases from 21:00 to 00:00. The CSO benefits mainly from low-cost PV power generation and ES. From 12:00 to 18:00, the electricity price fluctuates steadily, controlling the stable fluctuation of the charging load. At this time, the revenue mainly comes from PV power generation and the price difference between purchase and sale. At night, since the main grid has a high electricity purchase price and no PV power generation, PV charging stations raise their electricity prices and reduce some of the load. Charging profits mainly come from the discharge of ES. Figure 9 shows the daily SOC of the ES system that can reflect its operating state in the PVstorage charging station. SOC can be roughly divided into the following parts. The ES system has rapidly changing SOC at night. As seen by the operating state in Figure 9, it can be concluded that the PV-storage charging station utilizes the nighttime price spread by performing fast charging and discharging to maximize profits. From 03:00 to 05:00, the ES system is in the fast charging state and the energy storage reaches the upper limit of SOC, then is maintained at 56% after proper discharge. From 09:00 to 11:00, the discharge energy storage is in a lower state and is recharged at 11:00 and 13:00 to the upper limit of SOC, then is discharged in the afternoon to maintain at 56%. At night, it is discharged again to remain at the lower limit of SOC.  Figure 10 shows the PV/load ratio of the PV-storage charging station. From this figure, it can be seen that PV has a contribution rate of over 40% from 10:00 to 17:00, which indicates that the charging station can make full use of PV power generation. The reasonable combination of PV and ES not only improves the charging station's economy but also better consumes and utilizes renewable energy. The following conclusions can be drawn by analyzing the above results. First, in the case of mature technology and reduced cost, PV-storage charging stations should make full use of space to invest in and construct photovoltaic and energy storage facilities. Secondly, CSOs should set reasonable electricity prices and adjust the charging demand of EV users via electricity pricing means to achieve balanced benefits. Finally, CSOs need to make full use of the characteristics of photovoltaic power generation and especially energy storage, and properly adjust charging and discharging based on the electricity price to promote the economic efficiency of system operation.

Models Comparison
This section compares and analyzes the effects of the bi-level model and the common singlelevel planning model. The single-level model considers that the charging demand of EV users , ev v t d is fixed and is equal to the calculated demand for the bi-level optimization model, and assumes that the CSO can accurately predict EV user types and the number of electric vehicles at different time points in advance, i.e., every EV user has a fixed charging demand, regardless of choice.
Based on the above assumptions and design, this section constructs two schemes, shown in Table  4. Scheme I builds a single-level model where the CSO's electricity sales price is set at 0.35 $/kWh. Scheme II is a bi-level model that takes account of capacity configuration and electricity price optimization under uncertainty conditions. The results and economic characteristics of schemes using CPLEX are shown in Table 5. As can be seen from Table 5 and Figure 11, different planning schemes result in different configurations of PV-storage charging stations. More specifically, compared with the bi-level model of Scheme II, the single-level model of Scheme I has a larger CF installation capacity and the electricity price is fixed, and the larger installation capacity leads to increased investment operation and maintenance costs and decreased net revenue. The reason for these results is that the charging demand of EV users in the single-level model is set as a fixed value, regardless of electricity price. The CSO needs to invest in and build more charging facilities to meet the needs of EV users, so compared with the EV user choice-based model, this scheme will lead to increased cost. Compared with Scheme I, in Scheme I without ES, the investment cost is reduced, but the operating return and total revenue are also reduced, which indicates that the installation of ES is beneficial to the charging station. The reason is that the charging station can use ES derived from the power grid or PV and discharge electricity for EV users, obtaining revenue through price differences.
In addition, the PV investment for both schemes is the set upper limit, indicating that the extensive installation of PVs within a limited capacity is beneficial to obtain greater revenue.
The above comparison reveals the importance of EV user behavior in the optimal design of PVstorage charging stations. Since the charging demand of EV users usually varies with the electricity price, it is important to consider user choice when evaluating the profitability of the PV-storage charging station planning scheme.
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation as well as the experimental conclusions that can be drawn.

Conclusions
In order to propose an effective PV-storage charging station planning scheme, this paper established a bi-level planning model for charging stations that considers the needs of EV users. Using dual theory, KKT conditions, and linearization tools, the problem was transformed into mixedinteger linear programming. The model was solved using a commercial solver and a case study was performed. The main research results of this paper are as follows: (1) We describe and analyze the systematic structure and model framework of a PV-storage charging station. Taking the PV-storage charging station and EV users as the main upper-and lowerlevel problems, respectively, a bi-level optimization model for capacity allocation and electricity pricing in the PV-storage charging station is established based on constraints such as systematic planning and operation and user demand, with the objective of maximizing revenue and EV user benefits. The bi-level problem is transformed into a single-level mixed-integer linear programming model using the piecewise linear utility function, KKT conditions, and a linearization method.
(2) Using CPLEX (12.7.1, IBM, Armonk, NY, USA, 2018) software for simulation, the validity and practicability of the model are verified by analyzing the planning results, electricity price, operation states, and ES system state.
(3) Through case analysis, it can be concluded that PV-storage charging stations can reduce cost by investing in green PV and carrying out price arbitrage by allocating ES to improve revenue, which is shown in Table 5. By using these methods, the benefits of PV-storage charging stations can be maximized.
This research provides an optimal operational scheme for PV-storage charging stations, including initial investment and construction cost, the output installment capacity of each facility, and a real-time electricity pricing scheme, and has a high economy and practicality.