Introduction
This example addresses a simple artificial intelligence problem in a high-performance computing environment: GPU calculations are performed to forecast the indoor temperature in an experimental building. However, a high-performance computing (HPC) environment offers capabilities that are not available on individual workstations: parametric studies, i.e., many computations can be launched and processed using arrays of HPC tasks running on multiple GPUs in parallel. Since most HPC clusters are equipped with workload managers (such as Slurm and Torque), the user does not need to think about the resource allocation, unlike with a personal computer. Since training neural networks (NN) may require the installation of many libraries such as CUDA, TensorFlow, etc., using Singularity containers can simplify the process of launching computations. This example shows how HPC can be used to accelerate the creation of a NN model for building climate forecast, how to use a container for GPU computations, visualize and compare the results of various NN models. The example is available for download from a public repository of NCC Latvia.
Problem background
Today, due to the increase in the number of people in cities and the development of infrastructure, the total number of buildings is also increasing. In turn, the energy efficiency of buildings can have a significant impact on both the economy and the climate. Based on [1], buildings account for 39% of total greenhouse gas emissions and consume about 40% of total global energy consumption [2].
As early as the last century, people began to optimize building performance using a variety of planning management techniques. However, much progress has been made recently and artificial intelligence (AI) is being integrated into building management tools that are able to independently assess building microclimate dynamics and other variables over time. One of the possible AI control algorithms is model-based predictive control [3]. The method is based on selecting the set of optimal control parameters of building systems according to the efficiency theory which uses the indoor climate forecasts for optimal parameter choose. Here one can see how the forecast of indoor climate conditions plays an important role, because the level of internal comfort and energy efficiency of buildings depends on its accuracy. For time series, forecasting several NN architectures such as LSTM, TCN, Dense could be used.
Running the case on an HPC cluster
The demonstration case is prepared as a public Git repository. It can be cloned and run using this link. Automatization of pre- and post-processing (for improving convenience for first-time users) is realized by Python and shell scripts.
For example, to start training one of the models, execute one of the following lines:bash RunConvTaskArray.sh # to start training TCN modelbash RunDenseTaskArray.sh # to start training Dense modelbash RunRNNTaskArray.sh # to start training LSTM model
In the beginning of each Model.py file ( DenseModel.py , ConvModel.py or RNNModel.py ), a user may change
- the length of input time,
- the length of predicted output,
- starting parameters which NN will use during training,
- parameters which must be predicted.
By default all models use all available data in the dataset and predict the temperature in the room.
For more information and for the detailed step-by-step instructions see this link.
The results and solution properties
One can see in the plot below that the recorded temperature in the room oscillates over time (input, blue line). This happens because the predefined PID (proportional–integral–derivative) coefficients in the thermostat do not adequately describe the current state of building, which in turn leads to incorrect operating parameters of the heat pump. Heat pump efficiency depends on the temperature difference between its cooling and heating units. Consequently, a timely reduction in heat pump energy output based on a forecast can reduce temperature oscillations which would reduce energy consumption. Damping the oscillations would also improve thermal comfort.
In the example below, the usage of the appropriately configured NN allowed to predict (orange line) the temperature at a probe point. It corresponds rather well to the actually measured data after 180 min; therefore, this information is useful for designing the feedback loop for heaters, without performing actual measurements. Different hyperparameter settings such as batch size, learning rate and Huber loss delta were tested to achieve better forecast quality, and the script to iterate over them is provided.

A note about the AI usage: the work has been done during EuroCC-2 project, long before the AIFA-LAT has been created.