Economic Capacity Allocation of Grid-connected Microgrid Based on Improved Hybrid Genetic Algorithm

For the wind and solar diesel storage grid-connected microgrid, in order to meet the minimum investment cost of the microgrid at the initial stage and have certain economic benefits. The objective function of this paper is the annual average economic cost, the number of each micro-power source is used as the optimization variable, the constraints of micro-grid operation are considered, the capacity optimization configuration model of grid-connected micro-grid is established, and then the improved genetic algorithm can be used to solve this problem. Finally, the annual average economic cost, the utilization rate of new energy and the redundancy rate are used as evaluation indicators. By comparing the configuration results of genetic algorithm, wolf pack algorithm and mixed wolf pack genetic algorithm, the capacity allocation scheme of microgrid under economic indicators is obtained.


Introduction
In order to adapt to the development requirements of the future active distribution network and achieve accurate, precise and timely power grid operation management, grid-connected microgrids have attracted more and more attention as a distributed power source management and operation mode.
The capacity configuration of the microgrid [3]is one of the key methods to solve the reliable and economic operation of the microgrid. A reasonable configuration scheme can improve the utilization efficiency of various energy sources in the microgrid, improve the power supply quality, and ensure the system stability of the microgrid. Therefore, the capacity optimization research of grid-connected microgrid has become one of the focuses of microgrid planning, design and construction.
With the continuous development of microgrid technology, experts at home and abroad have conducted a lot of research on microgrid capacity allocation and achieved many results. In Reference [4], the author takes the lowest annual average investment cost as the optimization goal, and the probability of failure time as the constraint condition to establish a microgrid capacity optimization model. Reference [5] adopts the sequential planning method, taking the annual total energy consumption and the lowest average unit energy cost as the objective function, optimizing the configuration of the microgrid power supply, and obtaining a specific capacity allocation plan. Reference [9] uses a mixed decimal genetic algorithm with integer variables to solve the single-economy target microgrid model. In this paper, the wind and solar diesel storage grid-connected microgrid is the main body of optimization, with the number of fans, photovoltaic panels, diesel generators and energy storage batteries as the optimization variables, and the lowest annual average cost as the objective function. The algorithm is solved, and the resulting configuration scheme is compared with other schemes.
2. Structure and operation strategy of grid-connected microgrid system 2.1. Grid-connected microgrid system structure The structure of the grid-connected micro-grid for wind, solar and diesel storage introduced in this paper is shown in Figure 1 below. It consists of a fan, a photovoltaic system, an energy storage system, and a diesel generator. The energy storage battery uses an all-vanadium flow battery (VRB). Each distributed power supply and energy storage equipment are connected to an AC bus through an inverter, and the electrical load is an AC load. The common connection point PCC (point of common coupling) serves as a link between the microgrid and the large power grid and can exchange energy.

Operation strategy
Because of the strong randomness and non-schedulable nature of wind and solar resources [11], energy storage systems need to fill the gap between the amount of electricity generated by wind and solar systems and the load demand in a timely manner. Through the PCC, the microgrid can sell excess power to the power grid or purchase power from the power grid. And diesel generators can fill the power vacancy of the microgrid in a timely manner under special circumstances. In this paper, the overall energy control strategy gives priority to the use of wind and solar power generation systems in the microgrid, and the energy storage system as a backup power source acts as an energy buffer when the power supply is insufficient.
First define the power difference between the output and load of the wind and solar system as ΔP: When ΔP> 0, it means that the new energy generation can meet the power consumption of the load. Therefore, first determine the capacity state SOC (stage of charge) of the battery. If it is less than the maximum SOC of the battery, the remaining power is transferred to the energy storage system in the form of charge. Otherwise, query the real-time electricity price. If the electricity price peaks at this time, the surplus electricity can be sold to an external large power grid to increase the economic benefit of the microgrid. Light rejection ratio.
When ΔP <0, it means that there is an energy shortage in the microgrid. First determine the SOC of the battery. If it meets the discharge standard, compare | ΔP | with the remaining power. If | ΔP | <SOC, the battery gap can be filled by battery discharge; if | ΔP |> SOC, or the battery meets the discharge conditions, when the electricity price is valley period, purchase electricity from the large grid; Then the diesel generator will give priority to supplement the power difference. If the load demand cannot be met, 3 you can consider purchasing power from a large power grid or cutting off some unimportant loads to ensure power supply reliability.

Optimal capacity allocation model of grid-connected microgrid
The main research subject of this paper is the wind-solar diesel storage grid-connected microgrid, using the number of wind turbines, photovoltaic panels, diesel generators and energy storage batteries as optimization variables, the microgrid system economy as the optimization goal, and the minimum annual average cost as the objective function Establish a mathematical model of capacity allocation.

