Abstract

With the deepening of the power market reform on the retail side, it is of great significance to study the economic optimization of the microgrid cluster system. Aiming at the economics of the microgrid cluster, comprehensively considering the degradation cost of energy storage battery, the compensation cost of demand-side controllable loads dispatch, the electricity transaction cost between the microgrids, and the electricity transaction cost between the microgrid and the power distribution network of the microgrid cluster, we establish an optimal dispatch model for the microgrid cluster including wind turbines, photovoltaics, and energy storage batteries. At the same time, in view of the problem that the population diversity of the basic sparrow search algorithm decreases and it is easy to fall into local extremes in the later iterations of the basic sparrow search algorithm, a chaos sparrow search algorithm based on Bernoulli chaotic mapping, dynamic adaptive weighting, Cauchy mutation, and reverse learning is proposed, and different types of test functions are used to analyze the convergence effect of the algorithm, and the calculation effects of the sparrow algorithm, the particle swarm algorithm, the chaotic particle swarm, and the genetic algorithm are compared. The algorithm has higher convergence speed, higher accuracy, and better global optimization ability. Finally, through the calculation example, it is concluded that the benefit of the microgrid cluster is increased by nearly 20%, which verifies the effectiveness of the improvement.

1. Introduction

With the current energy shortage and environmental problems in power supply becoming more and more serious, the microgrid composed of renewable energy sources has been widely used [13], which can not only improve the energy efficiency but also protect the environment, reduce costs, and meet the requirements of economy, environmental protection, and stability [410]. However, due to the poor antidisturbance capacity of a single microgrid, multiple microgrids in a local area are interconnected to form a microgrid cluster system. By coordinating the energy output of each microgrid in the cluster, the dynamic balance of supply and demand within the cluster is achieved, and the reliability and economy of the system is effectively improved. However, due to differences in the capacity configuration and load characteristics of each microgrid, when electric energy is exchanged between microgrids, it will affect the operation of microgrids [11]. Therefore, considering the exchange of electricity between microgrids, how to coordinate and optimize the microgrid cluster according to the supply and demand characteristics of each microgrid is very important.

At present, research on coordination and optimization of a microgrid cluster has achieved certain results. Literature [12] proposed a multi-microgrid coordinated and optimized dispatching model based on double auction to optimize the sum of interactive power between each microgrid and other microgrids and power distribution network. Although this model optimized the electricity transaction volume between microgrids, it did not take into account the influence of demand-side controllable loads on the electrical energy interaction between microgrids. Literature [13] established a market transaction model based on cooperative game theory and carried out research on the benefit distribution and settlement rules of the microgrid cluster cooperative alliance. Although the electricity transaction price between microgrids was optimized, the influence of the demand-side controllable loads on the microgrids was not considered. Literature [14] studied the optimal dispatching problem of photovoltaic microgrid based on the consideration of time-of-use electricity price, with the goal of minimizing the exchange volume of the grid. Although the time-of-use electricity prices and optimized transaction volumes were considered, only the optimal dispatch of a single microgrid was considered, and the optimization of the microgrid cluster system was not considered. Literature [15] considered the installation cost, operating cost, and environmental benefits of the multi-microgrid system to establish an economic dispatch model and used a particle swarm optimization algorithm combined with Monte Carlo simulation to solve it. Although a centralized optimization algorithm was adopted, each microgrid needed to fully share internal privacy information, which requires higher communication and makes it difficult to optimize dispatch. Literature [16] achieved minimum operation cost through a few iterations by combining the Newton-type second-order algorithm and a consensus-based information exchange. Literature [17] took the adjustment cost of each microgrid as the consensus variables and used the consensus algorithm to solve the power distribution problem of island microgrid clusters. Although literature [16] and [17] had realized the economic operation of microgrid clusters, they only considered peak shaving and valley filling from the power generation side, without considering the response effect of electricity load. Literature [18] was based on the particle swarm algorithm to study the economic optimization dispatch of the microgrid. Although the optimal solution of the microgrid operating cost was obtained, the particle swarm algorithm had limited global optimization capability and is easy to fall into the local optimal solution. Literature [19] proposed a chaotic starling particle swarm optimization algorithm. The additions of the inertial weights and the chaotic logistic mapping strategy improved the algorithm to have better convergence and stronger global search capabilities. However, when applied to multiple local optima, it may fall into local optima and cause stagnation. Literature [20] proposed a new type of swarm intelligence optimization algorithm, the sparrow search algorithm. Compared with other algorithms, its solution efficiency was better; however, it was also easy to fall into the problem of local extremum in the later iteration.

