  We study the problem of tuning the parameters of a room temperature
controller to minimize its energy consumption, subject to the constraint that
the daily cumulative thermal discomfort of the occupants is below a given
threshold. We formulate it as an online constrained black-box optimization
problem where, on each day, we observe some relevant environmental context and
adaptively select the controller parameters. In this paper, we propose to use a
data-driven Primal-Dual Contextual Bayesian Optimization (PDCBO) approach to
solve this problem. In a simulation case study on a single room, we apply our
algorithm to tune the parameters of a Proportional Integral (PI) heating
controller and the pre-heating time. Our results show that PDCBO can save up to
4.7% energy consumption compared to other state-of-the-art Bayesian
optimization-based methods while keeping the daily thermal discomfort below the
given tolerable threshold on average. Additionally, PDCBO can automatically
track time-varying tolerable thresholds while existing methods fail to do so.
We then study an alternative constrained tuning problem where we aim to
minimize the thermal discomfort with a given energy budget. With this
formulation, PDCBO reduces the average discomfort by up to 63% compared to
state-of-the-art safe optimization methods while keeping the average daily
energy consumption below the required threshold.
