Using Artificial Neural Networks for Indoor Climate Control in the Field of Preventive Conservation

. In the field of preventive conservation, a main goal is the conservation of cultural heritage by establishing an appropriate indoor climate. Especially in applications with limited possibilities for the usage of HVAC systems, an optimization of the control strategy is needed. Because the changes in temperature and humidity are slow, the usage of predictive controller can be beneficial. Due to the availability of already gathered data, data driven models like artificial neural networks (ANN) are suitable as model. In this paper four different approaches for optimizing the control strategy regarding the requirements of preventive conservation are presented. The first approach is the modelling of the indoor climate of a building using an ANN. As further improvement and second application the adaption of a weather forecast to a local forecast is shown. Since the building stock has the biggest influence on the linkage between outdoor and indoor climate next to the air change rates, an ANN model for a building ’ s wall represents the third application. Finally, the potential for reducing the need for computational power by using an ANN instead of a non-linear optimization for the predictive controller is presented.


Introduction
The protection of objects of cultural heritage for future generations is the main goal of the preventive conservation, whereby the methods can be classified in the fields of restauration and conservation. In the field of conservation, methods for reducing or eliminating chemical, physical or biological damage are investigated. These types of damages are often caused by unfavourable states of the surrounding air temperature and humidity. Therefore, the control of temperature and humidity, summarized as indoor climate, is an important task of preventive conservation (see [1]). Assuming only minor changes in air pressure, the humidity in materials and air can be assumed as linear to each other, so just the changes in relative and not absolute humidity should be considered. The possibility to control the indoor climate depends on the case of application, respectively on the building stock and available HVAC systems (see [2]). The most limited scenarios are often found in historical buildings, where the building stock itself represents the cultural heritage and therefore shall not be altered. In order to effectively control the indoor climate in such an application, a simple control strategy only using the current climate states is often not adequate. Furthermore, rapid fluctuations of the temperature and humidity should be avoided (see [3]). Therefore, a planning strategy (predicting) for the implemented controller seems to be useful. In order to implement a predictive controller, a model of the application (e.g. building) is needed. For a correct modelling of the climate behaviour (e.g. for the use in a modelling software), often expert knowledge is required. In addition, tests for materials or factors like air change rates or isolation of windows and doors are needed. Using such a complex building model, the computational power needed to calculate future states is often relatively high.
Due to the importance of the indoor climate, in a lot of applications the climate states are logged using thermohydrographs or more modern digital temperature and humidity sensors. This gathered data may be used to generate a data driven model of the building behaviour. By using such a data driven model, e.g. an artificial neural network (ANN), in a predictive controller, the requirements of preventive conservation could be fulfilled effectively.

Preventive Conservation
Depending on the materials of the building and the materials of the objects of cultural heritage, which should be protected, different climate states may appear suitable for the definition of stationary and dynamic demands.

Stationary demands
For the temperature the stationary goals may be defined rather simple. Damages caused by physical, chemical and biological processes are less pronounced at lower temperatures, up to a lower boundary where an additional damage by frost may appear. The demands for humidity are more specific regarding the different materials. For example, the optimal relative humidity for cellulose is between 30 and 50 % rH, minerals should be stored between 0 and 30 % rH (see [4]).
For the considered case of application in a historical building built of sandstone containing mostly canvas and wood, the appropriate climate ranges are shown in the humidity over temperature diagram in figure 1.

Dynamic demands
A difference in the temperature of a material and its surrounding air leads to an energy transfer until an equilibrium is reached. If the environment temperature changes, a heat flow at the material surface will appear again and continue into the deeper layers of the material until a new equilibrium is reached. In adverse cases or over an extended time period this energy transport leads to physical damage. This indicates that the above mentioned changes should be reduced to a minimum. A similar effect can be noticed for the humidity. A change in the humidity of the surrounding air leads to a moisture (and therefore material) flow until an equilibrium between the material and the environment is reached.
The maximum values for the rate of daily or hourly changes of temperature and humidity dependent on materials can be read in guidelines and standards (e.g. [3] and [5]). Since in reality, historic buildings are often equipped with limited HVAC systems, the minimization of the rate of change is considered by the controller presented here..

Important properties of artificial neural networks
Due to the complexity of ANNs, only the fundamentals for the cases of applications described in this paper will be shortly presented in this chapter. ANNs are based on the biological model of a nerve system (see [6]). Several layers of neurons are connected to a network. Signals into the system are forwarded as input to a neuron, at which the signals are weighted and processed by the activation function of the neuron to generate an output (see fig. 2). The main properties of a neural network are given by its structure. For the cases of applications presented here, a division of the networks in two classes; feedforward and recurrent networks, seems to be useful.

Feedforward network
In a feedforward network structure, the signal is passed through the network in one direction. A typical example is the perceptron shown in fig. 3. The signal is first processed in the input layer, passed to the hidden layer and then passed to the output layer. By using a derivable activation function for each neuron, the training of the network can be done by a backpropagation algorithm (see [7]), which adjusts the weights in the network by comparing the difference between predicted and training data. The order of the data is irrelevant.

