A multi-energy microgrid configuration method in remote rural areas considering the condition value at risk

The uncertainty caused by the growing use of renewable energy sources, such as wind and solar energy, makes it difficult to forecast the operation costs of micro-energy systems, particularly those in remote rural areas. Motivated by this point, this paper analyzes the possible operational risks and then introduces Condition Value at Risk (CVaR) to quantify the cost of the operational risk. On this basis, stochastic programming based on a multi-energy microgrid planning model that minimizes the investment cost, the operating cost, and the cost of operational risk, while considering the physical limitations of the multi-energy microgrid, is presented. Especially, scenarios of wind and solar energy output are generated using the Latin hypercube sampling method and reduced using the crowding measure-based scenario reduction method. After piecewise linearization and second-order cone relaxation, the model proposed in this paper is processed as a mixed integer linear model and solved by CPLEX. According to the achieved typical scenarios processed by the reduction method, the simulation shows that the presented configuration model can balance the investment cost and the cost of the operational risk, which effectively enhances the system’s ability to cope with uncertainties and fluctuations. Moreover, by adjusting the risk preference coefficient, the conservativeness of the planning scheme can be correspondingly adjusted.


Introduction
It is pointed out that the power industry is one of the largest sources of greenhouse gases (Wang et al., 2020). During the production process, conventional generators produce a large amount of carbon emission. In this context, due to the outstanding environmental protection characteristics of renewable energy sources (RES), the penetration of RES is rapidly increasing. However, the uncertainty and volatility of RES output will lead to unpredictable blackouts (Mahzarnia et al., 2020), which greatly challenges the resilience of the power system. These unpredictable power outages will bring potential safety and economic risks to the system's operation. It is pointed out that reasonable configuration of various devices in the multi-energy microgrid can give full play to its multi-energy complementary characteristics (Li et al., 2021a;Wang et al., 2021;Wang et al., 2023).
Consequently, the risks in the system operation decreased, and the economy and resilience of the system are improved.
To make full use of the advantages of multi-energy microgrids and further explore their potential, it is particularly important to develop the proper allocation method of the equipment capacity. In terms of frequency regulation, Chen et al. (Chen et al., 2021a) proposed a distributionally robust model to allocate the capacity of the energy storage systems in microgrids. However, the economic advantages of research results have not been analyzed. Leveraging the multi-energy complementary characteristics, Ding et al. (Ding et al., 2022) proposed an energy storage capacity allocation method in a multi-energy microgrid, which realizes a balance between the investment cost and the operating cost. Further, Alraddadi et al. (Alraddadi et al., 2021) proposed a distribution network expansion planning model, which considers the assets including transmission lines, photovoltaic (PV) plants (centralized and distributed PV), wind farms (WT), energy storage stems, and combined cycle gas turbines. The presented model verifies the positive effects of the joint planning multiple types of assets on promoting renewable energy accommodation. Based on the energy supply-demand responses, Li et al. (Li et al., 2021b) proposed a bi-level optimal configuration model to realize the economically optimal operation under typical scenarios. Additionally, Barik et al. (Kumar Barik and Das, 2021) proposed a comprehensive resource optimal allocation method for microgrids considering energy storage systems and electric vehicles. To further promote the utilization of multiple energy sources in microgrids, Chen et al.  presented an allocation method focusing on those multi-energy microgrids which are equipped with ground source heat pumps and electric heaters. In view of the principles of heating supply priority (Lin et al., 2017), Shen et al. (Shen et al., 2022) built an optimal capacity allocation model for the equipment in multi-energy microgrids. Although extensive studies have been done to reasonably allocate the equipment, the volatility and uncertainty of RES are not considered in the configuration process.
To cope with volatility and uncertainties caused by RES and loads, a closed-loop predict-and-optimize framework was presented by Chen et al. (Chen et al., 2021b) to improve the accuracy of load forecasting. Further, a novel ultra-short-term wind power forecasting model  is applied and a short-term load forecasting method base on machine learning (Lin et al., 2022) is explored. Nevertheless, even the most advanced algorithm still cannot fill the gap of prediction errors. To solve the problem of low accuracy of single-point load forecasting, Lei et al. (Lei et al., 2021) proposed a multi-stage scenario tree generation method based on the conditional generative adversarial network-random forest-Markov chain. However, the large number of RES scenarios directly leads to an increase in the computational cost. Therefore, it is necessary to apply appropriate scene reduction methods (He et al., 2023) to get typical scenarios and the occurrence probability of each scenario.
To further reduce the impact of uncertainties, Zhang et al. (Zhang et al., 2019) tried to explore better operation strategies by minimizing the expectation of the operating cost under an ingeniously constructed ambiguity set. The study effectively integrated the advantages of stochastic optimization and traditional adjustable robust optimization. However, the generated scheme is too conservative. From the perspective of the electricity market, Hasankhani et al. (Hasankhani and Hakimi, 2021) proposed a stochastic management algorithm, which clarified the interactions between microgrids and electricity markets. Further, considering the uncertainties from the carbon trading market, Wang et al. (Wang et al., 2022) successfully built a two-stage stochastic programming model. It is noted that taking uncertainty into account at the planning stage can effectively improve the resilience and operational economy of the system. With that in mind, Liu et al. (Liu et al., 2020) proposed a twolayer collaborative planning model for multi-energy microgrids. Yan et al. (Yan et al., 2021) built a planning method that combines fuzzy multi-objective decision-making and two-stage adaptive robust optimization. On this basis, Chitalia et al. (Chitalia et al., 2020) further proposed a multi-stage stochastic planning model considering the uncertainty and the construction time. This model can effectively reduce the number of idle facilities and is beneficial to cost recovery, increasing the revenue of the energy center, and carbon reduction.
Furthermore, Conditional Value at Risk (CVaR), a commonly used concept in the financial sector, is introduced to quantify the uncertainty and the corresponding risk cost . Considering the uncertainties of RES and the charging and discharging behaviors of electric vehicles, Tang et al. (Huiling et al., 2021), proposed an energy risk management model based on CVaR. Xuan et al. (Xuan et al., 2021) measured the potential risk loss using CVaR in the operation scenarios of the multi-energy microgrid. In terms of operating strategies, an operation coordination model of the multiple multi-energy microgrids is proposed by Xuanyue et al. (Xuanyue et al., 2022), which took active and passive demand responses and CVaR into consideration. Based on CVaR, Li et al.  explored energy trading methods of grid-tied multi-energy microgrids participating in the market, which provides a novel view in dealing with uncertainties. In addition, CVaR is also quite vital in the configuration process. Cao et al. (Cao et al., 2021) proposed an effective risk-averse strategy for energy storage systems configuring. However, in a multi-energy system, it is far from enough to only get the energy storage configuration scheme that takes into account the risk. Therefore, it is quite necessary to obtain the proper capacity of various equipment with the consideration of CVaR.
To summarize, existing strategies for coping with uncertainties in multi-energy microgrids or integrated energy systems, such as stochastic optimization and robust optimization, are generally effective. However, approaches for mitigating the risks associated with uncertainty in the configuration process are extremely limited. Furthermore, after taking CVaR into consideration, the mechanism for configuring the capacity of each device in the multi-energy microgrid must be investigated. With a focus on the aforementioned issues, this paper presents a multi-energy microgrid planning model that minimizes the investment cost, the operating cost, and the cost of operational risk. Latin hypercube sampling method and crowding measure-based scenario reduction method are also employed to generate and reduce the scenarios that simulate the uncertainty of renewable energy inside the multi-energy microgrid. The numerical simulation verifies the effectiveness of the presented model.

