Sie sind auf Seite 1von 5

2011 Eighth International Conference on Fuzzy Systems and Knowledge Discovery (FSKD)

User Behavior Prediction for Energy Management in Smart Homes

Kaibin Bao Florian Allerding Hartmut Schmeck


Institute AIFB Institute AIFB Institute AIFB
Karlsruhe Institute of Technology Karlsruhe Institute of Technology Karlsruhe Institute of Technology
76128 Karlsruhe, Germany 76128 Karlsruhe, Germany 76128 Karlsruhe, Germany
Email: kaibin.bao@student.kit.edu Email: allerding@kit.edu Email: schmeck@kit.edu

Abstract—In this paper, we focus on the prediction of user


interactions within a real world scenario of energy management EMP Energy Provider
for a smart home. External signals, reflecting the low voltage
grid’s state, are used to address the challenge of balancing
energy demand and generation. An autonomous system to
aim at this challenge is proposed, in particular to coordinate
decentralized power plants with the electrical load of the smart
home. For that two prediction algorithms to estimate the future Energy
behavior of the smart home are presented: The Day Type Management
Model and a probabilistic approach based on a first order Semi CHP
Markov Model. Some experimental results with real world data
of the KIT smart home are presented.

I. I NTRODUCTION
The growing share of fluctuating renewable energy re- PV-System
sources will cause a higher demand for flexible power
suppliers and consumers. Within the research project MeRe-
gioMobil1 an energy management system has been devel- Figure 1. Smart home architecture
oped to adapt the electrical energy demand automatically
to the availability of electrical energy reflecting the state
of the low voltage grid. External signals, a load limitation knowledge about the estimated load or generally about the
signal for example, as previously discussed in [1], are sent to estimated actions occurred by the appliances. Depending on
the smart homes. Fig. 1 shows the architecture of the smart the appliance2 the occurred actions are caused by user inter-
home. To validate these energy management concepts, a real actions. In case of the washing machine, for example, it has
smart home has been built up at the KIT-Campus. This smart to be filled up with laundry and switched on. So a prediction
home, containing a 60 square meter apartment with two bed of the user behavior for the next optimization horizon is
rooms and a combined kitchen and living room, is fitted with necessary. A similar approach of energy management for
decentralized power plants like a combined heat and power smart home is done by [2], where the requirement of user
plant (CHP), a photovoltaic system (PV), and intelligent ap- behavior prediction for a long term optimization is pointed
pliances. All devices, as shown in Fig. 1, can be observed or out with an optimization horizon for about 24 hours. Another
controlled via the central in-house energy management. For group around Cook and Youngblood at al. [3] targets on
that, a communication infrastructure including every relevant complex behavior models for user behavior prediction in
component and the energy management has been realized. smart homes. Their focus is more on the home automation
Appropriate interfaces have been implemented for external issue than on the energy management.
communication to the energy provider to communicate the In Sect. II, the representation of user behavior will be
external signals and for the user interaction over the Energy discussed first before two types of behavior models are
Management Panel (EMP) to set user specific properties. introduced: a knowledge driven approach called Day Type
An autonomic optimization with the integration of the Model, and a probabilistic approach based on a first order
the smart home’s installed decentralized power plants, is Semi Markov Model. Some experimental results with real
proposed in [1]. Reflecting the load limitation scenario com- world data of the KIT smart home are presented in Sect. III.
bined with an optimal integration of the decentralized power The paper concludes with a summary and discussion of
plants, it is necessary that the load optimization system has future work in Sect. IV.
1 http://meregiomobil.forschung.kit.edu/english/index.php 2 In [1] a classification of the appliances has been proposed.

978-1-61284-181-6/11/$26.00 ©2011 IEEE 1335


