You are on page 1of 6

2017 American Control Conference

Sheraton Seattle Hotel


May 24–26, 2017, Seattle, USA

Data-driven Demand Response Modeling and Control of Buildings


with Gaussian Processes
Truong X. Nghiem and Colin N. Jones

Abstract— This paper presents an approach to provide de- the whole building power demand. A common approach
mand response services with buildings. Each building receives a adopted by many research works is to identify a detailed
normalized signal that tells it to increase or decrease its power mathematical model of the building’s HVAC system and
demand, and the building is free to implement any suitable
strategy to follow the command, most likely by changing some the building’s thermal model, then use an optimization-
of its setpoints. Due to this freedom, the proposed approach based method to directly control certain field devices, such
lowers the barrier for any buildings equipped with a reasonably as dampers, pumps, or fans [3]. While these methods can
functional building management system to participate in the achieve the best performance, they are expensive because
scheme. The response of the buildings to the control signal they require: (a) a major retrofit of the building to install
is modeled by a Gaussian Process, which can predict the
power demand of the buildings and also provide a measure sensors, actuators, and other equipment; (b) upgrading the
of its confidence in the prediction. A battery is included in building energy management system (BEMS) to collect data
the system to compensate for this uncertainty and improve and implement new control logics; (c) detailed modeling of
the demand response performance of the system. A model the building’s thermal dynamics and HVAC system, which
predictive controller is developed to optimally control the is time consuming and costly [4]. For these reasons, their
buildings and the battery, while ensuring their operational
constraints with high probability. Our approach is validated benefits may not be attractive enough considering the cost
by realistic co-simulations between Matlab and the building and effort of deployment, especially for existing commercial
energy simulator EnergyPlus. buildings. Consequently their penetration into practical, real-
I. I NTRODUCTION world applications is still at a low level.
A much simpler, hence more practical, approach to DR
Electric grids are undergoing a substantial change in
with buildings is by global setpoint change rules, i.e., certain
scale and complexity. The growing addition of renewable
global setpoints in the HVAC system are adjusted according
energy sources and distributed storage systems, and the
to predefined rules to change the building’s power demand.
mass adoption of electric vehicles will all contribute to the
Such rules can include setbacks for thermostat setpoints, the
significant increase in complexity and volatility of future grids.
supply air temperature setpoint and the chilled water supply
Demand response (DR), or demand side management (DSM)
temperature setpoint, and also fixed dimming levels of lights.
in general, represents a significant but still underutilized
Specifically, in the “Global Temperature Adjustment” (GTA)
resource for supplying reliability services to the grid. A wide
strategy, the thermostats of the building’s zones are governed
range of DR programs and approaches have been offered by
by one or a few global setpoints, which are manipulated to
utilities or investigated by researchers [1].
receive the change in power demand of the HVAC system [5].
We are interested in a demand tracking control problem in
The simplicity of this approach makes it very cost-effective
which an energy customer adjusts its power demand in real
and practical, hence it is widely adopted in practice. This
time to track a reference demand signal, often for a limited
approach can be enhanced by learning a model from the
window of time. Let rt denote the reference demand at time
setpoint change to the building’s power demand, then using
step t ≥ 0. Here, time is discretized in equal intervals of
this model to devise setpoint values to track the reference
length T > 0, and the power demand is averaged over each
demand signal. This requires either an upgrade of the BEMS
interval. The sampling time T may vary between application
for learning and optimization software, or services from an
and customer types, from seconds in fast Ancillary Services
external provider. Both are usually undesirable.
to minutes in slow DR with commercial buildings [2].
We propose a simpler approach to overcome these
Consider an aggregation of commercial buildings as an practicality issues. An artificial DR control signal ut ∈ [−1, 1]
energy customer to track a reference demand signal. This is sent to the BEMS at each time step t, which requests it to
is generally achieved by controlling the heating, ventilating, relatively increase (when ut > 0) or decrease (when ut < 0)
and air-conditioning (HVAC) systems of the buildings as its power demand, or to keep the nominal operational setting
the HVAC system is often the largest electricity load in a (when ut = 0). The maximum upward and downward power
commercial building. However, other building systems such demand adjustments are expected to be attained at ut = 1
as the lighting system can also be manipulated to adjust and ut = −1 respectively. Each building is free to implement
The research leading to these results has received funding from the
any suitable rules to respond to the request, e.g., by adjusting
European Research Council under the European Union’s Seventh Framework its global temperature setpoint proportionally to ut (GTA
Programme (FP/2007-2013) / ERC Grant Agreement n. 307608: BuildNet, strategy). These rules are designed to satisfy all operational
and the Swiss National Science Foundation under the GEMS project (Green
Energy Management of Structures, grant n. 200021 137985).
constraints of the building, e.g., maintaining the occupant
The authors are with the Automatic Control Laboratory, École Polytech- comfort, while reacting appropriately to ut . An aggregator
nique Fédérale de Lausanne, Lausanne, Switzerland. learns a Gaussian Process model of how the buildings respond

