Distributed Energy Resource Operation Analysis Using Discrete Event-Simulation

This paper presents a discrete-event simulation (DES) approach for simulation of distributed energy resources (DER). The DES approach provides means to adapt the energy workloads of the system according to any variations of demands that can occur due to temperature regulation requirements or operational demands. Along with a basic model based on a concrete DER configuration, additional models are presented and analysed in order to demonstrate the adaptability of the DES approach to analyse alternative configurations. The models were tested on historical energy consumption data in order to provide the expected workloads and costs. Models are capable to predict the amount of three different energies and cost for the company based on the inside and outside temperatures.


INTRODUCTION
Energy supply using distributed energy resource (DER) systems has proven to be a valuable approach to reducing cost and improve sustainability for private use as well as commercial use. With increasing energy consumption and volatile prices, DER can provide means to ensure a stable energy supply, reduce greenhouse gasses, and optimize the energy operations cost. DER systems can offer many benefits: reduced cost of fuels, reduced carbon emissions and increased energy autonomy of the facilities. Because of their efficiency, they become more and more popular [26,27].
Especially larger facilities such as hospitals, universities, office buildings can profit from these systems by including alternative energy source to electricity from the power grid, which can be provided by combined cooling, heating and power (CCHP), wind and solar power, energy storage systems, gas-fired boilers, among others. With stable power compared to varying wind or solar, CCHP systems [1] provide a reliable energy source that is especially important at facilities such as hospitals, airports, etc. With varying demands, optimizing the workloads of such distributed energy resources can reduce both operation costs and emissions. While depending on energy demands, DER systems can provide not only reduction of operating cost but can also generate income by selling surplus electricity into the power grid [2].
Operation of such systems has been studied extensively in order to improve efficiency of DER systems. Both mathematical optimizations [3][4] and simulations [5][6] are widely used approaches for solving the energy related problems. The importance of management strategies has been presented in [7], while CCHP performance and optimization approaches were analysed in [8] as well as in [9] and [10]. Scheduling problems concerning DER systems were addressed in [11] and [2].
Despite simulation being a used approach, discreteevent simulation (DES) has not yet been regarded broadly for energy simulations. DES is a decision-making tool in which the focus is on the energy cost and time. It is used to build dynamic models, which simulate a part of the whole process with the goal to optimize productivity of the cost [21]. The DES models consist of the state variables changes that are observed and changed at the discrete set of point in time interval [28]. On the other hand, DES systems are widely used for the analysis of complex systems [22], which have multiple factors that make the analytical approaches very difficult to use.
The focus in the DES models is on the state variables changes, which are observed and changed at the discrete set of point in time interval [23]. According to [24] DES can be very useful to solve issues related to continuous approaches like energy flows.
The traditional approach for energy distribution planning is mathematical programming with the cost minimization as goal. Zoka et al. [20] used simple linear programming, for the optimal operation problem with energy. Their target function was based on operation costs of DERs, capital costs of DERs and an electricity charge that should be paid by consumers.
Hawkes and Leach [19] used deterministic linear formulation for dealing with the energy. The objective function represents the equivalent annual cost of meeting a given energy demand profile. Another method, used for planning and optimisation of energy in distributed generation system is Integer Programming [16].
Some authors use mixed integer linear programming [14,17] and Monte Carlo simulation [15] to predict the energy consumption. Monte Carlo simulation is used because of uncertainty in the form of probability distributions of energies. Combination of both methodologies is usable especially in public buildings such as hospitals, hotels, universities and others, where energy consumption does not depend on a predetermined production plan.
Shaneb et al. [18] developed a generic optimal online operation strategy for micro combined heat and power technology capable of minimising the operation costs of similar systems.
The presented paper analyses the energy workload using the DES approach. A DES model, based on a real DER system is presented and calibrated based on historical data and linear regression. The data is used in order to provide the demands based on external temperature and the necessary DER workload needed to provide the needed internal temperature. The DES model is used to derive alternative configuration, allowing analysing cost and energy efficiency and thus providing the most suitable DER option.

