# Research on Economic Optimal Dispatching of Microgrid Cluster Based on Improved Butterfly Optimization Algorithm

Authors: Yu Zhang; Hui Zhou; Liexi Xiao; Guanhao Zhao
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

Microgrid optimal dispatching has become one of the core issues of microgrid energy management and integrated control, which is of great significance to reduce energy consumption and environmental pollution. As a natural heuristic algorithm, the butterfly optimization algorithm (BOA) has the advantages of simple adjustment parameters and fast convergence speed. It is widely used to solve nonlinear programming problems. However, BOA is easy to fall into local optimization and poor convergence accuracy. Therefore, an improved butterfly optimization algorithm (IBOA) based on skew tent chaotic map, Cauchy mutation, and simplex method is proposed, and compared with particle swarm optimization (PSO), whale optimization algorithm (WOA), sparrow search algorithm (SSA), and BOA, the results show that the IBOA has high convergence speed and optimization accuracy. Finally, the IBOA is used to solve the optimization model. The simulation results show that the IBOA can effectively reduce the power consumption cost of the system, promote the effective utilization of renewable energy, and improve the operation stability of the microgrid cluster system.


---

## Body

## 1. Introduction

Nonrenewable energy plays a crucial role as the main energy in production and life. However, due to the overexploitation of nonrenewable energy, a series of problems caused by the use of nonrenewable energy is gradually expanding, endangering the ecological environment of the natural world, and the development and utilization of renewable energy such as wind energy and solar energy are becoming more and more important. With the development of renewable energy and energy storage batteries, the microgrid cluster system consisting of multiple microgrids can make effective use of renewable energy and has good development prospects [1–4]. The microgrid cluster system is an extension of the microgrid system. Compared with a single microgrid, the interconnected operation of multiple microgrids not only improves the reliability of the power supply but also plays an important role in reducing power economic costs and environmental protection. Microgrid optimal dispatch problem is generally multi-objective optimization. Due to the random fluctuation of distributed energy, the microgrid optimal dispatch problem has become a nonlinear, multi-constrained, multivariable combinatorial optimization problem [5–8]. For traditional algorithms, it is usually hard to find a feasible or optimal solution. In recent years, biomimetic-inspired intelligent optimization algorithms have become increasingly important in solving the optimal dispatch problem of the microgrid [9, 10]. Popular algorithms such as PSO [11, 12], genetic algorithm (GA) [13, 14], and ant colony optimization (ACO) [15] have better global optimization ability and robustness.At present, many scholars have done a lot of research on the optimal dispatch of the microgrid. Miao et al. [16] proposed a cost-benefit model for analyzing the scale of microgrid energy storage system (ESS), which is solved by the gray wolf optimization (GWO). The superiority of intelligent optimization algorithms in solving microgrid optimal dispatch problems was verified, but the convergence speed of GWO was slow when solving the model. Alireza et al. [17] proposed an off-grid microgrid model consisting of photovoltaics (PV), wind turbine (WT), micro-turbine (MT), ESS, and gas boiler (GB), which took the annual total cost as the objective function and was solved by evolutionary particle swarm optimization (E-PSO). Compared with other intelligent algorithms, the results showed that E-PSO has better searching ability than other algorithms, but it may fall into local optimum when solving high-dimensional nonlinear programming problems. In Reference [18], the optimal size of the ESS in the microgrid was analyzed and solved by PSO, GA, and flower pollination algorithm (FPA). Although the optimal solution was obtained, the initial algorithms are prone to falling into the local optimization problem, and a more accurate value can be obtained by improving the algorithm. In Reference [19], an optimal system configuration model for determining a reliable power supply system was proposed and solved using the grasshopper optimization algorithm (GOA). The results showed that the GOA outperformed the cuckoo search (CS) and PSO in terms of searching ability, but that there is still room for improvement. Abhilipsa et al. [20] proposed a microgrid bidding strategy model in an uncontrolled environment and solved it using an improved whale optimization algorithm (IWOA). Compared with WOA, PSO, and bat algorithm (BA), although the overall economic cost has been optimized, the impact of environmental costs has not been taken into account. Zahraoui et al. [21] determined the optimal generation capacity of distributed power with the objective of the lowest total generation cost and solved it using a memory-based gravitational search algorithm (MBGSA). Compared with GSA, artificial bee colony (ABC), GA, and PSO, the cost of generating electricity has been reduced, but the environmental costs of distributed power sources have not been taken into account. Soheil et al. [22] used the levy-flight moth-flame optimization algorithm (LMFOA) to solve the problem with the objective of minimizing the life cost of internal equipment and the transaction cost of electricity in the microgrid. Compared with MFOA, hybrid genetic algorithm and particle swarm algorithm, and ACO, the superiority of the improved algorithm was verified, but only a single microgrid system was considered, and the microgrid group system composed of multiple microgrids was not considered. Morteza et al. [23] proposed a model to determine the optimal size of the ESS with the lowest total cost as the objective, solved it by convex optimization, and compared it with GA and PSO. The power interaction in grid-connected situations was not considered, although the lowest total cost was obtained.In summary, most of the research on optimal dispatch of microgrids still stays at the level of a single microgrid. The microgrid cluster system composed of multiple microgrids can make up for the insufficiencies of fluctuation, indirectness, and randomness of distributed power supply, effectively improve the stability of the system, and reduce the rate of light and wind abandonment, so the optimal dispatch research on microgrid cluster is particularly important. In this study, a microgrid cluster system model composed of three microgrids is constructed, which considers the generation cost, equipment operation and maintenance cost, ESS operation cost, energy transaction cost, and environmental cost of the power generation unit, and uses IBOA to simulate and solve the model. To improve the searchability of the algorithm, a skew tent chaotic map is used to improve population diversity, and then, the Cauchy mutation is used in the search process to change the location information of butterflies, expand the search space, and finally use the simplex method to improve the poor individuals in the location update process. As a result, the microgrid cluster's optimum dispatch may be solved more efficiently.


## 2. Economic Dispatching Model of Microgrid Cluster

### 2.1. Microgrid Cluster System Structure

The microgrid cluster is composed of several microgrids, each of which is an individual, including PV, WT, diesel generator (DG), MT, ESS, and load. The interaction between the microgrid cluster and the distribution network is carried out through the information interaction center, as shown in Figure1.Figure 1
Microgrid cluster diagram.


### 2.2. Objective Function

The objective function is to minimize the operating cost and environmental cost of the microgrid cluster. The operating cost includes the generation cost of controllable distributed generating units, the operation and maintenance cost of generating equipment, the operation cost of ESS, and the transaction cost of electricity. The environmental cost is the penalty cost for pollutant gases (CO2, SO2, and NOx), and the objective function is to maximize the overall benefits of the microgrid cluster. The specific objective functions can be represented as follows:(1)C=C1+C2,(2)C1=∑i=1n∑t=124CiDGt+CiMTt+CiEMt+CiESSt+CiETt,(3)C2=∑i=1n∑t=124∑k=13CkλkDGPiDGt+CkλkMTPiMTt+CkλkgridPibuyt,where Ck is the cost factor for handling K-type pollutants, and there are three main pollutants (CO2, SO2, and NOx).


#### 2.2.1. Cost of Diesel Generator

The cost of DG is related to fuel consumption and can be expressed as follows:(4)CiDGt=αPiDGt2+βPiDGt+γ,where α, β, and γ are the fuel consumption cost factors of the DG. Typically, α = 0.001, β = 0.18, and γ = 6 [24].


#### 2.2.2. Cost of Micro-Turbine

The cost of MT is related to gas consumption and can be represented as follows:(5)CiMTt=CnlL×PiMTtηiMTt,where Cnl is the price of natural gas, L is the low calorific value of natural gas, PiMT is the power of MT, and ηiMT is the power generation efficiency of MT [25]. Typically, Cnl = 2.5 CNY/m3 and L = 9.7KWh/m3.


