A configuration optimization framework for renewable energy systems integrating with electric‐heating energy storage in an isolated tourist area

The renewable energy system integrates various power generating units, heating units, energy conversion devices, and energy storage devices, which is an effective way to improve energy efficiency and realize clean energy utilization. In this paper, a renewable energy system integrating with photovoltaic electric power generation systems, wind‐driven generators, gas‐driven generators, gas‐fired boilers, electric chillers, electric and heating energy storage devices is constructed in an isolated tourist area. Considering the complex multi‐energy flows in renewable energy systems, an energy hub with power and heat is established to concentrate and distribute electric and heating energy flow for balancing energy supply and demand in a CCHP system. Introducing the constraints of renewable energy penetration index and energy supply reliability index, a collaborative optimization framework for system configuration is constructed to minimize annual capital cost, fuel cost, and maintenance cost. The simulation results show that the model and algorithm in this paper are feasible and applicable, and the optimization scheme has good economic benefits and optimal performance, which can promote the consumption of renewable energy and reduce the surplus of electric energy and heat energy.


| INTRODUCTION
A renewable energy system can supply electric, cooling, and heating loads with local resources such as combined heat and power units, renewable energy generation units, diesel generators, and others. One of the important features is the local production and consumption of energy at user sides, which reduces the construction cost of energy network and the operating cost of energy transmission caused by the largescale exchange of energy. The energy system on the user side is one of the main systems for comprehensive utilization of various energy resources, and it is a platform for renewable energy to gather and inject into the main grid. 1-3 A renewable energy system that integrates different renewable energy sources can operate in grid-connected or off-grid modes and can be applied to factories, large buildings, urban and rural concentrated residential areas, isolated islands, isolated tourist areas, and other regions. The renewable energy systems at user side can realize the complementation of multi-energy, improve energy efficiency, and reduce the emission of pollution gas. [4][5][6] With the rapid development of the global economy, the demand for energy has risen sharply, and environmental problems have become increasingly prominent. Optimizing energy structure and improving energy utilization rate have become effective measures to solve energy and environmental problems. 7 Electric power generation with wind and solar energy has low environmental pollution, but its output power is intermittent and random. 8,9 The combined cooling, heating, and power (CCHP) can provide electric energy and heating energy simultaneously, whose energy efficiency can reach 80%-90%. It can realize cascade utilization of energy with higher efficiency and reduce pollution emission of polluted gas, which bring them a promising future. [10][11][12][13][14][15][16] There are many remote scenic tourist areas in China, which is far from the urban area and have abundant renewable energy, such as wind energy and solar energy. With the development of the tourism industry, its demand for electric, cooling, and heating loads is increasing. Building renewable energy system integrating with CCHP for the isolated tourist area can make full use of the region's renewable energy and reduce the impact of polluting gases on scenic tourist areas. The renewable energy system with CCHP inputs solar energy, wind energy, natural gas, etc, and outputs electricity, cooling, and heating. It contains various power generation unit, energy conversion equipment, and energy storage device. The input and output characteristics of these devices are different, such as a gas-fired generator inputs natural gas to generate electric energy and heating energy simultaneously, and an electric chiller converts electric energy into cooling energy. Therefore, the system contains various energy flows such as electricity, gas, heating, and cooling energy flows, which is intricate and coupled with each other. 17,18 The performance characteristics of renewable energy system with CCHP are strongly influenced by capacity configuration and operation strategy. The capacity configuration of the system provides a boundary for the optimization of operation, and different operating strategies should affect the capacity configuration. They all directly affect the distribution and coupling relationship of various energy flows in the renewable energy system. At the renewable energy system level, most of the researches focus on the operation of renewable energy system with CCHP. [19][20][21][22] Typically, a CCHP system operates in the mode of following the electric load (FEL) or following the thermal load (FTL). [23][24][25][26] In either mode, the system will generate excess heating energy or electric energy, therefore, they may not guarantee the best performance of the system. Some researchers have proposed some strategies based on these two basic strategies, such as following compromised electric-thermal load strategy, 27 following a hybrid electric-thermal load 28 and minimum distance strategy. 29 In order to reduce the consumption of fossil energy and the emission of polluting gases, renewable energy, such as solar energy, wind energy, and bioenergy is usually considered as emerging energy sources for CCHP users. The renewable energy system with CCHP is more beneficial, in terms of energy use, environment, and economy. Due to the intermittent and volatility of renewable energy, the operating conditions and energy flow of the system become more complicated. Some researchers increased the flexibility of operation by adding electric chillers, electric energy storage, compressed air energy storage or heating energy storage to the system. [30][31][32][33] The operating strategy of the system has evolved into a collaborative optimization strategy for CCHP systems. The objectives functions of optimization problem are also more diverse, involving operation costs, traditional energy and renewable energy consumption, pollutant emission and energy supply reliability. 8,34 An optimal dispatch strategy for integrated energy system with CCHP and wind energy is proposed. The objective function of the optimization model is to minimize the total operation cost of integrated energy systems. 35 An optimal scheduling strategy is studied considering photovoltaic power generation, combined cooling heating and power system, energy storage system and response load, and an optimization model for the economic operation of micro-grid is established to minimize the operating cost of micro-grid system and to make full use of clean energy by using distributed energy for demand response. 36 A multi-objective optimization model is built to maximize energy utilization rate, and to minimize carbon dioxide emission and total operation cost for a CCHP system with renewable energy. 37 A multi-energy management strategy is designed to maximize the social welfare and to balance the energy supply and demands. 38 The configuration and operation of the system are coupled and influenced by each other. Therefore, some researchers analyzed the coupling relationship between configuration and operation of the CCHP systems with renewable energy and optimized both capacity configuration and operation strategy simultaneously. Capacity configuration and operation strategy of the power generation unit (PGU) in a CCHP system are optimized for hotel, office, and residential buildings based on three sub-models from energetic analysis, economic operation, and environment effect viewpoints. 39 Optimal design and operation of a CCHP system comprising of a gas turbine, a steam generator with firedheat recovery, an electric chiller, an absorption chiller, and a natural gas-fired boiler have been investigated. The operation mode has been classified in three scenarios by the capacity of the gas turbine and the size of thermal and electric loads. 40 A mixed-integer linear programming (MILP) model for determining the optimal capacity and operation of seven systems with combined cooling, heating, and power (CCHP) is established. 41 A model for configuration optimization based on a bi-level construction method is established for a CCHP system coupled with multi-energy system. This optimization method has significant economic benefit, whose total annual operating cost can be reduced by 36.2% comparing with the traditional sub-system. 42 A scenario-based stochastic model of investment planning for multi-energy system with renewable energy is proposed to minimize the investment and operation costs as well as the carbon dioxide emissions. The optimal siting and sizing of distributed energy resource are determined in the isolated renewable energy systems. 43 A bi-level optimization methodology is proposed to address the design and operation of a combined desalination and standalone CCHP system. The system configuration with the minimum and maximum capacity of each unit is determined according to economic and environmental objectives. 44 A multi-objective nonlinear optimization model for capacity configuration is proposed with economic, environment, and energy objectives in the renewable energy system, and a novel operation strategy is presented considering the complementary characteristics of different energy sources. 45 These works focused on the optimization of operation and design of CCHP system and renewable energy system. In the operation optimization process, the optimization of operation strategy is mainly based on the balance relationship between supply and load of electric, cooling, and heating load, without considering the energy flow balance. Most of them mainly consider the economic index, energy utilization index, and environmental index of the system in the optimization model, but few of them consider both the index of the consumption of renewable energy and the supply reliability of electric, cooling, and heating load demand. The renewable energy system with CCHP contains multiple energy flows, and the capacity configuration and operating strategy directly affect energy flows in the system. For renewable energy systems with CCHP applied in isolated tourist areas, the user side demand only depends on the electricity, cooling, and heating supply within the renewable energy system. Among them, the renewable energy penetration index and system supply reliability index is important to achieve the system's clean energy and supply reliability.
In this paper, a renewable energy system with electric-heating energy storage is designed to supply electric, cooling, and heating load for local users in an isolated tourist area. An energy hub is established to concentrate and distribute electric energy flow and heating energy flow for balancing the supply and demand, based on the input and output characteristics of various devices in renewable energy system with photovoltaic electric power generation systems, winddriven generators, gas-driven generators, gas-fired boilers, electric chillers, electric, and heating energy storage devices. The coupling and balance relationship of electric and heating energy flow is established, and an optimized framework for collaborative capacity configuration of renewable energy system is presented from the perspective of energy flow.

