Keywords

7.1 Introduction

The optimal performance of a power system is based on the equivalence of power production with power consumption and losses. In the power systems, operating point is continuously changing. Therefore, the production level of power generator units should be changed to balance production and consumption. These systems have been the main power supply systems of the last century. In such structures, responses to demand changes are made through a change in production plan and supply side management. However, the use of large-scale and costly production units in order to meet peak demands during the year is not a good choice. Because, in addition to the high cost of these systems, this additional capacity is used only in limited periods throughout the year and actually leads to capacity waste [1].

Nowadays, other options such as distributed energy resources (DER), especially renewable energy sources (RES), energy storage systems (ESS), and DSM have been introduced to replace current energy supply systems and have led to changes in the structure of energy systems. The development of RES, especially as distributed generation (DG) resources, has some serious problems, such as high investment costs, geographical location dependency, fluctuating nature and precarious planning of production, and the need for expensive equipment such as control systems [2]. ESS, despite their many advantages, such as facilitating the integration of RES, are still considered as expensive and under-study technology. On the other hand, all of the above options are also based on changing the production plan based on the demand and so supply side management. But among the above options, DSM is a practical approach and an immediate solution that focuses on matching demand with available resources.

In this regard, this chapter provides a brief introduction of DR programs. Subsequently, an investigation is carried out on the implementation of DR programs in the energy hub models in the literature. Finally, a mathematical modeling and simulation of an energy hub are presented in the presence of DR programs and the effects of these programs on the operational program of the energy hub have been investigated.

7.2 DSM Concept

Demand-side energy management involves a series of interconnected activities between the electricity utility and its customers in order to reduce network peaks and energy consumption, as well as smoothing the consumption curve of the network in order to provide more efficient and low cost energy for consumers. In the beginning, consumption management was introduced as load management (LM) program to reduce peak consumption. Gradually reducing consumer costs, resource allocation, and reducing environmental pollution were introduced as other incentives for DSM. By adapting these policies, the level of consumer comfort will not be reduced. In fact by maintaining consumers’ level of comfort and well-being, they will consume less energy, and/or the pattern of consumption will be changed. This leads to a reduction in operation costs and it will also be possible to earn money. DSM is a widespread concept that includes things like load growth, energy savings, energy efficiency, and DR programs. Load growth refers to programs that are used to increase the level of load through electricity supply in a strategic state. Energy savings refers to measures that reduce energy consumption. Energy efficiency refers to programs aimed at reducing energy consumption through specific systems on the consumption side and typically without affecting the services provided. These programs reduce total electricity consumption by replacing equipment with energy efficient technologies in existing systems to produce the same share of services for subscribers.

According to the definition of the American Energy Academy, DR refers to programs to change the pattern of electricity consumption by changing the pattern of final consumers’ consumption by responding to a change in electricity prices over time or incentive payments to encourage a reduction in electricity consumption at a time when the wholesale market price is high or reliability of the system is at risk [3]. DR programs lead to lower energy consumption at times when the electricity price is high and it changes the pattern of consumer consumption and, consequently, the load curve. Advantages of the presence of costumers in DR programs include incentive payments, reduced billing, while enhancing system reliability, better market performance, and lower infrastructure costs.

7.2.1 DR Programs

In traditional systems, consumption management programs were used to overcome some power system problems. DR programs were also part of these programs. But after the restructuring of power systems, these programs were gradually set aside due to inconsistencies with the nature of the market. But after some time due to problems such as instability of price, re-implementation of consumption management programs was again considered. This time these programs were modified in such a way to fit the restructured power system. After restructuring of the power system, DR programs have been one of the main parts of the consumption management programs. Today, these programs are considered as an appropriate solution to some of the problems of the power system.

DR includes approaches from DSM that are used to change customer consumption due to price changes in the market. It should be noted that some such programs were used in the traditional electricity system in the form of multi-tariff meters. Different pricing for electricity causes two long-term and short-term changes in consumption patterns. In the long term, the high price of electricity will lead to savings in power consumption. If the tariffs difference between peak and off-peak hours is high, consumers will be encouraged to install energy storage and efficient devices in order to prevent the use of electrical energy during high-price hours. Therefore, in the long term, the creation of various tariffs for power consumption will increase the energy efficiency of the consumer. Also, in the short term, some customers have the opportunity to reduce their consumption or shift this consumption to low-cost hours. For example, an industrial consumer, if the production at peak hours is not profitable due to the high price of electricity, decision makers would be discouraged from producing goods during these hours.

In general, the main objective of DR is to reduce power consumption during critical hours. Critical hours are the hours when the price of the wholesale market is high or the system’s resiliency level is low due to accidental events such as outgoing transmission lines and generators, or severe weather conditions. Two factors that can lead to consumer responsiveness are the change in retail price of electricity or the implementation of an incentive program to satisfy customers to reduce their consumption during critical hours. This incentive is different from the normal price paid for electricity. This incentive can be a payment to the consumer to reduce the consumption, set a penalty for not reducing the load, or both. DR is in fact a change in the behavior of loads in response to a stimulus. DR can appear in the form of reprogramming of an industrial consumer production plan, reorient a commercial customer’s heating system, or direct control of the electricity company on the domestic water heater system. DR programs are widely used for lowering cost of electric power utilities [4], increasing profit of retailers [5], increasing power system voltage stability margin [6], increasing profit of energy hub owner [7], and many other applications. Further discussions in the literature review section will be presented separately.

7.2.2 DR Programs Classification

DR programs can be divided into two main types including incentive-based (IB) and price-based (PB). IB programs include LM programs and market-based programs such as demand side bidding, capacity market, and ancillary services. PB programs are based on dynamic pricing such as time of use (TOU) pricing, real time pricing (RTP), and critical peak pricing (CPP). LM includes direct load control (DLC) and interruptible load control (ILC). The DLC usually involves residential users and refers to programs that can control a costumer load, such as home appliances, through direct operator control. The ILC usually involves commercial and industrial subscribers, and it refers to programs that can reduce peak load by interrupting customers’ load at peak hours with direct control of the operator or subscribers’ actions upon request from the operator. The above classification can be seen in Fig. 7.1.

Fig. 7.1
figure 1

Classification of DR programs

7.3 Literature Review

7.3.1 DR in Residential Energy Hubs