978-1-5090-5992-8/$31.00 ©2017 AACC 2919


r
y A GP can be viewed as an extension of the multivariate
Controller
Gaussian distribution to functions. It is a collection of random
u Pb s variables, any finite number of which have a joint Gaussian
distribution. Specifically, consider noisy observations y of
Grid
Building ... Building Battery
an underlying function f : Rn 7→ R through a Gaussian
1 n noise model: y = f (x) + N 0, σn2 , x ∈ Rn . Given the
Pb regression vectors X = [x1 , . . . , xN ] and the corresponding
+
+
P observed outputs Y = [y1 , . . . , yN ]T , we wish to find the
y
distribution of the output y? to a new input x? . Assuming a
Fig. 1. Architecture of the demand tracking system. Blue: control signals. GP structure y ∼ GP(µ, k; θ), y is fully specified by its mean
Black: physical or measurement signals. Each building implements its own
DR rule, hidden from the controller, to respond to the DR control signal u. function µ(x) = E[f (x)] and covariance function k(x, x0 ) =
E[(f (x) − µ(x))(f (x0 ) − µ(x0 ))] + σn2 δ(x, x0 ), where δ(x, x0 )
to the DR control signal. This model is used to calculate is the Kronecker delta function. The hyperparameter vector
the DR control signal sent to the buildings in real time, in θ parameterizes the mean and covariance functions. The
order to track the reference demand signal. We note that the covariance matrix K is defined to have Kij = k(xi , xj ).
DR rules implemented at the building to respond to the DR Given the training data, the hyperparameters can be esti-
control signal are completely unknown to the aggregator. To mated by maximizing the likelihood: arg maxθ Pr(Y |X, θ).
improve the tracking performance, an auxiliary battery is Once the hyperparameters are determined, the GP can be
employed and controlled by the aggregator to compensate used to predict the distribution of the output y? corresponding
for prediction uncertainty of the model. The overall system to a new input vector x? : y? ∼ N y ? , σ?2 , where
architecture is depicted in Figure 1.
Advantages: The proposed scheme will be simple to y ? = gm (x? ) := µ(x? ) + K? K −1 (Y − µ(X)) (1a)
deploy since it is based on the rule-based DR and does σ?2 = gv (x? ) := K?? − K? K −1 K?T (1b)
not require specialized software in the BEMS except for K? = [k(x? , x1 ), . . . , k(x? , xN )], K?? = k(x? , x? ). (1c)
a communication channel to receive the DR control signal. A key advantage of GP regression is that it provides the
Furthermore, the aggregator does not need access to any predictive posterior distribution of the output, which carries
internal data of the BEMS, nor direct change of any setpoints. the full information of the prediction. In our method, this is
This ensures data confidentiality and operational safety of the incorporated into the optimization to control the system with
building system. Finally, since each building’s energy system a quantifiable confidence guarantee.
and requirements are unique, the abstract interface between As GPs can be used to model nonlinear functions, they are
the buildings and the aggregator by a simple DR control suitable for modeling dynamical systems. This is achieved
signal removes the need for customizing the aggregator’s by feeding delayed input and output signals back to the
design to each and every building. Therefore, the aggregation, model as regressors [11]. In such cases, the model is said
learning, and control algorithms can be applied to a wide to be autoregressive, whose current output depends on its
range of building types without modifications. past inputs and outputs. Specifically, in control systems, it is
Related Work: A comprehensive review of building common to use as the regressors of a dynamical GP
modeling and control methods can be found in [3] and the
references therein. A broad range of data-driven modeling, xt = [yt−ly , . . . , yt−1 , ut−lu , . . . , ut , wt−lw , . . . , wt−1 , wt ]
assessment, and control methods for DR with buildings have where t denotes the time step, u the control input, w the
been investigated in the literature. Regression trees were used exogenous disturbance input, y the (past) output. Here,
in [6] to model and compute setpoint schedules of buildings ly , lu , and lw are respectively the lags for autoregressive
for DR. Regression and GP models were investigated for outputs, control inputs, and disturbances. The vector of all
forecasting short- and long-term building energy consumption autoregressive inputs can be thought of as the current state
in [7]. Simulation studies with EnergyPlus and regression of the model. A dynamical GP can then be trained from data
models were used in [8] to quantify the flexibility of buildings in the same way as any other GPs.
for DR using setpoint change rules. The authors of [9] B. Data-driven Modeling of Building Power Demand
compared four data-driven methods for building energy As introduced in Section I, in our proposed scheme, each
predictions and concluded that the Gaussian approaches were building implements its own rule to respond to the signal u.
accurate and highly flexible, and the uncertainty measures Because the specific rules are unknown to the aggregator, we
could be helpful for certain applications involving risks. employ a data-driven GP regression approach to learn from
The rest of this paper is organized as follows. Section II experiment data a black-box model of the building power
presents a data-driven method for predicting building power demand in response to the DR signal. The data-driven GP
demand based on GP. Section III develops a model predictive modeling approach consists of the following steps.
control formulation for the demand tracking problem using the 1) Experiment and data collection
GP model. The proposed scheme is illustrated and validated In this step, data are collected from experiments with
by a detailed simulation case study in Section IV. the actual buildings. A test DR signal, generated randomly
II. G AUSSIAN P ROCESSES FOR D EMAND P REDICTION or following a predefined pattern, is sent to the buildings.
A. Introduction to Gaussian Processes Their power demands in response to the test signal are
We briefly introduce Gaussian Processes (GP) with appli- recorded, together with other measurements such as the
cations in control. For more details, see [10], [11]. climate condition. These additional inputs represent the