SYSTEMS WITH ELECTRIC-HEATING ENERGY STORAGE AND CCHP
Considering an isolated tourist area, there is strong demand for electric load, heating load, and cooling load, and also need the coordination of cooling, heating, and power supply. There is a public natural gas pipe network near the tourist area, which can use natural gas to generate electricity and heat. The area is rich in solar and wind energy resources, which can be configured with photovoltaic power generation and wind power generation. A renewable energy system with CCHP is constructed for the isolated tourist area, which is mainly powered by electric power generation systems with renewable energy, CCHP systems, and energy storage systems. The architecture and energy flow of renewable energy system with CCHP are shown in Figure 1. It is mainly composed of five units: 1. Electric energy generation unit. Electric energy is mainly generated by wind-driven generators (WT), photovoltaic electric power generation systems (PV), and power generation units (PGU). 2. Heating energy generation unit. When the PGUs generate electricity, the waste heat can be recycled. The recovered waste heat from PGUs and the heat generated by gas-fired boilers supply the cooling and heating demand. 3. Energy conversion unit. The energy conversion unit includes a waste heat recovery system(HRS), an absorption chiller (AC), a heat exchanger (HE), and an electric chiller (EC). 4. Energy storage unit. The energy storage unit includes electric energy storage (EES) and heating energy storage (TES), which, respectively, achieve buffering of electric and heating energy flow of the system. 5. Energy output unit. The system outputs electric energy, cooling energy, and heating energy separately to meet the demand of electric load, cooling load, and heating load.