Objective function
The system's annual average economic cost Ccost consists of four parts: average annual equipment purchase cost Cbuy, average annual operation and maintenance cost Coperation, average annual equipment replacement cost Cchange and average annual fuel cost Cfuel.
The average annual equipment purchase cost refers to the product of the total purchase cost of each power equipment in the microgrid multiplied by the fund recovery factor [12], as shown in equation (3): In the formula: i = 1,2, ..., N, N = 4, corresponding to four microsources of microgrid; Ci is the unit price of various microsource equipment; ni is the the number of various microsources; ncrf is the capital recovery coefficient The average annual operation and maintenance cost is related to the operation and maintenance cost of the first year. The specific expression is shown in formula (4): In the formula: is the annual inflation rate; is the actual interest rate; is the operation and maintenance cost coefficient of various micro-sources.
The average annual equipment replacement cost is related to the service life of various types of micro-sources. The specific expression is shown in equation (5): In the formula: y is the set service life of the system; Cch-i is the single replacement cost of the i-th distributed power supply.
The average annual fuel cost is to calculate the fuel cost consumed by the diesel generator. The specific expression is shown in equation (6): In the formula: pfuel is the unit price of power generation fuel; q is the amount of fuel consumed by the power supply.

Constraints
(1) The number of various types of micro power supply installation constraints. In the optimization configuration, the installation of various types of micro power supplies should consider the constraints of the area where the system is located, which can be expressed as: o er P t P t P t P t P t P t (8) In the formula: Pi(t) (i = 1,2,3,4) is the output power of each distributed power source in time t, and Pover(t) is the overflow power of the microgrid system in t hours.
In the formula: Pdischarge, Pcharge, PN are battery discharge power, charging power and rated power.
is battery conversion efficiency, take 0.2, SOCmin and SOCmax are the upper and lower limits of the battery SOC, take 0.2 and 0.8.
(4) System capacity shortage constraints. In order to ensure the reliability of the system power supply and to offset the fluctuations caused by the randomness of scenery and load, it is necessary to set the capacity deficit rate to constrain: In the formula:  fall L is the power shortage during the operation time; set f is the capacity shortage rate limit set for the system.

Optimization
According to the previous section, capacity optimization configuration is a nonlinear problem with multiple variables and constraints. In this paper, the global search capability of genetic algorithm (GA) is combined with the local optimization of wolf pack algorithm (WPA) to solve this complex problem.

Improved parallel genetic algorithm
For the parallel genetic algorithm, due to its simple cross-mutation selection mechanism, the algorithm falls into a local optimal solution, which limits its global search ability. Therefore, this paper will first change the cross-selection mechanism of the algorithm to avoid the results of each parallel community falling into a superior situation; then add differential evolution to avoid the difference of the results of multiple communities is not obvious without distinction, effectively improve the difference between the parallel communities.
In the original algorithm, the roulette method used for cross selection, which increases the convergence speed of the algorithm, but because the individuals with high fitness occupy most of the selection space, the result of the cross is meaningless, so the confidence is introduced Degree is used as the criterion for cross selection, and the confidence degree is calculated as shown in equation (11) below. The individuals in each sub-community are ranked from small to large, and the combinations of individuals with very different fitness levels are crossed.
In the formula: f is the original result, fmin and fmax are the upper and lower bounds of the population result range, and λ is any real number in (0, 1).  Figure 2. Confidence curve of improved selection method In the Figure (2), when the upper and lower bounds of the result range are larger, the slope α is smaller, indicating that the confidence range is small; on the contrary, the greater the range, the gap between the individuals in the population can be widened The diversity of the population avoids getting stuck in the optimal solution.

