Next Article in Journal
Fault Location Method for Overhead Power Line Based on a Multi-Hypothetical Sequential Analysis Using the Armitage Algorithm
Next Article in Special Issue
Early-Stage Identification of Powdery Mildew Levels for Cucurbit Plants in Open-Field Conditions Based on Texture Descriptors
Previous Article in Journal
Liquid Natural Gas Cold Energy Recovery for Integration of Sustainable District Cooling Systems: A Thermal Performance Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Sensing Spontaneous Combustion in Agricultural Storage Using IoT and ML

1
Department of Computer Science, The Islamia University of Bahawalpur, Bahawalpur 63100, Pakistan
2
Department of Computer Science and IT, Govt Sadiq College Women University, Bahawalpur 63100, Pakistan
*
Author to whom correspondence should be addressed.
Inventions 2023, 8(5), 122; https://doi.org/10.3390/inventions8050122
Submission received: 28 August 2023 / Revised: 19 September 2023 / Accepted: 21 September 2023 / Published: 26 September 2023

Abstract

:
The combustion of agricultural storage represents a big hazard to the safety and quality preservation of crops during lengthy storage times. Cotton storage is considered more prone to combustion for many reasons, i.e., heat by microbial growth, exothermic and endothermic reactions in storage areas, and extreme weather conditions in storage areas. Combustion not only increases the chances of a big fire outbreak in the long run, but it may also affect cotton’s quality factors like its color, staple length, seed quality, etc. The cotton’s quality attributes may divert from their normal range in the presence of combustion. It is difficult to detect, monitor, and control combustion. The Internet of Things (IoT) offers efficient and reliable solutions for numerous research problems in agriculture, healthcare, business analytics, and industrial manufacturing. In the agricultural domain, the IoT provides various applications for crop monitoring, warehouse protection, the prevention of crop diseases, and crop yield maximization. We also used the IoT for the smart and real-time sensing of spontaneous combustion inside storage areas in order to maintain cotton quality during lengthy storage. In the current research, we investigate spontaneous combustion inside storage and identify the primary reasons for it. Then, we proposed an efficient IoT and machine learning (ML)-based solution for the early sensing of combustion in storage in order to maintain cotton quality during long storage times. The proposed system provides real-time sensing of combustion-causing factors with the help of the IoT-based circuit and prediction of combustion using an efficient artificial neural network (ANN) model. The proposed smart sensing of combustion is verified by a different set of experiments. The proposed ANN model showed a 99.8% accuracy rate with 95–98% correctness and 97–99% completeness. The proposed solution is very efficient in detecting combustion and enables storage owners to become aware of combustion hazards in a timely manner; hence, they can improve the storage conditions for the preservation of cotton quality in the long run. The whole article consists of five sections.

1. Introduction

Cotton is a famous commercial crop, and it is grown in more than 35 countries [1]. In these countries, cotton plays a major role in the national economy. Approximately 34.1 million hectares of area are used for cotton cultivation, which produces 126.5 million cotton bales. The top leading cotton-producing countries include India, China, the United States, Brazil, Pakistan, Turkey, and Uzbekistan [2,3,4,5].
When the market is flooded with cotton, it sometimes needs to be stored for long durations in warehouses [6,7,8]. The storage condition is determined by external factors and internal factors [9,10,11]. External indicators include temperature, humidity, and air quality, while the internal indicators include cotton’s internal chemical characteristics and processes, such as spontaneous combustion (SC), which occurs when an element has a comparatively low ignition temperature (i.e., hay, straw, peat, or cotton) and starts to release heat [9,11]. The heat produced by oxidation or bacterial fermentation is unable to be released, which ultimately raises the internal temperature of that element or substance. Hence, a point is reached whereat the internal temperature of that substance crosses its limit of ignition point. After reaching that point, if sufficient amounts of oxygen and fuel are present, then combustion begins [6,12].
Spontaneous combustion in agricultural storage has become the primary reason for the onset of burning in the absence of an external or “pilot” ignition source. According to the National Fire Protection Association (NFPA), SC is a major reason for the different types of property damage with fire outbreaks, including residential, agricultural storage, business, manufacturing and processing, and other types of property. Their statistics showed that 12% of the agricultural storage damage due to fire was caused by SC during 2005–2009. The storage conditions in the warehouse play a vital role in the maintenance of cotton quality. Bad storage conditions may exasperate the quality deterioration of cotton. SC in cotton storage not only increases the chances of big fire outbreaks in the long run, but may affect the cotton’s quality in many ways.
Knowledge of the cotton quality parameters enables the fiber industry to check for desirable properties in a cotton bale, which is ultimately necessary to produce fiber that meets the end-user’s demands [5,13]. Similarly, ginners also check a cotton’s quality through samples, as they need to place raw cotton in storage for lengthy durations during which cotton with compromised quality may not survive for long [3,14]. The fact that cotton stakeholders consider quality as a key factor during buying encourages cotton manufacturers and sellers to focus on cotton quality maintenance during storage. The above discussion has offered the following research challenges.
  • The phenomenon of SC is a harmful event that may become active and remain unnoticed for a long period and, once sparked, can lead to a large fire outbreak, as it is also accepted by the NFPA that SC causes huge damage to agricultural storage areas. Therefore, if cotton is intended to be stored, there must be some mechanisms to maintain a check on SC within the storage area.
  • The second challenge is the preservation of cotton quality during long storage times. Many harmful events and processes can alter cotton’s quality attributes during long storage., i.e., changes in cotton color, damage to seeds in raw cotton, spotted cotton and damage to cotton fineness, and the maturity of fiber [15].
  • Self-heating works like a slow poison for cotton, as it not only increases the chances of big fire outbreaks upon extreme ignition, but also damages its quality silently; as a result, the stored cotton’s market value decreases.
  • The above three research challenges highlight the requirement of such a mechanism by which storage owners can maintain a check on SC so that they may be able to decrease the chances of big fire outbreaks and the reduction in cotton quality caused by SC.
We came to the conclusion, after a detailed literature survey, that only limited experimental methods have been developed to check the self-heating and spontaneous ignition of agricultural products, e.g., coal, wheat, and hay [5,16,17,18,19,20,21], including basket heating, the crossing-point temperature method proposed by Worden (2011), thermogravimetric analysis (TGA) conducted by Khattab (1999), the Ordway apparatus used by Thompson (1928), and the Mackey apparatus method proposed by Khattab et al. (1999) [22]. Also, some researchers proposed solutions to measure and control external weather conditions of the storage area only, and they aim to improve safety mechanisms there [16,20,21]; one study focused on chemical processes to identify gases produced during smoldering [17], and little work has been done to investigate factors contributing to SC and its effect on cotton quality [5,19]. There is a big research gap in the detection and prevention of cotton smoldering, SC and cotton quality maintenance during storage. The major motivations for the current research are listed below.
  • Very limited research is available on self-heating and SC. The available research uses traditional methods to investigate SC factors and self-heating, and does not focus on the sensing of SC in real time. The previous systems for the identification of self-heating used laboratory methods and traditional tools and instruments. Hence, these old methods of self-heating detection did not incorporate modern mechanisms for the real-time monitoring of cotton in storage areas to identify self-heating and any abnormal circumstances.
  • In the past few years, very limited research has been done in the domain of cotton quality and storage environment. Although some researchers have proposed efficient systems to improve and monitor the growth of crops, but they do not focus on the maintenance of quality during storage.
  • In the field of agriculture, instrumental based quality measurements for cotton are extensively undertaken, but research grounding the adoption of processes and practices that can help in the maintenance of quality cotton during storage is still deficient. However, the most common external environmental factors that affect cotton’s quality during long storage were investigated, e.g., moisture and temperature. However, it is still required to investigate SC’s effects on cotton’s quality.