In many countries, the residential sector has a significant share of energy consumption. However, due to significant losses in energy distribution systems, as well as lack of responsive loads and energy efficiency equipment, energy management in the residential sector is not appropriate and a significant share of energy in this sector is wasted. For example, the share of the residential sector in United States energy consumption is 22%, which 47% of this energy consumption are electricity related losses in this sector [8]. On the other hand, energy prices are rising due to issues such as energy resource constraints, increased demand, and the restructuring of energy markets. Therefore, this section requires the use of alternative systems and programs to increase efficiency.

In the residential sector, DSM can be one of the main options for the energy management in buildings. However, the effective participation of residential loads in DSM programs requires the management and optimal control of various equipment in a residential building. Accordingly, we can classify residential loads into two main groups of responsive loads and non-responsive loads, which can be seen in Fig. 7.2.

Fig. 7.2
figure 2

Classification of the smart home loads

In a residential building there are loads that have a large share in energy consumption and, by an optimal controlling their consumption can be optimized without affecting the consumer’s comfort. In the above category, equipment such as a washing machine and a dishwasher that has a specific operating interval and their operation can be shifted to another period of time, are considered as shiftable loads. Loads such as lights can be dimmed in critical situations, and can be considered as curtailable loads. Another part of the loads can be disconnected in critical conditions, and the consumption of them can be transferred to another period, which is said to be interruptible loads. The plugin electric vehicle (PEV) charging is considered as an interruptible load. The regulating loads are loads that can be programmed to operate within a range of operations with a slight deviation from the defined level. Heating and cooling loads are considered as examples of this category. However, depending on the operating range and the simulation steps, the classification can vary for each of these loads [9].

Optimizing a residential building with CHP and PEV in the form of an energy hub to participate in DR programs with TOU pricing has been investigated in [10]. The effects of the presence of responsive and non-responsive loads are studied in this energy hub. The results showed that when the energy hub is not responsive, optimal energy production planning is the only way to participate in the DR program. In this case, during high energy price hours, CHP production will be increased to reduce electricity purchases. In the presence of responsive loads, the possibility of load shifting can also be provided and the operating costs of subscribers will be reduced. A similar optimal operational plan for an energy hub within the framework of a combined cooling, heat and power (CCHP) system for participating in DR programs can also be found in [11].

One of the technologies that can lead to more effective participation of the energy hubs in DR programs is energy storage system, and in particular potential storage devices such as PEVs. Options such as aggregation, two-way communication with the network and vehicle to grid (V2G), in addition to solving the problems of charging electric cars, will enable PEVs to be used to improve the network’s sustainability. A model for optimizing the performance of a residential energy hub with PV, PEV, and ESS has been presented in [12]. Optimization results in this study showed that optimal control of PV and responsive loads in the presence of ESS and taking into account the ability of V2G for PEV lead to peak shaving and lower operating costs for the energy hub. Optimization of the performance of a CCHP in the form of an energy hub model for participation in the DR program is investigated in [13]. The results of this study showed that the use of thermal storage and PEV for participation in the DR program lead to peak shaving, increasing the CCHP’s contribution in demand supply and thus reducing the operating costs of the energy hub.

A comprehensive modeling framework for optimal management of a smart energy hub with the goal of minimizing energy costs, peak demand and emission has been presented in [14]. In this study, consumer preferences and also weather and electricity price forecasts are considered in modeling. The results of this study showed that optimizing the performance of a residential house in Ontario, Canada has led to a 15% drop in peak demand, and a reduction of 45% in total energy costs.

In summary, home energy management systems can be modeled in the framework of energy hub models, which improve the performance of these systems and benefiting from the benefits of concepts such as DSM, DER, and smart energy systems. The integrated management of home energy system in the framework of the energy hub facilitates the participation of houses in DR programs and also, integration with multi-energy systems (MES) and smart grid becomes easier, which improves the performance and efficiency of home energy system [15].

7.3.2 DR in Commercial Energy Hubs

A large part of the world’s energy is consumed in buildings. Buildings worldwide account for 40% of total primary energy consumption and are responsible for one third of greenhouse gas emissions [16]. Therefore, energy efficiency in this sector can have a major impact on reducing energy consumption and emissions. Commercial buildings that can include service, office, and entertainment buildings are among the largest buildings in the world that have significant energy consumption. The energy supply of this building in the past was mainly done through purchasing from energy networks. However, today factors such as rising energy prices, restructuring in energy markets, and finding efficient DG resources have led to an increase in the share of DER in supplying energy demand for commercial buildings. RES and multi-generation systems have been most used in commercial buildings.

One of the main features of commercial buildings is that they have large energy consumers and most of their energy consumption is related to lighting, heating and ventilation and air conditioning (HVAC) systems. Therefore, controlling these loads can greatly improve the energy efficiency of the building [17]. On the other hand, the pattern of consumption of these major loads is usually predictable. The energy consumption in commercial buildings follows a daily, monthly, and even seasonal pattern. For example, energy consumption in an office building has two patterns of weekday and weekend patterns, which energy consumes for the whole year follow from these two patterns. This feature represents the high potential of energy systems in commercial buildings to manage demand and participate in DR programs. Also, as mentioned, the existence of DER such as CHP, PV, wind turbine, fuel cell will improve the performance of commercial buildings in DR programs.

On the other hand, ESS performance in commercial buildings can be better than residential buildings. Peak demand in commercial buildings occurs throughout the day, and DER such as PV can produce their most energy during these hours. In this case, the use of ESS is minimized, and the active participation in DSM programs and the energy stored in them can be used to sell to the network and generate revenue.

An energy management system for the optimal operation of a commercial building in the framework of energy hub with the aim of minimizing the cost, increasing efficiency, and reducing emissions has been presented in [18]. The results showed that by combining different technologies and integrated management of the building energy systems, building’s peak demand and energy cost is reduced while the lower emissions are obtained.

In the commercial buildings, an integrated system for energy management is required to make optimal scheduling, successful participation in the DSM programs and benefit from the smart grids advantages. This integrated management leads to lower cost, peak shaving, reducing environmental impact and successful participation in DR programs which reveals a great potential for application of energy hubs models in this sector.

7.3.3 DR in Industrial Energy Hubs

