Volume 2025, Issue 1 9107639
Research Article
Open Access

Optimal Multiobjective Operation of Multicarrier Energy Hub Taking Energy Buffering Into Account

Mohammad-Mehdi Mohammadi-Zaferani

Mohammad-Mehdi Mohammadi-Zaferani

Department of Electrical Engineering , Gorgan Branch , Islamic Azad University , Gorgan , Iran , azad.ac.ir

Search for more papers by this author
Reza Ebrahimi

Corresponding Author

Reza Ebrahimi

Department of Electrical Engineering , Gorgan Branch , Islamic Azad University , Gorgan , Iran , azad.ac.ir

Search for more papers by this author
Mahmood Ghanbari

Mahmood Ghanbari

Department of Electrical Engineering , Gorgan Branch , Islamic Azad University , Gorgan , Iran , azad.ac.ir

Search for more papers by this author
First published: 18 April 2025
Academic Editor: Michele De Santis

Abstract

This paper introduces a pioneering model for short-term planning of an energy hub (EH) that goes beyond traditional approaches by considering a comprehensive multicarrier energy system. The proposed model focuses on minimizing energy buffering costs while ensuring system operation and optimizing economic performance. The novelty of this study lies in its integrated approach, which simultaneously addresses operational efficiency, energy storage requirements, and overall system performance. The EH in this study is modeled as a prosumer within a day-ahead energy market, where both inflows and outflows of energy are optimized. The system’s capability to interact with upstream energy networks, including gas, heat, and electricity, is a critical aspect of the model. This interaction is managed through various technologies that enhance the hub’s ability to meet local demands efficiently. By employing an advanced improved particle swarm optimization (IPSO) algorithm, this model solves the complex multiobjective optimization problem inherent in EH management. The proposed model’s effectiveness is validated through extensive simulation on a test system, where its performance is compared with conventional heuristic optimization algorithms. The results demonstrate the superior efficiency and applicability of the IPSO algorithm, confirming that the proposed model offers a significant advancement in the field of sustainable energy management.

1. Introduction

Nowadays, different types of energy, including electricity, natural gas, heating, and cooling, are required by the energy consumers in residential, commercial, and industrial sectors. Although the energy networks have separately been operated, recently the integration of the electricity network with natural gas and district heating systems to create multienergy systems (MESs) is receiving more attention [1]. An MES including natural gas power, solar power, wind power, hydropower, and thermal generation can offer different energy advantages by utilizing the complementarities of natural resources [2]. The drawbacks of intermittency, randomness, seasonality, and volatility of renewable energy power systems can be overcome by MES which has characteristics of high reliability, flexibility, and stability in comparison to independent hydropower generation, photovoltaic (PV) power, and wind power systems [3, 4]. Comprehensive MES implementation can increase electric energy efficiency and result in improved economic and social status [5, 6].

For the modeling analysis of MESs, energy hub (EH) concept was firstly proposed by Geidl and Andersson [7] as a universal model that could be used to convert, transmit, and store various types of energy. The operation and planning of real-world energy systems frequently hint at the idea that EHs are the primary distributed energy sources (DERs) of the future. A system with DERs such as PV arrays, electrical storage system (ESS), combined heat and power (CHP), wind turbines, boilers, and other thermal energy producing systems can be used to define an EH. It might have a significant impact on converting, storing, and supplying energy [8]. The decrease in wasted energy from various energy sources and the increase in system effectiveness are two of the major advantages of EHs. To lower operating costs, lower emissions, and improve system flexibility/stability, EHs offer a significant potential for integrating distributed generation (DG) using renewable energy sources (RESs) [7]. As a result, the energy provider will use EH systems as a potent remedy for facilities’ heating, gas, and electrical networks’ optimal operation. However, the integration of these networks into the large-scale energy systems has faced many challenges due to the random nature of RES [9].

Many studies with the subject of modeling various energy systems have been done recently on gas, heat, and electricity. In order to give a thorough reference for future research, Mohammadi et al. [10] synthesized many models and concepts examined in the literature for EH while addressing their difficulties, advantages, and disadvantages. Ayele et al. [11] have proposed an extended EH by linking heating and electrical networks to model a general multicarrier energy system. The authors introduced a clear distinction between the interconnection point and the hub. A coupling model between inputs and outputs in MESs based on linear EH modeling was proposed by Wang et al. [12]. In [13], a new integrated model for the EH is developed taking into account thermal, cooling, and electrical demand as well as energy storages and demand response (DR) in order to solve the optimal EH scheduling problem. The EH model proposed in [14, 15] includes RES, DG, DR, and energy storages under uncertainty. A thorough linear model for the optimal design of EHs is proposed in [16] that takes stability limitations into consideration.

Optimal planning of EH is a significant scientific subject that can address a variety of issues, including where and when to invest in storage systems and energy converters as well as what size to take into account for this equipment to maximize economy and environmental advantages [17]. Considering the evaluation criteria of reliability, emission, and energy efficiency, an optimal expansion planning for an EH is proposed by Zhang et al. [18] that includes heat, natural gas, and electricity. Further, Dolatabadi et al. [19] presented a novel stochastic technique to build an EH system planning model while taking into consideration the energy demand, wind power uncertainty, and availability of components. The EH model that is suggested in this paper can reduce energy costs and increase supply reliability. The work in [20] offers an integrated strategy for the optimal planning and management of EH while taking into account the impacts of wind energy resources. To account for the effect of uncertain parameters, the proposed model was defined as a stochastic programming problem based on a two-stage optimization procedure. A Monte Carlo simulation strategy generates different scenarios to address the model’s uncertain parameters, and the possibilities are then decreased using the K-means algorithm. Additionally, the way DR programs may affect the operational subproblem is also considered.

