Conference PaperPDF Available

Applying Piecewise Linear Characteristic Curves in District Energy Optimisation

Authors:

Abstract and Figures

Representing nonlinear curves as piecewise elements allows complex systems to be optimised by linear programs. Piecewise linearisation has been recently introduced in the context of distributed energy system optimisation. It is an efficient technique for representing non-linear technology behaviours in linear optimisation models, which are favourable in district energy optimisation models, owing to their speed and ability to handle large numbers of design variables. This paper describes a method of automating the creation of piecewise elements of technology performance curves for minimum fit error. The results show an objective function value improvement at a relatively large penalty in solution time: from 1.6 times to 58 times longer than describing technologies as having a single value for efficiency (SVE). We show that within the context of common technology performance curves, three breakpoints yield sufficiently accurate results and any returns are diminishing beyond that. Even at three breakpoints, it is evident that the placement of breakpoints along a curve significantly influences solution time, in a way for which it is not possible to account in automation. But, large savings can be made by automation by including a constraint to ensure piecewise curves have a strictly increasing/decreasing gradient. This avoids the use of special ordered sets, simplifying model generation and the number of non-continuous variables. SVE models provide a less realistic solution and application of nonlinear consumption curves ex-post shows them to be ultimately more expensive systems than their piecewise counterparts. However, this ex-post analysis applied to SVE models is a good compromise for feasibility level analyses, where whole system cost is key. However, investment decisions and operation schedules are markedly affected by consumption curve representation. Thus, the use of piecewise linearisation is beneficial for detailed design, particularly if automation of breakpoint allocation can help solve the issue of model convergence.
Content may be subject to copyright.
PROCEEDINGS OF ECOS 2017 - THE 30TH INTERNATIONAL CONFERENCE ON
EFFICIENCY, COST, OPTIMIZATION, SIMULATION AND ENVIRONMENTAL IMPACT OF ENERGY SYSTEMS
JULY 2-JULY 6, 2017, SAN DIEGO, CALIFORNIA, USA
1
Applying Piecewise Linear Characteristic Curves
in District Energy Optimisation
Bryn Pickeringa#, Ruchi Choudharya^
a Department of Engineering, University of Cambridge
Trumpington Street, Cambridge, CB2 1PZ, United Kingdom,
# bp325@cam.ac.uk, ^ rc488@cam.ac.uk
Abstract:
Representing nonlinear curves as piecewise elements allows complex systems to be optimised by linear
programs. Piecewise linearisation has been recently introduced in the context of distributed energy system
optimisation. It is an efficient technique for representing non-linear technology behaviours in linear optimisation
models, which are favourable in district energy optimisation models, owing to their speed and ability to handle
large numbers of design variables. This paper describes a method of automating the creation of piecewise
elements of technology performance curves for minimum fit error. The results show an objective function value
improvement at a relatively large penalty in solution time: from 1.6 times to 58 times longer than describing
technologies as having a single value for efficiency (SVE). We show that within the context of common
technology performance curves, three breakpoints yield sufficiently accurate results and any returns are
diminishing beyond that. Even at three breakpoints, it is evident that the placement of breakpoints along a
curve significantly influences solution time, in a way for which it is not possible to account in automation. But,
large savings can be made by automation by including a constraint to ensure piecewise curves have a strictly
increasing/decreasing gradient. This avoids the use of special ordered sets, simplifying model generation and
the number of non-continuous variables. SVE models provide a less realistic solution and application of
nonlinear consumption curves ex-post shows them to be ultimately more expensive systems than their
piecewise counterparts. However, this ex-post analysis applied to SVE models is a good compromise for
feasibility level analyses, where whole system cost is key. However, investment decisions and operation
schedules are markedly affected by consumption curve representation. Thus, the use of piecewise linearisation
is beneficial for detailed design, particularly if automation of breakpoint allocation can help solve the issue of
model convergence.
Keywords:
District energy, Mixed Integer Linear Programming, Optimisation, Piecewise Linearisation.
1. Introduction
The application of energy system optimisation at a district level can lead to tangible infrastructural
decisions by designers. Considering this, the energy system must be realistically represented, such
that results can reliably direct the decision-making process. Most current models use mixed-integer
linear programming (MILP) to optimise energy systems at a district-scale. In addition to allowing fast
solutions of large-scale problems, MILP models can efficiently represent energy distribution
networks. However, they are unable to handle non-linear characteristics of energy supply
technologies. Cooling technologies particularly exhibit nonlinearity in their operation, when
operating below nominal load and at different external/internal temperatures. Indeed, commercial
properties were not considered for optimisation in MILP by [1] due to the need to model cooling
technologies. Metaheuristic techniques are used to include system non-linearities, but can become
intractable for large-scale problems, taking far longer than MILP to reach a reasonable solution [2].
By describing a non-linear curve of an energy supply technology as multiple, connected linear pieces,
it is possible to compromise between model fidelity and computational efficiency. [3] showed that
bicubic and cubic technology part-load curves could be represented in piecewise form. In fact,
piecewise curves could contain up to ten pieces without significant effect on computational time. An
important factor found in this study was the location at which pieces meet (the `breakpoints'), but this
was not explored in detail. When comparing MILP and metaheuristics for operation schedule
optimisation, [2] undertook piecewise linearisation. Six breakpoints were applied to linearise part
load curves, specifically located at discontinuities and the point of maximum efficiency. The
subsequent piecewise MILP model led to an objective function value similar to the same system
2
optimised metaheuristically with non-linear curves. However, the choice of breakpoint positions was
not tested against other configurations.
This paper extends both these studies, by considering a more complex case while investigating
breakpoint positioning. A sequential least squares programming (SLSQP) algorithm is used to
minimise the error between piecewise and nonlinear technology part-load consumption curves. This
nonlinear optimisation is compared to both placing pieces equidistantly along the x-axis and to a
single value for efficiency (SVE). At full load, all curves converge on the nominal efficiency of a
technology, but at any part-load value it is possible to quantify the error between the “actual”
nonlinear case and “expected” linearised cases. The minimisation of this error is compared to
computational time penalty when applied to a district energy system case study.
2. Case study
A district planning case is considered, due to the non-negligible requirement for electricity, heating,
and cooling when combining different building types. This district is notional and consists of 10
domestic properties, one large hotel, one large office, and one power plant (figure 1). Within the
district, a range of technologies is available to meet demand of each energy type (table 1). Distribution
networks exist for low voltage electricity, gas, and heat. Table 2 gives further information on
attributes of each property type.
2.1. Chosen technologies
Multiple technologies exist to meet each type of energy demand. In this case study, the technology
choice facilitates the need for optimisation, due to different energy interdependencies. Grid electricity
(GE) and the boiler (NB), air source heat pump (AHP), and electric chiller (EC) can provide their
respective energy demands without interdependency, but have relatively high generation costs. Solar
photovoltaic (PV) and solar thermal (ST) panels benefit from government subsidies, such as the feed-
in tariff, but have fixed output once maximum capacity has been selected and the available roof space
is limited. CHP produces both heat and power simultaneously, giving a low generation cost but a high
initial capital investment (including a district heat network), while the heat recovery absorption
refrigerator (HRAR) can be powered by either waste heat or gas. Finally, storage facilities exist for
each energy type. By decoupling supply and demand temporally, storage reduces the effect of
interdependencies. Electricity can be produced by the CHP without worrying about heat demand, and
the PV and ST supply can be maximised in the knowledge that all production can be effectively used
on-site.
Figure 1. Graphical representation of case study district network.
3
Table 1. Model supply technologies and their consumption/production energy. E = electricity, G =
gas, S = solar radiation, C = cooling, H = heating.
Technology
AHP
EC
HRAR
CHP
NB
PV
ST
B
TES
Consumption
E
E
G, H
G
G
S
S
E
H/C
Production
C
C
C
E, H
H
E
H
E
H/C
Table 2. Case study building characteristics.
Dwelling
Hotel
Office
Plant
Electricity
7.2
1595.5
481.3
0
Heat
17.5
1641.6
86.5
0
Cooling
0.0
1757.9
99.1
0
Available roof area (m2)
130
1300
900
0
Available technologies
NB, PV, ST,
B, TES
mCHP, NB, PV,
HRAR, AHP, EC,
ST, B, TES
NB, PV, ST, HRAR,
AHP, EC, B, TES
CHP, GE
2.2. Data
To create a notional district, data on energy demand, technology characteristic curves, and costs have
been brought together from multiple sources:
The district is located in the South-East of England, UK. However, due to availability, U.S.
Department of Energy representative building demand data [4] is used to acquire hourly heat,
cooling, and electricity demand of representative buildings. Seattle, Washington climate
conditions were chosen for climate similarity with London, UK.
Characteristic curves for technologies are based on recommendations from Society of Heating,
Air-conditioning and Sanitary Engineers of Japan (SHASE) [5]. It is assumed that energy supply
technologies do not vary drastically between countries.
Costs curves are calculated based on values given in the SPON’S mechanical and electrical
services price book [6]. Storage device costs have been aggregated from online suppliers.
3. Methodology
3.1. Piecewise linearisation
Typically, in energy modelling, the efficiency of a technology is given as a single value, based on
nominal conditions, e.g. [79]. In reality, efficiency varies depending on the output of the technology
as a function of its maximum capacity, among other factors [10]. This nonlinearity can be addressed
by metaheuristic optimisation, which allows nonlinear inputs. However, given the non-deterministic
nature of metaheuristic methods, mathematical programming, usually in the form of MILP, is still the
dominant energy modelling method. To integrate nonlinear technology characteristics with MILP, it
is possible to approximate a nonlinear curve by segmenting it into several straight lines. These straight
lines create a linear, but discontinuous curve which can be handled in a linear program. For
application within the MILP environment, two approaches will be discussed in this section: special
ordered sets and constraint bound.
3.1.1. Special ordered sets
Special ordered sets of type 2 (SOS2), first introduced by [11], are often used in MILP to piecewise
linearise. Sampling points (breakpoints)     are defined along a curve, including the
start and end of the curve, with corresponding y-axis values      (figure 2). A
continuous decision variable, is associated with each breakpoint , such that   
   . By defining the variables to be SOS2, constraints are applied so only two adjacent
variables can be non-zero at any one time. For any decision variable , the corresponding decision
4
Figure 2. Graphical representation of SOS2
piecewise linearisation.  is the sum of
weighted values  and ,
with all other values of being zero.
Figure 3. Graphical representation of 3D
piecewise linearisation.   is the sum of
weighted decision variables and applied to
 ,   and  .
variable value  is calculated by interpolating from adjacent breakpoints   and 
, based on the relative weighting applied by and . In energy planning, part-load
efficiency is a function of two decision variables: load rate and maximum capacity. If maximum
capacity is a discontinuous variable, then an SOS2 can be described for discrete values of capacity.
If maximum capacity is a continuous variable, more complex methods are required, but special
ordered sets are still applicable. The 3D surface describing the relationship between maximum
capacity (), load-rate () and consumption ( ) can be discretised. The most common approach
is to have breakpoints     on the axis and sampling points     on the axis [12].
 is evaluated for each breakpoint. Any point    can be evaluated within the rectangle
bounded by ( ), ( ), ( ), and ( ), which contains two triangles created by its
diagonal [( ), ( )] (figure 3). By convex combination of the function values evaluated at
the vertices of the triangle containing  ,   can be ascertained.
3.1.2. Bound by constraints
In creating special ordered sets, many new decision variables are defined, more so when a 3D surface
exists. This will inevitably increase computational time, perhaps beyond what is feasible for the given
problem. In certain cases, it is also possible to force a continuous decision variable to follow a
piecewise curve, by applying constraints of the form     , as depicted in figure 4a. The
constraint lines intersect the nonlinear curve where the gradient, , equals the curve instantaneous
gradient. In the case of energy systems, the global minimum will only exist where each technology
has chosen to minimise its consumption at every given value of energy output. This means that the
consumption curve given in figure 4a will always follow the lower bound, which describes the
piecewise curve. However, if the gradient of the technology characteristic curve is not strictly
increasing/decreasing, this method cannot function. Figure 4b shows that certain lines describing the
piecewise curve will override others at incorrect segments of load rate, due to the changing direction
of gradient. Here, the consumption curve does not describe the piecewise curve. Although limited in
its use cases, this method can also be extended easily to the 3D case, where the constraints are of the
form      , given a maximum capacity () and load-rate (). On inspection of the
characteristic curves used in this study, most met the gradient criterion for this method. The only
technology which did not was the CHP, which has an undulating gradient when describing both its
gas consumption and its heat output (figure 7). However, as will be discussed in the next section, it
is possible to account for this when optimising the piecewise curves, to allow the bound by constraints
method to viably be used for solving the given problem.
5
Figure 4. Application of bounding a technology nonlinear curve under multiple straight lines to
create a piecewise linear curve. (a) shows its effective use on a curve of continuously decreasing
gradient, while (b) shows its ineffectiveness when applied to a more complex curve.
3.2. Optimisation
For a limited number of breakpoints, there will be at least one optimal placement to describe a
piecewise curve that best fits the nonlinear curve. The process of locating these breakpoints optimally
can be simplified by automation. The piecewise curve with least error relative to the nonlinear curve,
for a given number of breakpoints, can be ascertained when optimising. Additionally, the constraint
that the gradient must be strictly increasing or decreasing can be applied, creating piecewise curves
which meet the requirements set out in section 3.1.2.
Breakpoint allocation is undertaken during model pre-processing, by parameter optimisation.
Previous studies [13], [14] have used heuristic algorithms to piecewise linearise. Here, we have used
SLSQP [15] to minimise the root-mean-square error between each nonlinear curve and its piecewise
counterparts. To improve the chances of reaching the global optimum, 20 runs were undertaken for
each minimisation. This process took 17.1 seconds to optimise 108 piecewise curves describing
characteristics of 8 technologies (27 nonlinear curves, three to six breakpoints). For the case of the
EC, figure 5a shows the resulting 5-breakpoint curve. Curve fit is better when breakpoints are
optimised, most notably in the trough. Any form of piecewise linearisation is an improvement on the
SVE case, although there is continual improvement on error minimisation when optimising
breakpoint location, as figure 5b depicts for the EC.
Some technologies, such as the boiler, have a relatively static efficiency over the operating range. In
this case, there is little advantage to piecewise linearise, and even less reason to undertake parameter
optimisation. Cooling technologies tend to function more nonlinearly. This nonlinearity can be a
barrier to including cooling in a linear program [1], although it is usually considered to be caused by
system temperatures rather than variable load-rate. It is evident from figure 5a that the EC acts
nonlinearly with variable load rate. However, figure 6 shows that this nonlinearity is not as
pronounced for other cooling supply technologies, unless operating at low load rates. Below a distinct
discontinuity, the energy consumption becomes constant, irrespective of output. For the CHP, there
is a reasonable disparity between the realistic operation and SVE, particularly when considering the
heat to power ratio (figure 7). The CHP characteristic curves are also not strictly
increasing/decreasing, the result of which can be seen in the difference between the two optimised
curves, a difference that is not apparent for the other technologies. However, the difference is
relatively small, becoming non-negligible only for parts of the heat to power ratio (HTP) curve.
6
Figure 5. Comparison of different methods to describe electricity consumption of an EC, from
nonlinear to SVE. (a) shows consumption curve and piecewise linearisation with five breakpoints, (b)
shows root-mean-square error between each all methods and the nonlinear curve.
Figure 6. Comparison of different methods for describing the primary fuel consumption of an AHP
and HRAR, from nonlinear to SVE, at different load rates. Piecewise curves have five breakpoints.
Figure 7. Comparison of different methods for describing the gas consumption and heat output of a
CHP, from nonlinear to SVE, at different load rates. Five breakpoints given for piecewise curves.
(a) Consumption
(b) Error
7
As with cooling, the performance of thermal storage is primarily temperature dependant [16]. Varying
load rates do also have an effect, due in part to the use of pumps during charge/discharge [17], but
also due to thermal stratification required for minimal heat loss. If the flow rate of charge/discharge
is too high, it will likely disrupt the stratified layers in the tank, leading to mixing and associated
exergetic losses [18]. As temperature dependence is not considered in this study, nonlinear
characteristics of storage technologies are not included. However, thermal energy flow is limited for
the tanks, to simulate avoiding mixing effects.
3.3. Model configuration
1
The case study was modelled in Calliope (https://www.callio.pe/), an open-source modelling
framework which uses a python-based toolchain [19]. MILP optimisation was run via CPLEX [20],
with a 3% mixed integer optimality gap tolerance on a 64-bit Windows 7 operating system with 2.50
GHz Intel Xeon E5-2680 v3 processor and 64GB RAM. Multiple model configurations were run, for
different demand seasons, linearisation techniques, and breakpoints of piecewise linearisation (figure
8). The objective function throughout was minimisation of capital and operational costs, combined.
Ex-post, error due to linearisation techniques was calculated.
Figure 8. Configurations of modelling runs.
3.4. Case study simplification
The initial district was to be modelled over all hourly timesteps in a year. This created a problem of
a size that could not be handled by the testing hardware. To maintain model tractability, individual
weeks were considered instead. Two separate weeks were chosen based on maximum heat
requirement (week 1) and maximum cooling requirement (week 28). The initial network in figure 1
was also aggregated to the network seen in figure 9, reducing decision variables from 8,649,607 to
410,905. In doing this, all dwellings were merged into a single domestic property and the hotel and
office were merged into a commercial property. Total energy demand and available roof area
remained constant. These simplifications were necessary to run the model multiple times, such that
all the configurations given in figure 7 could be analysed in a timely fashion.
Initially, SOS2 was chosen as the method for representing the piecewise curves, described in section
3.1.1. But, model convergence was poor, particularly when within 10% of the relaxed LP solution.
To ensure that all relevant technologies could be piecewise linearised, constraint bounds, introduced
in section 3.1.2., were applied. This leads to a greater error in describing the CHP curve, particularly
at a greater number of breakpoints. After four breakpoints, it is not possible to reduce HTP curve
error further, leading to double the error between SOS2 and constraint bounds at six breakpoints
(figure 10). However, both methods still provide a low error, lower than their equidistant counterparts.
The technology characteristics considered for piecewise linearisation were the CHP HTP and gas
consumption; EC and AHP electricity consumption; and HRAR heat consumption. Other
characteristics available were the boiler gas consumption and the pumps associated with distributing
thermal energy from supply to demand. These characteristics were ignored due to the linearity of the
former and the small scale of the latter.
1
Model configuration files and ex-post analysis can be found at: https://github.com/brynpickering/piecewise-calliope
8
4. Results
4.1. System costs
Application of piecewise curves increases the objective function value by as much as 5.2%. Table 3
shows that differences in objective function value are small when increasing the number of piecewise
breakpoints, with optimised curve averages of £4036 +1%/-0.5% in winter and -£2394 +0%/-0.6% in
summer. The summer negative cost represents the ability for the system to gain more revenue from
subsidies and export than it spends on investment and operation in that period. There are no
equidistant solutions beyond three breakpoints due to model infeasibility. It is not possible to place
constraints on breakpoint location when placing equidistantly. Thus, the strictly increasing/
decreasing gradient requirement for being bound by constraints cannot be met for CHP HTP and gas
consumption.
Table 3. Objective function value in GBP for all run configurations. +NL = monetary cost incurred
from applying nonlinear consumption curves ex-post, O = optimised, E = equidistant.
Breakpoints
2
3
4
5
6
Linearisation
SVE
O
E
O
E
O
E
O
E
Winter
Result
3989
4036
4048
4074
Fail
4019
Fail
4016
Fail
+NL
+465
+23
+12
+40
N/A
+32
N/A
+32
N/A
Summer
Result
-2507
-2380
-2377
-2398
Fail
-2398
Fail
-2401
Fail
+NL
+294
-17
-28
-2
N/A
-1
N/A
0
N/A
Each linear model run has been compared to its nonlinear counterpart, by applying the relevant
nonlinear consumption curves to the technology outputs obtained using the linear optimisation. In
doing so, we can see the potential difference between “expected” (MILP objective function value)
and “actual” (nonlinear consumption curves applied ex-post) system costs (+NL). Although the
optimal SVE objective function value is lower than for piecewise models, the “actual” system costs
end up being higher. +NL is 12% in both seasonal weeks for SVE, decreasing to less than 1% when
including piecewise curves. In summer, this effect is most pronounced, where +NL reduces to zero
at six breakpoints.
Figure 10. root-mean-square error between
linearisation methods and the nonlinear
characteristic curve of CHP HTP, for full
range of breakpoints.
Figure 9. Graphical representation of case
study district network, following simplification
of district depicted in figure 1.
9
4.2. Model run time
While the accuracy of the objective function value is improved, piecewise linearised cases take much
longer to solve than the SVE case (table 4). This is more the case in the summer week, which peaks
at 17521 seconds (three breakpoints, equidistant), two orders of magnitude longer than the basic
model. Even at the least number of breakpoints, the solution time is 2.5x and 14.9x longer than the
basic model in winter and summer, respectively.
There is generally an increase in solution time with increased number of breakpoints, the only
anomaly being the drastic decrease in model solution time between having five and six breakpoints
in summer. Here, the model solves in less than half the time with an additional breakpoint. In this
instance, the five-breakpoint case had solved within 10% of the relaxed LP 200 seconds sooner than
the six-breakpoint case, but failed to converge on the last few percent for an extended period.
Equidistant breakpoints decrease the solution time by a small amount in the winter week and increase
it substantially in the summer week. As aforementioned, it is the final few percent of convergence
that leads to the vastly inflated solution time.
Table 4. Model runtime in seconds for all configurations, including pre-processing and subsequent
MILP solving in CPLEX. O = optimised, E = equidistant.
# of breakpoints
2
3
4
5
6
Linearisation
SVE
O
E
O
E
O
E
O
E
Winter
366
926
610
880
Fail
847
Fail
1408
Fail
Summer
300
4483
17521
7202
Fail
15230
Fail
6816
Fail
4.3. Technology investment and operation
The change of objective function value when applying piecewise characteristic curves results from
changes in both investment and operation. Varying the “penalty” for part load operation leads to
different technology choices. For instance, in meeting cooling demand in the SVE case, the EC is
chosen to operate as the only technology throughout. When applying piecewise curves, Figure 11
shows that AHP is better suited for part load requirements, leaving the EC for almost exclusive use
at its full load. Generally, there is more use of technologies in full/zero load configurations when
piecewise curves are included. This means that a greater variety of technologies are purchased to
avoid running any one of them at part load.
Purchased technology capacities also vary (figure 12). In both seasons, EC capacity is reduced in the
piecewise results and AHP is purchased to account for the deficit. In the winter week, boiler size is
also reduced, balanced by a larger heat storage capacity (table 5). Storage is used more in piecewise
models, leading to lower cumulative system capacity. These results also show that the utility of the
local distribution network is dictated by technology choices. For example, more power is distributed
to the commercial properties in summer due to the purchase of a smaller mCHP. Heat networks are
avoided. A small plant CHP is purchased in all cases, but it dumps heat in favour of distributing it.
The system is limited in how much heat it can dump, so the plant CHP could be feasibly larger if that
constraint were lifted.
Table 5. Capacity of distribution network to, and storage at, both demand locations. P = piecewise.
Distribution
Storage
Gas
Heat
Power
Cooling
Power
Heat
SVE
P
SVE
P
SVE
P
SVE
P
SVE
P
SVE
P
Winter
commercial
1304
1224
0
0
71
75
0
24
7
0
0
59
domestic
69
67
0
0
41
37
0
0
7
7
145
145
Summer
commercial
788
622
0
0
40
135
0
7
7
7
230
289
domestic
6
9
8
0
40
43
0
0
7
7
5
8
10
Figure 11. Technology output histograms, for SVE and optimised piecewise model runs. Full and
zero loads are given as single points, with all other part load operation given in 10% increments.
Figure 12
2
. Energy supply technology investment portfolios at each location and in each season.
2
Only 3-breakpoint piecewise given, for clarity. Investment portfolios of piecewise models are all very similar, so figure
12 and table 5 can be taken as correct for all numbers of breakpoints.
11
5. Discussion
When choosing how to represent technology part-load characteristics, piecewise linearisation has an
influence on the objective function value. By better matching the nonlinear curves, the optimal system
is more expensive. This greater expense is more representative of the “real” cost of the optimal system
and actually describes a cheaper system once the nonlinear curves have been applied ex-post. But,
the improvement in accuracy comes with a solution time penalty. As increasing number of
breakpoints does not greatly improve model accuracy, it is possible to limit the time penalty by going
no further than three breakpoints. Following this, in winter the 2.5x time penalty is probably
justifiable. In summer, the 15x time penalty may become unacceptable. Equally, choosing three
equidistant piecewise breakpoints proves beneficial in the winter case (1.5x quicker than optimised)
but certainly not in the summer case (4x slower than optimised). These three-breakpoint piecewise
models have the same number of decision variables, which leads to agreement with Bischi et al. [3],
that breakpoint positioning is likely an important factor. The central equidistant breakpoint is at 50%
load rate, which requires more branches to be searched because there could be an optimal schedule
with technologies operating either side. Conversely, the optimised central breakpoint, which tends
towards 20-30% load rate, exists in a less critical part of the curve because so few possible solutions
involve technologies operating at such low load rate. This problem of hopping either side of
breakpoints is only exacerbated by a greater number of them, hence the solution time increasing with
number of breakpoints.
On designing a piecewise model, assigning breakpoint locations to facilitate rapid convergence is
difficult. Certainly, avoiding SOS2 and assigning breakpoints for strictly increasing/decreasing
gradient is a good first step in reducing solution time, as number of decision variables is reduced.
Further study is required to better understand the critical nature of breakpoints. One possible method
is to run the model with a lower tolerance (e.g. 10% MIP gap). With this solution, the change in
operation schedule will already be evident. Critical operating regions could then be identified, and
breakpoints re-adjusted to avoid those regions. The design decision also depends on the purpose of
the model: feasibility level studies could model with SVE to get a lower system cost, then apply
nonlinear curves ex-post to get an upper bound. The piecewise system cost will exist within that
range. Only on undertaking detailed design, for investment portfolio and operating schedule, would
piecewise curves be necessary.
5.1. Three-dimensional piecewise linearisation
In this study, we linearised the 3D surface describing load rate, capacity, and consumption. Ideally,
such a surface should be avoided as it increases problem complexity. However, there are advantages
to using a continuous maximum capacity decision variable. Although real technologies exist in
discrete sizes, it can be difficult to decide which ones to include for consideration in a model. If too
many are included, the problem will become more complex than the continuous case, but too few
might mean missing more optimal solutions. The continuous case removes the need to decide, giving
a maximum capacity for which a designer can aim to find the closest available model. The relative
benefits have not been tested in this study, but it is clearly a next step for investigation.
5.2. Justifying simplifications
To undertake several model runs, concessions were made. These should be retrospectively analysed
where possible. First, the district network was simplified to just three locations, down from 21
(including intermediate transmission nodes), reducing decision variables by a factor of 20. Winter
SVE and three-breakpoint optimised piecewise were tested with the full network. The objective
function values were similar: £3880 and £4093 respectively, compared to £3989 and £4036 in the
simplified network. The same trend occurred the investment decisions, whereby AHP is only
purchased once piecewise is added. The difference is only evidenced by which technologies go where,
particularly between the hotel and office. However, this benefit is accompanied by a two order of
magnitude increase in solution time, to 209306 seconds. Second, piecewise linearisation was
12
described by bounding constraints, rather than the more conventional SOS2. In this case, CPLEX was
unable to continue the optimisation after more than 250000 seconds as hardware memory limits were
reached. Convergence below 5% caused greatest computational difficulty.
6. Conclusion
This study analysed the use and optimisation of piecewise curves in an energy planning and operation
problem. System cost converges on the “real” cost by representing nonlinear technology load curves
as multiple straight lines, instead of assuming a single value efficiency. By comparing objective
function value with system cost following ex-post application of nonlinear curves to the optimal
operating schedules, piecewise curves reduce the difference from 12% to 0.69% on average. This
reduction incurs a time penalty, from 1.6 times to 58 times longer to find an optimal solution when
piecewise linearisation is used. Breakpoint positioning is a key factor in increased solution time,
following solution branches either side of a breakpoint seems to create difficulty in model
convergence. Increasing the number of breakpoints exacerbates this problem, leading to greater
model solution time. The effect of optimising the placement of piecewise breakpoints, to reduce error
relative to the nonlinear curve, does not necessarily improve the issue of convergence. In fact, in
winter, simply placing three breakpoints equidistantly produces a solution quicker than its optimised
counterpart. However, automation of breakpoint allocation allows for the creation of piecewise curves
of strictly increasing/decreasing gradient. By doing so, solution time is reduced because special
ordered sets can be avoided.
Understanding nonlinear consumption curves is insightful, whether or not they are incorporated into
MILP optimisation by piecewise linearisation. They can be used at the feasibility level to get a system
upper bound cost, by application ex-post to the operation schedule of an SVE model (the lower
bound). Within such a range would lie the system cost for piecewise linearisation. This range could
be utilised for system feasibility, but the effect of piecewise linearisation on technology capacities,
use of storage and distribution networks, and operation schedules, is sufficiently distinct that detailed
design would benefit from its inclusion. As such, further research is required to fully understand
whether breakpoint allocation can be automated beyond simply minimizing fit error, to avoid
convergence issues and ensure models solve in a practical time. This research will require analysis of
solver parametrisation, such as the use of multiple runs with varying relaxation of the mixed integer
optimality gap tolerance.
Acknowledgements
This research was supported by the Engineering and Physical Sciences Research Council [reference
number: EP/L016095/1].
Nomenclature
Technologies
AHP Air source heat pump
B Battery
CHP Combined heat and power plant
EC Electric chiller
GE Grid electricity
HRAR Heat recovery absorption refrigerator
mCHP Micro CHP
NB Natural gas boiler
PV Solar photovoltaic panel
ST Solar thermal panel
TES Thermal energy storage
Optimisation:
MILP Mixed integer linear programming
SLSQP Sequential least squares programming
SOS2 Special ordered set of type 2
Other
SVE Single value efficiency
HTP Heat to power ratio
13
References
[1] M. Jennings, D. Fisk, and N. Shah, “Modelling and Optimization of Retrofitting Residential Energy
Systems at the Urban Scale,Energy, vol. 64, pp. 220233, Jan. 2014.
[2] B. Pickering, S. Ikeda, R. Choudhary, and R. Ooka, “Comparison of Metaheuristic and Linear
Programming Models for the Purpose of Optimising Building Energy Supply Operation Schedule,”
in 12th REHVA World Congress, 2016, vol. 6.
[3] A. Bischi, L. Taccari, E. Martelli, E. Amaldi, G. Manzolini, P. Silva, S. Campanari, and E. Macchi,
“A Detailed MILP Optimization Model for Combined Cooling, Heat and Power System Operation
Planning,” Energy, vol. 74, pp. 1226, 2014.
[4] Office of Energy Efficiency & Renewable Energy (EERE), “Commercial and Residential Hourly
Load Profiles for All TMY3 Locations in the United States,” United States Department of Energy.
[5] The Society of Heating Air-Conditioning and Sanitary Engineers of Japan (SHASE), Computer
Aided Simulation for Cogeneration Assessment & Design III. Tokyo: Maruzen publishing, 2003.
[6] AECOM, Ed., Spon’s Mechanical and Electrical Services Price Book 2016, 47 Har/Psc edition.
CRC Press, 2015.
[7] J. Keirstead, N. Samsatli, and N. Shah, SynCity: An Integrated Tool Kit for Urban Energy Systems
Modelling,” 2010, pp. 21–42.
[8] A. Omu, R. Choudhary, and A. Boies, “Distributed Energy Resource System Optimisation Using
Mixed Integer Linear Programming,” Energy Policy, vol. 61, pp. 249266, Oct. 2013.
[9] L. Li, H. Mu, N. Li, and M. Li, “Economic and Environmental Optimization for Distributed Energy
Resource Systems Coupled with District Energy Networks,” Energy, vol. 109, pp. 947960, Aug.
2016.
[10] S. Ikeda and R. Ooka, “Metaheuristic Optimization Methods for a Comprehensive Operating
Schedule of Battery, Thermal Energy Storage, and Heat Source in a Building Energy System,”
Applied Energy, vol. 151, pp. 192205, 2015.
[11] E. M. L. Beale and J. A. Tomlin, “Special Facilities in a General Mathematical Programming
System for Non-Convex Problems Using Ordered Sets of Variables,” OR, vol. 69, no. 447454, p.
99, 1970.
[12] C. D’Ambrosio, A. Lodi, and S. Martello, “Piecewise Linear Approximation of Functions of Two
Variables in MILP Models,” Operations Research Letters, vol. 38, no. 1, pp. 3946, Jan. 2010.
[13] A. Horner and J. Beauchamp, “Piecewise-Linear Approximation of Additive Synthesis Envelopes:
A Comparison of Various Methods,” Computer Music Journal, vol. 20, no. 2, pp. 7295, 1996.
[14] P. Siriruk, “Fitting Piecewise Linear Functions Using Particle Swarm Optimization,” Suranaree J.
Sci. Technol, vol. 19, no. 4, pp. 259264, 2012.
[15] D. Kraft and others, “A Software Package for Sequential Quadratic Programming,” DFVLR
Obersfaffeuhofen, Germany, DFVLR-FB88-28, 1988.
[16] H. Wang, W. Yin, E. Abdollahi, R. Lahdelma, and W. Jiao, “Modelling and Optimization of CHP
Based District Heating System with Renewable Energy Production and Energy Storage,” Applied
Energy, vol. 159, pp. 401421, Dec. 2015.
[17] S. Ikeda and R. Ooka, “Optimal Operation of Energy Systems Including Energy Storage Equipment
under Different Connections and Electricity Prices,Sustainable Cities and Society, vol. 21, pp. 1
11, Feb. 2016.
[18] A. Campos Celador, M. Odriozola, and J. M. Sala, “Implications of the Modelling of Stratified Hot
Water Storage Tanks in the Simulation of CHP Plants,” Energy Conversion and Management, vol.
52, no. 89, pp. 30183026, Aug. 2011.
[19] S. Pfenninger and J. Keirstead, “Renewables, Nuclear, or Fossil Fuels? Scenarios for Great Britain’s
Power System Considering Costs, Emissions and Energy Security,” Applied Energy, vol. 152, pp.
8393, Aug. 2015.
[20] IBM Corp., “IBM ILOG CPLEX Optimisation Studio.” Armonk, NY, US, 2016.
... In addition to a high temporal resolution, the behaviour of the system can be more accurately modelled by introducing operational constraints. Several authors have investigated the inclusion of operational constraints in investment planning models, both at large [61,63,68] and local scales [12,64,71]. Prior research suggests that energy conversion processes can be modelled with different technological details [61]. ...
Article
Full-text available
Companies in the manufacturing, service and transport infrastructure sectors will play a key role in the sustainable transition of the energy system implementing innovative technologies at full industrial scale. However, developing long-term investment plans is a challenging task, complicated by the volatility of energy markets and the uncertainties induced in the policy landscape by the recent energy crises. In this respect, mathematical models can support the transition of industrial systems, steering the planning process. In this work, we review and evaluate the suitability of available models to serve this purpose. The availability of modelling tools for local energy planning has already been assessed by several works. However, the tools which are most frequently employed at this scale are generally unable to characterise the evolution of the energy system in the long term, they have a focus on the operational aspects of the system, and are, in many cases, proprietary. By contrast, all the models examined in this review are open source, and the investigated set also features tools able to capture long-term dynamics. Our results provide evidence that several tools could offer valuable insights to the planning process. Nevertheless, a trade-off between the representation of long-term dynamics and the modelling of key aspects of the energy system of a company is, to date, inevitable. The best compromise is offered by a small group of multi-scale tools, able to conjugate a long-term perspective with a detailed modelling of the operational aspects of the system.
... The advantage of subjective clustering is the ability to map those clusters into future years, which we cannot readily do with clustering algorithms. Typical days are commonly used in mixed integer linear programming (MILP) optimisation, reducing the length of the time dimension from its full scale (e.g. one year -8760 hours) to anything from three [5] to six [3], or seven [25] days. Clustered observations form search spaces which represent 'typical' days in the year. ...
Article
Full-text available
Current district energy optimisation depends on perfect foresight. However, we rarely know how the future will transpire when undertaking infrastructure planning. A key uncertainty that has yet to be studied in this context is building-level energy demand. Energy demand varies stochastically on a daily basis, owing to activities and weather. Yet, most current district optimisation models consider only the average demand. Studies that incorporate demand uncertainty ignore the temporal autocorrelation of energy demand, or require a detailed engineering model for which there is no validation against real consumption data. In this paper, we propose a new 3-step methodology for handling demand uncertainty in mixed integer linear programming models of district energy systems. The three steps are: scenario generation, scenario reduction, and scenario optimisation. Our proposed framework is data-centric, based on sampling of historic demand data using multidimensional search spaces. 500 scenarios are generated from the historical demand of multiple buildings, requiring historical data to be nonparametrically sampled whilst maintaining interdependence of hourly demand in a day. Using scenario reduction, we are able to select a subset of scenarios that best represent the probability distribution of our large number of initial scenarios. The scenario optimisation step constitutes minimising the cost of technology investment and operation, where all realisations of demand from the reduced scenarios are probabilistically weighted in the objective function. We applied these three steps to a real district development in Cambridge, UK, and an illustrative district in Bangalore, India. Our results show that the technology investment portfolios derived from our 3-step methodology are more robust in meeting large possible variations in demand than any model optimised independently with a single demand scenario. This increased robustness comes at a higher monetary cost of investment. However, the high investment cost is lower than the highest possible cost when each of the initial 500 scenarios is optimised independently. In both our case studies, building level energy systems are always more robust than district level ones, a result which disagrees with many existing studies. The outcomes enable better examination of district energy systems. In addition, our methodology is compiled as an open-source code that can be applied to optimise existing and future energy masterplans of districts.
... Calliope has been used in various studies, for example, analyses of the national-scale power systems in Britain (Pfenninger & Keirstead, 2015a) and South Africa (Pfenninger & Keirstead, 2015b), and in methodological development for piecewise linearisation of characteristic technology performance curves for district-scale energy system analysis (Pickering & Choudhary, 2017). Ongoing research projects using Calliope include the effect of increased resilience to uncertain future demand and the interaction between local and national actors in the clean energy transition. ...
Conference Paper
Full-text available
Increasing complexity of building energy systems has led to a wide range of methods to minimise cost of meeting demand for all types of energy. Metaheuristics and mixed integer linear programmes (MILP) are the two most prevalent optimisation methods in the field, with relative advantages which have not previously been compared under common criteria. The principle objective of this paper is to scrutinise these two optimisation methods when applied to a problem of finding the optimal operational schedule of an energy system serving a hotel. 11 technologies are modelled by both methods, but all exhibit nonlinear characteristics which must be linearised for use in MILP. Comparison of the two models results in variation between objective function below 1%, where piecewise linearised MILP gives the most optimal solution. The time to solution varies by orders of magnitude between models: 0.08s for simple linear MILP, 1.64s for piecewise linear MILP and 274s for metaheuristic. System designers, or controllers, must decide between solution time and realistic representation of technologies when choosing an optimisation method, a compromise which may be balanced by piecewise optimisation. Further, Proposed operation schedules vary slightly between methods, allowing some subjectivity in exact operation schedule, without compromising objective function. Metaheuristics favours qualitative subjectivity, while MILP favours quantitative subjectivity.
Article
Full-text available
Mitigating climate change is driving the need to decarbonize the electricity sector, for which various possible technological options exist, alongside uncertainty over which options are preferable in terms of cost, emissions reductions, and energy security. To reduce this uncertainty, we here quantify two questions for the power system of Great Britain (England, Wales and Scotland): First, when compared within the same high-resolution modeling framework, how much do different combinations of technologies differ in these three respects? Second, how strongly does the cost and availability of grid-scale storage affect overall system cost, and would it favor some technology combinations above others? We compare three main possible generation technologies: (1) renewables, (2) nuclear, and (3) fossil fuels (with/without carbon capture and storage). Our results show that across a wide range of these combinations, the overall costs remain similar, implying that different configurations are equally feasible both technically and economically. However, the most economically favorable scenarios are not necessarily favorable in terms of emissions or energy security. The availability of grid-scale storage in scenarios with little dispatchable generation can reduce overall levelized electricity cost by up to 50%, depending on storage capacity costs. The UK can rely on its domestic wind and solar PV generation at lower renewable shares, with levelized costs only rising more than 10% above the mean of 0.084 GBP/kWh for shares of 50% and below at a 70% share, which is 35% higher. However, for more than an 80% renewable generation share to be economically feasible, large-scale storage, significantly more power imports, or domestic dispatchable renewables like tidal range must be available.
Article
Thermal energy storage (TES) and batteries have recently become increasingly important for peak-load shifting in energy systems. However, optimizing energy systems is difficult because each machine has multiple combinations of operations, and the objective function contains transformed nonlinear or non-convex characteristics. Therefore, we adopted the epsilon-constrained differential evolution (ɛDE) in order to minimize operating costs. We demonstrate that the ɛDE method efficiently solved strict constraint optimization problems on three energy systems: a self-consumption model (Case 1), total amount of a purchased model (Case 2), and a full connection model (Case 3) under 126 case studies. Although 216 decision variables were used under the nonlinear condition, we were able to obtain the optimal solution within a short time period, 16 min on an ordinary PC. Moreover, we proposed a new index “Area rate of prices (ARP)” in order to evaluate the effects of purchased and sold electricity prices on the operating costs. The results showed that when the area rates of purchased price to sold price are higher than 0.2 (ARP > 0.2), Case 1 was superior to Case 2. On the other hand, when the ARP value was less than 0.2, Case 2 was superior to Case 1. Therefore, we can conduct the optimization on everyday practical situations because ɛDE requires low computational cost. Even if the operators cannot conduct the optimization in practical energy management, they can easily determine the operation strategy by calculation of the ARP value. Therefore, the ɛDE and ARP methods have substantial advantages for energy system optimization.
Article
Storage equipment, such as batteries and thermal energy storage (TES), has become increasingly important recently for peak-load shifting in energy systems. Mathematical programming methods, used frequently in previous studies to optimize operating schedules, can always be used to derive a theoretically optimal solution, but are computationally time consuming. Consequently, we use metaheuristics, such as genetic algorithms (GAs), particle swarm optimization (PSO), and cuckoo search (CS), to optimize operating schedules of energy systems that include a battery, TES, and an air-source heat pump. In this paper, we used a GA, differential evolution (DE), our own proposed mutation-PSO (m-PSO), CS, and the self-adaptive learning bat algorithm (SLBA), of which m-PSO was the fastest, and CS was the most accurate. CS obtained the semi-optimal solution 135 times as fast as dynamic programming (DP), a mathematical programming method with 0.22% tolerance. Thus, we showed that metaheuristics, especially m-PSO and CS, have advantages over DP for optimization of the operating schedules of energy systems that include a battery and TES.
Article
A detailed optimization model is presented for planning the short-term operation of combined cooling, heat and power (CCHP) energy systems. The purpose is, given the design of a cogeneration system, to determine an operating schedule that minimizes the total operating and maintenance costs minus the revenue due to the electricity sold to the grid, while taking into account time-varying loads, tariffs and ambient conditions. The model considers the simultaneous use of different prime movers (generating electricity and heat), boilers, compression heat pumps and chillers, and absorption chillers to satisfy given electricity, heat and cooling demands. Heat and cooling load can be stored in storage tanks. Units can have one or two operative variables, highly nonlinear performance curves describing their off-design behavior, and limitations or penalizations affecting their start-up/shut-down operations. To exploit the effectiveness of state-of-the-art Mixed Integer Linear Program (MILP) solvers, the resulting Mixed Integer Nonlinear Programming (MINLP) model is converted into a MILP by appropriate piecewise linear approximation of the nonlinear performance curves. The model, written in the AMPL modeling language, has been tested on several plant test cases. The computational results are discussed in terms of the quality of the solutions, the linearization accuracy and the computational time.