Collaborative Capacity Planning Method of Wind-Photovoltaic-Storage Equipment in Microgrid Considering Different Energy Selling Income

— Microgrid is a promising small-scale power generation and distribution system. The selling price of wind turbine equipment (WT), photovoltaic generation equipment (PV), and battery energy storage equipment (BES) have a significant impact on the microgrid profits, which in turn affects the planning capacity of renewable energy. This paper proposes an optimal capacity planning method of wind-photovoltaic-storage equipment considering different energy selling income in microgrid. Stochastic characteristics of renewable energy (WT and PV), selling price of different energy, and timing coupling characteristic are considered in the proposed model. Besides, the configuration capacity of WT, PV and BES are modeled as discrete decision variables according to the type of specific equipment. And comprehensive life cycle cost (LCC) are considered as objective function. It can be found that the proposed collaborative capacity planning model is a mathematical programming problem with complex non-linear constraints and integer variables. To solve this problem, a cultural gray wolf optimization algorithm (CGWO) is applied in this paper. The proposed method's efficiency, convergence, superiority, and effectiveness are verified through a case study. Moreover, the impact of different new energy sales prices on capacity planning results is also revealed in the article.


CMain
Cost of the equipment maintenance

Background
Global climate change has brought severe challenges to human survival. In the face of these challenges, China put forward "Carbon Emissions Peak" and "Carbon Neutrality" policy [1] . The proposed policies insisted on green and low carbon development, tackling the climate change actively. In this context, a novel power system with renewable energy is proposed as the main body of future power system. Nowadays, Chinese clean energies mainly contain wind and photovoltaic power generation, which are the most practical way and have great development potential.
In rural areas, industrial parks, or islands, there are often many distributed photovoltaic panels (PV), wind turbines (WT), and battery energy storage equipment (BES), which constitute a "microgrid" [2] . In areas with abundant wind energy and light resources, how to optimize the capacity of different energy equipment in the microgrid, improving the economic profits, enhancing the reliability of the designed microgrid, and increasing the accommodation rate of clean energy, is a crucial while complicated problem [3] [10] .

Related Work
Scholars around the world have conducted research on the location and capacity of distributed generation (DG) in microgrid from different perspectives. Recent researches can be summarized from model formulation and algorithms.
(1) Model Formulation. The objective of microgrid capacity planning model needs to consider economy, reliability and environment protection. Economic objectives mainly include costs (annual investment cost, maintenance cost, main grid electricity purchase cost, equipment operation cost) and profits (main grid electricity selling profits, environmental subsidies) [4] . Reliability objectives include time-based indicators (SAIDI, CAIDI), frequency-based indicators (SAIFI, CAIFI), energy loss-based indicators (EENS) and so on. Environment objectives related to emissions of green house gases, which depends on the output of traditional thermal power and renewable energy accommodation [9] . The constraints of microgrid capacity planning model needs to consider power flow equation, operation mode and so on. It can be found that the capacity configuration of microgrid is a non-linear, multi-objective problem with complicated constraints [10] .
A cost-based formulation has been performed to determine the optimal size of BES in the operation cost minimization problem of MG under various constraints, such as power capacity of distributed generators (DGs), power and energy capacity of BES, charge/discharge efficiency of BES, operating reserve and load demand satisfaction [11]. [12] focus on optimization of power source capacity in microgrid and a coordinated planning strategy is proposed with integrated consideration of characteristics of DG, ES and load. [13] investigate the prospects of interlinking short-term flexibility value into long-term capacity planning towards achieving a microgrid with a high renewable energy fraction. A pumped storage power station capacity planning method based on the full life cycle cost is proposed describe a new sizing optimization methodology of a stand-alone hybrid Photovoltaic/Wind/Battery system, minimizing the Levelized Cost of Energy (LCOE), the Loss of Power Supply Probability (LPSP), and the Equivalent Carbon Dioxide (CO2-eq) life cycle emission [14] . However, few studies have analyzed the impact of price (cost and profit) on the capacity allocation of microgrid and carried out in-depth sensitivity analysis based on the proposed model, providing effective guidance for microgrid planners.
(2) Algorithm. The existing solving algorithms of capacity configuration in microgrid mainly include traditional analytical mathematical algorithms and heuristic optimization algorithms [16] . Some researchers try to reformulate the original problem into a typical mixed integer linear programming (MILP) with some approximate techniques [17] . Although this kind of methods can obtain the optimal solution of the transformed problem, the obtained solution may have large deviation from practical solution due to the approximation.
Furthermore, these algorithms cannot accommodate to various scenarios, hindering application in the practical engineering. On the other hand, heuristic optimization algorithms can solve this complicated planning problems effectively. However, the selection and improvement of heuristic algorithms based on the variable form and constraint space of the specific problem is an urgent and promising research area [18] [19] .