The utilization of EH systems under various operating situations has also been widely explored within the context of an optimization problem while taking various objective functions into account. The authors in [21, 22] proposed an optimization technique and a basic power flow model compatible for EHs with multiple energy carriers including electricity, natural gas, and district heating networks. The optimal power flow of multiple energy carriers employing various RESs has been addressed in [2326]. In reference [24], a multiperiod optimization method was introduced for solving the EH’s optimal power flow problem while considering biomass energy toward district heating in multiple energy carriers. In [2731], EH utilization is optimized according to the costs of energy carriers as well as the real-time demand to determine how much of each energy carrier should be produced or purchased. Through combined cooling, heat, and power (CCHP), the authors of [30] optimally solved the issue of multienergy carriers’ power dispatch. Multicarrier energy network with multiobjective optimization has been studied in [31]. Also, to deliver the best performance of EH and energy networks, a two-level optimization strategy has been utilized in [32]. In reference [33], in order to perform the EH economic dispatch, a self-adaptive learning approach with a time-varying acceleration coefficient-gravitational search optimization is suggested. In [34], based on mixed-integer linear programming, a solution is suggested to solve the power flow of multiple energy carrier systems. In [35], the efficient operation of heat, natural gas, and electricity is sought while taking integrated energy storage devices and DRs into account.

Ma, Wu, and Hao [36] have researched the optimal scheduling and coordinated operation methods for micro-energy grids based on the sub-EH structure containing cooling hub, heating hub, and power hub. The sub-EH and optimal scheduling models that have been put forth are general approaches for looking at issues with power flow and economic dispatch in micro-energy grids. In the neighborhood grids, for multiple home EHs, a hierarchical energy management system is presented by Gholinejad et al. [37] where reducing the peak of the upstream grid and maximizing financial gain are the major goals. The suggested home energy management system (HEMS) controls energy production, storage, and exchange between various residences and the upstream network. In [38], a standardized modeling and optimization technique for the connected EH system was presented. In the suggested approach, single- and multidimensional piecewise linear approximation techniques, compressor function, generator cost functions, and nonconvex natural gas transmission functions are utilized. The model provided in [39] focuses on EH scheduling including various types of energy storage, RESs, and DR program for a day-ahead time horizon. The performance and efficiency of EH operation are specifically examined in the proposed model in order to better understand the ice storage effects as a developing and novel device of storage which is still a researchable topic.

Determining the best structure and sizing as well as the operating method based on the system requirements and considering the uncertainty of renewable sources, energy market spot prices, demands, etc. are the key problems for the smart energy hub (SEH) modeling. Uncertainty modeling is an essential area for future research in the SEH modeling since it helps decision-making process with a realistic optimal strategy. In [40], Lasemi et al. discuss the challenges of uncertainty analysis in the planning, design, and management of SEH. The considered hub energy, equipped with an energy conversion system, an energy storage system, and renewable energy resources. It is also connected to upstream energy networks to supply its own demand. The major goal of this work is to categorize and assess the current approaches of incorporating uncertainty into SEH design, operation, and planning in order to better understand upcoming difficulties. In order to reduce overall operating costs for EHs, the work in [41] has presented an effective operation model for managing numerous EHs with electrical and thermal energy demands. To address the uncertainties of distributed RESs and power costs, a reliable optimization technique has been put forth. Meanwhile, the suggested model has taken into account both thermal and electrical DR programs. To meet electricity, gas, and heat demand while taking into account DR programs [4244], Yuan et al. [45] developed an optimal stochastic scheduling issue of P2G storage integrated with EH, electrical storage, and thermal storage (DRP). Electrical loads have been subjected to the load shifting–based DRP in order to reduce EH running costs. Additionally, the P2G storage system has been utilized as a new resource that connects the natural gas and electrical networks by first converting electricity to hydrogen and then, via electrolysis and automation, to natural gas.

Drawing upon the above comprehensive review, the main goal of the current study is to obtain the best planning and operation of an EH system while taking various types of renewable energy systems, electrical loads, gas loads, and thermal loads into account. Additionally, there are numerous energy converter sources in EH, including MT and heaters, complicating the optimization problem. As a result, the main contribution of the current study is the presentation of an optimization-based model to simultaneously handle the design and operation of an EH system. Different load types, solar and wind power generation, and gas, electrical, and thermal ESSs are taken into account. This study also determines the ideal interaction between various accessible resources and ESSs. Additionally, the optimization issue is resolved and the system’s overall cost is minimized using the improved particle swarm optimization (IPSO) method. Briefly, the key goal that should be taken into account for the best design of EH systems is building a technique to address the interactions between EHs and upstream network where the listed requirements are satisfied. A preliminary version of this work was previously published as a preprint on Research Square [46]. This study expands on the initial findings by incorporating additional analyses and refinements to improve the accuracy and applicability of the proposed model. Therefore, the main contributions of this paper are threefold:
  • 1.

    The proposed optimization problem includes energy interactions between upstream network and downstream EH according to the model of the EH and loads.

  • 2.

    A practical objective function is developed that takes into account the economic, environmental, and energy buffering costs to address the best design of the EH system.

  • 3.

    A planning and management algorithm is introduced to handle interactions between the upstream network and the EH in areas where operational and economic constraints are met.

  • 4.

    IPSO, PSO, and GA algorithms are utilized to create a robust planning algorithm to find the best use of different resources and energy storage to reduce overall costs.