2920
exogenous disturbances w to the model, while u will be the later, this additional information is invaluable in the tracking
DR signal input and y the power demand output. Data points control method, particularly for controlling the battery.
are associated with time-stamps. The time-stamps usually We will use the subscript notation •τ |t to denote the value
reveal the usage or load patterns of the buildings and therefore of a variable at time step τ given the current information
are important features of the model. The experiment typically available at t. It is a measured value if τ < t, e.g.,
lasts several weeks to collect enough data. Because our control yt−1|t is the measured power demand in the previous time
scheme does not directly change the building setpoints nor step. When τ ≥ t, the value is predicted, e.g., yt|t is the
control its equipment, the experiment will not adversely affect predicted power demand in the current time step. At τ ,
the building’s operation or the comfort of its occupants. The the input vector xτ |t of the GP consists of the measured
experiment may be repeated seasonally to adjust the model. and predicted outputs yτ |t = [yτ −ly |t , . . . , yτ −1|t ], control
2) Feature selection inputs uτ |t = [uτ −lu |t , . . . , uτ |t ], and disturbances wτ |t =
Because buildings are dynamical systems, an autoregressive [w
 τ −lw |t , . . . , wτ |t ], as well as the time value τ : xτ |t =
GP is usually needed to model the response from the DR yτ |t , uτ |t , wτ |t , τ . The GP regression (1) gives us the
2
control signal to the power demand. Often we do not know distribution of yτ |t ∼ N (y τ |t , σy,τ |t ) where
a priori what the lag values are and which of the above y τ |t = gm (xτ |t ), 2
σy,τ |t = gv (xτ |t ). (2)
inputs are relevant to predicting the output. Feature selection
concerns with selecting the relevant inputs for the model. GPs Note that xτ |t may contain predicted values. In particular:
provide a tool for determining the relevance of each input, • Control inputs uk|t , for k ≥ t, are decision variables.

using Automatic Relevance Determination (ARD) covariance • We assume that predicted disturbances wk|t , for k ≥ t,

functions, which will be demonstrated in the case study. are available, e.g., from short-term forecasts.
3) Model selection, training and validation • Predicted outputs yk|t , for k ≥ t, are random variables at