II. U SER B EHAVIOR R EPRESENTATION Distance Metric
These day sequences are compared with each other to
The formal representation of the usage of a household
form clusters of similar days, called day types. For this
appliance is one of the key aspects on the road to a user
approach, we choose an editing distance metric as described
behavior model which can be used for prediction.
by Mannila and Moen in [5] to compare days with each
Household appliances are regarded abstractly by the ser-
other. They define three possible editing operations: move,
vices they offer to the user. At any time, each service can be
insert and delete. Each operation has specific costs which
described by a binary state: in use or unused; alternatively:
are modeled in such a way that the distance gives an intuitive
on or off. Let us call the set of all available services S.
notion of the number of “prediction errors”. An insert or
And the state they are in at the time t ∈ N is represented
delete operation has the cost of 1 point. The cost of the
by a function st : S × N → {1, 0}. As an example, a
move operation depends on the amount of time an action
washing machine provides the service “colored laundry at
has to be adjusted to match the other sequence. The amount
60◦ Celsius”, whereby only one service of each appliance
of adjustment is limited to at most 12 hours in the future
can be used simultaneously.
or the past. If one has to move an action more than 12
The temporal sequence of service states can be regarded hours, the two matching actions are considered as not equal
as a time series, which is one way to describe the usage and thus, the cost of a move is equivalent to the cost of a
behavior. The user is usually responsible for the initiation insert plus a delete operation:
of a changed appliance state. As an example, the user sets the
washing machine running. So, the usage of home appliances
 
|t1 − t2 |
cost(move) = min 2, 2 · .
can be represented as sequence of actions (see Fig. 2). 12h

a1 a2 a3 a4 The distance between two sequences is equivalent to the


st(t0 ) st(t1 ) st(t2 ) st(t3 ) st(t4 ) summed up costs of the cheapest operation sequence to
transform one day sequence to the other. [5]
Figure 2. User actions ai changes the state of services st(tj )
weekday ∈ {Sat, Sun}?

true false
Each action a = (Ty , ta ) is represented by an action type
and a time. The action type Ty ∈ AT = S ×{1, 0} describes
DT2 season = winter?
a service and a state, and ta is the time the state change
true false
happens. We call the space of all possible actions A = AT ×
N. Finally, we depict an action sequence of n actions as sq =
weekday = Mon? season = summer?
ha1 , a2 , . . . , an i, which is ordered by the action’s occurrence
true false true false
time, i.e. ∀1 ≤ i ≤ n − 1 : tai ≤ tai−1 .
Representing the device usage as action sequence has the DT3 DT1 DT5 DT4
following advantages: The device usage can be regarded as
an infinite stream of actions and formally, for each user
action there always exists a successor action. Additionally, Figure 3. Decision tree to associate context to day types (DTi )
this type of representation already compresses all relevant
information about the device states with less parameters, After the clustering of the day types, the association
when compared with the time series of device states. rules between contexts and the day types are discovered
by Decision Tree Induction [6]. A context is described by
A. Day Type Model all external parameters the characteristics of a day may
depend on: season of year, day of week and temperature,
The Day Type Model (DTM) assumes a certain regularity for example. In the present approach, only the season and
of the appliance usage. Hence some days show a comparable the day of week are considered as context. The decision tree
appliance usage. Similar days can be grouped into one implementation of the WEKA framework [7] was adapted
specific day type. For model training, the complete recorded for these purposes.
action sequence is split into day sequences. According to By applying a digressive weighting approach to the day
the H0 standard load profile of VDEW [4], the electrical sequences, this model takes alternation of usage behavior
power usage is at minimum between 2 and 6 o’clock in into consideration. An exponential weighting function w =
the morning. So we assume that at this time there is a exp(−λ · d) has been chosen because of the mathematical
minimum of active user interactions because the inhabitants advantages: The most recent day sequence is weighted w =
are sleeping. Thus, the action sequence is split at 4 AM. 1 and 0 < w < 1 holds for all other days in the past.

1336
Partitioning of Appliances a priori probability of the action type has been implemented:
Applying the DTM to the smart home holistically may

C(Tj )
if
P
, k C(Ti , Tk ) = 0

have some shortcomings because of the inherent indepen-

P
eij ∝ k C(Tk ) . (2)
dences of appliances. For example, a “washday” is only C(Ti , Tj )
, otherwise

related to the washing machine and the tumble dryer,
 P
