An Internet of Things System for Underground Mine Air Quality Pollutant Prediction Based on Azure Machine Learning

The implementation of wireless sensor networks (WSNs) for monitoring the complex, dynamic, and harsh environment of underground coal mines (UCMs) is sought around the world to enhance safety. However, previously developed smart systems are limited to monitoring or, in a few cases, can report events. Therefore, this study introduces a reliable, efficient, and cost-effective internet of things (IoT) system for air quality monitoring with newly added features of assessment and pollutant prediction. This system is comprised of sensor modules, communication protocols, and a base station, running Azure Machine Learning (AML) Studio over it. Arduino-based sensor modules with eight different parameters were installed at separate locations of an operational UCM. Based on the sensed data, the proposed system assesses mine air quality in terms of the mine environment index (MEI). Principal component analysis (PCA) identified CH4, CO, SO2, and H2S as the most influencing gases significantly affecting mine air quality. The results of PCA were fed into the ANN model in AML studio, which enabled the prediction of MEI. An optimum number of neurons were determined for both actual input and PCA-based input parameters. The results showed a better performance of the PCA-based ANN for MEI prediction, with R2 and RMSE values of 0.6654 and 0.2104, respectively. Therefore, the proposed Arduino and AML-based system enhances mine environmental safety by quickly assessing and predicting mine air quality.


Introduction
The harsh and confined working conditions in underground coal mines (UCMs), have led to the listing of the mining industry as the most dangerous profession [1]. In recent years, the adoption of sophisticated regulations has greatly reduced mine accidents; yet, hundreds of miners lose their lives every year. According to the Mine Safety and Health Administration (MSHA), faulty equipment, negligence of labor towards explosions, structure failure, and gas accumulation are the most common causes of underground mine accidents [2]. During the economic year of 2014, in the salt range coal mine in Punjab, Pakistan, more than 35% of accidents occurred due to the accumulation of toxic gases [3]. Therefore, for the safety of workers and the mine itself, it is extremely important to continuously and accurately monitor the mine environment.
In recent years, advancements in the fields of wireless sensor network (WSNs), radio frequency identification (RFID), and cloud computing have led the way toward the development of internet of things (IoT) in the areas of Smart Grids, e-health services, home automation, and environment monitoring. Similarly, with reference to UCMs, the introduction of WSNs and the concept of smart (1) Arduino-based sensor modules for environmental monitoring in UCM, (2) Mine environment index (MEI), (3) Use of AML platform for mine air quality prediction, (4) Identification of the most influential pollutants present in the mine environment and modelling of mine air quality for an accurate prediction of MEI.
The remainder of this paper is structured as follows: Section 2 summarizes the literature review related to PCA and ANN. Section 3 describes the architecture of the proposed system, discusses the selection of sensors, and introduces the AML. Section 4 focuses on a hybrid approach that integrates PCA and ANN, and it defines the parameters for model building. Sections 5 and 6 illustrate the sensors' calibration and system installation. The results of the proposed system are discussed in Section 7. Finally, conclusions are drawn in the last section, followed by the limitations and future considerations.