The current research focuses on enabling storage area owners to preserve cotton quality during long storage by monitoring the environment for SC. We used the Internet of Things (IoT) for the real-time monitoring of a storage area in order to sense SC factors and predict SC using a well-trained artificial neural network (ANN) model to inform storage area owners in a timely manner.
The remaining manuscript is structured into four sections. In Section 2, we discuss state-of-the-art algorithms presented in the agricultural domain that study combustion. Section 3 describes the preliminary concepts related to combustion and its effect on cotton’s quality, along with the architecture of the proposed approach and its components. Section 4 describes the experiment design. Section 5 describes the results and discussions to demonstrate the performance testing, outcomes, and limitations of the presented approach.

2. Related Work

The researchers have proposed many techniques for the security of storage areas. However, limited literature is available on cotton quality preservation and SC. In the current section, we discuss the most relevant literature work. The features and limitations of related works are also given in Table 1.
Salimov, O. A. et al. [5] performed research on factors affecting the quality of raw cotton during storage. Air permeability is one such factor, which can preserve the quality indicators of cotton, as air is used when storing cotton (air suction), and when drying and processing cotton with chemicals. They performed experiments to study the air permeability of the mass of raw cotton. They used raw cotton of grade II for experimentations—C-6524, with a moisture content of 12.7% and weediness of 4.8%. The cotton was placed in a module with densities of 50.75, 150 and 220 kg/m3 for the experiments. They measured static pressure inside the layer of the raw cotton with the Petrov PPR-2M device. Their experimental result showed that the modulus of raw cotton had significant aerodynamic resistance. They concluded that effective measures during storage should be assured to avoid self-heating, so that cotton does not face heat accumulation, which affects its quality and storage of fiber and seeds.
Salimov, O. and Salimov, A. [16] studied the self-heating process of cotton as a bio-chemical and biological process inside the seeds. They determined in their study that raw cotton constitutes fiber, lint, peeled seeds and seed kernels, each of which has different absorption processes, and different geometric and chemical structures as well. The structure of each component determines the difference in its hygroscopic properties and moisture content. According to their study, self-heating causes raw cotton to lose its fiber yield, as it destroys cotton’s bonds with the seed, and ultimately, self-heated cotton processing increases the loss of free fibers to waste. Therefore, they concluded that prevention is not only a means of preserving cotton during its storage and the heating process; rather, it is necessary to conduct research on the storage of raw cotton components.
Su, H. et al. (2020) found iconic gas compositions via the low-temperature heating of cotton [17]. They proposed laws for iconic gas compositions that may be produced during the process of the cotton smoldering. They took a long-staple cotton sample from Xinjiang, China, and used a mini tube furnace to heat it. Then, they applied a gas chromatography—mass spectrometer (GC/MS) to identify which organic and inorganic gases were present. They did this experiment with different low temperatures, ranging from 95 °C to 185 °C. The results of their experiments showed that alkanes, furans, alkenes, aldehydes, hydrazine, and acids were produced in small amounts, so they could not be regarded as iconic gases. They concluded that the joint detection of the methane and hydrogen could be used to predict the smoldering. They also stated that acetone and carbon monoxide identification can be used to confirm the smoldering stage.
The effect of cotton density on smoldering rate was investigated in 2020 by Wang, Z. et al. [18]. They found that more storage areas and shipping facilities for cotton are required due to the high demand. Special attention is required during the transportation and storage of cotton due to smoldering. The smoldering of cotton may have originated from an open fire. The reproduction of microbes also increases in the presence of a wet environment. Packed cotton can have different forms and structures. Similarly, cotton bags holding cotton also have different densities and porosities, which affect the percentage of oxygen content inside the cotton bags. The oxygen levels affect the combustion state. Therefore, they considered these phenomena as the basis of their research, and performed experiments to measure cotton density, as well as measuring the effects of different densities on the smoldering rate of cotton.
The thermal decomposition temperature (TDT) and critical ambient temperature (CAT) of cotton were found (Luo, Q., et al. 2017) [19]. They stated in their article that good storage conditions are very crucial for cotton, as it is a highly flammable substance, and with bad storage it can decompose, catch fire as a result of external factors, and it can even self-ignite. They studied self-ignition, i.e., SC in relation to thermal decomposition temperature (TDT) and critical ambient temperature (CAT). They performed infrared spectroscopy analyses, as well as chromatographic and mass spectrometric analyses, on cotton storage, and they identified that there is significant thermal decomposition at the temperature of 210 °C. They concluded that the TDT of cotton was around 210 °C. Their study provides sufficient knowledge about the SC risk of cotton, and speculations about the reasons of cotton fire.
In 2016, Wen-hui Ju [20] performed an investigation of factors that can reduce fire and disasters in cotton warehouses using event and fault tree analysis. They analyzed the chemical and physical characteristics of cotton and utilized that analysis to identify the major fire safety issues of cotton logistics warehouses. Their study of cotton’s chemical properties and its preparation in warehouses using different equipment suggested that major fire risks found in cotton logistics warehouses are related to the presence of complicated fire sources, and controlling the temperature and humidity of the warehouse. They used event and fault tree analyses, which showed that there are higher chances of smoldering caused by heat released following moisture absorption; also, the lack of space within the stacked cotton enhanced the spread of fire. They introduced some fire protection measures, i.e., maintaining a temperature below 305 K and a humidity below 70%; cotton packing should be adjustable; one should retain a space between the shelves of more than 2 m; the fire resistance rating should not be below class three; water must be found near the warehouse.
The reasons for SC were studied by Buggeln, R. et al. in 2002 [21]. They defined SC as a process that occurs without any external force or sources, i.e., no external spark or flame. They described that this process first starts with chemical and physical events that induce heat-producing reactions. This heat production is aided by biotic and abiotic processes involving oxygen and a little water. They stated that heat accumulation depends on the rate of internal heat production and heat release to the external environment. The rate should be balanced to avoid heat accumulation. The water plays a major role as a “governor” during this process, as it controls temperature change and heat exchange within a pile of yard trimmings. If the pile loses heat in the form of water vapor, the pile’s temperature can be kept within a suitable range and may not rise above 70–90 °C until all free water has been removed. They performed experiments with Eucalyptus leaves, saw dust, and other types of plant material. Their experiments showed that there is an inverse relationship between the mass of material and ambient temperatures. This inverse relationship leads to SC.
This literature survey shows that many methods have been proposed by researchers to measure the self-heating and spontaneous ignition of agricultural products, e.g., coal, wheat and hay. However, no suitable method has been proposed to detect self-heating and SC inside cotton storage. Mostly, researchers only studied the self-heating mechanisms for coal and hay, and they gave solutions to identify self-heating and fire-causing factors for these only, so no direct solution exists to detect SC. Also, previously proposed work on self-heating and SC based on laboratory methods and instrument-based solutions, e.g., basket heating, the crossing point temperature method proposed by Worden (2011), the thermogravimetric analysis (TGA) undertaken by Khattab (1999), the Ordway apparatus used by Thompson (1928), and the Mackey apparatus method proposed by Khattab et al. (1999) [22]. Therefore, modern tools/techniques are required to analyze the phenomenon of SC inside cotton storage areas with the goal of detecting SC and preserving cotton quality for a long.