#### 2.2.3. Maintenance Cost of Power Generation Equipment

The power generation equipment will cause some loss during operation, which can be expressed as follows:(6)CiEMt=kiWTtPiWTt+kiPVtPiPVt+kiDGtPiDGt+kiMTtPiMTt.


#### 2.2.4. Operation Cost of Energy Storage System

Due to the randomness and fluctuation of distributed power supply, the ESS discharges when the power generation is insufficient, charges when the power generation is sufficient, and produces a certain loss when charging and discharging, which can be expressed as follows:(7)CiESSt=CicostPiRT×di1+dili1+dili−1PiESSt.


#### 2.2.5. Transaction Cost of Electricity

There are costs incurred when the microgrid trades with the microgrid and the microgrid trades with the distribution network, which can be expressed as follows:(8)CiETt=Pimgtδimgt+Pigridtδigridt,where Pimg and Pigrid are positive when purchasing electricity and negative when selling electricity.


### 2.3. Constraints

When optimizing the microgrid cluster system, the following constraints need to be considered.


#### 2.3.1. Power Balance Constraint

This constraint is for the total power of the microgrid cluster system and plays an important role in optimal dispatch, which can be expressed as follows:(9)PiWTt+PiPVt+PiDGt+PiMTt+PiESSt+Pimgt+Pigridt=Piloadt.


#### 2.3.2. Power Generation Equipment Constraints

This restriction is mainly derived from the physical constraints of the power generation equipment and can be expressed as follows:(10)Ri,downDGΔt≤PiDGt−PiDGt−1≤Ri,upDGΔt,(11)Ri,downMTΔt≤PiMTt−PiMTt−1≤Ri,upMTΔt.


#### 2.3.3. Energy Storage System Constraints

The energy storage systems can improve the stability of microgrid cluster, and the constraints can be expressed as follows:(1)
Charge state constraint(12)SOCimin≤SOCt≤SOCimax.(2)
Power constraints for charging and discharging(13)0≤Picht≤Pimax,0≤Pidist≤Pimax,Picht×Pidist=0.


## 2.1. Microgrid Cluster System Structure

The microgrid cluster is composed of several microgrids, each of which is an individual, including PV, WT, diesel generator (DG), MT, ESS, and load. The interaction between the microgrid cluster and the distribution network is carried out through the information interaction center, as shown in Figure1.Figure 1
Microgrid cluster diagram.


## 2.2. Objective Function

The objective function is to minimize the operating cost and environmental cost of the microgrid cluster. The operating cost includes the generation cost of controllable distributed generating units, the operation and maintenance cost of generating equipment, the operation cost of ESS, and the transaction cost of electricity. The environmental cost is the penalty cost for pollutant gases (CO2, SO2, and NOx), and the objective function is to maximize the overall benefits of the microgrid cluster. The specific objective functions can be represented as follows:(1)C=C1+C2,(2)C1=∑i=1n∑t=124CiDGt+CiMTt+CiEMt+CiESSt+CiETt,(3)C2=∑i=1n∑t=124∑k=13CkλkDGPiDGt+CkλkMTPiMTt+CkλkgridPibuyt,where Ck is the cost factor for handling K-type pollutants, and there are three main pollutants (CO2, SO2, and NOx).


### 2.2.1. Cost of Diesel Generator

The cost of DG is related to fuel consumption and can be expressed as follows:(4)CiDGt=αPiDGt2+βPiDGt+γ,where α, β, and γ are the fuel consumption cost factors of the DG. Typically, α = 0.001, β = 0.18, and γ = 6 [24].


### 2.2.2. Cost of Micro-Turbine

The cost of MT is related to gas consumption and can be represented as follows:(5)CiMTt=CnlL×PiMTtηiMTt,where Cnl is the price of natural gas, L is the low calorific value of natural gas, PiMT is the power of MT, and ηiMT is the power generation efficiency of MT [25]. Typically, Cnl = 2.5 CNY/m3 and L = 9.7KWh/m3.


### 2.2.3. Maintenance Cost of Power Generation Equipment

The power generation equipment will cause some loss during operation, which can be expressed as follows:(6)CiEMt=kiWTtPiWTt+kiPVtPiPVt+kiDGtPiDGt+kiMTtPiMTt.


### 2.2.4. Operation Cost of Energy Storage System

Due to the randomness and fluctuation of distributed power supply, the ESS discharges when the power generation is insufficient, charges when the power generation is sufficient, and produces a certain loss when charging and discharging, which can be expressed as follows:(7)CiESSt=CicostPiRT×di1+dili1+dili−1PiESSt.


### 2.2.5. Transaction Cost of Electricity

There are costs incurred when the microgrid trades with the microgrid and the microgrid trades with the distribution network, which can be expressed as follows:(8)CiETt=Pimgtδimgt+Pigridtδigridt,where Pimg and Pigrid are positive when purchasing electricity and negative when selling electricity.


## 2.2.1. Cost of Diesel Generator

The cost of DG is related to fuel consumption and can be expressed as follows:(4)CiDGt=αPiDGt2+βPiDGt+γ,where α, β, and γ are the fuel consumption cost factors of the DG. Typically, α = 0.001, β = 0.18, and γ = 6 [24].


## 2.2.2. Cost of Micro-Turbine

The cost of MT is related to gas consumption and can be represented as follows:(5)CiMTt=CnlL×PiMTtηiMTt,where Cnl is the price of natural gas, L is the low calorific value of natural gas, PiMT is the power of MT, and ηiMT is the power generation efficiency of MT [25]. Typically, Cnl = 2.5 CNY/m3 and L = 9.7KWh/m3.


## 2.2.3. Maintenance Cost of Power Generation Equipment

The power generation equipment will cause some loss during operation, which can be expressed as follows:(6)CiEMt=kiWTtPiWTt+kiPVtPiPVt+kiDGtPiDGt+kiMTtPiMTt.


## 2.2.4. Operation Cost of Energy Storage System

Due to the randomness and fluctuation of distributed power supply, the ESS discharges when the power generation is insufficient, charges when the power generation is sufficient, and produces a certain loss when charging and discharging, which can be expressed as follows:(7)CiESSt=CicostPiRT×di1+dili1+dili−1PiESSt.


## 2.2.5. Transaction Cost of Electricity

There are costs incurred when the microgrid trades with the microgrid and the microgrid trades with the distribution network, which can be expressed as follows:(8)CiETt=Pimgtδimgt+Pigridtδigridt,where Pimg and Pigrid are positive when purchasing electricity and negative when selling electricity.


## 2.3. Constraints

When optimizing the microgrid cluster system, the following constraints need to be considered.


### 2.3.1. Power Balance Constraint

This constraint is for the total power of the microgrid cluster system and plays an important role in optimal dispatch, which can be expressed as follows:(9)PiWTt+PiPVt+PiDGt+PiMTt+PiESSt+Pimgt+Pigridt=Piloadt.


### 2.3.2. Power Generation Equipment Constraints

This restriction is mainly derived from the physical constraints of the power generation equipment and can be expressed as follows:(10)Ri,downDGΔt≤PiDGt−PiDGt−1≤Ri,upDGΔt,(11)Ri,downMTΔt≤PiMTt−PiMTt−1≤Ri,upMTΔt.


### 2.3.3. Energy Storage System Constraints

The energy storage systems can improve the stability of microgrid cluster, and the constraints can be expressed as follows:(1)
Charge state constraint(12)SOCimin≤SOCt≤SOCimax.(2)
Power constraints for charging and discharging(13)0≤Picht≤Pimax,0≤Pidist≤Pimax,Picht×Pidist=0.


## 2.3.1. Power Balance Constraint