| Output model of renewable energy systems with CCHP
As shown in Figure 1, wind-driven generators, photovoltaic electric power generation systems, PGUs, and electric energy storage generate electricity synergistically to meet the electric demand in the renewable energy system with CCHP. The waste heat from PGUs can be recovered to meet the cooling and heating demand, and the gas-fired boilers flexibly supplements the insufficient heating energy of the system. The ratio of electric cooling to cool load is set to convert part of the cooling load into electric load. Electric and heating energy flow should meet load demand of electric, cooling, and heating in a renewable energy system with CCHP.
3.1.1 | Power and heat output model of the PGU The PGU in the CCHP system inputs natural gas and generates electric energy and heating energy at the same time.
It is the main device to couple the electric and heating energy flow in the renewable energy system with CCHP. The electric energy generation of the PGU is determined by the power generation efficiency and the amount of natural gas consumed, and the power generation efficiency is very low when the load rate is low. The power and heat output of the PGU can be estimated as 46 : where pgu and pgu,loss is, respectively, the generation efficiency and heat loss rate of the PGU, P t pgu and Q t pgu is the power and heat output of the PGU at time t, respectively, F t pgu is the fuel consumption of the PGU at time t, and L ng is the low calorific value of natural gas.

| Heat output model of gas-fired boiler
When the recovered waste heat from PGUs cannot meet heating and cooling load demand, the boilers supply the deficiency of heat. The heat generated from the boiler is related to the boiler efficiency, which can be estimated as follows 39 : where F t boi is the fuel consumption of gas-fired boiler at time t, Q t boi is the heat generated from the boiler at time t, boi is the boiler efficiency.

| Cooling output model of electric chiller and absorption chiller
The electric chiller converts electric energy into cooling energy. The absorption chiller converts heating energy into cooling energy. Their cooling output is related to their LINGMIN et aL coefficient of performance, which can be estimated as follows 47 : where COP EC and COP AC is the performance coefficient of electric chiller and absorption chiller, respectively, P t EC and Q t AC,in is electric energy consumed by electric chiller and heating energy consumed by absorption chiller at time t, respectively,Q t EC,out and Q t AC,out is the cooling output of electric chiller and absorption chiller at time t, respectively.

| Heating output model of heat recovery system and heating exchanger
The waste heat recovery system and heat exchanger provide users heating energy. The heating energy output of these units is related to their conversion efficiency, which can be estimated as follows 35 : where rec and he is the efficiency of the waste heat recovery system and heat exchanger, respectively, Q t pgu and Q t HE,in is the heating energy consumed by the waste heat recovery system and heat exchanger at time t, respectively, Q t rec and Q t HE,out is the heating energy output of the waste heat recovery system and heat exchanger at time t, respectively.

| Power output model of energy storage device
The output of wind-driven generators and photovoltaic electric power generation systems in renewable energy system with CCHP is intermittent and random. Using electric and heating energy storage device are effective way to increase the consumption of renewable energy and to increase control flexibility of electric and heating energy flow. Electric and heating energy storage devices can be used to store excess energy for backup supply when the electric energy and heating energy is surplus in the system. When the electric energy and heating energy is insufficient, the stored energy is released to meet the load demand at the user side. It is a device for buffering electric and heating energy. The state of charge (SOC) is an important specification, which determines the charge and discharge capacity of the energy storage. Since the charging and discharging characteristics of electric and heating energy storage device is similar, a unified model can be expressed as follows 48 : where SOC t ES,i and SOC t − 1 ES,i is the state of charge of energy storage device at time t and t −1, respectively, ES,loss,i is the self-discharge rate of the energy storage device, P t ESC, i and P t ESD, i is the charging and discharging power of energy storage device at time t, respectively, ESC,i and ESD,i is the charging and discharging energy efficiency of the type i energy storage device, respectively, u t ESC,i and u t ESD,i is the charging and discharging energy state of energy storage device at time t, respectively,S nom ES,i is the rated capacity of energy storage device.

| Energy flow balance relationship
In a renewable energy system with CCHP, as shown in Figure 1, there are multiple energy flows, such as solar energy flow, wind energy flow, natural gas flow, electric energy flow, heating energy flow and cooling energy flow, and multiple energy flows is coupled and interact with each other. Among these flows, electric and heating energy flow can be collected, distributed and converted to meet the load demand. It is the key to maintaining the safety and stability of the system by optimizing the balance relationship of electric and heating energy flow at all times. Therefore, it is possible to establish an energy hub with power and heat to concentrate and distribute the electric energy and heating energy flow.

| Balance relationship of electric energy flow
Photovoltaic power generation system is used to convert solar energy into electric energy, wind-driven generator is used to convert wind energy into electric energy, and PGU unit is used to convert natural gas into electric energy, which is collected in the energy hub. Energy hub is used to supply power to users and electric chiller units. The electric energy storage devices supplement insufficient electric energy and stores excess electric energy. The balance relationship of electric energy flow in the energy hub is formulated: x is the ratio of electric cooling energy to cool load, P t e and Q t c are the electric load and cooling load at time t, respectively, P t PV ,P t WT , and P t pgu are the power generated from wind-driven generators, photovoltaic electric power generation systems, and PGUs at time t, respectively, P chr,t EES and P dis,t EES are the charging and discharging power of electric energy storage devices at time t, respectively, u chr,t EES and u dis,t EES is the charging and discharging energy state of electric energy storage devices at time t, respectively.

| Balance relationship of heating energy flow
The other part of natural gas flow is converted into heating energy through gas-fired boilers, which can be collected in the energy hub and distributed for providing the needs of the user's cooling and heating load with the recovered waste heat from PGUs. The heating energy storage devices supplements insufficient heating energy and stores excess heating energy. The balance relationship of heating energy flow in the energy hub is formulated: where Q chr,t TES and Q dis,t TES are the charging heat and discharging heat of heating energy storage device at time t, respectively, u chr,t TES and u dis,t TES are the charging and discharging energy state of heating energy storage device at time t, respectively, and Q t h is the heating load at time t.

