Stochastic Optimization for Integration of Renewable Energy Technologies in District Energy Systems for Cost-Effective Use

Stochastic optimization of a district energy system (DES) is investigated with renewable energy systems integration and uncertainty analysis to meet all three major types of energy consumption: electricity, heating, and cooling. A district of buildings on the campus of the University of Utah is used as a case study for the analysis. The proposed DES incorporates solar photovoltaics (PV) and wind turbines for power generation along with using the existing electrical grid. A combined heat and power (CHP) system provides the DES with power generation and thermal energy for heating. Natural gas boilers supply the remaining heating demand and electricity is used to run all of the cooling equipment. A Monte Carlo study is used to analyze the stochastic power generation from the renewable energy resources in the DES. The optimization of the DES is performed with the Particle Swarm Optimization (PSO) algorithm based on a day-ahead model. The objective of the optimization is to minimize the operating cost of the DES. The results of the study suggest that the proposed DES can achieve operating cost reductions (approximately 10% reduction with respect to the current system). The uncertainty of energy loads and power generation from renewable energy resources heavily affects the operating cost. The statistical approach shows the potential to identify probable operating costs at different time periods, which can be useful for facility managers to evaluate the operating costs of their DES.


Introduction
Power generation from distributed energy resources has become increasingly popular [1].Traditional power generation is often associated with large-scale power plants [2], but distributed power generation tends to occur on smaller scales and is located near the end users.The introduction of distributed generation allows the local energy demand to be less dependent on the grid [3] and may provide additional efficiencies by using local energy resources.Renewable energy systems in recent years have been considered within distributed generation systems [4].One of the advantages of renewable energy systems is that they can be configured in various system sizes to meet the local energy demand [5].
The options for integrating renewable energy systems into district energy systems (DES) vary depending on the location and the objective of the DES [6].The integration of renewable energy systems into DES has been actively explored in recent literature.Various renewable energy technologies are utilized in DES, ranging from small scale to large scale [7].The types of technology are also dependent on the location of the DES [8].In other words, the availability of local renewable energy resources determines the type of renewable energy systems which can be employed in that area [9].Solar and wind power are the two most popular types of renewable energy technologies integrated into DES [10].Furthermore, geothermal, biomass, and hydropower are also attractive options for locations containing the respective energy resources [11].Other types of distributed energy systems such as combined heat and power (CHP) are also used for DES planning [12].
Power generation of solar and wind energy systems can be interrupted due to the intermittency and uncertainty of solar irradiation [13] and wind speed [14].Mathematical models have been developed to address the intermittency of renewable power generation in DES [15].For example, Parisio et al. proposed a Robust Optimization technique to control energy carriers into an energy hub [16].Evins et al. utilized Mixed-integer Linear Programming to address operational constraints [17].Mavromatidis et al. introduced a two-stage stochastic programming approach to optimal design of distributed energy systems [18].Jabbari-Sabet et al. used Particle Swarm Optimization and Unit Commitment to solve for DES operation and management of a 10-bus system in the day-ahead model [19].Fioriti et al. investigated a hybrid minigrid under load and renewable generation uncertainty [20].The results from these studies show that stochastic optimization can be used to address the uncertainties associated with DES.
There are a number of ways to incorporate stochasticity in the simulation and optimization of renewable energy systems.In recent literature, the uncertainties of power generation from renewable energy systems have been investigated for meeting the electricity demand [21], heating demand [22], and cooling demand [23].Najibi et al. investigated stochastic scheduling of renewable energy resources to meet the electricity demand under uncertainties of solar photovoltaics (PV) power generation [24].Similarly, Nikmehr et al. studied the operating cost optimization of a network of energy hubs to fulfill the electricity demand [25].Balaman and Selim focused on meeting the heating demand in a heating district system [26].Lu et al. presented a modeling solution to coordinate dispatch of a multi-energy system with district heating network [27].Comparatively, Sameti and Haghighat studied optimization methods for a cooling network together with a district heating network [28].Furthermore, Gang et al. presented an uncertainty-based design optimization for stand-lone district cooling systems [29].Overall, these DES planning studies are mostly focused on meeting one of the three major energy demands, with electricity as the main focus.
There are limited studies on optimizing the operating cost of DES with consideration of all three major energy demands.Li et al. optimized building cooling heating and power system with consideration of uncertainty of energy demands [30].Recently, Mavromatidis et al. incorporated uncertainty and global sensitivity analysis to optimize design of an energy hub [31].There is a need to further investigate all three major energy use types, especially in the presence of uncertainty and global sensitivity analysis.The addition of cooling and heating demand to the analysis is important for the overall operation of the DES.This is because systems such as CHP can utilize thermal energy, which is a by-product of power generation, for fulfilling the heating demand.Furthermore, the uncertainties in power generation can impact the fulfillment of the cooling demand since cooling equipment is run by electrical power.In this work, these uncertainties can be included in the model for optimization without requiring a stochastic programming approach, in which later decision stages depend on uncertainties in earlier decision stages [32].
The novelty of this paper is to establish an optimization framework with uncertainty incorporated in terms of stochastic renewable power generation systems and stochastic energy use (loads) based on a day-ahead model to optimize the operating cost of a modeled DES and potentially reduce dependence on the grid.To address the existing gap in the literature, all three major categories of energy consumption (electricity, heating, and cooling) are considered in the presence of renewable power generation and energy usage uncertainties.These energy needs of the DES are met by a mix of renewable energy systems (solar PV and wind turbines), CHP system, energy storage, natural gas boilers, and the electrical grid.
This study uses real data from a group of existing buildings on the campus of the University of Utah as a case study.These buildings are metered to measure both the electrical and thermal energy consumption.The uncertainties of energy consumption patterns and power generation from the renewable energy resources (i.e., solar irradiation and wind speed) are analyzed based on the Monte Carlo approach.The DES is optimized with the population-based Particle Swarm Optimization (PSO) algorithm.The objective of the optimization is to minimize the operating cost of the DES on the day-ahead model.
Unlike the aforementioned works in the literature, the results from this study will lay the groundwork for the adding renewable energy systems into DES with (1) considering of all three major types of energy consumption (electricity, heating, and cooling) in buildings; (2) including of the uncertainties of energy consumption and power generation from renewable energy resources; (3) incorporating the Monte Carlo statistical approach into the population-based PSO; and (4) generating statistical distributions of the operating cost at different time periods in order to stochastically optimize for the operating cost of the DES.