This constraint is for the total power of the microgrid cluster system and plays an important role in optimal dispatch, which can be expressed as follows:(9)PiWTt+PiPVt+PiDGt+PiMTt+PiESSt+Pimgt+Pigridt=Piloadt.


## 2.3.2. Power Generation Equipment Constraints

This restriction is mainly derived from the physical constraints of the power generation equipment and can be expressed as follows:(10)Ri,downDGΔt≤PiDGt−PiDGt−1≤Ri,upDGΔt,(11)Ri,downMTΔt≤PiMTt−PiMTt−1≤Ri,upMTΔt.


## 2.3.3. Energy Storage System Constraints

The energy storage systems can improve the stability of microgrid cluster, and the constraints can be expressed as follows:(1)
Charge state constraint(12)SOCimin≤SOCt≤SOCimax.(2)
Power constraints for charging and discharging(13)0≤Picht≤Pimax,0≤Pidist≤Pimax,Picht×Pidist=0.


## 3. Proposed Enhancements for Butterfly Optimization Algorithm

### 3.1. Butterfly Optimization Algorithm

The BOA is a natural heuristic algorithm proposed for the feeding behavior of butterflies. In BOA, all butterflies attract each other by emitting some fragrance. Each butterfly moves randomly or toward the best butterflies and emits more fragrance [26]. The size of the butterfly aroma is a function of the physical intensity of the stimulus, and the formula can be expressed as follows:(14)f=cIα,where f is the aroma size of butterflies, c is the sensory modality, I is the stimulation intensity, and α is the power exponent with a range of [0,1].The location update formula for the global search phase can be expressed as follows:(15)xit+1=xit+r2×g∗−xit×fi,where xit is the position vector of the ith butterfly in the tth iteration, r is the random number between [0,1], g∗ is the current optimal solution, and fi is the aroma size of the ith butterfly.The location update formula for the local search phase can be expressed as follows:(16)xit+1=xit+r2×xjt−xkt−xit×fi,where xjt and xkt refer to the position vectors of the jth and kth individuals randomly selected from within the population in the tth iteration, respectively.Global and local searches occur when a butterfly is searching for food and are determined by setting the switch probabilityp.


### 3.2. Improved Butterfly Optimization Algorithm

#### 3.2.1. Chaotic Map Initialization Population

Chaotic sequences generated by chaotic mapping have the advantages of randomness, traversal, non-repeatability, etc. In the optimization field, they are often used to generate the initial position of the population, which can effectively improve the diversity of the population. Here, the skew tent chaotic mapping is used to initialize butterfly population, and its definition can be expressed as follows:(17)xn+1=xnα,xn<α,1−xn1−α,xn≥α,where α is a random number from 0 to 1.


#### 3.2.2. Cauchy Variation

The Cauchy density function is similar to the Gauss density function, but the Cauchy distribution has a higher two-wing probability characteristic, a wider distribution range than the random numbers generated by the Gauss distribution, which effectively improves the global searchability of the algorithm and makes it easy to jump out of the local optimum [27]. The Cauchy distribution function can be expressed as follows:(18)Ftx=12+1πarctanxt,where t is a proportional function and has a positive value.The Cauchy operator is introduced in the global search and local search to mutate individual locations, which makes it easier for the algorithm to jump out of the local optimal value and improve the accuracy of the algorithm.The location of the global search phase is updated as follows:(19)xit+1=xit+r2×g∗−xit×fi×Cauchy0,1.The location of the local search phase is updated as follows:(20)xit+1=xit+r2×xjt−xkt−xit×fi×Cauchy0,1.


#### 3.2.3. Simplex Method

The advantages of the simplex method include a simple principle, small computation, quick convergence, and strong local searchability. It can effectively improve the local development ability and search accuracy of BOA. The simplex method entails creatingn + 1 vertex polyhedrons in n-dimensional space, calculating and comparing the fitness values of each vertex, and determining the best, second best, and worst points. By reflection, expansion, contraction, and other strategies, a better advantage is obtained, and a new polyhedron is formed, iterating and approaching the optimal point gradually. The steps can be expressed as follows:Step 1: calculate the fitness values of all vertices, rank the individual fitness values, and determine the optimal pointx1, the secondary advantage x2, and the worst point x3.Step 2: calculates the center point of the optimal pointx1 and the secondary advantage x2, which is counted as x4.Step 3: reflect the worst pointx3 to get the reflection point, which is recorded as x5 and can be expressed as follows:(21)x5=x4+αx4−x3,whereα is the reflection coefficient in the formula and the value is 1.Step 4: iff(x5) < f(x1), the reflection direction is correct, the expansion operation is performed, and the expansion point is obtained, which is recorded as x6 and can be expressed as follows:(22)x6=x4+βx5−x4,whereβ is the expansion factor and the value is 1.5.Iff(x6) < f(x1), the worst point x3 is replaced by the expansion point x6; otherwise, the worst point x3 is replaced by the reflection point x5.Step 5: iff(x5)>f(x1), the reflection direction is incorrect. Compression is performed to get the compression point, which is recorded as x7 and can be expressed as follows:(23)x7=x4+γx3−x4,whereγ is the compression factor and the value is 0.5.Iff(x7) < f(x3), the worst point x3 is replaced by the compression point x7.Step 6: iff(x1) <f(x5) < f(x3), a contraction operation is performed to get the contraction point, which is recorded as x8 and can be expressed as follows:(24)x8=x4−εx3−x4,where ε is the shrinkage factor and the value is 0.5.Iff(x8) < f(x3), the worst point x3 is replaced by the shrinking point x8. Otherwise, the worst point x3 is replaced by the reflection point x5.


#### 3.2.4. IBOA Steps

In summary, the IBOA steps presented in this study can be expressed as follows:Step 1: initialize parameters, using skew tent chaotic map to set population location;Step 2: calculate the fitness value and record the initial extreme value;Step 3: calculate the individual aroma size of each butterfly;Step 4: perform global and local searches using formulas (19) and 20);Step 5: improve the poor individuals by the simplex method;Step 6: update the individual and global optimal solution of the butterfly;Step 7: determine whether the algorithm has reached the maximum number of iterations and whether it has reached the end of the algorithm; otherwise, return to Step 3.


## 3.1. Butterfly Optimization Algorithm

The BOA is a natural heuristic algorithm proposed for the feeding behavior of butterflies. In BOA, all butterflies attract each other by emitting some fragrance. Each butterfly moves randomly or toward the best butterflies and emits more fragrance [26]. The size of the butterfly aroma is a function of the physical intensity of the stimulus, and the formula can be expressed as follows:(14)f=cIα,where f is the aroma size of butterflies, c is the sensory modality, I is the stimulation intensity, and α is the power exponent with a range of [0,1].The location update formula for the global search phase can be expressed as follows:(15)xit+1=xit+r2×g∗−xit×fi,where xit is the position vector of the ith butterfly in the tth iteration, r is the random number between [0,1], g∗ is the current optimal solution, and fi is the aroma size of the ith butterfly.The location update formula for the local search phase can be expressed as follows:(16)xit+1=xit+r2×xjt−xkt−xit×fi,where xjt and xkt refer to the position vectors of the jth and kth individuals randomly selected from within the population in the tth iteration, respectively.Global and local searches occur when a butterfly is searching for food and are determined by setting the switch probabilityp.


## 3.2. Improved Butterfly Optimization Algorithm

### 3.2.1. Chaotic Map Initialization Population

Chaotic sequences generated by chaotic mapping have the advantages of randomness, traversal, non-repeatability, etc. In the optimization field, they are often used to generate the initial position of the population, which can effectively improve the diversity of the population. Here, the skew tent chaotic mapping is used to initialize butterfly population, and its definition can be expressed as follows:(17)xn+1=xnα,xn<α,1−xn1−α,xn≥α,where α is a random number from 0 to 1.


