This is repository includes Python3 scripts for smart Building Automation system development during Smart City project. The Smart City project of Häme University of Applied Sciences focuses on promoting low-carbon developments through implementation of Artificial Intelligence. To learn more about the project, read popular and technical blog posts from HAMK Smart blog (in Finnish). The content of this repository is focused on forecasting district heating energy consumption and optimization of HVAC system controls.
The current branch 'main' includes scripts which include everything from data preprocessing to Particle Swarm Optimization of HVAC controls.
The branch 'scenario-testing' includes data and scripts for scenario testing modeling.
Both of those branches are needed to reproduce the results of the article.
Package dependencies are listed in requirements.txt, and suitable .gitignore file is included in the repository.
Install required python libraries by using requirements.txt
pip install -r requirements.txt
- data_example.csv: Exemplary data set. Includes data for multiple HVAC parameters in addition to weather variables. The whole data set has been downsampled to hourly temporal granularity.
- rnn.py: Class structure used to train RNN models. Can be used for modeling district heating energy consumption and average inside temperature. Includes methods for data preprocessing, training the model with hyperparameter optimization, calculating prediction intervals to quantify uncertainty and visualizing the predictions. Saving and loading methods use the current directory to save training checkpoints and class attributes, including scaling and models objects.
- optimization.py: Particle Swarm Optimization of HVAC controls. Algorithm finds the HVAC network controls for which the energy consumption is minimal with inside temperature still being inside acceptable range. Saves control values of each iteration to disk. Single objective implementation with non-linear penalties for temperature deviations is based on Pareto optimality based multi-objective optimization presented in Wei et al. (2015) article in Energy. This script is not functional at the moment as it has not been fitted to the class structure and main scripts.
- main.py: Main script for running the analysis. Methods of the class rnn are demonstrated for the user.
2021 Iivo Metsä-Eerola and Genrikh Ekkerman
Permissive Apache License 2.0
Metsä-Eerola, I.; Pulkkinen, J.; Niemitalo, O.; Koskela, O. On Hourly Forecasting Heating Energy Consumption of HVAC with Recurrent Neural Networks. Energies 2022, 15, 5084. https://doi.org/10.3390/en15145084