Literature Review
In recent decades, various scientific studies [15,16] have used multivariate statistical approaches, such as cluster analysis (CA), PCA, factor analysis (FA), and discriminant analysis for solving environmental and air quality issues. However, based on the eigenvalues solution, PCA is the most prevailing and simplest technique. Specifically, in air quality problems, it has been used alone or in combination with other approaches. For instance, [17,18] used PCA and CA to figure out the seasonal variations and spatial distribution of PM 10 and O 3 in the open air. Similarly, Juneng et al. [19] analyzed PM 10 concentrations all over Malaysia using rotated PCA. Moreover, PCA, in combination with an enrichment factor, has successfully been implemented in the assessment of the air quality of an indoor charcoal cooking restaurant; it identified the particle fraction of PM 2.5 as a possible source of pollution [20]. Therefore, in the present study, PCA is used to identify major pollutant sources present in the mine environment.
Recently, ANN has shown great potential in the fields of engineering, industrial process control, medicines, computing, risk management, and marketing [21]. Several air quality studies [10,22] have utilized ANN to simulate PM 10 concentrations, air quality prediction, and other environmental issues. These applications clearly indicate the high capability of ANN to accurately predict in complex environments. Cigzoglu and Kisi [23] accurately predicted air pollution in Istanbul, Turkey using feedforward backpropagation combined with a radial basis function algorithm. In regard to the mining engineering, ANN is not a new concept. An initial example for the adoption of ANN [24] in the mining industry is the real-time control of mineral processing plants. Edwards et al. [25,26] collected data from a smoke sensor installed in a mine to accurately identify the combustibles present in the mine environment. Similarly, Karacan [27,28] conducted a series of modelling, simulation, and real experiments using a neural network to accurately predict the methane gas concentration and automatically control mine ventilation. For air quality in mines, Dixon et al. [29] applied ANN to the gas monitoring data and forecasted the concentration of methane gas inside the mine environment. Similarly, Park et al. [30] simulated ANN for the prediction of the PM 10 concentration in metropolitan subway stations in Seoul. They found the prediction accuracy of ANN to be between 60-80% relative to measured values. They also described the effect of the architecture and depth of subway stations on the ANN results. Conclusively, ANN is a valuable technique for enhancing safety in mines through its ability to predict air quality and allow the automatic control of mine ventilation. A member from the family of ANN is multi-layered perception (MLP); this has proved its ability for prediction using time series [31]. It enables easy extraction of precise information from complicated databases. MLP has shown great potential for solving complex environmental problems. For instance, Ramedani et al. [32] used relative humidity, temperature, sunshine duration, and amount of precipitation as input variables of MLP-ANN for predicting global solar radiations. Thus, it can be expected that ANN, including MLP, will be able to provide accurate prediction of air quality in the complex environment of UCMs.

System Architecture
The proposed system has been specifically designed for air quality monitoring and assessment in UCMs. Figure 1 shows the basic architecture of the proposed system. The main frame comprises data acquisition, data transmission, data processing for air quality assessment and prediction, and finally, services for information sharing and intelligent control of mine ventilators. In this system, sensing units are based on sensor modules attached to an Arduino UNO (ATmega1280, Atmel, San Jose, CA, USA) [33]. Two sensing units make up the sensor nodes (SNs), which capture air quality related data and transmit this data to the base station via ZigBee. The base station runs AML, which operates as a platform as a service (PaaS). The air quality model extracts pollutant types and predicts air quality depending upon the concentrations of pollutants. Thus, this system enables AML-based decision ( ) where Rs is the sensor resistance, A is a constant, c is the gas concentration and is the slope of the Rs curve. Table 1 summarizes the detection principles and specifications of each sensor module. The

