Abstract
Distributed power grid integration contributes to both the reduction of greenhouse gas emissions and the protection of the environment. Nevertheless, the uncertainty and volatility associated with the production of clean renewable energy adds additional challenges to microgrid dispatch. The paper presents an adaptive mutant bird swarm algorithm and suggests a comparison mechanism based on population fitness variances and optimal values in order to overcome the shortcomings of BSA, in particular its tendency to self-correct into local optimum and slow convergence speed. First, the algorithm determines if the population is in the local optimal state. The local optimal individual is then subjected to Cauchy mutation in order to determine the optimal value again. This improves the accuracy and speed of the BSA. Based on simulation results, the improved algorithm has higher optimization accuracy and faster optimization speed, which demonstrates the effectiveness and advancement of the algorithm proposed in this research.
Introduction
The energy crisis and environmental pollution have become increasingly grave problems today, and the voice of governance is growing, and clean energy sources such as wind power and photovoltaics have received good opportunities for development. Similarly, random and fluctuating clean renewable power sources [1, 2, 3] that are connected to grids have adverse effects on the distribution network. Research has been conducted on how to deal with this outstanding problem. As a new type of energy network management structure [4, 5, 6], microgrids are not only capable of being connected to the grid on a large scale to exchange energy with the large electricity grid, but can also be self-sufficient and independent as well. By using an improved gravitational search algorithm, [7] solves the optimal scheduling problem of microgrid, thus improving both the economic and environmental benefits. [8] investigates the optimal method for coordinating the energy dispatch from microgrids in grid-connected and island modes, minimizes the operating costs of microgrids and enhances the flexibility of electricity, heat, and cooling dispatching in a future electricity market. [9] demonstrated a reasonable formulation of the optimal scheduling strategy for the microgrid, thereby reducing the system loss and improving the voltage distribution. In the above literature, it has been demonstrated that rationally planning the output of distributed power and optimizing microgrid operation have a great deal of importance for the economics and the environment of microgrid operations [10, 11, 12].
As the main technical support for microgrid optimization and dispatching, optimization algorithms have become a research hotspot in recent years. [13] established an optimization model of a microgrid with a goal of minimizing the cost of power generation and the amount of exhaust gas, and used the beetle antennae search algorithm to improve the bee colony algorithm, which confirmed that the improved algorithm has a lower computational cost. As a result of simplifying the model and changing the way in which group positions are updated, [14] significantly improved the gray wolf algorithm. The results showed that the improved global search ability is more effective. In [15], a meta-heuristic search algorithm is demonstrated to solve the optimization problem of a microgrid, and the results illustrate that the algorithm is less expensive in the long term. [16] proposed a heuristic constraint processing method for solving the multi-contingent problem of the combined cooling, heating and power microgrid. Experiments verified that the algorithm’s global convergence performance was better, but only economic optimization was considered, and environmental protection was not considered.
There are advantages and disadvantages to all types of intelligent algorithms. Many researchers have worked to improve algorithms. To solve optimal scheduling problems, we expect to develop intelligent algorithms that provide better global search performance and faster convergence speed. In comparison to the particle swarm algorithm, the bird swarm algorithm increases the degree of individual intelligence. In addition, the unique search strategy of the bird swarm algorithm also allows it to search for a global solution more rapidly, thus reflecting fully and perfectly the group intelligent life behavior of the flock of birds. By imitating the alertness of birds, the bird swarm algorithm has a high level of diversity, so it has high efficiency, avoids premature convergence and better optimization effect. Moreover, because the optimal scheduling of microgrids is a nonlinear problem with multiple constraints, the evolutionary algorithms, such as genetic algorithms, will inevitably complicate the coding and increase the computational complexity of the iterations, whereas the bird swarm algorithm uses fixed foraging rules. Solving by group flight foraging rules can reduce constraint complexity and computation time. Additionally, fixed flight and foraging behaviors in flocks offer wider and faster search advantages than crossover and mutation in the genetic algorithm, which can avoid falling into the global optimum early on. Bird swarm algorithms have a fast convergence speed, a straightforward procedure, and can be easily adjusted to address a specific problem. Thus, in this paper, it is chosen as the basic algorithm for solving the optimal scheduling model for microgrids. It should be noted that there is still a precocious phenomenon common among intelligent algorithms, and related literature has improved this as well as derived other problems while achieving certain results. For example, the literature [17] used the Levy flight method to enhance the population diversity using the bird swarm algorithm, but this method increases the computational complexity and takes time. [18] analyzes migration and mutation strategies for the bird swarm algorithm, and it is assumed that the fact that the variance rate of historical optimal fitness is less than the threshold value for n successive generations is the mutation condition. However, the global optimum also satisfies this condition, which means that the judgment method of the global optimum and the local optimum is unclear, and it is easy to make changes to the global optimum group, thus increasing the uncertainty of the algorithm. The literatures mentioned above still have limitations with respect to the improvement of the bird swarm algorithm in terms of convergence accuracy and convergence speed, and further research is necessary to avoid falling into the local optimum and to find a global optimal solution.
This paper aims at a comprehensive optimization of economy and environmental protection by constructing a grid-connected scheduling model of microgrid and proposing an adaptive mutation bird swarm algorithm (AMBSA). In order to determine whether a group will fall into the local optimum, the variance value of group fitness is compared with the size of the current optimal solution. By performing simulation calculations and analyzing the results, verify the advanced nature of the established model and improved algorithm. The improved algorithm effectively addresses the problems of slow convergence speed and easy fall into local optimum of traditional bird swarm algorithms.
The microgrid model
The microgrid model studied in this paper is composed of wind turbines, photovoltaic cells, micro gas turbines, fuel cells and storage batteries.
Model composition
Wind power output model
The principle used in the manufacture of wind power is to use the wind to propel the blades of the windmill to rotate, and then to increase the speed of rotation through the use of speed increasers to promote the generator to generate electricity. In circumstances where the actual wind speed is lower than the cut-in wind speed, the wind energy is insufficient to rotate the blades, and thus no power is generated at that time. The cut-out wind speed is set to ensure the life of the fan. The fan stops rotating when the wind speed exceeds the cut-out wind speed and the power is 0. As soon as the wind speed is between the cut-in wind speed and the rated wind speed, the output power and the wind speed are in direct proportion. The following equation explains its power characteristics.
Among them,
Based on the rated output power, the light intensity, and the ambient temperature, one can calculate the real-time output power of a photovoltaic cell. The calculation formula is as follows:
Among them,
The micro-turbine (MT) uses natural gas as the main fuel, the mathematical model of MT output is shown in formula [19, 20]:
Among them,
The fuel cells (FC) are power generation devices that can directly convert chemical energy into electrical energy with the aid of fuel and oxidant. The energy consumption characteristics of FC are similar to MT, and its combustion cost can be expressed as:
Among them,
The batteries can store energy in microgrids. If the distributed power source of the microgrid is self-sufficient, the battery can be used to store the remaining power and it can serve as a backup power source during peak power consumption to ensure the reliability of the microgrid’s power supply. The state of charge of the battery depends on the previous state of charge, the load demand, and the output of the distributed power supply.
Among them,
Economic cost
The economic cost of the microgrid includes the fuel cost of the microgrid, the maintenance cost, the power purchase cost of the microgrid to the large grid, and the depreciation cost of the battery. It can be shown in formula [7, 8, 9, 10, 11].
The environmental cost is from the treatment of the exhaust gases, which mainly include the operation of the micro gas turbine and the fuel cell, and the transaction between the microgrid and the grid. The main pollutions are NO
Among them,
The comprehensive goal of grid-connected dispatching of microgrid is to take into account the lowest economic cost and environmental cost. Since the objective function belongs to a multi-objective optimization problem, the weighted summation method is used to convert the multi-objective into a single-objective optimization problem in this paper. The corresponding mathematical model is as follows:
Power balance constraints
Power balance is the most basic constraint of microgrid grid connection, which refers to the balance between output power of the microgrid (distributed power supply, storage battery, large grid) and the load demand.
The output constraints of distributed power can be expressed as follows:
The interactive power constraint between the microgrid and the large grid is shown in Eq. (16)
In the microgrid, the charge and discharge constraints of the battery should satisfy these conditions:
Among them,
The basic theory of traditional bird swarm algorithm
The Bird Swarm Algorithm (BSA) is an intelligent algorithm that simulates the foraging, vigilance, and flight patterns of flocks of birds. In the basic algorithm, the behavior of birds can be described by the following rules [21, 22]:
Each bird randomly chooses one of two behaviors: foraging or vigilant. While foraging, each bird maintains and records their optimal position in foraging, and shares this optimal position with the flock so that every bird can obtain the optimal position of the entire population. Birds that choose to be alert will attempt to fly to the center of the population. During the process of approaching the center of the population, there is competition among the birds. The degree of competition is associated with the amount of food reserves a bird has, and birds with more food reserves have an advantage in flying to the center. The birds will fly to another area periodically. Depending on their food reserves, the birds will determine their roles. Those store the least food reserves become beggars, and those with the most reserves become producers. The other birds choose randomly between the two groups. As the producer actively seeks out food, the taker randomly selects a producer and begins to look for food.
In the operation of BSA, it is possible for a flock of birds to gather prematurely and congregate, and the same fitness represents the same position [23, 24]. Therefore, the fitness of the population can be calculated to obtain the state of the flock of birds in the population. According to [18], the criterion used for judging population aggregation is to satisfy a fitness variance of zero. Nevertheless, this method is ineffective in distinguishing between premature convergence and global convergence, and further judgment is required.
In order to address the premature convergence problem associated with BSA, this paper proposes an adaptive mutation strategy based on the variance of population fitness and optimal solution determination. A first comparison is made between the variance of population fitness and the optimal solution. As a second step, in order to continue searching for the optimal value, the optimal individual is tested for the Cauchy variation, so that the bird swarm algorithm converges faster and the optimization accuracy is higher.
The judgment of algorithm local optimal
Let the flock size be
In the formula, the
Based on the above, the conditions for judging the local optimum are: the population fitness variance is close to zero, at the same time the optimal fitness
The above judgement condition of the local optimum can be expressed as:
Among them, the value of
The number of iterations is related to the setting of the fitness result
The standard Cauchy distribution probability density function can be expressed by the following formula:
The Cauchy distributions have the characteristic that the distribution is relatively long at both ends, whereas the peak at the origin is relatively small. The curve is infinitely close to the axis without intersecting the axis, which also allows the Cauchy mutation to produce greater disturbances in the vicinity of an individual bird that is currently mutated. So the Cauchy variation range is wide [25]. Accordingly, using the distribution of both ends of the Cauchy variation can make it easier for each individual bird to escape the local extreme value.
In search of the optimal solution, the individuals of the flock often lead in the direction of the current producer, resulting in the next iteration of the algorithm continuing in the direction of the previous producer, which leads to a lack of diversity in the population, which in turn leads to the search for the optimal solution. The optimal speed is reduced [26]. Therefore, after determining the local optimum, it is necessary to change the position of the optimal individual at this point, so that the group may move away from the local optimum and continue to seek out a global optimum.
The Cauchy mutation strategy for the position of the flock can be expressed as follows:
Among them,
The generating function of a Cauchy-distributed random variable is:
The process of improving the bird swarm algorithm is as follows:
Set the basic parameters of the initialization algorithm, including population size Initialize the population, generate the fitness of the initial flock and the each individual in the flock, and determine the optimal fitness of the current flock. Update the position of the flock according to the flock’s foraging, vigilance, and flight behavior. Compare the calculated fitness of the flock with the current optimal fitness value, and replace the better one. According to Eqs (21) and (22), calculate the population fitness variance Through judgment, if the conditions for termination are met, the optimal solution is output; if not, jump to (3). The flowchart of the improved bird flock algorithm based on the adaptive mutation of the population fitness variance and the optimal solution determination is shown in Fig. 1.
Flow chart of improved bird swarm algorithm.
This paper takes a typical microgrid system [27] as the research object. Under the goal of the lowest comprehensive consumption of microgrid, this paper adopts the adaptive mutation bird flock algorithm based on group fitness variance and optimal solution determination to solve the model. This paper takes the grid-connected model as an example, and uses MATLAB to write the optimal scheduling program of microgrid.
Basic parameter settings
Lord curve in 24 h.
Wind and light output curve in 24 h.
The calculation period of this article is 1 day, and it is divided into 24 hours, each hour is 1 period. The load curve diagram and the PV and WT output of the whole day are shown in Figs 2 and 3. The basic data of each distributed power source in the microgrid system is set to a fixed value, in which the conversion efficiency is 40% and the rated power of the fuel cell is 45 kW; the maximum power of the battery when charging and discharging is 30 kW and
Basic data of each distributed power supply
Pollution gas emission factor and treatment cost
Time-of-use electricity price for electricity purchase and sale in
This paper builds a model with the goal of minimum comprehensive consumption. In order to comprehensively consider the cost and environmental factors, and coordinate the balance between the economy and the environment,
Power curve analysis under the optimal dispatch of microgrid
During grid-connected operation, WT and PV are used to maximize output strategy. After simulation calculation, the 24-h output power curve of each power supply is obtained as shown in Fig. 4.
It can be seen from Fig. 4 that the load demand is small at the time of 1:00
From 7:00 to 9:00 and 16:00 to 18:00, the power generation cost of the fuel cell is still higher than the electricity purchase price, so it should basically not generate electricity; and the micro gas turbine has low pollution, so the micro gas turbine gives priority to the output. During this time period, the micro gas turbine should be primarily utilized for output and power purchases from the large grid to meet the needs of the micro grid load.
In the period of 10:00
Battery life is affected by frequent charging and discharging. In a dispatch cycle, according to the time-of-use electricity price, the battery is only charged at the trough and discharged at the peak, so the impact of frequent charging and discharging can be ignored.
Comparison of BSA and AMBSA
This paper compares the adaptive mutation improved bird swarm algorithm (AMBSA) based on population fitness variance and optimal solution determination with the bird flock algorithm before improvement and literature references [28, 29]. In the comparison, the fitness function of the algorithm is set as the objective function F, the population size is 300, the maximum number of iterations is 300, and the basic parameters of the four algorithms are
Comparison of the speed and results of the four algorithms
Comparison of the speed and results of the four algorithms
Optimal dispatching power curve of microgrid.
Comparison of the fitness convergence curves of the four algorithms.
Compared to the algorithm provided by the literature [28], the improved algorithm proposed in this paper improves the optimization accuracy by 9.51% and the optimization speed by 1.59%; and it improves the optimization accuracy by 8.01% and the optimization speed by 0.98% compared to the algorithm provided by the literature [29]. In summary, the adaptive mutation improved bird swarm algorithm based on population fitness variance and optimal solution determination in this paper has better optimization capabilities, faster optimization speeds, and lower operating costs. It has been found that the proposed improved bird flock algorithm is advantageous in solving the complex microgrid dispatching problem in light of the environment and cost.
The paper constructs a microgrid optimal dispatch model that incorporates operating costs and environmental pollution control costs. The traditional bird flock algorithm has been improved to overcome the problem of premature convergence of such models. Since fitness variance cannot judge whether an individual is trapped in local optimum, an adaptive mutation bird swarm algorithm (AMBSA) is proposed based on the joint evaluation of the group fitness variance and the optimal solution. And the cauchy mutation perturbs the individuals judged to be local optimum in order to find the optimal solution again, which enhances the anti-premature ability of the adaptive mutation bird swarm algorithm. In order to verify the effectiveness of the algorithm improvement, this paper compared and analysed the AMBSA and the improved BSA in related literature. Simulated results demonstrate that the optimization accuracy and speed of AMBSA in this paper are superior to those of other algorithms. It is verified that the effectiveness of AMBSA in solving the integrated cost microgrid dispatch model, and needs to be further optimized for applications in other fields.
Footnotes
Acknowledgments
This work was supported by the following funds, including Youth Project of the Natural Science Foundation of Shandong Province (ZR2020QE215); the Natural Science Foundation of Shandong Province (ZR2017LEE022); the Key R&D Program of Zibo City (2019ZBXC498).
