## 1. Introduction

Modern energy systems are facing new and challenging issues, which are mainly related to the ever-increasing energy demand, the large uncertainties affecting modern power system operation, the need for increasing grid resilience to catastrophic events and the strict requirements defined by new environmental and climate policies.

Driven by these challenges, power systems underwent an historical change from a centralized architecture, where energy was produced mainly by large thermal power plants, to a distributed system, with the massive deployment of renewable power generators and decentralized energy resources, such as Combined Heating and Power (CHP), energy storage, plug-in hybrid electric vehicles, and tri-generation systems [

1].

The large-scale pervasion of these technologies in existing energy systems required a novel holistic framework aimed at modeling and operating heterogeneous energy infrastructures and multiple energy carriers in an integrated and coordinated way, rather than considering them as separate and independent systems characterized by their own state variables [

2]. In this context, the concept of energy loads should also evolve from pure passive entities, which could only receive energy, to dynamic and cooperative entities that are capable of providing flexibility services to the available energy systems [

3].

The most promising technologies aimed at enabling this evolution include the energy hub, which is a functional unit where multi-energy carriers can be conditioned, stored and converted, and the energy interconnectors, which are transmission elements that can carry multiple simultaneous energy flows throughout different nodes. The conceptualization of these elements, which generalizes the concepts of nodes and edges of multi-carrier energy networks, allows the modeling of different technologies characterized by different levels of complexity, for a variety of applications [

4].

In particular, an energy hub consists of a network of interconnected energy converters and storage systems, which aim at processing the input energy carriers (e.g., electric energy, gas, and district heating) in order to supply electrical, thermal and chemical loads. Different hub architectures, which are based on proper combinations of Combined Heating and Power (CHP), Electric or Gas Heat Pumps (EHP/GHP), fuel cells, and boilers, have been proposed in the literature, and deployed for bottom-up modeling, for example, in designing multi-agent energy systems, or top-down applications, for example, in addressing optimal energy flow analyses or real-time pricing schemes [

5,

6]. Various contexts and scales have been considered: References [

7,

8,

9] focus on residential hubs, References [

10,

11] describe the application of the concept to wider communities, while Reference [

12] focuses on large-scale networks.

Although these studies demonstrated that energy hubs can offer increased flexibilities in solving complex planning and operation energy problems, some open problems need to be addressed in order to fully exploit these benefits. In this context, one of the most critical problems is their economic assessment, which can refer to both operation scheduling, that is, optimal hub dispatch, and planning, that is, optimal hub sizing. Such problems are traditionally formulated as deterministic constrained optimization problems, the aim of which is to minimize costs, considering the technical feasibility of the solutions obtained [

2,

13,

14,

15]. Anyway, these formulations do not consider the effects of the heterogeneous uncertainties affecting some strategic input data, such as the volatility of energy costs, random load fluctuations, energy production from renewable sources and non-idealities related to the elements of an energy hub, which could sensibly affect the robustness of the obtained solutions. Hence, advanced methodologies aimed at solving uncertain optimization problems are required to identify effective and robust energy hub operation strategies [

16,

17,

18,

19,

20].

To solve this challenging problem, the adoption of stochastic optimization methods, based on both sampling and analytical techniques, has been proposed in the literature [

21,

22,

23,

24]. Although these methods allow insight into energy hub optimization problems and making more reliable decisions in complex situations, their deployment in realistic operation scenario is not immune from drawbacks and shortcomings. In particular, sampling-based methods may require a set of simulations extremely large, requiring prohibitively expensive computational burden, especially in the presence of many uncertainty sources [

25]. Analytical techniques, instead, are more efficient but in order to be used properly, they need a series of simplifying assumptions and the characterization of random variables in terms of their probability distribution. Such data is not always available to decision makers and the adoption of partial information in terms of probability distributions may lead to unrealistic results.

To overcome these limitations, more sophisticated techniques for uncertainty modeling based on the self-validating computing theory have been recently proposed in several papers [

26,

27]. The main idea inside these techniques is to represent the decision variables of the optimization problem by affine combinations of some primitive uncertain variables, which describe the main sources of uncertainty affecting the energy hub operation state [

28]. The adoption of this computing paradigm allows solving the optimal dispatch problem by considering the effects of multiple and heterogeneous uncertainty sources, as far as to assess the impacts of each one of them on the energy hub operation state, overcoming the dependency problem and the wrapping effect, which could lead to an excessive over-conservatism of the solutions [

29,

30]. Despite these benefits, the adoption of Affine Arithmetic (AA)-based computing in energy-hub operation optimization is in its infancy and several problems need to be fixed in order to further improve the effectiveness of these solution-based approaches. In this domain, one of the most challenging issue to address relies on the large number of new noise symbols generated by the non-linear AA-based operators to represent the endogenous uncertainties. A strategy frequently adopted to reduce these noise symbols, and the corresponding uncertainty level, is to compact the non-primitive noise symbols in a new single one, the partial deviation of which is the sum of the reduced partial deviations [

31]: this approximation simplifies the computations, reducing the complexity and the memory requirements of the solution algorithm at the expense of a loss of correlation and estimation accuracy.