2
The structure and equipment modeling of the multi-energy microgrid 2.1 The structure of the multi-energy microgrid The structure of the multi-energy microgrid studied in this paper is shown in Figure 1. It consists of a variety of equipment including wind turbines, photovoltaics, fuel cells, gas turbines, gas boilers, heat pumps, and energy storage systems. The multi-energy microgrid imports energy relying on the power injection and natural gas inflow respectively from the external power grid and natural gas grid, while supplying its electrical and thermal loads.

2.2
The equipment modelling in the multienergy microgrid

Photovoltaic
The power generation of Photovoltaics (PV) is greatly affected by weather and environmental conditions, and mainly depends on solar irradiance and the ambient temperature. Based on research (Chen et al., 2021a), the power output of a PV array can be modeled as in (1): where P PV (kW) is the actual power output of the PV array; G (W/m2) represents the solar irradiance; P PV,N (kW) is the maximum power output under the standard test condition; K p (%/°C) is the temperature coefficient of power; T cell (°C) is the actual surface temperature of the PV array; and T cell,STC (°C) is the PV surface temperature under the standard test condition, which is usually set as 25°C.

Wind turbine
Wind turbines (WT) capture the kinetic energy of the wind with their blades to make rotors rotate to create a magnetic field and finally generate electrical energy. Based on research (Chen et al., 2021a), a wind turbine's power output is mainly related to the wind speed and can be modeled as in (2): where P WT (kW) and P WT,N (kW) are the actual output power and maximum power output of the WT; v (m/s), v in (m/s), v N (m/s), and v out (m/s) are respectively the actual wind speed, cut-in wind speed, rated wind speed, and cut-out wind speed.

