# An Artificial Neural Network based Indoor Environment Control System

^{*}

ⓒ 2020. KIEAE all rights reserved.

## Abstract

Various control methods based on specific conditions of building spaces have been studied to improve the performance of system’s operation and users’ comfort. The methods used in this research examine an improved control strategy for higher control precision not to increase system’s energy consumption, and lower energy consumption not to decrease its thermal comfort level.

This research proposes optimized supply air conditions to satisfy the indoor setting values by controlling the amount of supply air and its temperature, and investigates the auxiliary performance of an adaptive controller.

For maintaining thermal comfort levels, it is confirmed that an artificial neural network based controller is about 13% more efficient than two different controllers, but, for energy performance, it consumes more energy by about 12% to maintain indoor thermal comfort.

## Keywords:

Energy Use, Thermal Comfort, Intelligent Control## 1. Introduction

### 1.1. Thermal controls

For the improvement of thermal energy supply systems, several types of research have tried to define the performance of the systems in terms of energy consumption and thermal comfort. In order to find an optimized control rule, recent thermal systems have investigated the performance of energy savings by use of current statistical models and advanced metering methods. In addition, the various patterns for heating and cooling supply levels were analysed and compared each other. Several different strategies in Heating, Ventilation, and Air Conditioning (HVAC) system controls were examined to improve the numerical performance by means of adjusting parameters, functions, regression coefficients of various energy conservation measures[1~3]. With the fast development of computing devices, the control model can utilize more advanced calculation technologies like the Fuzzy Inference System (FIS) and Artificial Neural Network (ANN). One of the most distinct characteristics of the FIS is to utilize linguistic approaches to solve various ambiguous situations that have not been able to solve by means of numerical and parametric controls in traditional tuning rules. In the PID and FIS models, diagrammatic node topology were examined to define better control rules for fuel use in boiler operating systems and valve opening in pipe works. Through the strategy of combining FIS and node networks, several variations of control rules were tested to maximize control efficiencies of the system operations and the distribution networks in building models[4~6]. In comparison with traditional methods, the FIS has improved sensitive controls for the various situations where simple mathematics cannot determine optimized decision. Its linguistic logics dealing with ambiguous expressions improved a wide range of mathematical and parametric tuning rules reflecting many traditional genetic algorithms derived from regression analyses[7~9]. Several different types of regression models that had been difficult to understand in the past, so many researchers have not dealt with a few combined functions. That is because the calculation processes exponentially increased when only a few variables or functions were exchanged. In these cases, by use of experimental or simulated regression analyses, the adjustment or compensation of signals by genetic algorithms in the FIS structure has sent quite reliable signals to the traditional thermal systems. In the field of analyzing sunlight radiation, air ventilation, and window infiltration, it has provided very efficient signals to find possible correlations and hidden interactions between variables. The ANN algorithm has been able to solve highly complex models in energy networks which consist of boiler, plant, heat exchanger, damper, valve, and mathematical topology. And the complex systems have been tested by combining actual and virtual models to respond unexpected thermal demands derived from human activities and climate changes. In order to define efficiency of comprehensive methods, mixture of dampers and resistance coils were tested through the data-driven regression analyses to respond to specific thermal demands connecting lab-scaled or true-sized building thermal systems. The control efficiency of combining the FIS and ANN models were examined to effectively operate dampers and diffusers in several types of duct works[10,11].

