Provision of Data to Use in Artificial Intelligence Algorithms for Single Room Heating

This paper describes a way to generate a great amount of data and to use it to find a relation between a room controller and a certain room. Therefore, simulation scenarios are defined and developed that contain different room, location, usage and controller models. With parameter variation and optimization of the corresponding controller parameters a data basis is created with about 5300 entries. On the basis of this data, machine learning algorithms like artificial neural networks can be used to investigate the relation between rooms and their best suited controllers.


Introduction
The goal of the community of states is to limit global warming to under 2 • C. Therefore, in Germany the Energiewende (energy transition) was brought to life which aims to increase the amount of renewable energy, decrease the electric power consumption and the primary energy consumption. Since the biggest consumption of final energy is caused by buildings [1], the goal of Germany is to reach a nearly climate neutral building entity. The biggest part of energy usage within buildings is used for room heating. Therefore, room control is essential to decrease the use of energy. Room controllers can be classified into three categories, classical controllers, self-adapting controllers and specialized controllers. This paper focuses on the classical controllers, for example, proportional-, proportionalintegral-or proportional-integral-derivative (P-, PI-or PID) or two-point controllers since they are very well known and therefore mostly used in the private sector as well as in the industrial sector in buildings [2]. Unfortunately, it is often unknown which controller is the optimal one for the room. This depends on, among others, the geometry of the room, its wall mounting, the size and orientation of its windows, its technical equipment, its heating facility, its position including weather and its usage. To quantify this relation between a room and its optimal controller one possibility is to use artificial neural networks (ANNs). The drawback of those ANNs is, that they need a great amount of data. The goal of this work is to show a possible way to generate such a large amount of data to determine the relation of a room and its optimal controller by using modelling and variant simulation. Based on four room models that are modeled with the BuildingSystems library in Modelica, the tool GridWorker is used to vary room parameters and at the same time to optimize the controller parameters according to the varied room models. With the generated data, an ANN can be trained that provides a suitable controller and its parameters for a certain room. The contribution of the work is that the choice of single room controllers and their parameters can be much more simplified in comparison to the state-of-the-art practice which is either trial and error or creating models of the rooms and controllers which is very expensive.

Related Work
The aim of this paper is to show a possible way to generate a sufficient amount of data to use it for artificial intelligence algorithms to determine a suitable controller for a concrete room.
There is a wide variety of scientific publications in the field of room control. The majority investigate the regulation of so-called HVAC systems (heating, ventilation, air conditioning). In addition, other systems such as shading and lighting devices are included in the control [2]. Because of their ease of use, their low cost and years of tried and tested use functionality, are the classic controllers, in other words, two-point controllers, P-, PI and PID controllers, are the most widely used for individual room control [2]. In [3], for example, the temperature and humidity of an individual room are controlled by means of a PID controller sending control signals to the supply air flap and the humidifier of a ventilation device. In [4], the room temperature is also maintained using a PID controller, whose parameters are determined by means of Bayesian optimization [5] without user intervention. Furthermore, in [6], a PID controller for regulating room temperature with an air conditioning system is implemented by a microcontroller.
The work in the field of room control shows that classic controllers are still widely used. For this reason, how their parameters can be selected automatically it is most often investigated. What the methods for parameter selection cannot do is to decide, for the system to be controlled, which controller would be the most advantageous. The controller must therefore be determined before these methods can be used.
One possibility would be to train an ANN so that it is able to predict the best controller for a given room without having room or controller models available. This would be less expensive on the one hand, but on the other hand more accurate than just picking a controller and its parameters by feel or experience.

Experimental Environment
The drawback of using an ANN is, that it is based on a great number of examples. Hence the optimal controllers for a big number of example rooms including their usage and their locations must be determined. This could be done by means of existing rooms. However, this approach would be difficult since in one particular time period only information about one controller would be available. So, a comparison between different controllers under equal conditions would not be possible. Besides that, the investigations would take a long time since the investigation periods should at least include several days. For these reasons, suitable room controllers are determined via simulation. In this way, all required data, that are necessary to examine the relation between rooms and their controllers, can be obtained. Especially the locations and the usage of the rooms are specified. To reach the goal of this paper, the following steps were carried out:

•
Modeling of four basic simulation scenarios containing rooms, their usage and location • Parameter optimization of controller models according to the room models • Evaluation of the controller's suitability • Increasing the amount of data by parameter variation • Parameter optimization of controller models for the increased amount of data