Fuel cell
Fuel cells (FC) convert chemical energy in fuels such as natural gas, methane, and hydrogen into electricity (Lu et al., 2022). The power output of a fuel cell is modeled as in (3): where P FC (kW) is the output power of the FC; η FC represents the power generation efficiency; F FC (m³/s) is the natural gas inflow to the FC; and Q LHV is the lower calorific value of natural gas, which is a constant parameter and set as 9.7 kW/m³.

Gas turbine
Gas turbines (GT) simultaneously generate electricity and heat by combusting gasoline, natural gas, hydrogen, or other fuels. The output of a gas turbine is modeled as in (4) considering natural gas as the fuel: where P GT (kW) and H GT (kW) are the electrical power and thermal power output of the gas turbine; η GT,e and η GT,h respectively represent the power generation and heat production efficiencies; and F GT (m³/s) represents the natural gas inflow to the gas turbine.

Heat pump
Heat pumps (HP) driven by electrical motors that consume electricity can transfer the thermal energy from a low-temperature object to a high-temperature object without consuming additional primary energy. Referring to research (Huiling et al., 2021), the thermal power output of a head pump is modeled as in (5): where H HP (kW) represents the thermal power output of the HP; η HP represents the heat production efficiency of the HP; P HP (kW) denotes the electrical power input of the HP.

Gas boiler
Gas boilers (GB) consume natural gas, liquefied gas, and others as the fuel to produce heat and are currently the most common heating equipment. Referring to research (Xuanyue et al., 2022), the thermal power output of a gas boiler can be modeled as in (6) with natural gas being the fuel: where H GB (kW) represents the thermal power output of the GB; η GB represents the heat production efficiency of the GB; F GB (kW) denotes the natural gas inflow to the GB.

Energy storage system
Energy Storage Systems (ESSs) can shift energy consumption and the model of a typical ESS is shown as in (7); (8) . Constraint (7) represents the energy evolution of the ESS. Constraint (8) guarantees that the stored energy of the ESS at the initial time interval is equal to that at the terminal time interval in the scheduling time horizon. In constraints (7) and (8), E ESS t (kWh) is the stored energy at time interval t. P ESS,chr t (kW) and P ESS,dis t (kW) are respectively the charging and discharging power during time interval t. η ESS,chr and η ESS,dis are corresponding charging and discharging efficiencies. Δt represents the timespan of a time interval.
3 Risk analysis and quantification of the cost of operational risk

Risk analysis
The inherent uncertainty of renewable energy resources makes the difficulties to accurately predict the outputs of the multi-energy microgrids, which may lead to deviations between the actual and scheduled power outputs during the operation phase. Consequently, the following risks may occur: 1) With a large installed capacity of renewable energy resources, wind and solar energy curtailment is prone to occur due to the excessive generation capacity. 2) With a low installed capacity of renewable energy resources, the multi-energy microgrid is prone to purchasing high-priced energy from external systems and even load shedding due to energy shortage. 3) With a certain installed capacity of renewable energy resources, if the planned capacity of multi-energy conversion equipment is insufficient, the system will lack operational flexibility, possibly causing wind and solar energy curtailment during load peaks and load shedding during load valleys. 4) If the planned capacity of multi-energy conversion equipment is redundant, although wind and solar energy curtailment and load shedding can be avoided with the excessive system operational flexibility, the investment cost will dramatically increase.
The above-mentioned risks that potentially occur during the operation phase of the multi-energy microgrid will be caused by an unappreciated capacity scheme of the equipment and the uncertainty of renewable energy. These risks occur with some probabilities. The probability of risk occurrence and the corresponding degree of loss jointly characterize the cost of operational risk that needs to be considered in the planning phase of the multi-energy microgrid. Therefore, CVaR is employed to quantify this cost of the operational risk.