A comparison that outlines advantages and disadvantages of previous work in the field versus the work presented in the current paper is proposed in Table 1.

Table 1. Advantages and disadvantages of previous work in the field versus the work presented in the current paper.
Criteria Previous work Current work
Optimization method - Mathematical methods (e.g., linear programming, nonlinear programming) Evolutionary methods (e.g., improved particle swarm optimization—IPSO)
Optimization method Advantages of previous work - Well-established theoretical foundation - Flexible handling of complex, nonlinear, and dynamic problems
- Effective for linear and some nonlinear problems - Inherent support for multiobjective optimization
- Predictable performance and results
Disadvantages of previous work - May struggle with nonlinearity and complexity - Potentially higher computational cost
- Potential to get trapped in local minima - Requires careful parameter tuning
- Less adaptable to dynamic changes - May need more iterations to converge
Advantages of current work - Superior in managing nonlinear and complex interactions - Empirical validation of IPSO shows better performance compared to other heuristic techniques
- Global search capability reduces risk of local minima - Can balance multiple conflicting objectives effectively
- Adaptable to dynamic and changing conditions
Disadvantages of current work - Higher computational cost - Initial setup and parameter tuning can be time-consuming
- Complexity in implementation and tuning - Requires expertise in evolutionary algorithms for effective implementation
Handling of multiobjective optimization - Often rigid and less flexible - Inherent capability to handle multiobjective problems by maintaining a population of solutions
- May require decomposition into single-objective problems
Adaptability to market fluctuations - Less adaptable, often static models - Highly adaptable, suitable for dynamic market conditions
Scalability and robustness - Challenges in scaling for large, complex systems - More robust and scalable for large, high-dimensional problems
Real-world applicability - Sometimes limited due to oversimplified assumptions - Demonstrated empirical performance and practical applicability

The rest of this paper is structured as follows.

Section 2 introduces the framework, formulation, and model of the EH and its components. The proposed optimization problem is presented in Section 3. In Section 4, the solution to EH planning optimization problem will be presented. Section 5 covers the simulation findings and additional discussion. Finally, Section 6 draws the conclusions.

2. EH Modeling

2.1. Proposed EH Definition

In the EH architecture, connections between consumers, producers, and transmitters can occur either directly or through conversion tools that control one or more energy carriers [10]. These carriers must be converted from one form to another using converters. Examples of converter devices include CHP, fuel cells, furnaces, and boilers. Combining several energy carriers in EHs has a number of benefits including improved system stability, flexible generation, and optimal operation potential [7]. Particularly in urban and rural regions, they can be used for applications with wide ranges, including industrial, residential, and commercial ones [7]. The proposed EH is schematically depicted in Figure 1, with electricity, natural gas, and district heating serving as the primary energy sources. Depending on the conditions inside the hub, the energy carriers at the input side are transformed or transported to the output. Meeting the demands of the various loads at the output using direct conversion or connection tools is the specific objective. EH can exchange power with the upstream major market and optimize operational parameters via ESSs. The suggested EH is viewed as a prosumer, which can exchange energy with upstream energy networks, as can be seen in Figure 1.

Details are in the caption following the image
Schematic representation of the considered EH.

Figure 1 shows the interaction of facilities and various forms of energies in the proposed EH. In addition, EH can maximize its benefits by selling to and intervening in upstream energy systems. The proposed problem optimizes the next day operation problem of the proposed EH by implementing the best energy management for local energy consumption as well as the best bidding strategy to participate in upstream energy market. The suggested self-scheduling model is for the next 24 h. To put it another way, the suggested model is tested on the day-ahead market. The optimization method must simultaneously assess operation interactions and connection limitations while optimizing EH’s day-ahead planning.

2.2. Proposed EH Formulation

The proposed EH is supplied by a power system, a natural gas, and a district heating system network and is connected to a gas, an electrical, and a heating load. As seen in Figure 1, the proposed system takes into account WT, PV, MT units, energy storage systems, boilers, electrical heaters, and CHP units. As was already indicated, the EHs couple a variety of energy carriers using some facilities that are supplied by one type of energy resource and produce one or two different forms of energies. As one of the main components of the EH system, the CHP unit, for instance, is fueled with natural gas and produces both thermal and electrical energy. Consequently, it is difficult to interface between various operational factors and the various EH facilities. Furthermore, by taking into account prosumer roles, the suggested EH can buy electrical energy from the upstream networks during the low-price periods, store them in storage systems such as electrical energy storage, and then resell them to the upstream networks during the high-price periods. Therefore, another difficulty in the proposed problem is determining the appropriate bidding strategy based on the day-ahead energy market and EH restrictions. The full model of a multicarrier EH is created by deriving mathematical models for each part of an EH in the subsections that follow.

A coupling matrix “C” can be used to build a general model. This matrix, which is depicted in Figure 2, consists of several coupling variables between inputs and outputs. An n-dimensional vector can be used to represent the input port, and an m-dimensional vector can be used to represent the outputs or the energy demand. The coupling matrix can be expressed as [29]
()
()
where Cmn are the coupling coefficients between output carrier L and input carrier P, while m and n are the number of output and input carriers, respectively.
Details are in the caption following the image
Energy carrier transformation via an EH.

3. The Proposed Optimization Problem

The primary objective of the proposed model is to meet electrical, heating, and gas demands in the EH considering different constraints. Moreover, the proposed EH is presented as a prosumer, i.e., it can exchange electricity with the upstream network. A general model that is constrained by different limitations is developed to represent the optimal EH scheduling considering many requirements with the goal of minimizing total operation costs. This section presents the entire problem formulation, including problem constraints and the objective function.

