Physical-Rules-Based Adaptive Neuro-Fuzzy Inferential Sensor Model for Predicting the Indoor Temperature in Heating Systems

Previous research demonstrated that inferential sensors-based control technology can significantly improve the energy efficiency of space heating systems. However, the performance strongly relies on the accuracy and robustness of the dynamic model upon which the inferential model is built. Traditional methods, such as simplified physical model, adaptive neurofuzzy inferential sensor- (ANFIS-) based model, were developed and tested in this research. In attempt to improve both the accuracy and robustness of inferential model, this study aims to investigate how to improve the performance of inferential sensors using physical-rules-based ANFIS in prediction of the hydraulic system temperature in order to adapt the good power needed in the dwellings. This paper presents the structure of this innovative method. The performance is tested using experimental data and is compared with that of previous methods using three performance measures: RMSE, RMS, and R 2 . The results show that the physical-rule-based ANFIS inferential model is more accurate and robust. The impact of this improvement on the overall control performance is also discussed.


Introduction
The energy performance of a hydraulic space heating system largely depends on how the boiler is controlled [1]. The problems with the three methods commonly used in the practice of boiler control were investigated by a number of researchers [1][2][3]. A shared conclusion of their research is that the temperature set-point of hot water supply should be regulated according to the dynamic heating load of the building served. Dexter proposed an adaptive control scheme in 1980s [4]. Liao and Dexter proposed an inferential control scheme that can adjust the temperature set point based on the heating load that is estimated based on three operational variables, which are energy consumption, solar radiation, and outdoor temperature, easily measureable in the boiler room. These three operational variables are also introduced into the adaptive set-point heat exchanger control scheme which is proposed in district heating systems [5]. In the adaptive set-point control scheme for hydraulic space heating systems, the accuracy and robustness of temperature prediction are obviously the most essential factors.
In recent years, fuzzy logic [6] and neural networks have been proposed as alternatives to traditional statistical ones in building technology. Researchers extensively applied fuzzy logic to the control of the built environment to improve the performance and to reduce energy consumption [7][8][9][10], while neural networks are used for improving performance of the built environment [11,12] and estimating the operative temperature in a building [13]. Based on Liao's work, Jassar et al. [14] designed an ANFIS-based inferential sensor model, which estimates the average air temperature in buildings that are heated by a hydraulic heating system. Although Jassar's ANFIS model has a low root mean square error (RMSE) in temperature estimation, the performance is strongly sensitive to the quality of the training data. This study aims to solve this problem. 2 International Journal of Distributed Sensor Networks Section 2 gives an overview of the ANFIS. Section 3 introduces the heat transfer process and adaptive set-point control scheme. A physical-rule-based ANFIS model is proposed in Section 4.1 and evaluated in Section 5. The discussion of application and conclusion are presented in Sections 6 and 7, respectively.

ANFIS Principle and Architecture
ANFIS integrates fuzzy logic with neural network such that the fuzzy system becomes more systematic and less reliant on expert knowledge. Such systems have a network structure similar to that of a neural network [16]. Details of the ANFIS architecture, rules, layers, and functions are presented in [17][18][19].
To present the ANFIS architecture here, we consider two fuzzy if-then rules based on a first-order Surgeon's model. These two rules are depicted in Figure 1(a); Rule 1: If (x is A 1 ) and (y is B 1 ) then (1) Here, A 1 and B 1 are fuzzy sets describing the input and f 1 is a crisp (nonfuzzy) variable describing the output. In this structure, therefore, the inputs to the system are fuzzy, whereas the output is a crisp number. A possible ANFIS architecture to implement these two rules is shown in Figure 1(b). Note that a circle indicates a fixed node, whereas a square indicates an adaptive node (the parameters are hanged during training). For instance, all the nodes in the first layer are adaptive nodes. The output of each first node is the degree of membership of the input to the fuzzy membership function (MF) represented by the node where µ Ai (x) is the degree of membership of a variable x into the fuzzy set A i . For example, if the triangular-shaped MF is used to represent the fuzzy set A i with maximum equal to 1 and minimum equal to 0, the degree of membership is given by where a, b, c are the parameters for the MFs. The parameters a and c locate the "feet" of the triangle and the parameter b locates the peak [20]. Parameters in this layer are referred to as premise parameters. Gradient descent algorithm has been employed in ANFIS to optimize the values of premise parameters. The output of each rule is a linear combination of the input variables plus a constant and the final output is the weighted average of each rule's output. The overall output of ANFIS system (output of layer 5) is given by The optimal values of the consequent parameters p i , q i , and r i will be identified by using hybrid learning method [21]. However, if the MFs are not fixed and are allowed to vary, then the search space becomes larger and, consequently, the convergence of the training algorithm becomes slower [9]. To achieve good generalization toward unseen data, the size of training data set should be at least as big as the number of modifiable parameters. Another reference [20] restricts the size of the training data to be about 5-times the number of modifiable parameters [16]. Therefore, the performance of the ANFIS is very dependant on the sensitivity of the training data.