METHODOLOGY
A discrete event simulation (DES) approach for analysing the energy demands and finding the optimal energy workload for different energy resource configurations from basic tri-generation using CCHP variants with energy storage systems is presented.
The basis for the simulation model provides the energy demands that are separated into cooling, heating, and electricity. Depending on the facility requirements, each of the demand types is used either for maintaining indoor temperature or for service requirements. While temperature regulation depends on external temperature, service requirements that depend on the time of day can provide additional demands to which the DER system must adapt.
Discrete events for the simulation models present any variations in energy demands that occur due to changes in the interior or exterior temperatures, as well as variations due to service requirements.
With available total cooling and heating energy demands, the first step is dividing them into the energy used for the system operation and energy for heating or cooling. Based on the assumption that in cooler days it is not necessary to cool the facility, all the cooling energy is used for facility operation, while in warmer days all the heating energy is used for facility operation and none for temperature regulation. The energy demand for operation is calculated for the whole year. The difference between total energy demands and operating energy demands provides the energy demand for heating and cooling. Multiple linear regression is used to provide the cooling and heating demands depending on the internal and outer temperatures. The real DER system provides hourly energy readings, that are used to analyse a yearly consumption of purchased and sold electricity, cogeneration of produced electricity and heat, the gas-fired boiler produced heat, and absorption and compression heat pumps produced cooling, as well as energy workload of each component. The energy workload was divided into the four seasons according to the average external temperatures: from beginning of March to end of May for spring, beginning of June to end of August for summer, beginning of September to end of November for autumn, and from December to end of February for winter. Further distinction is made into working and non-working days.
The demand analysis is performed by comparing the interior and external temperature provided for each hour as well as the consumed or produced energy for each component. Multiple linear regression is used in order to predict the expected energy demands based on the temperature.
The expected demands are given as follows: where X1 represents internal temperatures for each hour, X2 is the external temperature, h0, c0 and e0 are intercepts, and h1, h2, c1, c2, e1, e2 the estimated regression coefficients. Each of the regression coefficients represents the change in demand relative to a unit of change in the independent variable. The produced energy either meets the demand or provides surplus. In cases where initial amounts of used energy are dependent on the demands, pull strategy is used to define conditions and equations.
Due to dependency of energy flow through the system, every single change in the hourly demands can cause a change at every link between the components of the model. The main data observed here are the energy amount used for demand meeting, the energy sold to power grid and the energy costs. Tab. 1 shows the prices of energy, used in our models.
The price of electricity depends on the time of consumption. High tariff is used on the daily working day (between 29th March and 24th November from 7 a.m. to 11 p.m. between 1 st of January to 28th of March and from 25th November to 31th December between 6 a.m. and 10 p.m.). During non-workdays and all other hours, low tariff is used. The prices were obtained from a national energy provider [25].

DER SIMULATION MODELS
In this section, three different DER models are presented with the first based on a real DER configuration and two additional models to demonstrate the adaptability of the model to include new technologies. All models are capable of predicting the electricity and natural gas needed for each hour individually in the studied system. The energy, needed in each hour individually, represents a logistical package.

The Basic Model
The basic model is modelled on the real system with the configuration given as in  The model consists of a cogenerator, which produces electricity (Wec) and heat (Whc) from natural gas. For all models in this paper, we assume that the amount of used natural gas energy (Wg) from the cogenerator is constant throughout the year. The second consumer of natural gas energy is the gas-fired boiler, which provides additional heating (WhBOIL). Along with those, the absorption and compression heat pumps provide cooling (WCA, WCchp). Further energy demands need to be met by electricity that can be either met by the cogenerator or be purchased from the power grid (Weinc). Depending on external temperature the boiler and cogenerator provide heating for heating demand on cool days, while on warm days the heat can be used to operate the absorption heat pump. As the demands provided by the regression need to be met the workloads of the components need to adapt to it, meaning that the balance between the used electricity and gas can influence the operation cost.
The model (equations are provided in continuation) provides total gas consumption given in Eq. (4), that is based on generated heating by the cogenerator efficiency, Eq. (5), while the actual heat demand-meeting depends on whether the cogenerator produces more energy than needed, Eq. (6). If the cogenerator does not meet the heat demand, the boiler provides additional heat, Eq. (7). On warm days, cogeneration can produce heat surplus, Eq. (9), which is used for the absorber with an efficiency stated in Eq. (10). Electricity produced by the cogenerator (11) can be used to meet the demands, Eq. (12), create surplus, Eq. (13), or require additional electricity from the grid. Depending on produced electricity it can be used to run the compressor, Eq. (14) if the cooling produced by the absorber is not sufficient, Eq. (15). Insufficient electricity in case of non-meeting of the cooling demand is purchased from the power grid, Eqs. (16) and (17). In case of electricity surplus, after all the demands are met, it can be sold to the grid, Eq. (18), while electricity must be purchased if electricity consumer demands are not met, Eq. (19).