System Hardware
Sensor Node: The basic function of a SN is to sense and measure air quality parameters inside the mine environment. Usually, SNs are comprised of sensor modules, a microcontroller, and wireless transmitters. In this study, SN is based on an Arduino UNO microcontroller. Arduino is an open-source, low-cost, and low-power controller which is run without interfacing with a computer because of its ability to load script [34]. It has 2 kB of RAM and 32 kB of program memory and operates at 5 V DC. Arduino UNO can be easily programmed into the Arduino development environment (IDE).
Selection of appropriate sensors for monitoring a mine environment is a relatively complicated issue and it demands consideration of several factors, such as measurement range, accuracy, and sensitivity. The operational temperature range of DTH11 is from −40 • C to 120 • C with ±2 • C and it has the ability to measure humidity of 20-80% with ±5% accuracy. It operates at 3.3-5 V; 2.5 mA is the maximum current usage. Usually, the temperature in a working coal mine varies between 15 • C and 45 • C, and the humidity lies within the specific range of DTH11. These potentials make DTH11 highly suitable for its use in UCMs. Common gases found in UCMs are CH 4 , CO 2 , CO, NO 2 , H 2 S, and SO 2 . This study utilizes MQ-4, MQ-9, MQ-811, MQ-136, and MiCS-2714 sensor modules to monitor the concentration of various gases. Among these, most of the sensor modules are metal oxide (tin oxide (SnO 2 )) based and respond well to volatile gas molecules; thus, they are more reliable and efficient for gas monitoring. In addition, sensor modules, either for gas monitoring or for temperature measurement, are cost-effective, low-power, stable, and are environment ineffective operational clones of the Arduino board. Generally, the gas concentration and sensor resistance have following relationship: where R s is the sensor resistance, A is a constant, c is the gas concentration and α is the slope of the R s curve. Table 1 summarizes the detection principles and specifications of each sensor module. The circuit diagram of the sensor modules attached to the Arduino UNO is shown in Figure 2. As this study has been designed to monitor eight different air quality parameters; however, the limited capacity of Arduino UNO offers a great challenge in handling large number of sensor modules. Therefore, by keeping in mind the limited capacity of the Arduino UNO and to make the proposed network economical, each SN was divided into two units. Each unit was mounted and programmed with XBee shield and a specific number of sensor modules. circuit diagram of the sensor modules attached to the Arduino UNO is shown in Figure 2. As this study has been designed to monitor eight different air quality parameters; however, the limited capacity of Arduino UNO offers a great challenge in handling large number of sensor modules. Therefore, by keeping in mind the limited capacity of the Arduino UNO and to make the proposed network economical, each SN was divided into two units. Each unit was mounted and programmed with XBee shield and a specific number of sensor modules.    Communication Protocol: The ZigBee wireless communication protocol has been previously shown to have high transmissivity, stability, ultra-low power, and high communication in underground mines [35]. Therefore, this study used the ZigBee 802.15.4 protocol with a bandwidth of 2.4 GHz. The XBee module (24.38 mm × 27.61 mm) was connected in series with Arduino UNO. This module has a nominal range of 30 m in open air. The ZigBee data throughput was 250 kbps, and it had a receiver sensitivity of −92 dBm, with an error drop-down transmission of ±25. Generally, longer and narrower dimensions of mine tunnels impose difficulties for WSN topology. This study uses cluster topology, in which each cluster is comprised of number of SNs and a cluster head. Figure 3 shows the visual aspects of Arduino Uno, Xbee module, and sensor modules. uses cluster topology, in which each cluster is comprised of number of SNs and a cluster head. Figure  3 shows the visual aspects of Arduino Uno, Xbee module, and sensor modules. Base Station: The base station functions as a data logger; it collects the raw data, arranges it and pushes the arranged data to AML. In this case, the base station is a PC server (Intel ® Xeon E5420 2.5 GHz with 8 Gb RAM) with Windows 7 (Microsoft, Redmond, WA, USA) as the operating system.

Azure Machine Learning for Cloud Computing
Cloud services in combination with machine learning (ML) are constantly helping organizations to grow their businesses by providing massive storage and data processing ability to allow the discovery of useful patterns and trends. With the enormous number of growing datasets, the traditional libraries for the ML are becoming insufficient. Therefore, the present study utilized AML for the development, training, and testing of the mine air quality ANN model. AML is the R programming, based on an open, drag-and-drop and collaborative platform, mainly used by IT professionals, developers, and the public. It is a comprehensive set of cloud computing services equipped with learning modules, data pre-processing, statistical tools, a SQL server, and an API to launch the model in the application [36]. The main objective of adopting this ontology is to provide a simple method for data storage, computation, streaming, and sharing services for diversified IoT applications. The screenshot of the prepared model is shown in Figure 4. Base Station: The base station functions as a data logger; it collects the raw data, arranges it and pushes the arranged data to AML. In this case, the base station is a PC server (Intel ® Xeon E5420 2.5 GHz with 8 Gb RAM) with Windows 7 (Microsoft, Redmond, WA, USA) as the operating system.

Azure Machine Learning for Cloud Computing
Cloud services in combination with machine learning (ML) are constantly helping organizations to grow their businesses by providing massive storage and data processing ability to allow the discovery of useful patterns and trends. With the enormous number of growing datasets, the traditional libraries for the ML are becoming insufficient. Therefore, the present study utilized AML for the development, training, and testing of the mine air quality ANN model. AML is the R programming, based on an open, drag-and-drop and collaborative platform, mainly used by IT professionals, developers, and the public. It is a comprehensive set of cloud computing services equipped with learning modules, data pre-processing, statistical tools, a SQL server, and an API to launch the model in the application [36]. The main objective of adopting this ontology is to provide a simple method for data storage, computation, streaming, and sharing services for diversified IoT applications. The screenshot of the prepared model is shown in Figure 4.

