The Development of a Low-Cost Particulate Matter 2.5 Sensor Calibration Model in Daycare Centers Using Long Short-Term Memory Algorithms

: Particulate matter (PM) pollution is a crucial environmental issue. Considering its adverse health impacts, especially on children’s immune systems, Korean regulations require annual PM 2.5 measurements in daycare centers. Therefore, we developed a low-cost PM 2.5 sensor calibration model for measuring the indoor PM concentrations in daycare centers using long short-term memory (LSTM) algorithms. Moreover, we trained the model to predict the PM 2.5 based on temperature and humidity, and optimized its hyperparameters. The model achieved a high accuracy and outperformed traditional calibration methods. The optimal lookback period was 76, which led to a high calibration performance with root mean and mean squared errors, a coefﬁcient of determination, and mean absolute errors of 3.57 and 12.745, 0.962, and 2.7, respectively. The LSTM model demonstrated a better calibration performance than those of the linear (r 2 = 0.57) and multiple (r 2 = 0.75) linear regression models. The developed calibration model provided precise short-term measurement values for the optimal management of indoor PM concentrations. This methodology can be applied to similar environments to obtain new learning and hyper-parameters. Our results will aid in improving the accuracy of low-cost sensors for measuring indoor PM concentrations, thereby providing cost-effective solutions for enhancing children’s health and well-being in daycare centers and other multiuse facilities.


Introduction
Recently, particulate matter (PM) warnings have increased in South Korea, leading to growing concerns regarding the harmful effects of PM 10 and PM 2.5 [1]. In particular, PM 2.5 pollution has become a substantial environmental issue and caused an increased interest in the social costs associated with PM because of its severe health consequences. According to the World Health Organization (WHO), Geneva, Switzerland, air pollution contributes to approximately three million premature deaths globally, and approximately 70% of these deaths occur in southeast Asia and the Western Pacific. Globally, only 1 out of every 100,000 individuals residing in cities lives under conditions that meet the WHO air quality standards [2]. Furthermore, infants and young children have more vulnerable immune systems than those of adults and are therefore susceptible to pollutants, owing to their high air intake per unit of body weight [3].
A study investigating the impact of PM 2.5 concentration on asthma hospitalization rates elucidated that the probability of hospitalization increased by 1.05% for every 10 µg/m 3 increment in the under 15 age group. Furthermore, the risk of hospitalization increased significantly in the 0-4 age group, with a 1.60% increase in risk for every 10 µg/m 3 increment [4]. Thus, accurate and timely information regarding changes in PM concentrations is urgently required to enable effective and timely responses to these changes.
Castell et al. [12] installed low-cost sensors for NO 2 monitoring in 17 Oslo kindergartens and generated a detailed air quality map by merging the sensor data with urban model data, thereby improving the map and providing information to the staff and parents of the participating kindergartens. Park et al. [22] collected fine dust data from the Seoul area from 2005 to 2016 and evaluated the performance of a fine dust prediction model using linear regressions, reproducible neural networks, and LSTM. They found that LSTM improved the performance of the root mean squared error (RMSE) by 500% compared to the prior regressions. In a large building at Qatar University, Doha, a low-cost sensor-based internet of things (IoT) system was used to measure the indoor air quality (CO 2 , CO, SO 2 , NO 2 , O 3 , and Cl 2 ) and evaluate its suitability and scalability [25].
Hagan et al. [26] evaluated the performance of low-cost electrochemical sensors for SO 2 measurements in Hawaii and compared them with that of a regulatory-grade instrument based on the FRM. To calibrate the sensors, they tested the performance of three algorithms: linear and hybrid linear nonparametric regressions and k-nearest neighbor (k-NN). The k-NN correction performed exceptionally well, with the RMSE, MAE, and coefficient of determination (r 2 ) being less than 7 ppb and 4 ppb and greater than 0.997, respectively.
Sayahi et al. [27] conducted a study in Salt Lake City over a period of 320 d from 2016 to 2017. They evaluated the performances of low-cost fine PM sensors (Plantower PMS), comparing them with that of a reference instrument (TEOM) at the same location. During the winter, PMS-1003 overestimated the PM 2.5 concentrations by a factor of 1.89 (compared to TEOM (PM 2.5 < 40 µg/m 3 )), whereas PMS-5003 overestimated the PM 2.5 concentrations by a factor of 1.47. Furthermore, one of the sensors exhibited a similar performance to that of the reference instrument. This study emphasized that various correction factors and seasonal and conditional calibrations are required for the same sensor model.
Zimmerman et al. [28] used low-cost sensors and reference equipment for measuring the air quality (CO 2 , CO, NO 2 , and O 3 ) at the Carnegie Mellon University Campus, Pittsburgh, from August 2016 to February 2017. They calibrated the low-cost sensors using linear and multiple linear regression analyses and machine-learning-based random forest (RF) models of the data obtained in the laboratory and field. The RF model matched the other calibration models for the CO measurement and performed substantially better than the other models for the NO 2 , CO 2 , and O 3 measurements. Furthermore, its accuracy and precision improved over the 16-week testing period.
To understand the characteristics of fine dust, this study evaluated the performance and calibration of low-cost fine dust sensors in the indoor environment of child daycare centers, where FEM meters were installed. Furthermore, we used these results as basic data for improving and managing future indoor air quality.
Our findings will aid in the development of indoor activity guidelines for the optimal management of indoor PM concentrations.