k C(Ti , Tk )

whereas the cooking appliances are used independently.
The distribution of time periods between two action types
In our approach, experiments showed that the partitioning
is estimated by counting the frequency of time differences
scheme depicted in Fig. 4 led to better prediction results
between two actions. The time differences can be quantized
compared to a holistic model.
into a finite amount of time slots. This way, over-fitting the
training data is countervailed and computation is accelerated.
washing machine cooktop coffee machine central light
A mixture of Gaussians is used to fit the frequency distri-
tumble dryer sleep. ro. 1 light
group 3 group 6 bution with the Estimation Maximization Algorithm [10] as
group 1 baking oven hair dryer television depictured in Fig. 5.
toaster group 4 group 7 group 9
water boiler dish washer bath ro. light sleep. ro. 2 light γ(∆t)/h(∆t)
γ estimation with two gaussians
group 2 group 5 group 8 group 10
3 γ estimation with one gaussian
8
Figure 4. Partitioning scheme
2
8

1
8
B. Semi Markov Model
∆t
Generating a user model with markov models is quite 1 2 3 4 5 6
popular [8], [9]. But almost all models lack the ability
to consider time information appropriately. Semi markov Figure 5. Gaussian mixture fitting over a frequency distribution h(∆t)
models (SMM) assumes an arbitrary probability distribu-
tion function (PDF) between two user interactions, whereas Block Prediction
markov models forces the PDF to be exponential. In the
present approach, the most simple semi markov model has The Block Prediction searches for the most probable
been used — a first-order SMM without consideration of action sequence which will occur during the prediction win-
context information. So, a user action only depends on the dow. The search can be done inductively with an adaption
previous action and a PDF between two action types can of the Viterbi decoding algorithm [11] which is described in
be estimated. The probability of a “transition” between two the following paragraphs:
user actions (Ti , ti ) and (Tj , tj ) is thus described by: Initialization: As the underlying markov model is first
order, the first action during the prediction window only
(1) depends on the last action (Tl , tl ). r1 (Tj , tj ) represents the

P (Tj , tj ) | (Ti , ti ) = eij · γij (tj − ti ) .
probability that the first action is of type Tj and happens
eij time independent transition probability between at the time tj . It can be calculated using the transition
two action types. probability P (Tj , tj ) | (Ti , ti ) :

γij (d) probability distribution of time periods.
r1 (Tj , tj ) = elj · γlj (tj − tl ) .
To avoid mixing some terms and definitions regarding
markov models, it should be pointed out that the “states” λ1 represents the probability that the first action happens
in markov models are not related to the service states. With after the prediction window:
the representation of user behavior introduced in Sect. II, ∞
the “states” in the markov model are user actions.
XX
λ1 = elj · γlj (t + ∆ + s − tl ) .
j s=1
Model Training
Induction: rn (Tj , tj ) represents the probability of the
Training of the SMM can be done incrementally by most probable sequence with n actions which ends with
maintaining a count matrix C to record the transitions. action (Tj , tj ). It can be calculated using rn−1 , the prob-
The transition probability between two action types can be abilities of the most probable sequences with n − 1 actions:
estimated using the count matrix. To account for the cases n o
where rn (Tj , tj ) = max rn−1 (Ti , ti ) · eij · γij (tj − ti ) . (3)
P the previous action Ti is never seen in the training data (Ti , ti )
( k C(Ti , Tk ) = 0), a back-off [10] to the estimation of the with ti ≤ tj

1337
washing machine cooktop coffee machine central light
λ0n represents the probability that the n-th action exceeds
the prediction window: tumble dryer DTM DTM sleep. ro. 1 light

n ∞ o SMM baking oven hair dryer television