Mine Environment Index (MEI)
Various indices, such as the air quality index (AQI) [37], air pollution index (API) [38], and indoor air quality index (IAIQ) [39] have been introduced as key tools for easy and quick assessment of air quality in various environments and to predict pollutant concentrations. Among these indices, AQI, introduced by United Stated Environmental Protection Agency (US-EPA), is the most widely adopted index for the representation of open air environments. The constitutive components of this index are CO, SO 2 , PM 10 , O 3 , and NO 2 , which are commonly present in open air. As people spend 90% of their time in indoor environments [40], therefore, some researchers have also introduced indoor air quality indices. Compared to open air and indoor ambience, the environment in underground coal mines is relatively harsh, confined, and toxic because of the presence of gases such as CO, CO 2 , CH 4 , SO 2 , NO 2 , and H 2 S, which are emitted from coal beds during excavation. Thus, the indices defined for open or indoor air quality are insufficient to fully represent underground mine air quality. There should be an index available that gives a true representation of the mine environment and can readily assesses mine air quality.
However, despite extensive research on ventilation systems for underground mines, the mining industry and underground structures still lack such an index for the true representation of air quality. Therefore, for quick assessment and easy interpretation of mine air quality, this study introduces the mine environment index (MEI). This index is coined from two individual indices: the mine air quality index (MAQI) and the thermal comfort index (TCI). MAQI relies on the concentration of air pollutants, while TCI is mainly concerned with comfortable working conditions, such as temperature and humidity. MAQI has been assigned a weighting of 0.7 because of its major contribution to the mine environment, and a weighting of 0.3 has been given to TCI. Thus, MAQI has been defined in a similar manner as to AQI, but it has different variables. Its representative equation is the same as that of AQI for open-air and is given as where, MAQI P is the index value for pollutant p, C P is the input concentration of a given pollutant p, BP Hi is the higher breakpoint that is ≥C P , BP Lo is the lower breakpoint that is ≤C P , MAQI Hi is the index breakpoint value corresponding to BP Hi , and MAQI Lo is the index breakpoint value corresponding to BP Lo . The MAQI values have been categorized into five status categories: very good, good, moderate, poor, and very poor. The limiting values for each category are summarized in Table 2. Regarding its application in mines, the TCI is the thermal comfort level of miners, and it is highly dependent on the ambient temperature and humidity. It can be given as where, T is the temperature measured in • F and rh is the relative humidity. The breakpoints for MEI are summarized in Table 3.

Data Pre-Processing
Prior to implementing any statistical approach, it is necessary to pre-process the collected data so that substantial characteristics of the sensors' responses can be extracted to produce features for further processing. In the present study, transformation, as an initial step of pre-processing, was carried out using z-scale transformation with a mean of 0 and a standard deviation of 1, given as z ij is the jth value of variable i, x ij is the jth observation of variable i, µ is the mean and σ is the standard deviation. z-scale transformation ensures the equal weight of variables for any statistical process. This transformation also homogenizes the distribution variance and reduces the probability of any error arising because of the different sizes of data sets [43]. Finally, the sphericity and correlations between various air pollutants were determined using Bartlett's test with a high significance level of (p < 0.0001) and a threshold limit of 0.5.

PCA Modelling
One of the most prevailing and valuable statistical approaches is PCA, which compresses and transforms m-dimension data into a new dataset of n-dimensions, where n < m. It uncovers the potential structure of the set of variables without losing important information. PCA transforms a large data set of interrelated variables into new and uncorrelated variables, known as principal components (PCs). The PCs are orthogonal, uncorrelated and have a linear relationship with variables of the original dataset, given as where the notation for the pth PC for the overall n number of data is PC p , W np is the regression coefficient weight determined by PCA, and x n is the adjusted matrix. The extraction of PCs usually occurs in the gradual decreasing order of their variance. In order to determine the optimal number of PCs, several approaches exist: Broken Stick rule, Velicer's partial correlation procedure, Cattell's scree test, and cumulative percentage of variance. More specific to the air quality problem, Kaiser's criteria [44] of eigenvalue-one is the most commonly used method for the selection of optimal numbers of PCs. PCA has shown a high capability for identifying the most significant air pollutant. Therefore, this study used PCA along with Kaiser's approach to determine the most significant pollutant present in the mine environment.