Main Purpose
Given that a significant portion of the revenue from microgrid operators comes from the selling income of renewable energy. Besides, the selling prices of different types of renewable energy are different, while existing researches have not yet modeled, solved, and analyzed the differences in selling prices of different types of new energy. Microgrid planners or electricity market price setters also require corresponding theoretical basis and guidance when carrying out microgrid planning or setting electricity prices. Thus, it is necessary to model the differences in selling prices of different types of renewable energy and integrate them into the microgrid planning model.

Main Contribution
To tackle the above issues, this paper proposes a novel microgrid capacity planning model and improved cultural gray wolf optimization algorithm. The major contributions of this paper can be summarized as follows: •A novel wind-photovoltaic-storage microgrid capacity planning model considering comprehensive cost and profits is put forwarded. The different selling price of WT, PV, and BES are considered in the paper, which is an essential part for planning model. selling price on the planning results, which is conducive to microgrid planners to analyze the feasibility of the planning scheme from a new perspective.

Structure
The remaining of this paper is organized as follows: In Section 2, the overall architecture of collaborative capacity planning in microgrid is presented. In Section 3, a capacity planning model of WT, PV, BES in microgrid are established. In Section 4, the solution algorithm CGWO is are introduced. Subsequently, the proposed methods have been tested and sensitivity study has been conducted in Section 5. Finally, conclusions and practical suggestions are summarized in Section 6.

Architecture of Collaborative Capacity Planning in Microgrid
Future smart DS will include various types of novel loads and DGs, including wind WT, PV, BES and user load. From the perspective of optimal planning, DS planners should coordinate reliability and DS costs through optimal design of equipment capacity to accommodate these loads and DGs. Fig.1 shows the planning task of Capacity planning in microgrid.

Optimal Capacity Planning Model of Wind-Photovoltaic-Storage Equipment in Microgrid
The objective function F of capacity planning of wind and solar storage equipment in microgrid is formulated as follows:

Annualized Cost of Investment
In the process of microgrid planning, the investment and construction cost of each equipment (WT, PV, and BES in this paper) occupies an important part, which is shown as follows: where C EQ Inv represents the investment cost of different equipment, including WT, PV and BES. The investment and construction cost of each equipment is closely related to the capacity of the equipment S EQ .

Besides, p EQ
Inv are the investment and construction cost per unit capacity of WT, PV and BES.

Annual Cost of Outage Compensation
If a power outage occurs due to insufficient power supply, the microgrid operator needs to compensate the corresponding users. In the planning and design of high-reliability microgrid, it is necessary to consider the annual outage compensation cost of microgrid, which can be written as follows: where the annual outage compensation cost of planned equipment CEENS is related to the annual shortage of power supply EENS and power outage cost coefficient kEENS. Based on power balance equation, the unbalanced power un t P  is the part that is still insufficient after the wind, solar, and storage power output, as shown in (4). Then, the power shortage EENSt occurs at the current time t when the maximum power obtained from main grid is added, which is shown in (5). Equation (6) considers the power outage under all operating scenarios.

Annual Cost of Electricity Purchased from Main Grid
If the wind and solar storage resources are insufficient, the microgrid needs to purchase electricity from the main network to meet the load demand of the whole microgrid. The annual cost calculation formula of purchasing electricity from the main network is as follows: buy where the annual cost of power purchase of the main grid CBuy is related to the power obtained through the tie line/main grid P buy t and price coefficient of power purchase from the main grid kbuy. When the unbalanced power un t P  at time t is less than 0, it means that the current power of microgrid is enough to be balanced by wind and solar storage in microgrid. In this moment, there is no need to purchase electricity from main network, and the purchased power is 0 at this time. When the unbalanced power un t P  at time t is greater than 0, it means that the current wind and solar storage resources of microgrid cannot meet the load demand in microgrid. In this situation, it is necessary to purchase electricity from the main network at this time, and the purchased power of this part is P buy t .

Annual Cost of Equipment Maintenance
The equipment invested and built by microgrid needs to be operated and maintained in its life cycle. The specific calculation formula of the cost required for this part is as follows: Main T r C S p r (9) where C EQ Main represents the maintenance cost of WT, PV and BES. The maintenance cost of each equipment is closely related to the capacity of the equipment, S EQ . Besides, p EQ Main are the maintenance cost per unit capacity of WT, PV and BES.