| Operation strategy for energy flow
In this section, based on the coupling and balance relationship between electric and heating energy flow, renewable energy penetration index, electric and heating energy supply reliability index is given, and energy flow control strategy is proposed.

| Renewable energy penetration index
The renewable energy penetration index reflects the system's ability to absorb renewable energy, but also directly affects the system's operating strategy and optimal configuration. Based on the coupling and balance relationship of electric energy flow in the renewable energy system with CCHP, the renewable energy penetration index is established as follows: where P t wast and P t loss is the remaining and shorting electric energy, which can be calculated as: where P t e,mag1 is the difference between the electric power generated from renewable energy and the equivalent electric load demand of the system at time t, and P t e,mag2 is the difference between the supply power and the equivalent electric load at time t.

| Energy supply reliability index
The energy supply reliability of the system is an important index for operation management of the system, which also affect the optimal configuration of renewable energy system. In the renewable energy system with CCHP, the electric, cooling, and heating demand of users can be satisfied through the distribution and conversion of electric and heating energy flow. Therefore, the loss of power supply probability (LPSP) and loss of heat supply probability (LHSP) can be established as the energy supply reliability index of renewable energy system with CCHP. According to the balance relationship of electric and heating energy flow in the system, the power supply reliability index and the heat supply reliability index is presented by: where Q t loss is the shortage of heating energy of the system at time t, which is calculated as follows: where Q t h,mag is the difference between the system heat supply and the equivalent heat demand at time t.

| Operation strategy for energy flow
For the renewable energy system with CCHP, the user load demand is completely satisfied by the energy generated from various distributed energy sources in the system. The power generation system with renewable energy does not consume fossil energy and does not produce polluting gas, but its output is intermittent and fluctuating. The PGUs can produce electric energy and heating energy simultaneously, but these energies are restricted and coupled with Flowchart of FEL strategy for renewable energy system with CCHP each other. The traditional CCHP system usually operates in two modes: FEL mode following electric load or FHL mode following thermal load. In some cases, in addition to meeting the load demand, there will be some surplus electric and heating energy. Gas-fired boilers can produce heating energy to supplement insufficient heating energy. Electric and heating energy storage device can be used for transferring electric energy and heating energy on the time axis. Based on the coupling, conversion, and distribution relationship of the energy flows and the input and output characteristics of various power generation units, heating power units, and conversion devices, an operation strategy is presented based on the FEL mode, as shown in Figure 2.
The operation strategy is given as followings: 1) Renewable energy is preferred for power generation, and electric chillers are integrated in the system. The ratio of electric cooling load to cool load is optimized, which can flexibly change the electric and heating energy flow of the system. The effective electric load of the system is defined as follows: 2) To avoid low generation efficiency of the PGU at low load rates, a threshold of load rate is set as an on-off coefficient of the PGU. Electric energy storage device is configured in the system. When the load rate is higher than the threshold, the PGU starts and tracks the effective electric load. Otherwise, the PGU does not start, and the electric energy storage device tracks the effective electric load.
3) The heating energy storage device is configured to absorb the excess heat produced by PGUs, reducing the remaining value of heating energy.
4) The supply reliability index for electric and heat load is optimized by coordinative control of the electric and heating energy flow.

FOR COLLABORATIVE CONFIGURATION
The capacity configuration provides the boundary for the operation, and the results of the operation provide the operation parameters and operation cost. This paper intends to establish a collaborative optimization model of system configuration for the renewable energy system with CCHP, and optimize the capacity configuration of main devices and operation strategy simultaneously, so that the system can minimize operation cost on the basis of satisfying energy supply reliability.

| Objective functions
The objective of the proposed optimization problem is to minimize the annual total cost (ATC) of the system, including the capital cost of the main devices and operation cost. The annual total cost is formulated as follows: The capital cost includes the initial investment cost and the installation cost of the main devices, which can be expressed by the following equation: where m is the number of main devices, C inv,i ,CAP i , and C ins,i are the unit capacity cost, installation capacity, and installation cost of the main devices, respectively, and R is the capital recovery factor defined by: where r is the interest rate, and n is the system lifetime.
The annual operation cost mainly includes the annual fuel cost and annual operation and maintenance cost, which can be expressed as follows: where C gas is unit price of natural gas;F boi and F pgu are the fuel consumed by gas-fired boilers and PGUs, respectively; K om is unit cost of operation and maintenance; i denotes the index of the device, which can be photovoltaic electric power generation systems, wind-driven generator, PGU, and gas-fired boiler; j denotes electric and heating energy storage devices.

| Constraint conditions
In addition to satisfying the balance relationship of the electric and heating energy flow, which is expressed in Equations (10)-(12), the objective function described in the Equation (23) for renewable energy system with CCHP is subjective to several constraints as follows. The installation capacity of wind-driven generators and photovoltaic electric power generation systems is limited by the environment, and the constraints of the installation capacity are formulated as follows: where CAP PV ,CAP min PV , and CAP max PV are the actual installation capacity, the lower and upper limits of installation capacity of photovoltaic electric power generation systems, respectively, CAP WT ,CAP min WT , and CAP max WT are the actual installation capacity, the lower and upper limits of installation capacity of winddriven generators, respectively.