Physical-Rules-Based ANFIS Model Design
The heat is taken as synonymous to thermal energy and it can be transferred by various causes [21], such as conduction, convection, and radiation. Being easily measurable, three operational variables, including the power at which the primary energy is consumed by the system (Q in ), outdoor temperature (T O ), and solar radiation (Q sol ), are used in adaptive set-point heating system [1]. Since the rules in Jassar's ANFIS are generated from training data, they strongly depend on qualifying the training data; either the noise or the small range of training data may cause inaccurate prediction. In this paper, we changed structure of ANFIS and integrated with physical rules based on the principles of thermal dynamics. This is expected to reduce the sensitivity to the training data, accordingly to improve the robustness and accuracy of prediction.

Heat Transfer Process and Adaptive Set-Point Exchanger
Control in Laboratory. In the laboratory, there are a group of radiators different zones, which are controlled by a single room thermostat. The thermostat is installed on the middle of an internal wall at the eye level. This position was selected because the temperature here was very close to the average room temperature. Multiple sensors were used to monitor the air temperature in each zone and their algebraic average was treated as the representative measurement of the room temperature in the zone i, T a (i). Figure 2 illustrates the heat transfer process in the ith heating zone with the external wall which is divided into two layers that two-layers wall can efficiently reduce the heat conduction between indoor and outdoor environments. Heat transfer from the hot water to the radiator shell (T m (i)), which is in the ith heating Hot water supply zone, through convection (Q in ) and then to the air through convection and to the inner layer of the envelope through radiation. Heat is exchanged between the air and the inner layer of the envelope and conducted from the inner layer to the outer layer of the envelope. Infiltration through openings and heat conduction through light-weighted constructions in the envelope (such as windows), whose thermal inertia is ignored, depend on the outdoor temperature (T O ). Solar radiation (Q sol ) is also another heat source we need to consider in heat transfer processes. In this study, we assume that the positive energy includes solar radiation and the heating delivered to the space by the system. The negative energy depends on the difference between indoor air temperature and the external temperature. Figure 3 is an adaptive set-point heat exchanger control scheme proposed in [5], the temperature set-point of the heat exchanger depends on the estimated average indoor temperature by using external temperature (T O ), solar radiation (Q sol ), the energy consumption (Q in ), and current indoor temperature (T a ). Therefore, the accuracy of estimation will affect the whole heating system efficiency. Jassar's Adaptive neurofuzzy-based inferential sensor model for estimating the average air temperature was used in temperature set-point estimator. In this study, aside from the main objective of trying to obtain a more accurate prediction, it is also intended to improve the robustness of estimation. In this paper, the physical rules are injected into the ANFIS structure and a new indoor temperature estimator is proposed.

Physical-Rule-Based ANFIS Model
Structure. Based on the principles of thermal dynamics and the structure of ANFIS, a new ANFIS structure is proposed. We expect to reduce the interference between the unrelated variables when tuning the parameters by changing the structure of ANFIS and integrating physical rules in ANFIS. Figure 4. For each input, design parameters have been used to create an initial membership function, "High" or "Low," matrix using triangle function described by the following equations:

Structure. A network is proposed in
where a i , b i , and c i are membership function parameters that change its shape. Each input variable is characterized by two MFs thus, the total number of antecedent parameters is 8.  The rule base contains four rules of first-order Surgeons type for either "Positive Energy" or "Negative Energy." The ANFIS network structure is separated into two neural rules which are "Energy In" and "Energy Out." The inputs Q in and Q sol are used to decide the "positive energy". Also, the inputs external temperature (T O ) and delayed average indoor air temperature (T avg ) which is the indoor air temperature considered the delay from the temperature monitor and the proposed indoor temperature estimator are grouped into "Negative Energy." There are four rules in every neural rule and the outputs of every rule are summarized. T avg is the delayed indoor temperature which is related with the current difference between indoor and outdoor environment. In Figure 4, the output of the first layer of physical-rule-based ANFIS structure can be presented by the functions for every node i. A, B, C, D are membership functions.
In layer 2, there are 8 nodes and every four nodes are in the same group. The output of every node is the product of the corresponding incoming signals i. The connections between the nodes in layer 1 and layer 2 represent the designed fuzzy rules between Q in and Q sol and the output represents the firing strength (w i ) of a rule. For example, node 1 in layer 2 represents a status when both Q in and Q sol are "high" and the output to which the degree of the antecedent part for this fuzzy rule is satisfied is sent to the next layer for calculation. However, comparing to the conventional ANFIS structure, the outputs are only sent to the nodes inside their group as input signals in layer 3.
In layer 3, the ratio of the ith rule's firing strength to the sum of all rules' firing strengths in the group of "Positive Energy" or "Negative Energy" can be presented by Thus, the output of every rule in "Positive Energy" is and the every rule in "Negative Energy" is where w i is a normalized firing strength from layer 3 and is the consequent parameter set of this node. In layer 5, the single node computes the overall output as the summation of all incoming signals An ANFIS-based model for predicting the average air temperature is developed by Jassar et al. [14]. The overall average air temperature (T avg ) in the building is estimated based upon external temperature (T O ), solar radiation (Q sol ), and the energy consumption (Q in ). The ANFIS model was commissioned using hybrid learning algorithm. The training data can be obtained through a short-term monitoring of the system and simulation results obtained using the model are very close to experimental measured results.

Training and Testing.
In this paper, the experimental data from the laboratory heating system in an EU CRAFT project [22] is used for the training and testing of the developed model. The laboratory located in Milan, Italy, is a three story building with one zone at each floor. Multiple sensors were used to monitor the air temperature in each zone and their algebraic average was treated as the representative measurement of the room temperature in that zone. The indoor air temperature was represented by the algebraic average of the air in the building, the energy consumption Q in was calculated, and T O and Q sol were monitored regularly by a metrological station next to the laboratory [14]. The model is commissioned using 3000 pairs of the experimental data in January 2001 as training data and 4900 pairs of data in January 2001 is used as the testing data (Table 1). Then the model uses 7900 pairs of experimental data in January 2001 as training data and data pairs in the other months to test the robustness ( Table 2). The network is trained by a hybrid learning algorithm to update the parameters [20]. The training phase is a process to determine optimum parameter values to successfully fit the training data. Each epoch consists of a forward pass and a backward pass. In the forward pass of the hybrid learning algorithm, node output goes forward until layer 4 and consequent parameters are identified by the leastsquare method. In the backward pass, the error signals propagate backward and premise parameters are updated by the gradient descent method. The learning algorithm for the network parameters is discussed in Section 5.

Performance Evaluation of Proposed Predictor
The proposed-physical-rules based ANFIS predictor is evaluated here in terms of its performance in predicting the indoor temperature and the results are compared to the ANFIS [14] and experimental measured data. To make the comparison fair, the same numbers of membership function and function type are set for each input in unphysical-rules-based ANFIS model. Both types of prediction models are evaluated in terms of three performance measure. Root mean square error (RMSE) which measures the mean deviation (error) of the predicted values to the measured indoor temperature values. The maximum relative error (MRE) which is a measure for the largest error (or the farthest point) as well as goodness of fit (R 2 ). R 2 generally takes values between 0 and 1. As R 2 reaches 1, the regression points tend to align more accurately along the model curve. These performance measures are given mathematically as follows [23,24]: where m is the length of measured data matrix, y i is the measured indoor temperature, y is the predicted indoor temperature, y is the measured indoor temperature array, and y is the mean of the measured indoor temperature.