Based on the abovementioned problems, this paper improves the optimization model of the microgrid cluster and comprehensively considers the degradation cost of energy storage battery, the compensation cost of demand-side controllable loads dispatch, the electricity transaction cost between the microgrids, and the electricity transaction between the microgrid and the power distribution network of the microgrid cluster, establishes a dynamic energy trading model for the microgrid cluster, promotes the balance of supply and demand within the cluster by continuously coordinating the electricity transaction volume between microgrids, and reduces system operating costs. At the same time, taking into account the Bernoulli chaotic map, dynamic adaptive weights can effectively avoid the algorithm from falling into the local optimum and improve the algorithm's global optimization ability, and the Cauchy mutation and reverse learning can effectively jump out of the local optimum. This paper proposes a chaotic sparrow search algorithm (ISSA). We use different types of test functions to analyze the convergence effect of the algorithm and compare them with sparrow algorithm (SSA), particle swarm algorithm (PSO), chaotic particle swarm algorithm (CPSO), and genetic algorithm (GA). The effectiveness of the improvement of the proposed ISSA algorithm is verified, and the algorithm is applied to solve the operating cost of the microgrid cluster system. Finally, a calculation example is used to verify the operating economy of the microgrid cluster with demand-side controllable loads participating in the dispatch.

The organization structure of this paper is as follows. Section 2 introduces the basic structure of the microgrid cluster and demand-side response model. In Section 3, the optimal dispatch model of the microgrid cluster is introduced. In Section 4, the improved sparrow algorithm is introduced. Section 5 uses the test function analysis to verify the effectiveness of the algorithm improvements. In Section 6, the microgrid cluster composed of three microgrids is taken as an example, and the ISSA algorithm is used to conduct simulation experiments. Section 7 gives the conclusion and describes the future of the proposed algorithm.

2. Microgrid Cluster Structure and Demand-Side Response Model

2.1. Electric Energy Trading Structure of the Microgrid Cluster

The microgrid cluster electric energy transaction structure is shown in Figure 1; n microgrids are interconnected to form a microgrid cluster system, and each microgrid in the community contains different types of distributed power generation units and loads. The energy flow in Figure 1 represents the power interaction between the microgrid and the power distribution network, and the information flow represents the two-way interaction of information between the microgrid and the cluster adjustment/cluster control system. It can be seen from Figure 1 that, in the process of optimal dispatch of the microgrid cluster, the cluster adjustment/cluster control system conducts two-way information interaction with the microgrid and continuously optimizes the electric energy transaction volume by adding controllable loads to realize the optimal dispatch of the microgrid cluster.

2.2. Demand-Side Response Model

There are many different forms of loads in the microgrid. The classification of loads is helpful for energy management and dispatch. The demand-side management model of this paper mainly takes controllable loads as the research object. Based on the reliability of power supply, it is divided into three types: shiftable load, transferable load, and interruptible load.

2.2.1. Shiftable Load

The microgrid can flexibly change the operating period of the shiftable load, so that it can choose to use electricity in the appropriate electricity price time period. The microgrid can control the shiftable load from the peak period of power consumption to the general period, thereby reducing the pressure of dispatching and reducing the operating cost. The mathematical model is as follows [21]:where represents the dispatch compensation cost of unit power of the shiftable load in MGi, represents the power of the k-th translatable load in MGi, represents the state of the k-th translatable load of MGi in period t, if , then when the value is 1, it means it is in the running state; when the value is 0, it means it is in the interrupt state, represents the original power consumption period of the k-th shiftable load in MGi, and represents the continuous power consumption period of the k-th shiftable load in MGi.

