Professional Documents
Culture Documents
Power
Systems
Laboratory
Benjamin Schaule
Master Thesis
PSL 1727
In this master’s thesis, methods were developed for disaggregating and mod-
eling heat pumps and boilers from coarse smart meter active power measure-
ments. The disaggregated time series were matched to appropriate models
that best describe the behavior of the individual appliances. For this pur-
pose, a physical, dynamic heat pump model and a parameter estimation
technique were developed. The disaggregation methods are designed for two
different resolution levels, i.e., in the range of one minute and in the range of
15 minutes per data point. Unlike existing disaggregation methods, which
focus on the shape of measurement signals in higher resolution, these dis-
aggregation methods combine information from the shapes of signals with
model based Bayesian and moving horizon estimation approaches. The dis-
aggregation method produces good results in one minute resolution, and
even for data with 15 minute resolution. Similarly, a disaggregation method
for electric boilers was developed. The disaggregated time series then result
in a statistical hot water consumption pattern. Finally, a method was de-
signed to add a disturbance pattern to the dynamic model of the boiler or
the heat pump. This allows forward simulation of a dynamic model of both
device types that not only has the same behavior on average, but also shares
the same noise characteristics.
iii
iv
Acknowledgements
This thesis was carried out as a cooperation with Adaptricity and the Power
Systems Laboratory at ETH Zurich. I am grateful to Prof. Dr. Gabriela Hug
for making this possible and to Dr. Stephan Koch and Thierry Zufferey for
their supervision. I would like to thank them for stimulating discussions and
helpful feedback.
v
vi
Contents
List of Acronyms ix
List of Symbols xi
1 Introduction 1
vii
viii CONTENTS
Bibliography 99
List of Acronyms
ix
x CONTENTS
List of Symbols
xi
xii CONTENTS
Introduction
1
2 CHAPTER 1. INTRODUCTION
Electric thermal loads such as heat pumps or boilers are particularly well
suited for DR schemes for multiple reasons:
For residential use, consumer comfort can be maintained even when heat-
ing and cooling devices adjust their switching times to accommodate grid
needs. For example, if a user would like his house to be kept at a temperature
of 21◦ C, a heat pump would switch on when the temperature in the house
reaches a low threshold (e.g., 20.5◦ C) and off again when reaching a high
threshold (e.g., 22◦ C) when using a typical “bang bang” control scheme. For
a DR scheme, the heat pump could be blocked from switching on even when
the temperature falls below the lower threshold. As long as this state is not
maintained for an extended period of time, the effect on the consumers is
small. The same applies to industrial thermal loads, e.g., industrial ovens or
cooling devices. If orchestrated well, such a scheme can reduce consumption
peaks and therefore reduce the need for grid upgrades. DR schemes can
also be applied for reducing energy costs by avoiding consumption when the
electricity price is high.
For Distribution System Operators (DSOs), a key question is whether
or not DR schemes are able to alleviate problems in the grid and thereby
avoid costlier methods. In order to evaluate the effectiveness of demand
response in a specific grid area, the behavior of the grid needs to be sim-
ulated, using measurement data from the grid. However, loads of interest
are often not measured individually, but contained in an aggregate mea-
surement at a household level. Therefore, one must identify which parts
of the measured load belong to the controllable devices and which belong
to the uncontrollable devices, which is defined as the disaggregation of the
main load. Simultaneously, one can obtain a model describing the behav-
ior of the controllable devices in their uncontrolled behavior. With these
two components, the grid behavior can be simulated under various control
schemes.
Disaggregation is only possible when there is adequate data available.
With Smart Meters being rolled out in many countries, the amount of data
available to grid operators is increasing rapidly. However, in many cases the
available data is only available in 15-minute or hourly periods [6], [7]. There
has been a large amount of research in the field of disaggregation, often called
Non-Intrusive Load Monitoring (NILM), however most such research uses
data in significantly higher resolutions and often relies on device signatures
in the range of milliseconds [8]. Therefore, these methods are not suited for
3
highly coarse data in the range of minutes. The low resolution of the data
presents a particular challenge: Heat pumps are typically on for durations
of 20 to 50 minutes1 and therefore can be difficult to detect based solely on
the signal shape.
The goal of this thesis is to develop methods to disaggregate the con-
sumption of heat pumps and boilers from smart meter measurements and
find an appropriate model that describes the behavior of the individual heat
pumps and water heaters.
This report is structured as follows: First, the heat pump model and pa-
rameter estimation will be introduced. Second, two disaggregation methods
for heat pumps will be detailed, using data in one minute and 15 minute res-
olution, followed by a disaggregation method and dynamic model for boilers
and a combined disaggregation of heat pumps and boilers. Finally, a method
for synthesizing realistic heat pump and boiler time series will be described
and a conclusion and outlook will be provided.
1
Based on the data in this thesis; durations between 7 and 180 minutes have been
observed
4 CHAPTER 1. INTRODUCTION
Chapter 2
5
6CHAPTER 2. HEAT PUMP MODELING AND PARAMETER ESTIMATION
7 PHP
5
Power [kW]
0
0 200 0 200 0 200
Time [Minutes] Time [Minutes] Time [Minutes]
dQbody
= hA(Tamb (t) − Tbody (t)) = hA∆T (t), (2.1)
dt
where Qbody is the thermal energy stored in the body, h is the heat
transfer coefficient, A is the heat transfer surface area, Tbody (t) and Tamb (t)
are the body and ambient temperatures, respectively, and ∆T (t) is the dif-
ference between these temperatures. Furthermore, the relationship between
change in heat and temperature in the body is given by the specific heat c
and the mass m, as
where ∆Qbody is the heat transferred to the body, m is the mass of the
body and ∆Tbody is the change in temperature in the body.
2.1. HEAT PUMP MODEL 7
1 3
4
Figure 2.2: Working principle of a heat pump, adapted from [10], simplified
Combining equations (2.1) and (2.2), one can describe the rate of change
of temperature as a function of the difference of ambient and body temper-
atures as
mc∆Tbody
= hA(Tbody (t) − Tamb (t)) = hA∆T (t), (2.3)
dt
or equivalently
d∆Tbody hA hA
= (Tbody (t) − Tamb (t)) = ∆T (t) = â∆T (t), (2.4)
dt mc mc
where â = hA
mc is a decay parameter describing the cooling effect that
occurs when the outside air is colder than the inside air. This is the main
component of the temperature decay.
where the cycle begins again. The input power is given by the compressor,
and the heat transferred to the heat sink is taken from the heat source. Since
the electric energy added to the system is not directly the source of the heat
added to the heat sink, a measure for efficiency must consider the energy
extracted from the heat source and not only the electrical energy consumed
by the heat pump. Therefore, one defines the Coefficient Of Performance
(COP) as
QHP
COP = , (2.5)
PHP
with QHP being the heat the heat pump adds to the house and PHP being
the electric power consumed by the heat pump.
The location of the heat source differs by heat pump type: Two examples
of heat pumps are Ground Source Heat Pumps (GSHP) and Air Source Heat
Pumps (ASHP). The heat source for GSHPs is the ground, i.e., the piping
system is located under ground, such that it can extract heat from the
ground. ASHPs extract heat from the ambient air. The amount of energy
that can be extracted depends on the temperature difference between the
heat source and sink, thus leading to temperature dependent COPs. For
GSHPs, the COP does not vary much since the temperature of the ground
does not change significantly. ASHPs, however, have significantly varying
COPs for changing ambient temperatures.
The heat added to the house is therefore given by
∆Tbody hACOP
= 2 2 PHP = b̂PHP . (2.8)
dt c m
In addition to the ambient temperature, solar irradiance influences the
house temperature, in an effect called “solar gains”. Analogously, the heating
of the body due to solar gains can be calculated in the same manner (ignoring
the COP) as
∆Tbody Tbody hA
= = 2 2 Psolar = ĉPsolar , (2.9)
dt dt c m
2.1. HEAT PUMP MODEL 9
Tbody
= â∆T (t) + b̂PHP + ĉPsolar (2.10)
dt
with an initial condition Tbody [10].
The work conducted in this thesis is performed on data in regular 1-
or 15-minute intervals (mean power), making a discrete description of the
system desirable. For the derivation of a discrete time state space model of
this shape, the reader is referred to resources on control theory such as [11].
In discrete time, the system is given as
xt+1 = at x0 + Σt−1
m=0 a
t−1−m
(bum + cPsolar,m + (1 − a)Tamb,m ), (2.13)
high low
Tth > Tth . (2.14)
Power [kW]
2
PHP
0
Temperature [◦C]
20
Tamb
10 x
0
06:00 09:00 12:00 15:00 18:00 21:00
Time
thus heating whenever the temperature drops below the lower threshold
and staying on until the upper threshold is reached. Analogously, the heat
pump switches off when the temperature x reaches the upper threshold and
low is reached.
stays off until the lower threshold Tth
An example of heat pump behavior according to the model is shown
in Figure 2.3. The heat pump, visualized above, switches on and off more
frequently when the ambient temperature is cold and less frequently during
the day when it is warmer.
For sake of clarity, some simplifications and terminology are explained and
introduced in the following.
According to the data used for the thesis, some heat pumps do not
instantaneously switch from standby power to their rated power, but have a
period of switching on and off that can last up to four minutes. In order to
avoid ambiguities while integrating ramp up and ramp down periods into a
model that assumes instantaneous switches, the heat pump can be defined
as being off (u = 0) when its power is less than 80% of the rated power and
on when above 80% (u = 1). As the only exception, brief downward spikes
while the heat pump is otherwise on (cf. Figure 2.1) are also counted as the
heat pump being on.
A continuous time period when a heat pump is switched on is called an
on-segment and denoted as SOn . Off-segments SOff are defined analo-
gously. The actual HHPS temperature is defined as x̂t , for which there is no
direct measurement.
2.2. ESTIMATION OF HEAT PUMP PARAMETERS 11
2.2.1.2 Assumptions
The basic assumption is that the heat pump switches according to the tem-
perature based hysteresis control as defined in Equation (2.15), based on a
local measurement of the HHPS temperature. The switching thresholds Tth low
high
and Tth are assumed to be known and constant. For practical purposes
low = 19◦ C and T high = 21◦ C. The
plausible thresholds were chosen, e.g., Tth th
choice of the switching thresholds as well a justification for fixed thresholds
will be discussed in Section 2.3.
2.2.1.3 Definitions
The entire time series of the active heat pump power can be divided into on-
and off-segments. Let i denote the ith off-segment and k the kth on-segment.
Furthermore, let xtfin ,i denote the HHPS temperature at the end of the ith
off-segment, i.e., when the heat pump switches on again, as calculated by
the model (2.11). Analogously, xtfin ,k is the HHPS model temperature at
the end of the kth on segment. As explained earlier, the real HHPS tem-
perature in the HHPS at the switching times is assumed to be the threshold
temperature, i.e., x̂tfin ,i = Tthlow and x̂ low
tfin ,k = Tth . The model temperatures
xtfin ,i and xtfin ,k may differ from the threshold temperatures Tth low and T high
th
due to incorrect assumptions, process noise or measurement noise. These
differences are defined as error terms ∆xiError and ∆xkError with
high
∆xkError = xtfin ,k − Tth (2.16)
and
12CHAPTER 2. HEAT PUMP MODELING AND PARAMETER ESTIMATION
Power [kW]
PHP,meas
0
x
∆xError
22
Temperature [◦C]
low
Tth
20
low
Tth
18
Figure 2.4: Heat pump and temperature model behavior with error
The objective function is given by the sum of the square of all error terms
as
high
xtfin,k =atfin,k −tstart,k Tth +
t −1 (2.22)
fin,k
+ Σm=t fin,i −tstart,k
atfin,k −1−m (Tamb,m (1 − a) + cPsolar,m )
for on-segments. tstart,i and tstart,k denote the beginning of the respective
off- and on-segment and the starting temperature x0 is Tth low and T high ,
th
respectively. The multiplication of b and c with different powers of a makes
the objective nonlinear.
In order to formalize the constraints, h1 and h2 are defined such that
h1 (Ψ) = 0 and h2 (Ψ) = 0 are equivalent to Equations (2.21) and (2.22):
×105
1.25
Objective Value [(◦C)2]
1.00
0.75
0.50
0.25
high low
Switching Thresholds The HHPS switching thresholds Tth and Tth
are unknown, as stated previously. Including these parameters in the op-
timization vector is not possible, because the optimization either does not
converge or converges to implausible values. Although a formal proof is out
of the scope of the thesis, an informal explanation can be given as follows:
Let the model parameters used in Figure 2.4 be the optimal parameters for
high
the optimization function using threshold temperatures Tth = 21◦ C and
low 19◦ C. If instead the thresholds were chosen to be T high
Tth th = 19.1◦ C and
low ◦
Tth 19 C, the optimal parameters would be adjusted such that the tem-
perature would increase and decay more slowly. The absolute value of the
error terms ∆xError would then be in a smaller range than in the original
problem. Therefore, the squares of the errors ∆x2Error would also be signif-
icantly smaller than in the original problem and consequently the parame-
high
ters Tth low 19◦ C would be considered closer to the optimal
= 19.1◦ C and Tth
value than the original parameters. Such a result is physically implausible
and therefore assumptions must be made for the temperature thresholds.
Switching thresholds near the standard room temperature of 20◦ C were
used with the difference between thresholds being between 1◦ C and 2◦ C [12].
The specific choice of the thresholds showed little influence on the resulting
heat pump behavior for thresholds in this range. Therefore, variations in
the threshold temperatures were not considered in detail.
25000
×104
3.0 20000
2.5
Value [(◦C)2]
Objective
2.0
15000
.
.
1.5
1.0
0.5 10000
0.75
0.98 . ]
0.50
.
0.99 0.25 [ C
◦
5000
a 1.00 b
This section provides a brief explanation of the motivation for each step,
a comparative description of the different methods as well as a brief summary
of the elements contained within each disaggregation method.
17
18 CHAPTER 3. HEAT PUMP DISAGGREGATION
1000
Number of Occurrences
Number of Occurrences
600
800
600 400
400
200
200
0 0
0 3 6 9 0 3 6 9
Power [kW] Power [kW]
these data points is larger than a certain threshold (e.g., 1 kW) and the
direction of the jump is given by the sign of the difference.
In some cases, DSOs know the rated power of the heat pumps that are
installed. When the rated power is not known, it can usually be detected
due to the high occurrence of heat pump switching relative to other large
devices. A typical example is shown in Figure 3.1, which shows the sizes of
all detected jumps in the time series (absolute value). In order to obtain an
estimate for the rated power, a probability density function is fitted to the
relative frequency of jump sizes using Kernel Density Estimation (KDE).
Kernel density estimation is one possible way of obtaining density functions
from discrete data sets2 . Details on such methods can be found in literature
on pattern recognition, such as [13]. A density function is used for estimating
2
Gaussian mixture models are also often used for the same purpose and can also be
used here. The choice of method has little impact on the overall result.
22 CHAPTER 3. HEAT PUMP DISAGGREGATION
2.00e-03
Probability Density 1.50e-03
Probability Density
1.50e-03
1.00e-03
1.00e-03
5.00e-04 5.00e-04
0.00e+00 0.00e+00
3 6 9 0 3 6 9
Power [kW] Power [kW]
and
PHP,Soff = arg max p̂Off,jump , (3.2)
x
where p̂On,jump and p̂Off,jump are the probability density functions ex-
tracted from the KDE and PHP,Son and PHP,Soff are the respective switch-
ing powers for turning on and off, respectively. For some heat pumps the
power consumption does not stay constant while it is switched on but rather
increases slightly over time, leading to PHP,Soff being slightly larger than
PHP,Son in some cases. For the data used in this thesis, the most frequent
large jump always was caused by the heat pump.
The goal of the initial guess is to obtain time periods Son and Soff where
the heat pump is very likely to be on or off. Therefore, on-segments for the
initial guess are selected as time periods that
• begin with a jump that is close to the expected upward jump size (i.e.,
the jump is within ±10% of PHP,Son ),
• ends with a jump that is close to the expected downward jump size
and
3.2. METHOD A: HIGH RESOLUTION DATA 23
• do not contain any jumps between the start and the end.
The initial guess for the off-segments is obtained by selecting time periods
between two on-segments that do not contain any jumps. The algorithm is
shown in mathematical terms in Algorithm 2.
The obtained on- and off-segments are conservative in the sense that
they are very likely to be caused by the heat pump. Due to the fact there
are many time periods where large consumers are not switched on or off
(e.g., when residents are sleeping, out of the house or at home and not using
high electric appliances), a sufficient number of on- and off-segments can be
obtained3 .
Figure 3.3 shows an example of an initial guess, as well as the detected
jumps during one evening. It shows the behavior of the total power mea-
surement PMain,meas as well as the measurement of the heat pump PHP,meas .
As a first step, all on-segments (green) are detected by selecting the areas
that
• do not contain any other significant jumps, i.e., only changes to the
main measurement that are significantly smaller than PS,off and PS,on .
The off-segments (red) are added next, selected as areas between adjacent
on-segments, where the heat pump definitely does not switch on. The areas
3
Assuming there are multiple days where heating is necessary within the data set.
24 CHAPTER 3. HEAT PUMP DISAGGREGATION
12
PHP,meas
10 PMain,meas
8 HP On-Segments
Power [kW]
HP Off-Segments
6 ∆PJump
0
00 00 00
20: 22: 00:
Time
Figure 3.3: Example of initial guess and detected spikes (house AEK32)
left white are unidentified time periods, where the behavior of the heat pump
is obscured by other electric activity. In the first unknown time period the
heat pump jumps were detected (black dots), however the time period is
marked as unknown due to the jump occurring between the start and end
of the on-segment. In the second unknown time period, the beginning of
the heat pump on-segment coincides precisely with another large appliance
switching on, making it impossible to detect the on-segment purely by shape.
Using the resulting on- and off-segments, one can then calculate the
parameters a∗ , b∗ and c∗ for the heat pump model as described in Section 2.2.
This provides the basis for the disaggregation of the heat pump consumption
profile.
3.2. METHOD A: HIGH RESOLUTION DATA 25
Power [kW]
2 2
1 1
0 0
0 5 10 15 20 0 5 10 15 20
Time [minutes] Time [minutes]
The basic idea that from the end of every on-segment in the known seg-
26 CHAPTER 3. HEAT PUMP DISAGGREGATION
ments (the initial guess in the first iteration), the most likely next switching
cycle is calculated using the HHPS model and probability components which
will be introduced in the following sections (lines 2-4). A heat pump cycle
is the process of switching on and off again, with the beginning of a cycle
being when the heat pump switches off. After iterating through all known
on-segments and merging the new switching points (lines 3,5), the HHPS
parameters and probability components are updated (line 6). This process
is repeated until the disaggregation is complete. Finally, the resulting time
series are calculated (line 7).
Son,known describes the on-segments that have been detected so far and
the pOn,jump and pOn,Temp describe the probability density functions that are
obtained based on Son,known (analogous for off-segments).
Algorithm 4 shows the estimation of the most likely next heat pump
cycle. The core idea is to perform a forward simulation of the HHPS tem-
perature model beginning a known time the heat pump switches off. Then
the next possible points are identified where the heat pump could switch on
again. From each of those points, the subsequent next points are identified
where the heat pump could switch off. Each switching process is attributed
a probability measure taking into account the model temperature at the
time of the switch, the size of the jump and constraints (i.e., the probability
is zero when constraints are violated). It is to be noted that the probability
measures are not strictly probability density functions, but their values are
indicative of the likelihood of a heat pump switching (cf. next section for
more details). For easier legibility, this type of probability indication will be
referred to as probability, probability density or probability estimate, even
though it is not strictly accurate in a mathematical sense. With this method,
all possible combinations of the next switching cycle, i.e., switching on and
off again, are identified. The switching points with the largest probability
are then returned as the most likely next heat pump switching cycle.
In Algorithm 4, xti denotes the HHPS temperature at the time of the
ith jump and Pjump,i denotes the size of the ith jump. xtj is the HHPS
temperature assuming that the temperature at the previous jump was the
switching threshold, i.e., xti = Tthlow . p
best denotes the best probability for all
cycles evaluated during the algorithm and pOn,jump denotes the probability
density function describing the likelihood of an upward jump in the main
measurement caused by the heat pump (analogous for pOff,jump ). pOn,Temp
is the probability density of the heat pump switching on when at a certain
HHPS temperature (analogous for pOff,Temp ). pConstraint is a binary variable
that is 0 when feasibility constraints are violated and 1 otherwise. The
probability densities will be discussed in the following sections in more detail.
In the first for loop (line 4), pHP,on,i is the probability estimate for the
heat pump switching on at time ti after switching off at time t1 . If the jump
Pjump,i has a similar size as PHP,Son , the HHPS model temperature at time
ti is close to the lower temperature threshold Tth low and no constraints are
3.2. METHOD A: HIGH RESOLUTION DATA 27
10 Return tup,best and tdown,best as the best choice for switching points of
the next best heat pump cycle beginning at time t1 .
violated, the respective probability densities will be large and therefore the
resulting probability of a heat pump switch pHP,on,i is large. Note that the
jump size and the switching temperature are assumed to be independent.
The second for loop (line 5) traverses all possible times for switching off
given it previously switched off at t1 and on at ti . pHP,on,off,i,j is therefore
probability estimate for the heat pump switching at times t1 , ti and tj .
The choice of time periods which are considered for potential future
jumps defined by t∗ and t∗∗ will be discussed after introducing the probability
components and constraints.
After introducing the probability components and constraints, an exam-
ple visualizing this process will be given.
10
PMain,meas
8 PHP,meas
HP On-Segments True
Power [kW]
6 HP Off-Segments True
0
House Temperature, Model
23 HP On-Segments, Disagg.
Temperature [◦C]
22 HP Off-Segments, Disagg.
high
Tth
20
low
Tth
18
00 00 00
22: 00: 02:
60 1.0 60 1.0
Number of Occurrences
Number of Occurrences
50 0.8 50 0.8
Probability Density
Probability Density
40 40
0.6 0.6
30 30
0.4 0.4
20 20
10 0.2 10 0.2
0 0.0 0 0.0
16 17 18 19 20 21 18 19 20 21 22 23 24
Temperature [C] Temperature [C]
Figure 3.6, one can see that the largest probability densities occur very near
the assumed switching thresholds Tth low and T high . Furthermore, the standard
th
deviations are around 0.5◦ C for this house (and similar for other houses in
the data set). This shows that the underlying model is appropriate for the
data and the disturbance at the time of a switch can be approximated by
gaussian noise. A further observation is that the total number of occurrences
for switching off is significantly smaller than for switching on. This is caused
by the fact that on-segments can be detected independently, whereas off-
segments need to be detected between two on-segments. Therefore there are
far fewer off-segments than on-segments.
2.50e-03 2.50e-03
p̂Jump,down,orig p̂Jump,up,orig
2.00e-03 pJump,down,mod 2.00e-03 pJump,up,mod
Probability Density
Probability Density
1.50e-03 1.50e-03
1.00e-03 1.00e-03
5.00e-04 5.00e-04
0.00e+00 0.00e+00
0 3 6 9 0 3 6 9
Power [kW] Power [kW]
Figure 3.7: Original and modified probability estimations for the jump sizes
in house AEK32
to estimate the how likely a large jump is caused by the heat pump.
The primary goal for such a probability estimate based on the jump size
is to select a preference between different jumps under consideration. There-
fore, one can use the KDE for jumps that are close in size to the heat pump
and use a synthetic estimate for probability for larger and smaller jumps. As-
suming that small non-heat pump consumption occurs frequently and large
non-heat pump consumption is relatively rare, small superpositions of heat
pump jumps and other consumption are more likely than superpositions of
heat pump jumps with other large devices. Therefore, the probability of a
jump belonging to the heat pump decreases with distance from the rated
heat pump power. One possible choice of representing this is with the linear
modifications as shown in in Figure 3.7 in blue. As a result, jumps that are
very similar to known heat pump jumps are strongly preferred over jumps
with other sizes. When there are no similar heat pump jumps, the jumps
closer to the rated power are preferred. The choice of such a probability
function can be further evaluated in future research with larger amounts of
data available. Using a Gaussian estimate for all jump sizes is not beneficial.
For example, for a Gaussian model the probability estimate of a jump that
is twice as large as the rated power would be multiple orders of magnitude
larger than the likelihood of the rated power. As a result, the disaggregation
would only select jumps that are very similar to the rated power and ignore
all jumps where significant superposition with other large devices occurred.
32 CHAPTER 3. HEAT PUMP DISAGGREGATION
3.2.3.3 Constraints
The constraint variable pConstraint is zero when constraints are violated and
one otherwise. Its function is to eliminate all infeasible switching candidates
from consideration.
The following constraining factors are considered:
• Physical feasibility: The power consumption between switching on and
switching off must be larger than the rated power of the heat pump
PHP,r 4
max t∗
s. t. t∗ ≤ tnext,on (3.5)
Off,fin,min
xt∗ > T − ∆T.
This means one considers all points forward until the heat pump is known
to turn on or it is has become too cold for the heat pump to realistically
remain inactive. One can therefore expect that the heat pump will switch
on during this time period.
6 6
PHP,dis,orig PHP,dis,smooth
PMain,dis,orig PMain,dis,smooth
4 4
Power [kW]
Power [kW]
2 2
0 0
Figure 3.8: Time series of disaggregated main and heat pump time series
series of the remaining load PNC . One can create the heat pump time series
as a rectangular signal either at zero power or its rated power. However,
this data also allows for more detailed reconstruction.
For each detected jump, both the beginning and the end point of the
jump were detected. The heat pump signal can therefore be reconstructed
by linearly interpolating between the beginning of the “switch-on-jump”
tOn,start , the end of the“switch-on-jump”tOn,end , the beginning of the“switch-
off-jump” tOff,end and the end of the “switch-off-jump” tOff,end . For all end
of the ramp up and the beginning of the ramp down, one can choose the
most likely size of upward or downward jump from the probability density
function P1 = pOn,jump and P2 = pOff,jump , respectively. In mathematical
terms, the heat pump signal is then given as
P1
(tOn,end −tOn,start +1) (t − tOn,start ), tOn,start ≤ t < tOn,end
P2 −P 1
PHP,disagg (t) = (tOff,start −tOff,end +1) (t − tOn,end ) + P1 , tOn,end ≤ t < tOff,start
−P2
(tOff,end −tOff,start +1) (t − tOff,start ) + P1 ,
tOff,start ≤ t < tOff,end
(3.6)
The next logical step is to subtract the resulting heat pump time series
from the main time series, i.e., PHP,disagg − PMain,meas , however the result
typically has unrealistic spikes around the times of switches, which is caused
by incorrectly estimated ramping behavior, as is illustrated in Subfigure
3.8a.
In order to obtain a reasonable result, it is necessary to clean the data
around the switching times. For the process of switching on, one way of
doing this is by linearly interpolating all points between the last point prior
34 CHAPTER 3. HEAT PUMP DISAGGREGATION
to the switch and the first point where the heat pump is no longer in its
switching process. This must be done such that the resulting heat pump
power is within its range of power (i.e., between zero and its maximum
power). The result of this smoothing process can be seen in Subfigure 3.8b,
which shows behavior that is plausible even during the switching process.
pleted, merging the newly detected on-segments into the set of known on-
and off-segments. The result is shown in Figure 3.10. The unknown period
after approximately 1:15am was reduced by one heat pump cycle. The on-
segment at 1:45 was detected accurately in spite of the large upward jump.
Even though the upward jump results in a lower probability, the tempera-
ture probability is relatively large because the HHPS at 1:45 is close to the
switching threshold. This entire process continues until there are no heat
pump segments added (not visualized).
10
PMain,meas
8 PHP,meas
HP On-Segments True
Power [kW]
6 HP Off-Segments True
0
House Temperature, Model
23 HP On-Segments, Disagg.
Temperature [◦C]
22 HP Off-Segments, Disagg.
high
Tth
20
low
Tth
18
00 00 00 00 00 00
22: 23: 00: 01: 02: 03:
10
PMain,meas
8 PHP,meas
HP On-Segments True
Power [kW]
6 HP Off-Segments True
0
House Temperature, Model
23 HP On-Segments, Disagg.
Temperature [◦C]
22 HP Off-Segments, Disagg.
high
Tth
20
low
Tth
18
00 00 00 00 00 00
22: 23: 00: 01: 02: 03:
4
15
PMain,meas
PHP,meas
3
Power [kW]
0
0 50 100 150 200 250
Time [Minutes]
occurs over the course of two on-segments, the resulting power can result
in a “staircase” shape, a flat plateau or be hidden entirely due to activity
from other spikes (cf. Figure 3.11). In particular, heat pumps with short on-
segments and low rated power (i.e., in the range of 2 kW) are the hardest
to identify. Conversely, heat pumps that are switched on for longer time
segments can be detected more easily in time periods with low activity:
If PMain,meas (tprior ) is the power before the heat pump switches on, there
should be a measurement point during the on-segment where the main is
around PMain,meas (tprior ) + PHP,r , as shown in Figure 3.11 between 150 and
200 minutes.
3.3.1 Notation
In this subsection, algorithms will be introduced that nonetheless estimate
the switching behavior in a one-minute resolution, increases notational com-
plexity. The following conventions are introduced for easier legibility:
3. t15 + 1 refers to the following block, i.e., if t15 := [17 : 30, 17 : 45], then
t15 + 1 = [17 : 45, 18 : 00].
This will become useful for algorithms that work with 15-minute input
data, but mix 15-minute values and one minute values within individual
steps of the algorithms.
x∗ (t) is undefined for all t > t̂ − T . The process is repeated after incre-
menting t̂ until x∗ (t) is completed. The cost function of the estimator can
be designed in many ways, e.g., minimizing the sum of square differences
between measurements and the model. The choice of cost function depends
highly on the application.
By taking into account a time period [t̂ − T : t̂] rather than just sub-
sequent measurement points, multiple measurements can be integrated in
3.3. MOVING HORIZON METHOD 39
Indicator
h
s
l
6
PMain,meas
5 PHP,meas
HP On-Segments, Init.
HP Off-Segments, Init.
4
Power [kW]
0
00 00 00 00 00 00 00
17: 18: 19: 20: 21: 22: 23:
Time
Figure 3.12: Initial guess for short heat pump with indicator
every estimation step, increasing accuracy. By limiting the size of the time
period, computational effort is reduced and online measurements become
possible.
• l−s−h−l
• l − h − l or
• l − h − s − l.
A last condition is that the difference between the values PMain,meas (tl )
and PMain,meas (th ) needs to surpass a certain threshold, e.g., 750 W.
A time period meeting these criteria is will be referred to as a heat pump
candidate. It is to be noted that segments where PMain,meas increases over
more than 2 consecutive steps are not included.
For an accurate disaggregation, it is useful to identify heat pump patterns
more precisely than in 15-minute steps. Figure 3.12 shows an example of
a “short” heat pump in 15-minute data, with the heat pump measurements
shown in minutely resolution and the main measurement shown in 15-minute
resolution, i.e., the input data for the disaggregation. The indicator above
shows whether the respective segment is a local minimum, a local maximum
or an interim step in between, while being below a threshold of PHP,r +∆P ≈
3000 kW and having the appropriate shape.
After having identified the plausible candidates, one needs to identify
where the heat pump cycle occurred precisely. The calculations of these
switching times are based on the idea the power of the non-controllable load
is known or can be estimated and remains constant while the heat pump
switches on. Consequently, all variations in the PMain,meas level are caused
by the heat pump. While this assumption clearly can be wrong at times,
it results in only very small errors in most cases. Most devices are small
relative to the heat pump and most of the time, people do not switch large
electric appliances on or off (in particular at night or when being absent).
Note that large electric devices such as stoves and ovens generally are not
included in heat pump candidates, because the measurement PMain,meas (t)
typically increases significantly above PHP,r + ∆P .
3.3. MOVING HORIZON METHOD 41
For any heat pump candidate, two local minima exist in the measurement
by design. One assumes that there is no heat pump activity during the
smaller of the two local minima in order to obtain a reference for the non-
controllable load. Next, two different types of candidates are differentiated:
For the case l-h-l, assume that PMain,meas (tl1 ) < PMain,meas (tl2 ), with t15
li
indicating the 15-minute block. Furthermore, one assumes static consump-
tion behavior in the house, i.e., that the non-controllable consumption is
constant at PMain,meas (tl1 ) during the duration of the candidate time and
therefore all consumption beyond that is caused by the heat pump. With
that assumption and knowing the heat pump’s rated power PHP,r 6 , one can
calculate how long the heat pump was switched on during the other 15-
minute blocks as
For the sake of legibility in the remainder of this section, the conditions
on Ton described by Equation (3.10) are summarized by the comment “is
contrained by”.
The time ton,start when the heat pump switches on can be calculated as
(
th,start − Ton (tl2 ), if tl2 < tl1
ton,start = (3.12)
th,end − Ton (h) otherwise
(
th,end + Ton (tl2 ), if tl2 < tl1
ton,end = (3.13)
th,start + Ton (h) otherwise
An example of the result is shown in Figure 3.12, during the first on-
segment. In that example, the heat pump in fact switches on and off in the
same 15-minute block, contradicting an earlier assumption. However, the
assumption that there is little or no changing non-controllable consumption
during this time holds true. As a result, Ton (tl2 = [16.30 : 16 : 45]) ≈ 0,
meaning that the ton,start = 16 : 45 = th,start . The estimated duration
Ton (th ) of the on-component of the h-block is accurately calculated, with
the estimated heat pump therefore switching on and off slightly earlier than
in the measurements.
The second type of on-segment candidate is a stair-shaped candidate
as shown in the second detected on-segment (around t =17:30) in Figure
3.12. The calculations of the switching times is very similar and based on
the assumption that the heat pump is fully switched off during both of the
l-segments. The calculations are very similar, with the s-block taking the
place of the l2 -block, i.e., the larger of the two l-segments, and the mean
power of the two l-segments used as a reference value for the non-controllable
load.
P −P
In mathematical terms, using PRef = l1 2 l2 this leads to
Longer on-segments are detected with the algorithm shown in the following
section.
For a complete initial guess, one must additionally find off-segments. As
with the initial guess in Section 3.2.1, off-segments are found as segments
between adjacent on-segments, assuming that it is not possible for the heat
pump to have switched on in the mean time. Maintaining the mindset
of only taking into account conservative segments that are true with high
likelihood, one counts off-segments only in areas where the power level is
small relative to the heat pump and the change in power is also small, which
is shaded in red in Figure 3.12. The time period between 20:30 and 21:30
is not characterized as an off-segment because consumption is too large at
21:00.
C(U,U)
start Unknown
C(U,L)
C(L,H)
C(L,R) C(H,F)
C(H,L)1,2
C(R,H)
Rising High
C(H,H)
Figure 3.13: Simplified finite state machine for detection of long segments
for initial guess
3.3. MOVING HORIZON METHOD 45
• wlower : Lower threshold for heat pump jump, i.e., if PMain,meas (t) >
PBL (t) + wlower PHP,r , the heat pump might be on at time t. This
threshold is slightly smaller than one.
• tstart,off : The starting time (in one-minute resolution) of the most re-
cent off-segment candidate
• tstart,on : The starting time (in one-minute resolution) of the most re-
cent on-segment
• Phigh : The estimated power level when the heat pump is switched on
during an ongoing on-segment candidate, i.e., Phigh ≈ PNC (t15 )+PHP,r
t15 15
start,on = t , (3.19)
and the ending time of the previous on-segment is cleared, i.e.,
which later serves as a signal that the “Unknown” state has been entered
since the last on-segment.
Lastly, the baseline power is updated as
and
PBL,init = PBL (3.22)
where t15 − 1 refers to 15-minute block before t15 , as described in Section
3.3.1, and PBL,init will serve as a reference for calculating the precise time
where the heat pump switches on.
The minimum of these two measurements in Equation (3.21) is chosen
rather than PMain,meas (t15 ) in case the new “Low” state is actually a “Rising”
state. In many cases, the assumption holds that there is little other change
in consumption by other devices of a relevant size (compared to the heat
pump). Furthermore, small changes in the base load often fluctuate around
a lower level, i.e., the minor power increases often are followed by decreases
(e.g., switching on a toaster for a couple of minutes). Using the more con-
servative minimum can have the effect that a subsequent “High” state would
not be recognized; in such a case one would continue to the “Unknown”
state and the on-segment would be discarded. This does not impact the
disaggregation any further, whereas mistaking a “High” or “Rising” state for
a “Low” state can lead to an on-segment being classified as an off-segment.
Therefore the minimum is the more conservative choice, which is better for
the initial guess. As stated in previous sections, it is more important for the
initial guess to be accurate (most positive estimations are accurate) rather
than complete (many detected segments, however with a larger error rate).
Transition and Action in “Low” State Next, the heat pump can go
from a “Low” to a “High” state, i.e., where the heat pump is likely to be
on. The condition is that the power level increases by roughly PHP,r , i.e.,
mathematically speaking C(L,H) implies that
and
PMain,meas (t15 ) < PBL + wupper PHP,r (3.25)
must all hold.
In the action step A(L,H) the high power level is updated as Phigh =
PMain,meas (t15 ) and the beginning time as t15 15
start,on = t − 1. It is possible for
the on-segment to actually begin during the 15-minute block of the “High”
state, however the resulting error would be small: Given that the difference
between the two power levels is close to the rated power PHP,r , the heat
pump would either turn on towards the end of the previous 15-minute block
(t15 − 1) or at the beginning of the “High”-block (t15 ).
A transition from “Low” to “Rising” is also possible when PMain,meas (t15 )
increases, yet not enough for the heat pump to be on entirely, and the
subsequent 15-minute block seems to contain the heat pump entirely. In
mathematical terms C(L,R) is given as
Transition and Action in “High” State From the “High” state, i.e.,
where the heat pump is believed to be on, it can remain on during the entire
next 15-minute block t15 + 1, i.e., a transition C(H,H). The condition for
this transition is that the power level PMain,meas (t15 ) remains similar to the
previous step PMain,meas (t15 − 1), i.e.
Next, the FSM state can move from the “High” state directly to the
“Low” state if there is a sufficiently large downward jump, i.e., if the heat
pump is on until near the end of the prior 15-minute segment and then
switches off, causing a drop between PMain,meas (t15 − 1) and PMain,meas (t15 )
of approximately the rated heat pump power PHP,r . In mathematical terms,
C(H,L)1 therefore is
In this case, one has likely identified a heat pump on-segment and one
can add the on-segment to the set Son,init . The start and end times are
calculated analogously to Subsection 3.3.3.1, assuming that the increase of
power beyond the baseline is caused by the heat pump. The start time
tstart,on is calculated as
(a) Further reduction of the power level to a level near PBL at time t15 + 1,
i.e., the heat pump is likely turned off during block t15 and then is
switched off entirely during block t15 + 1. This means that the FSM
enters the “Falling” state.
(b) Return to power level near Phigh in the following 15-minute block (t15 +
1): The heat pump likely either switched off and on again during the
15-minute block or reduced power for a few minutes. This sequence of
power levels is “high” (PMain,meas (t15 − 1)), “medium” (PMain,meas (t15 )),
“high” (PMain,meas (t15 + 1)), i.e., the FSM returns to the state “Rising”.
The calculation of the start time is the same as Equation (3.36) for all
of these cases.
The condition for case (a) is C(H,L)1 and is given as
set of known on-segments Son only if the difference is larger than a certain
threshold ton,min (e.g., 5 minutes):
tend,on − tstart,on > ton,min (3.45)
If the condition from Equation (3.45) holds, an on-segment is concluded
and one can add (tstart,on , tend,on ) to the set of known on-segments Son . Fur-
thermore, the brief off-segment (tend,on , tstart,on,next ) is added to Soff . Lastly,
the start time of the on-segment is updated as tstart,on = tstart,on,next .
For case (c), two 15-minute blocks with “medium” power levels are fol-
lowed by a block where PMain,meas ≈ Phigh . This indicates that the heat
pump switches off during the block t15 and on again during block t15 + 1.
In mathematical terms, the condition C(H,L)2 is given as Equation (3.37)
(PMain,meas (t15 ) is somewhat reduced) and
• When there is partial overlap, all times that are part of any on-segment
are chosen as part of the final on-segment
3. A node n may have child nodes (i.e., n is the parent node of its child
nodes)
The core of this algorithm is the MHE. The overall algorithm is described
in Algorithm 6, the process within an estimation window is described in
Algorithm 7 and the calculations of the probabilities is detailed in Algorithm
8. For best understanding, Algorithm 7 will be explained in more detail first.
Let Nstart = {nstart,1 } with ni .p = 1 and nstart,1 .t = t0 be the set contain-
ing one starting node. This starting node is assumed to be a true switching
point and the goal is to calculate the possible switching points of the next
chorizon switching points of the heat pump and find the most likely path.
Algorithm 6: Method B
Result: PNC , PHP,disagg , a∗ , b∗ , c∗
1 Get total initial guess Son,init , Soff,init (cf. Section 3.3.3);
2 Get HHPS parameters a∗ , b∗ , c∗ from initial guess (cf. Section 2.2
and Equation (2.26));
3 Obtain temperature probability density function pOn,Temp , pOff,Temp
(cf. Section 3.2.3.1);
4 Let nstart be node for the first switching point in Son,init ;
5 while Disaggregation is not complete do
6 Get path (nstart , n1 , n2 , . . . , nm , n∗ ) from Algorithm 7 with
input N = {nstart };
7 Add segments (nstart .t, n1 ) to SOn,known or SOff,known ;
8 Let nstart = n1 ;
(
PHP,r , if t contained in on-segment
9 Set PHP,disagg (t) = ;
0, else
10 Set PNC (t) = PMain,meas (t) − PHP,disagg (t) ∀t;
Figure 3.14 visualizes this process: It shows each node with the time
stamp t and probability factor p, as well as its unique node identification
number (above the nodes; note that the first number corresponds to the layer
number and the second number is counted continuously from the top). The
transition probability of moving from one node to the next is indicated along
the edges. There is one initial node (node 1), which has two children nodes
(nodes 21 and 22), each having two and further children. The interpretation
is as follows: It is known that the heat pump switches on (or off) at t = 0,
represented by node 1. The next possible heat pump switching times are at
t = 11 and t = 12. These switches have a probability factor of n2 .p = 41 and
n10 .p = 41 , which indicate the probability of the heat pump switching at the
respective time after having switched on at t = 0. If the heat pump switches
at time t = 11 (i.e., node 21), it then has three possible switches after that
at t = 19, t = 23 or t = 24 (i.e., nodes 31,32 and 33).
3.3. MOVING HORIZON METHOD 55
41
t = 30
31 3 1
p = 128
16
t = 19
1 3 42
p = 24 8
t = 31
1
p = 64
1
6
43
21
t = 31
32 1
1 p = 32
t = 11 1 2
4
p = 14 t = 23
1 1 44
p = 16 4
t = 32
1
p = 64
2
9
1
4
33
1 t = 24 ...
1
p = 18
t=0 45
p=1
t = 31
34 1 1
2
p = 16
t = 23
1 46
p = 18
1
4
2
t = 32
1
1
p = 32
4
22
47
t = 12
p = 12 t = 32
1
p = 48
1
1
6
4 48
35
1
t = 24 3 t = 33
1
1
p = 12 p = 24
...
21 31 41
1 3
t = 11 6 t = 19 16 t = 30 ...
p = 14 1
p = 24 1
p = 128
1
45
4
1
t = 31 ...
t=0 34
1
1
p = 16
2
p=1
t = 23
46
p = 18 1
1
4
2
22 1
4
t = 32 ...
1
t = 12 p = 32
p = 12
1
6 35 48
1
t = 24 3 t = 33 ...
1 1
p = 12 p = 24
21 31 41
1 3
t = 11 6 t = 19 16 t = 30 ...
p = 12 p = 13 p = 18
1
45
4
t = 31 ...
t=0 34
1 p=1
2
p=1
t = 23
46
p=1 1
1
4
2
22 1
4
t = 32 ...
t = 12 p = 12
p=1
1
6 35 48
1
t = 24 3 t = 33 ...
p = 23 p = 23
is identical for both nodes n32 and n34 because they both share the time
stamp t = 23, no path following node n32 can have the highest final proba-
bility factor and therefore are inferior solutions. Therefore, nodes that cause
inferior solutions are called inferior. All inferior nodes are shown in gray in
the figure and the dominant nodes are shown in cyan. Note that node n35
dominates n33 and node n45 dominates n42 . When one removes the inferior
nodes after calculating all possible next nodes (i.e., after the for-loop in line
4 of Algorithm 7), the example from Figure 3.14 can be reduced as shown
in Figure 3.15.
In practice, the trees are significantly larger than those shown in the
example figures, due to the fact that there are only a limited number of
constraints for when the heat pump can switch. Furthermore, the horizon
should be chosen to be at least as 4 or larger to maximize the benefit of
the MHE. Therefore, the probability factors of the leaves in the final layer
can be small enough to create numerical issues. Therefore it is useful to
normalize the probability factors in each level. In order to find the best
path, only nodes in the final layer are compared to each other. Therefore,
one can scale each node in a layer with a constant, without changing the
result.
Formally, this means to set the probability factor as
As can be seen in that example, the relations between the probability factors
of nodes in one layer remains the same.
One application of Algorithm 7 completes one estimation window.
Next, the overall disaggregation as shown in Algorithm 6 will be dis-
cussed, which makes use of the previously described Algorithm 7. As a first
step, the initial guess, as described in Section 3.3.3 is obtained in order to
be able to estimate HHPS parameters as described in Section 2.2. The tem-
perature probability function is also obtained the same way as in Method A
(cf. 3.2.3.1).
To find the next switching point from tstart = nstart .t, the optimal path
is calculated with Algorithm 7. The resulting path contains one known
switching point (nstart ). Only the next switching point, i.e., n1 , is then
considered a known switching point. This calculation then repeats with n1
as the beginning point. For the example in Figure 3.14, node 1 is nstart
and node 22 is then n1 on the optimal path (with node 45 being n∗ ). The
segment (t = 0, t = 12) is then added to Son,known or Soff,known .
This then serves as the basis for updated HHPS parameters and tem-
perature probability density functions. Finally, the MHE is performed for
the entire time series and the resulting on- and off-segments Son,known and
Soff,known are used to create PHP,disagg , with
(
PHP,r , if t contained in on-segment
PHP,disagg (t) = (3.52)
0, else
The resulting disaggregated main time series PMain,disagg (t) is given as
PMain,disagg = PMain,meas (t) − PHP,disagg (t) ∀t. (3.53)
3.3. MOVING HORIZON METHOD 59
41
t = 30 ...
31 1
3 p = 128
16
t = 19
1 42
p = 24 8
3
t = 31 ...
1
p = 64
1
6
43
21
t = 31 ...
32 1
1 p = 32
t = 11 1 2
4
p = 14 t = 23
1 44
p = 16 4
1
t = 32 ...
1
p = 64
2
9
1
4
33
1
t = 24 ...
1
p = 18
t=0
p=1 45
t = 31 ...
34 1
1
2
p = 16
t = 23
1
2
46
p = 81 4
1
1
4 t = 32 ...
22 1
p = 32
t = 12
47
p = 12
1
6 t = 32 ...
35 1
1
4
p = 48
t = 24
1 48
p = 12 3
1
t = 33 ...
1
p = 24
Figure 3.17: Simplified example of tree showing inferior nodes in gray and
dominating nodes in cyan
60 CHAPTER 3. HEAT PUMP DISAGGREGATION
3.3.4.2 Constraints
To eliminate implausible switching points from consideration, the following
constraints are added to the model and used in Algorithm 8:
• Physical feasibility: The disaggregation cannot be chosen such that
the non-controllable power is negative
• Activity: Heat pump switching processes can only occur when there
is sufficient change in PMain,meas in the appropriate direction
• Certain initial guess: Switches that conflict with the initial guess
are discarded
Duration The duration a heat pump is switched on or off can vary signif-
icantly, however they do not become arbitrarily small. Therefore, one can
place a constraint for the duration. In most cases, the number of segments
from the initial guess is large enough to assume that they are representative
of typical behavior. Therefore, the shortest heat pump segments are also
representative of the minimum duration. In order to choose a lower dura-
tion threshold that still leaves some margin for uncertainty, they are chosen
slightly shorter than the shortest duration in the respective segments, i.e.
and
where ton,min,th and toff,min,th are the new thresholds and t∆ is a buffer
variable ensuring the estimate is not too conservative (e.g., if the shortest
on-segment in the initial guess lasts 15 minutes, it is reasonable to set a
looser constraint on on-segments such as 13 minutes).
3.3. MOVING HORIZON METHOD 61
max{PMain,meas (t15 15
switch + 1) − PMain,meas (tswitch ),
(3.56)
PMain,meas (t15 15
switch ) − PMain,meas (tswitch − 1)} > Pth,act,on
when switching on or
max{PMain,meas (t15 15
switch − 1) − PMain,meas (tswitch ),
(3.57)
PMain,meas (t15 15
switch ) − PMain,meas (tswitch + 1)} > Pth,act,off
when switching off. Whenever the heat pump activity has the largest
component in the measurement, this condition holds, however there can also
be time periods when accurate estimation of heat pump switching is pre-
vented, e.g., if a large consumer such as a boiler switches when the heat pump
switches off. Then the main PMain,meas increases at the time of the switch
if the boiler power is larger than the heat pump power. Given that boiler
disaggregation can be performed relatively successfully in many cases, this
problem occurs only infrequently. The probability of other devices switching
on at the same time and overcompensating for the heat pump switching off
is low, e.g., when switching on the oven.
The activity constraint can be counterproductive in some cases: When
the heat pump switches in short intervals, the measurement PMain,meas (t)
does not necessarily increase (cf. Figure 3.12). Therefore, the activity con-
straint is best omitted when on- and off-segments are often short. For the
simulations in this data set, the activity constraint was omitted when the
median duration of both on- and off-segments from the initial guess was less
than 20 minutes and included otherwise.
For any point where a constraint is violated, its probability factor is set
to zero and it is therefore discarded.
Certainty of the initial guess The certainty of the initial guess can
be molded into this algorithm by removing all switching paths that conflict
with the initial guess, e.g., an on-segment that begins before the start of an
initial guess-on-segment, but ends after it.
To sum up, the Methods B1 and B2 are differentiated based on the
constraints chosen: For method B2, all constraints are active, whereas for
method B1 the activity constraint is inactive. Method B2 shows better
results than B1 in most cases. When the heat pump duration is short, e.g.
less than 15 minutes on average, the activity constraint on Method B2 is
counterproductive. Short heat pump on-segments do not necessarily have
a sufficient impact on the total signal and can therefore be removed from
62 CHAPTER 3. HEAT PUMP DISAGGREGATION
1.2
Probability Estimation
1.0
0.8
0.6
0.4
0.2
0.0
0 1 2
PBL,switch
pBL = PBL,prior
both the strong preference for values near one with a small slope for larger
values.
3.4 Evaluation
This subsection aims to provide understanding of how well this method
performs.
8
A map between the number of the switch and the time at which the switch occurs
64 CHAPTER 3. HEAT PUMP DISAGGREGATION
5 PHP,meas
0
Power [kW]
5 PHP,disagg
0
0 20 40 60 80
Time [Minutes]
5 PHP,meas
0
Power [kW]
5 PHP,disagg
0
0 20 40 60 80
Time [Minutes]
the measurement and the disaggregation, the percentage by how much the
on-segments overlap are can be calculated. This results in two separate
measures, because both the duration of the disaggregation and the duration
of the measurement can be chosen as a basis:
Precision by disaggregation pbd uses the disaggregation as a refer-
ence, i.e., let the ith on-segment from the disaggregation correspond to the
time period [ti,start,d , ti,end,d ] and contain di,dis = ti,end,d − ti,start,d + 1 data
points. Let dˆi be the number of data within the time period [ti,start,d , ti,end,d ]
where the heat pump is on according to the measurement and may contain
data points from multiple measured on-segments. Precision measured by
disaggregation is then defined as
dˆi
pbd,i = , (3.58)
di,dis
which is given in percent and can range from zero to 100% by definition.
For the case in Figure 3.21, pbd,i = 100%, because for every point in the
disaggregated on-segment the actual heat pump is on as well.
Precision by measurement is analogous, with the disaggregated and
measured values switching roles: The ith on-segment is defined by the
time period [ti,start,m , ti,end,m ] and contains di,meas = ti,end,m − ti,start,m + 1
data points. Then d˜i is the number of data points within the time period
[ti,start,m , ti,end,m ] where the heat pump is on according to the disaggrega-
tion and may contain data points from multiple disaggregated on-segments.
Precision by disaggregation is then defined as
d˜i
pbm,i = . (3.59)
di,meas
66 CHAPTER 3. HEAT PUMP DISAGGREGATION
Power [kW]
5 PHP,meas
0
Power [kW]
5 PHP,disagg
0
0 5 10 15 20 25 30
Time [Minutes]
For the example in Figure 3.21, pbm,i = 50%, because the disaggregation
is only on during half of the actual on-segment. These measures are large
(i.e., close to 1) when there is large overlap and zero when there is no overlap.
dd,(i,j)
pdur,(i,j) = . (3.60)
dm,(i,j)
The score is similar to a comparison of the amount of energy consumed
according to the measurement and the disaggregation, respectively. Time
periods investigated were 30 minutes, 1 hour and 2 hours. Some heat pumps
display behavior with non-constant power consumption when switched on
(cf. Section 2.1.1), which is not detected by this algorithm and is very
difficult or even impossible to identify from 15-minute data. In order to
remove impact from these effects from the evaluation, a relation of time
rather than energy was chosen.
120 100
Number of Occurrences
Number of Occurrences
100
80
80
60
60
40
40
20 20
0 0
0.00 0.25 0.50 0.75 1.00 0.00 0.25 0.50 0.75 1.00
pbm pbd
this section.
This house has a heat pump with approximately 2.5 kW rated power that is
typically on between 33 and 65 minutes (25th and 75th percentiles). Figure
3.22b shows the precision estimates based on disaggregation. pbd is typically
close to one, indicating that the detected heat pump segments were very
accurate. However, a significant number of actual on-segments were not
detected, as shown in Figure 3.22a. This is caused largely by the choice of
modification of the density function describing the height pJump (cf. Figure
3.7). When the linear components are small relative to the maximum, the
disaggregation strongly prefers jumps in the “correct” size. When the linear
components are in a similar order of magnitude, more heat pump segments
are detected, however the number of segments incorrectly attributed to the
heat pump increases as well.
As shown in Figure 3.23a, the heat pump can be on both for short and for
long time periods, with on-segments lasting as short as 15 minutes and as
long as three hours. The overall distribution of the segment durations is sim-
ilar, indicating that the disaggregation shares similar stochastic properties.
The duration of the off-segments, shown in Figure 3.23b also show similar
profiles, however the disaggregation tends to overestimate the duration of
the off-segments because some on-segments are not detected.
68 CHAPTER 3. HEAT PUMP DISAGGREGATION
Measurement Measurement
Number of Occurrences 50
Number of Occurrences
80 Disaggregation Disaggregation
40
60
30
40
20
20 10
0 0
0 30 60 90 120 150 180 0 30 60 90 120 150 180
Duration [Minutes] Duration [Minutes]
Figure 3.23: Histograms of segment durations for house AEK4 (Method B2)
100
100
Number of Occurrences
Number of Occurrences
80
80
60
60
40 40
20 20
0 0
0.0 0.25 0.5 0.75 1.0 0.0 0.25 0.5 0.75 1.0
Precision score pbd Precision score pbm
300
Number of Occurrences
250
200
150
100
50
0
0 1 2 3 4
p1h,rel
3.4.3.1 Method A
In case of high-resolution data (1-minute), Method A is used, which can
detect typical heat pump jumps well. Therefore, the precision by disaggre-
gation pbd,80 shows particularly high scores, as can be seen in Figure 3.26a.
Furthermore, pbd,80 is typically only slightly smaller than pbd,>0 , indicating
that when there is overlap, the overlap usually covers more than 80% of
the segment. Additionally, three houses with larger heat pumps (houses 7,
20 and 23) showed better performance than the smaller heat pumps. This
observation and the data for the figures in this section are shown in Table
3.2 at the end of this section.
Furthermore, the duration of the heat pumps in the on-segments tends
to be smaller in the disaggregation than the actual heat pump, as shown
in Figure 3.279 . This is likely caused by the method of detecting the initial
guess for Method A: Only time periods are considered where there are no
other jumps occurring between the potential heat pump jumps. The longer
an on-segment is, the higher the likelihood is of a jump occurring that is
caused by a different electric device. Therefore, the initial guess tends to
detect shorter heat pump segments rather than longer ones. Given that the
HHPS model is very simple, it is plausible that an initial guess primarily with
short on-segments reduces the likelihood estimations of longer on-segments.
The data to this Figure is shown in Table 3.3 at the end of this section.
3.4.3.2 Method B
The performance of Method B2 is evaluated in more detail in the following
and compared in some aspects to Method B1 and Method A.
In spite of using data in significantly lower resolution than Method A, the
overall performance is similar in many measures, as can be seen from Figure
9
Interpretation of the first boxplot: This boxplot shows the distribution of the 25th
percentile of on-durations of all houses based on Method A
3.4. EVALUATION 71
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
pbm,80 pbd,80 pbm,>0 pbd>0 pbm,80 pbd,80 pbm,>0 pbd>0
100 Method A
Method B2
Duration [Minutes]
80 Measurement
60
40
20
0
25 50 75
Percentile
the switching temperatures. One can synthesize a heat pump time series
with similar statistical properties as the original heat pump by performing
a forward simulation of the HHPS model with one modification: Rather
high low , the thresholds
than using the constant switching thresholds Tth and Tth
are sampled. At every switching time, a random sample is drawn from the
distribution of the switching temperature pon,Temp or poff,Temp and used as
the switching threshold for that segment (cf. Figure 3.6 in Section 3.2.3.1).
Additionally, one can sample the distributions restricted to certain times
of day, e.g. from the distribution of switching temperatures on weekdays or
time of year to obtain more realistic noise patterns. However, in the data
that was used, the distributions appeared to be relatively homogeneously
distributed over different time periods. Investigating patterns in these dis-
tributions could provide more insights when using larger data sets.
Electric water boilers are used to provide hot water supply and are common
in many European countries. In Switzerland in particular, there are an
estimated 1 million electric water boilers installed with a total yearly energy
consumption of approximately 2.2 TWh, therefore providing large potential
for DR.[16]
In analogy to Chapters 2 and 3, this Chapter aims to explain typical
behavior and control of boilers, a suitable disaggregation algorithm and a
boiler model that describes its electric behavior. Furthermore, the quality
of the disaggregation are evaluated.
79
80 CHAPTER 4. BOILER MODELING AND DISAGGREGATION
10
PMain,meas
8 PBoiler,meas
Compensation Period
Power [kW]
6 Independent Period
0
00:00 08:00 16:00 00:00 08:00 16:00 00:00
Time
mately 30 to 150 minutes1 . In many cases, after an initial long period at full
power, a second segment follows, implying that there may be effects such as
charging limits or non-homogeneous temperature in the tank.
During extended periods of being uncontrolled, e.g., on weekends, boilers
switch on in irregular intervals for short periods of time, ranging from 3 to
30 minutes. At night, the boilers tend to switch on less often than during the
day, implying that the switching frequency and duration depend on the hot
water consumption. Furthermore, hot water consumption is highly volatile,
making predictions about the timing of the next heating period of a boiler
difficult.
For the disaggregation algorithm, it is useful to define two time periods
with different characteristic behavior:
The two types of behavior are shown in Figure 4.1. Furthermore, the
on-durations of boilers in the Independent Period are usually consistent, as
shown in Figure 4.2. The periods are results of the grid operator’s blocking
signal, which is known to the grid operator. The boiler periods during the
Compensation period can also be detected easily by evaluating a histogram
1
Based on the data used for this thesis.
4.1. BOILER BEHAVIOR 81
80
Number of Occurrences
60
40
20
0
0 5 10 15 20 25
On-Duration [minutes]
of the heat pump signal over the course of all days of the week, i.e., for all
Mondays, all Tuesdays etc. Large power levels that recur at certain times
of day are likely to be caused by the boiler, e.g. when PMain,meas ≈ Pboiler,r
between 00:30am and approximately 1:30am on all days except Sunday and
Monday. The Compensation Period can be chosen as beginning at 00:30am
on those days and ending several hours later. The ending time of the Com-
pensation Period must be chosen to be later than the latest detected boiler
on-segment during the possible Compensation Periods. The Independent
Periods are then during days when there is no detectable Compensation Pe-
riod at the typical time of day for a Compensation Period. For the previous
example, Independent Periods occur on Saturday, beginning around 5am
or when the Compensation Period ends, and ending on Monday morning
around 5am. This is chosen because there is a Compensation Period in the
night from Monday to Tuesday, i.e., the boiler is blocked during the day on
Mondays, and there are no Compensation Periods in the nights from Sat-
urday to Sunday or Sunday to Monday. For more irregular ripple control
schemes a more detailed estimation algorithm would need to be developed.
Similar to a heat pump, a boiler also is intended to keep water at a cer-
tain temperature level and therefore the assumption of a switching model
based on threshold temperatures is justified. Unlike with air temperature in
residential homes, the set point temperature can not be estimated as well
as it can vary significantly. Online resources provide temperature references
that vary in a range of 45◦ C and 65◦ C, e.g., [17]. Furthermore, hot wa-
ter consumption in a house can not directly be observed from the electric
consumption of the boiler.
82 CHAPTER 4. BOILER MODELING AND DISAGGREGATION
The main idea of the Algorithm 9 is to identify all points in time when
the main measurement jumps up its previous base load level PBL,previous by
approximately Pboiler . The specific starting and ending time of the boiler
on-segment is then calculated in 1-minute resolution such that the NC load
remains constant in the 15-minute block before and during the switch. The
assumption that the NC load stays constant is plausible because the Com-
pensation Period typically takes place at night when people rarely operate
other devices with large electric consumption. The ending time of the on-
segment is calculated analogously and the resulting disaggregated time series
4.3. EVALUATION OF BOILER DISAGGREGATION 83
1.0 1.0
0.8 0.8
amount of energy extracted from the boiler since it last switched off
• Energy extracted from the water tank between two on-segments of the
boiler is consumed with constant power
The first assumption is justified by physics and the assumption that the
boiler is set to keep water at a fixed set point temperature. The second
assumption is plausible given the distribution of on-durations (cf. Figure
4.2). In most cases, the heat pump is on for the same duration, i.e., a similar
amount of energy is added to the boiler every time. The deviations of the on-
durations can be modelled as a disturbance to the SOC measurement. The
third assumption is false whenever there is hot water consumption, however
it is a practical simplification that makes it possible to calculate a hot water
consumption pattern.
With these assumptions, one can calculate the mean power extracted
from the heat pump during the Independent Periods:
Let toff,i be the end of the ith on-segment of the boiler (i.e., switching
off), ton,i+1 be the beginning of the subsequent (i + 1)th on-segment and
toff,i+1 be the end of the i + 1th on-segment. The power consumption of the
boiler can then be calculated as
(
Pboiler,r if ton,i+1 ≤ t ≤ toff,i+1
Pboiler (t) = (4.1)
0 if toff,i ≤ t ≤ ton,i
and the electric energy consumed in the i + 1th on-segment
With the assumptions as stated above, this value is equal to the energy
extracted from the boiler, i.e.
Eboiler,i+1
Pboiler,i+1 = . (4.4)
(toff,i+1 − toff,i )
Matching all such time periods to the respective time of day, a daily
consumption pattern can be extracted as shown in Figure 4.4. It displays
the mean power consumed Pboiler,i of all off-on-cycles at the respective time
4.4. DYNAMIC BOILER MODEL 87
1.50 Pext,mean
1.25
Power [kW]
1.00
0.75
0.50
0.25
0.00
0:00 3:00 6:00 9:00 12:00 15:00 18:00 21:00
Time of Day
of day. The black line shown is the mean of all consumption occurring at
that time of day.
A boiler model is designed as
where tlast is the end of the last on-segment and Pextr is the power ex-
tracted from the boiler. To simulate a realistic time series, Pextr is obtained
by sampling the consumption profiles from one entire day (cf. Figure 4.4).
The reason for taking daily profiles is that hot water consumption at differ-
ent times of day is not independent of each other. For example, a person
may take a shower at 6pm on one day and at 8pm on another day, but will
likely not shower at 6pm and 8pm on the same day.
The switching behavior and thereby also the synthesized boiler time
series is then given by Algorithm 10. The algorithm acts as a load profile
generator which produces similar behavior to the original heat pump based
on the disaggregation from the Independent Period.
In line 3, the variation in the on-durations is sampled in order to obtain
the same stochastic behavior as the original heat pump. Line 4 is the equality
between the extracted energy and the added energy and line 5 calculates the
time when the recently extracted energy is equal to the energy added in the
88 CHAPTER 4. BOILER MODELING AND DISAGGREGATION
next on-segment. Finally, the switching points are calculated assuming that
the duration of the off-on-cycle is t∗ − toff,i and the boiler is on for tj .
The resulting time series is very similar to the original time series. By
design the energy consumption over the course of any day is identical to
the energy consumption of the day that was selected from the consumption
pattern3 . However, by sampling the on-durations from the next on-segments,
the specific switching points differ.
In order to apply different control schemes to the boiler, Algorithm 10
can be modified and phrased as a dynamic model as
3
Strictly speaking, there may be small quantization errors due to energy “debt” incurred
from a previous day
4.4. DYNAMIC BOILER MODEL 89
for a threshold Eth and a blocking variable ublock . The threshold Eth can
be chosen as Pboiler,r tboiler,on,ind with tboiler,on,ind being the average duration
the boiler is on during the Independent Period. Furthermore, the initial
state of the boiler energy is defined as Estate (0) = 0 as an arbitrary initial
point. The boiler can be controlled externally with the variable ublock , a
binary variable which allows or blocks the boiler from switching on.
The resulting boiler behavior is given by
(
0 if u(t) = 0
Pboiler (t) = (4.9)
Pboiler,r else.
Combined Disaggregation of
Boiler and Heat Pump
Boilers and heat pumps are two of the most common large electric consumers
in many households, with battery electric storage systems and electric car
chargers becoming more frequent as well.
Disaggregating the smart meter measurements becomes more difficult
when multiple large consumers are present, because they can have similar
characteristics in the time series and cause superpositions. Alleviating this,
however, are the following aspects:
• Most boilers are on for shorter time periods than heat pumps when
they are on in their uncontrolled mode
91
92CHAPTER 5. COMBINED DISAGGREGATION OF BOILER AND HEAT PUMP
In this thesis, novel methods for disaggregating and modeling heat pumps
and boilers were developed using coarse smart meter measurements. For
this purpose, a physical, dynamic heat pump model and a parameter esti-
mation technique were designed. These methods constitute a novel approach
in the realm of non-intrusive load monitoring due to their ability to cope
with very coarse measurement data (average active power in one minute
or fifteen minute intervals). Unlike existing disaggregation methods, which
often focus on transient signals in the range of milliseconds, this method
combines information from the shapes of signals with model based Bayesian
and moving horizon estimation approaches. This is well suited for extracting
useful information in spite of the data resolution being multiple orders of
magnitude lower than for typical approaches in non-intrusive load monitor-
ing. Finally, a method for synthesizing realistic heat pump and boiler time
series was developed by detecting characteristic noise patterns specific to
the respective appliances. This enables realistic forward simulations which
can then be used to evaluate DR control strategies in distribution grids.
In spite of its benefits, there are limitations to consider: Due to the small
amount of measurement data from the disaggregated devices, it is uncertain
whether other heat pumps might behave differently. Two of the heat pumps
in the data set showed surges in power consumption or occasionally a second
rated power level. However, the number of data points was too small to iden-
tify a model for that behavior. In order to compensate for the small amount
of available data, the methods were developed to be very general rather than
tailored to individual characteristics from individual heat pumps.
There is great potential for future research expanding on this work by
including other large consumers such as electric vehicle chargers or bat-
tery storage systems. Additionally, this method may aid in evaluating the
benefit of DR for large grid areas. As more data becomes available, more
components can be included into the model, such as differentiating between
weekends and weekdays, or periods with low or high non-controllable electric
95
96 CHAPTER 6. CONCLUSION AND OUTLOOK
97
98 LIST OF FIGURES
99
100 BIBLIOGRAPHY
[14] Henrik Sandberg. CDS 270-2: Lecture 4-2 Moving Horizon Estimation.
California Institute of Technology, 2006.