DER General Energy Storage Model
As technological advances provide new solutions to improve energy efficiency of DER systems, an alternative model with energy storage systems is presented (Fig. 2). For the storage of cooling energy, 5 ice tanks with the capacity of 570 kWh each are introduced. For the storage of surplus heat energy, a hot water tank with the capacity of 10 000 kWh, and for storage of electricity 10 batteries with the capacity of 360 kWh, are used. The presented model is based on preference of cooling surplus, meaning that all electricity and heat energy surplus is used for producing the cooling energy always when the ice bank capacities are not reached. Compared to the previous model, this one assumes a constant workload of the gas-fired boiler, Eq. (20). This can be used to support the heating demands along with the cogenerator, Eq. (21) or to provide heating surplus stored in the hot water tank until its capacity is reached, Eq. (22). In case of available surplus, this can be used to provide heat demand meeting, Eq. (23) or absorption heap pump, Eq. (24). The surplus can also be complemented by the cogenerator heat production, Eq. (25). Surplus is provided in case of enough spare heating from the cogenerator and (26), while the total surplus depends on its efficiency, Eq. (28). In case of a full hot water pool capacity, any additionally generated surplus is lost, Eq. (29).
With preference to providing cooling surplus, the most cost efficient input provides the absorption heat pump from the heat surplus, Eq. (30). If the cooling demand is met, Eq. (31), any surplus can be stored in ice banks, Eq. (32). The heating energy used for the absorption heat pump is fuelled by the cogenerator with Eq. (33), while the surplus cooling is provided as the difference between the complete absorber production and the cooling demand meeting, Eq. (34).
The storage model incorporates batteries to store electricity as well, providing a means for storing electricity surplus in them instead of directly selling it to the power grid, Eq.

DER Electricity Storage Model
As alternative to a complete storage system, a model using only electricity storage is presented. Ten batteries with the capacity of 360 kWh are introduced. All surplus electricity after electricity and cooling demand are met is stored in batteries. With full capacity, the electricity surplus is sold back into a grid. Surplus from batteries can be used to run the compressor heat pump to meet the cooling demand and directly to meet the electricity demand.

Figure 3 Model with batteries
Cogenerator heating is applied in the same manner as in the first model. Electricity from the cogenerator is the same, with the difference of the electricity surplus not being sold back into e-grid directly, but it is stored into batteries, Eq. (35), only the remaining surplus is sold, Eq. (37). The difference from the general energy storage model provides the cooling production, Eq. (48) where the cooling is no longer a priority, but adapts to the electricity requirements, Eq. (51).

Comparison on the Season's Level
The models presented in the previous chapter are capable to predict the amount of electricity needed to run the cogenerator, amount of electricity needed to meet the electricity demand and amount of natural gas needed to run the boiler and cogenerator. Because of the different needs for individual energy types, the amount of energy needed to meet needs and different models are compared on the seasonal level.
Model 2 operates with a constant supply of the natural gas, on the other side, models 1 and 3 have modified operation dependent on lack of heating energy, after the cogenerator produces heat on the basis of own capabilities.
The amount of sold electricity is greatest in model 1, because there is no storage for electricity and all of surplus electricity is immediately returned to the power grid. Because of the condition in model 2 that all of surplus of electricity and heat energy is immediately used to produce the cooling energy, the amount of sold electricity is low.
Electricity purchased for electricity demand meeting is higher in model 1, because there is no storage system, meaning that electricity deficit must be compensated from power grid, while in all other presented models, the deficit can be replaced by the existing surplus in the batteries.
Because the cooling surplus that is produced because of the preferences set in model 2 to produce as much cooling energy as can be stored in ice bank, there is no cooling deficit that requires purchasing electricity for running the compressor heat pump, while in the other model electricity to produce the cold is needed.
Figs. 4 and 5 present the amount of sold and purchased energy for individual seasons. Most electricity is bought in the summer time. Electricity is used for running the compressor heat pump to produce the cooling energy. On the other side, the usage of natural gas is lower in summer time than in winter.
In all 4 seasons model 2 is not effective due to the constantly produced heat surplus that is not consumed. Based on the data on the amount of individual energy, in winter, spring and autumn time the most appropriate is model 3 and in summer time model 1.

Comparison on Year's Level
Cost comparison between the models is presented in  Tab. 2 shows the total energy cost based on the used operation model, with the third model providing most beneficial alternative. Given the cost differences by including different storage solution indicates that analysing operation strategies is essential in order to minimize the costs.

CONCLUSION
The results show that merely providing storage systems does not provide cost reduction by itself but requires strategic planning based on energy type production, demand, and cost. While the basic model was based on a real CCHP system and calibrated using historical data, the presented storage models provide not only the means to include other technology but also assess their operation and impact on the whole system. Despite multiple storage capabilities the electricity storage model proves to be superior due to the focus on electricity, while the multi-storage system requires too much heating and electricity in order to provide cooling. This implies that fine-tuning of CCHP component workloads and storages is necessary in order to reduce the cost, which can be achieved through simulation.
The presented discrete-event simulation proves that applying events as changes in internal or external temperature, component workload, or energy demand, can be used to analyse the DER behaviour and operation cost of such systems. The flexibility of the model allows the introduction of new technology with known specification on one hand, while on the other demand tuning can be used in order to analyse the maximal system performance.
Future work includes combining mathematical programming with the discrete-event simulation in order to provide optimal operation strategy.