The world’s leading publication for data science, AI, and ML professionals.

BIM and Artificial Intelligence combined. Use case.

Relatively recently the AEC industry came across a new piece of technology called BIM. Building Information Modeling allows to build a…

Optimization of BIM model energy performance using Deep Neural Networks

Relatively recently the AEC (Architecture, Engineering, Construction) industry came across a new piece of technology called BIM. Building Information Modeling allows to erect a building virtually before the actual construction starts; this carries a lot of tangible and intangible benefits with it: reduction of cost overruns, more efficient coordination, empowered decision-making and so on. BIM adoption was a big hurdle to overcome for some firms, and many are still in struggle. But now we see another new trend emerge in the industry: Artificial Intelligence. Let’s not get scared and take a closer look at it. It is simpler than you might think!

In this article I will showcase my master thesis titled Optimization of BIM model energy performance using Deep Neural Networks.

Posing the problem

Many different estimations indicate that about 70–80% of all facility costs are operational.

Facility Cost Distribution. Image by Author
Facility Cost Distribution. Image by Author

These are also due to maintenance, of course; but remember that construction is sometimes called "industry of 40%" as it takes up to 40% share of world’s natural resources, CO2 emissions. We should take better care of nature!

I will try to propose a framework to optimize energy consumption of a building, which is referred to as EUI, or Energy Use Intensity, measured in MJ(or kWh)/m²/year. Energy analysis will be performed by Green Building Studio that uses DOE-2 engine and gbXML files exported from Revit.

Getting the data

First, we need to make some assumptions. Let’s keep HVAC system the same for every model I am about to test (i.e. a standard HVAC model for single family houses provided by Revit will be used for each Revit model). In fact, in real facility it can be replaced with more efficient fixtures and systems over time or we simply may not know the HVAC type that early.

Rather, let us focus on more permanent features of the building, like thermal conductivity (R,m²K/W) of Floor, Walls and Roof; Window to Wall ratio; Rotation in plan. These are the characteristics I will be playing around with.

Another assumption is that our Revit model will be a plain box with only one room in it, without partitions and windows (Window-to-wall ratio will be assigned later). This is to simplify the analysis.

First Revit Model. Image by Author
First Revit Model. Image by Author

So, let’s try out all combinations of the following range of parameters:

Design parameters. Image by Author
Design parameters. Image by Author

10368 combinations are too many, but Revit API will help. Green Building Studio works with gbXML files that Revit can export. This script applies combinations of Thermal resistance values and rotation in plan to the model and exports each combination model to gbXML format. Different Thermal resistance values were achieved by changing Thermal conductivity of Thermal assets. Changing thickness would introduce another factor in the analysis: analytical surfaces of always stay at the middle of an element, and hence total area changes with wall thickness.

After parsing the gbXML directory to get all files’ paths, we are ready to upload our 3456 (121212*2) gbXML files to Green Building Studio. using Dynamo package Energy Analysis for Dynamo.

Energy Analysis for Dynamo node. Image by Author
Energy Analysis for Dynamo node. Image by Author

When the analysis is done, we can start assigning Window-to-Wall ratios in Green Building Studio. Unfortunately, the Dynamo package does not have this functionality and GBS API is only available for developers, so I had to resort to browser automation to assign WWRs. However, this only has to be done once, and we will see later why. When the energy analysis is complete, we can parse GBS for the data and thoroughly inspect it.

Plotted with Plotly. Image by Author
Plotted with Plotly. Image by Author

Now, let’s repeat all above steps with another simple but different Revit model.

Second Revit model. Image by Author
Second Revit model. Image by Author

We will need the data for later use.

Training Neural Network

For every machine learning project the data inspection and preparation is a must. But in this instance we do not have missing data or outliers: our data is created artificially. So we can safely skip many of the inspection steps. I will devote another article to describe the neural network in grater details. If you are interested, here is the script. But long story short, Neural Networks, given lots of data, are able to derive rules that govern the data. Compare with traditional programming, where we give rules and data to get answers.

Image by Author. Inspired by DataLya
Image by Author. Inspired by DataLya

Neural nets come in handy when rules are hard to code: face or voice recognition, natural language processing, translation, sentiment analysis, etc.

The network I came up with has this architecture:

Original neural network. Image by Author
Original neural network. Image by Author

The input layer (green) has 5 units. These are our parameters: WWR, Rotation in plan and three Thermal Resistance values. In turn, output layer (yellow) is the EUI value. View this network (blue layers) as a huge matrix that contains at the first step only random numbers in it. To train the network, our input layer (vector) is multiplied by a series of matrices to get a prediction of EUI value. The prediction is then compared to the actual EUI value, and the numbers in the Network are updated to better predict the output. This cycle repeats until we are satisfied with the performance.

It is now time to train our network on data points from the first box model. 94% of it will be used to train our network, and 6% – to validate it and tune some parameters influencing in the network for better performance.

After training, we use the network to predict 10368 EUI values:

Network's prediction. Image by Author
Network’s prediction. Image by Author

Error stays within 0.2%, not bad. Apart from that, the network turned our data from discrete to continuous. In other words, we can now get EUI value for parameters that were not available before; e.g. 21% WWR or R=2.45.

Alright, this brings us to the next step.

Transfer Learning

Remember the second Revit model we did at the first step? We will use it now with technique called ‘Transfer Learning’. Let’s take the trained network from previous step and set first four layers as non-trainable:

Frozen network. Image by Author
Frozen network. Image by Author

Or, in other words, let’s focus on the two last layers only.

At this moment the network ‘knows’ the main patterns and trends and how each parameter affects EUI. But only for the first Revit model.

Let us now ‘introduce’ the new Revit model to our network by retraining the last two layers with the new data. But with important difference: this time only 6% of data is used for training, and 94% – for validation. Hyper-parameter tuning is not performed. We get this result after training:

Retrained network's prediction. Image by Author
Retrained network’s prediction. Image by Author

Note: time spent for training was about 1 or 2 minutes in contrast with 2–3 hours for the first box Revit model, and prediction is almost as accurate.

A little experiment

Why stick to 6% of the training-validation split? Let’s try out some more and see how well it does.

4% Training data. Image by Author
4% Training data. Image by Author
1% Training data. Image by Author
1% Training data. Image by Author
0.25% Training data. Image by Author
0.25% Training data. Image by Author

Turns out, performance starts degrading significantly at about 1–2% training-validation split.

Note that training was stopped after loss function hit plateau

Results and comparison

Congratulations! Now we have a trained network that can with a little amount of data predict energy consumption of a Revit model over large range of parameters. The model may not even have any windows. The last step we did showcases it: by introducing a few data points from the model we want to analyze, we get a pretty accurate estimation with little error.

To emphasize the transfer learning effect, let us take the network we just trained and predict EUI for both models.

One network - two Revit models prediction. Image by Author
One network – two Revit models prediction. Image by Author

This is to say that we can not take a random neural network and expect it to work with our model: a little bit of energy analysis should be done. However, it could be automated as it was in the first part.

Future Work

Now that we have a neural network that builds an accurate prediction of energy consumption, apart from testing it with a complex Revit model, a step towards actual Optimization must be done. To find the optimal combination of parameters, it is required to establish a cost model. The cost model should include cost of materials, labor, possible maintenance, energy and should account for building’s life-cycle, architectural and physical constraints.

This would result in realistic framework with little effort allowing to pick the optimal combination of parameters during conceptual stage of the project.

Thank you for reading this far!

I am always glad to have a discussion or receive feedback. Drop me a line on LinkedIn or e-mail: [email protected]


Related Articles