Recurrent neural networks
In a recurrent network, signals may be passed backwards in the structure. These connections can be seen as a kind of memory. Past states influence the current state of the network. A recurrent network is shown in fig. 4. Since the order of data is relevant in recurrent neural networks, an adapted backpropagation algorithm is needed. Another option is the usage of non-linear global optimization methods to train such a network (see [8]).

Methods
The functionality of an ANN is mainly determined by its structure. Different methods for evaluating and finding a suitable network structure are needed.

Criteria for model quality
To train an ANN the used data has to be divided in different data sets. A training set is used to actually tune the weights within the network, a validation set is used to control the training process and a test set is used to evaluate the trained network. A classical problem in using ANNs is the so-called overfitting. This problem occurs when the network is trained too much, which results in the inability to generalize the problem by creating a kind of look up table for the training data. To reduce this problem a validation dataset may be used. The data of the validation data set is not used to train the network, but to control the outputs for these data points. So an unbiased evaluation of the network can be done. An indication for overfitting is a growing error in the validation data. So the right choice for the different datasets is quite important.
Finally, the trained model is evaluated with the test data set and a comparable error maybe calculated. Typically, the normalized root mean square error (NMSE) is used [9].

Determining of feedforward Network structures
For applications using feedforward networks a classical approach is pruning. To do so, a network which should be clearly bigger than needed for the problem is used as starting point. By incremental reducing the size of the network until the smallest network which can solve the problem is reached, the best results are found. Different approaches regarding the network starting sizes are reviewed in [10]. A network with one hidden layer is able to solve problems which can be divided by a hyperplane and arbitrary problems may be solved with two layers see [11].
In consequence of the more complex training of recurrent networks, pruning approaches are much more time consuming for this kind of network. Furthermore, a bottom up approach may be used if the recurring network structure is not able to be determined by the problem formulation.

Determination of Network structures using neuroevolution
To determine the optimal network structure (for recurrent and feedforward structures) neuro-evolutionary methods may be used (see [12]). The presented approach is based on the NEAT algorithm (Neuro Evolution of Augmented Topologies). Using this algorithm every connection between two nodes within the network is represented by a gene sequence as shown in fig. 5. For a more detailed description of the method see [13].

Applications
All approaches aiming at optimizing the control strategy in regard to preventive conservation while reducing the needed computing power.

Temperature and humidity model
The main model needed for a predictive control of the indoor climate is the model of the buildings indoor climate behaviour influenced by the outdoor temperature and humidity. At first, the climate properties of the room are examined to build an appropriate model using an ANN. The case of application represents a room in the castle "Schloss Fasanerie" in Germany. The actuators in this application are limited to radiators and forced ventilation. No humidifiers or dehumidifiers are used. In a timespan of two years the indoor and outdoor temperature and humidity were logged and are available for the model design. Before an approach with an ANN was done, the first models as well for temperature as for humidity were built based on a Cauer Modell (see [14]) shown in fig. 6.

Fig. 6. Simplified Cauer model
Due to the storing properties of the building stock, a recurrent network was chosen, whereby the recurring connections are limited to the last layer of the hidden layer (likewise r1 to ri in fig. 3). By constraining the connections, an adaption of the backpropagation algorithm could be done to train the network (see [15]). To reduce the problem, two separate networks were trained for humidity and temperature, whereby these networks only differ in the output but not in their input (temperature and humidity values are representing the input of both networks). A one step prediction with a sampling time of 15 min was implemented. For a longer horizon, new data for the outdoor temperature and humidity are needed. This will be considered in the next section. For comparison purposes, a fitted Cauer model and a feedforward network were also fitted to the data.  fig. 7.

Local adaptation of a weather forecast
To predict the future indoor climate states, the future outdoor climate states, which can be obtained by a weather forecast, are needed for the simulation. The prediction resolution size of such a forecast cell differs from 1 to 15 km of edge length. But even in the best resolution, local differences like shadowing cannot be considered in detail in a usual prediction.
To build the adaption for a local weather forecast, the data locally measured and the data obtained by the commercial weather forecast were gathered for half a year (see [15]). The forecast was updated every hour with 3-hour prediction steps up to 5 days. The absolute error is shown in Fig. 8. For the application considered here, a prediction horizon extending 9 hours is not suitable due to the constraints in actuators and the building's coupling to outdoor climate since the impact extending this time is marginally.

Fig. 8. Absolute error in weather forecast
To reduce the model complexity, the forecast adaptation of temperature and humidity are separated. In order to find the suitable ANN structures, the neuroevolution

