Technical Article

Using AI in Building Automation Systems (BAS)

April 12, 2021 by Muhammad Asim Niazi

Genetic algorithms, artificial neural networks, fuzzy logic, decision trees, and particle swarm optimization can all be used in Building Automation Systems, but there are some data drawbacks.

Artificial intelligence (AI) in Building Automation Systems (BAS) is used to meet user expectations in a building without involving humans. Humans devise algorithms or analytics, point out data collection procedures, and create acceptance criteria for the AI integrated into the BAS. Then, AI is responsible for complying with the acceptance criteria by self-adapting to changing scenarios.

AI is a new paradigm of today’s world that has started dominating significant industries. Some examples include intelligent assistants, different prediction tools, manufacturing robots, and many more. AI has also found its way in BAS, where it manages all building operations functions.


Types of AI and ML

The type of AI in the BAS depends on the machine learning (ML) models used. AI and ML are sometimes confused and used interchangeably. 

AI is a smart system capable of performing tasks based on the inputs provided and the algorithm developed. ML represents a particular method adopted to make a system intelligent.

Common types of AI used in building automation include genetic algorithms, artificial neural networks (ANN), fuzzy logic, decision trees, and particle swarm optimization (PSO).


Genetic algorithm

The genetic algorithm application is a hybrid form, which means implementing additional AI algorithms to achieve full functionality. This algorithm is used in calculating a building's thermal load and predicts energy requirements depending on the required and estimated variables and their values.

In a genetic algorithm, independent variables, which are the inputs, are an environment's actual condition. They represent the requirement of a building (i.e., cooling or heating). The output, also called the dependent variable, is the central controller's signal for adjusting the required environmental conditions (dependent on the input variables).


Genetic algorithm

Figure 1. Flowchart of a typical genetic algorithm. Image used courtesy of MDPI


For example, residential loads use this technique for minimizing total energy costs, such as electricity costs and optimum input temperature set points in a dynamic pricing scheme. It does so by efficiently scheduling residential loads.


Artificial Neural Network (ANN)

In AI, the ANN uses nonlinear processes that do not follow any predetermined criteria. Instead, the processes are highly variable and change their curve and direction in response to evolving dependent variables. The ANN relies on the respective (input) variables' historical trends to calculate and predict the required output.


Artificial neural network

Figure 2. A neural network with multiple layers. Image used courtesy of Offnfopt [CC BY-SA 3.0]


When used in BAS, ANN forecasts energy consumption for a building. The amount of energy consumed depends upon the occupants and the environmental conditions. Thus, the occupant and the environments are nonlinear, as this parameter frequently changes depending on the ongoing (manufacturing) process requirements. 


Fuzzy logic

Fuzzy Logic is a mathematical model, where the output is not on or high and off or low, but output represents the “degree of truth.” Fuzzy Logic can be easily used with systems with uncertain problems and are difficult to predict, such as an HVAC system supplying dynamic conditions.

BAS predicts the building’s estimated load, depending on changes occurring in the target building’s environment.


Decision Trees

In this ML technique, the algorithm's outcome depends on the input parameters, and the input parameter continuously changes. The algorithm constantly evolves, and its progression represents a tree (nodes, branches, and leaf nodes). Decision trees depend on the properties and target result.

The decision tree model is used to prevent energy shortage by planning energy storage and planning efficient energy use. The energy management prevents blackout in case supply is disrupted from the source.


Particle Swarm Optimization (PSO)

PSO is designed and developed based on birds and fish's flocking behavior. This algorithm consists of a swarm of solutions. Each solution is attracted towards a particular location. The movement of the solution depends on the neighbor solution and itself.

In BAS, PSO is used in conjunction with other algorithms to perform energy estimate studies and predict energy demands.


Data Implications for AI and ML

Data is the main driver for AI in all fields and relies on data to execute the algorithm and adopt the appropriate ML method. In the absence of accurate data, the concept of AI becomes fruitless. The data handling capability differentiates the AI from the controller commonly found in a typical industrial environment.

In BAS, the data is characterized by the following properties.


Variable Data Sources

The data collection points are random, in which several sources remain variable and can change within seconds. This property of the data makes it necessary for the system to accept all kinds of data sources and predict when a birth is activated and does not interrupt existing data sources.

For example, due to the market's urgent requirement, the second area also starts consuming resources. In this case, the AI for BAS will also have to account for the second area's inputs after initially taking information from the first area. Now, the ML technique output will represent the combined inputs.


Unique Requirements 

BAS contains unique variables dependent on the application because BAS connects to different devices, and each device serves different regions. The requirements and acceptance criteria of all parts are unique to each other, so the data source and the relevant algorithm are also different from each other. 


Data Types

The BAS data is not a single type, but its type changes as the application area changes. However, the AI model remains the same for all data types, and the respective ML techniques also stay the same.

Different data types can affect the system in ways such as communication media changes with the data type. Additionally, conversion to the acceptable form, which is readable by the AI model, is also necessary. This makes it possible for the AI to integrate all the available practical scenarios in its decision-making stage. And as a result, the output reflects real-world solutions.


Data on Edge Computing

Edge computing is a concept dividing the connected sensors and systems into small subsystems. The subsystems can independently perform data-related functions without relying on the algorithm and then wait for the central location instructions (i.e., the Cloud). 


Edge computing

Figure 3. A diagram of how to use Edge computing in an industrial facility. Image used courtesy of IEEE


In Edge computing, the sub-systems are responsible for collecting data, processing, and implementing these instructions. 

Edge increases the response speed, avoids irrelevant storage and computation of outside sources, and reduces the communication media load. It also helps to solve the restricted Bandwidth problem, which is enormous in centralized computation.


Edge in the Building Automation System (BAS)

Data collection and processing in BAS are extensive because the BAS requires data from many devices spread across a vast area, such as temperature sensors and fire detection systems. These devices generate a large quantity of data. If this data is processed and applied to the central computation technique, it results in wasted resources.

The processes in each area are different; as a result, area-specific requirements differ from other regions. 

BAS, areas, or departments can be grouped into individual subsystems, depending on the operational processes. Edge computation can then collect data, develop site-specific algorithms, and implement the developed algorithm for different subsystems. It also enables the individual subsystems to connect and support other subsystems. All this results in enhanced performance with less load on available resources.