5.1.
Accuracy of the Models. 3000 pairs of data in January 2001 are used to train the ANFIS and 4900 pairs of data are used for testing. From Figure 5 and Table 3, we can find that with same amount of training data, physical-rules-based ANFIS have a better performance in accuracy of prediction. Indoor air temperature can be predicted by limited data in proposed physical-rules-based ANFIS prediction model rather than ANFIS model.

Comparison between Physical-Based ANFIS Predictor and
Unphysical-Based ANFIS Predictor. We use 7900 data pairs in January 2001 ( Figure 6) for training and the data set in December 2000 which includes 7900 data pairs for day 1-day 22 to test the prediction performance. The strong agreement between measured and predicted temperature values in Figure 7 indicates that the model used in the predictor is correctly structured and can accurately be used to estimate the building air temperature. Unphysical-rules-based ANFIS model [14] has a good performance in RMSE in estimating building indoor temperature; however, the robustness need to be improved when the input is not stable. There are some significant noise points around time point 4000 at the graph of Q sol and graph of T O between time point 2400 and 3800 in Figure 8. In testing result Figure 10, we observe better performance has been presented in physical-rules-based model than the performance of the ANFIS model in Figure 9. The physical-rule-based ANFIS predictor efficiently improves the robustness of prediction.
The comparison conducted between physical-rulesbased ANFIS and ANFIS is based on training the prediction model with data from the same building and during the same time period. For fair comparison, physical-rules-based ANFIS design parameters are optimized in terms of number of training epochs as same as ANFIS system. This approach is employed to test the robustness of the models. Six different sections of the experimental data (Jan 2000 to April 2000, December 2000, and Feberuray 2001) obtained from laboratory heating system were selected as different test data sets. The performance measures RMSE, MRE, and R 2 are calculated and tabulated in Tables 4-6.
This approach is employed to test the robustness of the model. From Tables 4 and 5, we found that the RMSE and MRE for physical-rules-based ANFIS is much lower than the ANFIS system. Both the mean errors and the farthest error in physical-rules-based ANFIS have been improved comparing to ANFIS system. In Table 6, the values of R 2 are closed to 1 in physical-rules-based model during the testing period, which means the predicted outputs tend to align more accurately along the measured indoor temperature curve. From these results, it is apparent that the physical-rules-based ANFIS is clearly better than ANFIS system in predicting indoor temperature.

The Application Area of Physical-Rule-Based ANFIS Temperature Predictor
The absence of practical methods for estimating average air temperature in the built environment is filled by an inferential sensor model, based on ANFIS modeling, in conventional heating system which is controlled by openloop control. The performance of ANFIS-based control strongly depends on the accuracy and robustness of temperature prediction. For example, in [5] the energy cost depends on the accuracy of indoor temperature prediction and also the robustness will impact of control signals to the valve. Any mistake in distributed heating system may cause energy waste and/or discomfort due to overheating or under heating. Thus, a robust indoor temperature predictor will provide more accuracy and stable control signals which avoid overshot signals to the set-point control scheme in distributed heating system. Then an adaptive set-point  control scheme that the optimal set-point of supplied hot water temperature is deduced by indoor air temperature estimator can be implemented instead of traditional constant set-point control. Figure 11 shows the adaptive set-point temperature control fulfill the indoor thermal comfort requirement. At the same time, the energy efficiency is also higher than constant set-point control. The performance of constant set-point controller is far below that of the adaptive setpoint controller, the reasons for the poor performance are as follows.
Once commissioned, the set point is fixed for the entire test period.
(i) If too high a value of the set point is selected, more energy will be consumed and the room temperature is more frequently above the upper level of the desired range, resulting in lower overall performance (ii) If too low a value for the set point is selected, the benefit of lower energy consumption is at the cost of significant discomfort because the room temperature is more frequently below the lower level of the desired range. Consequently the overall performance remains low.

Conclusion
In this paper, the physical-rules ANFIS model is proposed and its performance is compared to unphysical-rules-based ANFIS model in indoor temperature estimating. Based on the results presented, we proved that the physical-rules-based ANFIS prediction has an obvious improvement in accuracy and robustness in estimating indoor temperature in built environment, so that control signals in heating systems will be more stable and it can provide a rational basis to improve the overall performance of heating systems, especially in improving energy efficiency.