### 3.2.2. Cauchy Variation

The Cauchy density function is similar to the Gauss density function, but the Cauchy distribution has a higher two-wing probability characteristic, a wider distribution range than the random numbers generated by the Gauss distribution, which effectively improves the global searchability of the algorithm and makes it easy to jump out of the local optimum [27]. The Cauchy distribution function can be expressed as follows:(18)Ftx=12+1πarctanxt,where t is a proportional function and has a positive value.The Cauchy operator is introduced in the global search and local search to mutate individual locations, which makes it easier for the algorithm to jump out of the local optimal value and improve the accuracy of the algorithm.The location of the global search phase is updated as follows:(19)xit+1=xit+r2×g∗−xit×fi×Cauchy0,1.The location of the local search phase is updated as follows:(20)xit+1=xit+r2×xjt−xkt−xit×fi×Cauchy0,1.


### 3.2.3. Simplex Method

The advantages of the simplex method include a simple principle, small computation, quick convergence, and strong local searchability. It can effectively improve the local development ability and search accuracy of BOA. The simplex method entails creatingn + 1 vertex polyhedrons in n-dimensional space, calculating and comparing the fitness values of each vertex, and determining the best, second best, and worst points. By reflection, expansion, contraction, and other strategies, a better advantage is obtained, and a new polyhedron is formed, iterating and approaching the optimal point gradually. The steps can be expressed as follows:Step 1: calculate the fitness values of all vertices, rank the individual fitness values, and determine the optimal pointx1, the secondary advantage x2, and the worst point x3.Step 2: calculates the center point of the optimal pointx1 and the secondary advantage x2, which is counted as x4.Step 3: reflect the worst pointx3 to get the reflection point, which is recorded as x5 and can be expressed as follows:(21)x5=x4+αx4−x3,whereα is the reflection coefficient in the formula and the value is 1.Step 4: iff(x5) < f(x1), the reflection direction is correct, the expansion operation is performed, and the expansion point is obtained, which is recorded as x6 and can be expressed as follows:(22)x6=x4+βx5−x4,whereβ is the expansion factor and the value is 1.5.Iff(x6) < f(x1), the worst point x3 is replaced by the expansion point x6; otherwise, the worst point x3 is replaced by the reflection point x5.Step 5: iff(x5)>f(x1), the reflection direction is incorrect. Compression is performed to get the compression point, which is recorded as x7 and can be expressed as follows:(23)x7=x4+γx3−x4,whereγ is the compression factor and the value is 0.5.Iff(x7) < f(x3), the worst point x3 is replaced by the compression point x7.Step 6: iff(x1) <f(x5) < f(x3), a contraction operation is performed to get the contraction point, which is recorded as x8 and can be expressed as follows:(24)x8=x4−εx3−x4,where ε is the shrinkage factor and the value is 0.5.Iff(x8) < f(x3), the worst point x3 is replaced by the shrinking point x8. Otherwise, the worst point x3 is replaced by the reflection point x5.


### 3.2.4. IBOA Steps

In summary, the IBOA steps presented in this study can be expressed as follows:Step 1: initialize parameters, using skew tent chaotic map to set population location;Step 2: calculate the fitness value and record the initial extreme value;Step 3: calculate the individual aroma size of each butterfly;Step 4: perform global and local searches using formulas (19) and 20);Step 5: improve the poor individuals by the simplex method;Step 6: update the individual and global optimal solution of the butterfly;Step 7: determine whether the algorithm has reached the maximum number of iterations and whether it has reached the end of the algorithm; otherwise, return to Step 3.


## 3.2.1. Chaotic Map Initialization Population

Chaotic sequences generated by chaotic mapping have the advantages of randomness, traversal, non-repeatability, etc. In the optimization field, they are often used to generate the initial position of the population, which can effectively improve the diversity of the population. Here, the skew tent chaotic mapping is used to initialize butterfly population, and its definition can be expressed as follows:(17)xn+1=xnα,xn<α,1−xn1−α,xn≥α,where α is a random number from 0 to 1.


## 3.2.2. Cauchy Variation

The Cauchy density function is similar to the Gauss density function, but the Cauchy distribution has a higher two-wing probability characteristic, a wider distribution range than the random numbers generated by the Gauss distribution, which effectively improves the global searchability of the algorithm and makes it easy to jump out of the local optimum [27]. The Cauchy distribution function can be expressed as follows:(18)Ftx=12+1πarctanxt,where t is a proportional function and has a positive value.The Cauchy operator is introduced in the global search and local search to mutate individual locations, which makes it easier for the algorithm to jump out of the local optimal value and improve the accuracy of the algorithm.The location of the global search phase is updated as follows:(19)xit+1=xit+r2×g∗−xit×fi×Cauchy0,1.The location of the local search phase is updated as follows:(20)xit+1=xit+r2×xjt−xkt−xit×fi×Cauchy0,1.


## 3.2.3. Simplex Method

The advantages of the simplex method include a simple principle, small computation, quick convergence, and strong local searchability. It can effectively improve the local development ability and search accuracy of BOA. The simplex method entails creatingn + 1 vertex polyhedrons in n-dimensional space, calculating and comparing the fitness values of each vertex, and determining the best, second best, and worst points. By reflection, expansion, contraction, and other strategies, a better advantage is obtained, and a new polyhedron is formed, iterating and approaching the optimal point gradually. The steps can be expressed as follows:Step 1: calculate the fitness values of all vertices, rank the individual fitness values, and determine the optimal pointx1, the secondary advantage x2, and the worst point x3.Step 2: calculates the center point of the optimal pointx1 and the secondary advantage x2, which is counted as x4.Step 3: reflect the worst pointx3 to get the reflection point, which is recorded as x5 and can be expressed as follows:(21)x5=x4+αx4−x3,whereα is the reflection coefficient in the formula and the value is 1.Step 4: iff(x5) < f(x1), the reflection direction is correct, the expansion operation is performed, and the expansion point is obtained, which is recorded as x6 and can be expressed as follows:(22)x6=x4+βx5−x4,whereβ is the expansion factor and the value is 1.5.Iff(x6) < f(x1), the worst point x3 is replaced by the expansion point x6; otherwise, the worst point x3 is replaced by the reflection point x5.Step 5: iff(x5)>f(x1), the reflection direction is incorrect. Compression is performed to get the compression point, which is recorded as x7 and can be expressed as follows:(23)x7=x4+γx3−x4,whereγ is the compression factor and the value is 0.5.Iff(x7) < f(x3), the worst point x3 is replaced by the compression point x7.Step 6: iff(x1) <f(x5) < f(x3), a contraction operation is performed to get the contraction point, which is recorded as x8 and can be expressed as follows:(24)x8=x4−εx3−x4,where ε is the shrinkage factor and the value is 0.5.Iff(x8) < f(x3), the worst point x3 is replaced by the shrinking point x8. Otherwise, the worst point x3 is replaced by the reflection point x5.


## 3.2.4. IBOA Steps

In summary, the IBOA steps presented in this study can be expressed as follows:Step 1: initialize parameters, using skew tent chaotic map to set population location;Step 2: calculate the fitness value and record the initial extreme value;Step 3: calculate the individual aroma size of each butterfly;Step 4: perform global and local searches using formulas (19) and 20);Step 5: improve the poor individuals by the simplex method;Step 6: update the individual and global optimal solution of the butterfly;Step 7: determine whether the algorithm has reached the maximum number of iterations and whether it has reached the end of the algorithm; otherwise, return to Step 3.


## 4. Test Function and Analysis

### 4.1. Parameter Settings