3.1. Problem Constraints

The restrictions on the problem are mostly related to the models for renewable energy, energy conversion units, power balancing, maximum output constraints for each generation system, energy conversion devices, and storage unit constraints.

3.1.1. Renewable Sources Model

  • Wind turbine model: In the electricity generation system, a wind turbine is utilized to transform wind kinetic energy into mechanical energy, which is then used to produce electricity. In general, the air density, wind speed, turbine size, and a parameter termed Cp influence the amount of power generated by a wind turbine as follows:

    ()

  • where is the power output of the wind turbine at time t. Moreover, ρ, vt, and RWT are, respectively, the air density, wind speed at moment t, and the turbine blade’s radius while Cp denotes the energy efficiency. In order to model wind turbines, many important factors, including wind availability and wind turbine power curve, must be considered [46]. If the location of installation and the wind turbine type are fixed, it is also assumed that the blade radius and air density are constant. Therefore, according to the power performance, the actual relationship between and vt can be determined as the following equations:

    ()

  • where vr, Pr, vci, and vco are rated wind speed, rated power, and internal and external wind cutting speed, respectively. In addition, a, b, c, and d are constants and depend on the installation location and the type of wind turbine.

  • PV array model: A PV array is an interconnected set of solar panels that converts solar radiation into electrical energy in which the power required to charge a load cannot be supplied by a single module. PV arrays generate electricity without any moving parts. Thus, they can be operated quietly without any pollution and with low maintenance [47]. The impact of solar density is modeled by taking into account the output power of the module in relation to the radiation [46]. The module output power is modeled as

    ()

  • where is the output power of the module in radiation at moment t and PSTC is the maximum power of the module in standard test conditions. and Tr are the ambient and the reference temperature at moment t, respectively, while K is the coefficient of the relationship between the output power and the temperature.

3.1.2. Energy Conversion Units

  • CHP model: The CHP unit uses natural gas to produce heat and electricity. Equations (6)–(10) define the mathematical model of this equipment. Equation (6) shows the gas energy imported to CHP and the produced electrical power and heat are determined using equations (7) and (8). The total CHP energy at time t is calculated by equation (9). The natural gas input is limited for this converter by equation (10) which shows possible nonlinear operation area for CHP unit:

    ()
    ()
    ()
    ()
    ()

  • where and are the imported gas energy to CHP and the total energy of CHP at moment t, and are the CHP electrical output energy at moment t and gas-to-electricity conversion efficiency of CHP, and and are the CHP heat output energy and gas-to-heat conversion efficiency of CHP. Also, is the CHP total energy and , , , , and are the CHP coefficients and is CHP’s ON/OFF status at time t, [1, 0], respectively.

  • MT model: IPSO typically use a simple design with a small number of moving parts to reduce maintenance costs and improve system reliability. The micro turbine model is similar to the fuel cell model. However, the curves and parameters need to be modified to define the performance of this unit. In order to obtain the efficiency of micro turbine, the electric and thermal efficiency curves of micro turbine can be used and its efficiency can be obtained in terms of the generated power [47]. The micro turbine used in the proposed EH is the Capstone Model C65 MT type whose performance under partial load and ISO conditions is presented in Figures 3 and 4. Unlike fuel cells, MT efficiency increases with increasing generated power, as modeled by the following equation:

    ()
    ()
    ()
    ()
    ()

  • Here, , Cnl, , NMT, and LHV are the imported gas energy to MT, the cost of natural gas fed into MT, the net generated electric power in a specific period, the efficiency in the specific period, and the low heating value of the fuel, respectively. Also, is the MT electrical output energy, is the MT total energy at time t and , , , , and are the MT coefficients, and is MT’s ON/OFF status at time t, [1, 0]. The specific relationship between and NMT in terms of electrical power can be obtained by interpolating the data provided by the manufacturer in the MT economic model [47] as shown in equation (12).

  • Heater model: Heaters generate thermal energy by using electrical power for heating demands. Equations (16) and (17) are proposed for modeling this equipment:

    ()
    ()

  • where and are the input electrical energy to heater and the total energy of heater and and ηHeater are the heater’s heat output energy and electricity-to-heat conversion efficiency of heater while is the heater’s ON/OFF status at time t, [1, 0].

  • Gas boiler model: In the proposed EH system, when the total heat produced by the CHP units and heater is insufficient, the boiler is called upon as a backup system to meet the thermal energy demand. In order to meet the need for thermal energy, the purchased natural gas is burned in the boiler. The boiler introduced in equation (18) produces heat energy by burning cubic meters of natural gas proportionate to its efficiency. Constraint equation (19) represents the limitation of gas amount that can be consumed.

    ()
    ()

  • where , , and ηBoiler are the gas energy input to boiler, the total energy of boiler, and the gas-to-heat conversion efficiency of boiler, respectively, and is the boiler’s ON/OFF status at time t, [1, 0].

Details are in the caption following the image
Partial load efficiency of C65 micro turbines [48].
Details are in the caption following the image
Net heating rate in terms of net power [48].

3.1.3. Battery Storage (BS) Model

