2.2.1. The Shape Model Approach
Let us denote by
the observations representing the energy demand at a specified day
j where
represents the hour of the day and
the observed energy demand at time instant
t. In general, these measurements are available only on certain time segments (e.g., per hour); therefore, the accurate daily shape is not known. That means that although the true shape of the energy demand is a continuous function with respect to time parameter
t, in practice only some points of this shape are known at specified time segments
; therefore, the available data are of the form
, which can be considered as landmarks. As we are interested in working with the shapes of the daily energy demands, we need to consider the shape of the day
j as a function with respect to time, i.e.,
. Then, using the available data
from day
j we are able to estimate a smoothed version of the energy shape employing any typical interpolation method or nonparametric filters (e.g., spline smoothers, kernel-based smoothing methods, etc. [
22,
23,
24]) by choosing appropriately the mollification parameters in order not to lose important aspects of the information. In this manner, the shape function of the intra-day power demand is sufficiently recovered with the advantage that we can get estimates for the demand even in time instants that no data are available and allowing to treat data with functional statistics techniques.
The daily shape of the energy demand is not expected to change dramatically between two days given that we consider typical working days (i.e., not weekends or public holidays). As a result, a standard energy-demand picture is expected to be observed with small fluctuations from one day to another, where these fluctuations can be efficiently calibrated by appropriate shape model considerations. Consider, for example, that for an arbitrary day
j,
denotes the observed energy demand and
denotes the prediction obtained by the simulation model discussed in
Section 2.1. Clearly, as the simulation model prediction is not expected to coincide with the true state of the energy demand, if systematic inefficiencies are presented between the prediction and reality, then a shape correction procedure could remarkably reduce errors caused to daily energy shape deviances. We discuss an approach under which we expect to provide corrections to the simulation model prediction by properly “reshaping” the simulation output in order to better match the observed energy shapes based on previous data. Such an approach is possible under the framework of deformation models (see, e.g., [
25,
26,
27,
28]) where the observed function
(i.e., observed energy shape) is considered as a deformation of the prediction model
(predicted energy shape), and this relation is mathematically expressed through the model
where
is called a deformation function and
is considered as a white noise process. Although several models can be proposed to parameterize the deformation function (e.g., shape-invariant model [
25,
26,
27]), for the particular nature of the data we consider in this paper, we may propose a simpler model which consists of modeling the reshape function
defined by
If the modeler had knowledge of the reshape function, then he/she could perfectly adjust the initial prediction
, provided by the simulation model discussed in
Section 2.1, to obtain exactly the true energy demand
. In particular, knowledge of the exact functional form for
would allow predictions even at intermediate time instants for which observations are not available. In this section, we propose a functional statistical model to estimate the reshape function from past data of initial simulation model discrepancies from the actual measured energy shapes, so that it can be used for future predictions.
As the exact knowledge of the reshape function is not an option, we can estimate it using data from the previous days (we should choose a small time window ~5–10 days) to model the “typical” reshape function that is observed in the near past. Clearly, using the information provided from the last
N days, let us define the set of reshape functions
. For the case under consideration, it is expected that there are certain aspects of the daily energy shape which the prediction model cannot efficiently calibrate and systematically does not capture, and as a result, the reshape functions must be very similar objects as shown for example for a typical set of observations in
Figure 2. In such a case, the approach we propose here is valid.
Under this consideration, for an appropriately chosen period of time each function,
should not present significant fluctuations from the reshape function that is considered as the “typical” one. Therefore, an appropriate notion of mean regarding the set of reshape functions
is needed to properly define/represent the mean element in the set. The latter task requires the calculation of the mean element among a number of functions living in a space which does not necessarily has linear structure, therefore the notion of Fréchet mean needs to be exploited [
29,
30] for this purpose. In the context we discuss here, each reshape function
is considered as a deformation to the mean element (i.e., Fréchet mean)
with respect to which an appropriate notion of deviance is defined and its minimization will provide the mean element (please see [
31] for technical details on this subject). A general model like the
shape-invariant model [
26] can be used for the parameterization of the functional characteristics of the reshape functions in order to define a consistent parametric form for the Fréchet mean. According to the shape-invariant model, shape deformations like vertical (scale) and horizontal (time) shifts can be efficiently captured. The standard shape-invariant model applied to the energy reshape functions can be written as
where
denotes the mean pattern of the energy reshape function,
and
introduce vertical shifts parameterization, while
introduces time-shift parameterization. Recall that any
is considered as a deformation of the observed mean pattern (Fréchet mean) of the set
. As a result, the incurred mean energy reshape function estimated by the data from the previous
N days can be calculated through the equation
where vector
contains all the deformation parameters. Clearly, as these parameters uniquely define the mean reshape function must be selected to minimize the mean model variance from the set
, i.e., the vector
is chosen as
where
represents the time period within a day and
represents the space of the deformation parameters which are subjected to some normalization constraints, i.e.,
Clearly, the estimation of the reshape function for the day
will be used to improve the initial prediction, provided by the simulation model, for the energy demand of this day through the model
where the error term
is considered as a white noise process. After the initial mean reshape function estimation from the first batch of data corresponding to the initial
N days has been obtained, an exponentially weighted scheme can be used to update appropriately the reshape functions taking into account both the effect of the initial reshape function and more recent observations on the reshape function. In particular, the proposed scheme can be described through the following steps.
Initial Step Set
and provide a choice for
. Given the simulation model predictions
and the corresponding measurements
for
estimate the reshape functions
from (
17). Then, set as
the Fréchet mean of
(calculated by (
19)–(
20)) and provide the prediction
for
. For every new prediction task, repeat steps 1–3.
Step 1 Given the new measurement set , and .
Step 2 Set as the Fréchet mean of and with weights and , respectively.
Step 3 Given the simulation model prediction provide the improved (reshaped) prediction .
The exponential weighting is used to reduce the effect of older observations to the new predictions, i.e., for the prediction on the day using the weight parameter we could weight the most recent information (last observed reshape function ) by and the older observations by . In this manner, choosing close to 1 we allocate more weight to the most recent realizations and reduce the effect of the older observations. Otherwise, choosing close to zero, we forget the older observations with a very slow rate allowing the past information to contribute more to the prediction. Clearly, the choice of this parameter is critical to the quality of the prediction, and the final choice of this parameter depends strongly to the nature of the application that the prediction model is employed to. Note also that at each step the Fréchet mean of previous reshape functions is taken into account as an observation through the term although it is not. However, this modification allows to simultaneously condense and appropriately weight (according to our preferences provided by the choice of ) the past information into a single term.
2.2.2. The Weighted Shape Model Approach
In practice, it has been proved that there are periods of time that the prediction models do not provide reliable predictions and they may significantly deviate from the true situation. An example of such a situation is the energy demand prediction of the building during the period of summer holidays discussed in
Section 3. In such cases, it is very important to quickly perceive when this happens and rapidly adjust the prediction to an acceptable level of deviance from the reality. For such purposes, we present here a small variation of the scheme presented in
Section 2.2.1 where a weighted version of the reshape model is used.
The main idea is to divide the prediction into two parts: (a) the prediction provided by the reshape model and weight it by a proportion
and (b) the prediction provided by previous observed energy shapes (measurements only) weighted by the proportion
. For the second part, the same procedure that used for the estimation of the mean reshape function is used, i.e., given the past measurements of the daily energy shapes
their Fréchet mean
is estimated by (
19)–(
20) substituting
with
. The Fréchet mean in this case is interpreted as the most typical energy shape observed in the previous days without taking into account any information provided by the energy simulation model (predictive model). Then, one could shape the prediction either by constantly setting the weighting parameter
w to a specific value or by changing this value each time new data become available to adjust the weighted shape model as close as it is possible to the true situation as observed until that time instant. Such a weight allocation criterion could be constructed as follows. Define by
the weighted prediction, where
denotes the mean energy shape as estimated until day
j and
denotes the shape model’s prediction for the day
derived from the approach discussed in
Section 2.2.1. Then, given the measurement of the day
,
, the weight
w for the next prediction (i.e., the day
) is chosen as the minimizer to the criterion
Clearly, if the prediction provided by the simulation model is completely misplaced, then this criterion will act rapidly as a safety filter and will provide a prediction that is based more on the empirical data (previously observed energy shapes); otherwise, the prediction will be based on the simulation model. Therefore, criterion (
23) will act as a detection mechanism of significant inconsistencies of the estimates provided by the simulation model and if such a significant shift occurs, will immediately properly adjust the prediction and improve its accuracy. Moreover, monitoring the value of
w for a reasonable period of time, provides a measure of efficiency for the prediction model that is used. Ideally, we expect the value of
w to remain in high levels (near to 1) except of some periods that major changes happen where the simulation model has not yet re-adjusted.