Optimal Evolutionary Dispatch for Integrated Community Energy Systems Considering Uncertainties of Renewable Energy Sources and Internal Loads

: For the future development of integrated energy systems with high penetration of renew ‐ able energy, an integrated community energy systems (ICES) dispatch model is proposed including various renewable energy sources and energy conversion units. Energy coupling matrices of ICES based on traditional energy hub (EH) models are constructed. Uncertainties of long ‐ term forecast data of renewable energy sources and internal loads are depicted by multi ‐ interval uncertainty sets (MIUS). To cope with the impacts caused by uncertainties of renewable energy sources and internal loads, the whole dispatch process is divided into two stages. Considering various constraints of ICES, we solved the dispatch model through the improved particle swarm optimization (IPSO) al ‐ gorithm in the first stage. The optimal evolutionary dispatch is then proposed in the second stage to overcome the evolution and errors of short ‐ term forecast data and obtain the optimal dispatch plan. The effectiveness of the proposed dispatch method is demonstrated using an example consid ‐ ering dramatic uncertainties. Compared with the traditional methods, the proposed dispatch method effectively reduces system operating costs and improves the environmental benefits, which helps to achieve a win ‐ win situation for both energy companies and users.


Introduction
The gradual scarcity of fossil energy reserves and the increasingly serious environmental pollution have forced people to reform the existing energy consumption patterns; integrated energy systems (IES) are the important technical support for this reform [1][2][3][4][5].
As an important member of various types of IES, integrated community energy systems (ICES) have a bright prospect with their complete functions and easy implementation. To achieve energy saving and emission reduction, various kinds of renewable energy sources have been absorbed in ICES. However, there is a large amount of abandoned energy in ICES caused by randomness and volatility of renewable energy sources [6][7][8]. If the abandoned energy can be utilized through proper dispatching, the economic and environmental benefits of ICES could be significantly improved. Applying the functions of ICES flexibly to effectively improve energy efficiency and promote the consumption of renewable energy has attracted attention recently.
In order to avoid the energy abandonment, the techniques for forecasting renewable energy such as wind energy and solar energy has developed greatly in recent years [9]. In [10], a short-term forecast method based on cuckoo search and differential evolution algorithms was proposed. In [11], the authors provided the method for long-term forecasting of intermittent wind and photovoltaic resources, which depended on an adaptive neuro fuzzy inference system. Although the current forecasting technology for wind turbines (WTs) and photovoltaic units (PVs) has made great progress, certain deviations still exist in the forecast accuracy. These deviations become uncertain factors of the scheduling process.
Several recent scientific studies on power grids focus on handling the uncertainty of parameters. The authors of [12,13] show that robust optimization based on cardinality set or stochastic optimization is a viable technique to deal with uncertainty of parameters. However, the uncertainty of ICES is more complicated than that of the grid system. Uncertainty modeling alone cannot be used to improve the operation effect. An overall dispatching strategy needs to be proposed to improve the renewable energy consumption capacity of ICES.
ICES can combine various kinds of energies in a certain region, which is the key to solving energy abandonment and improving system performance. In [14,15], the authors studied the operation plans that transfer abandoned wind and solar energy to electric boilers for heating. In [16], hydrogen energy storage technology is employed to convert redundant wind and solar power. These references illustrate the role of energy coupling and energy storage in absorbing renewable energy output. However, using electric-thermal coupling equipment as the consumptive channel of energy is restricted by seasons and regions. Hence, these kinds of schemes have no universal applicability. Hydrogen storage technology is still immature and cannot be used on the large scale in the short term.
Different kinds of optimization methods are also helpful in improving the renewable energy consumption. The authors of [17,18] used robust optimization to obtain a dayahead scheduling scheme, which is robust under the wind and solar power uncertainties and takes into account the system safety as well. However, schemes by robust optimization are too conservative for operation and tend to sacrifice some economic benefits.
Power to gas (P2G) is a kind of technology that converts electric energy into methane through the chemical reaction of water electrolysis and methanation, which deepens the coupling between the power system and the natural gas network in the ICES [19,20]. P2G units can transform redundant electric energy to natural gas P2G units and cooperate with gas storage equipment to store the converted energy. This process can effectively absorb the redundant electricity generated by WTs and PVs in the ICES [21]. As natural gas is easier to store than electric energy, P2G units have a good application prospect in ICES. P2G units are selected as an important part in the ICES model of our work.
Considering preview problems, we propose a dispatch process to optimize the operation of ICES to fully absorb the WTs' and PVs' output under the uncertainties of renewable energy sources and internal loads. An energy hub (EH) model of ICES including P2G units is built to provide operational flexibility and improve economic performance. To decrease the conservatism of dispatch results, a strategy that can dynamically adjust the operation plan according to the short-term forecast is introduced to consume renewable power as much as possible. The detailed contributions of this article are as follows:  Multi-interval uncertainty sets (MIUS) for the forecast data of renewable energy sources and internal loads are introduced. Multiple forecast scenarios are generated in the day-ahead dispatch stage through MIUS and generate a day-ahead scheduling plan for each forecast scenario. They fully consider the uncertainty of the forecast data and ensure a sufficient time for the actual dispatch work.  Considering that the short-term forecasting data (SFD) will continue to evolve, optimal evolutionary dispatch plan (OEDP) is proposed. OEDP will make timely adjustments according to the evolution of SFD to make the dispatch plan performance better.