The need to preserve high-order correlation in non-linear AA-based operations represents an important issue to address in solving the energy-hub operation scheduling problem, where the non-linearities of both the objective function and the system constraints involve multiplication chains, which tend to absorb the variable correlations. To solve this problem, this paper proposes the adoption of mathematical operators based on general quadratic forms, which are an extension of AA that keep track of second-order noise symbols dependency. The adoption of this computing paradigm allows solving the energy hub optimal scheduling problem satisfying the genericity and self-verification requirements, which dictate that the final result of each mathematical operation on affine forms include the exact solution without requiring a posteriori analyses. Detailed simulation studies developed on realistic case studies are presented and discussed in order to prove the effectiveness of the proposed methods.

The paper is organized as follows:

Section 2 describes the energy hub model and the problem formulation for the economic dispatch;

Section 3 introduces the extended Affine Arithmetic-based solution method;

Section 4 presents a realistic case study on the economic dispatch of an energy hub using extended Affine Arithmetic; and the last Section is devoted to the conclusions and discussion of possible further work.

## 3. Affine Arithmetic

In affine arithmetic, a quantity

$\widehat{x}$ is represented by an expression of the form [

36]:

which is a first-degree polynomial of the variables

${\epsilon}_{i}$, which are called noise symbols, that are bounded in the interval [−1, 1], and represent independent sources of uncertainty.

The central value of the affine form $\widehat{x}$ is ${x}_{0}$, and ${x}_{i}$ corresponds to a partial deviation from that value due to effect of the i-th uncertainty source.

Linear mappings for affine forms are defined as follows:

In the case of a non-linear function of an affine form

$f(\widehat{x})$, the result cannot be an affine form itself; hence, it is necessary to approximate the function

${f}^{\ast}({\epsilon}_{1},{\epsilon}_{2},...,{\epsilon}_{N})$ over its domain to find an affine form that approximates the function.

In such a case, a new term that takes into account the approximation error must be introduced and the resulting affine form will be:

The term

${z}_{N+1}{\epsilon}_{N+1}$ represents the error defined as:

and

${z}_{N+1}\in {\mathcal{R}}^{+}$ represents an upper bound for its absolute magnitude. Affine Arithmetic has been successfully applied to different problems in power systems, in order to deal with uncertain data, as explained in [

37,

38], and it can be applied to energy hubs as well. Rather than approximating the non-linear function by introducing a new noise symbol, the so-called endogenous uncertainty, in this paper an alternative approach is adopted.

The main idea is to generalize the basic notion of the affine form, defined in Equation (

5), by introducing the concept of extended affine form, which allows a more accurate description of non linear functions based on products between affine forms. This form can be represented by the following:

where the term extended, refers to the presence of the noise symbols

${\epsilon}_{ij}$.

The main complexity in dealing with the extended affine forms is that the upper and lower bounds require the solution of a maximization /minimization problem, mainly:

According to these definitions, the following mathematical operators can be inferred:

By analysing the last operator, it is worth observing that the minimization of an extended affine form requires the solution of a min-max optimization problem. The nature of the problem describes the risk attitude of the analyst, which can decide to minimize the central value, or the radius, if a reliable solution is required. A direct correlation with the theory of robust optimization can be inferred and will be explored in future papers.

A simple numerical example is provided to illustrate the extended affine arithmetic-based optimization. Consider the following two affine forms as decision variables:

And $\widehat{\widehat{z}}=\widehat{x}\widehat{y}$ as the optimization function.

The constrained optimization problem to be solved is the following:

This problem can be rewritten as a simple deterministic optimization by writing the constraints as:

The affine forms that solve the previously described optimization problem are shown in

Table 1:

Extended Affine Arithmetic can be used to solve the optimal scheduling problem of an energy hub in the presence of multiple uncertainty sources. As previously explained, three main uncertain input variables are considered in this study, namely energy prices

${C}_{i}$, loads demand

${L}_{j}$ and renewable energy generation

${E}_{ren,k}$, which are expressed by the following affine forms.

Once the uncertainty sources are established, decision variables

${E}_{i}$ can be expressed as the sum of a central value and a series of partial deviations equal to the number of uncertainty sources considered:

where

N is the number of input energy carriers, that is, the decision variables, and thus the number of uncertain costs considered,

M is the number of loads and