| Constraints on the output power of the generation devices
The photovoltaic electric power generation systems, winddriven generators, PGUs, gas-fired boilers, electric chillers, and absorption chillers should operate at an output power limited by the lower power and the upper power: where P t PV and P nom PV are the output power at timet and the rated power of photovoltaic electric power generation systems, respectively, P t WT ,and P nom WT are the output power at time t and the rated power of wind-driven generators, respectively, P t pgu and P nom pgu are the output power at time t and the rated power of the PGUs, respectively, P t boi and P nom boi are the output power at time t and the rated power of gas-fired boilers, respectively, Q t EC and Q nom EC are the output power and the rated power of the electric chillers, respectively, Q t AC and Q nom AC are the output power and the rated power of the absorption chillers, respectively , is the threshold of the load rate of PGU.

| Constraints on charging and discharging of energy storage devices
The state of charge (SOC) of electric and heating energy storage devices must be constrained between the upper and lower limits of the SOC in each hourly time interval. The charging and discharging power of electric and heating energy storage devices must be within the allowable limits. The following constraints for SOC, charging, and discharging power must be satisfied in each hourly time interval: where SOC t ES is the state of charge (SOC) of energy storage devices at time t , SOC min ES and SOC max ES , respectively, represents the lower and upper limits of the state of charge of energy storage devices, P t ESC and P max ESC are the charging power at time t and the maximum charging power of energy storage devices, respectively,P t ESD and P max ESD is the discharging power at time t and the maximum discharging power of energy storage devices, respectively.

| Constraints on the load rate of the PGUs
In order to improve the power generation efficiency of the PGUs, the load rate of the PGUs should be not less than the threshold of the load rate: where f t pgu is the load rate of the PGUs at time t.

| Constraints on carbon emissions
In order to reduce the environment impact of renewable energy system with CCHP, the carbon dioxide emission should be minimized during system operation. The carbon dioxide emission (CDE) is mainly produced by natural gas fuel consumed by gas-fired boilers and PGUs, which can be estimated as: The carbon dioxide emission must be within the allowable limit: where gas CO 2 is conversion factor of carbon dioxide emission,CDE and CDE max are the actual value and the allowable limit of CO 2 emission, respectively.

| Constraints on energy supply reliability
In order to improve the reliable energy supply of renewable energy system with CCHP, the power supply reliability and heat supply reliability index of the system must meet the following constraints: where LPSP and LHSP are, respectively, the actual values of loss of power supply probability and loss of heat supply probability, while LPSP max and LHSP max are the prespecified upper bound of LPSP and LHSP, respectively.

| Constraints on renewable energy
penetration As a kind of clean energy, renewable energy does not emit polluting gas. However, the inherent intermittency and high unit investment cost of power generation system with renewable energy have hindered the large-scale integration of renewable energy. In order to increase the consumption of renewable energy and reduce the emission of pollutants, this paper sets the following constraints on the renewable energy penetration index: where r REP and r min REP are, respectively, the actual value and the prespecified lower bound of renewable energy penetration index in renewable energy system with CCHP.

| Solving method
The optimization model established in this paper is a mixedinteger nonlinear programming problem. Considering that the particle swarm optimization (PSO) 49,50 based on swarm intelligence has the advantages of fast convergence speed, fewer setting parameters, and high calculation efficiency in solving such optimization problems, the linearly decreasing weight particle swarm optimization (LPSO) is used to solve the optimization problems based on the operation strategy of energy flow. The implementation steps of solving the operation problem based on linearly decreasing weight particle swarm optimization (LPSO) are given as follows: Step 1. Initialization. Set the maximum number of iterations and the number of particles in the population. According to the number of variables in the optimization model, the dimensions of the particles are defined. Randomly initialize the position and velocity of each particle in the population.
Step 2. Evaluation of particle fitness. According to the goals and variables in the proposed optimization model, define the fitness function of the particles, and calculate the fitness of particles based on the system operation strategy shown in Figure 2.
Step 3. Finding of the personal best set p best and global best set g best . Store the current position and fitness of each particle in the personal best set p best of each particle. Compare the fitness of all current particles, and store the position and fitness of the particles with the optimal fitness in the global best set g best .
Step 4. Update of particle velocity and position. According to the personal best set p best of each particle and the global best set g best in the population, Equations (40)-(41) is used to update the position and velocity of each particle.
where is the inertia weight, c 1 and c 2 are cognitive coefficient, r 1 and r 2 are random numbers generated from a uniform distribution in [0,1],p p,i is the position of the ith particle in the personal best set p best ,p g is the position of the population in the global best set g best , v i (t ) is the velocity of the ith particle in the tth iteration, x i (t ) is the position of the ith particle in the tth iteration.
Step 5. Update of the weight. Update the weights according to the following formula: where max and min is the maximum and minimum inertia weight,and t max is the maximum number of iterations.
Step 6. Update of personal best set p best . According to the latest position of the particle, the fitness of each particle is recalculated, the current fitness of the particle is comparing with the historical optimal fitness, and the position and fitness of the particle with the optimal fitness is selected to update the personal best set p best .
Step 7. Update of global best set g best . Compare the current fitness of all particles with the historical fitness in the global best set g best , select the particle with the best fitness, and update the global best set g best .
Step 8. Judgement of iteration conditions. If the number of the iteration reaches the maximum number, the search stops and the result is output, otherwise it returns to step 4.