The 14 test functions are compared among PSO, WOA, SSA, BOA, and IBOA. The initial population size of all algorithms is set to 100, the number of iterations is 1000, each algorithm runs independently 30 times, and all simulations are completed on MATLAB 2019b. The algorithm parameter settings are shown in Table1.Table 1
Parameters of the algorithms.
AlgorithmParameter settingsPSOAcceleration coefficientsc1 = c2 = 2, inertia weight ω = 0.6WOACoefficient vectora = [2, 0], logarithmic spiral shape constant b = 1SSADiscoverers PD = 20%, security threshold ST = 0.8, investigators SD = 10%BOASensory modalityc = 0.01, power exponent α = 0.1, switch probability p = 0.6IBOASensory modalityc = 0.01, power exponent α = 0.1


### 4.2. Test Function

The 14 benchmark test functions are selected for simulation analysis. The test function information is described in Table2:Table 2
Benchmark function.
Benchmark functionDimRangeOptimaf1=∑i=1nxi230[−100, 100]0f2=∑i=1nxi+∏i=1nxi30[−10, 10]0f3=∑i=1n∑j=1ixj230[−100, 100]0f4=maxixi,1≤i≤n30[−100, 100]0f5=∑i=1nixi4+random0,130[−1.28, 1.28]0f6=∑i=1n−xisinxi30[−500, 500]−418.98∗nf7=∑i=1nxi2−10cos2πxi+1030[−5.12, 5.12]0f8=−20exp−0.21/n∑i=1nxi2−exp1/n∑i=1ncos2πxi+20+e30[−32, 32]0f9=1/4000∑i=1nxi2−∏i=1ncosxi/i+130[−600, 600]0f10=π/n10sinπy1+∑i=1n−1yi−12×1+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,430[−50, 50]0yi=1+xi+1/4, uxi,a,k,m=kxi−amxi>a0−a<xi<ak−xi−amxi<af11=0.1sin23πx1+∑i=1nxi−121+sin23πxi+1+xi−12+1+sin22πxi+∑i=1nuxi,5,100,430[−50, 50]0f12=1/500+∑j=1251/j+∑i=12xi−aij6−12[−65, 65]1f13=∑i=111ai−x1bi2+bixi/bi2+bix3+x424[−5, 5]0.00030f14=1+x1+x2+1219−14x1+3x12−14x2+6x1x2+3x22×30+2x1−3x2218−32x1+12x12+48x2−36x1x2+27x222[−2, 2]3


### 4.3. Algorithmic Test and Performance Comparison

The test results are described in Table3.Table 3
Test results of different functions.
FunctionAlgorithmBestAvgStdf1PSO1.8539E – 1402.2126E − 1243.1259E – 124WOA1.2693E – 2013.8570E − 1950.0000E + 00SSA0.0000E + 000.0000E  +  000.0000E + 00BOA4.2696E – 1051.4164E − 1031.8100E – 103IBOA0.0000E + 000.0000E + 000.0000E + 00f2PSO5.0631E – 701.3820E − 611.9544E – 61WOA1.9255E − 1194.3549E − 1126.1533E – 112SSA0.0000E + 000.0000E + 000.0000E + 00BOA3.9626E − 771.7330E − 761.8012E – 76IBOA0.0000E + 000.0000E + 000.0000E + 00f3PSO6.9869E − 018.7387E − 012.1321E – 01WOA2.5717E + 034.0816E + 031.1156E + 03SSA0.0000E + 000.0000E + 000.0000E + 00BOA8.9991E − 1054.0221E − 1042.4291E – 104IBOA0.0000E + 000.0000E + 000.0000E + 00f4PSO1.0546E − 651.8886E − 612.6666E – 61WOA2.4586E + 001.2221E + 011.1671E + 01SSA0.0000E + 000.0000E + 000.0000E + 00BOA3.3476E − 771.5992E − 761.3416E – 76IBOA0.0000E + 000.0000E + 000.0000E + 00f5PSO3.1796E − 053.4680E − 053.8048E – 06WOA5.5907E − 052.0529E − 041.3767E – 04SSA3.2522E − 056.8277E − 052.8181E – 05BOA2.3071E − 065.9118E − 062.7000E – 06IBOA1.6265E − 096.1461E − 084.2729E – 08f6PSO−4.1898E + 02−4.1898E + 020.0000E + 00WOA−1.2569E + 04−1.2206E + 043.7103E + 02SSA−8.5591E + 03−7.9744E + 035.1050E + 02BOA−2.9617E + 03−2.6778E + 032.1900E + 02IBOA−2.1306E + 04−1.8067E + 042.4580E + 03f7PSO2.9000E + 022.9000E + 020.0000E + 00WOA0.0000E + 000.0000E + 000.0000E + 00SSA0.0000E + 000.0000E + 000.0000E + 00BOA0.0000E + 000.0000E + 000.0000E + 00IBOA0.0000E + 000.0000E + 000.0000E + 00f8PSO1.6844E + 001.6844E + 000.0000E + 00WOA4.4409E − 154.4409E − 150.0000E + 00SSA8.8818E − 168.8818E − 160.0000E + 00BOA8.8818E − 168.8818E − 160.0000E + 00IBOA8.8818E − 168.8818E − 160.0000E + 00f9PSO0.0000E + 000.0000E + 000.0000E + 00WOA0.0000E + 000.0000E + 000.0000E + 00SSA0.0000E + 000.0000E + 000.0000E + 00BOA0.0000E + 000.0000E + 000.0000E + 00IBOA0.0000E + 000.0000E + 000.0000E + 00f10PSO6.3961E − 016.3961E − 010.0000E + 00WOA2.1848E − 063.6203E − 061.0209E – 06SSA1.8393E − 186.8229E − 171.0761E – 16BOA3.6084E − 015.6215E − 011.4293E – 01IBOA1.5705E − 321.5705E − 320.0000E + 00f11PSO1.1309E + 001.1309E + 000.0000E + 00WOA1.1053E − 038.3458E − 035.1198E – 03SSA6.2205E − 171.7189E − 162.0162E – 16BOA2.4563E + 002.8107E + 002.5060E – 01IBOA1.3498E − 321.3498E − 320.0000E + 00f12PSO9.9800E − 019.9800E − 010.0000E + 00WOA9.9800E − 019.9800E − 010.0000E + 00SSA9.9800E − 019.9800E − 010.0000E + 00BOA1.0014E + 001.6017E + 004.3285E – 01IBOA9.9800E − 019.9800E − 010.0000E + 00f13PSO1.4596E − 021.4596E − 020.0000E + 00WOA3.0757E − 047.5286E − 043.7988E – 04SSA3.0749E − 043.0749E − 040.0000E + 00BOA3.5300E − 044.0181E − 044.0973E – 05IBOA3.0749E − 043.0749E − 040.0000E + 00f14PSO3.0000E + 003.0000E + 000.0000E + 00WOA3.0000E + 003.0000E + 000.0000E + 00SSA3.0000E + 003.0000E + 000.0000E + 00BOA3.0000E + 003.0000E + 000.0000E + 00IBOA3.0000E + 003.0000E + 000.0000E + 00The convergence curve is shown in Figure2.Figure 2
Function convergence diagram. (a) Convergence diagram off1. (b) Convergence diagram of f2. (c) Convergence diagram of f3. (d) Convergence diagram of f4. (e) Convergence diagram of f5. (f) Convergence diagram of f6. (g) Convergence diagram of f7. (h) Convergence diagram of f8. (i) Convergence diagram of f9. (j) Convergence diagram of f10. (k) Convergence diagram of f11. (l) Convergence diagram of f12. (m) Convergence diagram of f13. (n) Convergence diagram of f14.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)From the above results, IBOA is better than other algorithms in search accuracy and convergence speed, among which IBOA performs well in single-mode test functionsf1∼f5, can directly find the optimal value in f1∼f4 test functions, and has the highest search accuracy in f5 test functions compared with other algorithms. In the multimodal test functions f6∼f11, IBOA still has a high optimization ability, in which the optimal values can be directly found in the test functions f7 and f9, and the convergence speed is faster than other algorithms. IBOA, BOA, and SSA search capabilities are almost the same in f8 test functions, but IBOA has the advantage of faster convergence. In f10 and f11 test functions, IBOA has the highest accuracy and stability. In the fixed dimension test function f12∼f14, each algorithm has excellent performance. In f12 and f14 test functions, all algorithms can quickly find the optimal value. In f13, the optimization accuracy of IBOA and SSA is higher than that of other algorithms, and the convergence speed is faster. Through comparative experiments, IBOA solves the problem that BOA is easy to fall into local optimum and has poor convergence accuracy.