CVaR based cost of operational risk quantification
CVaR is an improved variant of Value at Risk (VaR) (Roustai et al., 2018). VaR is widely used in the financial sector to express the maximum possible loss of an investment portfolio over a specified period of time in future at a certain confidence level. It can be expressed as in (9) and (10). In (9), X represents the decision variable in an investment portfolio and ξ represents a random variable. For a given X, namely given the investment portfolio, Ψ(X, ·) represents the probability distribution function of the investment loss f(X, ξ). Formula (10) defines VaR, where α represents a confidence level, which is usually set close to 1; α 0.9, for example.
VaR α min y Ψ X, y ≥ α To make up for the shortcomings of VaR, such as high computational complexity and insufficient tail risk consideration, an improved variant of VaR, namely CVaR, was proposed (Wu et al., 2018). This index is defined as the loss that exceeds the mean value of VaR at a certain confidence level. Compared to VaR, CVaR can take the tail risk of the investment portfolio into consideration and effectively evaluate the loss degree when the worst case occurs. In general, CVaR is more comprehensive and conservative than VaR (Gao et al., 2015). CVaR can be expressed as in (11), where p(·) represents a probability density function. CVaR Based on the definition of CVaR, the planning scheme and the corresponding cost are considered as "investment portfolio", and the operating cost that contains penalties are seen as "possible losses". Thereby CVaR can be adopted to describe the cost of the operational risk of a certain planning scheme, as shown in Figure 2. In terms of The risk of the operating cost.

Frontiers in Energy Research
frontiersin.org the formulation, in (11), the variable X represents the planning scheme of the equipment in the multi-energy microgrid; ξ represents the output of wind and solar energy resources with randomness; and f(X, ξ s ) represents the system operating cost with the planning scheme X and the wind and solar output scenario ξ s . Based on research (Lu et al., 2022), CVaR α can be calculated by solving the purpose-built optimization problem (12). The optimal objective is CVaR α and the solution to z is VaR α .
4 Multi-energy microgrid planning model considering the cost of operational risk

The objective of the planning model
The planning model built in this paper introduces WT and PV output as random variables, which belongs to Wait-and-See model (Li et al., 2016;Cao et al., 2021). To obtain several scenarios with probability, the scenario analysis method is utilized to discretize its probability distribution.
The objective of the multi-energy microgrid planning model, formulated as in (13), is to minimize the sum of the annual investment cost, the annual operating cost, and the cost of the operational risk. Among them, the cost of the operational risk is represented by CVaR. In (13), C INV is the equivalent annual investment cost of the multi-energy microgrid converted from the total investment cost. C OP is the expected value of the annual operating cost. C OP,CVaR is the CVaR value of the annual operating cost, which characterizes the cost of the operational risk of a certain planning scheme. w is defined as the risk preference coefficient that indicates the decision maker's preference of the risk. The higher the value of w is, the higher the acceptability of the risk is. Intuitively, a lower w indicates low acceptability of risk, which means the decision maker is more conservative.

Investment cost
Due to the differences in service life of different equipment, to take the influence of equipment service life into account in the investment cost, the net annual value method is adopted to convert the whole life cycle cost of the equipment to the equivalent annual investment cost. C INV is calculated as in (14): where k denotes the equipment index; c k denotes the per kW investment cost of equipment k; Cap k denotes the planned capacity of equipment k; r is the discount rate; and L k is the service life of equipment k.