The industrial sector is the driving force behind the development of each country, and it is usually responsible for the most energy consumption and greenhouse gas emissions. According to the EIA report, in 2010, 52% of the world’s energy consumption has been happened in the industrial sector and this energy consumption rises by an annual rate of 1.4% from 2010 to 2040 [19]. Demand in the industrial sector, with the growth of industrialization, the rise of new industrial countries and consumption growth in the developing countries is quickly growing.

Therefore, energy management in this sector is essential and can have a huge impact on reducing consumption and optimizing the use of existing resources. Implementing DSM programs, especially DR, in the industrial sector can be a good option for energy efficiency improvement in this sector, but the implementation of these programs in this section is always faced with serious challenges. The existence of various flows, such as the raw materials along with the energy flow, as well as the need to maintain the balance of production with the demand and quality of manufactured goods, and the problems of maintaining the competitiveness of the production unit in the industrial sector are the main problems of implementing DR programs.

In this regard, an integrated management framework is essential for the optimal management of various systems and technologies in an industrial unit. The use of RES in industrial units and their contribution to DSM programs have been studied in [20]. In this study, wind turbines provide part of the energy demand of two industrial units, and these units have the ability to manage their demand in the content of various DSM programs. The results of this study showed that the participation of industrial units in DR programs has led to an increase in the share of wind power in supplying energy and the shift in demand to low energy price hours. Short-term scheduling of industrial cogeneration system in the presence of DR programs is studied in [21] without consideration of uncertainties. Optimization of the performance of a cogeneration industrial unit is formulated in [22] for participation in DR programs and the exchange of electricity and heat with adjacent systems in a stochastic environment. The risk constrained scheduling of industrial heat and power systems is proposed in [23]. Stochastic scheduling of industrial CHP systems with DR and RES is provided in [24]. An operational optimization model for an oxygen production unit for participation in DR programs and the day-ahead electricity market was presented in [25]. The results showed that optimal participation in DR programs result in a load shifting to low energy price hours that leads to a reduction in unit’s costs and an improvement in network reliability. In this study, only the implementation of Passive DR programs is considered, and the implementation of such models on a large number of business subscribers can lead to create new peak demand in the network.

In a passive DR program usually power supply companies provide a general model for energy pricing regardless of the type of consumers and their consumption behavior information. This can lead to a transmission of a large part of consumer demand to off-peak and low prices periods and creation of new peaks in the system which reduces the benefits of DR. To avoid this issue, consumption patterns of each consumption sectors must be considered and DR programs should be presented based on a detailed categories of consumers which results in an active DR program. On the other hand, the number of industry consumers is usually less than other sectors and the assessment of their behavior and so the implementation of active DR in the industrial sector can be easier. A model of the active DR program based on dynamic pricing for industrial consumers has been provided in [26]. An agent-based approach for modeling the behavior of consumers to participate in DR programs and choose the best behavioral pattern considering various industrial processes for the three cement plant has been presented. The results showed that the implementation of active DR results in lower peak demand in the industrial units and in the whole system load curve is more smoother than passive DR.

Therefore, it can be said that to optimize the performance of industrial units several purposes can be considered such as lower costs, increase profits, reduce primary energy consumption and raw materials, reduce waste, reduce environmental impacts, and so on. These objectives can be achieved by different methods. One solution is the use of distributed energy resources such as DG, especially cogeneration and RES, as well as ESS. Moreover, demand scheduling can be used to manage energy, raw material consumption and waste. In addition, DR can be used to reduce system costs and participation in energy markets. Planning all this together requires an integrated management system in the form of an energy hub model.

7.3.4 DR in Agricultural Energy Hubs

Energy in agriculture plays an important role, and energy efficiency in the agricultural sector has a direct impact on sustainability and food security in each country. Therefore, optimum use of energy in agriculture plays a major role in agricultural sector productivity [27]. On the other hand, increased demand for food and the growth of the use of mechanized equipment in agriculture have led to an increase in demand for energy in agriculture. A significant portion of this energy demand is supplied through fossil fuels. However, agricultural farms are usually located in remote areas and there is a high potential for using DER and especially RES in these areas. The use of DER in the agricultural sector can prevent the expansion of energy distribution systems to these areas that leads to lower costs and energy losses. Also, the use of RES, in addition to supplying energy demand of farms, can also help to solve environmental problems.

In addition to the need to expand the use of DER and, in particular, the RES in the agricultural sector, intelligent technologies can be used to optimize farm management. Using intelligent technologies in the content of a smart energy system can be achieved by optimal measurement, control and management, which can increase the efficiency, reliability, and optimal utilization of energy sources.

On the other hand, energy consumption in agriculture is increasing due to factors such as lack of productivity, growth of technology, and automated mechanism and the need for more food in the world.

Despite the high potential in the farms for energy supply from RES, unfortunately, still the largest share of energy production in the agricultural sector is related to the fossil fuels. The waste of agricultural products is a good source for the production of renewable fuels such as biogas, bioethanol, and biodiesel which can be used in CHP to supply energy of farm and even selling excess power. Compared to other sectors, less attention has been paid to the use of RES in the agricultural sector. While agricultural farms are usually in remote areas and there is a great potential for the use of RES to avoid the high costs and losses of energy transfer to these areas.

In addition to the RES integration, one important strategy that has attracted a lot of attention recently is the use of smart technology especially smart meters in the agricultural sector. Smart grid, with improved monitoring, control and metering, improves the efficiency, sustainability, reliability, and optimal distribution of the energy resources. Using smart technology is not limited to the smart grid and the development of these concepts in the agricultural sector led to the creation of concepts like smart farms, smart agriculture, and precision agriculture. So in the agricultural sector, the information and communication technology can be used for the monitoring and collecting information about the physical condition of products and farm in order to classify the process, decision-making, statistical reports, forecasting, etc. A variety of the wireless technologies and their applications in various agricultural sectors can be found in [28]. A framework for the application of smart systems in the form of wireless systems for smart farms in order to help the farmers for real-time control of the production, reporting, statistical information in the context of the smart grid is presented in [29]. A model for the integration of the smart grids and smart farm with an emphasis on information management systems has been studied in [30]. It is a model of a smart farm that includes a waste-based CHP that can exchange power with the smart electricity grid. The use of the precision agriculture features and communication between the farm and smart grid results in improved farm planning, optimal exchanges with the power grid and even participate in energy markets and the DSM programs. According to our knowledge, there is no comprehensive model in literature for optimal performance of smart farms to manage their energy systems and energy exchange with neighboring systems particularly in the content of DSM programs. Due to the ability of the energy hub in the communicating between energy systems in the presence of various energy carriers, there is a good potential for smart farms modeling in the form of smart agricultural energy hubs.