## 4.1. Parameter Settings

The 14 test functions are compared among PSO, WOA, SSA, BOA, and IBOA. The initial population size of all algorithms is set to 100, the number of iterations is 1000, each algorithm runs independently 30 times, and all simulations are completed on MATLAB 2019b. The algorithm parameter settings are shown in Table1.Table 1
Parameters of the algorithms.
AlgorithmParameter settingsPSOAcceleration coefficientsc1 = c2 = 2, inertia weight ω = 0.6WOACoefficient vectora = [2, 0], logarithmic spiral shape constant b = 1SSADiscoverers PD = 20%, security threshold ST = 0.8, investigators SD = 10%BOASensory modalityc = 0.01, power exponent α = 0.1, switch probability p = 0.6IBOASensory modalityc = 0.01, power exponent α = 0.1


## 4.2. Test Function

The 14 benchmark test functions are selected for simulation analysis. The test function information is described in Table2:Table 2
Benchmark function.
Benchmark functionDimRangeOptimaf1=∑i=1nxi230[−100, 100]0f2=∑i=1nxi+∏i=1nxi30[−10, 10]0f3=∑i=1n∑j=1ixj230[−100, 100]0f4=maxixi,1≤i≤n30[−100, 100]0f5=∑i=1nixi4+random0,130[−1.28, 1.28]0f6=∑i=1n−xisinxi30[−500, 500]−418.98∗nf7=∑i=1nxi2−10cos2πxi+1030[−5.12, 5.12]0f8=−20exp−0.21/n∑i=1nxi2−exp1/n∑i=1ncos2πxi+20+e30[−32, 32]0f9=1/4000∑i=1nxi2−∏i=1ncosxi/i+130[−600, 600]0f10=π/n10sinπy1+∑i=1n−1yi−12×1+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,430[−50, 50]0yi=1+xi+1/4, uxi,a,k,m=kxi−amxi>a0−a<xi<ak−xi−amxi<af11=0.1sin23πx1+∑i=1nxi−121+sin23πxi+1+xi−12+1+sin22πxi+∑i=1nuxi,5,100,430[−50, 50]0f12=1/500+∑j=1251/j+∑i=12xi−aij6−12[−65, 65]1f13=∑i=111ai−x1bi2+bixi/bi2+bix3+x424[−5, 5]0.00030f14=1+x1+x2+1219−14x1+3x12−14x2+6x1x2+3x22×30+2x1−3x2218−32x1+12x12+48x2−36x1x2+27x222[−2, 2]3


## 4.3. Algorithmic Test and Performance Comparison

The test results are described in Table3.Table 3
Test results of different functions.
FunctionAlgorithmBestAvgStdf1PSO1.8539E – 1402.2126E − 1243.1259E – 124WOA1.2693E – 2013.8570E − 1950.0000E + 00SSA0.0000E + 000.0000E  +  000.0000E + 00BOA4.2696E – 1051.4164E − 1031.8100E – 103IBOA0.0000E + 000.0000E + 000.0000E + 00f2PSO5.0631E – 701.3820E − 611.9544E – 61WOA1.9255E − 1194.3549E − 1126.1533E – 112SSA0.0000E + 000.0000E + 000.0000E + 00BOA3.9626E − 771.7330E − 761.8012E – 76IBOA0.0000E + 000.0000E + 000.0000E + 00f3PSO6.9869E − 018.7387E − 012.1321E – 01WOA2.5717E + 034.0816E + 031.1156E + 03SSA0.0000E + 000.0000E + 000.0000E + 00BOA8.9991E − 1054.0221E − 1042.4291E – 104IBOA0.0000E + 000.0000E + 000.0000E + 00f4PSO1.0546E − 651.8886E − 612.6666E – 61WOA2.4586E + 001.2221E + 011.1671E + 01SSA0.0000E + 000.0000E + 000.0000E + 00BOA3.3476E − 771.5992E − 761.3416E – 76IBOA0.0000E + 000.0000E + 000.0000E + 00f5PSO3.1796E − 053.4680E − 053.8048E – 06WOA5.5907E − 052.0529E − 041.3767E – 04SSA3.2522E − 056.8277E − 052.8181E – 05BOA2.3071E − 065.9118E − 062.7000E – 06IBOA1.6265E − 096.1461E − 084.2729E – 08f6PSO−4.1898E + 02−4.1898E + 020.0000E + 00WOA−1.2569E + 04−1.2206E + 043.7103E + 02SSA−8.5591E + 03−7.9744E + 035.1050E + 02BOA−2.9617E + 03−2.6778E + 032.1900E + 02IBOA−2.1306E + 04−1.8067E + 042.4580E + 03f7PSO2.9000E + 022.9000E + 020.0000E + 00WOA0.0000E + 000.0000E + 000.0000E + 00SSA0.0000E + 000.0000E + 000.0000E + 00BOA0.0000E + 000.0000E + 000.0000E + 00IBOA0.0000E + 000.0000E + 000.0000E + 00f8PSO1.6844E + 001.6844E + 000.0000E + 00WOA4.4409E − 154.4409E − 150.0000E + 00SSA8.8818E − 168.8818E − 160.0000E + 00BOA8.8818E − 168.8818E − 160.0000E + 00IBOA8.8818E − 168.8818E − 160.0000E + 00f9PSO0.0000E + 000.0000E + 000.0000E + 00WOA0.0000E + 000.0000E + 000.0000E + 00SSA0.0000E + 000.0000E + 000.0000E + 00BOA0.0000E + 000.0000E + 000.0000E + 00IBOA0.0000E + 000.0000E + 000.0000E + 00f10PSO6.3961E − 016.3961E − 010.0000E + 00WOA2.1848E − 063.6203E − 061.0209E – 06SSA1.8393E − 186.8229E − 171.0761E – 16BOA3.6084E − 015.6215E − 011.4293E – 01IBOA1.5705E − 321.5705E − 320.0000E + 00f11PSO1.1309E + 001.1309E + 000.0000E + 00WOA1.1053E − 038.3458E − 035.1198E – 03SSA6.2205E − 171.7189E − 162.0162E – 16BOA2.4563E + 002.8107E + 002.5060E – 01IBOA1.3498E − 321.3498E − 320.0000E + 00f12PSO9.9800E − 019.9800E − 010.0000E + 00WOA9.9800E − 019.9800E − 010.0000E + 00SSA9.9800E − 019.9800E − 010.0000E + 00BOA1.0014E + 001.6017E + 004.3285E – 01IBOA9.9800E − 019.9800E − 010.0000E + 00f13PSO1.4596E − 021.4596E − 020.0000E + 00WOA3.0757E − 047.5286E − 043.7988E – 04SSA3.0749E − 043.0749E − 040.0000E + 00BOA3.5300E − 044.0181E − 044.0973E – 05IBOA3.0749E − 043.0749E − 040.0000E + 00f14PSO3.0000E + 003.0000E + 000.0000E + 00WOA3.0000E + 003.0000E + 000.0000E + 00SSA3.0000E + 003.0000E + 000.0000E + 00BOA3.0000E + 003.0000E + 000.0000E + 00IBOA3.0000E + 003.0000E + 000.0000E + 00The convergence curve is shown in Figure2.Figure 2
Function convergence diagram. (a) Convergence diagram off1. (b) Convergence diagram of f2. (c) Convergence diagram of f3. (d) Convergence diagram of f4. (e) Convergence diagram of f5. (f) Convergence diagram of f6. (g) Convergence diagram of f7. (h) Convergence diagram of f8. (i) Convergence diagram of f9. (j) Convergence diagram of f10. (k) Convergence diagram of f11. (l) Convergence diagram of f12. (m) Convergence diagram of f13. (n) Convergence diagram of f14.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)(m)(n)From the above results, IBOA is better than other algorithms in search accuracy and convergence speed, among which IBOA performs well in single-mode test functionsf1∼f5, can directly find the optimal value in f1∼f4 test functions, and has the highest search accuracy in f5 test functions compared with other algorithms. In the multimodal test functions f6∼f11, IBOA still has a high optimization ability, in which the optimal values can be directly found in the test functions f7 and f9, and the convergence speed is faster than other algorithms. IBOA, BOA, and SSA search capabilities are almost the same in f8 test functions, but IBOA has the advantage of faster convergence. In f10 and f11 test functions, IBOA has the highest accuracy and stability. In the fixed dimension test function f12∼f14, each algorithm has excellent performance. In f12 and f14 test functions, all algorithms can quickly find the optimal value. In f13, the optimization accuracy of IBOA and SSA is higher than that of other algorithms, and the convergence speed is faster. Through comparative experiments, IBOA solves the problem that BOA is easy to fall into local optimum and has poor convergence accuracy.