District Energy System Description
The methodology described in this section can be applied to any DES with known electricity, heating, and cooling demands.Energy system sizes in the DES can be adjusted according to the demands of the given DES.The stochastic optimization methodology proposed in this paper is examined by utilizing a group of existing buildings on the campus of the University of Utah as a case study.The buildings are predominantly used as offices and classrooms.As previously mentioned, the chosen buildings are metered for energy usage, disaggregate into electricity, heating, and cooling.The study examines the DES on four different days of the year (20 March, 21 June, 22 September, and 21 December), which occur at the beginning of the four astronomical seasons.During these four days, offices and classrooms are open.Throughout this paper, the existing energy system (utilizing the electrical grid and natural gas) will be referred to as the current energy system.On the other hand, the modeled DES (utilizing a mixed of energy systems) will be referred to as the proposed DES.Furthermore, the non-cooling electricity load will be referred to as simply the electricity load, while the electrical energy required to run cooling equipment will be referred to as the cooling load.
The average energy loads of the buildings comprising the proposed DES are detailed in Table 1.To obtain average energy loads representing the four example days, hourly energy data is taken from 10 preceding days and 10 subsequent days to capture typical load patterns during the time of year around that particular example day. Figure 1 shows the daily energy loads of 21 June and its 20 neighboring days to illustrate the process of obtaining data for the study.Instead of using only the actual energy data for 21 June, incorporating data from neighboring days allows for a representative energy load that includes stochastic variation in the likely energy load on such an example day, which will be discussed further in Section 2.3.1.The data represents the real energy loads in 2017 and is obtained from the university's SkySpark installation, a building analytics platform that collects building data [33].The mean and standard deviation of each set of hourly energy data are shown in the Appendix A (Tables A1-A3).The average values are plotted in Figures 2-4.The daily electricity load is consistent while the daily heating and cooling loads vary throughout the year.The DES is located at Salt Lake City, UT, which is part of American Society of Heating, Refrigerating and Air-Conditioning Engineers (ASHRAE) climate zone 5 (i.e., cool and dry) [34].Buildings in this climate zone typically exhibit considerable heating and cooling demands in winter and summer, respectively.

