II. LEARNING BATTERY MODELS
A. Model Formulation
We assume that the state of a building at time t, in terms of
its thermal capacity, can be described by a scalar st, bounded
by smin and smax (w.l.o.g. smin = 0 and smax = 1). The
state is a measure of the energy stored in the system, and
its bounds depend on the thermal bounds which are related
to comfort or operational constraints in the building. This
means that st= 0 indicates that no energy can be extracted
from the building without violating constraints, and st= 1
indicates that no energy can be inserted. A possible definition
of this abstract state is given in Section IV-B.
We now proceed to the derivation of a battery like state
equation for the state st. In full generality, the state evolution
can be represented by the following difference equation:
st+1 −st=h(st,et, pt) + ωt,(1)
with the external weather conditions denoted by et, which
can comprise multiple measurements and past data, the
power injected pt, and a noise term ωt. The noise term ac-
counts for random disturbances in the system, e.g. occupants.
We assume that the controller operating the system leads
to the state following a specific pattern, here called “nominal
state” and denoted by sn,t. The evolution of this nominal state
can similarly be expressed as
sn,t+1 −sn,t =h(sn,t,et, pn,t) + ωt,(2)
with the baseline power injected given by pn,t.
Prediction of this baseline power is not the focus of this
work. An overview of data-driven methods to predict energy
consumption in buildings can be found in [14]. To intro-
duce uncertainty quantification for consumption prediction,
methods like Gaussian Process (GP) regression [15], kernel
methods with error quantification [16], or variational autoen-
coders [17] can be used. We will therefore assume to have
reasonably accurate baseline predictions where necessary.
Considering the difference of (1) and (2), we get
st+1 −st=sn,t+1 −sn,t +h(st,et, pt)−h(sn,t,et, pn,t).(3)
The goal of our work is to quantify the system behavior,
and therefore the evolution of st, in cases where the nominal
controller actions are augmented by specific requests.
Definition 1 (Relative Consumption Request): Given a
baseline power pn,t ∈R, we define a relative request as
rt∈Rsuch that the desired overall consumption of the
building at time tis pt=pn,t +rt.
We consider systems with controllers that drive the state
back to its nominal value after receiving requests (as typically
observed in thermal assets), therefore, we get two distinct
phases in the system operation:
1) The request phase where pt=pn,t +rt.
2) The recovery phase where stis driven towards sn,t, with
the injected power denoted by pcon,t.
Moreover, in the request phase, we can distinguish between
receiving positive or negative relative consumption requests,
due to equipment or controller characteristics.
We make the following assumption about the controller.
Assumption 1: For each st∈[0,1], the controller is able
to satisfy the comfort/operational constraints for all t0> t.
When receiving flexibility requests, the controller follows
them as closely as possible, without violating constraints.
Furthermore, we assume to either receive state measurements
from the controller, or measurements from which we can
construct a state-like variable.
Note that Assumption 1 does not impose a fixed controller,
and therefore, is very general in its application. The assump-
tion on fulfilling constraints is more an assumption on the
equipment than the controller since any decent controller
should be able to fulfill constraints with enough controlla-
bility. Lastly, not relying on a fixed state definition further
increases generality, while still having the option to construct
a state from standard measurements (see Section IV-B).
Through Assumption 1, we have that the overall state
dynamics behave like a switched system, distinguishing the
cases where pt=pn,t +rtand pt=pcon,t. Assuming a
linear approximation of h, for simplicity, around the nominal
operation point, we get that
h(st,et, pt)−h(sn,t,et, pn,t)
≈
a+rtif rt>0
a−rtif rt<0
bf(st−sn,t)if rt= 0
.(4)
Due to the stochasticity of st, notice that a+,a−and bfare
in general stochastic.
We make a few further assumptions on the nominal state
evolution and the coefficients a+,a−, and bfthat will ease
the rest of the analysis.
Assumption 2: In (4), we assume that
(a) The request-free nominal state evolution sn,t can be
well approximated by a function f:Rm→Rof
the current and recent past weather variables, denoted
hereafter by et:= [e>
1,t, ..., e>
n,t]>∈Rm,ei,t ∈Rη, i =
1, . . . , n, m =nη,
(b) bf∈Ris a constant,
(c) a+and a−are real-valued random variables on a finite
probability space.
Assumption 2a) states that the request-free state evolution
can be well-captured by a deterministic function that only
depends on past and current weather variables. ndenotes the
number of measured variables, and ηdenotes the number of
considered time steps. Despite being strong, this modeling
assumption for thermal systems (in particular building assets)
often leads to good results in practice because errors do
not accumulate. Note that this assumption could be replaced
by modeling the nominal state with a GP instead to take
uncertainty into account, at the price of complicating fur-
ther the analysis. Assumption 2b) is justified by the fact
that the coefficient bfhas little influence on the flexibility
quantification discussed here, see Sections II-B and IV. For a
reasonable choice of bfsee Section II-B. Finally, Assumption
2c) is useful to extract the distributions of a+and a−directly
from data. The random variable assumption also captures