Simulation Scenarios
Simulation scenarios are defined to create the necessary data for the data basis. A simulation scenario is the overall configuration of room models, models of power engineering systems as well as models of the location and the usage of the rooms. The modeling is done with the object-oriented modeling language Modelica [7] which is suitable for the description of complex heterogeneous physical systems in form of algebraic, discrete and ordinary differential equations. A simulation scenario is a completely described simulation model that contains the following submodels: • Room and heating system model Different simulation scenarios differ in the specific design of their submodels. Figure 1 shows the submodels of a simulation scenario and their interrelationships as a block diagram. The individual submodels exchange data with each other. The room model gets the height-dependent outside temperature as well as the outside air humidity from the location model. Furthermore, for each zone-surface in contact with the outside air, parameters for the amount of direct and diffuse solar radiation, the angle of direct solar radiation and the degree of shadowing is provided by the location model. Moreover, for each zone that is connected to the outside, both the outside temperature and the wind speed are given. The lighting model provides the amount of heat that is caused by artificial lighting to the room model. The user model gives the user profile as well as the number of people inside the room to the room model. The controller model gets its necessary temperature setpoints from the user model. From that information, and additionally from the room temperature, the controller model calculates the operating times and the operating intensity of the heating system. Finally, the necessary air exchange rate is calculated. The submodels of a simulation scenario are described in more detail in the following.

Room and Heating Models
Four different room models are provided that vary in their size, in the physical properties of their boundaries, in their orientation with regard to their compass direction and in the nature of their heating systems: • a single room that is freestanding with a radiator heating system • an office room with a floor heating system • a meeting room with a radiator heating system • a classroom with a radiator heating system The room models are based on the model template Building1Zone1DBox which is part of the BuildingSystems Modelica library [8]. This template describes a cuboid thermal building zone which is enclosed by six opaque surfaces (representing walls, floor and ceiling). Inside the template, a simple energy balance for dry air is calculated. Additionally, the possibility to specify convective heat sources that are part of the room is given. The insufflation inside the air model is assumed to be ideal which means that the temperature at each point in the thermal zone is identical. The insulation of the room model is considered by specifying the walls construction within the zone model. The used zone model within the template Building1Zone1DBox serves the definition of the zone geometry and provides the interfaces to the room air model, the zone enclosure surfaces and the surrounding climate model. The wall model defines the geometric shape and the dimensions (length, width, thickness) of the six opaque surfaces. Furthermore, the structure of the walls is specified here by declaration of the parameters λ-thermal conductivity, c-specific heat capacity and d-density for each layer involved in the wall construction. Furthermore, the specification of windows within the walls is possible in the template Building1Zone1DBox. If a window is specified, it is possible to give the information if the window should be shaded, and also the degree of the shading.
In addition to the parameters mentioned, which specify the actual thermal zone, information about the boundary conditions of the zone is necessary. So, for each surface, if its external conditions are given by a weather model, if they are adiabatic or if a constant outside temperature is indicated, it is specified. To simulate the thermal zone, a weather model is used in this work. The weather model is also part of the BuildingSystems library and provides a multitude of weather data files. The weather model supplies the outside air temperature, the outside humidity, the direct and diffuse solar radiation as well as the windspeed and -direction.
In the following, the four room models that are based on the template Building1Zone1DBox are described in more detail. Since all of the room models use the same model of a thermal zone (BuildingSystems.Buildings.BuildingTemplates.Building1Zone1DBox), the models were named after their usage to distinguish between them.
Single Freestanding Room (BuildingSystems.Buildings.BuildingTemplates.Building1Zone1DBox) The single freestanding room contains one thermal zone that is surrounded by six surfaces. All of them, except for the floor are connected to the outside which means they are exposed to environmental conditions. Figure 2 shows a graphical representation of the single freestanding room. The office room is also modelled as a single thermal zone using the template Build-ing1Zone1DBox. The model is built after an existing single person office room that is shown in Figure 3. The model of the office room has a rectangular floor space of 15.5 m 2 . The room is part of an office building and has one surface that adjoins environmental conditions. This surface is orientated to the west and contains a window of 2 m wide and the 2.1 m high. The model of the office room is heated by a floor heating system that is modelled with the model SingleCircuitSlab from the Modelica Building library [9].
Meeting Room (BuildingSystems.Buildings.BuildingTemplates.Building1Zone1DBox) The meeting room was modeled according to an existing meeting room which is shown in Figure 4  The classroom was modeled according to the example of a real existing classroom that is shown in Figure 5.

