HVAC Design – Building a Machine Learning tool



  
Implementation of deep learning into building services design process is something that sounds quite ambitious and promising new technology. In fact, the introduction of data science and statistical methods into engineering problems, that till today where only approached with analytic calculation methods is not an easy task.
The investment of money, time and effort on such new process shall be followed with benefits that make the whole approach quite attractive. In order to have a hands on experience on how a neural network can be applied within a design task of HVAC design, I decided to model a very common and fundamental process.

‘The initial calculation of cooling and heating loads for a medium size building’.

So the task became:

How to create a tool (trained AI model), which can predict the cooling and heating load of a medium size building by just providing some inputs without any engineering calculations.

Also tried to create a workflow in order to establish an initial general framework for MEP Design – Deep learning applications. These steps are as below:

·             Selection and description of the searching output.
·             Selection of inputs (model features).
·             Collection of data.
·             Build of the neural network model.
·             Training of the model.
·             Evaluation of model results.
·             Use of the model for new predictions.

Let’s start diving into each step providing the ‘way of thinking’, criteria, sources of data and software used. I hope that at the end you will also have a good understanding of how the technology works and will give you food for thought about many other potential applications.

Step 01 - Selecting the model Output

This is about which design variable a deep learning prediction model is going to be trained. In our case the outputs selected to be the following:

·             The building total cooling load (CL – kWh/m2).
·             The building total heating load (HL - kWh/m2).

Any selected parameter shall be a measurable variable of a system which is critical for the design development. For example, the electrical system gives as output the total power capacity for normal or emergency loads. The domestic water system gives as output the booster pump flow and head. The sprinklers system will give the number of sprinkler heads.
All above are measurable design outputs that would be important to predict during the initial design stages based on inputs from the building size and usage.

Step 02 – Model input features

Input features are all the design parameters related to the output on linear and non-linear ways. They are unique measurable variables easily predictable during the early stages of a building design development.

For the prediction of heating / cooling loads, the inputs used are:

Feature number
Description
Unit
1
Building Relative Compactness
n/u
2
Surface Area
m2
3
Wall Area
m2
4
Roof Area
m2
5
Height
m
6
Orientation
n/u(1)
7
Glazing Area
n/u(2)
8
Glazing Area Distribution
n/u(3)
Table 1 – List of input features for each training set

(1)       2:North, 3:East, 4:South, 5:West
(2)       0%, 10%, 25%, 40% (of floor area)
(3)       1:Uniform, 2:North, 3:East, 4:South, 5:West
n/u – no units

I would like to clarify that the selected inputs did not come from a personal survey or data collection. They are the proposed input features from an existing publicly available dataset initially prepared by Athanasios Tsanas and Angeliki Xifara [1].

All inputs mainly describe the envelope of the building and its relation with the external environment, without considering any internal gains (people, equipment), usage or climate conditions (outdoor temperature, humidity).

Obviously these selected features are a great start to test the method and as long as in the future we add more parameters, the deep learning model is expected to behave even better. This is because once we will increase the non-linearity (complexity) of the system, the neural network creates more interconnected internal hidden features that will better predict the output. This is the magic of deep learning! The only disadvantage is that the new model has to be trained again.

Step 03 – Data Collection

Following the decision of which input parameters shall be selected to map through a function the predicted output, next step is what is called ‘dark side’ of deep learning. It is the data collection, a time consuming process that is also the core element of any machine learning algorithm.
The good news is that most engineering consulting firms have portfolios of hundreds of projects with tremendous amounts of data. The most critical is to decide what information you need for each application and build a team that will start the data mining process.
In my case as said before I used an existing data set from UCI Machine Learning repository [2]. The dataset comprises 768 training samples of 8 input features each (as shown in Table 1), aiming to predict two real value outputs, cooling load (CL) and heating (HL).

X1
X2
X3
X4
X5
X6
X7
X8
Y1
Y2
1
0.64
784
343
220.5
3.5
4
0.25
5
16.76
20.19
2
0.69
735
294
220.5
3.5
4
0.25
1
12.73
15.48
3
0.74
686
245
220.5
3.5
3
0.25
3
12.03
13.79
4
0.66
759.5
318.5
220.5
3.5
2
0.1
2
11.45
14.86
5
0.86
588
294
147
7
2
0.1
3
25.41
31.73
6
0.71
710.5
269.5
220.5
3.5
2
0.25
2
12.33
14.91
7
0.86
588
294
147
7
4
0.1
2
26.33
27.36
8
0.98
514.5
294
110.25
7
3
0.25
4
28.55
29.59
9
0.62
808.5
367.5
220.5
3.5
4
0.4
1
17.14
17.15
10
0.86
588
294
147
7
2
0.1
5
27.03
25.82