7.4 Energy Hub Modeling

In order to investigate the effects of DR programs in energy hub models, this study attempts to use a complete model of energy hub that has inputs, converters, and storages to meet different demands. A schematic representation of the studied energy hub can be seen in Fig. 7.3. This energy hub is powered by electricity and natural gas networks and wind power. Transformer, converters, CHP, and boiler are used to convert different energy carriers. Electrical and thermal storages are selected as ESS in this energy hub. In demand side, demands for electricity, heat, and natural gas is considered for this hub. Also DR capabilities for electricity demand are included in this model.

Fig. 7.3
figure 3

A schematic representation of the studied energy hub

7.4.1 Objective Function

In the model presented for energy hubs, cost, reliability, and environmental indicators are included in the objective function. The proposed objective function is formulated based on the cost of purchasing energy from various networks, revenue from electricity sales to the network, cost for charging and discharging electrical and thermal storages, DR costs, emission costs, and reliability indicators. In this chapter, the objective function in a deterministic environment is optimized to minimize operational costs in a one-day time horizon under the influence of different constraints. The objective function of the optimal management problem of the proposed energy hub can be considered as follows:

$$ {\displaystyle \begin{array}{l}\mathrm{minimization}\;\mathrm{of}\;\mathrm{TC}\\ {}=\sum \limits_{t=1}^{24}\left[{\pi_e}^N(t){P_e}^N(t)\right]+\left[{\pi_e}^W{P_e}^W(t)\right]+\left[{\pi_g}^N{P_g}^N(t)\right]\\[4pt] {}+\left[{\pi_e}^S\left({P_e}^{\mathrm{ch}}(t)+{P_e}^{\mathrm{dis}}(t)\right)\right]+\left[{\pi_h}^S\left({P_h}^{\mathrm{ch}}(t)+{P_h}^{\mathrm{dis}}(t)\right)\right]\\[4pt] {}+\left[{\pi_e}^{\mathrm{DR}}\left({P_e}^{\mathrm{shup}}(t)+{P_e}^{\mathrm{shdo}}(t)\right)\right]+\left[{\pi_e}^{\mathrm{ENS}}{P_e}^{\mathrm{ENS}}(t)\right]+\left[{\pi_h}^{\mathrm{ENS}}{P_h}^{\mathrm{ENS}}(t)\right]\\[4pt] {}+\left[\sum \limits_{t=1}^{24}\sum \limits_{\mathrm{em}=1}^3{\pi}_{\mathrm{em}}\left({{\mathrm{EF}}_{\mathrm{em}}}^N{P_e}^N(t)+{{\mathrm{EF}}_{\mathrm{em}}}^{\mathrm{NCHP}}{P_g}^{\mathrm{NCHP}}(t)+{{\mathrm{EF}}_{\mathrm{em}}}^{\mathrm{NB}}{P_g}^{\mathrm{NB}}(t)\right)\right]\end{array}} $$
(7.1)

In the above objective function, energy purchases from different networks (electrical energy and natural gas) are included in the respective costs π e N(t) and \( {\pi}_g^N \) respectively, for electricity and natural gas networks. Also, in this objective function, P e N(t) can have positive and negative values and the energy hub has the potential to sell power and earn money. The cost of purchasing wind power P e W(t) is at a price of π e W, which in this study the wind turbine is belonging to the energy hub and the purchase price of zero for wind power is considered. In the case of energy storage devices, the operating costs for charging P e ch(t), P h ch(t) and discharging P e dis(t), P h dis(t) are considered with the corresponding unit costs π e S and π h S for electric and thermal storages, respectively. In addition, operating costs P e shup(t) and P e shdo(t) for the load shift are modeled at unit cost π e DR in the form of another operating cost for the energy hub. The penalty for not-supplied demand P e ENS(t) and P h ENS(t) is priced with π e ENS and π h ENS for electrical and thermal demands, respectively, to include reliability indicators in the management of energy hub. Finally, the cost of CO2, SO2, and NO2 emissions for the grid, boiler, and CHP is taken into account in the final statement of the objective function. The above objective function is affected by various constraints, which are described below.

7.4.2 Operational Constraints

The optimal performance of an energy hub requires consideration of various constraints that their satisfaction will provide the optimal operation for the system. Each of these constraints is stated separately below.

7.4.2.1 Demand Constraints

The power equilibrium constraints for supplying electrical, thermal, and natural gas demands can be formulated as follows:

$$ {\displaystyle \begin{array}{l}{P}_{\mathrm{ed}}(t)=\left[{A}^N{\eta}_T{P_e}^N(t)\right]+\left[{A}^{\mathrm{CHP}}{\eta}_{\mathrm{echp}}{P_g}^{\mathrm{NCHP}}(t)\right]+\left[{A}^W{\eta}_C{P_e}^W(t)\right]\\[5pt] {}+\left[{P_e}^{\mathrm{dis}}(t)-{P_e}^{\mathrm{ch}}(t)\right]+\left[{P_e}^{\mathrm{shdo}}(t)-{P_e}^{\mathrm{shup}}(t)\right]+\left[{P_e}^{\mathrm{ENS}}(t)\right]\end{array}} $$
(7.2)
$$ {\displaystyle \begin{array}{l}{P}_{\mathrm{hd}}(t)=\left[{A}^{\mathrm{CHP}}{\eta}_{\mathrm{hchp}}{P_g}^{\mathrm{NCHP}}(t)\right]+\left[{\eta}_B{P_g}^{\mathrm{NB}}(t)\right]\\[5pt] {}+\left[{P_h}^{\mathrm{dis}}(t)-{P_h}^{\mathrm{ch}}(t)\right]+\left[{P_h}^{\mathrm{ENS}}(t)\right]\end{array}} $$
(7.3)
$$ {P}_{\mathrm{gd}}(t)=\left[{P_g}^N(t)\right]-\left[{P_g}^{\mathrm{NCHP}}(t)\right]-\left[{P_g}^{\mathrm{NB}}(t)\right] $$
(7.4)