2.2.2. Transferable Load

The transferable load has a certain degree of flexibility in the way of power supplies, its controllability is very strong, and the power supply time can be changed as planned. The power sector estimates the transferable load capacity and signs contracts with users to increase the economy of the microgrid. The mathematical model is as follows:where represents the dispatch compensation cost of unit power of the shiftable load in MGi, represents the power of the k-th transferable load in MG I, represents the state of the k-th transferable load of the MGi in the period t, if , then when the value is 1, it means it is in the running state; when the value is 0, it means it is in the interrupt state, represents the original power consumption period of the k-th shiftable load in MGi, and represents the total power consumption period of the k-th shiftable load in MGi.

2.2.3. Interruptible Load

The microgrid can cut off the interruptible load at any time without any negative impact on its operation, thus making the microgrid’s energy management system more flexible. Cutting off the interruptible load requires consideration of the user’s wishes and carries on certain compensation to the user. When the compensation cost for removing the interruptible load is lower than the cost of dispatching other units, it can choose to remove the interruptible load. The mathematical model is as follows:where represents the state of the k-th interruptible load of the MGi in the t period, when the value is 1, it means it is in the running state, when the value is 0, it means it is in the interrupt state, and and , respectively, represent the dispatch compensation cost of unit power of the interrupted load in MGi and the power of the k-th interruptible load.

When the user side participates in demand management, the power department should provide economic compensation to the user. This article comprehensively considers the dispatch compensation cost of the three controllable loads: shiftable load, transferable load, and interruptible load. The specific mathematical model is as follows:where represents the dispatch compensation cost of the k-th shiftable load of MGi in period t, represents the dispatch compensation cost of the k-th shiftable load of MGi in period t, represents the dispatch compensation cost of the k-th interruptible load of MGi in period t, represents the set of translatable load of MGi, represents the set of transferable load of MGi, and represents the set of interruptible load of MGi.

3. Optimal Dispatch Model of the Microgrid Cluster

3.1. Operating Cost Model
3.1.1. Degraduation Cost of the Energy Storage Battery

The degradation cost of the energy storage battery is the cost of life reduction caused by the battery being recycled due to discharge, which is determined by the depth of discharge and the price of the battery. When the energy storage battery is deeply discharged, its recycling will lead to a reduction in life and an increase in degradation costs. In this paper, the battery discharge depth function [22] is used to express the degradation cost of the energy storage battery. The specific function can be expressed aswhere represents the maximum state of charge of the energy storage battery of MGi, represents the state of charge of the energy storage battery of MGi in the period t, represents the initial investment cost of the energy storage battery of MGi, represents the charging power of the energy storage battery of the MGi in the period t, represents the discharge power of the energy storage battery of the MGi in the period t, represents the rated capacity of the energy storage battery of the MGi, represents the charging efficiency of the energy storage battery of the MGi in the period t, represents the discharge efficiency of the energy storage battery of the MGi in the period t, and is the time interval.

From equation (5), it can be seen that the initial investment cost of the energy storage battery is constant. Therefore, as long as the charge and discharge power of the energy storage battery are optimized to obtain the battery state of charge, the degradation cost of the energy storage battery can be obtained.

3.1.2. Electricity Transaction Cost between Microgrids

The electricity transaction cost between microgrids refers to the cost incurred when multiple microgrids exchange electricity, which is generally expressed aswhere represents the power of MGi interacting with other microgrids in period t, the purchase of electricity is a positive value, the sale of electricity is a negative value, and represents the electricity price of MGi in period t.

3.1.3. Electricity Transaction Cost between the Microgrid and Power Distribution Network

