Reliability and Uncertainty Determination of a Combined Heat and Power in Microgrid Systems

Today, due to the increase in energy consumption and the increasing use of distributed generation units (DG) such as CHP and fuel cell (FC) units in microgrids, it is necessary to use them in the best possible conditions. The use of distributed generation units, which are mainly installed in small dimensions and on the load side of the distribution network, can provide other benefits, including reducing power transmission losses, increasing production efficiency, and increasing reliability to bring the meantime, the use of electricity and heat simultaneous production units, which are among the most widely used distributed production units, has improved the efficiency of energy production to a great extent by producing electricity and heat simultaneously, thus reducing the costs of energy failure. Therefore, in this paper, the goal is to reduce the cost of production and the cost of lack of energy supply and increase the reliability of the system. In this paper, the working modes of the sample microgrid are evaluated, and finally, the optimization of a multi-objective function, which has goals such as the economical production of each of the distributed production sources, the minimization of the cost of providing the electric and thermal energy of the microgrid, the minimization losses of electrical and thermal energy, load response program and energy storage program. The results of optimal planning of the capacity and number of co-generation units of electricity and heat under different conditions and states show the great effect of using co-generation units of electricity and heat in reducing unsupplied energy and increasing the reliability of the system.


Nomenclature
ρ The probability of scenario s. NS Total number of scenarios.

C
The cost of load interruption due to the imbalance of production and consumption.

C
The cost of purchasing energy from the grid. I Income from selling energy to the grid.