Real-time Adjusting Strategy (RAS) is proposed to solve the impact which caused by the deviation between SFD and the actual situation of dispatch process. It further improves the utilization rate of renewable energy and ensures the safety of users' energy demand.
The rest of this paper is organized as follows. Section 2 describes the details of models and methods we designed. In Section 3, the simulation results of the dispatch process and examples for comparison is exhibited, superiority of the dispatch process is discussed and validated in this section. Finally, Section 4 concludes the paper.

Models and Methods
In this section, the details of proposed methodology including energy hub (EH) models for ICES, multi-interval uncertainty sets (MIUS) for day-ahead long-term forecast data (DLFD), improved particle swarm optimization (IPSO) algorithm for optimal deterministic dispatch and optimal evolutionary dispatch are elaborated. Figure 1 demonstrates the framework of the proposed methodology. The description of all types of parameter symbols and their units are listed in Table 1.

Energy Hub (EH) Models for Integrated Community Energy Systems (ICES)
The EH model is used to establish ICES, which is a model that can illustrate the conversion, distribution and storage of multiple energy sources [22][23][24]. The EH model consumes energy at its entrance and provides necessary energy services at its output side. Inside the EH model, energy is converted into different forms through coupling devices [25][26][27]. The EH model topology is exhibited in Figure 2a.
Various energy coupling devices are applied in the ICES model of this paper to allow flexible conversion of various energies. The ICES consists of an electrical power system, natural gas system, district heating system, and multi-energy loads. The diagram of the ICES investigated in this article is given in Figure 2b. Units marked by "#" in Figure 2b are only enabled in the optimal evolutionary dispatch, and units without any marks are enabled in both day-ahead deterministic dispatch and optimal evolutionary dispatch. The energy storage system, such as battery and gas tank, can be equipped to improve the reliability and economy of the system [28,29].

Multi-Interval Uncertainty Sets (MIUS) for Day-Ahead Long-Term Forecast Data (DLFD)
Though the current forecasting technology is advanced, there are still many uncertainties. We need to build uncertainty sets to describe uncertainties [17,18]. In the dispatch problem of energy systems, the commonly used uncertainty set for modeling the uncertainties in renewable energy and load is as follows [30,31]: where t u is the uncertainty parameter, t Δu is the deviation of t u , t u  is the nominal value of t u , and Γ is the budget of uncertainty.
Equation (2) describes a single-interval uncertainty set (SIUS), which defines the value of t u on a single interval. The SIUS needs no probability information about the forecast error, while it results in strong conservatism. Inputting uncertainty data with strong conservatism into the dispatch strategy will result in poor performance to the final output dispatch plan. In order to embed more information into the uncertainty set to reduce the conservatism, the uncertainty sets are divided into multi-interval to construct a MIUS [32], as follows: where t u v is the deviation ratio of t u , k,t u v and k,t u v are the lower bound and upper bound of the interval k of t u v , respectively, k ,t ε is binary variable to indicate whether t u v is located in the interval k. k Γ is the budget of the interval k, and k is the index of each interval. Based on the assumption that the deviation ratio t u v is independent and identically distributed, the budget k Γ can be calculated by Compared with the SIUS, the MIUS embeds more distribution information of the uncertainties and the dispatch results can be less conservative. In this paper, the DLFD is brought into the MIUS model to obtain the multi-group data considering multi-interval uncertainties. The specific process of this step is shown as Figure 3a.  Figure 3. Process diagrams of method to obtain the multi-group data and a series of ODDP: (a) process to obtain the multigroup data; (b) process to obtain a series of ODDP.