The electricity transaction cost between the microgrid and the distribution network refers to the cost generated when the microgrid and the power distribution network interact with electricity, which is generally expressed aswhere is the interactive power between the MGi and the power distribution network in t period, the purchase of electricity is a negative value, the sale of electricity is a positive value, and is the electricity price of the power distribution network in t period.

3.2. Optimal Dispatch Objective Function of the Microgrid Cluster

This paper takes the lowest operating cost of the microgrid cluster as the optimization goal and establishes the optimal dispatch model of the microgrid cluster. During the operation of the microgrid cluster, the costs are mainly composed of the compensation cost of the demand-side controllable load dispatch, the degradation cost of the energy storage battery, the electricity transaction cost between the microgrids, and the electricity transaction cost between the microgrid and power distribution network. The optimization objective function can be expressed aswhere represents the dispatch compensation cost of the controllable loads of the MGi in period t, represents the degradation cost of the energy storage battery of the MGi in period t, represents the electricity transaction cost between the microgrids of the MGi in period t, represents the electricity transaction cost between the microgrid and the power distribution network of MGi in period t, and is the dispatch period.

3.3. Constraints
3.3.1. Constraints of Power Balance

The power balance constraint of the microgrid clusters system is generally expressed aswhere is the electric power of the key load of MGi in t period and is the renewable energy output of MGi in t period.

The interactive power balance constraint between microgrids is expressed as

3.3.2. Constraints of Energy Storage Battery Operation

Since the energy storage battery cannot be charged and discharged at the same time, the energy storage battery charge and discharge power constraint is expressed aswhere represents the maximum charge and discharge power of the energy storage battery of the MGi.

For energy storage battery, their initial and final capacities should be consistent (excluding charge and discharge power constraints) and the energy storage capacity of each period needs to be controlled within a reasonable range. The following is the specific expression:where is the minimum state of charge of the energy storage battery of MGi.

3.3.3. Transaction Constraints of the Microgrid Cluster

(1) Trading electricity price constraints between microgrids: when directly trading electrical energy between microgrids, the price should be above the purchase price of the power distribution network and remain below the sale price of the power distribution network, so it is expressed aswhere and are the electricity purchase and sale prices of the power distribution network.

(2) Constraints on the balance of electricity transaction costs between microgrids: the balance constraint of electricity transaction cost between microgrids is expressed as

(3) Interactive power constraints between microgrids: the interactive power constraint between microgrids is expressed aswhere is the maximum value of interactive power between microgrids.

(4) Interactive power constraints between the microgrid and power distribution network: the interactive power constraint between the microgrid and the power distribution network is expressed aswhere is the maximum value of the interactive power between the MGi and the power distribution network.

3.3.4. Constraints of Demand-Side Controllable Loads

The shiftable load needs to be translated as a whole to maintain the continuity of its electricity consumption, so the shiftable load constraint is expressed aswhere represents the initial dispatch period of the k-th shiftable load in MGi and represents the end dispatch period of the k-th shiftable load in MGi.

The dispatch period of the transferable load is within the acceptable range, indicating that its operation has high flexibility, so the transferable load constraint is expressed aswhere and , respectively, are the beginning and end dispatch periods of the k-th transferable load of MGi.

According to different degrees of importance, the maximum interruptible duration constraint of the interruptible load is implemented. In addition, the maximum and minimum duration constraints are also included in the interruptible load [23], and the constraints are expressed aswhere represents the initial operating period of the k-th interruptible load in MGi, represents the end operating period of the k-th interruptible load in MGi, and represents the k-th maximum interruptible duration in MGi in a day.

4. Improved Sparrow Algorithm

4.1. Basic Sparrow Search Algorithm

The sparrow search algorithm is a swarm intelligence optimization algorithm that simulates the foraging behavior of sparrows. It contains three types of individuals, discoverer, follower, and alerter, and updates their locations according to their own rules.