Operating cost
The operating cost of the multi-energy microgrid, formulated as in (1), consists of energy purchase cost, maintenance cost, renewable energy curtailment penalty, and load shedding penalty. In (1), s is utilized to index the scenarios and d to index the typical days. C BUY s,d , respectively represent energy purchase cost, maintenance cost, renewable energy curtailment penalty, load shedding penalty in scenario s of typical day d. p(s) denotes as occurrence probability of scenario s; N d denotes the duration of typical day d. F Grid s,d,t and P Grid s,d,t are respectively the natural gas and electrical power purchased from the external nature gas grid and power grid at time interval t in scenario s of typical day d. J G and J E t denote the natural gas price and the electricity price, in which the former is a constant and the latter is a time-of-use price. R k is the maintenance cost coefficient of equipment k. P k s,d,t and H k s,d,t are the power and thermal power outputs of equipment k at time interval t in scenario s of typical day d. P ESS,chr s,d,t and P ESS,dis s,d,t are the charging and discharging power of the ESS at time interval t in scenario s of typical day d. P AB s,d,t and H AB s,d,t respectively represent the electrical energy and heat curtailment at time interval t in scenario s of typical day d. ξ E , ξ H , δ E , and δ H respectively denote the penalty prices of electrical energy curtailment, thermal energy curtailment, electrical load shedding, and thermal load shedding.

Cost of operational risk
The cost of the operational risk is denoted by C OP,CVaR and can be calculated as in (16): where C OP,VaR represents VaR value of the annual operating cost. α represents the confidence level. An auxiliary variable κ is introduced to equivalently linearize (16) as (17) and (18):

.1 Capacity constraints of equipment
The upper bound of the plannable capacity of the equipment may be affected by the available space, the lower bound may be affected by the minimum installed capacity of the equipment. Therefore, the model should include the plannable capacity constraints of the equipment: where Cap k, min and Cap k, max indicate the upper and the lower bounds of the plannable capacity of equipment k. Binary variable u k,INV indicates whether the equipment k is planned.

Power output constraints
All types of the energy generation equipment should meet their output upper and lower bounds: where χ k, max and χ k, min are the ratios of the output upper and the lower bounds to the capacity of the equipment k. The indicators are set as 1 and 0.1 in this paper. Cap k represents the capacity of equipment k. Binary variable U k t represents the ON/OFF status of the equipment k at time interval t. U k t = 1 means ON and U k t = 0 means OFF.

Charging and discharging constraints of the ESS
The ESS should meet its power upper and lower bounds of charging and discharging and its energy storage capacity bounds: where Cap ESS represents the capacity of the ESS. χ ESS, max Cap ESS and χ ESS, min Cap ESS set the upper and the lower bounds of the charging and discharging power of the ESS. χ ESS, max and χ ESS, min are set to 0.5 and 0 in this paper. Soc max and Soc min denote the upper and the lower bounds of the state of charge of the ESS. They are respectively set as 90% and 10%. E ESS s,d,t represents the stored energy at time interval t in scenario s of typical day d.

Capacity limitations of interconnection transformer and pipelines
The multi-energy microgrid is connected to the external power grid and the natural gas grid through interconnection transformers and pipelines. The power injection and nature gas inflow from the external grids are limited by their capacities as in (26), where P Grid, max is the upper bound of the power injection and F Grid, min is the upper bound of the nature gas inflow.

Multi-energy flow and balance model
The multi-energy power flow and balance model adopted in this paper refers to research . This model includes an AC power flow model, a steady-state natural gas flow model, and a simplified thermal energy model that ignores the delay of the thermal transfer and the heat loss during the heat transfer process.

Solving methodology
The model building and solving process of the presented planning model is shown in Figure 3.
Firstly, according to the historical wind speed, and solar irradiance, and load data, the wind power, photovoltaic and load curves, and their prediction error distributions are obtained. And then, on this basis, a large number of scenarios are generated leveraging Latin hypercube sampling method to simulate the uncertainty of wind and solar energy. These generated scenarios are then reduced with the crowding measure-based scenario reduction method to an appropriate number: For any two scenes X i and X j (i ≠ j), the distance between these scenes can be modeled: The intensive distance of X i can be formulated as:

FIGURE 3
The model building and solving process.

Frontiers in Energy Research
frontiersin.org where a and b are the numbers of the scenes most close to the scene X i , d ia and d ib are the corresponding distances. The importance of scene i is defined as: where p i is the probability of the appearance of scene i. Then, calculate all I s, and eliminate the scene with the minimum I. Update the probability of X a and X b by (30): Repeat the above process until the number of remaining scenes meet the requirements.
Afterwards, the data and settings including the risk preference coefficient of the model, the equipment parameters, and the grid parameters are input into the proposed model. After the solution of the model, the planning scheme can be obtained.