Improved Particle Swarm Optimization (IPSO) for Optimal Deterministic Dispatch
Before the optimal evolutionary dispatch, the day-ahead optimal deterministic dispatch plan (ODDP) must be gained firstly. In this part, the multi-group data obtained in the previous part is regarded as multiple deterministic data groups input to the solution algorithm for obtaining a series of ODDP. In the model, u C , e C , g C and env C are decision variables. Three power balance constraints are used as equality constraints of the model. The inequality constraints of the model include power grid constraint, gas pipeline constraint and equipment constraints. The specific process of this part is demonstrated in Figure 3b.

Objective Function
Considering the minimization of the economic cost and environmental cost of the IES as the optimization objective, the objective formulation can be described as follows: where u C is the cost of all units in the ICES, e C and g C are the system cost of power and gas purchase, env C is environmental protection cost which is applied to limit the greenhouse gas emission.
Equation (6) Equation (7) describes the cost of system power purchase, where t e c is grid electricity price for each period; t buy,e P is the power bought from the grid for each period; Δt is the length of time period.
Equation (8) describes the cost of system gas purchase, where g c is the gas price that is bought from the gas network; t buy ,g V is the amount of gas that is bought from the gas network for each period.
Equation (9) shows the cost of environmental protection, where β is the cost of CO2 emission for per unit volume; g  is the CO2 emission coefficient for per unit volume of gas; t CHP ,g V and t GB,g V are the gas consumption of CHP and GB for each period, respectively.

Constraint Condition 
Power balance constraints According to EH energy coupling matrix, the coupling relationship between input and output power can be obtained. Equations (10)-(12) t t t t buy ,g GT ,g 1 GB,g L ,f ,g Specifically, Equation (10) where Equation (13) is power grid constraint, Equation (14) is gas pipeline constraint.  Energy supply equipment and energy coupling equipment constraints The types of energy supply equipment and energy coupling equipment include PVs, WTs, CHP, GB, EB, AC and EC. The unified constraint model is shown as the following equations.
where M is the collection of all energy supply equipment and energy coupling devices in the system;

Optimization Algorithm
We developed the IPSO algorithm to obtain a series of day-ahead optimal dispatch plans. In the normal PSO, each solution is represented by a group of particles, best p and best g , respectively, represent the personal best solution of particle i and the global best solution among all particles. In order to achieve the optimal solution, the formula for up- where 1 c and 2 c represent acceleration constants; 1 r and 2 r are random numbers distributed between (0, 1); ω is inertia weight, which is used to balance local exploration and global exploration, inertia weight can be determined by: The normal PSO algorithm has advantages of having fewer parameters and easy implementation. However, it may converge prematurely or fall into a local optimum when handing complex problems such as the optimal dispatch problem discussed in this paper. To solve this problem, the IPSO algorithm is proposed.
The inertia weight factor ω is an important parameter of PSO [33,34], which is applied to control previous velocity influence on the current velocity. Therefore, in the improved algorithm proposed in this paper, the inertia weight ω evolution method in the iterative process is changed. Under the new evolution method, inertia weight is described as follows: where cur rand(N ) is the random probability of the current iteration number. This strategy makes the adjustment range of ω be gradually compressed and shows a nonlinear decreasing trend as a whole. The addition of probability judgment enhances the randomness of ω under the overall decreasing trend, preventing ω from falling into a monotonous evolution trend, and improving the diversity of particles.
To further prevent the algorithm from easily falling into the local extremum during the iterative process, the best solution perturbation operator (BSPO) is proposed to adjust the personal best solution and the global best solution among all particles. The BSPO updated formula can be determined as follows:

Evolution of Forecast Data
Forecast of renewable energy sources and internal loads can be divided into shortterm and long-term ones in line with the leading time scale. Though forecast technologies have been rapidly developing, uncertainties still bring a great challenge for making feasible and beneficial decisions.
The short-term forecasts are more reliable compared with long-term forecasts, but they are limited by forecast horizon which is only several hours. The short-term forecasts are dynamically updated in real time, the forecast data keep evolving and forecast uncertainties would be different as time proceeds. The forecaster releases information for the next a few hours at the current period on the basis of climate information obtained. Hence, the forecast data is not static, evolution existing all the time [35].

Selection and Jointing Strategy of Day-Ahead Deterministic Dispatch Plans
For the optimal dispatch for ICES including renewable energy source, the accuracy of renewable energy source output forecast data can influence the dispatch plan quality significantly.
The applications of long-term forecast give managers and decision makers sufficient time to make proper arrangements for all units in the system, but the long-term forecast data may have a large gap with the actual situation; the dispatch plan made by it always has poor performance. Short-term forecast accuracy is much higher than that of the longterm ones. However, the late announcement time of short-term forecasts makes it not really feasible to dispatch the system.
Hence, a dispatch strategy is proposed to combine the advantages of long-term forecast data and short-term forecast data. Its specific process is as follows:

Selection and Joining Strategy of Day-Ahead Deterministic Dispatch Plans
Step1: Dividing the dispatch period into several equal parts and obtaining short-term forecast data of each part in chronological order.
Step2: The short-term forecast data of each part is compared with series group of longterm forecast data. The long-term forecast data with the highest similarity to the shortterm forecast data of each part is selected as best fit data.
Step3: Joining the dispatch plans corresponding to each group of best fit data selected in Step2 to obtain a complete dispatch plan.
The Euclidean distance is used as a criterion to select the best fit data with the highest similarity to the short-term forecast data of each part. The criterion formula is as follows: where i and j are group numbers of short-term forecast data and long-term forecast data, respectively; t is time period number and values of x and T depend on the division of the dispatch period; i k is the group number of the long-term forecast data which has been selected by short-term forecast data i; ij ED is the Euclidean distance between short-term forecast data i and long-term forecast data j; t i s and t j l are the data of short-term forecast data i and long-term forecast data j, respectively, and both of them are at period t. The complete dispatch plan obtained through the above strategy can be regarded as a composite scheme established by a series of ODDP. The long-term forecast data is used to derive the day-ahead deterministic dispatch plan, giving managers and decision makers enough time to make reasonable arrangements for the ICES. The short-term forecast data has also been used, which enables the dispatch plan to be able to adapt to the evolution of forecast data in the dispatch process and improve the performance of whole plan. The dispatch plan derived from the strategy proposed in this part is termed as the optimal evolutionary dispatch plan (OEDP).

Real-Time Adjusting Strategy (RAS) for ICES
The strategy proposed in the previous section considers multiple uncertainties and evolution of the forecast data. Nevertheless, there are still some deviations between the data applied in the dispatch plan and the actual situation faced in the dispatch process. In this step, P2G units and energy storage devices, which are not enabled in the previous steps, are turned on to further balance the energy redundancy or shortage caused by the gap between the data and the actual situation. The strategy proposed in this part can be divided into two parts, which are the RAS considering the balance of electric and the RAS considering the balance of natural gas, respectively. The specific process of the strategy is illustrated in Figure 4.   , then all the shortage part of gas is supplied by the GT (Situation 6). Otherwise, if the shortage part is more than the existing gas volume of the GT, transferring all the gas in gas tank to the community users and the insufficient part is purchased from the gas network (Situation 7).

Case Study
In this section, a case is presented to verify the superiority of the dispatch method proposed in this article. The ICES model in Figure 2b is used as the basis of this part, and the dispatch method which we need to verify operates on it. A typical day in winter is simulated when the outdoor temperature ranges from −25.2 to −13.6 °C. The gas price of this case is 0.5 USD/m 3 , β is set to 10 USD/t and g  is set to 2 × 10 −3 t/m 3 . The electricity price at each period of the day is not constant. The electricity price from 1:00 a.m. to 7:00 a.m. and from 21:00 p.m. to 24:00 p.m. is 7 × 10 −2 USD/kWh. The electricity price of 8:00 a.m. and from 13:00 p.m. to 15:00 p.m. is 14 × 10 −2 USD/kWh. The electricity price from 9:00 a.m. to 12:00 p.m. and from 16:00 p.m. to 20:00 p.m. is 21 × 10 −2 USD/kWh. Table 2 shows the capacity and conversion efficiency of the main units in the ICES. Three subcases are set as follows:  Subcase 1. This subcase applies traditional robust optimization method to dispatch. Applying DLFD to get a day-ahead optimal dispatch plan and use it as final operation plan. If there is energy redundancy, the redundant part is directly regarded as abandoned energy; if there is energy shortage, the shortage part is completely purchased from outside.  Subcase 2.
This subcase applies the MIUS to get a series of ODDP and considering the evolution of SFD to get OEDP. We use OEDP as final operation plan, without introducing RAS. If there is energy redundancy, the redundant part is directly regarded as abandoned energy, if there is energy shortage, the shortage part is completely purchased from outside.  Subcase 3.
This subcase includes P2G units and energy storage equipment. We introduce MIUS to get a series of ODDP and consider the evolution of SFD to get OEDP. Finally, the RAS is introduced to get the final operation plan.
Among the above subcases, Subcase 3 is completely according to the method proposed in this article, and Subcases 1 and 2 are used for comparison. All simulations are performed on a computer with a 3.40 GHz CPU and 16 GB RAM. The programming is based on the MATLAB R2020a and Yalmip. The MATLAB R2020a is used to solve the programming problem.

