Predicting Design Performance With Analytical Tools
Neural Network for Predicting the Energy Performance of a Building
Estimation of Summer and Winter loads with Tensorflow and Colab
I spent years, during my master's studies in engineering, trying to model energy systems. In most cases, only the simplest problems can be modelled directly (analytical resolution of the governing differential equations of the system studied), for particularly simple and convenient geometries and boundary conditions. More complex problems are tackled using various mathematical/numerical or procedural techniques to simplify their nature so that reasonably accurate, albeit approximate, calculation models can be developed.
One of the most interesting a s pects of my recent experience with the integration of Deep Learning and engineering in the broadest sense (structural analysis, fluid dynamics, energy systems…) is the possibility of approaching the problems studied in completely different ways.
The abundance and complexity of data is no longer a problem, but an advantage, allowing more accurate and sophisticated forecasting models to be developed.
It is no longer necessarily necessary to simplify a problem to the bone until it is perfectly interpretable and analytically solvable. The reliability of the data, coupled with complex neural network models, can be sufficient to model the system with more than acceptable engineering and functional accuracy.
All this preamble is necessary to introduce the problem addressed in this article, i.e. the estimation of summer and winter heat loads of a building from a structured dataset. I have been confronted with this problem several times in my studies and my personal life. As is my practice, I have always dealt with the subject of estimating energy performance using the inevitable Excel spreadsheet and the relevant national legislation. This takes into account the sum of various contributions (direct and indirect solar load, ventilation, sensible and latent internal heat loads…) with an approach based on superposition of effects and one-dimensionality, generating a usual simplified approach to the problem. The interpretation of the standard, associated with its implementation, can be a far from trivial task, more for lack of clarity than for numerical difficulty of the calculation to be developed.
The possibility of revolutionising this approach by coupling the huge amount of data that can be generated with numerical simulations or installed home automation sensors may be an interesting point of reflection.
Why read this article?
In this story, we will see how to develop a sequential (fully connected) Dense neural network model for estimating the summer and winter heat load of a building from an open-source dataset, generated with Autodesk Ecotect. We'll evaluate the performance and the structure of our Network.
The Dataset
This analysis starts from the Energy efficiency Data Set, freely available. This energy analysis covers 12 buildings. Each simulation was carried out with the Ecotect. The edifices differ in terms of the glazing area, the glazing area distribution, the orientation… Various combinations of the above parameters were tested, starting with a total of 8 degrees of freedom, to obtain 768 building shapes. The dataset comprises 768 samples, 8 features and two real-valued responses (outputs/features).
The dataset comprises 8 attributes/features ( Xi ) and two responses/labels ( Yi ).
"The goal is to use the eight features to predict each of the two responses . Specifically:
- X1 Relative Compactness
- X2 Surface Area
- X3 Wall Area
- X4 Roof Area
- X5 Overall Height
- X6 Orientation
- X7 Glazing Area
- X8 Glazing Area Distribution
- Y1 Heating Load
- Y2 Cooling Load"
Ecotect
Autodesk Ecotect Analysis is an environmental analysis tool that enables designers to simulate building performance early in the conceptual design process. It combines analysis functions with an interactive visualisation that presents analytical results directly in the context of the building model.
The Dense Neural Network
For this analysis, I used a Dense neural network. I used 2 hidden layers (shallow network), with 256 neurons/layer and 'relu' as activation functions.
If you are interested in how I made this plot, I wrote an article about it. For this analysis, I choose the Keras Functional API for the generation of the Neural Network. You can find the source code here and the complete repository on GitHub and YouTube. I choose the Meas Squared Error as a loss function, monitoring also the Mean Absolute Error and the Mean Percentage Absolute Error during training. Finally, I use Adam as an adaptive learning rate optimizer, with no learning rate decay scheduling. Finally, the dataset has to be split into training and validation data. The data are normalized to facilitate the model training process.
Results
The Neural Network has been trained for 500 epochs, with a batch size of 128. We get a good trend of the training (blue line) and validation (orange line) loss.
To assess the performance of the model, it is advisable to make validation plots. These plots show the exact value of the labels in the abscissa, while the ordinate shows the value predicted by the neural network for the same set of inputs. For the heating load, we get the following trends:
From a quantitative point of view, the Mean Absolute Error, the Mean Squared Error, the Pearson Coefficient and the Coefficient of Determination were assessed.
Y0 - mae-train - 0.00474
Y0 - mse-train - 4.44430
Y0 - r2-train - 0.99940
Y0 - pearson-train - 0.99972
Y0 - mae-test - 0.00947
Y0 - mse-test - 0.00015
Y0 - r2-test - 0.99783
We can see that our algorithm achieves very high accuracy on both sets (for both the coefficient of determination and the Pearson coefficient the ideal condition is a value of 1). For the cooling load, we get the following trends:
From a quantitative point of view:
Y1 - mae-train - 0.00685
Y1 - mse-train - 8.63810
Y1 - r2-train - 0.99870
Y1 - pearson-train - 0.99951
Y1 - mae-test - 0.01739
Y1 - mse-test - 0.00058
Y1 - r2-test - 0.99042
Y1 - pearson-test - 0.99606
The results obtained continue to be very satisfactory, both numerically and qualitatively (trend). These results, although partial and deprived of the beneficial effects of possible optimisation and testing on further data never seen by the model, turned out to be promising and surprisingly accurate.
Conclusions
We tackled a complex engineering problem with the interesting combination of simulation software + Deep Learning algorithms, exploiting the potential of Python, Colab and Tensorflow. We developed a neural network model, trained on a structured dataset, for the prediction of thermal loads. We obtained very good results, suggesting the possibility of applying this approach to evaluate thermal performance also on new data, as well as to address this kind of engineering analysis.
Until next time,
Marco
3 Minutes Machine Learning
3-minutes machine learning is a series of tutorials, videos and articles related to the world of AI, Deep Learning, and Data Science. You can find the complete videos collection on YouTube. The GitHub repository contains all the Google Colab notebooks shown in the articles and videos. I hope these contents will be useful or simply of interest to you. Any feedback is welcome.
Check out the other episodes:
- Images Generation with Neural Style Transfer and Tensorflow
- Cats VS Dogs Convolutional Classifier
- Plot a TensorFlow Model with Keras Functional API
Predicting Design Performance With Analytical Tools
Source: https://towardsdatascience.com/neural-network-for-predicting-the-energy-performance-of-a-building-5c2bf5820ebe
Posted by: blanchardhologe.blogspot.com
0 Response to "Predicting Design Performance With Analytical Tools"
Post a Comment