MLP-ANN Modelling
ANN is the most widely accepted information processing system in artificial intelligence, intended as a generalized mathematical model of the brain system [45]. ANNs are made up of several interconnected neurons and have the capability to change their structure based on internal or external data. ANN can be trained for non-linear and complex data, which makes it highly suitable for the faster interpolation of predictions, clustering, and classification, as compared to digital computer systems. The prediction results in ANN are highly dependent on the number of input variables and assigned weights of each neuron [46]. A few studies [47] have reported the use of PCA outputs as input variables for MLP-ANN and have proved the validity of this approach in decision making. Similarly, in this study, the outputs of PCA were used as inputs for the MLP-ANN model to predict the air quality accurately. A MLP-ANN network was fed with PCA results for the identification of pollutant sources that significantly affect the MEI.
In the network of MLP-ANN, the first layer is the input layer, responsible for the information collection, error removal, and transmission of data to the ANN structure. The second layer is the hidden layer, with arbitrary numbers of neurons and several layers. The number of hidden layers in the present study was set to two. In this network, the neurons activate during the functions of feedforward and backward propagation providing the connections between the layers. Each neuron interacts with other neurons depending upon its ability to make connections. Based on the interaction of neutrons, each neuron is assigned a weight. The most common interactive function is the sigmoid function for the transmission of information between layers. Hidden layers receive and transmit the data between input and output layers. The hidden layer hands over the data to the next layer until the output layer is reached, to provide the output. Finally, the process outputs, after processing the collected data, are provided to the output layer through nodes in each layer connected to each other. The used MLP-ANN architecture with inputs from PCA to determine the MEI is shown in Figure 5. The optimum number of hidden neurons were determined with a hit and trail approach. The output values determined in the forward phase were transmitted back from the hidden layer, and the weights of each node adjusted themselves accordingly to minimize error, relative to original values. The performance of MLP-ANN was monitored using MAE, root mean square error (RMSE), relative absolute error (RAE), relative square error (RSE), and coefficient of determination (R 2 ). The accuracy and training capacities of the MLP-ANN model are highly dependent on the selection of the optimum number of neurons. If more neurons are present, the model will be over fitted and converge quickly; if too few neurons are present, the model will be less accurate and not trained properly [48]. In the present case, the MLP-ANN model was designed in AML with weights determined by the randomization function. The model was trained using 70% of the entire data set using the Levenberg-Marquardt (LM) training algorithm [49], and the remaining 30% of the data set was used for testing. This training algorithm was adopted because of its high speed, high efficiency, and because it precisely trains the network with a standardized range: 0-1. For model learning, a widely accepted approach for environmental studies, gradient descent with momentum back propagation (0.5), was adopted. A goal of 0.001 for the mean absolute error (MAE) or 1000 epoch was set; training was continued until the model fulfilled either of these conditions. Thus, MAE and epoch numbers were the stopping criteria for training. The same process was repeated by varying the number of neurons to determine the optimal number of neurons in the hidden layer. The characteristics of MLP-ANN training are summarized in Table 4. The optimum number of hidden neurons were determined with a hit and trail approach. The output values determined in the forward phase were transmitted back from the hidden layer, and the weights of each node adjusted themselves accordingly to minimize error, relative to original values. The performance of MLP-ANN was monitored using MAE, root mean square error (RMSE), relative absolute error (RAE), relative square error (RSE), and coefficient of determination (R 2 ).
where y oi is the observed value, y pi is the estimated value, and y om is the average of observed values.