Location model
The room models are simulated for different locations. Therefore, the BuildingSystem library provides a large number of location models that can be chosen by the user via a drop-down menu within the weather model of the BuildingSystems library. The underlying data sets of the location models come from test reference years, from the climate database Meteonorm for big metropolises as well as for the German town Potsdam from the German Weather Service [10]. The location models of the BuildingSystems library contain the following weather information: Within this study the location models for the German town Chemnitz and for Helsinki and Moscow were used. From the location models only, the outside air temperature and the solar radiation signals are used.

Usage Models
For each scenario a usage profile for the room is defined and provided to the simulation model as a time signal. Necessary occupancy information is delivered in the form of a text file and the following information is collected in a table:

Lighting Model
The amount of heat that is given to the room model via artificial lighting is calculated in a lighting model. The calculation is simplified and based on the illuminance maintenance valueÉ m , which is the value below which the illuminance level must not fall in the visual area. In [11], normÉ m is given for a large number of room types. Multiplying the illuminance maintenance value with the floor area A G of the room in question, gives the luminous flux Φ v (Equation (1)). Φ Under the assumption of an LED-lighting which has for Φ vLED = 300 lma power per square meter of P LED = 6.5 W m 2 the total power per square meter P ges , which is necessary to ensure the requested luminous flux Φ v , is calculated by Equation (2).
This is calculated on the assumption that 70% of the total power is converted into heat and that about 10% of the artificial light leaves the room, the amount of heat Q f low that flows into the room is (Equation (3)) This amount of heat is given to the room in equal parts as radiation and convection.

Air Exchange Rate
The minimum air exchange rate, n min , to ensure healthy room air is calculated by the product of the minimum outside air requirement per person,V minP , and the reciprocal room volume, V Room , (Equation (4)).
The minimum amount of fresh air is estimated at a certain CO 2 concentration of the outside air and a certain degree of the user's activity. A common value for the amount of fresh air is 15 L/h for an outside CO 2 concentration of 400 ppm [12]. In the absence of persons, the minimum air exchange rate is set to 0.1 L/h.

Controller Models
Three controller models were chosen exemplarily. On the one hand, a two-point and a P controller were chosen since they represent classical controllers that are widely used and commonly found in practical usage; on the other hand, a more advanced controller, in the following called predictive controller. The behavior of two-point and P controllers are well known and can be studied in the literature [13] if necessary.
The model of the predictive controller considers the knowledge about heating up and cooling down time periods of the room. If the heating system inside a room is turned on, the room heats up until a certain target temperature, T target . This period of time has a certain duration that depends on the room itself, on the heating system and on the temperatures surrounding the room. The same applies to switching off the heating system and hence cooling down the room. This knowledge about the durations for heating up and cooling down the room is used by the predictive controller to determine the points in time for turning the heating system on and off in order to achieve a certain room temperature. Details about the functioning of the predictive controller can be found in [14].

Combining the Models to Scenarios
Furthermore, 24 simulation scenarios were developed. They result from the combination of the four room and three controller models as well as two usage profiles per room. Since an active change of the room temperature can only be done via the heating facility in the room, most of the scenarios are appropriately placed in the heating period of a year. Furthermore, weather models from the temperate climate zone were chosen like Chemnitz in Germany, Helsinki and Moscow. In order to still have data for the entire year, the survey also examines scenarios with simulation periods in summer. The choice of the duration of occupancy and the number of people during an occupancy is based on the purpose of the rooms and their use. Occupancy phases with different numbers of people, that are inside a room for different length of time are chosen. This is necessary to ensure a wide validity of the research results. The amount of heat emitted by people, given to the room as radiation and by convection, is estimated in each scenario. The necessary heat exchange rate in specified in each scenario. The validation of the scenarios against real measurements would be the next meaningful thing to do. Since the room models are based on a well-tested and validated thermal zone model that is part of the BuildingSystems library, those scenario validations have not been done yet. Nevertheless, at least the single freestanding room was tested against measurements in a rudimentary way. Therefore, the heating system was turned off and the period of time for the test was chosen from 1st to 14th of November 2014. It was assumed that no person was in the room. The outside temperature was measured with a mobile weather station and given as input to the model as a time dependent signal. Furthermore, the inside temperature of the single freestanding room was measured (red signal in Figure 7) and compared to the simulated room temperature (blue dashed signal Figure 7). The simulated room temperature does not exactly match the measured, but the trend is sufficient. From the 24 scenarios, 24 data sets are deduced that contain information about the suitability of a room and its room controller for controlling the heating facility. The goal is to describe the correlation of rooms and their suitable controllers via a mathematical description. Therefore, an artificial neural network shall be used. In order to do so, the number of datasets in the data basis has to be enlarged massively. How this is done via parameter variation of the existing 24 scenarios is described in the following section.