A collection of one or more electrochemical cells collectively known as BS is used to store energy from DC or AC sources for later usage [48]. BS power is used when other resources are insufficient to supply electrical loads or bear a higher cost compared to the battery, or when both other hub resources and the upstream network are out of reach. On the other hand, when the other energy sources exceed the load demand, the battery stores the extra energy [47]. The available capacity of the battery in percentage is expressed as the state of charge (SOC). When determining the energy storage’s SOC, two constraints must always be met. First, the energy stored in the BS cannot be negative, and second, the maximum charge level shall be observed [46]. Limitations of BS in EH are as follows:
()
where P+ and P are the maximum allowable charge and discharge of the battery in the period Δt, while Vsys is the system voltage in the DC bus and Ubatt is the battery capacity in ampere-hours. The battery’s SOC can be determined by checking the battery charge/discharge capacity, which is expressed as [48]
()
It is very important that the SOC of the battery does not experience overcharging/undercharging. The relevant constraints can be formulated by comparing the SOC of the battery at hour i with SOCmin and SOCmax of the battery [3].
()
()
()
()

3.1.4. Energy Balance Constraints

  • Electrical power balance: The equation for equilibrium of active power is written as equation (26). The active powers of WT and PV arrays are assumed to be obtained at maximum power point depending on weather conditions. The power balance limit of the EH is written as follows:

    ()

  • Gas energy balance: The gas energy balance limit during the simulation period can be written as

    ()

  • District heating energy balance: The heating power balance limit during the simulation period can be expressed as

    ()

3.2. Objective Function

Here, a novel cost-effective objective function is developed to reach optimal point for EH operation. The main purpose of the EH operator (EHO) is to minimize the system’s overall planning and operational costs by optimizing system performance while ensuring that the system’s overall demand is met. The EH considers the daily-optimized scheduling problem and rationally arranges the output of each unit at each time interval. The dispatching center aims to minimize the sum of the purchase costs of electrical power, natural gas, and district heating transaction. The first objective function of the problem can be represented as
()
where FE and FH are costs of purchased or sold electrical and thermal energy. Moreover, FG is the cost of purchased gas energy and αE, αG, and αH are the coefficients of purchased or sold electrical, thermal, and gas energy, respectively. FE can be defined as
()
where and are the cost of purchased and sold electricity, respectively, and EPt is electricity price at time t while and are purchased and sold electric power, respectively. EH can sell its remaining electricity to the upstream wholesale market. In addition, EH exchanges electricity and power with upstream power system. As mentioned, FG is the cost of purchased gas and can be defined as
()
where is the cost of purchased gas, GPt is gas price at time t, and is the purchased gas energy. FH is the cost of purchased or sold district heating and can be defined as
()
where and are the cost of purchased and sold heat, respectively, HPt is heat price at time t, and and are the purchased and sold thermal energy, respectively. EH can sell its remaining heat energy to the upstream wholesale market. In addition, EH exchanges heat with upstream power system. The second part of the proposed problem objective function is energy buffering cost which can be defined as follows:
()
where αBS defines the cost of battery. In this paper, the energy buffering cost is modeled by considering the battery life cycle represented by the following equation:
()
where λbat, DoD, Nc, and indicate the battery price, the depth of discharge, the number of charging and discharging cycles in the battery life cycle and the average depth of discharge, respectively.
In the proposed optimization problem, the profit of EHO should be maximized while its operating cost is minimized. Therefore, based on the weighted sum method, the proposed optimization problem can be finally defined as follows:
()
where w1 and w2 are weighting coefficients of the optimization problem’s objectives. Moreover, and are, respectively, the corresponding minimum values for each objective function, which can be separately determined by solving the values of each objective function.

4. Proposed Solution Methodology

In this paper, we have employed IPSO algorithm by considering adaptive inertia factor to solve the proposed problem. In the rest of this section, the detailed description of the proposed solution methodology is given.

4.1. Traditional Particle Swarm Algorithm

The PSO algorithm was first created by Kennedy and Eberhart in 1995 and is based on the predatory bird population in the two-dimensional space of simulation. It was created by simulating a streamlined social system and has proven to be effective in resolving continuous nonlinear optimization problems [49]. Researchers have made extensive use of this algorithm in optimization and relevant computing tasks because of its notion of simplicity, ease of implementation, and computing efficiency. Additionally, this algorithm has been applied to different energy systems. In N-dimensional space, any particle is seen as a point by the PSO algorithm: Xi = (Xi1, Xi2, …, Xin). Each individual particle is initially defined by its position in the first iteration, known as the best fitness recorded as pBesti . The global best, denoted as gBesti, refers to the best fitness value across all particles in the current iteration. The particles’ velocities, represented as Vi, Vi = (Vi1, Vi2, …, Vin), are then adjusted based on the best positions. Finally, each particle’s updated position and velocity can be determined using the following formulas:
()
In the initial iteration of the k and k + 1 iteration position, and are the location of the d-dimensional component of the first i-particle. In the first iteration of the k and k + 1 iteration position, and are the speed location of the first i-d-dimensional particle’s component. C1, C2, which are each believed to be two plus confining indices, demonstrate the regulation of the largest step that affects the gBesti and the pBesti particle flying directions, respectively. A random number between [0, 1] is generated using rand(). A scaling factor that is related to the previous speed is the inertia factor, ω, defined as
()

In equation (37), Nmax is the overall iteration count and n is the current iteration. Following the addition of the linearly declining inertia factor ω, PSO is able to begin exploring a bigger region and target the general position of the optimal solution more quickly. As ω gradually drops and particle velocity slows, PSO initiates an intricate local search (ω) that is analogous to the temperature parameter in the simulated annealing method. This helps to speed up convergence and enhance PSO algorithm’s performance.

4.2. IPSO Algorithm