| Input data
In order to evaluate the optimization method of capacity configuration and operation strategy for renewable energy system with CCHP, an isolated tourist area in Western China is selected as the case study. The architecture of renewable energy system with CCHP applied in the isolated tourist area is shown in Figure 1, and the electric, cooling, and heating demand is simulated by using DeST software.
Considering the number of scenarios and the efficiency of calculation, the whole year is divided three typical seasons by clustering method, which is the summer season (112 days), spring and autumn transition season (143 days), and winter season (110 days). The unit capacity output of wind-driven generators and photovoltaic electric power generation systems, the electric, cooling, and heating load of representative day in three seasons is shown in Figures 3-5. It is assumed that the project has a service lifetime of 20 years and an interest rate of 0.067, and the scheduling interval for the operation is 1 hour. The main economic parameters and technical parameters of renewable energy system with CCHP are shown in Tables 1 and 2. [51][52][53] In order to evaluate the effectiveness of the proposed method, five scenarios representing different coupling relationships of energy flow is established, which is described in Table 3.
Scenarios 1: It is for a renewable energy system with CCHP that integrate photovoltaic electric power generation systems, wind-driven generators, PGUs, gas-fired boilers, electric energy storage device, heating energy storage device, electric chillers, absorption chillers, and heat exchangers. Power generation system with renewable energy and PGUs can generate electricity to provide the electric demand, and electric energy storage supply the insufficient electric demand. The recovered waste heat from PGUs and heat provided by boilers satisfy the heat demand for cooling and heating, and heating energy storage supply the insufficient heat demand. Scenarios 2: On the basis of scenario 1, the electric chiller is reduced, which represents a renewable energy system without coupling of electric and cooling load. Scenario 3: On the basis of scenario 1, the heating energy storage device is reduced, which represents a renewable energy system without buffer of heating energy flow. Scenario 4: On the basis of scenario 1, the electric energy storage device is reduced, which represents a renewable energy system without buffer of electric energy flow. The PGUs can be started at a low load rate due to the intermittent characteristic of renewable energy.
Scenario 5: It is for a separation production (SP) system. Power generation system with renewable energy and electric energy storage device is used to supply the electric load,  while boilers are used to generate heat to supply the cooling and heating load. Table 4 and Figure 6 show the capacity configuration results and the cost of five scenarios. It can be found that the capacity configuration and annual total cost of scenario 1, scenario 2, scenario 3, and scenario 4 is less than those of the scenario 5. On one hand, due to flexible generation of electricity, PGUs can make up for the lack of intermittence of renewable energy, which reducing the installed capacity of electric energy storage devices. On the other hand, the waste heat from PGUs can be recovered for cooling and heating, which reducing the capacity configuration of the boilers. In scenario 5, independent units of electric and heating generation are used to supply electric, cooling, and heating load, so the installed capacity of power generation system with renewable energy units, electric energy storage devices, and boilers is high, and the investment cost is much higher than other scenarios. Although renewable energy does not consume fuel for power generation, and its fuel cost is the lowest, but its higher investment cost leads to the worst economy.

| Analysis of capacity configuration optimization
In scenario 1-4, the difference in investment cost is not large. But the fuel cost in scenario 1 is the lowest, so the annual total cost is the lowest. The proportion of fuel cost in the annual total cost in scenario 1 and scenario 3 is lower than that of scenario 2 and scenario 4.
Compared with scenario 2, scenario 1 adds electric chillers, which can flexibly change the proportion of electric and cooling load in the system. Therefore, the capacity configuration of wind-driven generators and photovoltaic electric power generation systems in scenario 1 increases by 4.3%, while the capacity of boiler decreases by 30.7%, the fuel cost decreases by 12.1%, and the annual total cost decreases by 6.2%.
Comparing with scenario 1, scenario 3 does not contain heating energy storage devices. When PGUs operate under operation strategy of FEL, and the cooling and heating load is low, part of the recovered heat from PGUs may be remained because there are no heating energy storage devices to buffer the excess heating energy flow. Therefore, the boiler capacity increases by 5.4%, and the fuel cost and annual total cost increases by 1.7% and 1.4% in scenario 3.
Comparing with scenario 1, scenario 4 does not contain electric energy storage devices. In the absence of electric energy storage devices, the capacity configuration of the PGUs increases by 25.4%, and the PGUs need to operate at a lower load rate to meet the power balance when the renewable energy generation units do not contribute or contribute less. When the PGUs operate at a lower load rate, the efficiency is low, so the fuel cost increases by 20.4%, and the annual total cost increases by 2.4% in scenario 4.

T A B L E 3 Description of five scenarios
By comprehensive comparison, scenario 1 yields the best performance with the optimal capacity configuration and the operation economy due to the coupling of electric, heat, and gas energy flow and the flexible conversion of electric and cooling load.

| Electric and heating energy flow analysis in renewable energy system with CCHP
For renewable energy system with CCHP, the electric, cooling, and heating demand relies only on the different energy flow in renewable energy system. Among them, the collection, distribution, and conversion of electric and heating energy flow is the key to energy flow optimization. Taking the operating conditions on representative days as an example, the electric and heating energy flow in renewable energy system with CCHP under the conditions of coordinative optimization of capacity configuration is analyzed.