The case setup
The presented model is verified using the multi-energy microgrid which is shown in Figure 4. Plannable devices include ESS, GT, GB, FC, HP, WT and PV in the multi-energy microgrid. Considering that the capacity of the equipment is usually an integer, the change step of the plannable equipment's capacity is set as 10 kW. The parameters of the multi-energy microgrid are set as follows: 1) The capacities of the interconnection transformer and the natural gas pipeline of the multi-energy microgrid, namely P Grid, max and F Grid, max , are respectively set as 800 kW and is 300 m³. 2) The natural gas price is set as $0.357/m³, and the electricity timeof-use prices are shown in Table 1. The penalty prices for the electrical energy curtailment, the thermal energy curtailment, the electrical load and the thermal load shedding (ξ E ; ξ H ; δ E ,; δ H ) are respectively $0.296/kWh, $0.296/kWh, $0.267/kWh and $0.267/kWh. 3) Three typical days respectively representing winter, summer, spring and autumn and lasting 90 days, 90 days and 180 days in a year are generated. The load curves, wind energy output curves, and solar energy output curves of three typical days are shown in Figure 4. The peak of the electrical load is 2000 kW and the peak of the thermal load is 1600 kW.
4) The relevant parameters of the equipment are shown in Table 2 and Table 3.

Scenario generation and reduction
According to the forecasted wind energy and solar energy curves, by setting the standard deviation as 20% of the output, 500 original scenarios are generated, and each of them has a probability of 0.002, as shown in Figure 5.
Using the crowding measure-based scenario reduction method, the 500 original scenarios are reduced to 30 scenarios as shown in Figure 6, and the probability of each scenario is shown in Table 4.

Planning scheme analysis
To validate the presented model, the risk preference coefficients are set as 0.01 (for approximately simulating the deterministic situation), 0.5, and 0.9 respectively, and the confidence level is set to 0.9. The corresponding planning schemes are shown in Table 5.
It can be seen from Table 5 that: This is because these types of equipment are more economical. For WT and PV, their service lives are long and the costs of generating green energy are low. For HP, its service life is also long, and its electro-thermal conversion efficiency is as high as 4, so it is also economical. For ESS, although its service life is relatively short, working together with WT and PV, it can play to the advantage of low generation cost of renewable energy effectively through peak-valley arbitrage. 2) With the increase of the capacity of GT, the capacity of GB decreases. This is because GT is capable of cogeneration. The increased capacity of GT can supply not only part of the electrical load, but also part of the thermal load. Therefore, considering the overall economic efficiency, the capacity of GB that provides heat only is reduced accordingly. 3) With the increasing risk preference coefficient, the capacities of GT and FC are gradually increasing as well. Moreover, the load shedding capacity goes down. Compared to w = 0.1, for w = 0.5 and w = 0.9, although the investment costs respectively increase by $5049.009 and $12689.153, the CVaR values decrease by $62127.987 and $77704.403, and the load shedding costs are reduced by 58.46% and 93.77%. It can be seen from Table 5 that the load shedding cost is an important parameter affecting CVaR, which demonstrates that the load shedding is the main factor of the operational risk. Therefore, to

FIGURE 7
The distribution of operating cost.
Frontiers in Energy Research frontiersin.org avoid the risk of load shedding caused by the uncertainty of wind and solar energies during the operation phase, the value of w should be set as relatively large, which indicates that the decision maker will be more inclined to plan more energy resources to deal with the uncertainty of renewable energy. Figure 7 shows that with the increase of risk preference coefficient, the load shedding will gradually decrease, approaching zero.
4) The above results and analysis verify the effectiveness of the presented model and show that the model can reduce the risk of the system operation through adjusting the planning scheme.
To further validate the presented planning model and analyze the rationality of the planning results, based on the planning scheme of w = 0.5, the operating costs under the 500 original scenarios are calculated and plot the results as in Figure 8A. To make it clear, the expected value of operating cost, VaR values, and CVaR values are shown in Figure 8B. Table 6 shows the comparison of the results before and after scenario reduction. It can be seen that with 30 scenarios, the expected value of operating cost, VaR, CVaR and the total cost all merely slightly deviate from the results with 500 scenarios. In other words, the scenarios after reduction are still representative. In terms of computational efficiency, using merely 30 scenarios can significantly reduce the computational intensity.