Table 2 – Sample rows of the dataset


Step 04 – Building the Neural Network model

The problem was modeled through a 3-layer neural network algorithm including 2 hidden layers, 64 nodes per hidden layer and 0.01 as the regularization parameter. The input layer contains 8 normalized input parameters (see Table-1), and the output layer 1 variable. Either the predicted cooling load or the heating load, depending on the case. Illustration of the neural network structure is shown in Fig.1 below.



Fig. 1 – Neural network structure


The dataset was splitted into 85% used for training with remaining 15% used for cross validation and testing. Data normalization, also known as feature scaling, implemented due the wide range of raw feature values. This normalization method transformed all input values to the range of {-1, 1}.

The algorithm code developed with Python (ver. 3.6) using Tensor Flow [3] and Keras [4] software. More details about the implementation, the code, the dataset and supplementary material can be found into my GitHub page by following the link below.

Step 05 – Training of the model

Using the configuration of the neural network described before the final step is to train the model. Training means that the algorithm goes through repetitive calculations, using the training data, in order to create a complicated non-linear function that maps the input data to the output values as accurately as possible.

Even-though the running of the algorithm takes only minutes, the process requires several rounds of optimization. In order to configure the neural network, different options for the number of layers and number of hidden units were tried. Metering tools like the number of epochs and the mean absolute error used to check the accuracy of the model and the limitation of over-fitting.

Step 06 – Results evaluation and new predictions

The evaluation of the model and the testing of its efficiency on new predictions was done using the test data. The results that came out by running the model with the test dataset were:

·             The model predicted cooling load values (Y2) compared to the test-data real values gave mean absolute error equal to 0.7058 [kWh/m2].

·             Also the same mean absolute error for the predicted heating load values (Y1) compared to the test data is 3.6958 [kWh/m2].

Both values above are acceptable limits of error for the initial assessment of the total cooling and heating load of a medium size building, without performing any engineering calculation. Potentially the model can be trained with more data and optimized further for much safer predictions.

The results above and the whole process of implementing a neural network for an HVAC design task gave me the confidence that the method is feasible and many engineering tasks can be automated and trusted through a machine learning algorithm. The day that most of work within the design phases will be automated with limited human involvement doesn’t seem to be far away.

Next step is to try develop similar applications for other engineering tasks and check them into real problems. I would be happy to receive proposals and recommendation. Let’s try to create a roadmap towards AI engineering design and build a new workflow for modern engineering consulting firms. I am keen to support any idea and effort.



References

[1] A. Tsanas, A. Xifara: "Accurate quantitative estimation of energy performance of residential buildings using statistical machine learning tools", Energy and Buildings, Vol. 49, pp. 560-567, 2012

[2] Data set from UCI Machine Learning repository (https://archive.ics.uci.edu/ml/datasets/Energy+efficiency)

[3] Tensor Flow, Open source machine learning framework  https://www.tensorflow.org/

[4] Keras, python deep learning library - https://keras.io/


I hope that you find this post interesting and educative.




  • If you did like it please share it through the social so that more people can have access to it.
  • If you have any questions or would like to discuss any special case, please leave your comments below. I will be happy to answer!

6 comments:

  1. Thanks for sharing this valuable information and we collected some information from this blog.

    Machine learning in-house Corporate training in Nigeria

    ReplyDelete
    Replies
    1. Thank you for reading. Happy to contribute into your research.

      Delete
  2. Very nice post. It is very interesting and informative. Thanks for the sharing most valuable post..
    MEP design in Chennai

    ReplyDelete
  3. Thank you Cozy for the efcient recommendation for HVAC, we are really happy about our decisions and we got a great deal onHVAC statistics

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. So it is interesting and very good written and see what they think about other people. phone answering for HVAC

    ReplyDelete

AI & Deep Learning in MEP - Buildings Services design

AI and deep learning - The new trend Progress of new digital technologies is something that all people experience e...

Powered by Blogger.