P the renewable energy generators. The total number of uncertainty sources and thus partial deviations of a decision variable in a particular problem is

$N+P+M$.

The total cost, in this case, is an extended affine form with respect to the noise symbols

${\epsilon}_{i}$ and it is equal to the following expression:

When formulating an optimization problem, different criteria can be chosen depending on the risk attitude of the analyst. A reliable solution can be found by minimizing the radius of ${C}_{tot}$, that is, by finding the decision variables $\widehat{{E}_{i}}$ that minimize its upper value with respect to every ${\epsilon}_{i}$, where the upper value can be found by solving a sub-level optimization problem with respect to $\mathit{\epsilon}$. In this case, the decision variables will be affine forms $\widehat{{E}_{i}}$, thus, in the optimization problem, the values to be found will be $N+N\ast Q$: $\mathit{E}=\left\{{E}_{i,j}\right\}\phantom{\rule{1.em}{0ex}}\forall \phantom{\rule{0.277778em}{0ex}}i=1,...,N,\phantom{\rule{0.277778em}{0ex}}j=0,...,Q$.

The equality constraints in affine forms can be reformulated as a system of deterministic constraints, each associated to a noise symbol, as shown in the following example. Assuming only one uncertain load

L and

Q total uncertain sources:

The previous constraint becomes a series of

Q deterministic equality constraints:

Thus, for

M loads and

Q uncertainty sources, the total number of equality constraints will be

$M+Q\ast M$, and it can be written in matrix form as

$\widehat{\mathit{L}}$=

$\mathit{C}\widehat{\mathit{E}}$. The inequality constraints can be written in the following form, where

$|{E}_{i,j}|$ represents the absolute value of the

j-th partial deviation related to the

i-th decision variable,

$\underline{{E}_{i}}$ is the minimum and

$\overline{{E}_{i}}$, the maximum value:

Finally, the whole problem can be written as the following optimization problem:

The solution of this problem is represented by a series of affine forms $\widehat{{E}_{i}}$ which minimizes the radius of the total cost and is guaranteed to satisfy the constraints. Such affine forms have a strategic importance for the efficient scheduling of an energy hub, since they enclose the value of the objective function in a known range, which is guaranteed to contain the actual value despite the effects of data uncertainty.

Once the affine forms are known, the real-time dispatch values

${E}_{i}$ can be computed by calculating the noise symbols associated to the deterministic values

${C}_{p,real},\phantom{\rule{0.277778em}{0ex}}{L}_{j,real},\phantom{\rule{0.277778em}{0ex}}{E}_{ren,k,real}$:

## 4. Case Study

To show the effectiveness of the proposed technique, in this paper, the energy hub shown in

Figure 2 is considered. It consists of six converters, a thermal load

${L}_{th}$, an electrical load

${L}_{el}$ and a renewable energy generator

${E}_{ren}$. The input carriers are electric energy, natural gas, hydrogen and district heating although they are divided into six different inputs in order to keep the mathematical model linear:

${E}_{{H}_{2}},\phantom{\rule{0.277778em}{0ex}}{E}_{el}^{\phantom{\rule{0.277778em}{0ex}}net},\phantom{\rule{0.277778em}{0ex}}{E}_{el}^{\phantom{\rule{0.277778em}{0ex}}EHP},\phantom{\rule{0.277778em}{0ex}}{E}_{gas}^{\phantom{\rule{0.277778em}{0ex}}boil},\phantom{\rule{0.277778em}{0ex}}{E}_{gas}^{\phantom{\rule{0.277778em}{0ex}}CHP},\phantom{\rule{0.277778em}{0ex}}{E}_{DH}$.

The converters considered are:

Transformer: it connects the electric energy input from the grid to the electric load, ${\eta}_{T}=0.98$.

Electric Heat Pumps (EHP): they serve the thermal load by efficiently converting input electric energy, the coefficient of performance (COP) is set to $2.5$.

Boilers: they simply work by burning natural gas and serving thermal load, ${\eta}_{boil}=0.8$.

Combined Heat and Power (CHP): such elements serve both loads, and they are fed by natural gas. The efficiencies for electric and thermal conversion are: ${\eta}_{el}^{CHP}=0.35$, ${\eta}_{th}^{CHP}=0.405$.

Fuel Cells (FC): they can produce both electric energy and heat by converting hydrogen ${\eta}_{el}^{FC}=0.35$, ${\eta}_{th}^{FC}=0.45$.

Heat Exchangers (HE): thermal load can be served by district heating, through the heat exchangers, whose heat transfer efficiency is set to ${\eta}_{HE}=0.9$.

The energy balance equations can be written in matrix form as:

The sources of uncertainty considered in this case are related to electric energy and natural gas costs, loads and renewable energy production, while hydrogen and district heating costs are supposed to be known with certainty, thus five affine forms and two scalar values are defined as input.