Annual Profit of Electricity Sales
The microgrid can exchange energy with the main grid through the main grid bus, which can gain profits if the microgrid has extra power. The calculation formula of annual electricity sales income ISell of microgrid including wind-photovoltaic-storage is mainly composed of electricity sales income of wind power, photovoltaic and battery energy storage.
where P W t is the wind power, related to the wind speed at each time. If the wind speed wt at the current moment is less than the cut-in wind speed wc, the wind power cannot be output. If the current wind speed wt is between the cut-in wind speed wc and the cut-out wind speed wr, the generated power can be calculated from a linear expression related to the wind speed and the capacity of WT. If the current wind speed wt is greater than the cut-out wind speed wr, the rated capacity S W of WT is considered in this paper.
The calculation of solar power P S t is formulated as follows: where P S t is the photovoltaic power generation, related to the planned capacity of solar power generation equipment S S and the radiation intensity of current illumination ITt.
The renewable energy modeling in this paper considers the wind speed and irradiance in the planning area, establishes a mathematical relationship between wind or solar resources and power output under given new energy installation capacity, and combines typical power output curves of wind and solar to construct a scenario-based modeling method. This paper assumed that renewable energy is preferentially consumed in the system. So, the power shortage at the current time ΔPt can be expressed as follows. (13) It can be found that if ΔPt is greater than or equal to 0, indicating that the current wind power generation power P W t and the photovoltaic power generation power P S t are sufficient to supply the load Dt, the surplus power at the current time can be provided to the energy storage equipment for charging. If ΔPt is less than 0, the current wind power generation power P W t and photovoltaic power generation power P S t cannot meet the current load Dt demand, and need to be provided by the energy storage system.
It can be seen that if SOC at the current moment is larger than the SOC at the previous moment, BES in microgrid is in discharge and sells power to the main grid. Conversely, if SOC at the current moment is larger than the SOC at the previous moment, BES in microgrid is in charge. Combined with the power margin and the maximum consumable power calculated above, the actual sales power of WT and PV can be calculated, which are shown as follows:  (20) Therefore, when the residual power margin is less than 0, WT and PV power are the actual output power.
If the power margin is greater than 0, WT and PV power can only be consumed proportionally.

Annual Profit of Equipment Scrapping
Another part of the income of wind-photovoltaic-storage microgrid comes from the scrapping income of wind-photovoltaic-storage equipment, and the specific calculation formula is as follows:

Improve the Cultural Gray Wolf Optimization Algorithm
The above problem is a planning model with complicated constraints and variables. It contains a large number of logical judgement constraints, which is intractable to most of the mathematical solvers. Further, traditional optimization algorithm has slow convergence speed. In this situation, the advantages of heuristic optimization algorithm are more prominent.
This paper improves the gray wolf optimization algorithm (GWO) [20] , and proposes an improved cultural gray wolf optimization algorithm (CGWO) which is suitable for the capacity planning model of windphotovoltaic-storage equipment in microgrid. The proposed CGWO algorithm enhances the gray wolf optimization method to effectively solve the capacity planning problem and optimize the performance of wind-photovoltaic-storage equipment in microgrids.
Traditional GWO is based on the classification of wolves. The weight of wolves with high level is higher, and the weight of wolves with low level is lower. The search range and target of different wolves are different.
Finally, the search information of different wolves is summarized and synthesized, and the optimal search mode of the whole wolves is given. With the iteration, the search range is continuously narrowed to achieve the optimal position. However, the iterative update mode of the traditional gray wolf optimization algorithm in the evolution process adopts the linear decreasing strategy to shrink, and the convergence factor calculation formula of the traditional gray wolf algorithm is as follows: where a is the convergence factor. l is the current iterative algebra. T is the total number of evolutionary iterations. Inspired by particle swarm optimization, slowing down the convergence rate of convergence factor can enhance its global search ability and prevent the algorithm from falling into local optimal solution. Therefore, in order to improve the global performance of algorithm contraction, this paper proposes a new convergence factor updating method based on exponential law change, as shown below.
The convergence factor a will decrease in the form of negative exponent, and its decreasing speed is lower than that of linear decreasing strategy.
Secondly, in order to better carry out the global search and consider the performance of local utilization (the basic idea of greedy algorithm), this paper proposes an adaptive search strategy, which makes the algorithm still attach importance to the role of the first wolf (α wolf), but at the same time, it does not take the average value of the positions of the three wolves. The specific expression is as follows: where X1 is the position of α wolf, X2 is the position of β wolf and X3 is the position of γ wolf, which indicates the central position of the population after evolving from the previous generation to the next generation. In addition, a better initial solution can significantly improve the initial search performance. Therefore, this paper is inspired by the cultural gene optimization algorithm to give full play to the global search performance of genetic algorithm. Before starting iteration, the initial solution is generated blindly and randomly. Firstly, the high-quality initial solution is obtained based on genetic algorithm (GA), and then the evolutionary iteration is carried out based on gray wolf optimization algorithm.  (ii) Giving full play to the global optimization ability of genetic algorithm, the initial solution is obtained by genetic principle, and the initial gray wolf population is generated.
(iii) Calculate the fitness function of each level of gray wolf in the population. For the calculation of fitness function in this paper, refer to the objective function of the optimal capacity planning model of wind and solar storage equipment in microgrid, which is presented in (1). After the calculation, the fitness function of different gray wolves and its corresponding position (the value of decision variables) were recorded.
(iv) Judge whether the condition of algorithm termination is met. For example, whether the algebra of convergence iteration is reached or not, the optimal solution does not change in K iterations. If the termination condition is satisfied, the optimal solution of cycle output is jumped out, and the optimal capacity planning scheme of wind-photovoltaic-storage equipment in microgrid is obtained. Otherwise, Step (v) is performed.
(v) The convergence factor a is calculated according to (24).
(vi) The gray wolf population was sorted, and the gray wolf level was divided into three levels. (viii) The number of iterations plus 1, that is, l = l+1, Return to Step (iv).