3. Material and Methods

3.1. Background of SC and Its Effect on Cotton Quality

The term self-heating is closely related to spontaneous combustion. Self-heating is a mechanism by which the temperature of a substance rises internally due to chemical, biological and microbial reactions in the presence of oxygen. Then, the temperature of that substance rises and reaches its ignition temperature. At that point, if a particular substance is combustible, then as this heat remains inside, causing a continuous rise in temperature, the material will eventually catch fire automatically, or by a slight external intervention. Common materials that can catch fire following this process include rags, towels and linen during laundering and drying, coal, haystacks, chemical substances such as cellulose nitrate, and crops in warehouses. This phenomenon is the biggest hazard for cotton storage, as the chances of heat buildup and the reaching of the ignition point are high when cotton is bunched up or left in a pile, preventing the heat being generated from escaping. Self-heated cotton is susceptible to SC. There are three common types of self-heating that cotton may encounter in storage:
  • Thermal self-heating occurs as a result of increases in temperature. This temperature rise may occur for two reasons—the storage area is very warm, or high temperatures occur due to internal reactions within the cotton;
  • Chemical self-heating occurs due to moisture, fats/oils, the action of acids such as nitric or sulfuric acid, or by contact with oxidizing agents and with goods with a tendency to self-heat;
  • Microbial heating occurs as a result of the presence of microbes in wet cotton bales that may produce small amounts of methane gas.
This discussion offers a background to the design of a hardware system model that can be used for the detection of SC. All three types of self-heating can be detected with a suitable mechanism. We have identified three indicators—one for each self-heating type, which will enable us to detect them. Table 2 shows these three types of self-heating, along with their indicators and reference range.
The official USDA cotton quality classifications include three parameters for measuring cotton quality i.e., cotton grade, staple length and micronaire reading. Cotton grade is assessed by color, preparation (smoothness) and trash content. Staple length measures fiber length. A long staple length is considered good for cotton quality, as compared to a shorter length. Micronaire is the measurement of fiber fineness and maturity [6,7,14].
The quality attributes of cotton diverge from their normal ranges in the presence of SC. The color of cotton becomes light gray and dark gray if its internal temperature and moisture level divulge. Similarly, the moisture level can also cause cotton to become wet, which will ultimately damage the cotton’s fineness and the maturity of the fiber. Internal reactions within cotton can cause its bright white color to turn yellow, as a result of which, it will be considered as having bad quality, and will not be considered good for use. Internal dust particles increase the ratio of trash in cotton and ultimately lower its quality. The presence of insects and fungus as a result of microbial heating can give rise to spotted cotton, which also indicates bad quality. The details of all these cotton quality parameters, their indications, along with internal factors affecting them, are listed below in Table 3 [3,6,7,13,14].

3.2. Architecture of Sensning Spontanous Combustion SSC

The proposed system is able to sense SC-causing factors in real-time, with the help of pre-trained ANN. The result of the SC detection will be displayed to users via an app. The whole system comprises two major working parts: the IoT part and the ML part. The IoT part is responsible for sensing SC in real time, whereas the ML part involves data analysis, enabling us to take decisions about the presence of SC. The data sensed by the IoT circuit are transmitted to a user system with an ESP wireless module and stored there for analysis. The on-board user system will display sensor data that are detected in real-time.
Then sensor data can be used an input for ANN, and are designed and integrated into the user system for the analysis of sense values. The trained ANN takes sensor data as its input and compares them with values from the dataset to classify them either as positive cases of SC or negative cases of SC, based on reference instances from a dataset. Hence, the proposed system predicts SC using real-time indicators (as mentioned in Table 3), thus sensing and analyzing with a machine learning-trained model. The design of the proposed system (see Figure 1) shows the interaction between all of its components.

3.3. Implemented IoT Circuit Design

IoT provides an efficient mechanism for real-time sensing, and represents a widely adopted technique for smart agriculture-based solutions [23,24,25,26,27]. So, the hardware of the proposed system is designed with IoT, which can sense real-time combustion indicators. The three major indicators for combustion are the cotton’s internal temperature, moisture content, and the presence of methane.
We used an arduino microcontroller, moisture sensor, temperature sensor and methane gas concentration sensor to build the IoT system. The DHT11 temperature and humidity sensor was used to sense temperature and humidity. We chose this sensor due to its reliability and high precision. In order to monitor the presence of methane gas, MQ9 was used. This sensor is suitable for detecting LPG, CO and CH4. We used a capacitive soil moisture sensor for the detection of moisture inside cotton in the moisture monitoring module. The circuit diagram and sensors used are shown in Figure 2.
The user ‘s android phone can act as the host display module, in which the android app is installed. This app can connect with a hardware system via a Wi-Fi module and it is able to read real-time temperature and humidity, methane and moisture values sensed by the sensors. This app, as shown in Figure 3, is able to display real-time information as received by hardware systems. The user can view all real-time values and can observe the change pattern easily. The display is simple and convenient for all types of users, as shown in Figure 3.

3.4. Machine Learning (ML)-Based Analysis

The proposed software system receives real-time input values of temperature, humidity, methane and moisture from the hardware system, which act as an acquisition system. Then, the input is used by a pre-trained ML model for analysis to predict combustion. The full functionality of the system is also depicted in the flow chart shown in Figure 4.
There are many ML algorithms available, which researchers have adopted to provide efficient data analysis and classification [28,29]. We implemented our system using the ANN approach, which is a famous algorithm widely used to implement machine learning (ML).

Implemented ANN Model

The ANN consists of three layers, i.e., the input, hidden and output layers [30,31,32]. The input layer receives an input and passes it to the hidden layer, which, after performing the appropriate activation function, generates the result and forwards it to the output layer. The ANN needs to be configured according to problem type and required output [33]. The appropriate configuration settings contain a number of input variables on the outer/input layer, with the activation function on the hidden layer and output on the outer/output layer [34]. The simple algorithm used for ANN is given below in Algorithm 1.
Algorithm 1: ANN basic working algorithm
  • In the first step, the input variable in the layer is passed to a hidden layer along with some weight value allocated to it according to its importance.
  • The hidden layer has a node called an artificial neuron. All input variables of layer 1 are connected with each neuron in the hidden layer, making a network.
  • Perform step 4 and 5 computation in the hidden layer.
  • Apply the transfer function to map the input to a hidden layer by performing the given steps:
    (a)
    Multiply each input variable with its subsequent weight;
    (b)
    Add the weighted sum;
    (c)
    Add the bias value.
  • Apply the activation function to the output of the transfer function to compute the result.
  • Repeat steps 3 to 5 for all hidden layers.
  • In the output layer, the final output is achieved.