A variety of performance particles are distributed among various jobs in accordance with the concepts of cooperation and work division. Poor performance particles with low inertia weight can quickly provide for convergence to a better region for in-depth search, whereas superior performance particles with big inertia weight are primarily employed to detect the better region. This strategy’s primary premise is that nonoptimal particles in the PSO algorithm will progressively travel to the position of the global optimum gBesti and seek the optimal solution there. To encourage the search for other particles, the global best particle must actively and regularly update the gBesti to identify new areas. The other particles will soon converge to its surroundings if the ideal particle already converges. This will causes premature convergence. The strategy’s specific implementation is such that particles are sorted, from good to bad according to the locations of their own best particles, using the inertia weight of the i-bit particles with the following acceleration coefficient [50]:
()
()
where ωi is the adaptive acceleration coefficient, m is the size of the swarm, and ωmax and ωmin are the predetermined maximum and minimum inertia weights. This approach can help the iteration process better balance the capabilities of both local and global search. Additionally, the algorithm keeps moving forward with its current speed when the search results are better than the extreme value of its current individual particles. This will help keep the individual extreme position throughout the search process and will serve as a starting point for further searches. Additionally, this procedure greatly enhances PSO algorithm’s performance. In conclusion, the particle velocity and position updates of the algorithm can be expressed as
()
()

The EH optimization problem updates the initial values of the EH bids. The following steps shown in Figure 5 should be taken into consideration when applying the IPSO algorithm to solve the EH optimization problem.

Details are in the caption following the image
Steps for solving the energy management and EH optimization problems using IPSO.

5. Simulation Results

After the energy carriers are created or extracted in the production system, they are transmitted and distributed to customers through networks. If the transmission channels in the energy supply network are taken immediately and without preparation, they struggle with issues like excess demand on available supply and excess supply on available demand. Some network loads will go unsupplied if the amount of consumed energy exceeds the amount of generated energy. However, if greater energy is created than is needed, it will unavoidably cost more to manufacture because there will not be enough space to store the extra energy. The general nonsatisfaction of the grid’s consumers and the reliability of such electricity networks are both low. As suggested in the introduction section, one way to deal with this issue is to gather energy carriers made in an EH system. Additionally, some energy carriers could be created by the power plant, which will improve the network’s reliability. The multienergy district is used in the electric-gas-heat-combined EH optimization scheduling model suggested in this paper.

The pseudocode of IPSO algorithm is proposed in Table 2.

Table 2. Pseudocode of improved particle swarm optimization (IPSO) algorithm.
Algorithm: IPSO
pBest i: Best individual
pBest: Best group
for each particle i
 Initialize velocity Vi and position Xi for particle i
 Calculate the individual optimal fitness and set pBest i = Xi
end for
gBest = max{pBest i}
while not stop
for t = 1 to tmax
 Update the velocity and position of particle i
 Calculate particle i
if fitness (Xi) > fitness (pBest i)
  pBest i = Xi;
if fitness (pBest i) > fitness (gBest)
  gBest = pBest i;
end for
end while
print gBest

The study of the EH system, which includes CHP, boiler units, MT, heaters, wind turbines, PV systems, and ESSs to satisfy local electricity, heat, and natural gas demands, aims to assess the efficacy of the proposed EH model. This study uses a typical day’s schedule rather than taking into account energy transfer losses [48]. The proposed model is implemented using the MATLAB platform on a computer with an Intel Core i5-M 540 CPU running at 2.53 GHz and 8 GB of RAM to address the energy planning problem in the studied EH.

5.1. Input Data

Figure 6 illustrates several load profiles that the EH system should provide. Additionally, Figure 7 shows the hourly gas and electricity energy prices.

Details are in the caption following the image
EH hourly electrical, gas, and thermal loads [51].
Details are in the caption following the image
EH hourly electrical and gas energy prices [51].

Figure 8 shows the PV system’s temperature, solar radiation, and the wind turbine’s hourly wind speed. Table 3 lists the prices of other energy sources purchased for use by various pieces of equipment in the EH system as well as the expenses of various generation units. The AOC 15/50 wind turbine utilized in this study was developed by Seaforth Energy Company. Table 4 lists the variables that were utilized to model the wind speed curve’s output power. Additionally, this table provides the specifications of the PV array as measured under STC conditions [44].

Details are in the caption following the image
Hourly wind turbine and PV array inputs: (a) wind speed, (b) solar radiation, and (c) temperature [48].
Details are in the caption following the image
Hourly wind turbine and PV array inputs: (a) wind speed, (b) solar radiation, and (c) temperature [48].
Details are in the caption following the image
Hourly wind turbine and PV array inputs: (a) wind speed, (b) solar radiation, and (c) temperature [48].
Table 3. EH parameters and maximum capacity of sources [48].
Parameter Value Unit
Heater maximum power 100 kW
Boiler maximum power 100 kW
CHP maximum power 100 kW
MT maximum power 65 kW
BS maximum charge and discharge capacity 50, −50 kW
WT maximum power 50 kW
PV maximum power 25 kW
District heating energy price 10 $/kW
Table 4. Data related to RESs in the EH system [48].
WT unit parameters PV unit parameters
# Unit Value # Unit Value
Vci m/s 5.26 PSTC kW 25
Vr m/s 14.68 K 0.016
Vco m/s 22.40 GSTC W/m2 1000
a, b, c, d −0.0609,  1.7882, −10.8347,  16.3773 Tr °C 0
Pr kW 50

The parameters belong to the CHP and MT units, and heater and boiler units are given in Tables 5 and 6, respectively. Table 7 also provides IPSO algorithm parameters.