The location of the discoverer is updated as follows:where represents the current iteration number, , and represents the position of the i-th sparrow of the t + 1 generation in the j-th dimension, represents the maximum number of iterations, is a random number in the range of , represents the warning value, represents the safety value, Q is a random number and obeys normal distribution, and L is a row of multidimensional matrix where all elements are 1. If , it means that there are no natural enemies nearby, the search environment is safe, and the discoverer implements an extensive search mode; if , it means that sparrows detect natural enemies, and the entire population adjusts its search strategy and quickly moves to a safe area.

The follower’s location update formula is as follows:where represents the worst position of the sparrow in the j-th dimension at the t-th iteration, represents the best position of the sparrow in the j-th dimension at the t + 1 iteration, and A is a matrix with randomly assigned values of 1 or −1 for each element. If , it means that the i-th follower did not get food and has low adaptability and needs to fly to other areas to find food to obtain energy. If , it means that the i-th follower will randomly select a location nearby for foraging.

The position update formula of the alerter is as follows:where represents the optimal position of the sparrow in the j-th dimension at the t-th iteration, is the step size control parameter, is a random number within , is the fitness value of the current sparrow, represents the current global optimal fitness value, represents the current global worst fitness value, and is a very small constant to avoid denominator becoming 0. If , it means that the sparrow is on the edge of the population and is easily attacked by natural enemies; if , it means that the sparrow is in the center of the population and, due to being aware of the threat of being attacked by natural enemies, approaches other sparrows in time to avoid danger.

4.2. Improved Sparrow Algorithm
4.2.1. Initial Population of the Bernoulli Chaotic Map

Chaotic variables are ergodic, which can effectively improve the algorithm's global optimization capability. The chaotic map used in this paper is the Bernoulli equation [24].where .

4.2.2. Improved Finder Update Formula

Introducing the global optimal solution of the previous generation and the dynamic weight factor into the discoverer update formula can avoid the algorithm falling into local optimal and improve the convergence speed [25]. The improved formula is as follows:

In formula (24), and are the inertia weights at the beginning and end of the iteration, respectively, is the current iteration number, is the maximum number of iterations, and when and , the algorithm optimization performance is the best. As the number of iterations increases, the inertia weight will gradually decrease nonlinearly because at the beginning of the iteration, using a larger inertia weight can improve the search ability of the algorithm and at the end of the iteration, using a smaller inertia weight can enhance the development ability of the algorithm.

In formula (25), is the optimal solution of the sparrow in the j-th dimension at the t-th iteration.

4.2.3. Improved Alerter Update Formula

The improved alerter update formula is shown in equation (26), which means that if the sparrow is in the optimal position, it will randomly fly to any position between the optimal position and the worst position. If the sparrow is not in the optimal position, then it will randomly fly to any position between the current position and the optimal position.

4.2.4. Combining the Cauchy Mutation and Reverse Learning Strategy

Gaussian mutation has a weak ability to guide individuals out of better local solutions, which is not conducive to global convergence; therefore, this paper uses the Cauchy mutation [2628]. The Cauchy mutation comes from the Cauchy distribution, and the standard Cauchy distribution function formula is as follows:

Introducing the Cauchy mutation into the target position update method and exerting the perturbation ability of the Cauchy operator can improve the global optimization ability of the algorithm.where is the standard Cauchy distribution. The Cauchy distribution random variable generating function is .

Reverse learning can effectively improve the efficiency of the algorithm in solving the global optimum. The solution idea is: in the search process, based on the current solution, the reverse learning strategy is used to calculate the reverse solution relative to the center, and then, a better solution is selected after the corresponding comparative evaluation, thereby improving the global optimization capability of the algorithm, and the calculation formula is as follows:where is the reverse solution of the optimal solution of the t-th generation, are the upper and lower bounds, is a random number matrix, which obeys the (0, 1) standard uniform distribution, and represents the information exchange control parameters. The formula is as follows:

The reverse learning strategy can expand the global optimization ability of the algorithm, and the Cauchy mutation strategy can improve the algorithm to avoid falling into the local optimal solution. Therefore, in order to further improve the algorithm optimization performance, the Cauchy mutation strategy and the reverse learning strategy are exchanged under the condition of selection probability , and the target position is dynamically updated. The calculation formula is as follows:where is the adjustment parameter, and its value can be 0.05.

