1. Introduction
Domestic consumers and industrial facilities require different kinds of energy, such as heat, electricity, and natural gas. Different energy carriers have traditionally been used and planned separately, but their combination can have an added value in terms of energy efficiency, reliability, cost, and environmental impact [
1,
2]. Recently, multi-energy systems (MES), e.g., combining heat, electricity and gas, have attracted increasing attention in energy engineering as they are seen as good candidates to drastically reduce CO
2 emissions [
1,
3]. Accordingly, the optimization of such systems has become a crucial research topic and should help answer questions related to the efficient integration of renewable energy sources (RES) or increased uses of energy storage solutions.
The optimization of an MES mainly relates to the optimization of the
design and the optimization of the
operation of the system, which can be optimized independently or jointly [
4,
5]. The latter aims at planning the use of the different production units, energy storage systems, etc., installed in the MES, to meet the energy demand at each time step for each energy carrier of the MES. Given a set of production or storage units, the optimization process determines which and when the units have to be switched on/off, generally in order to minimize an objective function related to cost or emissions [
6].
Optimizing the design of MESs independently of the operation consists of selecting which production technologies to use in the system, their configuration in the energy networks, their optimal installed capacities, etc. The design can be optimized using fixed rules for the operation, such as a predefined merit order, as in [
7]. However, works related to the design optimization very often also study operation optimization. These studies are interested in optimizing the design and the operation jointly as a single problem to find the optimal configuration of the MES.
In the works that optimize the MES as a whole, [
8,
9,
10] propose a mono-objective approach that seeks to minimize the total cost of an MES, represented as an energy hub. Other works address the problem through a multi-objective perspective, where they try to minimize the costs of the system and maximize its environmental performance [
7,
11,
12,
13,
14]. These objective functions can be expressed in different ways. For example, the optimization of the environmental impact can be translated into a maximization of the rate of renewable energy [
7] or a minimization of the CO
2 emission rate [
11,
12,
14,
15], or a minimization of the environmental cost [
13]. The optimization of the costs can be calculated as the minimization of total costs [
14,
16], the minimization of the cost of power generation [
13], the maximization of profits [
17,
18], or the minimization of costs compared to a reference system [
7,
19].
Two crucial points of these works are the time horizon and the temporal resolution taken into account for optimizing the system. The temporal resolution has a big impact on the accuracy of the model when there is a large share of renewable energy sources in the system [
16,
20]. Most works generally optimize energy systems over short representative time periods, for example a few days or a few weeks. Ref. [
12] uses six representative periods representing the average consumption during the day and during the night in winter, summer, and at mid-season for an MES with electricity, heating, hot water, and cooling. Ref. [
15] uses twelve representative periods to represent the average consumption over each month of the year for an MES with electricity and heat. Ref. [
21] optimizes a model with a shiftable load over a period of three years using sequential 24 h time horizons for an MES with electricity, heat, and cooling. Ref. [
22] optimize three representative days per month with an hourly resolution for the twelve months of the year for an MES with electricity and heat. Ref. [
11] presents several methods using coupled design days to allow for optimizing most of the system using representative design days while preserving a continuity in the energy storage using a full-year optimization for an MES with electricity and heat. Ref. [
14] studies the effect of different scenarios for combined cooling, heating, and power (CCHP) units using three representative days. However, there are always errors due to the aggregation of time-series into representative days [
23]. In a general way, representative design day methods are less efficient when integrating energy storage in the system due to the dynamic aspect of the storage.
Depending on the complexity of the proposed models, the authors use either exact methods or metaheuristics to solve the optimization problem. The former methods solve the model to optimality, but are not able to solve large-sized problems. The latter do not guarantee the optimality but render good (i.e., near-optimal) solutions with a small gap in a reasonable computation time [
24]. Metaheuristics are also practical when solving non-linear optimization models; however, they become less efficient when dealing with optimization problems with a huge number of integer decision variables [
25]. Ref. [
26] optimizes an MES and its thermal network by decomposing the problem in two subproblems: a mixed-integer linear programming formulation optimizes the MES without considering the thermal network, and a quadratically constrained programming formulation optimizes the thermal network. Ref. [
10] use a Particle Swarm Optimization metaheuristic to optimize an MES with heat and power storage, and [
13] uses a Bee Colony metaheuristic to optimize an MES with a CCHP unit over a single day. To cope with this issue and as a combination of both exact and metaheuristics, matheuristics step in to benefit from the advantages of both methods. For instance, the heuristic component (i.e., could be a metaheuristic) of the method is used to handle/determine binary decision variables, while the exact component determines the remaining continuous/integer decision variables [
27]. The two components cooperate in an iterative manner to solve the problem, as in [
12,
15] for MES. However, they do not guarantee optimality, and can still be hard to solve for longer time horizons. Next to that, non-linearities are sometimes solved using linearization techniques. For example, the work of [
22] linearizes the non-linear part-load efficiency of combined heat and power (CHP) units using binary variables in a mixed integer linear programming model. Ref. [
26] uses 1D and 2D piecewise linearization methods, including the triangle method proposed by [
28], to linearize the performance curves of technologies in an MES. Moreover, various approximation methods of different complexities can be used to approximate these types of part-load efficiencies [
29]. Ref. [
30] considers linear efficiencies with different efficiency functions for different installed capacities. However, a linear efficiency function can greatly overestimate or underestimate the real value. Once again, these types of problem are hard to solve for large-size instances (e.g., long time horizons) because of the introduction of integer decision variables.
To leverage the complexity of the optimization of MESs, different simplifications are employed. The most straightforward simplification is the optimization of the system over a short time horizon, e.g., 24 h instead of a full year [
22]. This does not allow for a long-term optimization, as the energy demands can vary significantly over the year, and it makes it harder to integrate energy storage into the model. Some other studies use a large time step; for instance, some consider an average value of energy demand over a certain period of time that can range from half a day to a full month [
31]. Using the latter simplification, the optimization of the operation is less accurate since the variations in day-to-day demand are canceled out by the averaged values. The use of design days—which are typical days representative of a period of time—improves the accuracy of the optimization, but they can also cancel out the extreme values, which must be taken into account to ensure a good design of the MES when the time-series data intervene in the constraints [
23]. Another simplification is the decomposition of the main problem into sub-problems; for example, optimizing a long period of time day by day.
In this paper, we address the three above-identified problems. First, we model an MES in terms of a multi-objective non-linear programming model to optimize simultaneously the design and the optimization of the MES. Second, we present different methods of linearizing the non-linear parts of this mathematical model, and we propose an improved linearization method, which generates less complex models than the classical one from the literature. Third, we solve the problem with a time resolution of one hour, sufficient to optimize the operation, and over a long period of time (one year) to allow faithful optimization of the design. Finally, we do a comparative analysis to evaluate the performance of the proposed method.
The aim of the research presented here is to optimize a multi-energy system over a full year, with a time resolution of one hour. To achieve this, it is necessary to take into account the non-linearities of the model, and we therefore propose a linearization method that can approximate a non-linear function efficiently, i.e., with a better approximation of the function and with a faster computation time than a standard method from the literature.
The remainder of this paper is organized as follows. In
Section 2, we define the problem we are dealing with and formulate it as a mathematical program. This model contains non-linear elements, which is why in
Section 3 we detail three different resolution techniques, among which is an original proposal. To validate the proposed model and the resolution techniques, we apply in
Section 4 the model on a real-world problem. We study the solutions obtained through the three resolution methods in
Section 5.1 and discuss the results in
Section 5.2, before drawing some conclusions in
Section 6.
2. Problem Definition and Formulation
In this article, we study the MES system illustrated in
Figure 1 involving three energy carriers: electricity, heat, and gas (the latter being only used as fuel). The main goal is to meet the energy demand of the system, which is a demand for heat and electricity over a time horizon of one year with a resolution of one hour. For this purpose, different technologies are used:
a combined heat and power unit (CHP) which provides heat and electricity from gas;
an electric boiler (EB) which provides heat;
a gas boiler (GB), which also provides heat;
photovoltaic (PV) panels which generate electricity;
solar thermal (ST) panels which generate heat.
The latter two technologies are considered as RES. Electricity can also be bought from the grid, and the surplus electricity produced by the PV panels can be sold to the grid. We also consider here that each technology must be installed with a minimal capacity, even if they are not used throughout the year.
The energy demand must be met by the system while optimizing two objectives: minimizing the cost of the system and maximizing the rate of renewable energy sources.
We formulate the above problem as a mathematical program model.
Table 1 summarizes the notation used in this work.
The mathematical formulation of the optimization problem and its resolution lead to the determination of optimal values for a certain number of decision variables. These decision variables are of two types here, namely
design and
operation variables. The design variables (
Table 2) are used to determine the size of the units (the rated power of the generators or the area of solar panels), and a minimum value for each of these variables ensures that the related technologies are used, as the goal here is not to decide which technology is present in the system. The operation variables (
Table 3) are used to optimize the operation of the system at each time step
, deciding how much energy is produced by each unit and how much is bought or sold. In this work, the decision variables of the mathematical model are highlighted in bold and blue (e.g.,
in
Table 2), and mathematical terms depending on these variables are in bold, e.g.,
.
The system is also characterized by a certain number of parameters that define its intrinsic functioning (i.e., efficiency coefficients, costs, etc.). These parameters are presented in
Table 4.
Determining the cost of the system requires the calculation of various investment and operation costs for each of the technologies.
Table 5 details the calculation of the investment costs
and the operation and maintenance costs
of different technologies
. The investment costs are proportional to the installed capacities, i.e., the power rate of the production units and the area of RES. The operation and maintenance costs depend on a fixed part proportional to the installed capacity, and a variable part proportional to the output power.
We recall that one of the objectives of this work is to minimize the total cost of the system. This goal can be translated as the maximization of a cost reduction with respect to a reference system. We therefore consider a particular reference state of the system, in which only the GB is used to generate the heat and where electricity is bought from the grid.
The annual cost of the reference system,
, is computed as:
Moreover, the annual cost of the MES,
, is given by:
in those two equations is the capital recovery factor and represents the present value of an annuity based on a number of annuities n and a discount factor i. It is expressed as .
Consequently, the annual cost reduction of the MES compared to the reference system can be calculated as:
The second objective stated above concerns the RES rate, which is to be maximized. The percentage of the energy demand covered by RES, namely
panels for the electricity demand and
for the heat demand, is calculated as follows:
The various components and the decision variables of the MES under study are subject to a number of constraints. The total area of solar panels must be less than
(total available area for solar panels), which can be written as follows:
The production of the technologies is limited by their installed capacity. More formally, this is expressed as:
The CHP generates both heat and electricity. Its electrical efficiency
depends on the ratio of the electric load to the nominal capacity, which is called the part–load ratio (PLR). This can be written as:
where the electrical efficiency of the CHP is given by:
and
a,
b, and
c are efficiency coefficients, depending on the type of CHP used. The heat usage of the CHP is less than or equal to the heat generated by the CHP. The extra heat is lost.
which is written as the following linear constraint:
where
is the thermal efficiency of the heat recuperation system of the CHP.
The PV panels produce electricity, which is used by the system (
), and the surplus electricity is sold to the grid (
). The electricity produced is proportional to the area of the PV panels:
with
and
where
is the inververters’ efficiency,
is the global solar radiation at time
t,
is the reference efficiency for the PV panels,
is a temperature coefficient,
is a reference temperature, and
is the outdoor temperature at time
t.
The ST panels produce heat which is used by the system (
), and the surplus heat is lost. The heat produced is proportional to the area of ST:
where
is the global solar radiation at time
t,
is the optical efficiency of the panels,
is the thermal loss coefficient, and
is the mean water temperature in the collector.
The electricity and heat generated must cover the energy demands of the system. The electric balance includes the electricity generated by the CHP and the PV panels, the electricity bought from the grid, the electricity used by the EB, and the electricity demand:
where
is the efficiency of the EB and the fraction
represents the electric consumption of the EB.
The heat balance includes the heat generated by the CHP, the GB, the EB, the ST panels, and the heat demand:
The mathematical program, which derives from the above considerations, is summarized in
Table 6.
3. Solution Approach
Solving the proposed mathematical program is hard because of Constraint (
9), which is not linear with regard to the decision variables (the electrical efficiency function of the CHP depends on the part-load ratio). One way to solve such a non-linear model is to linearize this constraint. We compare here three methods of linearization. The first method represents the non-linear efficiency function by a fixed efficiency value. The second method is a classical piecewise linearization method from the literature that linearizes non-linear functions with the help of a set of triangles [
28]. This second method introduces a set of extra binary/continuous variables to the original model to linearize a non-linear function, which in turn increases the complexity of the model to be solved. For the third method, we propose a new variant of this classical linearization method, which uses fewer triangles and consequently introduces only a few extra variables and makes the model less complex to be solved.
3.1. Constant Efficiency
For the first method, the efficiency of the CHP is fixed to a constant, and Equation (
10) thus becomes:
where
is a constant. Consequently, Constraint (
9) can be rewritten as:
The resulting mathematical program is now a linear program, which can be solved using classical linear programming algorithms and solvers.
3.2. Classical Piecewise Linearization Method
The second linearization method uses the technique from [
28], also used to optimize an MES in [
6], and which proposes piecewise linear approximations of functions of two variables. The so-called “triangle” method approximates the 2D function by the convex combination of triangles. This can be observed on
Figure 2, where the colored surface represents the value of
as a function of
and
(see Constraint (
9)), and where four triangles approximate this surface. In this figure and the following ones, we consider values
and
for these parameters.
To replace Constraint (
9) with such an approximation, we need to introduce new parameters, new intermediate variables and new constraints to the model. Regarding the new parameters, let
M (resp.
N) represent the number of breakpoints along the
(resp.
) axis (which will generate
(resp.
) triangles). Let
(
) be the breakpoints of the discretization along
(resp.
).
, as it is impossible to produce more than the nominal power of the CHP. As a consequence
.
The newly introduced variables are:
which represent the coefficients of the convex combination
and that indicate which triangle is selected
Figure 3 illustrate these variables (
,
and
) and parameters (the breakpoints
and
) for the case where
N and
M equal 3. From Constraint (
9), the value of
at the different breakpoints is given by the function:
On
Figure 3 the gray triangles represent the part of the approximation which is not used here, as
.
Constraint (
9) is then replaced by the following new constraints:
Constraint (21a) ensures that the sum of all the coefficients is equal to 1. Constraints (21b), (21c), and (21d) approximate the different variables of our model (, , and ) using a convex combination. Constraint (21e) ensures that only one triangle is selected for the convex combination. Constraint (21f) makes sure that only the coefficients associated with the selected triangle have a value different from 0. We consider dummy values of 0 at the extremes ().
The resulting mathematical program is a mixed integer linear program (due to the newly introduced integer variables and ), which can be solved using classical mixed integer linear programming algorithms and solvers. However, compared to the linear program of the first method, we add binary variables (or since ) and constraints, which clearly increases the complexity of the problem and therefore the calculation time to reach an optimal solution.
3.3. Proposed Adapted Piecewise Linearization Method
As a new variant of the classical piecewise linearization method, we propose an adapted linearization which introduces much less extra variables to the original model. The idea behind the proposed adapted linearization method is the fact that in the classical piecewise linearization method, nearly half of the triangles are not used in practice because of the particular shape of the surface representing
(as it can be seen in
Figure 3). We therefore propose to approximate this surface through fewer triangles, all having a vertex at the origin, as shown in
Figure 4. Hereafter, we call the proposed method the “adapted method”.
As it can be seen on
Figure 5, the proposed method leads to introducing
N breakpoints
(
) along the
axis.
Consequently, we add the following variables to the original mathematical model of the MES:
()
()
Constraint (
9) is then replaced by the following new constraints:
Constraint (22a) ensures that the sum of all the coefficients is less or equal to 1. Constraints (22b), (22c), and (22d) approximate the different variables of our model (, , and ) using a convex combination. Constraint (22e) ensures that only one triangle is selected for the convex combination. Constraint (22f) makes sure that only the coefficients associated with the selected triangle have a value different from 0. We consider dummy values of 0 at the extremes ().
The resulting linearized mathematical model is still a mixed integer linear programming model (due to the integer variables
). Compared to the first simplification method of
Section 3.1, we add
binary variables and
constraints.
3.4. Multi-Objective Resolution
Finally, solving the original bi-objective mathematical model with the above-mentioned three simplification/linearization methods requires finding a set of non-dominated solutions, so-called Pareto solutions. Non-dominated Pareto solutions are the solutions from which none of them can be objectively preferred to another. Indeed, by switching between two non-dominated solutions, at least one objective is improved while (at least) another one deteriorates. To solve the linearized bi-objective model and to obtain non-dominated Pareto solutions, we use the
-constraint method. First presented by [
32], the
-constraint method is used to transfer a multi-objective optimization model into a single-objective one, while still obtaining non-dominated Pareto solutions. In this method, one of the objectives is kept as the main objective function of the model, and the other objectives are transferred to the constraint body of the model by limiting the objectives with lower and upper bounds (i.e., value of
) for minimization and maximization objectives, respectively. In our case, we optimize
(Objective (
3)) while imposing an
-constraint on
(Objective (
4)).
Figure 6 illustrates a Pareto front including ten non-dominated solutions of our mathematical model. The upper left solution maximizes the amount of energy produced by RES (and consequently is less interesting for the annual cost reduction objective), whereas the lower right solution maximizes the annual cost reduction (and is therefore less efficient in terms of RES usage). The remaining in-between solutions are intermediate Pareto-efficient configurations. An advantage of generating the set of Pareto solutions is that it provides more flexibility to the decision-maker when selecting a unique final solution among the Pareto set based on his/her preferences.
3.5. Discussion on the CHP Approximations
As explained in
Section 2, we consider in this work that the CHP must be installed with a minimal capacity
. The linearization methods proposed here can be coupled with other models to choose how many units of CHP are installed using other binary decision variables. The model proposed by [
30] uses binary decision variables to decide how many units are installed and what size those units are, but does not take into account the non-linear part-load efficiency of the technologies. Their model, and subsequent work by [
11], also allows using different efficiency functions for different installed capacities. However, the main difference with the approaches we present here is that these efficiency functions are always linear.
Figure 7 presents a view of the linearization method we propose in
Section 3.3 for two different installed capacities (respectively
and
). On this figure, the blue dotted line represents the non-linear efficiency
from Equation (
10), and the plain green line represents the linearized approximation of this function with the proposed adapted piecewise method using three pieces. The methods used by [
11,
30] approximate the same efficiencies using a different linear function for each installed capacity for discrete installed capacities in [
30] and for continuous capacities below or above a certain threshold in [
11]. These functions are written as
with different coefficients
,
, and
depending on the installed capacity. As can be seen in
Figure 7, a purely linear function will not accurately approximate the real efficiency. We will also show in our results on a case study in
Section 5.2 that such an approximated efficiency, represented by a linear function, significantly impacts the accuracy of the model.
Comparing the size of the two linearization approaches for the same number of breakpoints N along the axis, the method from the literature introduces binary variables and constraints in the model, while the proposed method introduces binary variables and constraints.
4. Case Study
In this section, a case study is presented, which will be used to validate the performances of the proposed resolution methods.
The case study represents an area in the vicinity of the city of Nantes in France. This area includes an MES, and it covers an area of 33.5 hectares, including the campus of IMT Atlantique, a French technological university, and 45 single-family houses [
7]. The goal is to optimize the MES of the case study in terms of two objectives: (1) maximizing the rate of RES, and (2) maximizing the reduction of the costs of the system. The MES of the case study incorporates a set of available technologies: a combined heat and power unit, an electric boiler, a gas boiler, and photovoltaic as well as solar thermal panels.
Table 7 and
Table 8 present a summary of the values of the parameters used in this case study. The investment and operation and maintenance costs of the technologies come from [
33] for the GB, ref. [
34] for the EB, ref. [
35] for the PV panels, and [
7] for the CHP and ST panels. The different costs of electricity (
and
) and gas (
) are the market price in France, from EDF in October 2021. The other parameters in
Table 8 are from [
7].
In
Table 8, some of the parameters (
,
,
, and
) are time series and are presented in
Figure 8.
Figure 8a presents the energy demands of the system: the electricity demand
and the heat demand
. They are represented as a time series over the year with an hourly resolution. These are a mix of real and simulated data. Measured electricity and heat consumption monthly data are available for the campus buildings, and they are disaggregated into hourly time series. For the electricity demand, it was considered that the studied area is representative to the region’s electrical consumption, and the electricity demand of the region was scaled accordingly to match the yearly consumption of the campus buildings. The hourly heat demand of the campus is produced from the monthly data using a degree-hour method. The data for the 45 houses are generated using TRNSYS simulation software version 18 (
http://www.trnsys.com/, accessed on 5 October 2023) to model residential houses complying with the RT2012 French thermal regulations [
7]. The total energy demands over the year are 3.6 GWh and 6.1 GWh for electricity and heat, respectively.
Figure 8b presents the environmental parameters: the outdoor temperature
and the global solar radiation
. These two parameters are used in the calculation of the energy generated by RES.