## 5. Simulation Results and Discussion

Three interconnected microgrids (MG1, MG2, and MG3) are selected for simulation analysis, in which a single microgrid is mainly composed of the PV, WT, DG, MT, ESS, and load. When dealing with microgrids, the multipower supplier preferentially supplies power to the one with more power shortages to improve overall economic benefits, and the calculation period is one day.


### 5.1. Case Parameters

Figure3 shows the power generation of PV and MT and the load diagram required by the microgrid. Table 4 shows the power generation unit parameter, Table 5 demonstrates the environmental pollution parameter, Table 6 is the time-sharing electricity price table, and Table 7 illustrates the ESS parameter.Figure 3
MG renewable energy and load forecasting. (a) MG1 prediction diagram. (b) MG2 prediction diagram. (c) MG3 prediction diagram.
(a)(b)(c)Table 4
Parameters of power generation unit.
EquipmentUpper generation limit (kW)Lower generation limit (kW)Climb rate (kW/h)Maintenance factor(CNY/kWh)PV11600—0.03PV22000—0.06PV32400—0.08WT11800—0.04WT22300—0.08WT32600—0.10DG1500300.088DG2700300.093DG3900300.108MT112015100.083MT210010100.075MT38010100.0648Table 5
Pollution discharge factors and costs.
TypeGovernance cost/(CNY/kg)Pollutant discharge factor/(g/kWh)PVWTDGGridMTCO20.2100651890750SO214.85000.2181.920.041NOx62.53006.231.650.26Table 6
Hourly electricity price.
Transaction formTime intervalDistribution networkMG1MG2MG3Sell electricityPeak time09:00–12:000.830.510.620.5818:00–23:00Normal time07:00–09:000.600.460.560.5212:00–18:00Valley time00:00–07:000.480.410.510.4323:00–24:00Purchase electricity00:00–24:000.40———Table 7
Parameter settings for energy storage system.
ParameterValueRated capacity/(kWh)150Maximum charge/discharge power/(kW)50Charge/discharge efficiency0.9Depreciation rate/(CNY/kW2)0.005Installation cost/(CNY)120000Maximum/small charge capacity/(kWh)135/30Service life/year10Initial capacity/(kWh)75


### 5.2. Result Analysis

Figure4 shows the power output diagram of each power generation device based on the minimum total cost of the microgrid cluster under the island model. Figure 5 shows the power output diagram of each power generation device under the condition of grid connection. ESS discharge is preferred when PV and WT power generation is insufficient. When ESS reaches the lower discharge limit, the other power generation equipment with lower total cost takes precedence. The positive output value of ESS indicates discharge, while the negative output value indicates charge. The positive output values for the microgrid and the distribution network indicate the purchase of electricity, while the negative output values indicate the sale of electricity.Figure 4
Equipment output in the island model. (a) MG1 equipment output diagram. (b) MG2 equipment output diagram. (c) MG3 equipment output diagram.
(a)(b)(c)Figure 5
Equipment output in the grid-connected model. (a) MG1 equipment output diagram. (b) MG2 equipment output diagram. (c) MG3 equipment output diagram.
(a)(b)(c)


#### 5.2.1. Economic Dispatch in the Island Model

Since the microgrid cluster is not connected to the distribution network in the island model, DG is used as the emergency power supply to provide the amount of electricity needed and remove the power constraint of DG to meet the power balance of the microgrid. The output of specific power generation equipment is shown in Figure4.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–08:00, and 20:00–24:00 time periods, the power generation is insufficient, and the amount of electricity lacking is first compensated by ESS, and after reaching the upper limit of ESS discharge, it is supplied by emergency power DG. In 02:00–04:00 and 09:00–19:00 periods, the power generation is sufficient and is charged to ESS, and after reaching the charge limit, the remaining electricity is sold to the power-deficit microgrid. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–19:00 time frame. The microgrid cluster in the island model does not have the support of the distribution network, and DG is a high demand for itself as an emergency power supply.


#### 5.2.2. Economic Dispatch in the Grid-Connected Model

The device output of the microgrid cluster in the grid-connected model is shown in Figure5.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–09:00, and 19:00–24:00 periods, the power generation is insufficient, and ESS discharge is given priority. When ESS discharge reaches the upper limit, power purchase is made to the microgrid and distribution network. Since there is no excess power within the microgrid group in this period, power purchase is made to the distribution network to fill the shortage. In 02:00–04:00 and 10:00–18:00 periods, the power generation is sufficient, the excess power is charged to ESS, and then the remaining power is sold after reaching the maximum charge limit. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–18:00 time frame. The power generation cost of MT is slightly lower than that of DG, and the power generation process can bring some heat, which can meet the resident's need for hot water and obtain additional benefits.


### 5.3. Analysis of Optimization Results

The result is shown in Figure6. PSO, WOA, SSA, BOA, and IBOA are used to optimize the model, where Figure 6(a) is the economic cost in the island model and Figure 6(b) is the economic cost in the grid-connected model. In the grid-connected model, PSO cost is 4338.14 CNY, WOA cost is 4165.94 CNY, SSA cost is 4046.61 CNY, BOA cost is 4105.38 CNY, and IBOA cost is 3957.49 CNY. Among the costs of IBOA, the economic cost is 3343.39 CNY, and the environmental pollution cost is 614.11 CNY, and the economic cost includes the DG cost of 466.51 CNY, the MT cost of 557.18 CNY, the maintenance cost of PV and MT of 1421.20 CNY, the electric energy transaction cost of 538.07 CNY, and the ESS maintenance cost of 360.43 CNY. From the graph, IBOA is better than other algorithms in convergence speed and searchability.Figure 6
Algorithmic cost comparison. (a) Economic cost of the island model. (b) Economic cost of the grid-connected model.
(a)(b)


## 5.1. Case Parameters