The process of selecting strategy 1 is as follows:(1)If (2)Select the reverse learning strategy of formulas (29)–(31) to update the position(3)If (4)Select the Cauchy mutation strategy of formula (28) to update the target position

The Cauchy perturbation strategy and reverse learning strategy can improve the ability of the algorithm to jump out of local space; however, it is impossible to compare whether the fitness value of the new position obtained after these two disturbance strategies is better than the fitness value of the previous position. Therefore, the greedy rule is added to compare the fitness value of the new position after the disturbance mutation with the fitness value of the previous position. If the fitness value of the new location is better than the fitness value of the old location, the location is updated; otherwise, it is not updated.

The process of selecting strategy 2 is as follows:(1)If (2)(3)If (4)

4.2.5. The Steps of the Algorithm

The steps of the chaos sparrow algorithm are as follows:(1)Initialize the parameters, and use the Bernoulli chaotic map of equation (23) to initialize the sparrow population(2)Calculate the fitness value of each sparrow and sort it to find the current optimal and worst fitness value individual(3)According to equations (25), (21), and (26), the positions of the finder, follower, and alerter are updated, respectively(4)According to selection strategy 1, the current optimal solution is disturbed and a new solution is generated(5)According to strategy 2, compare the pros and cons of the fitness values before and after the disturbance to determine whether the location is updated(6)Iteration termination judgment: if it meets the iteration termination condition, then jump out of the loop and output the optimal result; if not, then jump to step (2) and continue the iteration until it meets the iteration termination condition and output the optimal result.

5. Function Test

5.1. Parameter Setting

Based on 12 benchmark test functions, we compare the performance of the improved sparrow algorithm, sparrow algorithm, particle swarm algorithm, chaotic particle swarm algorithm, and genetic algorithm. The test function is shown in Table 1, and the parameters of each algorithm are shown in Table 2. The parameter selection was based on the parameters used by the original author in the article or the parameters widely used by various researchers. The simulation is written and completed by MATLAB2018a. In the test, the population size of each algorithm is set to 50, the number of iterations is set to 400, and each algorithm runs independently 50 times.

5.2. Comparison and Analysis of Algorithm Performance Results

The average values and standard deviations obtained by optimizing 12 benchmark test functions by five algorithms are shown in Table 3. It can be seen that, for the unimodal function F1–F7, the ISSA algorithm has the best optimization effect, and the average value and standard deviation reach the global optimal solution. For the multimodal function F8–F12, ISSA algorithm and SSA algorithm have the same optimization effect and are better than PSO, CPSO, and GA algorithm. When solving F8 and F10, ISSA and SSA can reach the theoretical optimal solution stably. When solving F9, F11, and F12, although ISSA and SSA cannot converge to the theoretical optimal solution, their convergence effect and convergence accuracy are better than those of PSO, CPSO, and GA.

5.3. Comparison and Analysis of Algorithm Convergence Curves

The convergence curve obtained by optimizing 12 benchmark test functions by five algorithms is shown in Figure 2. It can be seen that when solving different test functions, the convergence speed of ISSA is better than SSA, PSO, CPSO, and GA algorithms, and it has better convergence speed and convergence accuracy. The horizontal axis represents update algebra, and the vertical axis represents the logarithm of fitness value log.

6. Case Analysis

6.1. Basic Data

This article takes the microgrid cluster system constructed by the three microgrids shown in Figure 1 as an example. The renewable energy output of each microgrid is shown in Figure 3, and the load curve is shown in Figure 4. The power of the controllable loads is 25 kW, and the dispatch compensation prices for the shiftable load, the transferable load, and the interruptible load, respectively, are 0.05 Yuan/kWh, 0.08 Yuan/kWh, and 0.3 Yuan/kWh. The initial operating period and allowable scheduling period of the controllable loads are shown in Table 4. The rated capacity of the microgrid energy storage system is 300 kWh, the maximum allowable charge and discharge power is 100 kW, and the maximum and small states of charge are divided into 0.9 and 0.2. The purchase and sale price of the power distribution network is shown in Table 5. The scheduling period of the calculation example is 24 hours a day, divided into 24 time periods, and the scheduling time is selected as 00 : 00–24 : 00.