Analysis of the impact of renewable energy forecast error on planning results
To discuss the impact of renewable energy forecast error on the planning results, the forecast error is set to increase from 0.1 times the standard deviation to 0.5 times the standard deviation in steps of 0.1. Under the condition of w = 0.5, the results calculated are shown in the following table: It can be seen from Table 7 that with the rise of prediction error, the maintenance cost, renewable energy curtailment penalty, load shedding penalty, investment cost, cost of operational risk, and total cost, in the planning results increase. The reason is that after the prediction error increases, the volatilities of WT and PV output mount up, and more extreme scenarios appear. Correspondingly, the cost of operational risk, renewable energy curtailment penalty, and load shedding penalty goes up. Consequently, to avoid frequent load shedding and power curtailment, the system supplements the capacity of the equipment. Thus, the investment cost and maintenance cost increase.

The study of confidence level
To study the impact of the confidence level on the planning results, α is set as 0.8, 0.85, 0.9, 0.95, and 0.99. In these cases, w = 0.5 and the 30 scenarios are employed. The planning results, including the total costs, VaR values, and CVaR values, are compared in Figure 9.
As can be seen from Figure 9, with the increasing confidence level, the values of VaR and CVaR are getting larger, indicating that the risk faced by the multi-energy microgrid during the operation phase is gradually increasing. In addition, the difference between CVaR and VaR gradually shrinks as the confidence level increases until they finally become equal. This is because the wind and solar energy outputs follow normal distribution to some extent. From Figure 8, it can be seen that the operating cost corresponding to each output scenario is approximately normally distributed. The increase of α makes the operational risk gradually approach the tail of the normal distribution. As the probability density of the tail of the normal distribution is small, CVaR and VaR values are getting closer.  Case 2. WT, PV, GT, GB, FC, HP are the equipment to be planned.
Case 3. WT, PV, GB, FC are the equipment to be planned. Table 8 shows the Comparing the planning schemes and costs in different cases. In Case 1 and Case 2, it can be seen that with the ESS being planned in Case 1, the energy purchase cost, the load shedding penalty, the energy curtailment penalty, and CVaR all decrease significantly. This is mainly because the ESS can store the electrical energy generated by the renewable energy resources during the low electricity price period and discharge during the peak load period with high electricity prices. Through peak load shifting, the ESS can effectively relieve energy supply pressure, which reduces the total operating cost and helps to deal with the uncertainty. Comparing Case 2 and Case 3, it can be seen that the total cost of Case 3 is significantly higher than that of Case 2. This is because in Case 3, only the coupling on natural gas input between GB and FC exists, and the overall multi-energy complementation is weak. The dealing of the uncertainty of wind and solar energies merely relies on FC and the power injection from the external power grid. This shows that the multi-energy microgrid lacks operational flexibility. The GT planned in Case 2 can build electricity-gas-thermal coupling, and the HP can build electricity-thermal coupling. Compared to Case 3, the multienergy complementation between multiple energy is stronger, which ultimately reduces the operating cost considerably.

Conclusion
Focusing on the risk brought by the uncertainty of wind and solar energy in multi-energy microgrids, this paper introduces CVaR to quantify the cost of the operational risk. On this basis, a multi-energy microgrid planning model that minimizes the investment cost, the operating cost, and the cost of the operational risk, while considering the physical limitations of the equipment, is presented. The following conclusions can be drawn through the case study: 1) The presented model can reduce the risk of the excessive operating costs by appropriately increasing the planned capacities of the energy resources and effectively balance the investment costs and the cost of the operational risk. 2) Decision makers can obtain either conservative or aggressive planning schemes through adjusting the risk preference coefficient w. 3) Energy storage systems in the multi-energy microgrid and a higher degree of multi-energy complementation can effectively mitigate the impact of the uncertainties from wind and solar energies and significantly reduce the operating cost and the cost of the operational risk.
The future research of this paper can be considered from the following two aspects: 1) The consideration of load side uncertainty can be added.
2) The thermal network in the multi-energy microgrid has heat storage performance. The constraints of the multi-energy network can be added to the model.