Input Data of Case
A group of test data obtained online is regarded as DLFD [36]. On this basis, we substituted DLFD into MIUS to obtain the multi-group data considering multi-interval uncertainty. We assumed that the forecast error of renewable energy sources and internal loads follow the symmetric normal distribution. The uncertainty set of the deviation ratio was divided into six intervals, i.e., [−2σ, −σ], [−σ, −0.5σ], [−0.5σ, 0], [0, 0.5σ], [0.5σ, σ], and [σ, 2σ], where σ is the standard deviation ratio. In the case we proposed, the standard deviation ratio σ was set to 0.1. Except DLFD, other groups of data were divided into two levels according to the degree of uncertainty. Figure 5 shows the data of WTs and ELs to demonstrate the interval division method of MIUS and the multi-group data considering multi-interval uncertainty.  The DLFD was entered directly into the IPSO to get the ODDP, and the ODDP was used as the final scheduling plan, as shown in Figure 6. Although IPSO can output an ODDP, due to the difference between DLFD and the actual situation of the operating ICES, this subcase will produce vast abandoned energy, it is necessary to frequently adjust the power purchase plan during the peak period of electricity consumption. The economic and environmental benefits of Subcase 1 are not good. The operating cost of ICES in this subcase is USD 6.73 × 10 5 , of which environmental costs account for USD 1.06 × 10 5 .

Subcase 2
We took OEDP as the final operation plan. The uncertainty of renewable energy and internal load was considered, and the evolution of SFD was also considered. The dispatch situation of electric power of Subcase 2 is shown in Figure 7. The dispatch plan in each short-term forecast period is highly matched with the actual situation of the ICES. However, there are also some mild errors in the SFD, and the phenomenon of energy abandonment will still occur. The operating cost of ICES in this subcase is USD 4.57 × 10 5 , of which environmental costs account for USD 8.17 × 10 4 .

Subcase 3
OEDP is equivalent to making a dispatch plan for the next four hours based on SFD in four hours advance. Although SFD in four hours advance has high accuracy, there still exist deviations from the actual situation when the system is operating. The RAS is introduced to solve this problem, as shown in the Figure 8. The introduction of RAS can further absorb the energy that cannot be absorbed in OEDP through P2G units and energy storage equipment. From 1:00 a.m. to 7:00 a.m., P2G units absorbed wind power to avoid energy abandonment. At 16:00 p.m., the actual WT output differs greatly from the SFD, which exceeds the capacity of the P2G units. The excess is charged into the battery, and this part of the electric energy is offered to users when there is a power shortage at 17:00 p.m. The wind energy absorbed by the P2G units is converted into gas for storage and put into utilization when the actual gas demand in the ICE differs from the SFD. Introducing RAS and applying OEDP simultaneously can further improve the economic and environmental benefits of ICES. The operating cost of ICES in this subcase is USD 4.57 × 10 5 , of which environmental costs account for USD 6.26 × 10 4 .

Conclusions
In this paper, an evolutionary dispatch method was proposed to solve the energy abandonment problem of ICES under the uncertainties of renewable energy sources and internal loads. Various renewable energy sources and energy conversion units were modeled basing on EH model to improve the flexibility of system. The MIUS was introduced to obtain the multi-group data, which integrated more forecast information than the data only considering single-interval uncertainty. In the whole dispatch process, DLFD is applied to ensure sufficient decision time, and SFD is used to guarantee the performance of the dispatch plan. During the actual operation of the ICES, the renewable energy utilization is further improved through the RAS we proposed.
The proposed method could not only ensure the economic and environmental benefits of the system but also improve the renewable energy utilization. The results of case study illustrated that the uncertainties of renewable energy sources and internal loads have considerable influence on the dispatch results. Compared with the subcase without the method we proposed, the subcase applied in our method has better performance, especially in improving the capacity of renewable energy consumption. However, the application of MIUS will increase the computational time complexity of the model, which also increases a certain amount of calculation cost. Larger computing costs will bring certain challenges to hardware facilities and economic strength, but the increased cost is far less than the benefit brought by the increase in the utilization of renewable energy most of the time. The results of this article indicate that it is necessary to take the uncertainty of renewable energy sources and internal loads into consideration in the dispatch decision of ICES. The achievement obtained in this paper can further improve the renewable energy consumption capacity of ICES and provide a reference for future research on further improving energy efficiency. Moreover, many other factors, such as random occupant behaviors and district heating system transmission, also have a dramatic impact on system performance, which could be our next topic.