XX
λ0n = max rn−1 (Ti , ti ) · eij · γij (t + ∆ + s − ti ) . toaster DTM DTM SMM
(Ti ,ti )
j s=1 water boiler dish washer bath ro. light sleep. ro. 2 light
(4)
The probability of the most probable action sequence hap- SMM DTM DTM DTM
pening during the prediction window is limn→∞ λn with:
Figure 6. Partitioning scheme of the hybrid model
n
[
λn = max {λ0k } .
k=1
the usage of devices during the residential period. There are
Abort Criterion: The calculation can be aborted if: some devices which are used quite regularly like the toaster
∃n0 : rn0 (Ti , ti ) ≤ λ0n0 ∀(Ti , ti ) . or the boiler, other devices like the dish washer or the lights
P P∞ of the sleeping rooms are used very irregularly. Especially
As j s=1 eij · γij (t + ∆ + s − ti ) ≤ 1 applies in Eqn.4 the irregularly used devices are hard to predict.
and eij · γij (∆t) ≤ 1 in Eqn.3, ∀n ≥ n0 it holds:
λ0n ≤ max {rn−1 (Ti , ti )} Wa
Dr
Ma
(Ti ,ti ) yer
Ha
irD
≤ max {rn−2 (Ti , ti )} Lg
Ba
.
(Ti ,ti ) th
Lg
Ce
nt
.. Bo
iler
. Co
ffe
e
To
ast
≤ max {rn0 (Ti , ti )} Co r
okt
e
(Ti ,ti ) op
Ov
en
≤ λ0n0 . Dis
hW
TV a

Thus, limn→∞ λn = and λ0n0 represents the probability


λ0n0 Lg
Sle
ep1
Lg
of the most probable action sequence during the prediction Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu
Sle
e p2

window. Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri

Backtracking: Given the previously defined calculation


Figure 7. Usage plot of home appliances recorded from real residents
method, it is easily possible to determine the most probable
sequence: During the induction phase, a back pointer has
to be stored that describes which rn−1 contributed to the Prediction Quality
maximum of rn in Eqn. 3 and λ0n in Eqn. 4 respectively.
Beginning with λ0n0 , the sequence can be restored by fol- In the real world scenario, the energy management system
lowing the path of the most probable predecessor. has to schedule electrical work items continuously [1]. That
means that a prediction has to be done quite frequently.
C. Hybrid Model Considering this, the evaluation is conducted by calculating
Experiments showed that devices, which are used at reg- predictions from the model at regular intervals of 30 minutes.
ular intervals, are modeled with the SMM more accurately As described in [1], scheduling is done 24 hours ahead.
whereas the prediction of the DTM is suited better for Thus, the prediction window is set to exactly 24 hours.
irregular used devices. As long as the household appliances Every prediction is compared with the real usage pattern
are partitioned, it is possible to assign the prediction model using the distance metric described in Sect. II-A. The sum
for each group individually. The Hybrid Model is based on of all distances is reciprocally proportional to the overall
this observation and combines the SMM and the DTM as prediction quality.
depicted in Fig. 6. Each partial model is trained individually To be able to compare the prediction strength of the pre-
and the whole prediction is generated by aggregation of all sented models intuitively, the prediction error is normalized
partial prediction models. with the score of the Null Predictor. The Null Predictor
always returns a sequence with zero predicted actions. A
III. E VALUATION prediction model should be at least better than the Null
The prediction strengths from both models were evaluated Predictor. However, a bad model could score worse as long
with recorded data from real inhabitants. A couple, both as it not only fails to predict the correct actions, but also
working during the day, lived in the KIT smart home for 60 predicts some wrong actions.
days. Within this period the inhabitants evoked 2946 actions Fig. 8 depicts the normalized prediction error of the
with 15 electrical devices in the smart home. Fig. 7 shows DTM and the Partitioning DTM. When the weight exceeds

1338
100%
Day Type Model
Partitioning Day Type Model
IV. C ONCLUSIONS / O UTLOOK
Null Predictor
In this paper we took on the challenge of precise user
RELATIVE PREDICTION ERROR

90%

behavior prediction in the context of a smart home en-


80%
ergy management system. We presented two user behavior
70% models and demonstrated novel prediction algorithms. The
algorithms were tested against real recorded data of a
60%
inhabited smart home.
50%
The quality of the prediction for a specific optimiza-
0 0.1 0.2 0.3 0.4 0.5 0.6
tion horizon strongly depends on the way of life of the
AGING WEIGHT λ
inhabitants. Assuming a family with small children will
Figure 8. Prediction quality of the Day Type Model have a more continuous way of life as students sharing an
apartment. Hence, families with a continuous lifestyle, living
in a one familiy house, are a more appropriate target group.
There are some extensions of the presented algorithms
a certain threshold (λ0 ≈ 0.65), only the most recent which should lead to better prediction performance. As
day is returned as prediction. The best prediction with the discussed in Sect. III, usage behavior depends on the time
holistic DTM can be achieved with the weighting factor of day. So, the transition probabilities of the SMM could be
λ = 0.24 which leads to the normalized error of 59.0%. The modified by introducing time dependent count matrices for
Partitioning DTM predicts at best with the factor λ = 0.11 example. Another point is the short memory of a first order
which results in of 59.8% normalized error. markov model. Like in [9], a mixed order markov model
The holistic SMM predicts quite poorly with the best could resolve this issue.
score of 96.5% normalized error at the resolution R =
R EFERENCES
10 min. If Partitioning is applied, the approach gets better
with 90.0% relative error at the resolution R = 1 h. These [1] F. Allerding and H. Schmeck, “Organic smart home - archi-
results demonstrate that a first order markov model is not tecture for energy management in intelligent buildings,” in
Workshop Organic Computing as part of ICAC 2011, 2011.
powerful enough to represent the real user behavior as it
cannot grasp the complex dependencies within the overall [2] E. Z. Duy Long Ha, Stephane Ploix and M. Jacomino, “Meta-
heuristics for the home load management system,” 2009.
appliance usage. The biggest weakness may lie in the fact
that the Semi Markov Model does not take the current time [3] G. M. Youngblood, “Automating inhabitant interactions in
home and workplace environments through data-driven gen-
of day into consideration. According to the results of the
eration of hierarchical partially-observable markov decision
Day Type Model, this information is very important to a processes.” Ph.D. dissertation, The University of Texas at
predictor apparently. Arlington, 2005.
Fig. 9 shows the comparison of all models. In the Hybrid [4] B. Schieferdecker, C. Funfgeld, and H. Meier, “Repräsentative
Model, specific appliance groups which show a strong inter- VDEW-Lastprofile,” VDEW-Materialien, vol. M-28/99, 1999.
appliance-dependencies are handled by the SMM (see Fig.6). [5] H. Mannila and P. Ronkainen, “Similarity of event se-
The best performance (54.1%) can be achieved with the quences,” in Proceedings of the 4th International Workshop
parameters R = 1 h for the SMM part and λ = 0.62 for the on Temporal Representation and Reasoning. IEEE Computer
Society, 1997.
DTM part.
[6] J. Quinlan, “Induction of decision trees,” Machine Learning,
vol. 1, pp. 81–106, 1986.
100% [7] E. Witten, Ian H. ; Frank, Data mining : practical machine
learning tools and techniques, ser. The Morgan Kaufmann
R ELATIVE P REDICTION E RROR

90%
series in data management systems, San Francisco, Calif.,
2005.
80%
[8] M. Hartmann and D. Schreiber, “Prediction algorithms for
70% user actions,” 2007.
60%
[9] K. Gopalratnam and D. Cook, “Online sequential prediction
via incremental parsing: The active lezi algorithm,” Intelligent
50% Systems, IEEE, 2007.
Null SMM
R = 10 m
P-SMM
R=1h
DTM
λ = 0.24
P-DTM
λ = 0.11
Hybrid
(R = 1 h, [10] T. M. Mitchell, Machine learning, ser. McGraw-Hill Series in
Computer ScienceMcGraw-Hill international editions, 1997.
λ = 0.62)

P REDICTION M ODEL

[11] A. Viterbi, “Error bounds for convolutional codes and an


Figure 9. Comparision of all prediction models asymptotically optimum decoding algorithm,” IEEE Trans-
actions on Information Theory, 1967.

1339

Das könnte Ihnen auch gefallen