In the current scenario, we have three input variables and one output variable. According to the basic working algorithm of ANN, there must be some mapping mechanism that can transfer the input values to hidden layer nodes, and the hidden layer nodes to the output nodes. We fulfil this task using the transfer function shown in Equation (1), given by [35].
X i = i = 1 n X i W i + ϑ i
where
  • Xi = hidden layer input;
  • Xi = input value;
  • Wi = weight of Xi;
  • ϑi = bias.
Once the hidden layer input is computed with a transfer function, some activation function must be included for the computation of the predicted output. In our proposed ANN model, we used the activation function described in Equation (2), as was also used by [35].
Y = i = 1 n X i
Here Xi = hidden layer input and Y = output.
In the current scenario, we used three independent variables as the input into the first layer of the ANN. These variables are cotton temperature, cotton moisture and methane levels. The input variable values were then passed on to a hidden layer, where we used activation functions to transform the weighted input into activation/output. In the current scenario, our major goal is the identification of combustion. The system must provide an output in the form of yes/no. Based on the different classifiers available for ANN, we chose the sequential model [36,37]; the design of the ANN model is shown in Figure 5.
The ANN model is implemented in python using two supporting libraries, tensorflow and Keras. The basic working algorithm is described below in Algorithm 2.
Algorithm 2: Python algorithm used to implement ANN.
  • Load the input dataset.
  • Define predictor and target variables.
  • Define the Input layer and FIRST hidden layer—both are the same—by selecting appropriate hyperparameters for ANN.
classifier.add(Dense(units = 10, input_dim = 3, kernel_initializer = ‘uniform’, activation = ‘relu’))
4.
Define the second layer by taking the input as the output of the first hidden layer.
classifier.add(Dense(units = 6, kernel_initializer = ‘uniform’,
activation = ‘relu’))
5.
Define the output layer, taking the input as the output of the second hidden layer.
classifier.add(Dense(units = 1, kernel_initializer = ‘uniform’,
activation = ‘sigmoid’))
6.
Create the ANN using the compile function.
classifier.compile(optimizer = ‘adam’, loss = ‘binary_crossentropy’,
metrics = [‘accuracy’])
7.
Split the datasets between training and testing.
train_test_split(X, y, test_size = 0.3, random_state = 42)
8.
Train the ANN model on a training dataset.
classifier.fit (X_train, train, batch_size = 50, epochs = 100, verbose = 1)
9.
Validate the ANN model by making predictions based on the testing data
Predictions = classifier. Predict(X_test)
10.
Tune the Hyperparameters to get better results.
11.
Go To Step 3.
The step by step implementation of the whole algorithm is also depicted in Figure 6.
The working algorithm states that, first, we load the input dataset for the ANN model’s configuration. The input dataset of the current scenario contains three independent predictor variables (i.e., temperature, moisture and methane), which are encoded within the proper range [34,36,38,39], along with output/target variable (SC) encoded as 0–1. The yes, encoded as 1, indicates the presence of combustion, whereas the no, encoded as 0, indicates the absence of combustion. After all encoding, the dataset is prepared in CSV format (see Table 4), which is then loaded into Python for ANN model processing.
Then, we added three subsequent layers to this model, and used the classifier compile () function to create the ANN model. The ANN model requires two types of dataset, i.e., a dataset for model training, and once trained, this model needs to be validated using another dataset. The common practice for said task is splitting the whole input dataset via training and testing. We implement this step using a random splitting function—test_train_split ()—of python, and set the test dataset ratio as 0.3, meaning 30% of the data are for testing and 70% are for training.
Once the model was created, we trained the ANN model with our training dataset. Once the ANN was trained, we closely watched the training accuracy and loss of training. The setting of the hyperparameter has a significant impact on the model’s performance, and there is no rule of thumb to decide the hyperparameters, i.e., the number of layers, the number of neurons at each layer, etc. So, in order to achieve maximum accuracy, we iterated through different hyperparameter values, and set the ANN hyperparameter and the accuracy of epochs using efficient libraries of visualization [37,40] to find suitable hyperparameters. We then trained ANN with those values of hyperparameters, as shown in Table 5. The important hyperparameters of ANN are units, input-dim, kernel initializer, activation, optimizer, batch_size and epochs.
When the generated ANN model is trained with the most suitable set of hyperparameters, we can validate the ANN model created for use in prediction on our testing dataset.
The ANN model is trained with different epochs and batch sizes to visualize the accuracy, loss of training and validation of the ANN model. The training and validation accuracy and loss graphs shown in Figure 7 show that accuracy is directly proportional to epoch size, i.e., increasing epoch size improves accuracy and vice versa. There is an inverse relation between training loss and the number of epochs (see Figure 7), i.e., by increasing epochs, loss can be minimized, and vice versa. As such, we set the epoch size to 100 in order to reduce training loss. Then, we trained a model with a suitable epoch and batch size to get the maximum accuracy. The final model is shown in Figure 8.

4. Experiments and Results

We used a trained ANN model to predict combustion with input instances collected from cotton storage with different environmental settings, and repeatedly recorded input. We recorded almost 3500 instances. We provided these input instances to train ANN and derive predictions. The results of the prediction are given in Table 6. We used precision and recall to calculate the performance of our trained ANN model (as shown in Table 7), as is also used in [41]. The formula for a given matrix is given in Equations (3) and (4) below.
Precision = TP/(TP + FP)
Recall = TP/(TP + FN)
where:
  • TP = true positive—the instances that are positive and also classified as positive by the ANN model;
  • FP = false positive—the instances that are negative but classified as positive by the ANN model;
  • FN = false negative—the instances that are positive and classified as negative by the ANN model.
The result of the experimental predictions are shown in Figure 9, in which true, wrong and missed predictions for both positive and negative classes are plotted on the x-axis against the total number of instances in the dataset (on the y-axis). Figure 10 shows precision and recall on the y-axis and percentage along the x-axis. The precision of the positive class is 95% and its recall is 97%; the precision for the negative class is higher, i.e., 98%, with 99% recall, as also shown in Figure 10.
The performance of the trained ANN model has been validated on a training dataset, which was already split into training and testing sets. We used k-fold cross validation to validate the trained model. We set the K-fold values as 5 and 10, which are used commonly [42]. It gave 99% accuracy. We also computed the mean absolute error, for which the system showed 7.14% error based on the provided data. The results of prediction along with K-fold validation and MAE are shown below, in Figure 11.
The performance accuracy of a trained ANN model can also be depicted by a confusion matrix, which provides for the better visual interpretation of a classifier’s performance [43], as shown in Figure 12, showing that the ANN model only generated one wrong prediction, as the negative class instance is positive, while there is no wrong prediction for the positive class, hence the confusion matrix shows a 99.8% performance accuracy for the trained model.

5. Discussions and Limitations

5.1. Dataset Analysis