Introduction
T. Ackermannet al. [1] studied CHP units and CCHP is among the most important applications of distributed generation (DG). the installation of microgrids near load centers reduces transmission losses and increases energy efficiency. In a cogeneration microgrid, the main concern is how the system works based on primary energy consumption and ways to reduce it. The main difference between co-generation microgrids with other common electrical power generation systems is the possibility of using the output heat for heating and cooling needs.M. El-Sharkh et al. [2] studiedthe fuel cell is considered as a part of the load demand producer. For this purpose, it is assumed that fuel cell units provide electrical energy, thermal energy and hydrogen needed for storage. J. Xu et al. [3] studiedCCHP systems are also used to overcome the problem of low energy efficiency of conventional stand-alone production systems. In separate generation systems, electrical demand, which includes daily electricity consumption, electric chillers, and heat demand, is met by the purchase of electricity and fuel, respectively. Since there is no capacity for self-production in separate production systems, these systems have little efficiency. M. Hu and Sayyed Faridoddin Afzaliet al. [5,14] studiedthe optimal operation and planning of CHP and CCHP cogeneration systems. a stochastic multi-objective optimization model is proposed to optimize the CCHP operation mechanism under different climatic conditions. Approaches to the problem are optimization, reducing operating costs, reducing primary energy consumption and reducing carbon dioxide emissions.A. A. Knizley et al. [6] studiedthe cost of spark expansion is considered as an indicator of DCCHP system efficiency. In addition, a new parameter called thermal difference has been introduced to evaluate and compare the relative performance of the DCCHP system and systems resulting from the combination of a CHP unit and a power system based on two-unit units. L. Li, H et al. [7] studiedthe impact of using CCHP systems on both residential and office buildings in Dalian, China has been investigated.M. Liu et al. [9] studiedto solve the problem of unknown loads in practical applications, the moving average self-reduction model is used along with the external input model, whose parameters are identified by a two-step least squares return algorithm, and the loads are used. Electric, thermal and refrigeration are predicted in future time periods. The identification process of this paper uses temperature as a useful variable for external variables to improve the characteristics between external and internal variables. S. Abapouret al. [10] studied proposed long-term dynamic planning of distributed generation (DG) units in distribution networks considering active management (AM).W. Gu et al. [11] studiedan online optimization method for CCHP microgrids is proposed. This method consists of two basic steps, in the first part of which a hybrid algorithm based on series time analysis and Kalman filter is used to predict the power of renewable energy sources and load. J. Wang et al. [12] studiedthermodynamic efficiency analysis and configuration optimization of a hybrid CCHP system with solar and natural gas are presented. The basis of a natural gas-based CCHP system includes a power generation unit, thermal efficiency improvement system, cold absorption system, and storage tank, which is integrated with photovoltaic panels and a thermal controller.H. Yang et al. [13] studied the structure of the designed energy hub, which is a combination of distributed energy production and CCHP units, renewable energy, and energy storage systems. This energy hub includes electrical, refrigeration, and heating power systems, natural gas, power generation units, and the photovoltaic system as primary energy sources.J. Wang et al. [15] studiedto create a peaceful behavior of microgrids with the main network, and a schematic of shared energy efficient dispatching and reservation for microgrid-based CCHP systems is proposed. In the proposed schematic, the total cost of operation under the pre-determined booking requirements is minimized. Energy demand is also met by distributed energy sources.G. Li et al. [16] studied the configuration of the CCHP system is optimized by adding an air conditioning system and a heat storage tank for both types of buildings. Morteza Nazari-Heris et al. [17] studiedElectrical and thermal load information and price information Purchase and sale of network electricity have been extracted. Sayyed Faridoddin Afzali et al. [18] studiedSimultaneous production systems divided into upper and lower cycles. In the upper cycle, fuel energy is first used to generate electricity and then recycled heat is used for the thermal process. In simultaneous production with a low cycle, the supply of thermal loads is of paramount importance. Input fuel is used to generate heat used in various processes, and any excess heat generated is used to generate electrical power. M. Liu and Camacho Ceballos Mónica Abigail et al. [8,19] studied that Since there is no need for refrigeration energy of cooling systems in winter, CHP systems are considered as a special case of CCHP systems and are considered. A CCHP system can achieve more than 50% efficiency of a CHP system with the same dimensions. Mohamed A. Mohamed et al. [20] studiedCCHP systems that are evaluated by following the electric and thermal charge mechanisms and optimized based on the initial energy consumption, operating costs, and carbon dioxide emissions.in [22], the power generation units include the simultaneous production units of electricity and heat with the output of electric and thermal power and auxiliary boilers. The investment cost was extracted from the United States Environmental Protection Agency website.
None of the previous studies have considered using heat generators in modelling systems for simultaneous electricity and thermal energy production. One of the highlights of this paper is the consideration of heat generators in the modelling. Since microgrids play a key role in creating balance, load supply, and energy carriers, the problem of operation and planning of microgrids is formulated as an optimization problem. And production planning is determined by energy prices and load consumption. In fact, production planning for distributed sources of non-renewable and renewable energy and consumption side management is done for efficiency in connected and network-independent working modes for the microgrid to minimize operating costs and environmental pollution.
In this study, a microgrid sample based on CHP units to plan the production of each of them in the presence of distributed renewable products such as FC and energy storage sources by considering the load response plan in microgrid operation modes. it is considered. In addition to production planning and microgrid load response program, to prevent energy loss in the microgrid, the use of thermal energy generated by distributed generation sources CHP and FC to provide heat load plays a key role in energy saving, case Examines. Because there are different modes of operation of the connected microgrid and the island of the main network. In this study, the working modes of the sample microgrid are evaluated and finally to the optimization of a multi-objective function that aims at economic production of each of the distributed generation sources, minimizing the cost of electrical and thermal energy supply of the microgrid, minimization loss of electrical and thermal energy results in a load response program and an energy storage program. This study has implemented the proposed method on four cases to ensure the performance of the method.
The contributions of this paper can be summarized as follows: 1. The heat and power Micro-grids(MG) include a fuel cell unit, combined heat and power (CHP) units, a power-only unit, boiler, and a heat buffer tank. 2. The fuel cell unit studied in this paper is capable of producing power and heat in addition to storing hydrogen to be utilized in peak demand hours. 3. A demand response program is employed in the stochastic programming of heat and power MG dispatch, and the program's effects and its results are analyzed. 4. The uncertainties for load demand and price signals are considered in the MG economic dispatch solution. The rest of this paper is organized as follows: After the introduction, the problem formulation is presented in Section 2. Section 3 introduces problem information, and simulation results are described. Finally, the conclusion of the paper is done.