The mean function µ(x) is often chosen to be zero, though previous steps. For simplicity, we will only propagate the
other options can be useful in certain cases [10]. Selecting expected values, i.e., yk|t take the predicted means y k|t
the covariance function of the GP often requires domain which are deterministic values. Uncertainty propagation
insights and trial-and-error. Common choices are the Squared can be incorporated for more accurate predictions as
Exponential (SE) and Rational Quadratic (RQ) covariance discussed in [11], [12].
functions (see [10] for details and other covariance functions). B. Battery’s Model and Constraints
The experiment data are partitioned into a training data set For simplicity, we assume an ideal lossless battery model
and a testing data set. The GP’s hyperparameters are tuned st+1 = st + T bt (3)
on the training data. The resulting GP is then validated on the where bt is the battery’s power during the time step t and
testing data. Several covariance functions can be compared s is the battery’s SoC. Here, b is positive if the battery is
based on their validation results to select the best model. If charging and negative if discharging. The battery is subject
the results are unsatisfactory, we may need to go back to an to two operational constraints: its power must be bounded
earlier step, for example to change the covariance function by bmin ≤ b ≤ bmax , and its SoC must stay in a safe range
structure or to select a different set of inputs. [smin , smax ] where smax is the fully-charged level and smin
III. D EMAND T RACKING C ONTROL is the lowest safe discharged level.
This section formulates a model predictive control (MPC) C. Tracking Constraint
approach for the demand tracking problem. The control The link between the buildings and the battery is the
system consists of three main components shown in Figure 1: tracking constraint, which states that their total power p =
• A collection of buildings which respond to a DR control y + b should track the reference r. In this way, the battery
signal by unknown but fixed rules, resulting in demand helps reject the uncertainty of the GP and acts as an energy
variations. Their responses are modeled by a GP. buffer to increase the tracking capability of the system.
• A battery whose state of charge (SoC) can be measured Although ideally pt should track rt exactly at any time
and whose charge/discharge power can be controlled. t, this strict constraint may be infeasible in certain circum-
The battery helps improve the tracking quality by stances, e.g., when r is outside the DR capability of the
absorbing the output uncertainty of the GP. system. Therefore, we introduce a slack variable δt = rt − pt .
• A controller which receives the demand tracking request The controller tries to keep δ = 0, however when exact
from the utility and computes the DR signal to the tracking is impossible, it will maintain the operational safety
buildings and the power of the battery to optimally track of the system while keeping δ as small as possible. This
the reference demand signal. objective will be reflected in the cost function. In this
We first present the models and notations used in this sec- formulation, δ is a decision variable and the battery power is
tion, followed by the formulation of the controller. Illustrative bt = rt − δt − yt . (4)
simulation results will be discussed in Section IV. This equation is made possible by the fact that the battery
A. Building’s Demand Response Model can be controlled precisely in real-time.
In Section II-B we discussed how a GP could be trained D. Model Predictive Tracking Control
to learn the buildings’ aggregate demand response to the DR We adopt the MPC approach [13] to solve the demand
signal from experiment data. The GP can predict the expected tracking problem. At the core of the MPC are the models of
demand as well as provides probabilistic information about the system, which are used to predict future system states
its prediction in the form of the variance. As we will show given the current state and current and forecast future inputs.

