{'fraction_non_alphanumeric': 0.02349504304316748, 'fraction_numerical': 0.012244771109798925, 'mean_word_length': 4.814600650524033, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Application of artificial neural network for natural ventilation schemes to control operable windows

An artificial neural network (ANN) has been broadly developed as a design tool in various application scenarios in building sectors. One of the most important perspectives in building fields is human comfort. Various control strategies of natural ventilation schemes exist, to maintain good air quality in buildings. Nevertheless, this study presented a novel strategy by applying a simple ANN to predict the trends of indoor air temperature and determine the operation status of operable windows. Building simulations had been conducted to train, test, and validate the ANN model. The ANN model has one hidden layer and performs training using the Levenberg-Marquardt algorithm. The nodes in the hidden layer were varied to configure the best-fitting model. The best structure of the ANN model in this study is the model with one hidden layer and 20 nodes. This study compares the significance of adopting a data set between differential data with time series and raw data. The application of the differential data set exhibits better performance in predicting the indoor air temperature increase or decrease than that of the raw data. The prediction precision between the simulation and the ANN model when adopting the differential data is higher than that of raw data by 18%. This study discovered a new simple method and verified that a simple control strategy has been achieved by predicting the window operations using the increase or decrease in indoor temperatures via the ANN application.


Introduction
Artificial intelligence (AI) is becoming more prevalent in several applications that are adopted for various purposes. Its definitions are harnessed and referenced in several ways. In a simple definition by an online dictionary [1], AI is a branch of computer science that deals with the simulation of intelligent behavior in computers; in addition, it is the ability of a machine to imitate human intelligence. In 2004, John McCarthy [2] defined AI as "the science and engineering of creating intelligent machines, especially intelligent computer programs, which is similar to the task of using computers to understand human intelligence, but not confined to biologically observable methods." AI is broadly categorized into two branches: expert systems and artificial neural networks (ANNs) [3]. An expert system is a logic program that employs computers to make decisions, while an ANN is implemented on computers that are not programmed to perform a specific task. In addition, is a simulation of human biological brains comprising interconnections of collected data.
In the building sector, AI is adopted to enhance building performance, increase energy efficiency, reduce energy consumption, and improve the comfort and satisfaction of occupants. Kalogirou et al., (2001) [3], presented the various applications of ANNs in renewable energy problems. Another review work, an assertion paper [4], presented the potential of ANNs as design tools in many areas of building energy fields. Kalogirou et al., (2000) [5], attempted to generate a training data set by first adopting a simulation program (ZID), and then developing ANNs to model the thermal behavior of a building and predict the energy consumption in a passive solar building. The heat load of buildings was estimated by adopting a backpropagation neural network developed on a MATLAB toolbox and then compared to the results of a conventional calculation. Accordingly, comparison results exhibited high accuracy [6]. In a recent review [7] related to the modeling and prediction of building energy consumption, the adopted methods include engineering, statistical, and artificial intelligence methods. However, the most widely used artificial intelligence methods are ANNs. Kalogirou et al. (1999) [8], developed an ANN to estimate the energy extracted from solar domestic water heating systems (SDWHs) and the temperature in stored water. Their objective was to adopt the developed ANN as a tool for estimating the performance of SDWHs.
The ANN presented in another study [9] was used to model the thermal behavior of a building's space and predict its indoor temperature. For this application, four inputs were adopted: outdoor temperature, solar irradiance, indoor temperature, and heating system control signal. The proposed ANN was trained by the Levenberg-Marquardt algorithm. The activation function adopted with the input and output neurons was linear; however, in the hidden neurons, it took a sigmoid form. Natural ventilation is a crucial parameter in creating a conducive indoor air environment. However, it is difficult to operate the building with a naturally ventilated scheme and complex. To predict indoor air environments, ANNs have been developed by several researchers to predict and achieve conducive environments.
An application of machine learning (ML) with reinforcement learning to control indoor air temperature and humidity was achieved in Miami and Los Angeles throughout the year [10]. The predictive control model, which adopts ML on a natural ventilation application, significantly improved the building performance. The research developed ML to create a model predictive control and control ventilation systems with four different models, [11]. The baseline building was set under four different climate zones in the USA: Atlanta, Los Angeles, San Francisco, and Seattle. The neural network was the best method for controlling all phases under three different modes (natural ventilation (NV), air-conditioning (AC), and transition between NV and AC). An ANN model was applied to predict the natural ventilation rate in bedrooms at nighttime [12]. The 24 apartments in the cities of Chongqing and Chengdu, China, were selected and obtained data from them as a data set. The developed ANN model exhibited high accuracy in predicting the quality of natural ventilation in the buildings. This research suggested that engineers can evaluate indoor air quality by using this model as a guideline. Another research had validated the ANN model feasibility for predicting air velocity and distribution by comparing and training with computational fluid dynamics (CFD) [13]. This study exhibited the variations of pre-data processing that significantly impact the ANN model. Another work [14], adopted the CFD model to generate the database for training and validating an ANN model. The objective of this study was to create a meta-model and setup guidelines by optimizing window designs, to achieve thermal comfort in naturally ventilated buildings. In several buildings, the natural ventilation rate (NVR) was also designed as an index to calculate the amount of airflow and identify indoor air quality. Predictive models for estimating NVR were developed and investigated using eight ML models [15]. The data set of this study were collected from an existing office building in Daejeon, Republic of Korea. In a temperate climate such as the UK, heat loss occurred during the heating season in several buildings that employed operable windows for natural ventilation. An artificial intelligence-powered camera was used to develop ML with a deep learning network and create control strategies for window operations, to reduce heat loss by identifying the windows operating in actual time, [16].
As stated by several literature reviews, the integrations of ML techniques such as ANN are beneficial in controlling engineered natural ventilation and in other fields such as chemical engineering, [17]. However, training an ANN usually requires big data, and data is limited in a practical situation. A crucial challenge in the application of ANNs in building fields is the amount of training data required to generate an optimal model. The data pre-processing based on fundamentals of physics for the ML model was developed under data sparsity in the building operation, [18].
The general operations of naturally ventilated buildings are required to be carefully designated and controlled. Nevertheless, the most prevalent problem among occupants is the noise generated during natural air ventilation. Another problem is the accuracy of control strategies defined in natural ventilation. A parameter commonly used in control strategies is the instant air temperature. If there is a big data set of an indoor thermal environment, the indoor air temperature has been possibly predicted by ML. According to the facts, a representative barrier is the difficulty in assembling a sufficient training data set to directly estimate the indoor thermal environment. An indoor thermal environment created by engineered natural ventilation principally depends on unique individual building features. Therefore, it is difficult to obtain a sufficient data set while the interval of operating the target building is underutilized. Therefore, an approach has to be analyzed to introduce significant information as an obtained data set for controlling engineered natural ventilation from a single target building with a limited amount of data.
A building needs a few control actions to maintain a comfortable indoor temperature when the indoor temperature exceeds or drops below the target temperature. The opening or closing of natural ventilation windows can be defined as a simple control strategy. The window operation, whether opened or closed with a consequent increase or decrease in indoor temperature, can be exploited to determine the required action to take. However, under the condition that the amount of data is insufficient in predicting the indoor air temperature itself, the window operation remains beneficial. Nevertheless, control of the opening size has not always been linear to the indoor thermal environment because the indoor thermal environment with the engineered natural ventilation mode has mainly been influenced by weather conditions and the building's use patterns, which are related to internal heat generations. Hence, in addition to weather data, the prediction requires data on the building's use patterns. Based on the conditions of engineered natural ventilation, proportional relationships exist between the indoor and outdoor air temperatures as internal heat generators. Under these contexts, the information on the increase or drop in outdoor temperature, as the internal heat generation increases or decreases, must be sufficiently dominant to predict between two choices: increase or decrease in indoor temperatures.
Based on this hypothesis, this research investigates the significance of conducting the training data set with time series differentials by comparing them to the direct usage of the data set. Another objective is to exploit the increase or decrease of indoor temperatures to predict the status of window operations.

Simulation setting for creating data set to train ANN model
In this study, a virtual building [19] is used for simulation, a general office building that has been reliably used to simulate the potential performances of Japanese buildings, as presented in Figure  in this case study, the height of all windows has been modified from the reference model adapted to a present ordinary feature that typically utilizes enlarged openings. The model has seven floors, and the floor plan of each floor, except the 3 rd floor designated for studying natural ventilation, has been illustrated ( Figure 2). This study defines opening and vent to allow EnergyPlus is auto-generating natural flow. The 3 rd floor is selected because to create stack effect, the selected floor should be the floor that has negative airflow pressure to draw airflow in. The floor plan of Office 1, which was used to assess natural ventilation flow is illustrated in Figure 3. The material and window properties used to construct the models are written in Tables 1 and 2. To calculate the thermal heat transfer of the analyzed floor (3 rd floor), It was assumed that there is no heat exchange between adjacent floors (2 nd and 4 th floors). Void spaces in the building were merged into Office 1, to become a stack for ventilating   [20]. In addition, the neutral pressure level around two-thirds of the building height is 22 m. The indoor air temperatures under the natural ventilation condition are determined on the Design Builder software, [21]. The weather file adopted in this study contains data obtained from the Japan Meteorological Agency Weather Data of Tokyo, Japan, from the year 2016-2019. The natural ventilation is extensively operated during the months of April and May, every day between 7 am and 8 pm. Outside this specified time, the mechanical ventilation systems are turned on at 0.5 ac/h, to complete the 24-h ventilation of this building. According to virus pandemics, improving ventilation can help prevent virus particles from accumulating interior, [22]. The easiest method is open windows. If it is possible to open windows safely, Intake of fresh air can help clear out the virus indoors. In Figure 3, this study defines a specific configuration example by setting two of seven windows always opened as the fixed-opening windows. The other windows are on a mixed-mode operation as operable windows that have been opened when the outdoor temperature is over 20 C.
For the internal heat load in the Office 1 zone, the operation schedules are based on the standard Japanese building simulation. The occupancy density is 0.1 people/m 2 , except on the third floor, which has an occupancy density of 0.08 people/m 2 . The occupancy schedule is presented in Figure 4.
During custom schedules, the office equipment has a power density of 12 W/m 2 , as shown in Figure 5, except on the third floor, which has a power density of 8 W/m 2 . The lighting power density in the occupied zone has constantly been set at 7 W/m 2 , and its schedule is presented in Table 3.

ML approaches with ANN
This study attempts to conduct ML applied with an ANN model to a naturally ventilated building in Japan. The platform that has been adopted in developing ANN is MATLAB with the deep learning toolbox, [23]. A feedforward neural network is the simplest ANN that transfers data from input layers, passes through hidden layers, then finally to output layers. A fitnet function fitting neural network with a hidden layer size is illustrated in Figure 6. Most of the neural network application has been trained by Levenberg-Marquardt because it performed the best among other algorithms, [24]. Accordingly, this study trained the neural network by using the Levenberg-Marquardt algorithm.

Design of ANN and data set preparation
As aforementioned, this study adopts the Levenberg-Marquardt algorithm to train the ANN model. The hyperbolic tangent sigmoid transfer   function used in a hidden layer and the linear activation function used in the output layer is selected as the activation function because these two functions are mentioned in ref. [24], that it is most used and represented with the best performance. In general, there is no exact guideline on how to define the number of nodes (N); therefore, the number of nodes (N) in a hidden layer can be configured by varying sizes to achieve the best-fit model. In this study, the number of nodes (N) was preliminarily investigated as 15, 20, 25, and 30 nodes. The network performances of the trained model have been evaluated by adopting the mean square error (MSE) to determine the best model. Smaller MSE values indicate better performance. Another index that points to the network performance of the trained model is the correlation coefficient (R-value). The R-value is an indication of the relationship between the outputs and targets. If the R-value is equal to one, this indicates that a precisely linear relationship exists. However, if the R-value is close to zero, then there is no linear relationship between outputs and targets. In developing an ANN model, another test performance is required for its clarification by applying unknown data that have not been used in the training model to test its prediction. The test performances and number of node indexes in this study are presented in terms of standard deviation (S.D.) and percentage of positive direction (PP). In this study, the correlation of indoor air temperatures alternating between predicted and simulated values has been presented in terms of PP. This term implies that the percentages of the predicted and simulated values move together in the same direction when one variable increases as the other increases. The neural network model has been tested in this paper; however, there is a universal variety of ML algorithms. Therefore, other ML learning algorithms that aim to solve regression problems will be tested and compared. A support vector machine (SVM) is selected to compare with the ANN model because it is a good ML tool for small data sets and is efficient. Furthermore, the SVM model with a linear kernel function is comprehensive and not expensive for computation like the ANN model, [25]. The SVM model has also been developed on the identical platform by using the function fitrsvm with a default setting, the linear kernel function, and solving the problem by Sequential Minimal Optimization (SMO).

Data description and feature selection
The weather conditions, internal heat generation conditions, and indoor air temperature history have been adopted as the feature variables in ML modeling. The indoor temperature change and the status of temperature increase or decrease have been set as the main objective functions to be predicted. The change in air temperature between the previous and current hours has been considered to help in deciding to open or close the windows. If the temperature increases, compared to the previous hour, the windows should be opened to ventilate the room and reduce excessive heat. When the temperature decreases, the windows should be shut. The indoor air temperatures of the previous 1 h and 2 h have been used as predictors in the data set. The weather data of outdoor   parameters on time and 1 h before, which are outdoor dry-bulb temperatures, wind speed, and solar incident on windows are included in the data set. The internal loads on time and previous 1 h in the building, lighting load, equipment load, and occupants load are contained in the data set. In addition, the statuses of the windows on time and 1 h before have been adopted as a predictor of the data set. Descriptive statistics of the data used for the ML model are shown in Table 4. Training data includes hourly data from 2016 to 2018. The testing data contains data from the year 2019. The simulation periods, April and May, are 61 days. In addition, the hourly data from 9:00 to 19:00, 10 data per day, are adopted.
For preliminary investigation, the building simulation is conducted in the first two weeks of April to verify that ML modeling is sufficient to predict indoor air temperature and totally agrees with the window operation status. In Japan, the preferred indoor air temperature for comfort ranges between 24 C and 30 C in the natural ventilation mode, [26]. Ventilating natural flow inside by opening a window and referring to indoor air temperature, the temperature setpoint for controlling the window, open or close, should be set at the minimum of the comfort range to cover the all comfortable range while still ventilating airflow. This reason leads to defining the comfortable indoor air temperature at 24 C as one of the criteria for a simple control strategy for this study. So if the indoor air temperatures in this period are less than 24 C, it has been demonstrated that there is straightforwardly no need to open any window within this period. In addition, the predicted indoor air temperature by ML modeling (both ANN and SVM) examines its accuracy by comparing it to the simulation results. For the data set preparation, training data obtain in three years, from 2016 to 2018, have been adopted, with a total of 1830 data. The data for the created ML model in the first two weeks of April 2019 have been used as a test data set with 140 data.
At the second step of this study, the prediction accuracy of the ML model that directly adopts the feature variables has been compared with the results of the improved ML model using the data differences in the feature variable histories. At this stage, a total of 1830 data in three years, from 2016 to 2018, are used for the training to create the ML model. The prediction results under the developed ML model in 2019, a total of 610 data per year, are available for ML modeling and checked by comparing the energy simulation outputs.
At the next step, the extent to which the usage of data differences contributes to the improvement has been investigated. In general, the increase in the quantity of the data set contributes to improving the prediction accuracy. The simulations by changing starting different days of the week have been made to create bigger training data because of data limitations. Then, the number of training data is increased by changing the day of the week for the first day in the energy simulation. Originally, the day of the week to start the simulation is set to Monday. By changing the setting to Tuesday, Wednesday, Thursday, and Friday, the training data increases by 5 times. In total, 3050 data per year are available, and 9150 data obtained in three years are available as the training data set. The case studies of selecting features for the ML model are presented in Table.5.

Results and discussion
Prediction performances of the ML model by ANN in this study are assessed by the Mean Square Error (MSE), Correlation Coefficient (Rvalue), Standard Deviation (S.D), and Percentage of Positive direction (PP). The decrease in the MSE value and increase in the R-Value indicate better performance. In addition, in the case when S.D. is lower and PP is higher, the performance is also better. In the preliminary studies Case 1 and 2, the beginning of this study attempts to estimate the possibilities of using the data set to predict the operating status of windows while still achieving comfortable indoor air temperature. The number of nodes has been investigated to configure the best ANN structure for this research. In the case of numbers 1 and 2, the amounts of training data are equal at 1830 data. The data type of Case 2 is a differential value, while Case 1 is   raw data. The data in the first two weeks of April are used for both 140test data. The training and testing performance indexes are presented in Figures 7 and 8. To determine the best model for this research, all indexes have to be considered together. However, the most significant index for this research is the PP index for indicating the change in indoor air temperature to make a decision on the window status in the next step. From the results, the best test performance index is a model of Case 2 with 20 nodes at the highest PP of 100%, together with S.D., MSE, and R-value 0.1728, 0.0311, and 88.28%, respectively. The momentum update (MU) and gradient of the best ANN model in case 2 are 0.00001 and 0.1079 at epoch 13, respectively. In the comparison between the performance of the ANN model and SVM model, as in Table 6. For the raw data set, the percentage change of case 1 in MSE of ANN is lower than SVM by approximately 1.3%. The percentage change of case 1 in the R-value of ANN is higher than SVM by approximately 0.1 %. The percentage change of case 1 in the S.D. value of ANN is higher than SVM by approximately 14%. In addition, the percentage change of case 1 in PP of ANN is higher than SVM by approximately 67%. For the differential data set, the percentage change of case 2 in MSE of ANN is higher than SVM by approximately 1.2%. The percentage change of case 2 in the R-value of ANN is higher than SVM by approximately 0.4 %. The percentage change of case 2 in the S.D. value of ANN is lower than SVM by approximately 9%. In addition, the percentage change of case 2 in PP of ANN is higher than SVM by approximately 1%.
Even the learning index performances of SVM when using differential data exhibit slightly better performance than the ANN model; however, the test indexes' performances of ANN are better than those of SVM. Additionally, the most significant index for this study is the PP index, as mentioned above. Therefore, the performance of the ANN model outperformed the SVM model in this study which is similar to research about predicting water footprint that discovered that the ANN performance is better than the SVM model, [27].
The results above demonstrate and confirm that there is no need to open the windows under the condition of indoor temperatures lower than 24 C because it will be too cold if it is opened. The harmonization between the ANN and simulation outputs of air temperature that change gradually are presented in Figure 9.
In Figure 9, the results of indoor air temperature trends can indicate how to plan the status of the operable window. Regardless of the temperature trends (increase (positive value) or decrease (negative value) of the indoor air), if the indoor air temperature is less than 24 C, the   operable windows will be closedassigned the binary number as 0. If the trends of the indoor air temperatures increase (positive value) or decrease (negative value), but the current air temperature is less than 24 C, then the operable windows will not change from their previous status assigned in the graph as 0.5. If the trends of the indoor air temperatures increase (positive value) along with the air temperature greater than 24 C, then the operable windows will be openedassigned a binary number as 1.
Consequently, the data set with differential predictors is sufficient in predicting the operating status of windows and indoor air temperatures for a larger data set in the future by adopting one hidden layer of the neural network model with 20 nodes. The learning performance and testing performance indexes of Cases 3 to 6 are presented in Figures  The last analysis has evaluated the sizing of the data set for the ML model. In this section, the increasing amounts of raw data set in Cases 5 and 6 are 5490 and 9150, respectively, which have an identical size of test data at 610. The learning performance indexes of Case 5 are MSE and R-values of 0.0240 and 99.85%, respectively. The test performance indexes are S.D. and PP values of 0.1850 and 80.79%, respectively. When using the data of Case 6, the learning performance indexes are MSE and R-value of 0.0216 and 99.86%, respectively. The test performance indexes are S.D. and PP of 0.1772 and 78.98%, respectively. This implies that when more training raw data sets are employed, the ML model exhibits better performance.
In the comparison between the application of raw data (Case 3) and differential data (Case 4), as in Figure 10, the percentage change in MSE    of Case 3 is lower than Case 4 by approximately 4%. The percentage change in the R-value of Case 3 is higher than Case 4 by approximately 12 %. The percentage change in the S.D. value of Case 3 is higher than Case 4 by approximately 7%. In addition, the percentage change in PP of Case 3 is lower than Case 4 by approximately 20%. Even the learning index performance of Case 3 exhibits a better performance than Case 4; however, the test index performances of Case 4 are better than those of Case 4. Similar to Cases 5 and 6, the learning performance of both cases has been improved better than the case in which the differential data set (Case 4) was adopted; however, the test index performance of Case 4 has still better than other cases. Based on the results above, the applications of the raw data exhibit a lower performance to predict the change in the indoor air temperature. This implies that the differential data set exhibits significantly higher performances in terms of the prediction operating status of windows and the change in air temperatures. The changes in the indoor air temperature from the ANN and simulations have been presented in Figure 12. This result is crucial in deciding the boarding of natural ventilation through windows in any building. The use of the differential data set exhibits high performance in predicting the change in the indoor air temperature and helps to predict the window status beforehand.

Conclusion
In this research, a feedforward ANN is developed to predict the indoor air temperature and define the status of operable windows for a naturally ventilated building in Japan. This study is preliminary research that boards of natural ventilation in the office building during the Spring season when the building is under moderate temperatures with no storms. This study presented a simple control strategy for natural ventilation, exploiting the increase or decrease in indoor air temperatures to predict the status of the operable windows. Most predictive models require big data; however, information from actual buildings such as newly operated or performed buildings has insufficient data. This study employs a relevant data set that can be obtained from most buildings and general weather information. The predictors in this study are indoor temperature, outdoor temperature, wind speed, solar incident on windows, window status, lighting load, occupancy load, and equipment load. This study determines the prediction performances of adopting the raw and differential data sets. The results obtained from the building simulation were used to train, test, and validate the ANN model.
In the preliminary study, the best ANN model structure for predicting the trends of indoor air temperature was the ANN model with one hidden layer and 20 nodes by adopting differential data and training model with the Levenberg-Marquardt algorithm. The learning indexes (MSE and Rvalue) obtained using raw data exhibited higher performances than the case with differential data by approximately 13%. However, the most important objective of this predictive research is to adopt the increase or decrease in indoor air temperatures to predict the window status in advance. From this point, the PP testing index has the most priority for analysis. The PP and S.D. of using the differential data are 100% and 0.1728 in the preliminary study, respectively.
The predictive preliminary result from the ANN model was beneficial in predicting how to set the operable windows by including the current indoor air temperature for configuring the window status. In the case of enlarging the test data set, the predictive model for configuring the window exhibits a negligible of approximately 1%. The use of raw data in the ANN model exhibited an optimal performance in the case with a big data set. The research demonstrated that the adoption of the differential data set with the time series exhibited significantly higher performances than the case with the raw data, which includes a small amount of data.
This study presented the advantages of using differential data for prediction and solving the problem of insufficient information from an existing building. In addition to using the differential data set, the outcome of predicting the increase and decrease in indoor temperatures used in the control of window status beforehand can be adopted as guidelines.
This study was conducted for a specific building under specific parameters. This study verified that it is an optimal start to conduct a novel approach to applying the simple ANN for natural ventilation control. However, this method will be applicable to modify another building under different seasons or different climate zones in future works.

Disclosure
The authors declare that we have no conflict of interest, competing financial interests, or personal relationships that could have appeared to influence the work reported in this paper.

Declarations
Author contribution statement Thanyalak Srisamranrungruang, Kyosuke Hiyama: Conceived and designed the experiments; Performed the experiments; Analyzed and interpreted the data; Contributed reagents, materials, analysis tools or data; Wrote the paper.