In addition, improving building’s thermal comfort, different types of surveyed and modeling researches were examined for both of the qualitative and qualitative indices based on user’s and building’s characteristics[12,13]. For the quantitative and objective analyses, the Predicted Mean Vote (PMV) and the Predicted Percentage of Dissatisfied (PPD) methods were used through the experimental and simulated genetic algorithms to mathematically control the thermal factors. Several approaches based on the FIS algorithm were frequently used to define human factors, and some design scenarios for indoor thermal conditions derived from architectural and occupant characteristics were tested to confirm more reliable PMV analyses with experimental and simulated data[14,15]. The ANN model was used to precisely assess and predict thermal comfort values in the PMV method, so that occupant responses were effective indices to examine existing control strategies. Amongst, there are several approaches reflecting the conditions of building envelopes for heating and cooling loads to develop existing control rules in, and meanwhile, the refined traditional indices were adopted to determine the performance or effectiveness in respond to modern standards and regulations in buildings[16,17]. In order to improve their performances, useful co-simulation applications between thermal load calculation applications and programming language modules were used for the real-time reaction responding to the changes of outdoor weather conditions. In these processes, several energy conservation measures, such as envelopes, partitions, mechanical equipment, and thermal systems, were utilized to investigate the effect of architectural and mechanical elements. Recent studies for the data-driven models focused on finding hidden correlations between the various energy conservation measures using a multi-layered matrix from several experimental and simulated results[18,19].

### 1.2. Problem statement

A number of studies have mainly investigated on system’s energy efficiency or their elements related to building geometries and machine’s operation. Moreover, many indoor comfort models associated with statistical methods have been mostly used to find optimized patterns of inner thermal factors. There have been some weaknesses to analyze and propose supply air conditions for a space scale associated with specific weather conditions. At first, an integrated heating and cooling model dealing with the mass and temperature of supply air is proposed with design scenarios reflecting three different control approaches and a weather condition of an in-between season. With simulation results, the performance of the proposed model is discussed in terms of energy consumption and thermal comfort, and in conclusion, the strengths and weaknesses of this simulation research are described.

## 2. Methodology

### 2.1. Design strategy

In order to find optimized control patterns in the season that requires heating and cooling air supply in a day, a building model is located on city of Kangneung in South Korea, and utilizes a weather file of KOR_Kangnung.471050_IWEC. Based on the geometries as indicated in Table 1., a thermal transfer model for a space was conceptualized to respond to the heating (or cooling) energy transfer derived from the difference between indoor and outdoor temperature. When the thermal energy transfer is calculated, an energy supply model optimizes supply air conditions by means of the amount of air and its temperature. With the situation of heat transfer performed, a thermal comfort model simultaneously calculates the PMV (and PPD) levels. For instance, if the PMV level is out of the range of a setting value (-0.5<x<0.5), the thermal comfort model adjusts the setpoint temperature. If the PMV value is still outside the set value despite of performing this process, the thermal model repeats the process. However, if the PMV value is within the initial setting value at any phase, this adaptive process is carried out without any additional change of setpoint temperature.

This thermal system consists of a heater and a cooler at a single duct work. A reference model as a comparison group operates by a traditional thermostat on/off controller, and the FIS and the ANN model are compared with the thermostat to find the performance of controlling energy consumption and thermal comfort. Additionally, the ANN model with one adaptive controller reflecting the PMV results, as previously mentioned, is tested to define any strengths or weaknesses rather than two different controllers.

### 2.2. HVAC model

From the thermodynamic, a function of thermal energy transfer in a space is confirmed:

$$${Q}_{loss}+{Q}_{gain}=\frac{du}{dt}$$$ | (1) |

where *Q _{loss}* is heat transfer from an indoor space to an outdoor space.

*Q*is heat transfer from a heater to a room.

_{gains}*U*is internal energy.

*t*is time.

From the conduction through the walls and windows, thermal energy loss of room, is given by:

$$$\begin{array}{c}{Q}_{loss}=\left({T}_{room}-{T}_{out}\right)\hfill \\ /\left\{\frac{1}{\left({h}_{out}\times A\right)}+\frac{D}{\left(k\times A\right)}+\frac{1}{\left({h}_{\in}\times A\right)}\right\}\hfill \end{array}$$$ | (2) |

where *h _{out}* and

*h*are heat transfer coefficients,

_{in}*k*is transmission coefficient,