Figure3 shows the power generation of PV and MT and the load diagram required by the microgrid. Table 4 shows the power generation unit parameter, Table 5 demonstrates the environmental pollution parameter, Table 6 is the time-sharing electricity price table, and Table 7 illustrates the ESS parameter.Figure 3
MG renewable energy and load forecasting. (a) MG1 prediction diagram. (b) MG2 prediction diagram. (c) MG3 prediction diagram.
(a)(b)(c)Table 4
Parameters of power generation unit.
EquipmentUpper generation limit (kW)Lower generation limit (kW)Climb rate (kW/h)Maintenance factor(CNY/kWh)PV11600—0.03PV22000—0.06PV32400—0.08WT11800—0.04WT22300—0.08WT32600—0.10DG1500300.088DG2700300.093DG3900300.108MT112015100.083MT210010100.075MT38010100.0648Table 5
Pollution discharge factors and costs.
TypeGovernance cost/(CNY/kg)Pollutant discharge factor/(g/kWh)PVWTDGGridMTCO20.2100651890750SO214.85000.2181.920.041NOx62.53006.231.650.26Table 6
Hourly electricity price.
Transaction formTime intervalDistribution networkMG1MG2MG3Sell electricityPeak time09:00–12:000.830.510.620.5818:00–23:00Normal time07:00–09:000.600.460.560.5212:00–18:00Valley time00:00–07:000.480.410.510.4323:00–24:00Purchase electricity00:00–24:000.40———Table 7
Parameter settings for energy storage system.
ParameterValueRated capacity/(kWh)150Maximum charge/discharge power/(kW)50Charge/discharge efficiency0.9Depreciation rate/(CNY/kW2)0.005Installation cost/(CNY)120000Maximum/small charge capacity/(kWh)135/30Service life/year10Initial capacity/(kWh)75


## 5.2. Result Analysis

Figure4 shows the power output diagram of each power generation device based on the minimum total cost of the microgrid cluster under the island model. Figure 5 shows the power output diagram of each power generation device under the condition of grid connection. ESS discharge is preferred when PV and WT power generation is insufficient. When ESS reaches the lower discharge limit, the other power generation equipment with lower total cost takes precedence. The positive output value of ESS indicates discharge, while the negative output value indicates charge. The positive output values for the microgrid and the distribution network indicate the purchase of electricity, while the negative output values indicate the sale of electricity.Figure 4
Equipment output in the island model. (a) MG1 equipment output diagram. (b) MG2 equipment output diagram. (c) MG3 equipment output diagram.
(a)(b)(c)Figure 5
Equipment output in the grid-connected model. (a) MG1 equipment output diagram. (b) MG2 equipment output diagram. (c) MG3 equipment output diagram.
(a)(b)(c)


### 5.2.1. Economic Dispatch in the Island Model

Since the microgrid cluster is not connected to the distribution network in the island model, DG is used as the emergency power supply to provide the amount of electricity needed and remove the power constraint of DG to meet the power balance of the microgrid. The output of specific power generation equipment is shown in Figure4.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–08:00, and 20:00–24:00 time periods, the power generation is insufficient, and the amount of electricity lacking is first compensated by ESS, and after reaching the upper limit of ESS discharge, it is supplied by emergency power DG. In 02:00–04:00 and 09:00–19:00 periods, the power generation is sufficient and is charged to ESS, and after reaching the charge limit, the remaining electricity is sold to the power-deficit microgrid. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–19:00 time frame. The microgrid cluster in the island model does not have the support of the distribution network, and DG is a high demand for itself as an emergency power supply.


### 5.2.2. Economic Dispatch in the Grid-Connected Model

The device output of the microgrid cluster in the grid-connected model is shown in Figure5.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–09:00, and 19:00–24:00 periods, the power generation is insufficient, and ESS discharge is given priority. When ESS discharge reaches the upper limit, power purchase is made to the microgrid and distribution network. Since there is no excess power within the microgrid group in this period, power purchase is made to the distribution network to fill the shortage. In 02:00–04:00 and 10:00–18:00 periods, the power generation is sufficient, the excess power is charged to ESS, and then the remaining power is sold after reaching the maximum charge limit. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–18:00 time frame. The power generation cost of MT is slightly lower than that of DG, and the power generation process can bring some heat, which can meet the resident's need for hot water and obtain additional benefits.


## 5.2.1. Economic Dispatch in the Island Model

Since the microgrid cluster is not connected to the distribution network in the island model, DG is used as the emergency power supply to provide the amount of electricity needed and remove the power constraint of DG to meet the power balance of the microgrid. The output of specific power generation equipment is shown in Figure4.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–08:00, and 20:00–24:00 time periods, the power generation is insufficient, and the amount of electricity lacking is first compensated by ESS, and after reaching the upper limit of ESS discharge, it is supplied by emergency power DG. In 02:00–04:00 and 09:00–19:00 periods, the power generation is sufficient and is charged to ESS, and after reaching the charge limit, the remaining electricity is sold to the power-deficit microgrid. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–19:00 time frame. The microgrid cluster in the island model does not have the support of the distribution network, and DG is a high demand for itself as an emergency power supply.


## 5.2.2. Economic Dispatch in the Grid-Connected Model

The device output of the microgrid cluster in the grid-connected model is shown in Figure5.Microgrid 3 is taken as an example, in 00:00–01:00, 05:00–09:00, and 19:00–24:00 periods, the power generation is insufficient, and ESS discharge is given priority. When ESS discharge reaches the upper limit, power purchase is made to the microgrid and distribution network. Since there is no excess power within the microgrid group in this period, power purchase is made to the distribution network to fill the shortage. In 02:00–04:00 and 10:00–18:00 periods, the power generation is sufficient, the excess power is charged to ESS, and then the remaining power is sold after reaching the maximum charge limit. Surplus power is sold to microgrid 2 in 03:00–04:00 time frame and microgrid 1 in 12:00–18:00 time frame. The power generation cost of MT is slightly lower than that of DG, and the power generation process can bring some heat, which can meet the resident's need for hot water and obtain additional benefits.


## 5.3. Analysis of Optimization Results

The result is shown in Figure6. PSO, WOA, SSA, BOA, and IBOA are used to optimize the model, where Figure 6(a) is the economic cost in the island model and Figure 6(b) is the economic cost in the grid-connected model. In the grid-connected model, PSO cost is 4338.14 CNY, WOA cost is 4165.94 CNY, SSA cost is 4046.61 CNY, BOA cost is 4105.38 CNY, and IBOA cost is 3957.49 CNY. Among the costs of IBOA, the economic cost is 3343.39 CNY, and the environmental pollution cost is 614.11 CNY, and the economic cost includes the DG cost of 466.51 CNY, the MT cost of 557.18 CNY, the maintenance cost of PV and MT of 1421.20 CNY, the electric energy transaction cost of 538.07 CNY, and the ESS maintenance cost of 360.43 CNY. From the graph, IBOA is better than other algorithms in convergence speed and searchability.Figure 6
Algorithmic cost comparison. (a) Economic cost of the island model. (b) Economic cost of the grid-connected model.
(a)(b)


## 6. Conclusions

This research constructs a microgrid cluster system model consisting of three single microgrids to solve the economic optimization dispatch problem. The information exchange center facilitates information sharing between single microgrids and between the microgrid cluster and the distribution network, and the model is simulated and solved by IBOA. To solve the problems of BOA falls into a local optimum easily and poor convergence accuracy, the skew tent chaotic map is used to initialize butterfly population, the Cauchy mutation is used to expand the search space, and the simplex method is used to improve the performance of the algorithm for poor individuals. The results of a comparison of 14 test functions with PSO, WOA, SSA, and BOA show that IBOA has significant advantages in terms of convergence speed and optimization accuracy. Finally, the proposed model is solved by simulation. Compared with other algorithms, IBOA has the highest economic benefit. By optimizing the microgrid cluster, the total operating cost is decreased, the dependence of the microgrid cluster on the distribution network is reduced effectively, and the development and utilization of renewable energy are promoted.



---

*Source: 7041778-2022-01-31.xml*