Case Study
The following will be combined with the actual solution example for analysis, based on MatlabR2020a to solve, the processor parameter of the computer is Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz, 1.99 GHz.

Model Parameter Description
This paper takes a microgrid as a simulation example. 8760 hours of the actual load demand in the microgrid, the wind speed and light intensity of the microgrid in a year for this area are collected and uploaded in [24].

Algorithm Parameter Setting
Before solving the model based on heuristic/metaheuristic optimization algorithm, it is necessary to set the memory of each parameter involved in each algorithm. In order to ensure the comparability of the algorithms, each heuristic optimization algorithm sets the same parameters in population number and iteration times, and other algorithms determine the optimal parameter settings according to the grid search method [21][22] [23]. The specific parameter settings of each algorithm are shown in Table II, Table III, Table  IV, Table V, Table VI.

Comparison of Different Optimization Algorithms
To verify the convergence and convergence speed of the improved cultural grey wolf algorithm (CGWO) proposed in this paper, it is compared with particle swarm optimization (PSO) [8], genetic algorithm (GA) [9], whale optimization algorithm (WOA) [10] and grey wolf optimization algorithm (GWO) [7]. The convergence curves and convergence times of different algorithms are shown in Figure.3 and Figure. In this case study, we compared the performance of several optimization algorithms in solving a model.
Here are the key findings: (1) Particle Swarm Optimization (PSO) produced average initial solutions, eventually converging to a local optimal solution. PSO's optimization time was moderate, but its performance was sensitive to parameter settings, making it less adaptable and robust.
(2) Genetic Algorithm (GA) had poor initial solutions and convergence speed, but its diverse and global solutions made it a valuable component of the improved Gray Wolf Algorithm, which combined GA with the stable and powerful optimization performance of Gray Wolf Optimization.
(3) Whale Optimization Algorithm (WOA) had better convergence and shorter calculation times compared to PSO. It's a meta-heuristic algorithm, easier to apply and understand than PSO.
(4) The Cultural Gray Wolf Optimization algorithm (CGWO) outperformed all other algorithms in convergence speed and actual calculation time. Its combination of cultural genes enabled high-quality solutions to evolve and converge quickly. To further verify the convergence of the algorithm, different optimization algorithms were repeated 20 times and the curves were plotted in a boxplot, as shown in Figure 5. It can be found that CGWO has the best convergence, both in terms of the fluctuation of the boxplot (length of the boxplot) and the mean value of the boxplot, which are superior to other algorithms. Therefore, it can conclude that the algorithm proposed in this paper has better convergence compared to other optimization algorithms.