Electricity demand P ed(t) in Eq. (7.2) is achieved by using wind power P e W(t) through a wind turbine with accessibility A W, [31] and its converter efficiency η C . CHP provides electricity by burning gas with an efficiency of η echp. Part of the electric demand can be reduced (P e shdo(t)) or increased (P e shdo(t)) with demand shifts to other timescales, which allows the participation of energy hub in DR programs. An electrical storage device is used to store additional power P e ch(t) and discharge it P e dis(t) to supply the demand. The remaining electrical demand is provided by purchasing electricity from the network P e N(t) with availability A CHP, [31] and transformer efficiency η T .

Thermal demand in the Eq. (7.3) will be provided through CHP with availability A CHP [32] and the gas-to-heat conversion efficiency η hchp. Boiler with efficiency η B is used as a backup system to provide heat demand. Thermal storage is considered for charging P h ch(t) in case of excess production and discharge P h dis(t) to meet demand. The gas demand P gd(t) for energy hub in Eq. (7.4) is achieved by direct purchasing from the gas network P g N(t) and after deducting the amount of gas consumed in CHP, P g NCHP(t), and boiler P g NB(t).

7.4.2.2 Network Constraints

In the purchase from electricity and gas networks, the restrictions are considered which can be formulated with Eqs. (7.5) and (7.6).

$$ -{P_e}^{N\max}\le {P_e}^N(t)\le {P_e}^{N\max } $$
(7.5)
$$ -{P_e}^{N\max}\le {P_e}^N(t)\le {P_e}^{N\max } $$
(7.6)

7.4.2.3 Converters Constraints

The components of the energy hub in this study have certain installed capacities. Converters such as CHP, boiler, and transformer have their own output limitations, which are imposed through Eqs. (7.7)–(7.9) to the objective function.

$$ {\eta}_T{P_e}^N(t)\le {P}^T \vspace{-1.5pc}$$
(7.7)
$$ {\eta}_T{P_e}^N(t)\le {P}^T $$
(7.8)
$$ {\eta}_B{P_g}^{\mathrm{NB}}(t)\le {P}^B $$
(7.9)

7.4.2.4 ESS Constraints

In the proposed energy hub model, the storage systems are modeled accurately, taking into account cases such as power losses and operational constraints [33]. Such modeling can be seen in Eqs. (7.10)–(7.15).

$$ {P_e}^S(t)={P_e}^S\left(t-1\right)+{\eta_e}^{\mathrm{ch}}{P_e}^{\mathrm{ch}}(t)-\frac{{P_e}^{\mathrm{dis}}(t)}{{\eta_e}^{\mathrm{dis}}}-{P_e}^{\mathrm{loss}}(t) $$
(7.10)
$$ {P_e}^{\mathrm{loss}}(t)={\alpha_e}^{\mathrm{loss}}{P_e}^S(t) $$
(7.11)
$$ {\alpha_e}^{\mathrm{min}}{P_e}^{\mathrm{SC}}\le {P_e}^S(t)\le {\alpha_e}^{\mathrm{max}}{P_e}^{\mathrm{SC}} $$
(7.12)
$$ {\alpha_e}^{\mathrm{min}}{P_e}^{\mathrm{SC}}{I_e}^{\mathrm{ch}}(t)\le {P_e}^{\mathrm{ch}}(t)\le {\alpha_e}^{\mathrm{max}}{P_e}^{\mathrm{SC}}{I_e}^{\mathrm{ch}}(t) $$
(7.13)
$$ {\alpha_e}^{\mathrm{min}}{P_e}^{\mathrm{SC}}{I_e}^{\mathrm{dis}}(t)\le {P_e}^{\mathrm{dis}}(t)\le {\alpha_e}^{\mathrm{max}}{P_e}^{\mathrm{SC}}{I_e}^{\mathrm{dis}}(t) $$
(7.14)
$$ 0\le {I_e}^{\mathrm{ch}}(t)+{I_e}^{\mathrm{dis}}(t)\le 1 $$
(7.15)

Equation (7.10) indicates the state of charging of the energy storage in each time step, which is a function of its charging level in the previous step, the charge rate, discharge rate, and the amount of losses in that time step. The amount of losses of the electrical storage in each step can be obtained from Eq. (7.11). The minimum and maximum limits for the charge level of the storage are applied through Eq. (7.12). The limits for charging and discharging power can be found in Eqs. (7.13) and (7.14). The binary variables I e ch(t) and I e dis(t) are defined for the non-simultaneous charging and discharging at each time step, so at any time maximum one of them can accept a value of 1. This constraint is applied through Eq. (7.15).

By applying the same constraints to the thermal storage, Eqs. (7.16)–(7.21) are formulated as follows:

$$ {P_h}^S(t)={P_h}^S\left(t-1\right)+{\eta_h}^{\mathrm{ch}}{P_h}^{\mathrm{ch}}(t)-\frac{{P_h}^{\mathrm{dis}}(t)}{{\eta_h}^{\mathrm{dis}}}-{P_h}^{\mathrm{loss}}(t) $$
(7.16)
$$ {P_h}^{\mathrm{loss}}(t)={\alpha_h}^{\mathrm{loss}}{P_h}^S(t) $$
(7.17)
$$ \vspace{-1pc}{\alpha_h}^{\mathrm{min}}{P_h}^{\mathrm{SC}}\le {P_h}^S(t)\le {\alpha_h}^{\mathrm{max}}{P_h}^{\mathrm{SC}} $$
(7.18)
$$ {\alpha_h}^{\mathrm{min}}{P_h}^{\mathrm{SC}}\frac{1}{{\eta_h}^{\mathrm{ch}}}{I_h}^{\mathrm{ch}}(t)\le {P_h}^{\mathrm{ch}}(t)\le {\alpha_h}^{\mathrm{max}}{P_h}^{\mathrm{SC}}\frac{1}{{\eta_h}^{\mathrm{ch}}}{I_h}^{\mathrm{ch}}(t) $$
(7.19)
$$ {\alpha_h}^{\mathrm{min}}{P_h}^{\mathrm{SC}}{\eta_h}^{\mathrm{dis}}{I_h}^{\mathrm{dis}}(t)\le {P_h}^{\mathrm{dis}}(t)\le {\alpha_h}^{\mathrm{max}}{P_h}^{\mathrm{SC}}{\eta_h}^{\mathrm{dis}}{I_h}^{\mathrm{dis}}(t) $$
(7.20)
$$ 0\le {I_h}^{\mathrm{ch}}(t)+{I_h}^{\mathrm{dis}}(t)\le 1 $$
(7.21)