The proposed system has been implemented using the ANN model of ML. The model was trained with the most suitable hyperparameters to achieve maximum accuracy. The dataset we used contains 1800 instances with 800 positive class instances and 1000 negative class instances. The three dependent variables of the dataset are plotted on a graph, as shown in Figure 13. The range for temperature is 10–120 °C; the range for moisture 6.5–15% and for methane it is 35–75 MJ/Kg. Figure 13 shows instances from the dataset covering the full range of all predicted variables. For example, out of 1800 instances, there are 1250 instances of methane having values between 35 and 50 MJ/Kg, and in the remaining 550 instances, the methane values are between 55 and 75 MJ/Kg.
The predictors of the dataset are also plotted against the target variable of the dataset, shown in Figure 14. The graph in Figure 14a shows temperature; here, SC shows that combustion is 0 for temperatures ranging 0–90 °C and 1 for temperatures above 90 °C. The graph plotted in Figure 14b between moisture and SC clearly shows that a moisture level from 0 to 7.5 indicates no SC, whereas moisture above 7.5 indicates SC. In Figure 14c, the graph plotted between methane and SC shows that methane values under 55 values have no SC, while values above 55 indicate SC. The heatmap of the given dataset is also shown in Figure 14d, in which the highest values of the variables are represented by a high intensity color.

5.2. Spontanous Combustion Factors’ Visualization

We used deepSHAP to visualize the contribution of predictors present in ANN. The impact of predictors on the prediction of the negative class (where SC = 0) is shown in Figure 15, and the same impact on the prediction of the positive class (where SC = 1) is shown in Figure 16. In both figures, the x-axis shows combustion factor values and the y-axis shows the predicted SC value of ANN.
In Figure 15, one instance from a dataset contains temperature, moisture and methane, holding values of 10, 6.7 and 37, for which the ANN-predicted probability of 0.00297 = 0 is mapped. The graph shows that this instance of dataset is in the negative class, which implies the absence of SC. Similarly, in Figure 16, another instance from a dataset containing temperature, moisture and methane is shown, with values 117, 13.5 and 61, for which the ANN-predicted probability is 0.9895, which approximately equals 1. This graph shows that this dataset lies in the positive class, as depicted by the presence of SC.
The proposed system used the IoT circuit to sense real-time SC-causing factors. The IoT circuit used a variety of sensors to read three SC factors: temperature, moisture and methane. The IoT circuit efficiently reads values and passes them to a pre-trained ANN model for the prediction of SC. The ANN is trained with a dataset of SC-causing factors, and with a suitable set of hyperparameters for obtaining maximum accuracy. Then, the trained ANN is also validated with test datasets and unknown instances as well.
The results obtained from the experiments show that the proposed solution can be used to efficiently sense three self-heat-causing factors i.e., temperature, moisture and methane, meaning we are able to predict SC with an efficient pre-trained ANN model with 98% accuracy. The proposed system was trained with a dataset of 1800 instances. The system enacts real-time sensing, and utilizes an efficient machine learning approach for the prediction of SC. Here, we outline some of the strengths and limitations of the proposed system in Table 8 and Table 9, respectively, to highlight our contribution to the literature. The undertaken research outlines a unique mechanism that can be used to predict SC, and which enables cotton dealers to maintain quality for a long time. Previously, no such tool/technique or mechanism has been available to predict SC. The differences and similarities between the findings of related works and those of our research are also listed in Table 10, to highlight the novelty of the current research.
From Table 10, we can clearly infer the following about the previously proposed techniques:
  • No single study provides a mechanism to detect SC and maintain cotton quality;
  • Most researchers only focused on studying heat-causing factors and smoldering;
  • They also used traditional agricultural tools and instruments to measure attributes related to the self-heating and combustion of crops like wheat and hay;
  • They did not use efficient IoT circuits for the measurement of SC factors and ML/DL algorithms to analyze data. We have considered all these limitations in the current research to detect SC.

6. Conclusions and Future Work

Cotton storage conditions must be monitored and maintained, as bad storage conditions amplify cotton quality deterioration. There are many factors that influence storage conditions, e.g., temperature, humidity, air quality, the cotton’s internal chemical characteristics, and processes such as SC. The presence of SC is harmful as it may cause big fire events. We performed investigations to identify the quality attributes of cotton that deviate from their normal range in the presence of SC. These factors include the cotton’s color, grade and weediness, which are disturbed by abnormal temperatures, moisture levels, the internal reactions of cotton, internal dust particles and the presence of insects and fungus. In the current research, we have proposed an IoT-based solution to detecting SC by sensing SC-causing factors in real time. This SC detection approach not only minimizes the chances of fire hazards in cotton storage, but it can also enable owners to preserve cotton’s quality during lengthy storage. Although previously, researchers proposed many laboratory methods and techniques to check cotton’s quality, to our best knowledge, there is no suitable mechanism for identifying SC and maintaining cotton’s quality during long storage.
In the proposed system, IoT-based real-time sensing hardware is used to measure SC indicators, i.e., temperature, moisture and methane, which are passed to a pre-trained ANN model that then efficiently predicts SC in real time. The proposed ANN model is trained by selecting a suitable set of hyperparameters, which we found by iterating through different possible sets of hyperparameters and then selecting one set that gave the highest accuracy rate. Therefore, the proposed ANN model is very efficient and fast. The proposed ANN model showed a 99.8% accuracy rate. The proposed ANN model also showed 95–98% correctness and 97–99% completeness. The proposed solution is very efficient in identifying SC, and helps storage owners to be aware of SC in a timely manner. Hence, these owners can improve their storage conditions for the preservation of cotton quality in the long run. There are many ways in which the current research can be developed in the future, and some are given below:
  • The proposed system could be improved in the future by using deep learning algorithms for SC prediction, e.g., CNN, RNN, and RGBoost, etc.;
  • Similarly, images of cotton can be used to analyze the effect of SC on cotton quality in the future;
  • The proposed system can be improved by considering other factors and processes that cause SC.

Author Contributions

Conceptualization, U.F.S., W.A. and H.S.; methodology, U.F.S., H.S. and W.A.; software, H.S.; validation, I.S.B., W.A. and S.R.; formal analysis, W.A. and A.M.; investigation, A.M. and U.F.S.; writing—original draft preparation, U.F.S., H.S. and W.A.; writing—review and editing, H.S. and I.S.B.; visualization, U.F.S. and S.R.; supervision, W.A., I.S.B. and H.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data used to support the findings of the study are available from the corresponding author upon request.

Acknowledgments