Calibration of Sensors and Sensor Nodes
In this study, all the sensors were calibrated in ambient air conditions, but our discussion is limited to the CO 2 sensor. Calibration of each gas sensor was carried out on a laboratory scale under normal environmental conditions (25 • C) with the help of a sealed gas test box, SR3 (235 mm × 180 mm × 210 mm). This box can be air tightened, and it has been specially designed for the calibration of gas sensors. Before calibration, the box was opened in normal air conditions and an attached mixing fan was turned on for 4 min. Afterwards, the box lid was tightened, and CO 2 was introduced into the box with the help of a syringe. The syringe was filled with 99.95% pure CO 2 , extracted from the gas cylinder using a syringe adaptor. After injecting CO 2 , the mixing fan was turned on for 1 min. Before recording the readings from the sensor, a time lapse of 45 s was given, as the response time of the CO 2 sensor is 30 s. The sensor readings were recorded for 2 min, and the lid was opened in conjunction with turning on the mixing fan for 3 min.
The Arduino-based developed SNs were validated using a commercial instrument Aeroqual-900 (Aeroqual, Avondale, Auckland, New Zealand) with additional sensors of temperature and humidity. For this purpose, the prepared SNs and commercial equivalents were placed in a glass sealed container of 170 cm× 90 cm× 50 cm at normal room temperature (25 • C). The readings were recorded for more than three hours and regression plots of sensed data in comparison with commercial equivalents are shown in Figure 6. Regression plots of all gases showed a linear relationship between the injected concentration of gases and the readings shown by the sensors. In most of the cases, the coefficient of determination was found to be greater than 0.95, except in the case of the MiCS-2714 sensor (0.90), which was still in the acceptable range. The means and standard deviations of the SNs along with their commercial equivalents are summarized in Table 5. The table demonstrates that the means and standard deviations of almost all of the parameters are comparable. These values of means and standard deviations indicate that the developed nodes have same responses as those of commercial equivalents; therefore, the readings from prepared nodes are reliable for use in UCMs.

Test Bed
The mine tunnel used for implementation of the current system is the main roadway of an operating UCM. The dimensions of these mine tunnels were 1.8 m × 2.12 m, and almost all tunnels were supported with wooden planks at spacings of 1 m (Figure 7b). The units of SN programmed for XBee shield and sensor modules were attached to the rooftop center of the mine tunnel opening. Data transmission from both units was synchronized, based on the consensus synchronization algorithm. All of the SNs were attached to cluster heads via the ZigBee protocol. Finally, the sensed data were collected at the base station installed at the mine office. This base station arranges all the data into the specific format required by the AML. The AML model pre-processes the data to determine any missing values, trains itself by splitting the data, and then predicts the air quality.
The mine tunnel used for implementation of the current system is the main roadway of an operating UCM. The dimensions of these mine tunnels were 1.8 m × 2.12 m, and almost all tunnels were supported with wooden planks at spacings of 1 m (Figure 7b). The units of SN programmed for XBee shield and sensor modules were attached to the rooftop center of the mine tunnel opening. Data transmission from both units was synchronized, based on the consensus synchronization algorithm. All of the SNs were attached to cluster heads via the ZigBee protocol. Finally, the sensed data were collected at the base station installed at the mine office. This base station arranges all the data into the specific format required by the AML. The AML model pre-processes the data to determine any missing values, trains itself by splitting the data, and then predicts the air quality.
The system's installation was completed on 26 July 2016. Its first time start up took 90 s, and 1.5 kHz was the refresh rate. For the initial two days, the data collection rate was set at 15 min. Thus, after two days, there were 3104 samples collected, with 97 readings for each sensor per day. In the entire dataset, there were only 15 missing values, indicating the reliability of the data collection method. Among this data set, 2484 readings were used to train the model, and testing was carried out on 605 samples. At the completion of training and sensor evaluation, an extensive monitoring program was started on 29 July 2016 at midnight. Currently, this system predicts MEI recalling datasets from longer than a month.

Air Pollution Source Identification
The observed value of chi-square, 7.9 × 10 2 (p < 0.05, df = 28), obtained from Bartlett's test showed that the air quality test meets the sphericity assumption. This test also indicated that the variables were correlated and not orthogonal; thus, PCA can allow the interpretation of the involved parameters with a much lower number of components, compared to the original number of variables. The input to PCA was sensor readings of eight different variables. PCA extraction gave principle components (PCs). The selection of the most significant components from these eight PCs was carried out on the basis of having an eigenvalue greater than 1. At this stage, the components having eigenvalues less than 1 were neglected because of being redundant to more important factors. The eigenvalues and percentages of variance of each extracted component are summarized by Table 6. This table and scree plot (Figure 8) clearly indicates that the first two components have eigenvalues greater than 1 and their cumulative variance is 79.370%, whereby, 65.61% was explained by the first The system's installation was completed on 26 July 2016. Its first time start up took 90 s, and 1.5 kHz was the refresh rate. For the initial two days, the data collection rate was set at 15 min. Thus, after two days, there were 3104 samples collected, with 97 readings for each sensor per day. In the entire dataset, there were only 15 missing values, indicating the reliability of the data collection method. Among this data set, 2484 readings were used to train the model, and testing was carried out on 605 samples. At the completion of training and sensor evaluation, an extensive monitoring program was started on 29 July 2016 at midnight. Currently, this system predicts MEI recalling datasets from longer than a month.