7.4.2.5 DR Constraints

Responsive load can be shifted from peak demand and higher-priced periods to non-peak and low cost periods. In this regard, DR program for shifting part of the energy hub electrical load in the presence of a real-time pricing schedule can be formulated as follows [34]:

$$ \sum \limits_{t=1}^{24}{P_e}^{\mathrm{shup}}(t)=\sum \limits_{t=1}^{24}{P_e}^{\mathrm{shdo}}(t) $$
(7.22)
$$ 0\le {P_e}^{\mathrm{shup}}(t)\le {\mathrm{LPF}}^{\mathrm{shup}}{P}_{\mathrm{ed}}(t){I_e}^{\mathrm{shup}}(t) $$
(7.23)
$$ 0\le {P_e}^{\mathrm{shdo}}(t)\le {\mathrm{LPF}}^{\mathrm{shdo}}{P}_{\mathrm{ed}}(t){I_e}^{\mathrm{shdo}}(t) $$
(7.24)
$$ 0\le {I_e}^{\mathrm{shup}}(t)+{I_e}^{\mathrm{shdo}}(t)\le 1 $$
(7.25)

The demand shift program in Eq. (7.22) for shifting up P e shup(t) or shifting down P e shdo(t) a part of (LPFshup, LPFshdo) the electrical demand P ed(t) should be applied in such a way that the sum of the shift up and shift down loads is equal in the simulation horizon. Binary variables I e shup(t) and I e shup(t) are defined in order to avoid the simultaneous reduction or increase in load at any time step.

7.4.3 Wind Turbine Model

In wind turbines, the power generated from them is a function of wind speed. The power output of a wind turbine can be determined by its power curve. This curve shows the amount of power produced at different wind speeds. An example of this power curve can be seen in Fig. 7.4. A wind turbine starts producing power at cut-in wind speed V ci and its power is stopped at cut-out wind speeds V co because of safety issues. The nominal power P r is produced when the wind speed is within the rated speed V r range to the upper limit of the speed. A nonlinear relationship between power generation and wind speed can be found in the range of cut-in wind speed up to the rated speed.

Fig. 7.4
figure 4

Power curve of wind turbine

Therefore, the following relation can be derived for the wind turbine output by wind speed [35].

