Reinforcement Learning for Building Control and its Real-World Implementation
This presentation compares the performance of reinforcement learning controller with model predictive control for a real-world New York high rise building with 40 floors.
Engineering topics
Publications and source records attributed to Henze, Gregor.
This presentation compares the performance of reinforcement learning controller with model predictive control for a real-world New York high rise building with 40 floors.
As buildings account for approximately 40% of global energy consumption and associated greenhouse gas emissions, their role in decarbonizing the power grid is crucial. The increased integration of variable energy sources, such as renewables, introduces uncertainties and unprecedented flexibilities, necessitating buildings to adapt their energy demand to enhance grid resiliency. Consequently, buildings must transition from passive energy consumers to active grid assets, providing demand flexibility and energy elasticity while maintaining occupant comfort and health. This fundamental shift demands advanced optimal control methods to manage escalating energy demand and avert power outages. Reinforcement learning (RL) emerges as a promising method to address these challenges. Here, in this paper, we explore ten questions related to the application of RL in buildings, specifically targeting flexible energy management. We consider the growing availability of data, advancements in machine learning algorithms, open-source tools, and the practical deployment aspects associated with software and hardware requirements. Our objective is to deliver a comprehensive introduction to RL, present an overview of existing research and accomplishments, underscore the challenges and opportunities, and propose potential future research directions to expedite the adoption of RL for building energy management.
Reinforcement learning (RL) has shown significant success in sequential decision making in fields like autonomous vehicles, robotics, marketing and gaming industries. This success has attracted the attention to the RL control approach for building energy systems which are becoming complicated due to the need to optimize for multiple, potentially conflicting, goals like occupant comfort, energy use and grid interactivity. However, for real world applications, RL has several drawbacks like requiring large training data and time, and unstable control behavior during the early exploration process making it infeasible for an application directly to building control tasks. To address these issues, an imitation learning approach is utilized herein where the RL agents starts with a policy transferred from accepted rule based policies and heuristic policies. This approach is successful in reducing the training time, preventing the unstable early exploration behavior and improving upon an accepted rule-based policy - all of these make RL a more practical control approach for real world applications in the domain of building controls.
Reinforcement learning (RL) based control is widely considered a promising approach in building automation and control as it has demonstrated the potential to deal with complex objectives in adjacent domains like robotics, autonomous vehicles, gaming applications, and advertisement recommendations. When applied to any environment, model-free RL learns to improve its control performance over time without requiring a control model, by receiving and then analyzing feedback from the building environment after each control action. Operational objectives are becoming increasingly complex through the simultaneous consideration of thermal comfort, carbon emissions, grid services, and indoor air quality. In this context, conventional rule-based control approaches are proving sub-optimal, mostly heuristic, and inadequate. The model-free and self learning nature of RL appears promising and attractive as it may address the scalability issues associated with advanced control approaches. However, it suffers from long training times and unstable control behavior during the early stages of its learning process, which makes it unsuitable to be applied directly to buildings. This paper addresses these issues using an inverse reinforcement learning approach (IRL), a technique utilized to learn the objective of a controller agent which is considered an expert in its respective domain. Here, we consider a rule-based control as the expert demonstrator. IRL is different from a direct imitation (i.e., direct mapping of states to actions) of control actions as it tries to find the underlying intent of an expert's policy, providing the controller with a better-generalized policy for unseen states or environments with slightly different dynamics. This approach propels the RL controller's policy to levels similar to or better than that of a rule-based policy before it starts learning by interacting with the building. This makes RL for building energy management applications more practical as it prevents the erratic and exploratory behavior in the initial training period, simultaneously speeding up the learning process when compared to applying an untrained RL agent directly to a building environment.
Demand side energy flexibility is increasingly being viewed as an essential enabler for the swift transition to a low-carbon energy system that displaces conventional fossil fuels with renewable energy sources while maintaining, if not improving, the operation of the energy system. Building energy flexibility may address several challenges facing energy systems and electricity consumers as society transitions to a low-carbon energy system characterized by distributed and intermittent energy resources. For example, by changing the timing and amount of building energy consumption through advanced building technologies, electricity demand and supply balance can be improved to enable greater integration of variable renewable energy. Although the benefits of utilizing energy flexibility from the built environment are generally recognized, solutions that reflect diversity in building stocks, customer behavior, and market rules and regulations need to be developed for successful implementation. In this paper, we pose and answer ten questions covering technological, social, commercial, and regulatory aspects to enable the utilization of energy flexibility of buildings in practice. In particular, we provide a critical overview of techniques and methods for quantifying and harnessing energy flexibility. We discuss the concepts of resilience and multi-carrier energy systems and their relation to energy flexibility. We argue the importance of balancing stakeholder engagement and technology deployment. Finally, we highlight the crucial roles of standardization, regulation, and policy in advancing the deployment of energy flexible buildings.
In this work, a topology optimization framework for district thermal energy systems is presented. The framework seeks to address the questions, for a given district, "What is the best subset of buildings to connect to a district thermal energy system, and by what network should they be connected, to minimize life cycle cost?" A particle swarm optimization approach is validated to address the selection of the subset of buildings, and a graph theory-based heuristic is validated for selection of the network topology for any candidate subset of buildings. The framework is applied to a prototypical urban district for illustrative purposes. Additionally, modeling of prototypical districts revealed reductions in source energy use intensity for heating and cooling of 21-25% through the use of advanced district energy systems relative to code-compliant, building level systems. The framework identifies solutions with life cycle cost values 14% to 72% lower than that of base case scenarios based on conventional design approaches, depending on the base case scenario selected. Analysis of the search space indicates that topology optimization facilitates reductions in life cycle cost, source energy use intensity, and carbon emissions.
We present an open-source building performance simulation test bed, the Advanced Controls Test Bed (ACTB), that interfaces high-fidelity Spawn of EnergyPlus building models, with advanced controllers implemented in Python. Additionally, the ACTB leverages the Building Optimization Testing and Alfalfa platforms for managing simulations, providing an external clock, a representational state transfer (REST) application programming interface (API), and key performance indicators for evaluating the effectiveness of control strategies. The REST API allows the development of external controllers programmed in languages such as Python, which provides flexibility and a rich choice of scientific libraries for designing control sequences. We present three test cases based on the U.S. Department of Energy's Reference Small Office Building to demonstrate the ACTB's capabilities: (a) rule-based controls compliant with ASHRAE Guideline 36 control sequences; (b) an economic model predictive control implemented using do-mpc; and (c) a deep Q-network reinforcement learning agent implemented using OpenAI Gym.
For several years now, smart building energy systems have been a research area of intensive activity. In light of the increasing need for sustainable buildings and energy systems, this trend motivates an increasing need for a solution to reduce carbon dioxide emissions and improve energy efficiency. This work proposes a high-performing and transferable occupancy detection framework that combines sensor data from different data modalities, including time series environmental data (temperature, humidity, and illuminance), image data, and acoustic energy data using ensemble method. To draw out the best prediction performance in each modality, the proposed framework was developed, including various models that were designed to learn the occupancy patterns reflected in the physical data streams. To tackle the time series environmental data, we designed two variants of an occupancy detection spatiotemporal pattern network (Occ-STPN) that performs both feature level and decision level fusion, respectively. We also propose a new metric; the fading memory mean square error (FMMSE), that provides a fair evaluation and penalization of delayed occupancy predictions. Multiple open-sourced datasets, including the Electricity Consumption and Occupancy and the University of California, Irvine's (UCI) building occupancy detection dataset, along with our own real data collected from six different houses, were used to validate the algorithms' performance. The experimental results presented herein break down the performance for each sensing modality, and a detailed analysis of the performance is also discussed.
A generation-to-load simulation estimated the impact, in terms of production costs and CO2 emissions, attributable to the joint optimization of electric power generation and flexible end uses to support increasing penetrations of renewable energy. Newly conceived, evaluated, and foundational in developing a U.S. National Standard was a transaction-less yet continuous demand response system based on a day-ahead optimum load shape (OLS) designed to encourage Internet-connected devices to autonomously and voluntarily explore options to favour lowest cost generators - without requiring two-way communications, personally identifiable information, or customer opt-in. Boundary conditions used for model calibration included historical weather, residential building stock construction attributes, home appliance and device empirical operating schedules, prototypical power distribution feeder models, thermal generator heat rates, startup and ramping constraints, and fuel costs. Results of an hourly-based annual case study of Texas indicate a 1/3 reduction in production costs and a 1/5 reduction in CO2 emissions are possible.
Abstract This paper describes development of a data acquisition system used to capture a range of occupancy related modalities from single-family residences, along with the dataset that was generated. The publicly available dataset includes: grayscale images at 32-by-32 pixels, captured every second; audio files, which have undergone processing to remove personally identifiable information; indoor environmental readings, captured every ten seconds; and ground truth binary occupancy status. The data acquisition system, coined the mobile human presence detection (HPDmobile) system, was deployed in six homes for a minimum duration of one month each, and captured all modalities from at least four different locations concurrently inside each home. The environmental modalities are available as captured, but to preserve the privacy and identity of the occupants, images were downsized and audio files went through a series of processing steps, as described in this paper. This dataset adds to a very small body of existing data, with applications to energy efficiency and indoor environmental quality.
Occupant behavior can significantly influence the operation and performance of buildings. Many occupant-centric key performance indicators (KPIs) rely on having accurate counts of the number of occupants in a building, which is very different to how occupancy information is currently collected in the majority of buildings today. To address this gap, the authors develop a standardized methodology for the calculation of percent space utilization for buildings, which is formulated with respect to two prevalent operational data schemas: the Brick Schema and Project Haystack. The methodology is scalable across different levels of spatial granularity and irrespective of sensor placement. Moreover, the methods are intended to make use of typical occupancy sensors that capture presence level occupancy and not counts of people. Since occupant-hours is a preferable metric to use in KPI calculations, a method to convert between percent space utilization and occupant-hours using the design occupancy for a space is also developed. The methodology is demonstrated on a small commercial office space in Boulder, Colorado using data collected between June 2018 and February 2019. A multiple linear regression is performed that shows strong evidence for a relationship between building energy consumption and percent space utilization.
Typical commercial construction inherently contains large surface areas of relatively thin mass located in the floor slabs. This research asks how effective this mass could be for passive cooling, relative to other mass depths, if it were to be exposed and used as thermal mass. Although much of the rich literature on thermal mass has been conducted with far greater mass depths, a more limited amount of research suggests that because the surface heat transfer rate is limited, the focus should be on the surface area of exposed mass, not its depth. This presents an opportunity for more buildings to behave more thermally massively, if the mass inherent in typical floor slabs contains utility, particularly over diurnal cycles. In all climates analyzed, it was found that there is a pronounced shoulder where energy savings from passive cooling of increasing mass depths was steep until roughly 7.5–10 cm, and beyond this point the achieved energy savings diminished rapidly. When considering the embodied energy of concrete, the incremental benefit of added mass beyond a typical topping slab of 10 cm does not justify the incremental embodied energy cost from a total energy standpoint alone.
Price-based demand response (PBDR) has recently been attributed great economic but also environmental potential. However, the determination of its short-term effects on carbon emissions requires the knowledge of marginal emission factors (MEFs), which compared to grid mix emission factors (XEFs), are cumbersome to calculate due to the complex characteristics of national electricity markets. This study, therefore, proposes two merit order-based methods to approximate hourly MEFs and applies them to readily available datasets from 20 European countries for the years 2017–2019. Based on the calculated electricity prices, standardized daily load shifts were simulated which indicated that carbon emissions increased for 8 of the 20 countries and by 2.1% on average. Thus, under specific circumstances, PBDR leads to carbon emissions increases, mainly due to the economic advantage fuel sources such as lignite and coal have in the merit order. MEF-based load shifts reduced the mean resulting carbon emissions by 35%, albeit with 56% lower monetary cost savings compared to price-based load shifts. Finally, by repeating the load shift simulations for different carbon price levels, the impact of the carbon price on the resulting carbon emissions was analyzed. The Spearman correlation coefficient between carbon intensity and marginal cost along the German merit order substantially increased with increasing carbon price. The coefficients were -0.13 for the 2019 carbon price of 24.9 €/t, 0 for 42.6 €/t, and 0.4 for 100.0 €/t. Therefore, with adequate carbon prices, PBDR can be an effective tool for both economical and environmental improvement.
Fully defined physics-based building energy models can accurately represent building systems; however, generating models based on high-level parameters is time consuming and simulation time of complex models can be slow. This article discusses the development of a Metamodelling Framework to create metamodels from a building energy modelling dataset. The framework generates metamodels using either linear regression, random forests, or support vector regressions. A fifth-generation district heating and cooling system analysis use case was used to motivate the development of the framework. The use case required quick and accurate representations of annual building loads reported hourly. Typical annual building modelling approaches can result in a runtime of 10 min. The metamodels runtime was reduced to less than 10 s to load and run an annual simulation with user-defined covariates. The results of the metamodel performance and an abbreviated topology analysis based on the motivating use case will be presented.
Occupancy-aware heating, ventilation, and air conditioning (HVAC) control offers the opportunity to reduce energy use without sacrificing thermal comfort. Residential HVAC systems often use manually-adjusted or constant setpoint temperatures, which heat and cool the house regardless of whether it is needed. By incorporating occupancy-awareness into HVAC control, heating and cooling can be used for only those time periods it is needed. Yet, bringing this technology to fruition is dependent on accurately predicting occupancy. Non-probabilistic prediction models offer an opportunity to use collected occupancy data to predict future occupancy profiles. Smart devices, such as a connected thermostat, which already include occupancy sensors, can be used to provide a continually growing collection of data that can then be harnessed for short-term occupancy prediction by compiling and creating a binary occupancy prediction. Real occupancy data from six homes located in Colorado is analyzed and investigated using this occupancy prediction model. Results show that non-probabilistic occupancy models in combination with occupancy sensors can be combined to provide a hybrid HVAC control with savings on average of 5.0% and without degradation of thermal comfort. Model predictive control provides further opportunities, with the ability to adjust the relative importance between thermal comfort and energy savings to achieve savings between 1% and 13.3% depending on the relative weighting between thermal comfort and energy savings. In all cases, occupancy prediction allows the opportunity for a more intelligent and optimized strategy to residential HVAC control.
District heating and cooling (DHC) is considered one of the most sustainable technologies to meet the heating and cooling demands of buildings in urban areas. The fifth-generation district heating and cooling (5GDHC) concept, often referred to as ambient loops, is a novel solution emerging in Europe and has become a widely discussed topic in current energy system research. 5GDHC systems operate at a temperature close to the ground and include electrically driven heat pumps and associated thermal energy storage in a building-sited energy transfer station (ETS) to satisfy user comfort. This work presents new strategies for improving the operation of these energy transfer stations by means of a model predictive control (MPC) method based on recurrent artificial neural networks. The results show that, under simple time-of-use utility rates, the advanced controller outperforms a rule-based controller for smart charging of the domestic hot water (DHW) thermal energy storage under specific boundary conditions. By exploiting the available thermal energy storage capacity, the MPC controller is capable of shifting up to 14% of the electricity consumption of the ETS from on-peak to off-peak hours. Therefore, the advanced control implemented in 5GDHC networks promotes coupling between the thermal and the electric sector, producing flexibility on the electric grid.
District energy systems have the potential to achieve deep energy savings by leveraging the density and diversity of loads in urban districts. However, planning and adoption of district thermal energy systems is hindered by the analytical burden and high infrastructure costs. It is hypothesized that network topology optimization would enable wider adoption of advanced (ambient temperature) district thermal energy systems, resulting in energy savings. In this study, energy modeling is used to compare the energy performance of “conventional” and “advanced” district thermal energy systems at the urban district level, and a partial exhaustive search is used to evaluate a heuristic for the topology optimization problem. For the prototypical district considered, advanced district thermal energy systems mated with low-exergy building heating and cooling systems achieved a source energy use intensity that was 49% lower than that of conventional systems. The minimal spanning tree heuristic was demonstrated to be effective for the network topology optimization problem in the context of a prototypical district, and contributes to mitigating the problem’s computational complexity. The work presented in this paper demonstrates the potential of advanced district thermal energy systems to achieve deep energy savings, and advances to addressing barriers to their adoption through topology optimization.
This paper evaluates the potential for automated lighting control as a resource for frequency regulation of the electric grid system in the context of current energy policies, economic incentives, and technological trends. The growing prevalence of renewable energy has increased the need for ancillary services to maintain grid frequency and stability. While demand side resources like heating, ventilating, and air-conditioning systems, as well as water treatment plants are already evaluated as regulation service providers, the potential application to electrical lighting systems has largely been ignored. Yet, aggregations of lighting systems that are retrofitted with intelligent controls could conceivably contribute to frequency regulation services with little impact on user comfort. To further explore the feasibility of lighting potential, this paper explores (1) how lighting control systems are limited by visual comfort perception and acceptability, (2) how such limitations impact the performance of the lighting system as an frequency regulation resource, and (3) how the market potential of lighting systems as demand side resources compares in different regional transmission organizations. Finally, the impact of developing technologies on the application of lighting systems for frequency regulation is discussed.