2921
Suppose the current time step is t and the MPC horizon At each t, the above optimization is solved to find optimal
is H > 0. To formulate the MPC, the equations predicting DR signal u?τ |t and optimal slacks δτ?|t , t ≤ τ ≤ t + H − 1;
the values of the system’s variables over the horizon must of which the first optimal decisions u?t|t and δt|t
?
are applied.
be derived, based on the system models. For simplicity, the At the next time step t + 1, the optimization is repeated
future reference signal r and disturbances w are assumed to with newly available information (i.e., new measurements
be deterministic, meaning that we know their future values and updated forecasts) and the shifted horizon [t + 1, t + H].
exactly, e.g., from accurate short-term forecasts. Formulating The above MPC formulation is difficult to solve due to the
the MPC then amounts to deriving the distributions of the two-sided chance constraints (8). In a recent work [14], it
derived random variables (yτ |t , bτ |t , sτ +1|t for t ≤ τ ≤ has been shown that any two-sided linear chance constraint
t + H − 1) conditioned on the other variables. For notational of the form Pr(a ≤ xT ξ ≤ b) ≥ 1 −  is convex in a, b
brevity, we will drop the conditioning part of the notations and x given that  ≤ 21 . Here, a ∈ R, b ∈ R, x ∈ Rn , and
and simply write Pr(yτ |t ), with the implicit interpretation ξ is a known jointly Gaussian vector. Furthermore, there
that it is a conditional probability. exists a computationally tractable second-order cone (SOC)
1) Predicted Power Demands of Buildings approximation of this chance constraint, stated in Lemma 1.
At each time step τ in the horizon, the predicted output Lemma 1 (Adapted from [14, Lemma 16]): Let
is given by Eq. (2). Recall that only the predicted output ξ ∼ N (µ, Σ) be a jointly distributed Gaussian random
means are propagated. Therefore yτ |t is independent of the vector with known mean µ and covariance matrix Σ, and
realization of the random variables yτ |t in previous steps. 0 <  ≤ 12 . Let LLT = Σ be the Cholesky decomposition of
It follows that the random variables yτ |t , for all t ≤ τ ≤ Σ, and Φ−1 (·) the inverse cumulative distribution function of
t + H − 1, are conditionally independent given the non- the standard Gaussian distribution. The following constraints,
derived variables. Consequently, the sum of any subset I ⊆ with the auxiliary variable γ and ? = /1.25,
{t, . . . , t+H −1} of them is also a Gaussian random variable
P P P 2 γ ≥ kLT xk2 , a − b ≤ 2Φ−1 (? /2)γ
τ ∈I yτ |t ∼ N ( τ ∈I y τ |t , τ ∈I σy,τ |t ). (5)
a − µT x ≤ Φ−1 (? )γ, µT x − b ≤ Φ−1 (? )γ
2) Predicted Battery Power and SoC
From Eq. (4), the predicted battery power at time τ ≥ t guarantee that Pr(a ≤ xT ξ ≤ b) ≥ 1 − .
2 This result allows us to conservatively approximate the
has the Gaussian distribution bτ |t ∼ N (bτ |t , σb,τ |t ), where
2 2 chance constraints (8). For each τ ∈ [t, t + H − 1], we rewrite
bτ |t = rτ − δτ |t − y τ |t , σb,τ |t = σy,τ |t . (6)
bτ |t = bτ |t + σy,τ |t ξ using Eq. (6), where ξ ∼ N (0, 1). Then
The battery’s dynamics (3) result in the future battery’s
Pτ Pτ (8a) is equivalent to Pr(bmin −bτ |t ≤ σy,τ |t ξ ≤ bmax −bτ |t ) ≥
SoC as sτ +1|t = st + T k=t (rk − δk|t ) − T k=t yk|t , for
2 1 − p , which is approximated by Lemma 1 as
τ ≥ t. It follows that sτ +1|t ∼ N (sτ +1|t , σs,τ +1|t ) where
Pτ Pτ bmin − bτ |t ≤ Φ−1 (?p )σy,τ |t , (9a)
2 2 2
sτ +1|t = st + T k=t bk|t , σs,τ +1|t = T k=t σy,k|t (7)
bτ |t − bmax ≤ Φ−1 (?p )σy,τ |t , (9b)
in which Eq. (5) is used to derive the variance. −1
The bounds on the battery’s power and SoC lead to bmin − bmax ≤ 2Φ (?p /2)σy,τ |t . (9c)
corresponding chance constraints. We wish to guarantee that Here ?p = p /1.25, and the auxiliary variable γ can be
at each time step, the power and SoC constraints are satisfied dropped for γ = kσy,τ |t k2 = σy,τ |t .
with probability at least (1 − p ) and at least (1 − s ), Similarly, (8b) is approximated by first rewriting sτ |t =
respectively, where 0 < p , s ≤ 21 are given constants. sτ |t +στ |t ξ, where στ |t is the vector [σy,t|t , . . . , σy,τ |t ]T , and
Specifically, for each τ in the horizon, ξ ∼ N (0, I) is a vector of (τ − t + 1) independent standard

Pr bmin ≤ bτ |t ≤ bmax ≥ 1 − p (8a) Gaussian random variables. Applying Lemma 1, we obtain
 the following constraints for all t ≤ τ ≤ t + H − 1, with the