Electric load with demand response
It is assumed that the load can be changed from the market's high cost over time to a low cost. Demand response is used for this purpose. Electric load-based demand response is defined as follows [10]: Equation (1) represents the demand response after implementing the demand response in the same period. The demand response in each period has a variable size, which is expressed as Equation (2). Equation (3) states that the total amount of load shifted daily is zero. Equation (4)

Economic model of fuel cell
In this study, the fuel cell is considered as part of the load demand generator. For this purpose, it is assumed that the fuel cell units provide the electrical energy, heat energy and hydrogen required for storage. Equation (5) indicates that the heat recovery power of the fuel cell depends on the electrical output and hydrogen storage [17].

The objective function
The objective function of the problem under study in this paper is defined as a two-stage probabilistic problem. The objective function of the problem is shown in Equation (6). The first part deals with the investment cost of CHP units and auxiliary boilers. The second part is the total cost of supplying energy to the office building, including the cost of generating power for the units of simultaneous generation of electricity and heat, auxiliary boilers plus, the cost of purchasing electricity from the grid, the cost of cutting the load and the revenue from electricity sales to the grid-possible scenarios in the office building [21].

/ IJRRS
In Equati investment cos maintenance scenario s and C (Gr cost of load consumption i from the grid a the grid, respec 4.

Load In
As shown in F two parts: elec the amount of terms of Pu o changes in th Also, the elect base load is 30   Table  in Table  2.1 and t Table 1 Hour Electricity i 1 2 3 4 5 6 Table 2 Hour Electricity

Simulation Results
Four scenarios have been considered to fully investigate the issue.

Building load Supply without using CHP
In this case, the electrical load of the network is supplied by the electricity purchased from the distribution network, and the auxiliary boilers in the building fully supply the thermal load. Also, the amount of contracted demand, in this case, is equal to 2000 kW. The simulation is performed using GAMS software. The amount of the objective function, which represents the cost of investment and power supply of the network, is equal to 5.27 $ million. In this case, the cost of purchasing electricity and purchasing demand is 3.26 $ and 0.4 $ million, respectively. Figure 3 shows the amount of electrical power purchased from the distribution network compared to the total electrical power required by the building in 12 months of the year. As can be seen, throughout the year, due to the lack of power outages by the entire distribution company, the amount of load purchased always equals the amount of electrical demand. It is clear from Figure 3 that the amount of electricity purchased from the distribution company is almost always more than 1300 kW. Considering that all the amount of heat load, in this case, must be provided by auxiliary boilers, a number of boilers with a capacity of 3528 kW has been selected. The amount of heat output of this unit is exactly according to the thermal load in the building. Table 5 shows the capacity and costs of investing, operating, and repairing an auxiliary boiler.    Figure 4 shows the amount of heat production of boiler 1 and the demand for heat load during 12 months of the year. As it is known, the production amount of boiler 1 has the lowest amount during July and February.

Considering the Combined Heat and Power Units in Supplying the Load of the Building
In this scenario, the combined heat and power units are added to the network and the network conditions are examined in the presence of these units. The amount of contracted demand in the steady state is equal to 1000 kWh. The value of the objective function of the problem, in this case, is equal to 5.11 $ million. Also, the amount of electricity purchase cost is 112,280 $ and the amount of demand cost is equal to 202040$. Table 6 shows the capacity and costs of CHP and auxiliary boilers selected. By choosing a 1780 kW boiler and a 1920 kW CHP, the total cost is reduced by170,000$ compared to scenario1. Figure 5 shows the amount of electricity purchased and generated by the CHP unit, as well as the amount of electricity sold from the building to the distribution network for one year.
As shown in Figure 5, only in the 4th and 11th months, due to the reduction of energy load, and in the rest of the year, the excess energy is sold to the grid. Figure 6 shows the boiler's heat output and CHP during the sample year. As shown in figure 6, most of the heat load of the building is supplied by CHP. Also, in all seasons of the year except the 4th and 11th months, due to the decrease in heat load demand, auxiliary boilers help to meet the heat load demand. Only in the mentioned months, the heat load is provided only by CHP.

Check the Optimal Conditions with Changes in the Price of Electricity Bought and Sold
This scenario is intended to validate the planned performance. Accordingly, it is necessary to compare the problem of determining the number and optimal capacity of CHP, assuming that the price of purchased electricity is halved, with the results obtained in Scenario 2. The simulation results, in this case, show that with the halving of the purchased electricity, the investment cost for the construction of CHP in the office building is not economically justified. In this case, the value of the target function is reduced by the purchase of a 3528 kW boiler to heat the building by $ 3.6 million. The value of the selected boiler, in this case, is given in Table 7. Also, the optimal demand value, in this case, is shown in Figure 7. As it is known, because the price of electricity is much lower than the cost of investing and operating the CHP, the electricity demand of the building is met by the distribution network at all hours of the year. Therefore, the optimal demand should be the peak monthly consumption of the building's electrical demand.   Figure 8 shows the amount of heat generated in megawatt hours at different times. Based on this figure, it can be said that the heat generated by the CHP1 unit is higher than other production units because its target function has a lower value than other units. The fuel cell unit has less heat output than the CHP1 unit because it has a larger target function value. The CHP2 unit has less heat output than the fuel cell because it has a larger target function value. In the end, it can be said that due to the fact that the auxiliary boiler has a larger target function value than other production units, so it produces the least amount of heat [17].

Consider Uncertainty and Reliability Indicators
In this case, in order to increase the reliability of the system in the problem, the amount of energy cost not provided under each scenario is added to the objective function of the problem, taking into account the probability of its occurrence. Therefore, planning seeks a response to minimize network power supply costs in the normal state of the system, unpaid energy costs and network power supply costs in the event of a scenario being at the lowest possible level and thus increase system reliability. Also, in addition to the cost of unsupplied energy, the expected amount of unsupplied energy and the expected amount of unsupplied load must be less than a possible amount under the problem's constraints. By executing this mode using GAMS software, 500 scenarios were created, and after reducing the number of scenarios by the k-medoids method, 10 scenarios remain. Also, according to each piece of equipment's exit rate and repair time, scenarios have been made using the Monte Carlo method. Figure 9 shows a sample scenario for 8760 hours for the auxiliary boiler.   Table 8 shows the capacity and costs of CHP and selected auxiliary boilers.

Conclusion
In this paper, a two-stage stochastic optimization problem is defined to model the determination of the optimal number and capacity of sources of simultaneous production of electricity and heat. In the first stage, without taking into account the uncertainties and possible scenarios, the problem of optimizing the cost of investment, operation, repairs, energy purchase, power outages, and electricity sales is solved, then a model of planning the participation of units by considering the simultaneous production of electricity and heat, auxiliary boilers It is modeled as the second stage. In this situation, the aim is to investigate the power generation status of the units of simultaneous electricity and heat production according to all the conditions of the problem and the possibility of buying and selling electricity from the distribution network. In the first scenario, the building load is supplied without using 114 / IJRRS / Vol. 4/ Issue 2/ 2021 M. Mohseni CHP. Therefore, a boiler with a capacity of 3528 kW with an investment cost of $1631818 has been selected. In the second scenario, the CHP units are also added to the network, and the network conditions are examined with these units' presence. Choosing a boiler of 1780 kW and a CHP of 1920 kW reduces the total cost by 170,000 $ compared to scenario 1. In the third scenario, the optimal conditions were checked with changes in the price of purchased and sold electricity. In this case, the simulation results show that with the halving of the purchased electricity, the investment cost for the construction of CHP in the office building is not economically justified. In this case, the value of the objective function is reduced to 3.6 million dollars by purchasing a boiler of 3528 kW to heat the building. In scenario 4, the optimal conditions were investigated, considering the fuel cell unit as a backup. Considering that the auxiliary boiler has a larger target function value than other production units, it produces the lowest heat. The results of optimal planning of the capacity and number of CHP units under different conditions and situations greatly impact the use. It shows the reduction of unsupplied energy and the increased system reliability from the units of simultaneous electricity and heat production. In future work, the presence of electric vehicles as equipment used in microgrids to implement demand-side management programs will be discussed. In addition, environmental pollution is debatable along with the economic aspect.