Increasing the Data Basis
The data basis is increased by changing parameters of the room models and optimizing the room controller parameters in order to gain knowledge about which controller is the best for a certain room. The following parameters are varied: U-value of the windows, U, in W m 2 K in the range of (0.5:0.1:7.0) Accordingly, for the room length, 15 parameter values, for the room height 21, the width of the windows 36, the g-value eleven and the U-value 66 parameter values are specified. Therefore 149 new room models arise per scenario which leads to an total of 1192 room models. In addition to the room models, the weather models are also varied. In addition to the location Chemnitz which was used thus far, Helsinki and Moscow are chosen. For Helsinki, the room length and width of the windows are varied which leads to 408 room models. For Moscow, the room height was varied and leads to 168 new room models. Therefore 1769 room models are available for which the controller parameters of the three controller models two-point controller, P-controller and predictive controller have to be optimized. So about 5300 optimizations have to be carried out (Figure 8). Due to the large number of optimizations, it is necessary to automate their execution. This means that the room parameters have to be varied automatically according to the fixed rules and that the optimization of the controller parameters starts automatically after each parameter variation. The optimized controller parameters must then automatically be saved and summarized in a result file (Figure 9). Due to the large amount of data, parallel and therefore time-saving processing should be done in the cloud. Therefore, the tool GridWorker [15], which was developed by the Fraunhofer Institute for Integrated Circuits IIS EAS is used. GridWorker is developed for information processing in the cloud. It enables its users to carry out their simulations, optimizations and analysis tasks on available backend resources like cluster-, grid-or cloudcomputers. [15] describes the architecture, the functionality and the use of GridWorker. GridWorker provides the user with different optimization algorithms like Nelder-Mead simplex (NM), simulated annealing (SA), Feasible Sequential Quadratic Programming (FSQP), Broyden-Fletcher-Goldfarb-Shanno (BFGS), conjugate gradient (CG) and Powell [16]. In order to use them, a cost function cost that needs to be minimized was defined (Equation (5)), where E heat specifies the amount of energy that is used for heating the room, T warm is the duration and the amount of the room temperature being too warm compared to a given setpoint and T cold is the duration and the amount of the room temperature being too cold compared to a given setpoint. To choose a suitable optimization algorithm tests on some example models where done. The value of the cost function and the number of iterations was compared. Table 1 shows the results of one example for the office room that is controlled via a two-point controller. The controller parameter T tol which is the width of the controller's hysteresis is the parameter that needs to be found by the optimization algorithm. It can be seen that the Powell algorithm leads to the smallest value for the cost function but needs comparatively many iterations and therefore longer optimization time.

Results and Discussion
The modeling, simulation and optimization described in Section 3 lead to a data basis with about 5300 entries. Each entry contains the optimized controller parameters for one of the three controllers, two-point, P or predictive controller, for a certain room model. For each data point, which optimized controller is the best for the certain room due to an evaluation parameter that describes the controller's suitability is known. Figure 10 shows the optimal values of the parameter T_tol of the two-point controller. T_tol takes values from 0.5 (which occur most) to 2.5. Figure 11 shows the optimal values for the parameter k of the p-controller. Figures 12 and 13 show the optimal values for the controller parameters p1 and p2 for the predictive controller.
This data shall now be used to find a relation between the rooms and their optimal controllers with the help of machine learning algorithms like artificial neural networks. The goal is to determine the best suited controller for an unknown room by exploiting this relation. If this is successful, suitable controllers could be determined quickly and without the expensive steps of modeling and simulation.

Conclusions
In this paper the idea is followed that an ANN could be used to predict an optimal controller and its parameters for a certain room instead of choosing it simply from experience or creating expensive models. The latter are both state of the art. The drawback of an ANN is that it needs a big amount of data. The creation of such a dataset is addressed by this work. Based on simulations of room and controller models and optimization of the controller parameters, a great amount of data was produced that can be used to train the ANN.
Author Contributions: Conceptualization, K.M.; formal analysis, K.M. and C.C.; methodology, K.M.; supervision, C.C. and C.N.-G. All authors have read and agreed to the published version of the manuscript.
Funding: This research was funded by Fraunhofer-Gesellschaft.
Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to unpublished results of PhD thesis.

Conflicts of Interest:
The authors declare no conflict of interest.