Table 5. Data related to CHP and MT units in the EH system [48].
CHP unit parameters MT unit parameters
# Unit Value # Unit Value
0.35 Cnl 0.1
0.45 LHV 0.65
1 100
0.1 0.2
0.0001 0.001
1 2
0.0001 0.001
Table 6. Data related to heater and boiler units in the EH system [48].
Heater unit parameters Gas boiler unit parameters
# Unit Value # Unit Value
ηHeater 0.95 ηBoiler 0.75
Table 7. IPSO optimization algorithm parameters.
Parameter Value
NV 120
npop 20
Itterationmax 1000
Α 0.1
Tf 1
NE 20
k 0.5
C1 & C2 1,  3.5
αE, αG, αH, αBS 10,  10,  10,  1000

Equations (4) and (5) calculate the hourly power generated by the PV unit and WTs using the data of solar radiation and wind speed. The generated electricity from PV arrays and WTs is depicted in Figure 9.

Details are in the caption following the image
Generated power of PV arrays and WTs: (a) photovoltaic array generation; (b) wind turbine generation.
Details are in the caption following the image
Generated power of PV arrays and WTs: (a) photovoltaic array generation; (b) wind turbine generation.

5.2. Results and Discussion

In the current study, the IPSO algorithm is employed to determine the optimal planning for the EH system under the assumption that all demand can be met using the available components. Inputs to the problem include solar radiation, wind speed, load profile, and costs, which are considered critical factors in modeling and forecasting energy production and consumption within the system. Consequently, the optimal generation or consumption of each component is calculated using the proposed methodology, illustrated in Figure 10. This method takes into account the energy stored in battery ESSs, the electricity generated by CHP and MT units, and the thermal power produced by the heater, boiler, and CHP units.

Details are in the caption following the image
The daily charge and discharge of BS, electricity generation and heat generation in the EH system: (a) electrical exchanged power of BS and EH, (b) electricity generation of CHP and MT, (c) heat generation of heater, boiler, and CHP.
Details are in the caption following the image
The daily charge and discharge of BS, electricity generation and heat generation in the EH system: (a) electrical exchanged power of BS and EH, (b) electricity generation of CHP and MT, (c) heat generation of heater, boiler, and CHP.
Details are in the caption following the image
The daily charge and discharge of BS, electricity generation and heat generation in the EH system: (a) electrical exchanged power of BS and EH, (b) electricity generation of CHP and MT, (c) heat generation of heater, boiler, and CHP.

The results presented in Figure 10(a) clearly demonstrate that the charging and discharging behavior of the BS has been optimized throughout the day to maximize the utilization of stochastic energy generated by wind and solar resources. However, during hours 20 and 21, due to the absence of energy production from the PV system and the increased consumption by users, the BS releases its stored energy to the grid to meet the electrical demands.

The results presented in Figures 10(b) and 10(c) clearly indicate that the CHP system is activated during the necessary hours, producing both electrical energy and utilizing the generated heat. This optimal operation of the CHP is driven by the demand for the produced heat, as shown in Figure 10(c). Furthermore, whenever there is only a demand for electrical energy and no need for heat, the MT system is solely used to generate energy. In such cases, a portion of the electrical energy produced by the MT is stored in the BS system for future use.

Figure 11 displays the amounts of electricity, heat, and gas that were purchased from the grid and sold back to it.

Details are in the caption following the image
The daily purchased and sold power of electricity, gas and heat in EH system: (a) purchased and sold electricity power, (b) purchased and sold heat power, (c) purchased gas power.
Details are in the caption following the image
The daily purchased and sold power of electricity, gas and heat in EH system: (a) purchased and sold electricity power, (b) purchased and sold heat power, (c) purchased gas power.
Details are in the caption following the image
The daily purchased and sold power of electricity, gas and heat in EH system: (a) purchased and sold electricity power, (b) purchased and sold heat power, (c) purchased gas power.

In this work, the interactions among resources, loads, and ESSs are carefully examined. Renewable energy systems are first examined to supply electrical loads, as covered in the previous section. As a result, at certain times, DG power output exceeds electrical demand. As previously noted, if renewable energy–based DGs provide more power than required by electrical loads, the excess power is used to charge the battery ESSs. Also, according to the EH planning algorithm, any excess electricity is bought from the electrical network if the power provided by the EH’s components is insufficient to meet the overall electricity demand. Hence, the network supplies the demand with stable situation.

As we know, the EH is programmed to show the best performance in a 24-hour day through optimization and reasonable profit. For example, at 1 o’clock in the morning, because the purchased price of electricity (Figure 11) from the upstream network is high, it is economical to purchase gas to generate electricity from CHP and MT units since gas price is lower than electricity (Figures 10 and 11). Given the gas price in Figure 6, MT and CHP units generate electricity, as shown in Figure 10(b). During periods when the purchase price of gas is low, it is economical to use MT and CHP units to generate electricity.

According to the amount of demand and consumption, the required electricity is generated by the EH and is provided to the consumer units. One of these consumers is the heater which produces the required heat. At this time, due to gas purchase, heat is also supplied through boiler and CHP units (Figure 10(c)). The surplus power is sold to the upstream network at 1 a.m. due to the reasonable price of electricity (Figure 11) and the total heat generated is also sold. This makes for the profitability of the hub. Of course, the wind turbine and the PV system (Figure 9) are always at their maximum generation due to their near-zero production costs for the hub.

The trend of changes in electricity purchases from the grid is generally influenced by the electricity load demand profile during the day (Figure 6). By paying attention to Figure 11, during hours when the relative peak of electricity price is accompanied by heat load demand, for example, at 8 p.m., the EH supplies its electric load demand through CHP and MT (Figure 10(b)). From 6 p.m. to 7 p.m., when electricity prices are at their daily peak, electricity purchases from the grid fall sharply (Figure 11).