Proposed District Energy System
The DES utilizes the local renewable energy resources for power generation to reduce the dependence on the electrical grid.The diagram of the proposed DES is illustrated in Figure 5.In particular, solar PV and wind power are the two renewable power generation sources integrated into the DES.The National Renewable Energy Laboratory (NREL) provides hourly data over the last 15 years for wind speed [35] and solar irradiation [36] at the study location of Salt Lake City, UT, USA (40.766837, −111.846920).In addition to renewable power generation, a gas-fired microturbine CHP system is used to provide power generation during times of electrical demand when solar PV and wind power is inadequate to meet the electricity loads.A battery system is also implemented to store unconsumed renewable energy for use at a later time.Additionally, the power generated from these resources will be used to run cooling equipment to meet the cooling demand.The system will recover thermal energy from the CHP system in addition to using natural gas boilers to meet the heating demand.The technical specifications of these systems are listed in Table 2.The system sizes for the simulations presented here were chosen based on the energy demands of the buildings and the availability of renewable energy resources in the area.Different design choices will affect the on-site generation and ultimately the operating cost of the DES.

Mathematical Model
The objective of the mathematical model is to minimize the operating cost of the DES, which consists of the operating costs of the solar PV panels, wind turbines, battery system, CHP system, natural gas boilers, and electricity purchased from the grid.This work assumes that these systems are already installed.The operating and maintenance costs of these devices can be less significant to decision makers as their variation with energy output is small.Their capital costs can be found in Appendix B. All of the variables in the mathematical model are hourly because the solar irradiation, wind speed, and energy loads are provided as hourly data.The objective function of the operating cost is detailed as follows: For electricity generation (the first term in brackets on the right-hand side of Equation ( 1)): N g is the number of generating units, u i is the state of the ith unit (ON = 1, OFF = 0), E G,i is the electricity generation of the ith generating unit, and C G,i is the ith generating unit cost.The generating units consists of on-site generation from solar, wind, and CHP.For energy storage (the second term in brackets on the right-hand side of Equation ( 1)): N s is the number of energy storage devices, u j is the state of the jth unit (ON = 1, OFF = 0), E S,j is the energy capacity of the jth energy storage device, and C S,j is the jth storage device cost.For thermal heating devices, including gas-fired boilers (the third term in brackets on the right-hand side of Equation ( 1)): N h is the number of heating devices, u k is the state of the kth unit (ON = 1, OFF = 0), Q H,j is the thermal energy of the kth heating device, and C H,k is the kth heating unit cost.When purchasing electricity from the grid, u l is the state of sending/receiving electricity from the utility (ON = 1, OFF = 0), E grid is the electricity purchased (or exported) from (or to) the utility, and C grid is the energy unit cost purchased from the utility.
The following equations break down the operating costs and constraints of all energy devices used in the proposed DES.The operating costs from renewable energy resources (i.e., solar and wind power) come from the operating & maintenance (O&M) costs of these systems.The fuel costs are zero since the fuels for these systems (i.e., solar irradiation and wind speed) are free to harvest.For the solar PV system, the operating cost, C solar , is as follows: where λ solar is the solar operating cost per unit of electricity output, and E solar is the solar electricity output.The solar power generation, P solar , is the rate of electricity converted from solar energy (E solar ) per unit of time.The solar power generation is subjected to the solar power capacity constraint: P solar,min (t) ≤ P solar (t) ≤ P solar,max (t).
The solar electricity generation is calculated based on the specifications of the solar PV system (Table 2) and the solar irradiation available at the study location.
Similarly, the operating cost of the wind electricity generation system , C wind , is as follows: where λ wind is the wind operating cost per unit of electricity output, and E wind is the wind electricity output.The wind power generation is subjected to the wind power capacity constraint: P wind,min (t) ≤ P wind (t) ≤ P wind,max (t). ( Wind power generation depends on the wind speed since the wind turbines impose cut-in and cut-off wind speeds as listed in Table 2.
Unlike the electricity generation from renewable energy resources, the operating cost of the CHP system comes from the fuel cost in addition to the O&M cost.The fuel cost is the cost of the natural gas used for running the microturbine in the CHP system.The operating cost of the CHP system , C CHP , is detailed as follows: where f CHP is the CHP fuel unit cost, γ CHP is O&M unit cost of the CHP system, and E CHP is the electricity generation from the CHP system.The thermal energy from the CHP system is utilized to partially meet the heating load, while the natural gas boilers are used to fulfill the remaining load.The constraint for the heating load is shown in the following equation: where Q heating is the total heating load, Q CHP is the thermal energy output delivered from the CHP system, and Q boiler is the thermal energy output provided by the boilers.The operating cost for the boiler system , C boiler , is as follows: where f boiler is the fuel unit cost to run the boilers, γ boiler is the O&M unit cost of the boilers, and Q boiler is the thermal energy output of the boilers.
A battery system is also implemented as an energy storage device in the DES for events of excess electricity generation.The operating cost for the battery , C es , is as follows: where λ es is the unit operating cost of the battery, and E es is the energy capacity of the battery.
Charging occurs during events of excess power generation from the renewable energy sources, while discharging takes place if there is a lack of on-site power generation.The battery is also subjected to the charging/discharging limitations and the state of charge constraint.The depth of discharge of the battery system is 90% as it prolongs the life cycle of the battery system.If the battery system is fully charged, any further excess renewable power generation will be sold to the grid.
The following equations illustrate the constraints on the battery: The electrical grid is used in the event that on-site power generation is inadequate to meet the electricity load.The cost of purchasing electricity from the grid , C grid , is as follows: where λ grid is the electricity unit cost from the grid, and E grid is the purchased electricity.The unit costs of all energy systems are detailed in Table 3.The energy balance should be satisfied at all times: where E load consists of the non-cooling electricity load and the electrical energy to run cooling equipment.

Uncertainty Model
Renewable energy systems in the DES are associated with uncertainties in power generation.For instance, solar PV panels and wind turbines depend on solar irradiation and wind speed, respectively.The uncertainties of these variables can be characterized by statistical probability distributions [40][41][42].The Monte Carlo simulation is used for modeling and sampling the uncertainties in this study [43].This section illustrates the uncertainty analyses of the input variables (i.e., wind speed, solar irradiation, and energy loads).Figure 6 provides the average wind speed and solar irradiation on all four example days.To determine the appropriate statistical distributions, hypothesis tests were used on the actual data.As a result, the uncertainty analysis on the wind speed is conducted based on a Weibull distribution, while the solar irradiation is analyzed based on a normal distribution.
The probability density function of wind speed based on the Weibull distribution is as follows: where x w is the wind speed, δ w is the scale parameter, and β w is the shape parameter (Table A4 in the Appendix A).
The mean and standard deviation of the wind speed (Table A5 in the Appendix A) are shown in the following equations, respectively: The cumulative distribution function of the Weibull distribution of wind speed is modeled as follows: Similarly, a normal distribution is used to model the solar irradiation.The probability density function of this normal distribution is as follows: The mean and standard deviation of the normal distribution are µ s and σ s (Table A6 in the Appendix A), respectively.The cumulative distribution function of the normal distribution is as follows: Similar to the uncertainty analysis of wind speed and solar irradiation, the energy loads of the district of buildings are analyzed based on normal distributions.The probability density functions of the loads are similar to Equation (18), while their cumulative distribution functions are similar to Equation (19).Tables A1-A3 in the Appendix A represent the mean and standard deviation of electricity, heating, and cooling loads, respectively.Based on the Monte Carlo simulation, the uncertain variables can be sampled to produce deterministic inputs for the stochastic model.In this study, there are 10,000 power generation scenarios generated by the Monte Carlo simulation.Based on these, a day-ahead model of the DES is planned.Using the constraints of the electricity generation from wind turbines and solar PV panels, there are five decision variables to be considered: CHP electricity generation, battery state of charge, grid electricity purchase, CHP thermal energy, and boiler thermal energy.As a result, the total number of variables for a day-ahead model is 120 (24 h and five variables).All of these variables are linked to the objective function, which was shown in Equation (1).The decision variables are demonstrated in the following matrix:

Stochastic Optimization Algorithm
The day-ahead model is optimized by the Particle Swarm Optimization (PSO) algorithm, which was developed by Kennedy and Eberhart in 1995 for studying bird flocking and fish schooling [44].This optimization algorithm has been applied in many engineering applications, such as gear train design, process parameter optimization in casting, power generation scheduling, etc. [45,46].The population-based optimization has been adopted for the stochastic optimization in this study because it offers mathematical flexibility and computational efficiency to incorporate uncertainties.Figure 7 describes the implementation of the algorithm used in this study.As illustrated in the aforementioned matrix, the PSO algorithm can search for an optimal solution (i.e., minimizing operating cost of the DES at each instant in time) based on the day-ahead model that contains a total of 120 variables.The Monte Carlo simulation method is integrated with the PSO algorithm to assess the uncertainties of renewable power generation and energy loads.The PSO algorithm optimizes by allowing for communication and learning to take place among the particles in the search space.In the beginning, a group of random particles initializes the PSO algorithm and then searches for the minimum solution by updating generations of the particles.In every iteration, there are two "best" values that determine the location and velocity of each particle.The first value is the personal best solution (pBest) that each particle has achieved so far.The other "best" value is the global best (gBest) that is obtained so far by any particle in the population, which is not necessarily a global minimum in the solution space.The tolerance of the solution (i.e., the operating cost) is measured to determine the optimum population size and iteration with respect to the computational time.As a result, the population size is picked to be 50 and the number of iteration is 1000 as this gives the best trade-off between accuracy and computational time.The solution of each particle in every iteration is calculated by the objective function.The location and velocity of the particle in the search space are calculated based on the following Equations [47]: where x is the location of the particle, v is the velocity of the particle, c 1 and c 2 are acceleration coefficients and both equal to 2.05, w is the inertia coefficient and w , r 1 and r 2 are random numbers ⊂ (0,1), j is the jth particle, and k is the kth iteration [45].The three terms in Equations ( 21) represent inertial, cognitive, and social components, respectively.The inertial component presents the relative velocity of the particle in the search space.
The cognitive component refers to the personal experience of the particle (i.e., personal best operating cost) while the social component is associated with the communication among particles (i.e., global best operating cost).

Results and Discussion
The simulation of the DES solves for the operating costs of the four example days, which give different operating conditions with mixed electricity, heating, and cooling demands.These four example days are associated with seasonal transitions at the study location, which offer variations in daylight hours and wind speeds.As a result, the power generation from the renewable energy resources changes throughout the year (Table 4).Furthermore, the uncertainties of renewable power generation and energy loads are shown to influence the operating costs.The mean and standard deviation of the operating cost in all hours of the four example days are shown in Table 5.The total operating cost of each day of the proposed DES is compared to the operating costs of the current energy system (relying on the electrical grid and natural gas boilers) in Table 6.These operating costs represent the average values for 10,000 power generation scenarios.The simulation time for each example day is approximately 5 h in MATLAB (2015b version by Mathworks, Natick, MA, USA) on a desktop computer with an Intel i7 processor and 16 GB of RAM.The operating costs for each hour of the four example days are illustrated in Figure 8. Due to the nature of the buildings (offices and classrooms), the majority of the energy use occurs during the day.The operating cost during occupied hours dominates the daily operating cost of the DES.The use of solar PV is beneficial for the DES since the power generation from solar PV panels can be used for fulfilling the electricity load during the day.On the other hand, the power generation from the wind turbines occurs mostly in the afternoon and at night, which can be consumed for night-time building operations and energy storage.The use of solar PV and wind power offers a balance between power generation from renewable energy resources during the day and at night.As a result, the intermittent nature of power generation from each resource can be mitigated.Furthermore, the addition of on-site generation (including wind turbines, solar PV panels, and the CHP system) reduces the dependence on the electrical grid by as much as 26%, as seen in Table 4.
For each hourly operating cost, a probability-normalized histogram is constructed to assess the influence of uncertainties.The operating costs for the three representative hours (4th hour, 12th hour, and 20th hour) in four example days are shown in Figures 9-12, respectively.The probability-normalized histograms show the potential operating costs and their probabilities in different price ranges.In other words, the distribution illustrates how probable each operating cost is for the given operating conditions.The uncertainties of solar PV and wind power generation drive the uncertainty in power generation overall when using renewable energy resources (Figures 13-16).It is important to note that the probability of zero power generation is also included in the plots, which can affect the general distributions.The solar irradiation values are drawn from a normal distribution while the wind speeds are from a Weibull distribution.Consequently, the potential operating costs have various distributions at different hours during the day.For instance, the operating cost follows a normal distribution during hours when the the majority of power generation comes from solar PV panels.Similarly, when wind generation dominates the makeup of electric power provided, the operating cost reflects a Weibull distribution.On the other hand, the effects from other systems are not as pronounced since energy systems such as the CHP generation, the electrical grid, and natural gas boilers are assumed to be readily available when needed.Statistical distributions of all considered power generation methods influence the type of distribution of the operating cost; however, the operating cost probability distribution tends to take the shape of the probability distribution for the source with the most uncertainty.Furthermore, the statistical distributions of energy loads are represented by normal distributions (Figures 17-20).The expected energy loads have Gaussian curves that center about their mean values.Therefore, the effect on the operating cost from the expected energy loads are determined by the means and standard deviations of the energy loads.For instance, the high variance (and, therefore, large standard deviation) of the cooling load during early afternoon hours leads to unpredictable cooling demand in those hours.The addition of heating and cooling loads in the analysis of the DES has generated considerable differences compared to studies of DES without heating and cooling loads.As mentioned in the proposed DES section, all of the cooling equipment is run by electrical power.In other words, the power generation from energy systems in the DES needs to fulfill both the electricity demand and the electrical energy required by the cooling equipment.During events of high electricity and cooling demands, it is more likely for the DES to purchase power from the grid because the on-site generation is not adequate.From Table 5, the standard deviation of the operating cost often exceeds $2 during peak energy demand, which typically occurs around 12 p.m. and in the early afternoon.This observation indicates that the uncertainty of the operating cost of the DES increases during events of high energy consumption.This is due to the presence of uncertainties from electricity, heating, and cooling demands.It is also notable that the standard deviations of the operating costs on the last four hours on 20 March are considerably higher than the other hours.This is caused by the uncertainty of heating load during those hours.
The projected operating costs of the proposed DES on four example days are compared to the operating costs of the current energy system during the same periods (Table 6).Studies of DES without consideration of all three major energy loads do not provide a complete picture of the total energy consumption and operating cost.This study includes both electrical and thermal loads for more comprehensive results.The proposed DES with a mixed of power generation systems shows potential for operating cost reductions.The probabilistic operating cost savings are around $150/day (approximately 10%) compared to the actual operating cost.Overall, the strategic implementation of power generation from various sources reduces the overall operating cost of the DES.
Throughout this study, there are limitations on the applicability of this method that could be addressed by future studies on reducing the operating cost of DES with stochasticity in power generation and energy demands.Critical limitations are as follows:

•
The performance of solar PV panels is assumed to be consistent throughout the lifetime of the renewable energy systems.In other words, the degradation of the energy system is not considered.

•
The operating costs on the four example days are based on the specific system sizes that were detailed in Table 2. Design choices will influence the operating cost, but variations in the design of the various systems were not considered here.

•
The CHP and boiler are assumed to be readily available.The uncertainties from these systems are not considered.

•
The unit operating costs for the energy systems are consistent throughout the year.Monthly and seasonal changes in unit costs will influence the operating costs throughout the year.

•
The start-up and shut-down costs of the energy systems are not considered.

•
All of the variables are hourly.Fluctuations in power generation and energy loads on a sub-hourly basis are not accounted for here.

•
The examples days do not capture extreme conditions/design days.Instead, the beginning days of four different astronomical seasons are studied, capturing a variety of conditions outside of the summer and winter design days.

Conclusions
DES optimization for a district of metered buildings has been investigated in this paper with consideration of uncertainties in energy loads and power generation of renewable energy resources.The optimization of this DES minimizes the operating cost, which includes the cost of meeting the electricity, heating, and cooling loads.The simulation results suggest that the operating cost of the proposed DES is less than the operating cost of the current energy system (by approximately 10%); however, the uncertainties in the system lead to unpredictability in the operating cost.Analyses based on statistical probability were demonstrated to have the capability to predict probable operating costs at a given time period.
A Monte Carlo statistical simulation has been used to incorporate the uncertainty of energy loads and power generation from renewable power generation into the DES model.The results from the case study using four example days have shown the influence of uncertain input variables.The operating cost at each hour of the four example days is heavily dependent on the sources of power generation.Even though the uncertainties of all renewable sources of power generation add to the uncertainty in the operating cost, the most dominating source of power generation at a given period determines the distribution of the operating cost.Furthermore, the uncertainty in operating cost of the electricity load is more prominent than the uncertainty in operating cost of the heating load.This is because the use of natural gas for heating is more reliable than power generation from renewable energy resources.
The low operating costs of the energy systems used in the DES contribute toward the low overall operating cost.The proposed DES incorporates solar PV and wind turbines for power generation, which can often operate at a lower cost per unit of electricity compared to purchased electricity from the grid.With on-site generation, the purchased power from the electrical grid on the four example days can be reduced by up to 26%.It is important to recognize that the percentage of on-site power generation (i.e., the reduction in purchased power) on different days of the year can vary from the on-site power generation of the four example days.Nonetheless, the buildings can be less dependent on the grid and the overall operating cost can be lowered.
In conclusion, a DES incorporating renewable energy systems offers operating cost reduction opportunities.However, the uncertainties associated with renewable energy resources can cause unreliable power generation, leading to uncertainty in operating costs.Additionally, consideration of uncertainties in the energy loads is also important.The addition of uncertainties from the electricity, heating, and cooling loads can further contribute to unpredictable operating costs.Even though the energy loads exhibit normal distributions, those with high variance can increase (or decrease) the required loads to be fulfilled.Thus, the operating cost can be highly unpredictable.A statistical analysis that incorporates the expected uncertainty is recommended for DES planning with renewable energy resources, as a deterministic calculation may give a misleading picture of the likely operating costs and potential savings.

Figure 4 .
Figure 4. Average cooling load of the districts of buildings.

Figure 5 .
Figure 5. Diagram of the proposed district energy system management.

Figure 6 .
Figure 6.Average wind speed and solar irradiation at the study location (Salt Lake City).

Figure 7 .
Figure 7. Flowchart of the Monte Carlo simulation and the Particle Swarm Optimization algorithm.

Figure 8 .
Figure 8. Operating costs of the DES of the four example days.

Figure 9 .
Figure 9. Probability of the operating cost on the 4th hour (left), 12th hour (center), and 20th hour (right) of the 20 March case study.

Figure 10 .
Figure 10.Probability of the operating cost on the 4th hour (left), 12th hour (center), and 20th hour (right) of the 21 June case study.

Figure 11 .
Figure 11.Probability of the operating cost on the 4th hour (left), 12th hour (center), and 20th hour (right) of the 22 September case study.

Figure 12 .
Figure 12.Probability of the operating cost on the 4th hour (left), 12th hour (center), and 20th hour (right) of the 21 December case study.

Figure 13 .
Figure 13.Probability of the power generation from solar PV (left) and wind (right) at the 12th hour on the 20 March case study.

Figure 14 .
Figure 14.Probability of the power generation from solar PV (left) and wind (right) at the 12th hour on the 21 June case study.

Figure 15 .
Figure 15.Probability of the power generation from solar PV (left) and wind (right) at the 12th hour on the 22 September case study.

Figure 16 .
Figure 16.Probability of the power generation from solar PV (left) and wind (right) at the 12th hour on the 21 December case study.

Figure 17 .
Figure 17.Probability of electricity load (left), heating (center), and cooling load (right) of the 12th hour on 20 March.

Figure 18 .
Figure 18.Probability of electricity load (left), heating (center), and cooling load (right) of the 12th hour on 21 June.

Figure 19 .
Figure 19.Probability of electricity load (left), heating (center), and cooling load (right) of the 12th hour on 22 September.

Figure 20 .
Figure 20.Probability of electricity load (left), heating (center), and cooling load (right) of the 12th hour on 21 December.

Table 1 .
Average loads on four example days.

Design Day Electricity (kWh e ) Heating (kWh t ) Cooling (kWh t )
Daily energy loads on 21 June and its neighboring days.

Table 2 .
Energy system specifications for the proposed DES.

Table 4 .
Purchased power and average on-site power generation on four different example days.

Table 5 .
Hourly operating costs (mean and standard deviation) on four example days.

Table 6 .
Comparison of average operating costs.

Table A1 .
Electricity load parameters (mean and standard deviation) on four different days.

Table A2 .
Heating load parameters (mean and standard deviation) on four different days.

Table A3 .
Cooling load parameters (mean and standard deviation) on four different days.

Table A4 .
Wind speed parameters (scale and shape) on four different days.

Table A5 .
Wind parameters (mean and standard deviation) on four different days.

Table A6 .
Solar global horizontal irradiation parameters (mean and standard deviation) on four different days.