The completion of this research work would not have been possible without the assistance and support of Al-Noor, Cotton, Ginners and Oil Mills, and M. Nazam Group of Industries. Their contributions are sincerely appreciated and gratefully acknowledged.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Meyer, L.A. The World and US Cotton Outlook for 2019/20. 2019. Available online: https://www.usda.gov/sites/default/files/documents/Leslie_Meyer.pdf (accessed on 12 May 2021).
  2. Khan, M.A.; Wahid, A.; Ahmad, M.; Tahir, M.T.; Ahmed, M.; Ahmad, S.; Hasanuzzaman, M. World cotton production and consumption: An overview. Cotton Prod. Uses 2020, 1–7. [Google Scholar] [CrossRef]
  3. Hamann, M.T. Impact of Cotton Harvesting and Storage Methods on Seed and Fiber Quality. Doctoral Dissertation, Texas A & M University, College Station, TX, USA, 2012. [Google Scholar]
  4. Horrocks, A.R.; Moss, W.A.; Edwards, N.C.; Price, D. The spontaneous igniting behaviour of oil-contaminated cotton. Polym. Degrad. Stab. 1991, 33, 295–305. [Google Scholar] [CrossRef]
  5. Salimov, O.A.; Khusanova, S.A.; Salimov, M.; Rahimjonov, A.R. Study of Factors Affecting the Quality of Raw Cotton During Storage and Processing. Cent. Asian J. Theor. Appl. Sci. 2022, 3, 40–46. [Google Scholar]
  6. Chun, D.T.; Anthony, W.S. Effects of adding moisture at the gin lint slide on cotton bale microbial activity and fiber quality. J. Cotton Sci. 2004, 8, 83–90. [Google Scholar]
  7. Gamble, G.R. The effect of bale ageing on cotton fiber chemistry, processing performance, and yarn quality. J. Cotton Sci. 2007, 11, 98–103. [Google Scholar]
  8. Gu, L.H. Cotton the Cause of Spontaneous Combustion. Fire 2012, 23, 32–33. [Google Scholar]
  9. Xia, E.L. Study on the Characteristic Comparative of Cotton Smoldering and Flame Combustion. Fire Saf. Sci. 2013, 22, 70–76. [Google Scholar]
  10. Zhao, X.; Xiao, H.; Wang, Q.; Ping, P.; Sun, J. Study on spontaneous combustion risk of cotton using a micro-calorimeter technique. Ind. Crops Prod. 2013, 50, 383–390. [Google Scholar] [CrossRef]
  11. Xie, Q.; Zhang, Z.; Lin, S.; Qu, Y.; Huang, X. Smoldering fire of high-density cotton bale under concurrent wind. Fire Technol. 2020, 56, 2241–2256. [Google Scholar] [CrossRef]
  12. Xu, Q.; Yang, S.; Tang, Z.; Cai, J.; Zhong, Y.; Zhou, B. Free radical and functional group reaction and index gas CO emission during coal spontaneous combustion. Combust. Sci. Technol. 2018, 190, 834–848. [Google Scholar] [CrossRef]
  13. Saeed, M.F.; Jamal, A.; Ahmad, I.; Ali, S.; Shah, G.M.; Husnain, S.K.; Wang, J. Storage conditions deteriorate cotton and wheat seeds quality: An assessment of Farmers’ awareness in Pakistan. Agronomy 2020, 10, 1246. [Google Scholar] [CrossRef]
  14. Hughs, E.; Gamble, G.R.; Tristao, D.; Corcoran, C.A. Long Term Storage Effects on the Fiber and Textile Quality of Polyethylene Wrapped Cotton Bales. In Proceedings of the National Cotton Council Beltwide Cotton Conference, New Orleans, LA, USA, 9–12 January 2007; pp. 1936–1942. [Google Scholar]
  15. Glade, E.H. Cotton Quality Evaluation: Testing Methods and Use; US Department of Agriculture, Economic Research Service: Washington, DC, USA, 1981; Volume 668. [Google Scholar]
  16. Salimov, O.; Salimov, A. Improvement of Cotton Reception and Storage Technology. Eur. J. Life Saf. Stab. 2021, 2660–9630, 113–119. [Google Scholar]
  17. Su, H.; Shi, J.; Ji, H.; Li, J.; Fan, J. Investigating on the Iconic Gas Compositions Produced by Low-Temperature Heating Cotton. Symmetry 2020, 12, 883. [Google Scholar] [CrossRef]
  18. Wang, Z.; Liu, W.; Ni, Z.; Qi, W. Effect of density on smoldering rate of cotton bale. In IOP Conference Series: Earth and Environmental Science; IOP Publishing: Bristol, UK, 2020; Volume 446, p. 022062. [Google Scholar]
  19. Luo, Q.; Ren, T.; Liang, D.; Zhang, J.; Shen, H. A study on the thermal decomposition temperature (TDT) and critical ambient temperature (CAT) of cotton. J. Therm. Anal. Calorim. 2017, 128, 1617–1625. [Google Scholar] [CrossRef]
  20. Ju, W.H. Study on fire risk and disaster reducing factors of cotton logistics warehouse based on event and fault tree analysis. Procedia Eng. 2016, 135, 418–426. [Google Scholar] [CrossRef]
  21. Buggeln, R.; Rynk, R. Self-heating in yard trimmings: Conditions leading to SC. Compos. Sci. Util. 2002, 10, 162–182. [Google Scholar] [CrossRef]
  22. Juita Dlugogorski, B.Z.; Kennedy, E.M.; Mackie, J.C. Low temperature oxidation of linseed oil: A review. Fire Sci. Rev. 2012, 1, 1–36. [Google Scholar] [CrossRef]
  23. Jiang, J.; Yang, D.; Gao, Z. Study on Application of IOT in the Cotton Warehousing Environment. Int. J. Grid Distrib. Comput. 2015, 8, 91–104. [Google Scholar] [CrossRef]
  24. Aheleroff, S.; Xu, X.; Lu, Y.; Aristizabal, M.; Velásquez, J.P.; Joa, B.; Valencia, Y. IoT-enabled smart appliances under industry 4.0: A case study. Adv. Eng. Inform. 2020, 43, 101043. [Google Scholar] [CrossRef]
  25. Qiu, X.; Wei, Y.; Li, N.; Guo, A.; Zhang, E.; Li, C.; Zang, Z. Development of an early warning fire detection system based on a laser spectroscopic carbon monoxide sensor using a 32-bit system-on-chip. Infrared Phys. Technol. 2019, 96, 44–51. [Google Scholar] [CrossRef]
  26. Hasan, M.; Islam, M.M.; Zarif, M.I.I.; Hashem, M.M.A. Attack and anomaly detection in IoT sensors in IoT sites using machine learning approaches. Internet Things 2019, 7, 100059. [Google Scholar] [CrossRef]
  27. Munir, M.S.; Bajwa, I.S.; Naeem, M.A.; Ramzan, B. Design and implementation of an IoT system for smart energy consumption and smart irrigation in tunnel farming. Energies 2018, 11, 3427. [Google Scholar] [CrossRef]
  28. Anbarasan, M.; Muthu, B.; Sivaparthipan, C.B.; Sundarasekar, R.; Kadry, S.; Krishnamoorthy, S.; Dasel, A.A. Detection of flood disaster system based on IoT, big data and convolutional deep neural network. Comput. Commun. 2020, 150, 150–157. [Google Scholar] [CrossRef]
  29. Otoum, Y.; Liu, D.; Nayak, A. DL-IDS: A deep learning–based intrusion detection framework for securing IoT. Trans. Emerg. Telecommun. Technol. 2022, 33, e3803. [Google Scholar] [CrossRef]
  30. Goceri, E. Deep learning based classification of facial dermatological disorders. Comput. Biol. Med. 2021, 128, 104118. [Google Scholar] [CrossRef] [PubMed]
  31. Zheng, Y.Y.; Kong, J.L.; Jin, X.B.; Wang, X.Y.; Su, T.L.; Zuo, M. CropDeep: The crop vision dataset for deep-learning-based classification and detection in precision agriculture. Sensors 2019, 19, 1058. [Google Scholar] [CrossRef]
  32. Ahmadi, P.; Mansor, S.; Farjad, B.; Ghaderpour, E. Unmanned Aerial Vehicle (UAV)-based remote sensing for early-stage detection of Ganoderma. Remote Sens. 2022, 14, 1239. [Google Scholar] [CrossRef]
  33. Zhong, B.; Xing, X.; Love, P.; Wang, X.; Luo, H. Convolutional neural network: Deep learning-based classification of building quality problems. Adv. Eng. Inform. 2019, 40, 46–57. [Google Scholar] [CrossRef]
  34. Alfarisy, A.A.; Chen, Q.; Guo, M. Deep learning based classification for paddy pests & diseases recognition. In Proceedings of the 2018 International Conference on Mathematics and Artificial Intelligence, Chengdu, China, 20–22 April 2018; pp. 21–25. [Google Scholar]
  35. Montavon, G.; Samek, W.; Müller, K.R. Methods for interpreting and understanding deep neural networks. Digit. Signal Process. 2018, 73, 1–15. [Google Scholar] [CrossRef]
  36. Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
  37. Bisong, E.; Bisong, E. Matplotlib and Seaborn. In Building Machine Learning and Deep Learning Models on Google Cloud Platform: A Comprehensive Guide for Beginners; Apress: Berkeley, CA, USA, 2019; pp. 151–165. [Google Scholar]
  38. Lauzon, F.Q. An introduction to deep learning. In Proceedings of the 2012 11th International Conference on Information Science, Signal Processing and Their Applications (ISSPA), Montreal, QC, Canada, 2–5 July 2012; pp. 1438–1439. [Google Scholar]
  39. Sharma, N.; Sharma, R.; Jindal, N. Machine learning and deep learning applications-a vision. Glob. Trans. Proc. 2021, 2, 24–28. [Google Scholar] [CrossRef]
  40. Wu, Y.; Fu, S.; Zhao, J.; Bryan, C. Powering visualization with deep learning. IEEE Comput. Graph. Appl. 2021, 41, 16–17. [Google Scholar] [CrossRef]
  41. Feng, Y.; Chen, W.; Ma, Y.; Zhang, Z.; Gao, P.; Lv, X. Cotton Seedling Detection and Counting Based on UAV Multispectral Images and Deep Learning Methods. Remote Sens. 2023, 15, 2680. [Google Scholar] [CrossRef]
  42. Nsugbe, E.; Obajemu, O.; Samuel, O.W.; Sanusi, I. Enhancing care strategies for preterm pregnancies by using a prediction machine to aid clinical care decisions. Mach. Learn. Appl. 2021, 6, 100110. [Google Scholar] [CrossRef]
  43. Deng, X.; Liu, Q.; Deng, Y.; Mahadevan, S. An improved method to construct basic probability assignment based on the confusion matrix for classification problem. Inf. Sci. 2016, 340, 250–261. [Google Scholar] [CrossRef]