In the studied EH, a BS is used (Figure 10(a)) which saves power in case of excess production. Also, in cases when the demand is high, the production capacity of the hub is low, and/or the purchase price of electricity is high, the battery power is injected to the network. As can be seen in Figure 10(a), when the production of electricity is not enough, for example, at 1 o’clock in the morning, the BS is inevitably discharged and at 4 o’clock, due to increased production and the reasonable price of electricity, battery is charged to the maximum allowable SOC. The heat generated at this time, which is obtained from boiler, heater, and CHP units, can be sold. In the studied EH, it is not possible to produce gas and it is always purchased from the upstream network. Thus, in the hours when the gas price is reasonable, gas is purchased as needed to help generate electricity from MT and CHP units. Of course, the gas purchased for the boiler will also be used and the heat produced by this unit will be sold. At hour 20, the EH shows the greatest loss in terms of cost due to high overall demand, and at hour 22, due to the reasonable sale price and the demand level, it shows the highest profit.

5.3. Sensitivity Analysis

In this section, a sensitivity analysis regarding the proposed objective functions is performed in order to investigate the effect of each cost function on the final results of the proposed problem solution. To this end, 6 different scenarios have been considered by applying different weighting coefficients of the objectives of the optimization problem. The results obtained by applying proposed model for different scenarios are listed in Table 8. As can be seen, considering the biggest value for w1, the most preferred solution is found by paying more attention to energy trading cost between EH and upstream energy networks. Similarly, by increasing w2, the proposed algorithm tries to find a solution that offers a lower energy buffering cost.

Table 8. The most preferred solution with different priorities in decision making.
Solution # Cost function Solution value
F1 F2 w1 w2 F
1 1.1800e + 05 1.6403e + 04 0.0 1.0 1
2 −4.8982e + 05 3.9253e + 04 0.2 0.8 2.0238
3 −7.9004e + 05 4.7178e + 04 0.4 0.6 2.0784
4 −7.9574e + 05 5.2105e + 04 0.6 0.4 1.8035
5 −8.9179e + 05 5.4077e + 04 0.8 0.2 1.4556
6 −8.9604e + 05 5.4398e + 04 1.0 0.0 1

5.4. Algorithm Evaluation

The proposed algorithm’s performance is assessed in this section. Because the proposed problem is presented as an NLP optimization problem, it is solved using a metaheuristic approach. Furthermore, the proposed technique is compared to alternative ways for solving the NLP problem. Four additional algorithms Fmincon, GA, TLBO, and PSO are used, and the results are compared to those obtained by the proposed algorithm. Because the metaheuristic method is inherently unpredictable, the algorithm should be repeated multiple times to acquire the best results. Each of these runs is referred to as an era. In different iterations, the algorithm searches for the best answer in each epoch. For a proper comparison across methods, the initial population, as well as the number of algorithm iterations and running epochs, should all be equal. The collected results of the various algorithms are provided in Table 9 along with statistical analysis. According to this table, the IPSO algorithm has the best outcome among the many algorithms linked with the best and worst results. In addition, when it comes to variance and standard deviation indices, the TLBO approach delivers the best results.

Table 9. Comparison of the obtained results for scenario 5 from different algorithms.
Best result Worst result Mean Standard deviation Variance
Fmincon 1.9985 3.1338 2.7855 0.7652 1.1572
GA 2.0153 3.1152 2.5768 0.9857 1.2368
TLBO 1.9945 2.8925 2.1865 0.3459 0.9586
PSO 2.1086 3.3189 2.9395 0.7689 1.4524
IPSO 1.4556 2.9518 1.8345 0.4657 1.0928

Figure 12 depicts the convergence process for the suggested algorithm’s best obtained results. The best and average costs based on the per-unit value are shown in this diagram. When the average cost value achieves the best cost value, the metaheuristic algorithm is said to have converged. The suggested approach converges in iteration 364, as illustrated in Figure 12.

Details are in the caption following the image
Convergence curve based on the best cost function per unit value obtained for system III.

6. Conclusion

This paper presents a novel framework for optimal operation aimed at reducing the costs of an EH. In an integrated energy market, consisting of electrical power, natural gas, and heat market, the proposed EH is presented as a prosumer and bidirectional flows are investigated between EH and upstream energy networks. The proposed model considers various factors such as economic and energy factors. Both inflows and outflows of energy at the EH are checked as the proposed problem variables. The simulation results demonstrate that for optimal performance in an EH, in addition to issues related to load and its price, attention to thermal load consumption conditions and the price of natural gas is also essential. The necessity for optimal planning of the charging and discharging of energy storage systems is clearly reflected in the results, highlighting the efficient and targeted use of RESs.

In general, it can be said that the difference in electricity and natural gas prices at different times of the day, along with their varying behaviors, creates an opportunity to increase the profitability of the EH. This allows electricity to be generated during periods when electricity prices are high and natural gas prices are low. During these times, MT and CHP systems, by consuming natural gas and generating electricity, can be profitable. On the opposite side, during times when natural gas prices are high, the stored power in batteries, which comes from RESs, can be used to produce thermal energy at the lowest cost.

Conflicts of Interest

The authors declare no conflicts of interest.

Author Contributions

M.-M. M.-Z., conceptualization, methodology development, data collection, simulation, and initial manuscript drafting; R. E., supervision, project administration, validation of results, critical review, and editing of the manuscript; M. G., software implementation, result verification, and manuscript revision.

Funding

The authors received no specific funding for this work.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

    The full text of this article hosted at iucr.org is unavailable due to technical difficulties.