Pr smin ≤ sτ |t ≤ smax ≥ 1 − s (8b)
auxiliary variable γτ and ?s = s /1.25,
where bτ |t and sτ |t are Gaussian random variables whose
γτ ≥ kστ |t k2 , smin − smax ≤ 2Φ−1 (?s /2)γτ (10a)
means and variances are given in Eqs. (6) and (7).
3) Objective Function smin −sτ |t ≤ Φ−1 (?s )γτ , sτ |t −smax ≤ Φ−1 (?s )γτ (10b)
The tracking controller aims to minimize the tracking error The final MPC formulation is given below:
δτ |t , therefore we select the quadratic objective function Pt+H−1
Pt+H−1 2 minimize J = τ =t δτ2|t (11)
to minimize J = τ =t δτ |t . We may also consider u(·),δ(·)
additional objectives, such as reducing the battery’s charge– subject to Constraints (2), (6), (7), (9), (10)
discharge frequency to improve its lifetime. These objectives
uτ |t ∈ [−1, 1], ∀t ≤ τ ≤ t + H − 1
can be encoded as extra weighted terms to the above tracking
objective function. In this paper, we will only consider the Due to the GP model (2), the optimization problem (11) is
tracking objective. a non-convex nonlinear program, which can be solved by a
4) MPC Formulation nonlinear optimization solver such as IPOPT [15].
Putting everything together, we obtain the following IV. S IMULATION C ASE S TUDY
stochastic MPC formulation: A. The Case Study
Pt+H−1
minimize J = τ =t δτ2|t In this case study, we deployed a group of three build-
u(·),δ(·)
subject to Constraints (2), (6), (7), (8) ings: a medium office building, a large hotel, and a su-
permarket. These buildings are modeled in EnergyPlus,
uτ |t ∈ [−1, 1], ∀t ≤ τ ≤ t + H − 1 taken from the U.S. DoE’s Commercial Reference Build-

2922
ing Models (http://energy.gov/eere/buildings/commercial-reference- 600

y [kW]
buildings). Each building model was modified to receive global
400 µ ± 2σ
temperature setpoints from a rule-based DR controller. An µ
aggregator, developed in Matlab, receives whole building system
200
power demand measurements from the EnergyPlus models 40
30 2σ |e|

e [kW]
and computes and sends a single DR signal to all three local 20
DR controllers. This co-simulation of multiple EnergyPlus 10
and Matlab instances were developed and deployed with the 0
0 4 8 12 16 20
OpenBuildNet framework [16]. hour
Each local DR controller implements a simple GTA strategy, (a) Zero-variance simulation results with 95% confidence intervals.
which adjusts the global thermostat setpoints proportionally 3