$$ {W}_{\mathrm{av}}(t)={P_r}^{\ast}\left\{\begin{array}{cc}A+{B}^{\ast }{V}_w(t)+{C}^{\ast }{V}_w{(t)}^2& {V}_{\mathrm{ci}}\le {V}_w(t)\le {V}_r\\ {}1& {V}_r\le {V}_w(t)\le {V}_{\mathrm{co}}\\ {}0& \mathrm{otherwise}\end{array}\right.\vspace*{-4pt} $$
(7.26)

In the above relation, the coefficients A, B, and C can be obtained from the following relationships.

$$ A=\frac{1}{{\left({V}_{\mathrm{ci}}-{V}_r\right)}^2}\left\{{V}_{\mathrm{ci}}\left({V}_{\mathrm{ci}}+{V}_r\right)-4{V}_{\mathrm{ci}}{V}_r{\left[\frac{V_{\mathrm{ci}}+{V}_r}{2{V}_r}\right]}^3\right\} $$
(7.27)
$$ B=\frac{1}{{\left({V}_{\mathrm{ci}}-{V}_r\right)}^2}\left\{4\left({V}_{\mathrm{ci}}+{V}_r\right){\left[\frac{V_{\mathrm{ci}}+{V}_r}{2{V}_r}\right]}^3-\left(3{V}_{\mathrm{ci}}+{V}_r\right)\right\} $$
(7.28)
$$ C=\frac{1}{{\left({V}_{\mathrm{ci}}-{V}_r\right)}^2}\left\{2-4{\left[\frac{V_{\mathrm{ci}}+{V}_r}{2{V}_r}\right]}^3\right\} $$
(7.29)

7.5 Simulation Results

The energy hub presented in Fig. 7.3 is optimized based on the minimization of operating costs. In this study, the effects of DR programs are evaluated in five different cases. In the first and second cases the impact of the presence of the energy hub in the DR program is assessed subject to a relatively high price for natural gas. In the third and fourth cases, low prices are assumed for natural gas, and optimal operating schedule for the energy hub is provided with and without participating in DR programs. In the fifth scenario, CHP is eliminated from the energy hub, and the effect of the interaction of different carriers is examined in the presence of DR program. Various cases are listed in Table 7.1.

Table 7.1 Different cases for studding the participation of the energy hub in DR program

Different demands for electricity, heat and natural gas for the energy hub are shown in Fig. 7.5. Also, hourly electricity price and hourly wind speed are shown in Figs. 7.6 and 7.7, respectively.

Fig. 7.5
figure 5

The energy hub electricity, heat and natural gas demands

Fig. 7.6
figure 6

The hourly electricity price

Fig. 7.7
figure 7

The hourly wind speed

The values of the input parameters and other assumptions for the optimal energy hub management problem can be found in Table 7.2.

Table 7.2 The values of the input parameters and other assumptions for the optimal energy hub management problem

The problem of optimizing the energy hub in the presence of DR program is a MILP model that has been solved in the GAMS software using the CPLEX solving algorithm. Numerical results for different cases separately are discussed in the following sections.

7.5.1 Numerical Results for Case 1

In this case, the price of natural gas is considered to be relatively expensive, and the energy hub should pay 6 cents for each kilowatt of purchased gas from the network. In this case the energy hub has CHP, which is the main supplier of electrical and thermal demands and the electricity and boiler network are considered as a backup system for CHP. The numerical results of this case can be seen in Table 7.3. This table actually represents the optimal operating schedule for the performance of the energy hub during a day.

Table 7.3 Optimal operation schedule of the energy hub in case 1

In this case, the energy hub has two independent power generation technologies (CHP and wind turbines). The existence of CHP in the system allows for the sale of excess electricity to the network. In the table above, the negative values for the power exchanged with the network is the sale of this power to the network. However, at some hours, because of the high price of natural gas, the energy hub does not use CHP and purchasing electricity from the grid provides power deficit.

The existence of a wind turbine in the energy hub will allow the generation of local power from RES and the possibility to sell more energy to the network will provided in the energy hub. Given the limited capacity of CHP, in the absence of a turbine, the sale of electrical energy to the grid is only possible in the early hours of the day when demand is low. However, with the addition of a wind turbine, it is possible to sell energy during the day and even in the afternoon, when the price of electricity in the market is higher than it in the early hours of the day. As a result, energy sales go higher and with higher price, resulting in higher energy hub revenues.

An electrical storage has been used alongside the wind turbine to reduce the intermittent effects of this source on the performance of the hub energy and to better match the power production with the pattern of consumption. The electrical storage charges at off-peak hours and discharge at a time when there is the highest electricity price in the electricity market (18:00) and provides a significant part of the electricity demand at this hour. So CHP and wind turbine produce maximum power at peak hours, and the highest electrical storage discharges occur in these hours. The set of these factors makes the energy hub cover all its demand at the network peak hour and even sell excess energy to the network at the highest price.

In order to meet the demand for heat, the boiler provides deficits in the hours when the CHP is unable to meet all demand. Also, in times when the demand for heat is not high, the excess energy is stored in the storage, and at peak periods the storage supplies the part of the heat demand by discharging, resulting in lower operating costs for the energy hub. The total operating cost of the energy hub in this case is 15,5767.3 Euro cents. In the next case, the effects of adding DR capabilities to the energy hub are assessed.

7.5.2 Numerical Results for Case 2

The difference between this case and the previous case is in the energy hub capability to participate in DR program. The numerical results of this case are presented in Table 7.4.

Table 7.4 Optimal operation schedule of the energy hub in case 2

In this case, the possibility of shifting the load makes the energy hub shift part of its demand from peak hours to off-peak hours. As a result, the demand of energy hub decreases during peak hours and increases in off-peak hours. This makes the energy hub buy less electricity from the network at peak hours and even with the available energy generation resources, energy hub can sell its extra energy to the network at some peak hours. On the other hand, this shift of load will increase the use of CHP in off-peak hours and part of the added demand in these hours can be provided through CHP. This will increase gas purchases from the network. As shown in Tables 7.3 and 7.4, the amount of gas purchased from the network has increased from 30,521.1 kW in case 1 to 30,911.2 kW in case 2. The schematic representation of the above concepts can be seen in Figs. 7.8 and 7.9. These figures represent the power exchanged with the grid and the amount of power produced by the CHP.

Fig. 7.8
figure 8

Power exchanged with the network in cases 1 and 2

Fig. 7.9
figure 9

Power produced by the CHP in cases 1 and 2

As can be seen, due to the demand shift to off-peak hours, the amount of CHP production increased during hours 1, 2, 4, and 24. The effects of this load shift on the power exchanged with the network curve can be seen as increasing the purchase from the network at hours 2, 3, 21, and 22, as well as reducing sales to the network at hours 6 and 7. The demand shift and demand drop in peak hours led to the sale of power to the network at hour 17, increased sales to the network at hour 18, and reduced purchases from the network at hour 19. The set of these factors cause the operating costs of the hub energy to be 15,270.2 Euro cents that is less than the first case.

7.5.3 Numerical Results for Case 3

In this case, the price of natural gas is lower than electricity in all hours of the day. In addition, the energy hub does not have the ability to participate in DR programs and all demand must be met according to the requested pattern. The optimal operating schedule for the energy hub is shown in Table 7.5.

Table 7.5 Optimal operation schedule of the energy hub in case 3

A remarkable point about this case compared to case 1 is the significant increase in the use of CHP due to the low price of natural gas compared to electricity. In this case, the energy hub with the ability of using different energy carriers uses cheaper energy carriers to supply a specific demand. As can be seen in the table, the amount of electricity produced by CHP in this case is 7823.7 kW, which has increased 1516.1 kW compared to case 1. This increase in the use of CHP leads to an increase in gas purchases from the network about 2799 kW compared to the first case. This increase can be seen in Fig. 7.10. As seen in the figure, the amount of gas purchased from the network has increased over most hours of the day.

Fig. 7.10
figure 10

The amount of natural gas purchased from the network in cases 1 and 3

Another point is the reduction of boiler production. With the increase of CHP production, the need for auxiliary source is reduced and the use of boilers is minimized. Also, with the increase in thermal energy produced by CHP, the use of thermal storage also increases sharply. This is due to matching the production of CHP with the thermal demand pattern. In this case, the heat storage is recharged at different times of the day when the CHP production is more than heat demand and, when required, by discharging provides a significant part of the thermal demand and minimizes the use of boilers. As can be seen in Tables 7.5 and 7.3, the charge and discharge power of the heat storage is more than twice as large as the cases 1. The shift of energy carrier to natural gas and its further use will reduce the dependence on the electricity grid and make less purchase from the electricity network. For a better comparison, see Fig. 7.11. This figure shows how to exchange electrical power with the network in cases 1 and 3.

Fig. 7.11
figure 11

Power exchanged with the network in cases 1 and 3

It is clearly seen in this figure that purchases from the electricity grid have decreased, especially in the early and last hours of the day. This is due to the fact that at case 1 at these hours the cost of producing power from natural gas was higher than electricity, and the energy hub purchased electricity from the electricity grid. But in case 3, with the decline in natural gas prices, demand for these hours is provided through CHP and a fraction of this demand is purchased from the network. More power generation by CHP makes it possible to sell electricity to the grid even during the mid-day hours. Reducing dependence on the power grid, increasing the use of more affordable energy carrier, and better performance of ESS in this case has led to a dramatic reduction in the operating costs of the energy hub and reaching it to 65,094.2 Euro cents. In the next case, the effect of DR participation is investigated in the presence of a low-cost energy carrier (natural gas).

7.5.4 Numerical Results for Case 4

In this case an affordable price is considered for natural gas, but the DR capability is only applied to electrical demand. The optimal operating schedule for the energy hub in this case can be found in Table 7.6.

Table 7.6 Optimal operation schedule of the energy hub in case 4

In this case, as in case 2, part of the electricity demand is reduced in network peak hours and is transmitted to off-peak hours. The effects of demand shifts on the demand curve for electrical energy in cases 2 and 4 can be seen in Fig. 7.12.

Fig. 7.12
figure 12

Effect of the DR program on the electricity demand of the energy hub

The demand shifts reduce the purchase from the network at peak hours and even sell more electrical energy to the network at some of these hours. The electric power exchange curve with the network can be seen in Fig. 7.13. As shown in this figure, the demand reduction in peak hours as well as the existence of distributed generation sources such as CHP and wind turbine will make it possible for the energy hub not only to reduce purchase from the network during the peak hours, but also to sell excess electric power to the network and earn revenue. This will reduce the network’s peak load and increase its stability. This shifted demand is provided in off-peak hours and leads to lower operational costs for the system. This amount is 61,395.5 cents for case 4, which is the smallest amount among the tested cases so far.

Fig. 7.13
figure 13

Power exchanged with the network in cases 3 and 4

Another point can be found in comparing the power exchanged with the network in cases 2 and 4. Figure 7.14 shows this exchanged power. In both cases, energy hub participate in DR programs and demand shifts lead to increased purchases from the network at off-peak hours. But, due to lower prices for natural gas and the energy hub tendency to use cheaper energy carriers the purchase of electricity from the network in case 4 is less than case 2.

Fig. 7.14
figure 14

Power exchanged with the network in cases 2 and 4

7.5.5 Numerical Results for Case 5

In this case, we assume that the studied energy hub does not have CHP and supplies its electricity through wind turbine and electricity network. Thermal energy will be supplied through the boiler. In fact, in this case, the integration between different networks through various energy carriers is lost, and shortage of power generation units for supplying different demand must be purchased directly from the relevant network. In the following, we compare this case with previous cases in two high and low prices for natural gas. Figure 7.15 shows how to exchange electrical power with the network in case 5 and in comparison with cases 1 and 2. In case 5, without the implementation of DR program, the highest electricity purchasing coincides with the peak price of the electricity (peak demand in the network) and leads to an increase in the network’s peak demand and increased costumer operating costs. However, with the addition of DR capability and demand shifts to off-peak hours, electricity purchases from the network at peak hours are reduced. However, at peak hours, the system is still dependent on purchasing power from the network, and it pays a lot of money for supplying demand in expensive hours. By adding CHP to the system and the possibility of switching between different energy carriers, energy purchases from the network are significantly reduced. Even at peak hours, energy hub not only does not buy power from the network, but also sells electricity at the highest price. The energy hub participation in DR program in this case will lead to more electricity sales to the grid during high price hours and more purchases in low price hours that reduce the operating costs.

Fig. 7.15
figure 15

Power exchanged with the network in cases 1, 2, and 5

Reducing the dependence on the electricity grid due to the use of CHP leads to an increase in the purchase from the gas network, which can be seen in Fig. 7.16.

Fig. 7.16
figure 16

Natural gas purchased from the network in cases 1, 2, and 5

As can be seen in the figure, with the addition of CHP, gas purchases from the network are significantly increased. In the early hours of the day witch the price of natural gas is not significantly different from the electricity price, adding CHP has little effect on purchasing gas from the network. But with increasing electricity prices during the day, the desire of the energy hub increases to meet its demand from a cheaper carrier, and power generated by CHP and as a result purchasing gas from the network increases. If the electricity exchange curve for low gas price mode is considered in the form of Fig. 7.17, it can be seen that the electricity purchase from the grid in the case of using CHP is lower than the case of eliminating CHP at all hours of the day.

Fig. 7.17
figure 17

Power exchanged with the network in cases 3, 4, and 5

In general, it can be said that due to the shift of the load to low-cost periods and because of the use of natural gas for electricity production, the consumption curve in this case becomes flattened. Also, despite the increase in gas consumption in peak hours of electricity consumption, along with the reduction of electricity purchase from the grid during these hours, the cost of customers’ energy bill decreases. Also on the side of the companies, the daily costs of the electricity grid are reduced due to the flattened curve and lower production and transmission costs, while the profit of the gas company increases due to more natural gas sales. As a result, it can be said that the implementation of DR programs in the content of smart energy hubs leads to lower costs for consumers while maintaining their comfort and increasing utilities’ profits, while also reducing peak demand and flattening the shape of the demand curve.

7.6 Conclusion

In this chapter, the effects of participating the renewable energy hubs in DR programs have been evaluated. For this purpose, a brief overview of the research carried out in the field of using DR programs in residential, commercial, industrial, and agricultural energy hubs has been done. In the residential sector, concepts such as smart homes using energy management and control systems as well as the use of DER have led to more responsiveness of these loads and more participation in DSM programs. Most of the research on modeling DR programs in the content of energy hubs has been done in this section. In the commercial sector, with the existence of huge loads such as HVAC and lighting systems, the optimal control of these loads and participation in DSM programs will have a huge impact on energy efficiency, reducing subscriber’s energy costs. In the industrial sector, despite the more predictability of the demand for this sector than other sectors, problems such as the difficulty of change in the production plan, the existence of various energy flows and raw materials, the high initial costs for using DER have led to difficulty of implementation of DR programs in this section. In this section, more incentive and supportive policies are needed to increase energy efficiency and DER especially RES implementation and participate in DR programs. In the agricultural sector, the use of smart equipment in managing farms has a significant impact on reducing operational costs and product quality. On the other hand, the existence of agricultural production units such as greenhouses leads to a great potential for energy management and participation in DR programs. All of these require an integrated energy management system that is one of the main functions of the energy hub. Therefore, there is a high potential for using energy hub models in different consumption sectors for energy consumption management and more active participation in DSM and network management programs.

In order to clarify the discussed concepts, a complete simulation of a renewable energy hub is presented in the presence of DR. The results show that in the smart energy hubs that utilize different energy production and storage technologies, the consumer that participates in DR programs has the ability to switch between different energy carriers and technologies along with load shifting and interrupting. Therefore, it has more flexibility to operate in DR programs and it can get more benefits. Even if the customers want to receive the same level of previous service and maintains its level of comfort and simultaneously participates in DR programs, they can use from switching between different energy carriers technologies instead of shifting their demand. As a result, it can be said that the implementation of DR programs in the content of smart energy hubs leads to lower costs for consumers while maintaining their comfort and increasing utilities’ profits, while also reducing peak demand and flattening the shape of the demand curve.