Air Pollution Source Identification
The observed value of chi-square, 7.9 × 10 2 (p < 0.05, df = 28), obtained from Bartlett's test showed that the air quality test meets the sphericity assumption. This test also indicated that the variables were correlated and not orthogonal; thus, PCA can allow the interpretation of the involved parameters with a much lower number of components, compared to the original number of variables. The input to PCA was sensor readings of eight different variables. PCA extraction gave principle components (PCs). The selection of the most significant components from these eight PCs was carried out on the basis of having an eigenvalue greater than 1. At this stage, the components having eigenvalues less than 1 were neglected because of being redundant to more important factors. The eigenvalues and percentages of variance of each extracted component are summarized by Table 6. This table and scree  (Figure 8) clearly indicates that the first two components have eigenvalues greater than 1 and their cumulative variance is 79.370%, whereby, 65.61% was explained by the first component only, and 13.76% was explained by the second component. Therefore, it is easy to say that the most effective component is the first PC followed by the second based on their eigenvalues.   In order to completely understand and to accurately interpret the data, PCs were rotated using varimax rotation. Table 7 shows the eigenvalues of PCs after rotation. The relative significance and components' structures have been optimized with the adoption of rotation. After rotation, the variance percentages of the first PC reduced by more than 3%, from 65.610% to 62.894%. On the contrary, the variance percentages of the second PC increased, indicating the major contribution of the first PC; this shows that the PC1 is more correlated with the data relative to PC2.
In this study, the vari-factors with absolute values greater than 0.85, indicating relatively strong loadings, were set as threshold limiting values. Table 7 indicates five out of eight components which satisfy the condition of the 0.85 threshold limit value. These components are the major pollution factors in the air of this mine. These pollutants are CH4, CO2, SO2 and CO along with temperature. In these pollutants, PC1 contributes 65.16% to the loading factors of temperature, CH4, CO2, CO, and SO2. These influencing factors are mostly related to the common gases present in mine environment of UCMs. Among these gases, CH4 and SO2 are generally confined by the coal bed in the form of gas pockets. During the excavation of coal, these pockets burst out and release gases into mine air. The major cause of CO2 in the mine environment may be because of the breathing activity of workers as well as the exhaust from any diesel operated machinery. On the other hand, CO is only the loading factor with a contributing factor from PC2. Table 8 shows the correlations of both selected PCs. In order to completely understand and to accurately interpret the data, PCs were rotated using varimax rotation. Table 7 shows the eigenvalues of PCs after rotation. The relative significance and components' structures have been optimized with the adoption of rotation. After rotation, the variance percentages of the first PC reduced by more than 3%, from 65.610% to 62.894%. On the contrary, the variance percentages of the second PC increased, indicating the major contribution of the first PC; this shows that the PC1 is more correlated with the data relative to PC2.
In this study, the vari-factors with absolute values greater than 0.85, indicating relatively strong loadings, were set as threshold limiting values. Table 7 indicates five out of eight components which satisfy the condition of the 0.85 threshold limit value. These components are the major pollution factors in the air of this mine. These pollutants are CH 4 , CO 2 , SO 2 and CO along with temperature. In these pollutants, PC1 contributes 65.16% to the loading factors of temperature, CH 4 , CO 2 , CO, and SO 2 . These influencing factors are mostly related to the common gases present in mine environment of UCMs. Among these gases, CH 4 and SO 2 are generally confined by the coal bed in the form of gas pockets. During the excavation of coal, these pockets burst out and release gases into mine air. The major cause of CO 2 in the mine environment may be because of the breathing activity of workers as well as the exhaust from any diesel operated machinery. On the other hand, CO is only the loading factor with a contributing factor from PC2. Table 8 shows the correlations of both selected PCs.