σM C − σZV
to the DR control signal by −2u (°C), to raise or lower the 2
setpoints by up to 2°C compared to the nominal values. Here 1
we assume that the ±2°C GTA is within the operational range 0
0 4 8 12 16 20
and acceptable comfort range of each building. The sampling hour
time T is 15 minutes. The weather profile was of Chicago (b) Standard deviation difference between methods.
(U.S.). All analyses and simulations were performed for the
Fig. 2. 24-hour ahead simulation results.
summer weather, however similar results could be obtained
for other seasons following the same approach. The usage The feature selection results are reported in Table I, in
patterns of the buildings, represented by various schedules which extremely large length scales are replaced by ∞ and
(occupancy, equipment operation, etc.), were included in the some of them are excluded due to lack of space. By examining
EnergyPlus models. On a regular summer day, the nominal the length scales, we determined ly = 3, lu = 1, lw = 0.
aggregate demand of the three buildings peaks at between 3) Covariance Selection
700 and 800 kW. As mentioned earlier, the usage patterns of the build-
B. Gaussian Process Model Development ings during weekdays are periodic. With this insight, we
This section reports the development of a GP model for selected the covariance function as the product k(x, x0 ) =
the collective demand response behavior of the buildings. knt (xnt , x0nt )k~ (~, ~0 ), where knt is a covariance function
1) Experiment for non-temporal inputs xnt and k~ is a periodic covariance
An experiment was carried out by simulating the building function for the temporal input ~; x = [xnt , ~]. Covariance
models and their DR rules with i.i.d. uniformly random selection was performed by trying different choices for knt
DR signal ut ∈ [−1, 1] during the first four weeks of June. and k~ and selecting the one with the best performance
Besides the excitation signal u, the aggregate power of the on validation data. Finally, we selected the SE covariance
buildings and the outside air temperature and humidity were function for knt and the periodic RQ covariance function for
collected from EnergyPlus. Three weeks of data are used for k~ (cf. [10] for details on covariance functions).
training and the rest are for validation. 4) Model Validation
2) Feature Selection The final GP model was validated on the testing dataset,
For each building, its operation schedules were similar be- resulting in good performance scores: RMSE = 14.579
tween weekdays but were reduced significantly on Saturdays (kW), SMSE = 0.0055, MSLL = −2.4358. To test the
and switched off on Sundays. Hence, we only trained a model model for multistep-ahead predictions, two 24-hour-ahead
and performed the study for weekdays because on weekends, prediction simulations were performed: Monte-Carlo method
the DR capability of the buildings was severely limited. with 400 samples per step, and zero-variance method (i.e.,
We chose an autoregressive GP with candidate inputs only expected values are propagated). The results are reported
xt = [yt−ly , . . . , yt−1 , ut−lu , . . . , ut , wt−lw , . . . , wt , ~t ] in Fig. 2 (the Monte-Carlo plots are not included due
where y is the power demand, u the DR control signal, w to lack of space). In both cases, the prediction accuracy
the disturbances, and ~t ∈ [0, 24] the current hour-of-day. was good. Fig. 2b plots the difference between the output
Here, y and u are scalars, while w = [θ, η] where θ and η standard deviations σM C and σZV of the two methods.
are respectively the ambient air temperature and humidity. The error was small, averaged at 1.04 (kW), hence the
The lags ly , lu , lw are unknown in advance. To select the variance estimates obtained by the zero-variance method were
relevant features, we used the SE covariance function with sufficiently accurate. Therefore, this method was used for
ARD [10] to train models with different orders, compared predicting future outputs in control and optimization.
them on the validation dataset and examined their input length C. Demand Tracking Control Simulation Results
scales. Three initial GP models Mn of order n = 2, 3, 4, We considered a DR event lasting for four hours between
with ly = n, lu = lw = n − 1, were considered. The log 13:00 and 17:00 on July 7th. This day is outside the training
likelihood of the identified model `1 was maximized during period for the GP model and has an unusually high outside air
the training. For validation, three performance measures on temperature profile, which prompts the DR event. During the
the mean predictions were calculated: the root mean squared event, the system was requested to track a reference demand
error (RMSE), the standardized mean-squared error (SMSE), signal which was ∆P (kW) below the baseline demand p?t :
and the mean standardized log loss (MSLL). Details on these rt = p?t − ∆P when t is between 13:00 and 17:00. The
measures can be found in [11, p. 78]. Essentially, the smaller baseline p?t was obtained by simulating the buildings in their
they are, the better the predictions are. nominal modes on the same day; alternatively, it could be

2923
TABLE I
F EATURE SELECTION RESULTS : λx,i IS THE LENGTH SCALE OF INPUT x(t − i); RELEVANT FEATURES ARE HIGHLIGHTED .
Model `1 RMSE SMSE MSLL λy,4 λy,3 λy,2 λy,1 λu,3 λu,2 λu,1 λu,0 λθ,1 λη,1 λθ,0 λη,0
M2 4151 21.31 0.0119 -2.0456 28.14 6.04 26.28 7.95 ∞ ∞ 3.70 12.75
M3 4188 21.15 0.0118 -2.0923 63.32 24.07 4.71 ∞ 35.32 6.79 ∞ ∞ 3.51 11.20
M4 4224 20.80 0.0114 -2.1655 470.34 72.11 26.63 4.78 ∞ ∞ 49.59 6.92 ∞ ∞ 3.97 11.73

800 80
50kWh 75kWh 100kWh

Flexibility (kW)
Power [kW]

600 75

400 baseline
70
ref
buildings
200 65
0 2 4 6 8 10 12 14 16 18 20 22 4 8 12
Power [kW] DR Signal