*A*is area,

*D*is depth of envelope.

From the mass flow rate and enthalpy, assuming that there is no work in the system, thermal energy gain of room, and the rate of internal energy is given by:

$$$\frac{du}{dt}={m}_{room}\times {C}_{v}\times \frac{d{T}_{room}}{dt}$$$ | (3) |

From the above equations, time derivative of *T*_{room} for simulation model is obtained:

$$$\begin{array}{c}\frac{d{T}_{room}}{dt}=\frac{1}{{m}_{room}{C}_{v}}\hfill \\ \times \left(\begin{array}{c}\left(\frac{{T}_{rom}-{T}_{out}}{\frac{1}{{h}_{out}\times A}+\frac{D}{k\times A}+\frac{{h}_{in}}{A}}\right)\hfill \\ +\left({\dot{\text{m}}}_{ht}\times {C}_{p}\times \left({T}_{heater}-{T}_{room}\right)\right)\hfill \end{array}\right)\hfill \end{array}$$$ | (4) |

### 2.3. Thermal comfort model

In this simulation research, the thermal comfort is defined by the PMV index developed by P.O. Fanger, and also the PPD is developed by the exponential of metabolic rate and thermal loads from the PMV[20,21].

$$$PMV=3.155\times \left(0.303{e}^{-0.114M}+0.028\right)L$$$ | (5) |

where, *M* is metabolic rate, and *L* is thermal load.

$$$\begin{array}{c}L={q}_{met,heat}-{f}_{cl}{h}_{c}\left({T}_{cl}-{T}_{a}\right)\hfill \\ -{f}_{cl}{h}_{r}\left({T}_{cl}-{T}_{r}\right)-156\left({W}_{sk,req}-{W}_{a}\right)\hfill \\ -0.42\left({q}_{met,heat}-18.43\right)\hfill \\ -0.00077M\left(93.2-{T}_{a}\right)\hfill \\ -2.78M\left(0.0365-{W}_{a}\right)\hfill \end{array}$$$ | (6) |

### 2.4. Control models

The thermostat in this study operates within *T*_{set} = ±1°C, which is a common setting value in most thermal systems in buildings. If the difference between *T*_{set} and *T*_{room} is larger than ±1°C, thermostats send an on-signal or an off-signal to the thermal system. The FIS is to determine the optimal values of the mass flow rate and the temperature of the supply air, which depends on the difference between *T*_{set} and *T*_{room}. As indicated in next equations, a membership function is described for two input variables, wherein the temperature differences between the set-point and room (*E*) are derivative of the temperature difference (*ΔE*) [22]:

$$$E={T}_{set}-{T}_{room}$$$ | (7) |

$$$\Delta E=\frac{\left(E-{E}_{previout}\right)}{\Delta t}$$$ | (8) |

$$$\text{if}xisA\text{and}yisCthen{f}_{1}={p}_{1}x+{q}_{1}y+{r}_{1}$$$ | (9) |

For two output variables for mass flow rate and its temperature, the FIS uses five membership functions for each input variable with universal of discourse 0 (0%) to 1 (100%) for an air mass control and -10 to 10 for an air temperature control. It was assumed that the range of controlling the amount of mass in the output variable was 0 (0%) to 1 (100%). The first layer consists of inputs 1 and 2, which supplies the input values to the next layer. In the FIS inner structure, triangle membership functions are chosen with a maximum equal to 1 and a minimum equal to 0 [22].

