3 reasons why controlling buildings is so hard, and how AI can help - Part 2
The first part of this article discussed the main reasons why controlling buildings is so hard. To summarise them, buildings are influenced by stochastic processes that we are not always able to predict, require extensive measuring systems (that we lack) and have a control problem exploding with time horizon.
To understand how AI can help, the starting point is understanding what AI is though. AI combines methods and ideas from diverse areas, including computer science, neuroscience, economics, information theory, statistics, psychology, control theory, and optimisation. Its definition is tricky, as it intersects so many disciplines, leading to a variety of interpretations and understandings. However, one effective and widely accepted definition is the one provided by Russell and Norvig1.
The term artificial intelligence refers to the study and design of intelligent agents, that are defined as "anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators"
In its broadest definition, artificial intelligence encompasses any technique that allows an agent to take a decision (mimicking intelligence). This can be as simple as an explicit if-else rule2 to predict a certain quantity, or as complicated as deep reinforcement learning agents using deep neural networks to select an action.
Now that we've defined AI, let's delve into how it can help. As we mentioned earlier, artificial intelligence lets an agent make a decision. However, this doesn't always mean it's directly about control. Instead, these decisions can be grouped into three main goals:
Observation and prediction are two pivotal processes that enable an agent to effectively sense and respond to its environment, both in the present and future time steps. The agent's observational capabilities allow it to assess the current state, taking into account both internal and external variables that could impact the environment immediately. This extensive evaluation helps in making informed decisions within the same time step, leveraging a broad spectrum of data beyond mere measurements.
Predictive mechanisms, on the other hand, extend the agent's foresight into future states. By analysing how present variables might evolve, the agent can strategise its future actions. This foresight is crucial for planning and executing decisions that will be relevant in subsequent time frames.
Now that we discussed different ways of using AI, let’s see how they relate to the three main actors that characterise the control problem (exogenous information, environment and control policy). These concepts interact in the so called closed-loop control, made up of different “building blocks” introduced in the first part of the article.3
Exogenous information
AI models excel at making predictions based on historical data and current conditions. Especially when a system is too complex to properly model and simulate, such as weather conditions, or the electrical market, whose influencing variable are not always observable, AI can play a fundamental role. Furthermore, AI can also be used to predict occupancy schedules in buildings, that might be influenced by complex stochastic phenomena. Advanced AI techniques, including probabilistic modelling and uncertainty quantification, can be applied to provide control systems with a more realistic understanding of potential variations and deviations from predictions, increasing the efficiency of the control policy.
Weather Prediction
AI models, particularly deep learning networks, can help with predicting weather conditions, or performing downscaling of weather models, studying the weather evolution for a smaller area (where the building is located). Also, this information is crucial for buildings with renewable energy sources like solar panels. AI's predictive models for solar irradiance and cloud coverage enable buildings to optimise energy distribution, storage, and grid dependency, maximising the utilisation of renewable energy.
Electricity Price Forecasting
In the context of electricity price forecasting, the volatile nature of the energy market, influenced by demand-supply dynamics, fuel prices, and unexpected grid disruptions, presents a substantial challenge. AI addresses this by analysing historical price patterns and current grid conditions, enabling load shifting strategies. With this information, buildings can store energy during low-cost periods and use it during high-cost periods, reducing electricity expenses. This is especially important for large commercial or industrial facilities with high energy demands.
Occupancy Schedule Prediction
AI can predict building occupancy schedule4 by analysing historical usage patterns, or external events. This information is vital for energy management systems to optimise heating, ventilation, and air conditioning (HVAC) operations, thereby enhancing comfort while minimising energy consumption and operational costs.
Incorporating AI predictions into building control systems for weather, price, and occupancy schedule prediction is an investment that pays dividends in terms of energy efficiency, cost reduction, and occupant satisfaction. These predictive capabilities enable buildings to adapt to dynamic external factors, providing a more sustainable and comfortable environment while optimising operational costs.
Environment
In the building environment, AI transforms occupancy detection, leveraging diverse data sources for real-time occupancy insights. It also plays a crucial role in crafting 'virtual sensors’. These virtual sensors are algorithms that extrapolate and enrich our understanding of the environment by inferring unmeasured variables. This represents the first step towards digital twins, that arise from virtual sensors to enhance the system's awareness by predicting future states from the available sensor inputs.
Occupancy Detection/Prediction
AI can be a powerful tool to solve one of the biggest challenge in controlling buildings, occupancy detection. Indeed, by fusing data from diverse sources, including video, CO2 sensors, and wireless technologies, AI can provide real-time and granular information about occupancy, allowing adjustments to building operations. Furthermore, AI models can be used to enable future occupancy forecasting, governed by stochastic mechanisms. This multimodal approach allows for dynamic adjustments to building systems, enabling buildings to adapt to occupancy patterns for energy savings and enhanced comfort.
Digital Twins
AI can aid in the development and management of digital twins for buildings. By leveraging machine learning algorithms, AI can streamline the process of creating and maintaining these virtual replicas, using surrogate models. This can significantly reduce the time and cost involved in customising digital twins for individual buildings, making them more accessible and practical for a broader range of applications. AI-driven system modelling employs a range of techniques from simple regression to complex neural networks to simulate building dynamics. These models can predict thermal behaviour, lighting needs, equipment performance and electricity consumption, leading to more efficient building management.
The classical approaches to modelling can be summarised as follows:
White Box Model: Purely based on physics and independent of data, these are crafted from fundamental principles. For instance, in building thermal dynamics, they involve equations for heat transfer, material properties, and environmental interactions.
Grey Box Model: A fusion of physical laws and statistical methods, these models apply established physics where possible, supplemented by empirical data in areas less clear or too complex for precise modeling.
Physics-Informed Neural Networks5 Model: These models represent a class of deep neural networks that incorporate physical principles directly into their structure. Their goal is to optimise the adherence to data and physical laws, ensuring that the model's predictions are consistent with governing equations.
Black Box Model: Directly driven by data, these models infer patterns and relationships purely from data, typically using machine learning techniques, focusing on accuracy rather than interpretability.
The last two approaches represent the most used applications of AI in system modelling, and they are often applied to thermal modelling and building load forecasting, which are essential for informing control policies. This facilitates the optimal distribution of energy resources, crucial for sustaining comfort levels while optimising energy costs.
Control policy
Lastly, AI can be involved in different phase of the control process, from optimizing the design of traditional controllers or the use of AI-based controllers, to the combinations of traditional and AI based controllers to guarantee safety constraints.
Parameter Optimisation: Here, AI utilises historical and real-time data to predict system behaviour, optimising the controller parameters in a static way, or enabling their adaptive tuning. This ensures the controller operates at peak efficiency by continuously refining its parameters based on the predictive insights generated by the AI (policy search).
Controller Design: AI can facilitate the creation of dynamic control policies that adjust in real-time based on evolving conditions. Specifically, building research has seen a remarkable surge on Model Predictive Control (MPC)6 and Reinforcement Learning (RL)7 approaches. These studies have highlighted the substantial benefits of employing lookahead policies for enhanced control and optimisation (lookahead policies).
Fallback Control: In this scenario, the AI controller and the traditional controller are connected, implementing a fallback strategy as a safety mechanism, deactivating the AI controller when certain predefined thresholds are exceeded. This ensures that in critical situations, where AI performance may be uncertain, the system reverts to a fail-safe mode, maintaining the integrity and stability of the overall control system.
Symbiotic Control: In this setup, a traditional controller initially determines the control values, and the AI-based controller then refines these values within specified limits. This fine-tuning process involves adjusting the control values by a defined offset, allowing the AI to enhance performance without deviating from a safe operational range.
What now?
In conclusion, controlling buildings is a challenging task due to the complex interplay of state variables, decision variables, exogenous information, transition functions, and objective functions. The complexity of the problem though is mirrored by the diversity of AI applications, that the building industry is starting to exploit by introducing AI in energy management and information systems, which enhance and integrate the functionalities of traditional building automation systems to analyse and control building energy use and system performance. The next series of articles will deal with the previous applications, showcasing the benefits of using AI in different aspects of building management, starting from their scalability.
I know, if we consider “if-else” AI everything is AI. The real question should not be if it is AI or not, but rather, which kind of AI is. For a basic introduction to intelligent agent classifications refer to this.
A great article on “AI for Closed-Loop Control Systems”
In this context, occupancy schedule prediction defines the forecasts of regular, long-term patterns of building usage, while occupancy prediction focuses on real-time or near-future presence of people in a space.
Despite PINNs are neural networks, it is worth separate them from black-box models, as unlike black box models that rely solely on data, PINNs incorporate physical laws into their structure, thus significantly reducing extrapolation errors.