Location and Design
To analyze the PM characteristics, we measured the PM 10 concentration from 6 October to 31 December 2018 (86 d) at a daycare center in Incheon Metropolitan City, South Korea, where an indoor air quality measurement network was established ( Figure 1). Furthermore, we evaluated and calibrated a beta-ray absorption method (FEM) meter and low-cost PM sensor. Table 1 represents the specific specifications and characteristics of the equipment (low-cost sensor and FEM) used in this study.

Evaluation and Calibration of Sensor Performance Data
The performance evaluation and calibration of the low-cost fine dust sensors were conducted using repeatability experiments performed in laboratory chambers and comparison measurements via automatic beta-ray meters, which were calibrated using the national reference system in the environmental atmosphere. Based on the results of the comparative measurements at the same location as a beta-ray meter in an indoor environment, multiple regressions and recurrent neural networks (RNNs) were calibrated and used for the performance evaluation and calibration of the low-cost fine dust sensors [26,[28][29][30].

Multiple Regression Analysis
A regression analysis is a statistical method that predicts how explanatory variables (of a response variable) affect a response variable, where changes in the response variable can be interpreted with respect to the explanatory variable [31]. A multiple regression analysis and the least squares method, which minimizes the sum-of-squares errors and predictor variables, were used to derive a linear regression equation (Equation (1)) that predicted the change in the dependent variable, owing to the changes in two or more independent variables [32].
In addition, when Equation (2) is calculated for n data points, the regression equation has the same matrix form as that in Equation (3).

Evaluation and Calibration of Sensor Performance Data
The performance evaluation and calibration of the low-cost fine dust sensors were conducted using repeatability experiments performed in laboratory chambers and comparison measurements via automatic beta-ray meters, which were calibrated using the national reference system in the environmental atmosphere. Based on the results of the comparative measurements at the same location as a beta-ray meter in an indoor environment, multiple regressions and recurrent neural networks (RNNs) were calibrated and used for the performance evaluation and calibration of the low-cost fine dust sensors [26,[28][29][30].

Multiple Regression Analysis
A regression analysis is a statistical method that predicts how explanatory variables (of a response variable) affect a response variable, where changes in the response variable can be interpreted with respect to the explanatory variable [31]. A multiple regression analysis and the least squares method, which minimizes the sum-of-squares errors and predictor variables, were used to derive a linear regression equation (Equation (1)) that predicted the change in the dependent variable, owing to the changes in two or more independent variables [32].ŷ In addition, when Equation (2) is calculated for n data points, the regression equation has the same matrix form as that in Equation (3).
Atmosphere 2023, 14, 1228 where x denotes the value describing the variable to be predicted as the kthŷ predictor and y is a response variable associated with the predictors. In this study, corrections were made using the temperature, humidity, CO 2 , and holiday (no school) data measured at the daycare centers.

RNN and LSTM
RNNs can process long sequence information; however, their performance decreases as the length of this sequence information increases. This is called the long-term dependency problem. LSTM is a variant of the RNN model used to overcome this problem [8,33]. The FEM meter and low-cost sensor measurements were corrected based on LSTM ( Figure 2) and an artificial neural network that recognized patterns in the time-series data.
where x denotes the value describing the variable to be predicted as the kth predictor and is a response variable associated with the predictors. In this study, corrections were made using the temperature, humidity, CO2, and holiday (no school) data measured at the daycare centers.

RNN and LSTM
RNNs can process long sequence information; however, their performance decreases as the length of this sequence information increases. This is called the long-term dependency problem. LSTM is a variant of the RNN model used to overcome this problem [8,33]. The FEM meter and low-cost sensor measurements were corrected based on LSTM ( Figure  2) and an artificial neural network that recognized patterns in the time-series data. LSTM comprises four layers with a recursive architecture. The core of LSTM is a continuous cell state called a conveyor belt that enters through the gate. The data from the conveyor belt are transmitted without any changes. LSTM can add or delete information through the input, forget, and output gates. The gates transmit information preemptively and continue learning by removing previous data. The mathematical formula for LSTM, which is calculated using the LSTM gate vector, is as follows.
• ℎ , LSTM comprises four layers with a recursive architecture. The core of LSTM is a continuous cell state called a conveyor belt that enters through the gate. The data from the conveyor belt are transmitted without any changes. LSTM can add or delete information through the input, forget, and output gates. The gates transmit information preemptively and continue learning by removing previous data. The mathematical formula for LSTM, which is calculated using the LSTM gate vector, is as follows.
Atmosphere 2023, 14, 1228 6 of 13 where f t is a forget gate vector weight that remembers the previous cell state; i t is an input gate vector weight that obtains new information; o t is an output gate vector that selects an output candidate; x t is the input vector; h t is the output vector; c t is a cell state vector; W, U, and b are a parameter matrix and vector, respectively; and f t , i t , and o t are the gate vectors. σ and tanh are the sigmoid and hyperbolic tangent functions, respectively, which are the two types of activation functions used in LSTM.

Sequence Data Generation
LSTM learns data using sequence data. Therefore, the stream of fine dust measurement data was first converted into sequence data for use as input data. We used the Riding Studio method to convert the time-series data stream into a sequential dataset (Figure 3).

Outlier Removal
Outliers are observations that are out of touch with most data values and are likely to distort the analysis results. Therefore, it is important to identify outliers before performing data modeling or an analysis. We removed outliers using the Grubb test, which detects the outliers in a dataset.  Table  2. In the indoor environment of the daycare center, the average concentrations of fine dust were 28.9 μg/m 3 and 41.9 μg/m 3 for the beta-ray absorption and light-scattering methods respectively. Generally, the light-scattering method exhibited a higher level of

Outlier Removal
Outliers are observations that are out of touch with most data values and are likely to distort the analysis results. Therefore, it is important to identify outliers before performing data modeling or an analysis. We removed outliers using the Grubb test, which detects the outliers in a dataset.  Table 2. In the indoor environment of the daycare center, the average concentrations of fine dust were 28.9 µg/m 3 and 41.9 µg/m 3 for the beta-ray absorption and light-scattering methods, respectively. Generally, the light-scattering method exhibited a higher level of measurement than that of the beta-ray absorption method. Light-scattering methods yield higher values than those of beta-absorption methods. The beta-ray absorption equipment was not operational during the device inspection and stabilization from 12 to 21 November 2018 (until 17:00). Thus, this period was excluded from the analysis, and corrections were performed accordingly. Table 2 represents the statistical information for the data sets sampled from the low-cost PM 2.5 sensors and FEM (beta-ray) instruments. The data (temperature, humidity, CO 2 , and weekdays) set is used to verify the accuracy performance of the calibrated results. 2018 (until 17:00). Thus, this period was excluded from the analysis, and corrections were performed accordingly. Table 2 represents the statistical information for the data sets sampled from the low-cost PM2.5 sensors and FEM (beta-ray) instruments. The data (temperature, humidity, CO2, and weekdays) set is used to verify the accuracy performance of the calibrated results.

Linear Regression
Using the hourly measurement data obtained from the beta-ray absorption method as a reference, a scatter plot was generated by averaging the 1 min data obtained from the light-scattering method. The resulting scatter plot is illustrated in Figure 4. A linear regression analysis of the data yielded a regression formula similar to Equation (10). The correlation coefficient (R) and r 2 between the beta-ray absorption and light-scattering methods were 0.76 and 0.57, respectively. The comparison tests between the light-scattering method sensor used in this study and similar sensors tested using the FEM equipment in the field exhibited slightly higher performances, with PMS1003 at R 2 = 0.73-0.97 and PMS3003 (r 2 ) ( Figure 5) [34]. Additionally, the comparison analyses between the PM 2.5 sensors located at the same position as the FEM equipment had r 2 values in the range of 0.33-45 [33]. FEM = 1.10 × Sensor + 9.17 (10)

Multiple Linear Regression
A multiple regression analysis was performed to determine the influence of environmental factors (temperature, humidity, CO 2 , and holiday information, etc.) on the FEM and light-scattering fine dust concentrations in the daycare centers. The r 2 for each influencing factor is indicated in Table 3, and the regression equation is as follows. in the field exhibited slightly higher performances, with PMS1003 at R 2 = 0.73-0.97 and PMS3003 (r 2 ) ( Figure 5) [34]. Additionally, the comparison analyses between the PM2.5 sensors located at the same position as the FEM equipment had r 2 values in the range of 0.33-45 [33]. FEM = 1.10 × Sensor + 9.17 (10) Figure 5. Comparison of PM2.5 mass concentration between the federal equivalent method (FEM) meter (beta-ray) and low-cost sensor.

Multiple Linear Regression
A multiple regression analysis was performed to determine the influence of environmental factors (temperature, humidity, CO2, and holiday information, etc.) on the FEM  The relationship between the FEM and light-scattering fine dust concentrations was significant, with a modified r 2 of 0.75. It was at the Tier II level, as suggested by the US Environmental Protection Agency's "Air Sensor Guidebook". The multiple regression analysis correction results based on the correction formula are illustrated in Figure 6. and light-scattering fine dust concentrations in the daycare centers. The r 2 for each influencing factor is indicated in Table 3, and the regression equation is as follows. The relationship between the FEM and light-scattering fine dust concentrations was significant, with a modified r 2 of 0.75. It was at the Tier II level, as suggested by the US Environmental Protection Agency's "Air Sensor Guidebook". The multiple regression analysis correction results based on the correction formula are illustrated in Figure 6.   Atmosphere 2023, 14, x FOR PEER REVIEW 9 of 13 version 2.2.2 were used to implement the prediction and calibration models, and the results were generated accordingly. The input data, including the FEM and sensor measurements, temperature, humidity, and CO2, were diverse. Therefore, normalization was performed to convert all the training data into values between 0 and 1 and achieve accurate learning [34]. The values of the LSTM network parameters are crucial for obtaining a good calibration and prediction model. The LSTM parameters used in this study are listed in Table 4. To obtain a highly accurate calibration and prediction model, it is important to determine the hyperparameter values and select an optimizer that minimizes the cost function. In this study, we used Adam, Adamax, and RMSprop for optimization, which exhibited a good performance. The hyperparameters for configuring the model to calibrate the measured values of the low-cost PM sensors based on the FEM data are listed in Table 5.

RNN
For training the data, the hourly measurement data from 6 October to 31 December 2018, were considered as a single instance, resulting in 1675 instances. Generally, deep learning models require separate sets of training and testing data to evaluate the prediction performance of an algorithm. However, this method is susceptible to overfitting, which occurs when a model is overly optimized for training data and therefore performs poorly when applied to new data. Consequently, a cross-validation process was used to evaluate the model performance in the first round and was then applied to the testing dataset for the final evaluation. The final training dataset comprised 64%, 16%, and 20% training, validation, and testing data, respectively. TensorFlow version 1.10 and Keras version 2.2.2 were used to implement the prediction and calibration models, and the results were generated accordingly.
The input data, including the FEM and sensor measurements, temperature, humidity, and CO 2 , were diverse. Therefore, normalization was performed to convert all the training data into values between 0 and 1 and achieve accurate learning [34]. The values of the LSTM network parameters are crucial for obtaining a good calibration and prediction model. The LSTM parameters used in this study are listed in Table 4. To obtain a highly accurate calibration and prediction model, it is important to determine the hyperparameter values and select an optimizer that minimizes the cost function. In this study, we used Adam, Adamax, and RMSprop for optimization, which exhibited a good performance. The hyperparameters for configuring the model to calibrate the measured values of the low-cost PM sensors based on the FEM data are listed in Table 5. The LSTM model was evaluated using an evaluation algorithm based on the difference between the predicted and actual values. Generally, the mean squared error (MSE), RMSE, and square root of MSE are used to measure the error between the two values. Because the prediction can also produce negative results, the RMSE is more suitable than the MSE for measurement. Thus, the RMSE was used as an error measurement tool in this study, and RMSE values close to zero indicated a better performance.
Lookback is a coefficient that determines how much past time interval data should be used for training compared to the reference time of the training data. In this study, the minimum RMSE value over the past 76 h of data collection was determined to be the optimal lookback for calculating the optimal lookback value ( Figure 8).

FOR PEER REVIEW
10 of 13 The LSTM model was evaluated using an evaluation algorithm based on the difference between the predicted and actual values. Generally, the mean squared error (MSE), RMSE, and square root of MSE are used to measure the error between the two values. Because the prediction can also produce negative results, the RMSE is more suitable than the MSE for measurement. Thus, the RMSE was used as an error measurement tool in this study, and RMSE values close to zero indicated a better performance.

(12)
Lookback is a coefficient that determines how much past time interval data should be used for training compared to the reference time of the training data. In this study, the minimum RMSE value over the past 76 h of data collection was determined to be the optimal lookback for calculating the optimal lookback value ( Figure 8).      Figure 9 compares the FEM measurements with the low-cost sensor measurements predicted using the LSTM-RNN model. The FEM measurements and the predicted and calibrated values exhibited no significant differences.  Figure 10 compares the FEM data with the low-cost sensor measurements calibrated using the LSTM model. The r 2 was 0.962, which was more accurate than that of the regression analysis (r 2 = 0.76).
Thus, more accurate values could be obtained using this model by correcting the measured low-cost sensor fine dust data in real time and monitoring these data. The use of low-cost IoT-sensor-based indoor environmental measurement instruments is an economical and user-friendly solution for indoor environment management. However, there are concerns regarding the reliability of the measured values, instability owing to environmental conditions, periodic sensitivity, fatigue testing, and sensor replacement cycles, which have been identified as limitations of low-cost sensors. Therefore, further research  Figure 10 compares the FEM data with the low-cost sensor measurements calibrated using the LSTM model. The r 2 was 0.962, which was more accurate than that of the regression analysis (r 2 = 0.76).
Atmosphere 2023, 14, x FOR PEER REVIEW 11 of 13 is required to address these issues and improve the overall effectiveness of low-cost sensor-based indoor environmental measuring instruments.

Conclusions
In this study, the performance of a low-cost fine dust sensor was evaluated with respect to PM reference measuring equipment by measuring the fine dust in the indoor environment of a daycare center for 3 months (October-December 2018). Furthermore, we developed a correction model based on an LSTM algorithm to improve the accuracy of low-cost sensors for measuring the PM concentrations in daycare centers. The optimal hyperparameters were analyzed, and the performance of the LSTM model was compared with those of the linear and multiple linear regression models. The LSTM model was trained using the data collected via the low-cost sensors and FEM methods. The optimal lookback period was determined to be 76, which resulted in a high calibration performance, with an RMSE, r 2 , MSE, and MAE of 3.57, 0.962, 12.745, and 2.7, respectively. The LSTM model demonstrated a better calibration performance than that of the linear (r 2 = 0.57) and multiple linear regression models (r 2 = 0.75).
These results suggest that LSTM-based correction methods and optimized hyperparameters can be applied to low-cost sensors for measuring short-term changes in the indoor PM concentrations of daycare centers. Furthermore, the calibration model developed in this study can be used to obtain precise short-term measurements of indoor PM concentrations. If the measurement environment of a low-cost PM sensor differs, the methodology used in this study can be similarly applied to obtain new learning and hyperparameter values. Our findings will aid in the development of indoor activity guidelines for the optimal management of indoor PM concentrations. Thus, more accurate values could be obtained using this model by correcting the measured low-cost sensor fine dust data in real time and monitoring these data. The use of low-cost IoT-sensor-based indoor environmental measurement instruments is an economical and user-friendly solution for indoor environment management. However, there are concerns regarding the reliability of the measured values, instability owing to environmental conditions, periodic sensitivity, fatigue testing, and sensor replacement cycles, which have been identified as limitations of low-cost sensors. Therefore, further research is required to address these issues and improve the overall effectiveness of low-cost sensor-based indoor environmental measuring instruments.

Conclusions
In this study, the performance of a low-cost fine dust sensor was evaluated with respect to PM reference measuring equipment by measuring the fine dust in the indoor environment of a daycare center for 3 months (October-December 2018). Furthermore, we developed a correction model based on an LSTM algorithm to improve the accuracy of low-cost sensors for measuring the PM concentrations in daycare centers. The optimal hyperparameters were analyzed, and the performance of the LSTM model was compared with those of the linear and multiple linear regression models. The LSTM model was trained using the data collected via the low-cost sensors and FEM methods. The optimal lookback period was determined to be 76, which resulted in a high calibration performance, with an RMSE, r 2 , MSE, and MAE of 3.57, 0.962, 12.745, and 2.7, respectively. The LSTM model demonstrated a better calibration performance than that of the linear (r 2 = 0.57) and multiple linear regression models (r 2 = 0.75).
These results suggest that LSTM-based correction methods and optimized hyperparameters can be applied to low-cost sensors for measuring short-term changes in the indoor PM concentrations of daycare centers. Furthermore, the calibration model developed in this study can be used to obtain precise short-term measurements of indoor PM concentrations. If the measurement environment of a low-cost PM sensor differs, the methodology used in this study can be similarly applied to obtain new learning and hyperparameter values. Our findings will aid in the development of indoor activity guidelines for the optimal management of indoor PM concentrations. Data Availability Statement: All data analyzed or generated during the study are included in the manuscript. The URLs of the data used in the study are provided for access to the detailed data.