The central values and the partial deviations considered in this case study are described in

Table 2.

Since the renewable energy production is considered completely uncertain, the central value is assumed to be equal to the partial deviation.

Since there are five uncertainty sources, the affine forms of the decision variables are described by the following:

The total costs are

${C}_{tot}={C}_{el,tot}+{C}_{gas,tot}$, where the single components are calculated as follows:

The equality constraints, related to the energy balance on the energy hub are:

The inequality constraints describe the allowable operating points of each technology, that is,

$\forall \phantom{\rule{0.277778em}{0ex}}i$:

The affine forms obtained as a solution to the aforementioned problem are described in

Table 3, which lists the central value and the partial deviations of each decision variable.

Figure 3 shows the resulting intervals. The total cost, depending on the value of gas, electric energy, hydrogen and district heating prices, loads and renewable energy production is guaranteed to stay in the following range:

${C}_{tot}=[1439,\phantom{\rule{0.277778em}{0ex}}2003]$ €.

To assess the reliability of the solution found, a Montecarlo simulation has been performed. Considering 100,000 random samples, the results related to cost are shown in

Figure 4. It can be seen that the total cost remains in the calculated range for each possible scenario, including the worst case instance of the considered uncertainty sources.

Results were compared to stochastic and robust optimization: in the first case the cost was in the range: ${C}_{tot}=[1347,\phantom{\rule{0.277778em}{0ex}}1996]$ €, while considering the worst case scenario, the cost was ${C}_{tot}=2021$ €.

The extended affine arithmetic method provides results that are coherent with similar optimization techniques in the presence of uncertainty, although such a method provides more flexible and computationally more efficient results.

In the case of extended affine arithmetic optimization, once the real-time values of the uncertain quantities are known:

${\overline{L}}_{el},{\overline{L}}_{th},{\overline{C}}_{el},{\overline{C}}_{th},{\overline{E}}_{ren}$, the value of the noise symbol can be calculated as:

Thus, every decision variable and the cost associated to a certain event can be precisely calculated for each scenario without solving a new optimization problem.

For example, consider a scenario in which the values of the input variables are the following: ${L}_{el}\phantom{\rule{3.33333pt}{0ex}}=\phantom{\rule{3.33333pt}{0ex}}19.82$ MWh, ${L}_{th}=19.63$ MWh, ${C}_{el}=60.93$ €/MWh, ${C}_{gas}=40.19$ €/MWh and ${E}_{ren}$ = 0.27 MWh.

In this case: ${\epsilon}_{1}^{\ast}=-0.348$, ${\epsilon}_{2}^{\ast}=-0.407$, ${\epsilon}_{3}^{\ast}=0.116$, ${\epsilon}_{4}^{\ast}=-0.865$, ${\epsilon}_{5}^{\ast}=-0.862$.

The corresponding decision variables associated to this scenario are obtained by substituting each noise symbol

${\epsilon}_{i}^{\ast}$ in the resulting affine forms:

Hence obtaining the following values: ${E}_{el}^{\phantom{\rule{0.277778em}{0ex}}net}=16\phantom{\rule{0.277778em}{0ex}}$ MWh, ${E}_{el}^{\phantom{\rule{0.277778em}{0ex}}EHP}$=5.68 MWh, ${E}_{gas}^{\phantom{\rule{0.277778em}{0ex}}boil}=0.12$ MWh, ${E}_{gas}^{\phantom{\rule{0.277778em}{0ex}}CHP}=6.54$ MWh, ${E}_{{H}_{2}}=3.55$ MWh, ${E}_{{D}_{H}}=0.5$ MWh.

## 5. Conclusions

This paper presented a novel methodology based on extended Affine Arithmetic to reliably manage multiple uncertainties in the optimal scheduling of an energy hub.

After introducing the energy hub model and the main sources of uncertainty affecting the optimal scheduling problem, a description of generalized Affine Arithmetic has been given. Then, this new methodology was applied to an energy hub’s optimal scheduling problem in the presence of uncertainty and a novel mathematical formulation was established.

The proposed technique represents a strategic tool for an analyst whose aim is to minimize operational costs of an energy hub. The affine forms calculated offer a powerful tool for short time planning and real-time dispatching. The case study’s results, assuming that the uncertainty interval of input variables is known, showed the robustness of the obtained solution. Furthermore, given a decision variable expressed as an affine form and its associated range, the analyst can properly adjust his decisions to match the expected robustness level.

Future work on this subject may focus on the application of extended Affine Arithmetic to manage uncertainty for different energy hub models, including storage systems and thus inter-temporal constraints, as far as in exploring a formal connection between extended Affine Arithmetic and robust optimization.