Prediction Results
In order to develop the MLP-ANN model, network structures with various numbers of neurons were tested, using both original and PCA extracted components as inputs. In these MLP-ANN structures, the optimum number of neurons were determined based on MAE, RMSE, RAE, RSE, and R 2 . The number of neurons was gradually increased, one-by-one, and errors were determined against each number of neurons. In the case of the original data sets, trials were initially started with eight neurons and this number was increased until the minimum number of errors was indicated. In the case of PCs, the trials were initially started with three neurons which were gradually increased to determine the optimum number of neurons. In the MLP-ANN process, the sigmoid transfer function provided the optimal activation function. A validation model with different numbers of neurons for both original and PCA extracted components as inputs is summarized in Table 9. For the original data set, the optimum number of neurons to give the minimum error was 18, and for the PCA extracted data sets, the optimum number of neurons was 6.  The performance of the proposed model was compared with models defined by multi-linear regression (MLR), PCA-MLR, and ANN. For all of these models, the MAE, RMSE, RAE, and RSE were compared, as the error values close to zero indicate a better model. On the other hand, the accuracy of the model was checked by calculating the coefficient of determination (R 2 ). In these tests, the value of the model with high accuracy was close to one. Hence, the accuracy of model can vary depending upon the time interval required for prediction. In the case of underground mines, there are several limitations; therefore, it is necessary to predict gas concentration. The best prediction model was PCA-ANN, with MAE, RMSE, RAE, and RSE having values of 0.1519, 0.2104, 0.7619 and 0.6818 respectively. Moreover, the coefficient of determination, R 2 , was 0.6654; this is illustrated in Table 10. PCA improved the accuracy of the linear regression model approximately by 2.1%, and 16.9% in the case of ANN. The results show that the PCA in combination with MLP-ANN improves the prediction accuracy of mine air pollutants. Moreover, the PCA extracts important information about the major pollutants present in the mine environment. Thus, the application of PCA is helpful for prediction studies specifically related to air quality.

Conclusions
In recent years, the computing power of cloud services has revolutionized the solution of complex and nonlinear data problems. Air pollutants present in UCMs have always showed non-linearity, ultimately causing uncertain predictions and lower reliability for early warnings. Therefore, this paper introduced an IoT-based mine air quality monitoring, assessment, and forecasting system that utilizes AML cloud computing to predict air quality and has the potential to widely enhance underground mine safety through early warnings. The system was installed in an operating underground coal mine, and it advocated an air quality assessment model to determine MEI.
The following are the conclusions: (i) In this system, IoT-sensors were used to monitor mine environment related parameters, and the limiting values of each parameter were defined separately to determine the mine's air quality in terms of MEI. The calibration of the prepared SNs with regression constants was always greater than 95% for almost every parameter, which confirmed the reliability of system. (ii) Two different MLP-ANN models were designed in AML studio: one for PCA applied outputs to the dataset and other one was for original dataset.
(iii) This system effectively alleviated the non-linear behavior of mine environment variables, such as temperature, humidity, CO 2 , CH 4 , CO, SO 2 , and H 2 S by pre-processing the sensors' data. The parameters' data was uploaded into AML studio as input data sets to the MLP-ANN model. Bartlett's test confirmed the co-relations and non-orthogonality of the monitored variables. The PCA results indicated four mine gases (CH 4 , SO 2 , CO, and H 2 S) as having the most significant influences on mine air quality. Multi-layer perceptron from the family of ANN accurately predicted the MEI. As the accuracy and efficiency of the MLP-ANN model is highly dependent on the input parameters and hidden layer neurons numbers, the optimum number of hidden layer neurons was determined by observing minimum error. (iv) The proposed ANN-PCA model is 14.8%, and approximately 3%, more accurate, compared to linear regression and ANN models, respectively. This study suggests that an appropriately trained MLP-ANN model can effectively forecast MEI. Moreover, Azure Machine Learning enabled quick data processing with easy web service, based on an easy graphical user interface.
Despite the test results indicating accurate forecasting, some limitations in this study still exist. These limitations are the harsh environment of underground mines, data privacy, and the integration of multi-sensors' outputs. Moreover, the present study only considered eight air quality parameters and ignored parameters which may affect the mine environment more severely. This study relied on the concentrations of air pollutants over time, while the other factors related to the forecasting effectiveness were ignored. We propose the following future directions: Firstly, determination of the complex non-linear behavior of pollutants' concentrations demands a more precise hybrid model which would enhance early-warnings. Secondly, high pollutant concentrations are the major contributing factors to air quality; therefore, development of a model for forecasting peak air pollutant concentrations is required.