Sensitivity Analysis of Model
(1) Electricity price sensitivity analysis of different types of generators.
a) Sensitivity analysis of wind power selling prices The sensitivity analysis of different wind power sales prices is made and shown in Fig.5. A sensitivity analysis on wind power sales prices by multiplying the reference price with corresponding electricity price coefficients ranging from 0.5 to 1.5 in increments of 0.05.
Based on the findings presented in Fig.6, It can be inferred that an increase in the selling price of wind power will lead to an increase in the planned capacity of wind power equipment. When electricity price coefficient exceeds 1 p.u., the planned capacity of wind power equipment increases while the planned capacity of photovoltaic and energy storage equipment decreases. However, due to the ability of energy storage to smooth fluctuations, a certain capacity of energy storage equipment is still necessary. When revenue from photovoltaic electricity sales increases, it often leads to an increase in the construction of photovoltaic equipment. However, if the revenue from photovoltaic electricity sales continues to remain high, it may result in a decrease in the construction of wind power equipment and an increase in the construction of energy storage equipment. This is because high revenue from photovoltaic electricity sales may make wind power projects less financially attractive, and energy storage equipment becomes more important to balance the intermittency of renewable energy sources such as wind and solar.
Therefore, it's important to consider the overall energy mix and the balance between different renewable energy sources and energy storage technologies to ensure a sustainable and reliable energy system. c) Sensitivity analysis of storage power selling prices The sensitivity analysis is made on the selling price of different energy storage power generation and the results are shown in Fig.8.
When the revenue generated by selling electricity from energy storage equipment increases, it incentivizes the expansion of energy storage construction capacity. However, as the cost of selling electricity from energy storage equipment increases to a certain level, it may become more expensive to rely solely on energy storage to meet the load power demand. At this point, there may be an increased incentive to expand the construction capacity of photovoltaic equipment to help supplement the energy supply and lower costs. (2) Sensitivity analysis of BES investment cost The sensitivity analysis of investment and construction costs of different energy storage equipment is made and the results are shown in Fig.9. Fig. 9. The optimal equipment capacity of different energy storage equipment investment construction cost. Fig.9 demonstrates that a decrease in the investment cost of energy storage equipment results in a significant increase in its optimal planning capacity. This is because energy storage plays a vital role in stabilizing power fluctuations within a microgrid. As such, a reduction in the construction cost of energy storage equipment incentivizes its greater utilization and expansion within the system.
(3) Discussion on the costs and benefits.
Through sensitivity analysis, the costs and benefits of different types of renewable energy on the planning results can be summarized as follows: (1) With the increase of WT selling price, the WT installation capacity increases. In comparison to PV selling prices, the advantage of WT will squeeze out some of the PV installation capacity. However, due to the greater uncertainty of WT fluctuations compared to PV, WT installation capacity rapidly decreases when the selling price is below 1 p.u.
(2) With the increase of PV selling price, the PV capacity increases to a certain extent, but after reaching a certain point, PV also needs some energy storage support and will not increase further. In comparison to WT selling prices, the advantage of PV will squeeze out some of the WT installation capacity. Since the output of PV is relatively regular (high radiation intensity at noon and low radiation intensity at other times), the PV installation capacity is replaced by WT installation capacity only when the price is below 0.8 p.u.
(3) BES plays an important role in suppressing the volatility and uncertainty of wind and solar energy.
Therefore, when the electricity price for energy storage and sales decreases, it is necessary to retain a certain degree of installed energy storage capacity to promote the consumption of wind and solar resources. When the electricity price for energy storage and sales increases, the efficient combination of energy storage and photovoltaic will show "bundled growth".

Conclusion
This paper proposes a capacity planning model for wind-photovoltaic-storage equipment in microgrids, and solves the model using the CGWO algorithm. The paper presents the following conclusions: (1) This paper analyzes the whole life cycle costs and profits that need to be considered in the planning of wind-photovoltaic-storage equipment in microgrid. Then, a capacity planning model of wind, photovoltaic, and storage equipment considering LCC and profits in microgrid is established. In terms of life cycle cost, annualized investment cost, annual power outage compensation cost, annualized main grid purchase cost and annualized equipment operation and maintenance cost are considered. In terms of profits of the system, electricity sales income and scrapping income are considered.
(2) CGWO is applied to solve the proposed model efficiently. From the simulation results, it can be seen that CGWO improves the solution efficiency and convergence characteristics without increasing too much computational complexity. Besides, the robustness and adaptability of the algorithm are obviously improved compared with the traditional heuristic optimization algorithms. Competing interests I declare that the authors have no competing interests as defined by Springer, or other interests that might be perceived to influence the results and/or discussion reported in this paper.