0
MPC horizon (steps)
−0.5
Fig. 4. Flexibility for different MPC horizons H and battery sizes smax .
−1
0 2 4 6 8 10 12 14 16 18 20 22
20 requires minimal changes in the building’s equipment and
10
0 energy management system. Furthermore, it achieves a
−10 separation of concerns between the building’s level and the
−20
0 2 4 6 8 10 12 14 16 18 20 22 aggregator’s level through an abstract DR signal and the
hour
use of Gaussian Process models. We showed that a GP
Fig. 3. Simulation results for ∆P = 69 kW.
model trained on experiment data could achieve accurate
calculated by simulating the GP with a zero DR control signal. predictions of a building’s power demand with a quantifiable
The chance constraint thresholds were p = s = 0.1. confidence measure. We developed an MPC formulation for
The aggregator’s MPC formulation (11) was implemented the aggregator’s algorithm and showed the effectiveness of
in Matlab with CasADi [17] and IPOPT [15] for solving the proposed approach in a realistic simulation case study.
the nonlinear program. We performed many simulations for R EFERENCES
different ∆P values and battery sizes, and three different [1] P. Siano, “Demand response and smart grids—a survey,” Renewable
horizons H = 4, 8, 12 (respectively 1, 2, 3 hours). The MPC and Sustainable Energy Reviews, 2014.
problem size depends on the horizon H and is largest when [2] F. A. Qureshi, T. T. Gorecki, and C. N. Jones, “Model predictive control
for market-based demand response participation,” in IFAC Proceedings,
H = 12. On an Apple Mac Pro 2013 with Matlab 2015b and vol. 47, no. 3. Elsevier, 2014, pp. 11 153–11 158.
utilizing only one CPU core, the largest MPC problem took [3] M. Maasoumy, A. Sangiovanni-Vincentelli, et al., “Smart connected
less than a minute to solve at each time step, which was fast buildings design automation: Foundations and trends,” Foundations
and Trends in Electronic Design Automation, vol. 10, pp. 1–143, 2016.
enough given the sampling time of 15 minutes. [4] D. Sturzenegger, D. Gyalistras, M. Morari, and R. S. Smith, “Model
Fig. 3 illustrates the simulation results for ∆P = 69kW, predictive climate control of a swiss office building: Implementation,
H = 8, bmax = 30kW, smax = 50kWh, and the initial battery results, and cost–benefit analysis,” IEEE Trans. Control Syst. Technol.,
vol. 24, no. 1, pp. 1–12, 2016.
SoC at half capacity. The top figure plots the baseline p? [5] D. S. Watson, S. Kiliccote, N. Motegi, and M. A. Piette, “Strategies for
(dashed line), the reference r (solid line), and the buildings’ demand response in commercial buildings,” in 2006 ACEEE Summer
aggregate power y (dash-dotted line). The DR event period is Study on Energy Efficiency in Buildings, 2006.
[6] M. Behl, T. X. Nghiem, and R. Mangharam, “DR-Advisor: A data
shaded. Observe that the buildings alone could not track the driven demand response recommender system,” in CISBAT, 2015.
reference exactly: yt > rt . This slack between the buildings’ [7] H. Y. Noh and R. Rajagopal, “Data-driven forecasting algorithms for
power and the reference was fully compensated by the battery building energy consumption,” in Proc. of SPIE, 2013.
[8] R. Yin, E. C. Kara, Y. Li, et al., “Quantifying flexibility of commercial
as shown in the third figure, and the system successfully and residential loads for demand response using setpoint changes,”
tracked the reference demand. Applied Energy, 2016.
The flexibility of the system, i.e., the maximum reduction [9] Y. Zhang, Z. O’Neill, B. Dong, and G. Augenbroe, “Comparisons of in-
verse modeling approaches for predicting building energy performance,”
∆P it is able to track exactly, is determined by the MPC Building and Environment, vol. 86, pp. 177–190, 2015.
horizon H and the battery size. By performing many sim- [10] C. E. Rasmussen and C. K. I. Williams, Gaussian Processes for
ulations, we were able to find the system’s flexibility for Machine Learning. The MIT Press, 2006.
[11] J. Kocijan, Modelling and Control of Dynamic Systems Using Gaussian
various combinations of H and battery size, summarized in Process Models. Springer, 2016.
Figure 4. Obviously, as the battery size or the MPC horizon [12] A. Girard, “Approximate methods for propagation of uncertainty with
increases, the flexibility also increases. However, we found gaussian process models,” PhD thesis, University of Glasgow, 2004.
[13] J. M. Maciejowski, Predictive control: with constraints. Pearson,
that increasing the battery size, hence its cost, significantly 2002.
(50kWh to 75kWh to 100kWh) did not result in significant [14] M. Lubin, D. Bienstock, and J. P. Vielma, “Two-sided linear chance con-
increases in the DR flexibility. Increasing the MPC horizon, straints and extensions,” ArXiv e-prints, Feb. 2016, arXiv:1507.01995v2.
[15] A. Wächter and L. T. Biegler, “On the implementation of an interior-
on the other hand, could achieve similar increases in the DR point filter line-search algorithm for large-scale nonlinear programming,”
flexibility while being much easier and cheaper to implement. Mathematical programming, vol. 106, no. 1, pp. 25–57, 2006.
V. C ONCLUSIONS [16] T. X. Nghiem, A. Bitlislioğlu, T. Gorecki, F. A. Qureshi, and C. N.
Jones, “OpenBuildNet framework for distributed co-simulation of smart
This paper presented a data-driven approach to provide energy systems,” in ICARCV’16, 2016.
demand response services with buildings and energy storage. [17] J. Andersson, “A General-Purpose Software Framework for Dynamic
Its key advantage is its simplicity in implementation, which Optimization,” PhD thesis, KU Leuven, 2013.

2924

You might also like