| Electric energy flow on
representative days Figure 7 shows the electric energy flow on representative day in summer. From 1:00 am to 2:00 am, the photovoltaic electric power generation systems do not contribute for energy. The output of the wind-driven generators cannot meet the demand of the electric load, and electric energy storage devices discharge energy to make up for the energy shortage. From 3:00 am to 6:00 am and 20:00 pm to 22:00 pm, the wind-driven generators and PGUs work together to meet the needs of the electric load. From 7:00 am to 19:00 pm, photovoltaic electric power generation systems begin to contribute energy, and the power required in the system is preferentially provided by power generation systems with renewable energy. Meanwhile, the insufficient power is mainly meet by the electric output of the PGUs. If the insufficient power does not reach the threshold of the load rate of the PGUs, the electric energy storage devices are discharged to meet the insufficient power. During certain time periods, when the PGUs are running at the rated power, it still cannot meet the electric load demand and the electric energy storage devices are discharged. From 23:00 pm to 24:00 pm, the photovoltaic electric power generation systems do not contribute energy. The output of the wind-driven generators can not only meet the demand of the electric load, but also charge the electric energy storage devices. Figure 8 shows the electric energy flow on representative day in transition season. During the transition season, the wind speed is small during the day, and the PGUs operate T A B L E 4 The optimal capacity of main devices in five scenarios

scenario PV (kW) WT (kW) PGU (kW) Boiler (kW) EES (kWh) TES (kWh)
The ratio of electric cooling to cool load almost all day. From 11:00 am to 15:00 pm, the wind-driven generators produce almost no output power. At this time, the sunlight intensity is high, and the photovoltaic electric power generation systems and PGUs work together to meet the demand of the electric load, and the electric energy storage devices discharge to supplement the insufficient power. From 18:00 pm to 20:00 pm, the wind-driven generators produce no power, and photovoltaic electric power generation systems hardly contribute energy. PGUs run at full load, and electric energy storage is discharged, despite this, the system still has a small amount of energy shortage. From 1:00 am to 6:00 am, the electric load is low. The output of the wind-driven generators contributes most of the electric load. The maximum load rate of the PGUs during this period is only 0.33. In general, during the day, the electric demand is mainly met by the PGUs and photovoltaic electric power generation systems. At night, the electric load demand is mainly met by PGUs and wind-driven generators. The electric energy storage is charged at night when wind-driven generators have excess power, and discharged during the peak load period during the day. Figure 9 shows the electric energy flow on representative day in winter. The wind speed is large in day in winter, from 8:00 am to 17:00 pm during the day, the output of the wind-driven generators and photovoltaic electric power generation systems can meet the electric load demand, and PGUs do not start, and the remaining power charges the electric energy storage devices. The PGUs only run at the rated power at 19:00 pm and 21:00 pm, and the electric energy storage devices are discharged simultaneously. At 2:00 am-5:00 am, 22:00 pm-24:00 pm, the wind-driven generators and photovoltaic electric power generation systems produce almost no power. The output power of PGUs meet the demand of electric load. Due to the low electric load during this period, the load rate of the PGUs is between 0.27 and 0.57. In general, wind-driven generators and photovoltaic electric power generation systems have a large output power and contribute most of the electric load of the system in winter.
Through flexible power regulation, PGUs can not only generate power in a complementary manner by using power generation systems with renewable energy and electric energy storage devices, but also provide backup capacity for the system. 5.3.2 | Heating energy flow on representative days Figure 10 shows heating energy flow on representative day in summer. At 3:00 am-5:00 am, 8:00 am-9:00 am, 14:00 pm-22:00 pm, The PGUs operate due to the need to meet the electric load demand, and the waste heat is recovered by heat recovery system (HRS). The recovered waste heat from PGUs and the heat output of the boilers together meet the demand of equivalent cooling load. From 6:00 am to 7:00 am, the recovered waste heat from PGUs provides the equivalent cooling load demand, and the remaining amount is stored in the heating energy storage devices. From 10:00 am to 13:00 pm, the PGUs is not started, the boilers run at the rated power, and the heating energy storage devices are discharged, the system still has insufficient heat, and some cooling load is not met. Figure 11 shows the heating energy flow on representative day in transition season. In the transitional season, the heating load demand is relatively small. From 16:00 pm to 24:00 pm, the boilers are not started. The recovered waste heat from PGUs can not only meet the heating load demand and charge the heating energy storage devices, but also generate some remaining heat. From 3:00 am to 15:00 pm, the recovered waste heat from PGUs cannot meet the demand of equivalent heating load, the boilers are started to supplement the insufficient heat. Due to the relatively low heating load demand in the transition season, the load rate of boiler is lower than 0.6 throughout the day. Figure 12 shows the heating energy flow on representative day in winter. Under FEL operation strategy, from 8:00 am-17:00 pm during the day, the PGUs is not started, the boilers run at the rated power, and the heating energy storage devices discharge. In some time periods, it still cannot meet the heating load demand, and the system has a lack of heat. At 2:00 am-4:00 am, 22:00 pm-24:00 pm, the heating load is low, the recovered waste heat from PGUs supplies most of the equivalent heating load, the boilers supplement insufficient heat, and the load rate of boilers is low. From 19:00 pm to 21:00 pm, the recovered waste heat from PGUs can not only meet the requirements of the equivalent heating load, but also charge the heating energy storage devices. At 21:00 pm, 33.7 kW heat power is remained. In general, the heating load demand in winter is large in day, and the heating load is mainly supplied by the boilers in the day.