Hybrid Wolf Pack-Genetic Algorithm
The wolf pack algorithm is a new algorithm with strong local search ability, but the algorithm relies on the continuous generation of random wolf packs to perform random searches on the entire search area, which is inefficient and difficult to obtain the global optimal solution. The improved parallel genetic algorithm has a good global optimization ability, which can make up for the shortcomings of the genetic algorithm, so the two are connected in series. First, a genetic algorithm performs a global fast search to obtain multiple individuals with fitness. The initial wolves formed by individuals are passed to the wolves algorithm, and local accurate search is carried out through the wolves algorithm. The position of the sick wolf eliminated in the process of the wolf pack algorithm is supplemented by the individual updated by the genetic algorithm. The schematic diagram of the hybrid wolf pack-genetic algorithm is shown in Figure ( Figure 4. Hybird wolf pack-genetic algorithm flow chart The specific process is as follows: (1) Generate 30 parallel subgroups from the initial data, set the genetic algorithm cycle number 50; hybrid algorithm overall cycle number 50; sick wolf elimination rate 20%.
(2) Use parallel genetic algorithm for the generated subgroups.
(3) The best individuals selected from these 30 sub-communities are grouped into an initial wolf pack, and a wolf pack algorithm is used to conduct an accurate search near the optimal solution.
(4) Judging the quasi-stop conditions. If satisfied, then get what you want; if not satisfied, elite wolves randomly eliminate sick wolves, and feed back to genetic algorithm to fill wolves peacock, loop step (3).
(5) Obtain the optimal function value, and the output result is the required number of each micro power supply.

Initial data
The meteorological model of the optimized configuration of the grid-connected microgrid in this paper uses meteorological data every hour of the year, and the data is obtained from the China Meteorological Data Center. Taking 2015 wind speed, sunshine and load as input data, the wind speed measurement interval is every 3 hours and the observation height is 5.5m; the sunshine illumination measurement interval is days; the load measurement interval is every hour and the specific time is 8760 hours throughout the year The data is shown in Figure 5    The wind speed in the fan output model is the wind speed at the fan hub, which is not equal to the height of the wind measurement point. Therefore, in order to avoid the error effect caused by the height difference, the following formula (12) is now used to convert the wind speed at the measurement point to the fan hub Wind speed.

Evaluation index
This section will introduce the two indicators of energy utilization rate [13] and redundancy rate [15 ]in order to more intuitively compare the impact of different configuration options on the economics of the microgrid.
(1) New energy utilization rate In the case of a certain investment cost, the microgrid can increase the economic benefits of the system by increasing the output efficiency or the use efficiency of the production raw materials (utilization rate of new energy [13]). The utilization rate of new energy refers to the ratio of the generation of renewable energy to the total generation of the system, as shown in equation (13) below.
In the formula: Ewt and Epv are the power generation capacity of the wind turbine and photovoltaic system in the grid-connected microgrid respectively; Etotal is the total power generation capacity of the grid-connected microgrid.
The utilization rate of new energy not only shows the extent of new energy to the micro-grid system, but also reflects the utilization efficiency of wind and solar resources. The higher the utilization rate of new energy, the higher the economic efficiency of the grid-connected microgrid system.
(2) Redundancy rate After the grid-connected microgrid meets the demand of the load it carries, it will sell the surplus electricity. So after running for a period of time, the value of the amount of electricity sold compared to the total amount of new energy generation is called the redundancy rate [15], as shown in the following equation (14).
In the formula: Eout is the electricity sold by the microgrid system; EDG is the total amount of new energy generation in the microgrid.
The redundancy rate reflects the economic transaction behavior of the grid-connected microgrid, and its size reflects the realization of the benefits of the microgrid. The higher the redundancy rate, the more power generated by the microgrid is used for sale, and better economic benefits can be obtained.

Analysis and comparison of results
In this section, genetic algorithm (GA), wolf pack algorithm (WPA) and hybrid algorithm (GA-WPA) will be used to calculate the capacity optimization configuration problem. Analyze and compare the three indexes of objective function value, utilization rate of new energy and redundancy rate in the three groups of configuration schemes, so as to obtain better results in the three groups of configuration schemes. The three configuration results are shown in Table 2 below, and the result evaluation indicators are shown in Table 3.   Table 2, it can be seen that because the initial cost of fans and diesel generators is higher than that of photovoltaic and energy storage batteries, the number of fans and diesel generators in the above three schemes is relatively small. Under the premise of the same object and operation strategy, the annual average economic cost is the lowest configuration result of GA-WPA, which is 425 W, indicating that the configuration results obtained by the GA-WPA algorithm proposed in this paper are more in line with the system than GA and WPA The required annual average economic minimum target. In addition, the three algorithms are compared from the standard deviation. The standard deviation of GA-WPA is only 2.75 W, indicating that the algorithm has the best stability and the smallest fluctuation, followed by GWO 5.34 W, and the stability of GA is significantly weaker.
It can be seen from Table 3 that GA-WPA has the highest redundancy rate, which shows that under its configuration scheme, the grid-connected microgrid can have more surplus power sold to the large grid, thereby achieving better economic benefits and faster Recovery of initial investment costs. Regarding the utilization rate of new energy, the number of fans and photovoltaic cells in the GA-WPA configuration scheme has been significantly improved compared to the other two schemes. The utilization rate of new energy reached 61.67%, indicating that under the same wind and light data environment, its scheme The wind and solar resources can be used more and more frequently to generate electricity, so as to increase the utilization rate of production materials and improve the economic benefits of grid-connected microgrid systems in disguise.

Summary
Aiming at the problem of capacity optimization of grid-connected microgrid, this paper establishes a capacity optimization objective function that takes into account the economic indicators of microgrid, considers various constraints such as power balance of microgrid system, and uses improved genetic algorithm to mix wolf group algorithm Better results. And through the comparative analysis of the configuration results, the optimization ability and stability of the hybrid wolf pack genetic algorithm are verified, so that the grid-connected microgrid can better achieve economic benefits under its configuration scheme.