Figure 1. Design architecture of deep learning combustion predictor.
Figure 1. Design architecture of deep learning combustion predictor.
Inventions 08 00122 g001
Figure 2. The components of the IoT circuit: (a) soil moisture sensor; (b) MQ-9 gas sensor; (c) DHT-11 temperature and humidity sensor; (d) circuit diagram.
Figure 2. The components of the IoT circuit: (a) soil moisture sensor; (b) MQ-9 gas sensor; (c) DHT-11 temperature and humidity sensor; (d) circuit diagram.
Inventions 08 00122 g002
Figure 3. User app.
Figure 3. User app.
Inventions 08 00122 g003
Figure 4. System Flowchart.
Figure 4. System Flowchart.
Inventions 08 00122 g004
Figure 5. Implemented ANN Model.
Figure 5. Implemented ANN Model.
Inventions 08 00122 g005
Figure 6. ANN working algorithm steps.
Figure 6. ANN working algorithm steps.
Inventions 08 00122 g006
Figure 7. Training validation accuracy and loss graph.
Figure 7. Training validation accuracy and loss graph.
Inventions 08 00122 g007
Figure 8. Compiled ANN.
Figure 8. Compiled ANN.
Inventions 08 00122 g008
Figure 9. Prediction graph.
Figure 9. Prediction graph.
Inventions 08 00122 g009
Figure 10. ANN prediction precision and recall.
Figure 10. ANN prediction precision and recall.
Inventions 08 00122 g010
Figure 11. ANN prediction results.
Figure 11. ANN prediction results.
Inventions 08 00122 g011
Figure 12. Confusion matrix.
Figure 12. Confusion matrix.
Inventions 08 00122 g012
Figure 13. Dataset plotting.
Figure 13. Dataset plotting.
Inventions 08 00122 g013
Figure 14. Plotting dataset factors: (a) temperature and combustion; (b) moisture and combustion; (c) methane and combustion; (d) heatmap.
Figure 14. Plotting dataset factors: (a) temperature and combustion; (b) moisture and combustion; (c) methane and combustion; (d) heatmap.
Inventions 08 00122 g014
Figure 15. Features’ effects on the negative class using deepSHAP.
Figure 15. Features’ effects on the negative class using deepSHAP.
Inventions 08 00122 g015
Figure 16. Features’ role in predicting positive class using deepSHAP.
Figure 16. Features’ role in predicting positive class using deepSHAP.
Inventions 08 00122 g016
Table 1. Related work.
Table 1. Related work.
YearFactors InvestigatedResearch GoalAdvantages Limitations
[5], 2022Humidity, WeedinessSelf-heating; common
factors’
identification
Preserves the quality of raw Cotton Avoidance of
self-heating
Use of traditional instruments
[16], 2021Moisture, WeedinessStudy raw
cotton storage
Improvement in raw cotton storageSurvey-based study
[17], 2020Methane, COFormation of generation law for iconic gas compositionIdentification of gases
produced during self-heating
Experiments based on laboratory methods
[18], 2020Cotton density Cotton density’s effect on smoldering rateIdentified major gases produced during self-heating—Use of traditional laboratory
methods
[19], 2017DTD, CATSC risk evaluationfound thermal decomposition temperature (TDT) and critical ambient temperature (CAT).Use of traditional laboratory methods
[20], 2016Temperature,
humidity, packing
pressure,
resistance,
capacity
Study of fire safety mechanismIt is found that moisture absorption rate and heat release increase due to smoldering fireUse of traditional laboratory methods
[21], 2002Material mass, ambient
temperature,
pile
compaction
Improves fire safety mechanismFound that an inverse relationship between mass of material and
ambient
temperatures which lead to SC
Study of SC in a yard, not in a warehouse.
Experiments with Eucalyptus leaves not on cotton
Table 2. SC indicators.
Table 2. SC indicators.
IndicatorReference Range
Ignition Temp.120 °C
Moisture6.5 to 8%
Methane50–55 MJ/Kg
Table 3. Effect of combustion on cotton quality.
Table 3. Effect of combustion on cotton quality.
Quality FactorIndicatorsSourcesInternal Factor
GradeColorWhiteNormal
Light greyExtreme weather conditions
Dark grey
SpottedInsects, fungus, soil
YellowInternal reactions
TrashSeedHarvesting
Stem leaves
Dirt grass
Dust particlesInternal
PreparationWet cottonInternal high moisture Weather
Dots in lintExcessive drying
Staple LengthLongerGood quality
ShorterBad quality
MicronaireImmature fiberLow moisture
Fineness of fiberBad envrt. Condition Plant process
Table 4. Dataset.
Table 4. Dataset.
Sr. NoCombustionTemperatureMoistureMethane
10106.535
20106.636
30106.737
40106.838
50106.939
6010740
70107.141
811304079
911103085
100157.444
Table 5. Hyperparameters of ANN.
Table 5. Hyperparameters of ANN.
HyperparametersPossible Set of
Values
UsedJustification
Number of neurons
(input units at each layer)
No of neurons at each layer could be the same and could be different10 at hidden layer 1
6 at hidden layer 2
More neurons required in more complex scenario and suitable accuracy rate achieved with the used neurons count.
Activation function
(decides computation of output from input using predefined formulae)
“relu”, “sigmoid”, “softplus”, “softsign”, “tanh”, “selu”, “exponential”, “LeakyReLU”, “relu”, “elu”Relu at hidden layers
Sigmoid at output layer
ReLU converged quickly as compare to other activation.
Sigmoid is suitable for activation at the output layer for binary classification methods where we only have 2 classes.
No of layers10–1001 input
2 hidden
1 output
According to the nature of the problem, 2 hidden layers generated the required accuracy rate.
Learning rate
controls the step size for a model to reach the minimum loss function
0.01, 0.1Tried both0.01 learning rate works well.
Batch size
(number of training data sub-samples used as the input)
5–25Tried
[5,10,15,20,25]
A batch size of 25 is more suitable and gives a good accuracy rate.
Epoch—number of times a whole dataset is passed through the NN5–100Tried
[5,10,50,100]
An epoch size of 50 is more suitable and gives a good accuracy rate.
Optimizer
(responsible for changing the learning rate and weights of neurons in the neural network to reach the minimum loss function)
“SGD”, “Adam”, “RMSprop”, “Adadelta”, “Adagrad”, “Adamax”, “Nadam”, “Ftrl”, “SGD”AdamBetter results than every other optimization algorithm, with a faster computation time, and requiring fewer parameters for tuning.
Table 6. Experimental data prediction results.
Table 6. Experimental data prediction results.
ClassInstancesTPFPFN
Positive150013907040
Negative200019603010
Table 7. Experimental data precision and recall.
Table 7. Experimental data precision and recall.
ClassPrecisionRecall
Positive95%97%
Negative98%99%
Table 8. Strengths of the proposed approach.
Table 8. Strengths of the proposed approach.
IssueStrengths
Storage Area Monitoring Proposed research provides a unique approach for storage area monitoring, which aims to preserve cotton’s quality during storage through the detection of SC.
Human-IndependentThe proposed approach uses an IoT circuit for the monitoring of SC, which does not require any human beings to operate, and can work independently once installed.
AvailabilityThe proposed approach provides a solution that is always available for storage area monitoring, while human beings are not always available to monitor storage areas.
Table 9. Limitations of the proposed approach.
Table 9. Limitations of the proposed approach.
IssueLimitation
Hardware The proposed approach uses sensors for monitoring storage areas. The failure of sensors can affect system output. So, regular maintenance of sensors is required.
CostThe proposed approach uses the IoT for input readings. Therefore, some cost is involved in the purchasing and assembling of the IoT circuit.
Chemical heatingThe proposed approach only focuses on methane gas in the detection of chemical heating, while other gases are also involved in this process.
Table 10. Comparison with related works.
Table 10. Comparison with related works.
ResearchStudy GoalTechnique UsedFindings
Proposed Detection of SC helps owners to preserve cotton’s quality during lengthy storageIoT for data input; ANN for data analysis
  • Smart sensing of three types of self-heating caused by temperature, methane and moisture in order to detect SC.
  • ANN can predict SC with 99.8% accuracy.