| Analysis of the influence of the coupling of electric and heating energy flow on system operation
In the renewable energy system with CCHP shown in Figure 1, the PGUs generate electric and heating energy simultaneously, which is coupled and restricted to each other. The electric and heating energy storage devices can decouple the relationship between electric and heating energy flow. The electric chillers can flexibly change the ratio of the electric and cooling load, thereby changing the electric and heating energy flow of the system. In order to investigate the effects of coupling relationships of different energy flows on system operation and capacity configuration, various operational indicators of the system in four scenarios are studied. Figure 13 illustrates some operational indicators of scenario 1 and scenario 2 on representative day in summer. Since the wind-driven generators and photovoltaic electric power generation systems work at the maximum power point, when the output power of the wind-driven generators and photovoltaic electric power generation systems are greater than the equivalent electric load demand, part of the power generated from renewable energy is remained. It can be seen that in certain periods, such as 10:00 am, 11:00 am, 13:00 pm part of the power generated from renewable energy is remained in the system in scenario 1 and scenario 2, and the remaining of the power generated from renewable energy in scenario 1 is less than that in scenario 2. It can also be found that the power generation and penetration index of renewable energy in scenario 1 is higher than that in scenario 2. This is mainly due to the fact that the electric chillers added in scenario 1 cause a flexible increase in electric energy flow and a flexible decrease in heating energy flow in the system, thereby absorbing more renewable energy and reducing the remaining of power generated from renewable energy.   Figure 14 shows the remained heating energy in scenario 1 and scenario 3 on three representative days. When the recovered waste heat from PGUs in the system is greater than the equivalent heat demand, part of the heat will be remained. Especially in the transition season, the PGUs operate almost all day, the heat demand in the transition season is low, and a lot of remained heat is generated during the peak period of the electric load, so there is a lot of remained heating energy in scenario 1 and scenario 3. In scenario 3, there are no heating energy storage devices. When the heat required by the cooling and heating load in the system is smaller than the recovered waste heat from PGUs, which operating under the FEL operation strategy, all the waste heat is remained, so the remained heat is much higher than that in scenario 1. Figure 15 demonstrates the comparison of some operational indicators on three representative days in scenario 1 and scenario 4. It can be seen that the PGUs in scenario 1 is switched off at a low load rate, and the electric energy storage devices supply the electric load demand. However, since there are no electric energy storage devices configured in scenario 4, the PGUs need to operate even at a low load rate when the equivalent electric load is small. The PGUs operate almost all the day in scenario 4, and the PGUs operate at a load rate of less than 0.3, which reaching 37.7%. The capacity configuration of the wind-driven generators in scenario 1 and scenario 4 is similar. Since photovoltaic electric power generation systems do not contribute energy at night, the renewable energy generation rate at night is similar in both scenarios. However, during the daytime, the output power of the photovoltaic electric power generation systems in scenario 1 is higher, and renewable energy generation rate is also higher than that in scenario 4. Within a certain time period, the renewable energy generation rate reaches a maximum of 1 in scenario 1.

| CONCLUSIONS
In this paper, a renewable energy system with CCHP applied in an isolated tourist area integrating photovoltaic electric power generation systems, wind-driven generators, PGUs, gas-fired boilers, electric chillers, electric and heating energy storage devices is described. Based on electric and heating energy flow, an optimized framework for collaborative configuration is proposed to address the design and operation of the renewable energy system. Five scenarios were designed for evaluating the optimization method in the case study, and the main conclusions can be drawn as follows: The PGUs not only realize the cascade utilization of energy, but also make up for the shortcomings of intermittent wind and solar energy through flexible power regulation, so the renewable energy system with CCHP yields better performance  than the separation production (SP) system. Comparing with the other three renewable energy systems, renewable energy system with electric chillers, electric and heating energy storage devices achieve relatively better performance in the capacity configuration and energy supply reliability indexes. The establishment of an energy hub with power and heat can simplify the analysis of multiple energy flows in the system and clarify the relationship between supply and demand through the concentration and distribution of electric and heating energy flow. The energy supply reliability index based on electric and heating energy flow can indicate the reliability of electric, cooling, and heating supply.
Electric chillers can change the electric and heating energy flow flexibly. Integrating electric chillers into the renewable energy system with CCHP and optimizing the ratio of electric cooling to cool load can increase the consumption and penetration of renewable energy, and reduce the remaining power of renewable energy.
Configuring a certain amount of electric and heating energy storage devices can alleviate the real-time balance of supply and demand. Under the FEL operation strategy, the renewable energy has priority for generation. The electric energy storage not only reduces the remaining of power generated from renewable energy, but also flexibly supply the insufficient electric energy caused by the intermittent and volatile nature of renewable energy, and prevents PGUs from operating at a lower load rate. The heating energy storage devices can store some excess heat, reduce the remaining of heat and improve the utilization of primary energy, when the recovered waste heat from PGUs is greater than the cooling and heating load requirements, especially in the transition season.