$$$\mu \left(x\right)=\Delta \left(x;{a}_{i},{b}_{i},{c}_{i}\right)=\left\{\begin{array}{c}x\le {a}_{i}\to 0\\ {a}_{i}\le x\le {b}_{i}\to \frac{\left(x-{a}_{i}\right)}{\left({b}_{i}-{a}_{i}\right)}\\ {b}_{i}\le x\le {c}_{i}\to \frac{\left({c}_{i}-x\right)}{\left({c}_{i}-{b}_{i}\right)}\\ {c}_{i}\le x\to 0\end{array}\right.$$$ | (10) |

The Artificial Neural Network (ANN) algorithm includes a large class of several structures, and the appropriate selections of a nonlinear mapping function x with a network are required [23, 24]. The ANN controller in function approximation is the multilayer layer perception which consists of two input layers, 10 hidden layers, and an output layer. The inputs *x*_{1},…*x*_{k} to the neuron are multiplied by weights wki and summed up with the constant bias term θ* _{i}*, and the resulting ni is the input to the activation function g [23, 24]. The ANN model used in this study consisted of the two inputs of

*E*and

*ΔE*from the thermostat controller, an output layer for control signal for amount of supply air and its temperature. Then, it was trained to examine control patterns which are able to maintain the room temperature to meet with the range of the PMV setting. For this algorithmic process, a scale conjugate gradient algorithm and maximum 1000 iterations were utilized, so the R

^{2}values were confirmed as 0.99430 for amount of mass control and 0.99649 for its temperature control, respectively, which was enough to confirm as high statistical validation values.

Fig. 1. describes a simulation block model for this simulation research. By use of the difference between indoor and outside temperature, the thermal loads were calculated. In order to maintain room temperature within set-point temperature, the thermal system produces exact amount of cooling or heating supply air. During this process, the PMV (and PPD) value is calculated at every minute and adaptive module adjusts the amount of cooling or heating supply air to lower possible thermal dissatisfaction.

## 3. Results

### 3.1. Room temperature

Fig. 2. displays the outdoor temperature of City of Kangneung at May 4^{th}', which was retrieved from the Weather Data in the EnergyPlus website of the US Department of Energy. Fig. 3.~Fig. 5. describe the patters of Troom controlled by the thermostat, the FIS, and the ANN controllers. The change of the room temperature for the thermostat is quite wide but shows regular patterns. These fluctuations can imply that the thermostat controller is effective in reducing its energy use, but it may have disadvantages to retain the constancy of indoor thermal comfort.

In Fig. 4., the FIS controller produces quite improved temperature patterns. The changes of temperature by the FIS controller effectively reduces the fluctuations of *T*_{room}. As indicated in Fig. 5., the ANN more effectively controls Troom within the *T*_{set} near about 17.5°C and 25.5°C. This result implies the fact that ANN’s learned and precise controls makes the pattern of Troom quite flat and consistent. On the other hand, it is necessary to check how energy consumption is going because consistently maintaining *T*_{room} can use more energy to keep the patterns appropriate.

### 3.2. Energy demand

Fig. 6.~Fig. 8. display the change of heating and cooling energy demands to maintain *T*_{set} by the three different controllers. In the case of the thermostat, it is confirmed that some constant changes of heating and cooling energy used, from 00:30 to 07:00, and from 11:00 to 20:00. Unlike the thermostat, the FIS has a very complex patterns at specific time zones depending on the outside temperature changes. Especially, there are quite large fluctuations of temperature changes between the areas where the system does not need to be operated and where the system begins to operate. This implies the fact that some inefficiencies can be created until the signals are stabilized by the inner algorithm within the thermal system. In the graphs, heating is on the top and cooling is on the bottom, relative to 0 on the y-axis.

The ANN model shows a distinctly different change pattern of *T*_{room}. In terms of the fluctuations, the heating and cooling energy was consistently required to operate the system following its inner algorithm. It can be seen that significant additional energy consumption is required to improve indoor thermal comfort. On the other hand, as seen in the graph for cooling from 10:30 to 13:00, it can help prevent unnecessary overshooting from several on-off signals. This aspect can be confirmed at maximum temperature at the beginning when the system turned on in Fig. 3.~Fig. 5..

## 4. Discussion

Table 2. displays the average values of the absolute numbers of the PMV results. Since the PMV levels proceed on both sides (positive e and negative) on a zero basis, simply on average there is an ambiguity in determining the system’s performance, so the absolute values are utilized in this comparison. As shown in the figure, the FIS model shows an improvement over the thermostat, but the effect is very insignificant. However, it can be predicted from the graph patterns, as it minimizes fluctuations of the control patterns and mitigates overshooting at the point when the system is turned on, the ANN model’s performance for thermal comfort is relatively significant as compared to the result of the FIS controller. In terms of excluding ambiguity, the comparison of energy consumption can be one of the most effective methods to investigate the performance of each system. Table 3. displays the results of the energy transfer between the inside and outside. Within the dead-band (±1°C) of the setting *T*_{set}, the both of algorithms that maximizes indoor comfort can be confirmed to increase energy consumption.

## 5. Conclusions

This research analyzed three different indoor thermal controllers to reach the indoor set-point temperature effectively by controlling the amount of air and its temperature. At the same time, it investigated the performance an adaptive model for improving indoor thermal comfort within the setting range of set-point temperature without considering the increase of energy consumption. In the viewpoint of effectively maintaining indoor thermal comfort level, it was confirmed that the ANN controller showed quite high performance near 13% more efficient than the conventional thermostat. However, of energy consumption, both of the FIS and the ANN controllers were found to be over about 0.5% and 11.6% less efficient, respectively.

As a result, the artificial neural network controller responding to users’ comfort levels properly worked to improve the thermal comfort level, but the aspect caused a quite significant increase in energy consumption. This may be an inevitable result of the need for additional energy use in the operation of more complex thermal systems ro buildings than in the past. Thus, a follow-up study will perform to develop a systematic and comprehensive model of how much the user’s thermal comfort could increase economic feasibility in the operation of the building as a whole, despite the increase in energy use. Through this framework it is necessary to find an improved methodology that balances the performances of system’s energy consumption with users’ thermal comfort.

## Acknowledgments

This work was supported by a research grant from Hankyong National University in the year of 2019 (본 연구는 한경대학교 2019년도 학술연구조성비의 지원에 의한 것임)

## References

- M. Zhuang, D. Atherton, Automatic Tuning of Optimum PID Controllers. 1993, Control Theory and Applications, pp.216-224. [https://doi.org/10.1049/ip-d.1993.0030]
- Tan, W, et al., Tuning of PID Controllers for Boiler-turbine Units. 2004, ISA Trans, pp.571-583. [https://doi.org/10.1016/S0019-0578(07)60169-4]
- J. Braun, K. Montgomery, N. Chaturvedi, Evaluating the Performance of Building Thermal Mass Control Strategies, 2001, HVAC&R Research, pp.403-428. [https://doi.org/10.1080/10789669.2001.10391283]
- W. Li, J. Zhang, T. Zhao, Indoor Thermal Environment Optimal Control for Thermal Comfort and Energy Saving based on Online Monitoring of Thermal Sensation, 2019, Energy and Buildings, pp.57-67. [https://doi.org/10.1016/j.enbuild.2019.05.050]
- R. Malhotra, R. Sodhi, Boiler flow control using PID and fuzzy logic controller, 2011, IJCSET, pp.315-319.
- H. Groscurth, K. Kress, Fuzzy Data Compression for Energy Optimization Models, 1998, Energy, pp.1-9. [https://doi.org/10.1016/S0360-5442(97)00060-1]
- M. Fazzolari, et al., A Review of the Application of Multiobjective Evolutionary Fuzzy Systems: Current Status and Further Directions. 2013, Fuzzy Systems, pp.45-65. [https://doi.org/10.1109/TFUZZ.2012.2201338]
- I. Škrjanc, et al., Theoretical and Experimental Fuzzy Modelling of Building Thermal Dynamic Response, 2001, Building and Environment, pp.1023-1038. [https://doi.org/10.1016/S0360-1323(00)00053-6]
- J. Zhang, J. Ou, D. Sun, Study on Fuzzy Control for HVAC Systems, 2003, ASHRAE, pp.13-36.
- J. Ahn, S. Cho, D. Chung, Analysis of Energy and Control Efficiencies of Fuzzy Logic and Artificial Neural Network Technologies in the Heating Energy Supply System Responding to the Changes of User Demands, 2017, Applied Energy, pp.222-231. [https://doi.org/10.1016/j.apenergy.2016.12.155]
- J. Moon, J. Ahn, Improving Sustainability of Ever-changing Building Spaces Affected by Users’ Fickle Taste: A Focus on Human Comfort and Energy Use, 2020, Energy and Buildings, pp.1-13. [https://doi.org/10.1016/j.enbuild.2019.109662]
- J. Ahn, D. Chung, S. Cho, Performance Analysis of Space Heating Smart Control Models for Energy anddywm Control Effectiveness in Five Different Climate Zones, 2017, Building and Environment, pp.316-331. [https://doi.org/10.1016/j.buildenv.2017.01.028]
- National Institute of Building Science. Space Types. Whole Building Design Guide. [Online] Mar 15, 2018. [Cited: Mar 15, 2018.] https://www.wbdg.org/space-types, .
- Y.S. Lee, J. Ahn, Comparative Analyses of Energy Efficiency between on‐Demand and Predictive Controls for Buildings’ Indoor Thermal Environment, 2020, Energies, 13, pp.1-15. [https://doi.org/10.3390/en13051089]
- S. Yang, et al., A State-space Thermal Model Incorporating Humidity and Thermal Comfort for Model Predictive Control in Buildings. 2018, Energy and Buildings, pp.25-39. [https://doi.org/10.1016/j.enbuild.2018.03.082]
- Z. Ren, D. Chen, Modelling study of the Impact of Thermal Comfort Criteria on Housing Energy Use in Australia, 2018, Applied Energy, pp.152-166. [https://doi.org/10.1016/j.apenergy.2017.10.110]
- S. Park, S. Cho, J. Ahn, Improving the Quality of Building Spaces that are Planned Mainly on Loads rather than Residents: Human Comfort and Energy Savings for Warehouses, 2018, Energy and Buildings, pp.38-48. [https://doi.org/10.1016/j.enbuild.2018.08.007]
- J. Ahn, S. Cho, Anti-logic or Common Sense that can Hinder Machine’s Energy Performance: Energy and Comfort Control Models based on Artificial Intelligence Responding to Abnormal Indoor Environments, 2017, Applied Energy, pp.117-130. [https://doi.org/10.1016/j.apenergy.2017.06.079]
- Y. Jung, Analysis of Air Flow Distribution according to the Positions of Computer Room Air Conditioning and Perforated Plate in a Server Room of Data Center, 2019, KIEAE Journal, pp.83-88. [https://doi.org/10.12813/kieae.2019.19.1.083]
- Engineering Toolbox, Recommended indoor temperatures summer and winter, Engineering Toolbox, [Online] November 11, 2016. [Cited: November 11, 2016.] http://www.engineeringtoolbox.com, .
- ASHRAE, ASHRAE Standard 55-2004, Atlanta : ASHRAE, 2004.
- D. Petković et al., Evaluation of the Most Influential Parameters of Heat Load in District Heating Systems, 2015, Energy and Buildings, pp.264-274. [https://doi.org/10.1016/j.enbuild.2015.06.074]
- A. Karpathy, Quick Intro. CS231n: Convolutional Neural Networks for Visual Recognition, [Online] December 2, 2016. [Cited: December 2, 2016.] http://cs231n.stanford.edu/, .
- Politechnika Wroclawska, Chapter 2 Introduction to Neural network. Politechnika Wroclawska, [Online] March 28, 2016. [Cited: March 28, 2016.] www.ii.pwr.edu.pl, .