Modelling building parts
Due to the influence on indoor climate, one approach pursued to model the dynamic behaviour of wall segments using shallow neuronal networks. In the case of application considered here, the function of a state observer for the hygro-thermal conditions in different depths of the wall is realized. So, an ANN has to be trained, that is able to predict the current temperature and humidity at the positions of the sensors in the wall, based on the present data from the sensors on the wall surface and the predicted states from the last sampling instance.
In the resulting structure, the ANN implements a functionality in analogy to the A and B-matrices of the Luenberger-observer (see [16]), where the measured surface conditions can be interpreted as the system inputs. A training dataset was created, based on the recorded sensor values, where the input table consists of the current reading of the surface sensors and the values of the sensors embedded in the wall sample from the previous measurement instance. The output dataset consists of the current interior measurements in the same time span as the surface measurement. Thus there are 16 input data columns, consisting of the humidity and temperature measured in a distance of 10mm between the wall and the sensors, the temperature directly at the surface at both sides of the wall and the 5 temperature and humidity readings from different depths of the wall element. The output data size is 10, consisting of the 5 humidity and temperature pairs mentioned before. Due to the slow nature of the hygro-thermal processes of the examined system, the datasets are interpolated to a temporal resolution of 10min. This moreover drastically reduces the computational efforts for training the ANN, compared to original sampling rate of 1min. The training process was performed using the MATLAB neuronal network toolkit (see [17]). For the structure of the network determined by trial and error, 16 neurons were selected on the hidden Layer, since that yielded the lowest RMSE in the range between 10 and 16 neurons. The dataset was randomly partitioned into 70% training-, 15% validation-and 15% test-data. The partitioning is feasible in that manner, since the net later only performs a one-step prediction. Besides the temporal integrity of the dataset is not violated during the learning process, because the input-and output data for a certain time step are stored in same column.
After the completion of the learning process the ANN was exported as a MATLAB-function for further investigation. To simulate the network, a MATLABscript was programmed, that, in a first step, initializes the system states to a known value, e.g. by interpolation between the surface sensors, proportional to the depth of the observed measuring point. The script then iteratively calls the function, containing the ANN, with the previous estimate and the current measurement of the surface sensors. Fig. 10 shows the behaviour of the actual system (s) and the simulated system model (m), realized by the neuronal observer, as they are affected by changes of the humidity on both sides of the examined wall sample, shown in figure m. As described in [18] one side of the wall is exposed to the conditioned space of the box, build for the test stand, while the other to the surrounding air. In the results of the simulation, shown in fig. 11, the root mean squared error between the model and the measured data is 1.33% for the worst and 0.55% for the best estimated state, which is within the accuracy of the sensors of ±2%.

Model predictive control using ANNs
A model predictive controller uses a model of the process that shall be controlled to determine the optimal future actuator states. For this kind of application, the controller is using different ANNs as models in respect to the static and dynamic demands of preventive conservation using the implemented methods as shown in [14] and fig 12.

Demands Application Optimization
Neuroevolution ANN Fig. 12. Structure of Model predictive controller using ANN models Summarizing, the optimization by using ANN models provides a suitable solution. Certainly the computational power needed to provide this solution is not practicable and furthermore adjustments within the system have to be considered in every sub-model. To enhance the system for these two factors, the optimizer itself will be replaced by an ANN, which results in a so-called "neuro controller". This neuro controller is also build by the usage of the neuroevolution algorithm, but the genetic structure is enhanced by a gene sequence for the activation function of the single neurons. By doing so, the functional space of the network is extended to gain additional degrees of freedom. Right now, the obtained neuro controller is not tested on an actual application, but tested in a simulation done with TRNSYS. When the classic model predictive controller is using the ANN models directly trained at the same TRNSYS model, its performance is nearly as good as the neuro controller. But the real advantage is seen if there is a difference in the training data and the model, which in reality very easily may occur, by a changing environment, system or increasing sensor error. The results for the two controllers and an additional bang-bang controller in the simulation of a changed damp buffer in the room are shown in fig. 13. As set points 50 %rH and 20°C were used.

Fig 13. Simulation of different controller types
Overall the neuro controller and the model predictive controller were able to improve the climate significantly. The maximal humidity and temperature were reduced while the fluctuations were held low. The reduction in fluctuations is shown in fig. 14. The peaks in fluctuations can be explained by the natural daily cycle in temperature and relative humidity. Overall the higher effort designing the controller paid off by a faster and still more flexible controller. In future work the optimization process for the neuro controller will be considered, as well as the building part model will be included in the model predictive controller as well as the neuro controller.

Conclusion
In this paper different approaches for the usage of artificial neural networks in applications of preventive conservation are presented. In applications were data are already gathered in a significant time period, approaches using data driven models like ANNs may be used to reduce the simulation effort, in comparison to a building simulation, as well as the required expert knowledge. Even if this simulation is not suited for the optimization of the application, e.g. better fitted actuators or building materials, the rather simpler model can be used to develop a control strategy, which fulfills the demands of preventive conservation, despite the limitation of actuators.
The advantages in using a recurrent network for a building model are shown in the first application. The usage of a feedforward network for adapting a weather forecast to local properties and for modelling the behaviour of building stock is presented in the second and third application. Finally, the improved control results of an MPC using ANNs and a neuro controller compared to a bang-bang controller are shown in the last application. The advantage of the neuro controller is the better generalization and lower computational power during operations compared to the MPC.