[5], 2022Studying of factors affecting the quality of raw cotton Petrov PPR-2M device used
  • They studied air permeability during cotton preservation to check its effect on quality.
  • For the experiments, cotton was placed in a module with densities of 50.75, 150 and 220 kg/m3, and was treated with air at various pressures.
  • They concluded that the outer layer of raw cotton showed the highest absorption rate due to its contact with the environment.
[16], 2021Study of self-heat process Literature survey
  • They studied raw cotton storage with higher moisture and weediness.
  • They found abnormal storage conditions lead to biological and mechanical destruction and to self-heating.
  • Self-heating breaks fiber bonds within the seed, and the processing of such cotton increases the loss of free fibers to waste.
[17], 2020Study produced gases in cotton smolderingChromatography–mass spectrometer (GC/MS)
  • The cotton sample was heated using GC/MS, and organic and inorganic gas compositions were studied.
  • Along with other different other gases, methane was produced in higher proportions, and produced throughout the heating process, while hydrogen and carbon monoxide were produced in small proportions at 125–145 °C.
  • The joint detection of the methane and hydrogen could be used to predict the smoldering.
[18], 2020Study of the effect of cotton density on smoldering rateInstrument to measure density
  • They performed experiments to study the effects of cotton density on the smoldering rate of cotton.
  • They concluded that a high density slows down the heating rate in the early stage, maintains it in the middle, and speeds up the cooling rate in the latter stage.
[19], 2017Found the TDT and CAT of cottonInfrared spectroscopy analysis, chromatographic and mass spectrometric
  • They gave SC the name of thermal decomposition and did experiments to find thermal decomposition temperature (TDT) and critical ambient temperature (CAT).
  • They concluded that the TDT of cotton was around 210 °C.
[20], 2016Study of factors that can reduce fires in cotton warehousesEvent and fault tree analysis
  • They studied measures to prevent fires in warehouses.
  • Their study showed that the moisture absorption rate and heat release are increased by smoldering fires. Therefore, it is necessary to maintain a temperature below 343 K and humidity below 70% during long storage.
[21], 2002Study of SC reasonsExperiments with Eucalyptus leaves
  • They studied reasons for SC in the yard.
  • They found that there is an inverse relationship between the mass of material and ambient temperatures, which leads to SC.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Shafi, U.F.; Bajwa, I.S.; Anwar, W.; Sattar, H.; Ramzan, S.; Mahmood, A. Sensing Spontaneous Combustion in Agricultural Storage Using IoT and ML. Inventions 2023, 8, 122. https://doi.org/10.3390/inventions8050122

AMA Style

Shafi UF, Bajwa IS, Anwar W, Sattar H, Ramzan S, Mahmood A. Sensing Spontaneous Combustion in Agricultural Storage Using IoT and ML. Inventions. 2023; 8(5):122. https://doi.org/10.3390/inventions8050122

Chicago/Turabian Style

Shafi, Umar Farooq, Imran Sarwar Bajwa, Waheed Anwar, Hina Sattar, Shabana Ramzan, and Aqsa Mahmood. 2023. "Sensing Spontaneous Combustion in Agricultural Storage Using IoT and ML" Inventions 8, no. 5: 122. https://doi.org/10.3390/inventions8050122

Article Metrics

Back to TopTop