6.2. Analysis of the Results of Electricity Trading between Microgrids

The electric energy exchange between microgrids is shown in Table 6. It can be seen that when the market is in equilibrium, electricity can be purchased and sold in various periods of time through the trade of electricity between microgrids.

It can be seen from Table 6 that when controllable loads participate in dispatching, at 14 : 00, 15 : 00, and 17 : 00, since the power generation of the microgrid cluster cannot meet the load demand, the power interaction between the microgrids in the cluster cannot be carried out, and electricity needs to be purchased from the power distribution network. From 10 : 00 to 13 : 00, MG1 sells electricity to MG2 that has insufficient power at the target time due to its own renewable energy output to meet its own load demand while still having electricity surplus. During the time periods of 08 : 00–09 : 00, 11 : 00–12 : 00, and 18 : 00, MG2 cannot meet its own load demand due to its insufficient output. Therefore, MG2 needs to purchase electricity from MG1 or MG3 that has too much power at the target time. During the time period from 19 : 00 to 24 : 00, MG3 sells electricity to the MG1 whose power is insufficient at the target time due to its own renewable energy output to meet its own load demand while still having electricity surplus.

6.3. Analysis of the Results of Electric Energy Trading between the Microgrid and Power Distribution Network

The electric energy exchange between the microgrid and the power distribution network is shown in Table 7. It can be seen that when MG1, MG2, and MG3 exchange electric energy, the interactive electric energy between each microgrid and the power distribution network can be reduced.

It can be seen from Table 7 that when controllable loads participate in the dispatch, during the time period of 14 : 00–18 : 00, MG1 cannot meet its own needs due to its insufficient output; therefore, it needs to purchase electricity from the power distribution network. During the time period of 01 : 00–05 : 00 and 19 : 00–24 : 00, MG2 has been selling electric energy to the power distribution network due to its overcapacity. During the time period of 10 : 00–17 : 00, MG3 cannot meet its own needs due to its insufficient output, and needs to purchase electricity from the power distribution network to meet its own needs. It can be seen from the abovementioned phenomenon that electricity trading between microgrids can completely eliminate excess renewable energy and balance the supply and demand of the system.

6.4. Analysis of the Results before and after Controllable Loads

The controllable load scheduling results are shown in Figure 5. It can be seen from Figure (a–c) that the overall loads of MG1 increase from 09 : 00 to 15 : 00, the loads of MG2 decrease from 10 : 00 to 15 : 00, and the loads increase from 18 : 00 to 24 : 00, the loads of MG3 increase during the time period of 00 : 00–08 : 00 and 18 : 00–24 : 00, and the loads decrease from 09 : 00 to 15 : 00. The total loads of the microgrid cluster can be seen from Figure (d), after adding the demand-side controllable loads schedule; the loads in the low period of 23 : 00–07 : 00 increase, and the loads in the peak period of 11 : 00–15 : 00 decreases. The peak-valley difference of the loads is reduced.

6.5. Economic Analysis of the Microgrid Cluster

The costs of the microgrid cluster in the two cases where the microgrid cluster has demand-side controllable loads participating in the dispatch and the uncontrollable loads participating in the dispatch are compared, as shown in Table 8.

It can be seen from Table 8 that, in the two cases where there are controllable loads participating in the dispatch and the uncontrollable load participating in the dispatch, the cost change of energy storage system is relatively small. When controllable loads are involved in dispatching, the total cost of MG1 is 1067.4864 Yuan, the total revenue of MG2 is 520.6545 Yuan, and the total cost of MG3 is 107.4852 Yuan. Compared with when there is no controllable load involved in dispatching, the economic cost of MG1 is reduced by 87.0533 Yuan, the revenue of MG2 is reduced by 33.1091 Yuan, and the revenue of MG3 is increased by 109.9848 Yuan. Therefore, the economic cost of the entire microgrid cluster is reduced by 163.9284 Yuan. It can be seen that when the controllable loads participate in dispatching, the microgrid cluster can effectively reduce the operating cost of the system.

6.6. Analysis of Optimization Algorithm Results

This paper proposes a chaotic sparrow search algorithm. This algorithm is used to optimize the operating cost of the microgrid cluster system, and it compares with sparrow algorithm, particle swarm algorithm, chaotic particle swarm algorithm, and genetic algorithm. The basic parameters of the algorithm are shown in Table 2.

It can be seen from Figure 6 that the objective function values of the five algorithms of GA, PSO, CPSO, SSA, and ISSA decrease continuously and become stable as the number of iterations increases, indicating that these five algorithms are all moving towards the optimal cost. It can be found by comparing GA, PSO, CPSO, SSA, and ISSA that when the demand-side controllable loads participate in dispatching, the number of iterations for ISSA algorithm to converge to the optimal solution is similar to CPSO algorithm, and its optimal solution is better than the convergence solutions of GA, PSO, CPSO, and SSA algorithms. When there is no demand-side controllable load participating in dispatching, the number of iterations for ISSA algorithm to converge to the optimal solution is higher than GA, PSO, CPSO, and SSA, and its optimal solution is better than the convergence solution of GA, PSO, and SSA algorithm.

7. Conclusions

This paper sets the optimization goal as the operating cost of the microgrid cluster system, constructs the microgrid cluster operation optimization model considering demand-side response, and discusses the costs of the microgrid cluster with and without controllable loads dispatch. Then a chaos sparrow search algorithm based on Bernoulli chaotic mapping, dynamic adaptive weighting, Cauchy mutation, and reverse learning is constructed, which is used to optimize the operating cost of the microgrid cluster system and compare with the optimized results of sparrow algorithm, particle swarm algorithm, chaotic particle swarm algorithm, and genetic algorithm.(1)Through the proposed strategy, electric energy transactions between microgrids and between microgrids and power distribution networks are realized. On the one hand, the impact caused by the connection between the microgrid cluster and power distribution networks is minimized, and on the other hand, it ensures the safety and stability of system operation.(2)When there is demand-side controllable loads participating in dispatching, on the one hand, the level of energy mutual benefit between microgrids is improved, and the excess renewable energy can be completely absorbed; on the other hand, due to the controllable loads participating in dispatching, the operating cost of the microgrid cluster dropped from 818.2455 Yuan to 654.3171 Yuan, the cost was reduced by 163.9284 Yuan, and the overall benefit has increased by nearly 20%, which effectively improved the economic benefits of the microgrid cluster.(3)This paper proposes a chaos sparrow search algorithm based on Bernoulli chaotic mapping, dynamic adaptive weighting, Cauchy mutation, and reverse learning. Based on 12 benchmark test functions, it shows that ISSA algorithm is superior to SSA, PSO, CPSO, and GA algorithms in terms of solution quality, which proves the effectiveness of the algorithm improvement. At the same time, ISSA algorithm has better performance when solving microgrid cluster optimization problems. The global optimization ability is stronger than SSA, PSO, CPSO, and GA algorithms, and the optimization cost is lower than SSA, PSO, CPSO, and GA algorithms. In future works, the ISSA algorithm will be applied to other fields, such as energy storage capacity configuration optimization, and face recognition. It can also be combined with other algorithms to form a hybrid algorithm to improve algorithm performance.

Abbreviation

BD:Battery degradation
CL:Controllable load
MN:Microgrid network
DN:Distribution network
ch:Charge
dis:Discharge
ESS:Energy storage battery
IL:Important load
RE:Renewable energy
EB:Electricity buy
ES:Electricity sell
Min:minimum
max:Maximum.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by the Guangxi Natural Science Foundation (no. 2017GXNSFAA198161).