Abstract

Agriculture is suffering from the problem of low fertility and climate hazards such as increased pest attacks and diseases. Early prediction of pest attacks can be very helpful in improving productivity in agriculture. Insect pest (whitefly) attack has a high influence on cotton crop yield. Internet of Things solution is proposed to predict the whitefly attack to take prevention measures. An insect pest prediction system (IPPS) was developed with the help of the Internet of Things and a RBFN algorithm based on environmental parameters such as temperature, humidity, rainfall, and wind speed. Pest Warning and Quality Control of Pesticides proposed an economic threshold level for prediction of whitefly attack. The economic threshold level and RBFN algorithm are used to predict the whitefly attack using temperature, humidity, rainfall, and wind speed. The seven evaluation metrics accuracy, f-measures, precision, recall, Cohen’s kappa, ROC AUC, and confusion matrix are used to determine the performance of the RBFN algorithm. The proposed insect pest prediction system is deployed in the high influenced region of pest that provides pest prediction information to the farmer to take control measures.

1. Introduction

The Food and Agricultural Organization (FAO) predicts that the world population will reach 8 billion people by 2025 and 9.6 billion people by 2050 [1]. Due to an increase in population, the need of foods is increasing day by day. The basic needs (foods etc.) of humans cannot be met by using old traditional farming methods. The old farming methods consume more manpower and are less efficient. The risk of less productivity is still there by using old traditional farming methods. The crop yield can be increased by using new farming methods with the usage of IoT technology. The “Internet of Things” (IoT) is a creative idea integration through which any object can transfer data through the network [2,3]. The “Internet of Things” (IoT) is an exceptionally encouraging group of innovations that are capable of offering numerous solutions towards the modernization of agriculture [4]. Agriculture is one of the sectors that is expected to be highly influenced by the advances in the domain of IoT.

Cotton is one of the most well-known fiber crops. Cotton is a significant business crop around the world. It is known as the lord of fiber and is designated “as white gold” assuming a key job in numerous socio-economic parts of the world. Cotton is cultivated in 77 countries of the world including Pakistan [5]. Cotton crop employs millions of farmers and workers. It supports the cotton textile industry of Pakistan. It provides not only fiber for the textile industry but also cotton seed which is a major source of edible oil for human consumption. Its proteinaceous oil cake is used as a food supplement for dairy animals.

The cotton crop yield is influenced by many kinds of insect pests. Whitefly (Bemisia tabaci) is one of them, having a severe effect on cotton crop yield [6]. The attack of whitefly is a global problem for cotton crop with extreme danger to worldwide sustainable agricultural development [7]. Sustainable agriculture is a new farming concept which is based on scientific innovations to fulfill the need of food and textile needs of society. Climatic conditions have a potential impact on whitefly [8]. IoT application is suitable to increase the cotton crop yield with the monitoring of environmental conditions [3,9]. IoT can perform a significant role in the prediction of whitefly based on environmental factors.

As the agricultural sector is facing many challenges regarding climate change, the current challenges of the less favorable climatic conditions flourish the more serious hazards for cotton crops. The climatic conditions influence crop production which results in the economic loss to the farmers [10]. Therefore, continuous monitoring of the climatic conditions is suggested to reduce the attack of whitefly on cotton crop. Different environmental parameters such as temperature, humidity, rainfall, and wind speed could be monitored through IoT technology. As a result, whitefly prediction would be held through the data of environmental parameters and deep learning algorithms.

Figure 1 shows the flow of the pest attack prediction process at any crop. In the first step, it shows the types of crops such as cotton, wheat, rice, and sugarcane, which are the main crops of Pakistan. In Figure 1, step 2 represents the stages of crop growth such as seed planting, germination, sprout, plant, flowers, and fruit. In Figure 1, 3rd step illustrates the environmental parameters such as temperature, humidity, rainfall, and wind speed which have effects on different stages of crop growth. The 4th step shows the growth of pests after the climatic effect on different stages of crop growth.(i)Whitefly’s attack time/month is an important factor because in a specific time/month, the growth of whitefly is probably more(ii)Environmental factors such as (temperature, humidity, rainfall, and wind speed) are major factors for the growth of whitefly insect pests [11](iii)Whitefly insect pest growth is more in a dry environment(iv)High wind speed can transfer the larva and eggs from one place/area to another

The study aims is to seek protection from insect pest attacks with the early prediction using environmental factors to produce high crop yield and to alert the farmer of taking prevention measures. The remaining paper is structured into “related work,” “methodology,” “implementation,” and “results and discussion.”

During the literature, we will discuss the smart agriculture system especially focusing on different insect pest predictions and their solutions.

Raghavendra et al. [12] focused on weather-based prediction of pest in cotton by using different prediction model machine learning algorithms such as multiple linear regression (REG) and generalized linear model (GLM). The authors also applied statistical correlation on weather parameters. The weather parameters were consisting of maximum temperature, minimum temperature, morning humidity, evening humidity, and rainfall. The experiments were conducted on both training and test datasets. The weather parameters’ data used were from 2006 to 2010.

Shang et al. [13] proposed a prediction model to predict the occurrence of insect pests by combining the two machine learning algorithms: artificial neural network and genetic algorithm. The prediction model included three parts i.e., input layer, hidden layer, and output layer. The author used metrological data (precipitation, sunshine hours, mean temperature, relative humidity, and so on) as an input to predict the occurrence of insect pests. The author claimed 91.67% accuracy of prediction of insect pests due to an intelligent model and by applying a hybrid algorithm.

Kim et al. [14] presented a FaaS (Farm as a Service) model which consists of EMS (Equipment Management Service), DMS (Data Management Service), MMS (Model Management Service), FMS (Smart Farm Monitoring Service), FCS (Smart Farm Control Service), and FOS (Smart Farm Operation Service). This model had been used to predict pest and disease in the strawberry crop, in which image capture devices and sensors were used for the prediction of pests and disease in crops. The authors analyzed the environmental factors, pathogens, and host plants and simulated the captured data. The captured data was processed and analyzed through the FaaS Model. This model predicted the pest and disease occurrence and sent the alarm to the farmer through the mobile-based service.

Sajjad et al. [15] focused on the effect of climate change (temperature, humidity, rainfall, and sunshine) on major crops (e.g., sugarcane, maize, rice, and wheat) in Pakistan. The authors stated that the high temperature has a severe negative impact and low temperature has a positive impact on major crop production. The standard error techniques HAC (heteroskedasticity and autocorrelation) and FGLS (feasible generalized least square) were used to find the regression result.

Tripathy et al. [16] predicted the pest/disease, collected the sensory data which consists of temperature, humidity, leaf wetness, and soil moisture, and continuously monitored these parameters. The authors have developed a decision support system by using DM (data mining technique) and multivariant regression mining algorithm for groundnut crop. The authors developed a prediction model and these above techniques were used in this model. The authors claimed to achieve high accuracy in the prediction of pest attack.

Rubanga et al. [17] focused on small-scale greenhouse farming. Due to the shortage of labor in Japan, there is a dire need to develop a smart agricultural system. The smart system gathered real-time climate data through a wireless sensor network (WSN) and stored it in a web-based database. The stored data is used to calculate, analyze, and formulate the whole data which displayed the result on screen. The result is displayed in the form of a graph for the ease of understanding to help the farmer in decision-making to increase the production of tomatoes. The growing degree day (GDD) algorithm was used to calculate and analyze the microclimate environment in the greenhouse.

Wang et al. [18] developed a dynamic simulation model for the prediction of rice brown plant hoppers by using historical metrological data. The model consisted of complex features that were dynamic, persistent, nonlinear, and multivariable. There were five inputs (temperature, humidity, rainfall, intensity of light, and sunshine hours) to the simulation model, and one output result was the growth rate of brown plant hoppers. The authors claimed to achieve the high accuracy for the prediction of rice brown plant hoppers.

Mekala et al. [19] presented different techniques to boost up the agriculture market by using CLAY-MIST measurement techniques which were based on the sensed temperature and humidity to assess the comfort level of the crop. It presents the IoT cloud model which shows 5-layer architecture. The results are gathered by using different hardware such as microcontroller, sensor, communication protocols, and IoT cloud servers, and the authors developed a CMM algorithm for measurement of the CLAY-MIST index. This algorithm found the issues, calculated accurate decisions about issues, and sent a report to the farmers. The outcomes were 94% exact with less execution time when compared with the current warm comfort strategies.

Trogo et al. [20] presented agriculture as a major industry in every country. The use of technology had great influence to increase the yield. They used a smart agricultural solution, called DSSAT. DSSAT used Automated Weather Station (AWS) sensors and SMS technology, as well as expert knowledge of the farmers. The use of technologies such as SMS played a vital role to alert to the farmers. With the usage of technology, climate alerts, dry soil, and fertilizer alerts could be made accessible to the farmers.

Mathurkar et al. [21] presented that the agricultural sector performs a crucial role in the economics of every country. These days everything operates automatically. There are sensors to operate farms automatically. The enhancement in the crop yield could be done with the usage of FPGA. By using sensor devices, sense the data such as moisture level, temperature, and humidity and apply FPGA to monitor the environmental and soil condition required to know the timings of water supply to the fields for better growth of plants.

Table 1 presents the detail of previous studies which display the techniques/sensors and purpose of the study about the pest monitoring and prediction system.(i)Previous studies focused more on insect pest detection not prediction(ii)Previous studies focused more on image processing-based pest prediction(iii)Previous studies more focused on insect pest disease identification or detection(iv)Previous studies had not focused on the accuracy of prediction(v)Previous studies had not used sensors for insect pest prediction(vi)Intelligent decision-making was not used for prediction

3. Methodology

This portion explained about the model and design of the suggested solution about whitefly insect pest prediction, methods, and algorithm.

3.1. Architecture of Suggested Prediction Method

The suggested insect pest prediction method is designed with the capability of intelligent categorization of environmental factors such as temperature, humidity, rainfall, and wind speed. Our approach focuses on efficient energy consumption as it does not turn on all the sensors all the time. The proposed approach precisely monitors the whitefly insect pest growth environment by classifying the environmental factors by continuing with a RBFN. The proposed architecture consists of several layers, as shown in Figure 2. It describes that the five layers of the prediction system are input layer, gateway layer, storage layer, prediction layer, and application layer. The implementation of each layer is given below.

3.1.1. Input Layer

In Figure 2 hierarchical structure, the first layer consists of sensors of different environmental parameters such as temperature, humidity, rain, and wind speed. The data is collected by using sensors of these abovementioned parameters. These sensors are deployed at an experimental plot.

3.1.2. Gateway Layer

In Figure 2 hierarchical structure, the second gateway layer consists of a different hardware device such as a microcontroller (Arduino). The microcontroller is responsible for collecting data measured by sensors. The Wi-Fi module is responsible for the transfer of the data to the IoT server.

3.1.3. Storage Layer

In Figure 2 hierarchical structure, the third storage layer consists of an IoT server. The previous gateway layer transfers the data to the IoT server and stores the data in MySQL. The MySQL data can be exported in the CSV form.

3.1.4. Prediction Layer

In Figure 2 hierarchical structure, the fourth prediction layer consists of a machine learning algorithm on the IoT server for the prediction of whitefly insect pest by using exported data from MySQL in the CSV form. At this layer, RBFN, a deep learning algorithm is deployed for prediction.

3.1.5. Application Layer

In Figure 2 hierarchical structure, the fifth application layer consists of predicted output which is displayed or transferred to the Android application for farmers to take necessary action.

In Figure 2, all layers have a strong relationship. The first input layer is basically related to the perception layer in IOT architecture in which it consists of sensors. This input layer can send data through the gateway layer using Wi-Fi modules to the server and store data at the storage layer. The next prediction layer is basically a processing layer in which the RBFN algorithm develops and makes prediction using test and train data which are obtained from the storage layer, and the last layer is the application layer in which prediction about pest can be sent to the farmers.

The strength point of the problem is that the sensors sensed real-time data from the field and addressed the unique idea to predict the pest attack in the field. Farmers can take prevention measures according to the environment.

There are many key technologies of IoT but the main key technologies used in architecture are RFID at the gateway layer, sensor technology at the input layer, communication technology Wi-Fi modules at the gateway layer, and cloud computing at the storage layer.

3.2. Radial Basis Function Network for Prediction of Whitefly Insect Pest

RBFN is used as a deep learning algorithm for getting the proposed prediction. RBFN is selected due to its performance in binary class prediction with the independence condition of datasets. Deep learning is too beyond the machine learning. The machine learning algorithm already has the solution of binary classification but the suggested model uses RBFN due to five reasons.(i)RBFN has supremacy in terms of accuracy when trained with a huge amount of data. Keeping in view with the passage of time, the data of environmental parameters such as temperature, humidity, rainfall, and wind speed have been increased.(ii)More reliable when a huge amount of data are processed through RBFN.(iii)Accuracy will be increased when the amount of data size has been increased.(iv)RBFN techniques have an efficient decision support system for prediction.(v)RBFN has high accuracy with a complex problem.

RBFN consists of many layers. Details are given below:(i)The first layer is the input layer where environmental parameters are given(ii)The second layer is a hidden layer that consists of one layer where processing or learning has been performed(iii)The last layer is the output layer where output/prediction is displayed

The regression or classification problem could be resolved with the use of the RBFN Algorithm. The most significant benefit of deep learning is that feature extraction has been performed automatically. Deep learning has a great influence on the industry and agricultural sectors.

Any neuron in the neural network has two parts, as shown in Figure 3. One is the calculated linear function, and the other is to calculate the activation function.

The linear function in weights’ nonlinear function is known as activation function.

Figure 4 describes the structure of RBFN which has one input layer, one hidden layer, and one output layer.

Compute linear and nonlinear/activation function of the hidden layer:

In (1) and (2), f (x) is the output which consists of x as inputs and as the weight of the hidden layer multiplied by Gaussian activation function h (x), h (x) is a Gaussian activation function with the parameter r radius of the neuron, and c is the center defined separately at each RBF unit.

RBFN consists of three layers i.e., one input layer, one hidden layer, and one output layer.(i)Input layer is called X, which consists of input data from sensors taken by Pest Environment Monitoring System (PEMS). The input data consists of temperature, humidity, rainfall, and wind speed.(ii)Output layer is displays the output in the form of Yes or No.

4. Implementation

This section shows experimental settings, layout of experimental area, prototype model deployment in an experimental area, and RBFN implementation.

4.1. Experimental Area

The hardware is deployed in the city of Faisalabad of Pakistan. The location of Pakistan in the world is presented in Figure 5.

4.2. Crop, Season, and Insect Pest

The scientific name of cotton is Gossypium hirsutum. Pakistan is a cotton-growing land. Due to the attack of whitefly pest, the cotton growth is decreasing with the passage of time. The suggested solution is deployed for the prediction of the whitefly pest [31]. The suggested solution is extendable to any other insect pest. The selected area has two cropping seasons. To conduct the experiment, 2nd season is selected which prevails from May to November.

4.3. Experimental Plot Layout

The selected area for the experiment is one acre (43,560 ft2) having length and width of 208 × 208 feet. To observe the whitefly attacks, a dataset having 416 rows and 62 coloumns was used. Each column has 416 plants. One foot space has 2 cotton plants. Total cotton plants are 12,896 for the prediction of the whitefly population. The layout detail of the experimental area is shown in Figure 6.

4.4. Equipments Used

Temperature, humidity, rainfall, and wind speed sensors are used for the model to execute the suggested solution. The attributes of the sensor devices describe the predictive features.

4.4.1. Temperature and Humidity Sensor

Figure 7 presents a temperature sensor device known as DHT-22 to produce highly accurate data (sense the temperature and humidity) from the atmosphere. DHT-22 device is low cost and low powered. DHT-22 provides numeral results. The technical details of DHT-22 with characteristics are mentioned in Table 2.

4.4.2. Rain Detection Sensor Device

In our suggested model, the usage of the rainwater detection sensor device is displayed in Figure 8 which is a low cost, low powered, and lightweight device for measuring the intensity of rainwater in the open air. The rainwater detector sensor provides both digital and analog output. The rain sensor module is an easy tool for rain detection. The technical details of the rainwater detector with characteristics are mentioned in Table 3.

4.4.3. Anemometer/Wind Speed Sensor Device

In our suggested model, the usage of the wind speed sensor device is displayed in Figure 9, which is a reliable and stable sensor for measuring the intensity of wind speed in the open air. The anemometer/wind speed sensor provides an analog output. The wind speed sensor is an easy tool for wind speed measurement. The technical details of the wind speed sensor with characteristics are mentioned in Table 4.

4.4.4. Microcontroller

In our suggested model, a microcontroller having name WeMos D1 Wi-Fi UNO-based ESP8266 shield for Arduino, as shown in Figure 10, with characteristics in Table 5 is used.

4.5. Prototype Model and Deployment

The prediction model is shown in Figure 11, with Wi-Fi Arduino and sensors. The developed model is used to observe the whitefly attack with the effect of environmental factors such as temperature, humidity, rainfall, and wind speed values. The hardware model is developed and deployed in the crop field, as shown in Figure 11.

The web application is developed using the PHP Language; MySQL is implemented at the IoT webserver. The web application captures the environmental data, processes it, and stores it. Four times in a day, data of sensors are captured through sensors. The libraries “ESP8266WiFi.h” and “DHT.h” are used in a web application to send data from the sensors to the server (May to November) and store data in the database, as shown in Figure 12.

4.6. RBFN Implementation

Optimum values for cotton crop of environmental factors such as temperature, humidity, rainfall, and wind speed with respect to insect pest whitefly are given in Table 6.

Whitefly has positive relation with temperature and wind speed, while negative relation with humidity and rainfall. The whitefly population increases with the increase of temperature and wind speed, while the whitefly population decreases with the increase of relative humidity and rainfall [11].

4.7. Display Result

The predicted output has been displayed at the Android app for farmers to take further necessary action to control the whitefly pest at the initial level. The sample output message is shown in Figure 13.

5. Results and Discussion

Our suggested model (RBFN) has the capability of decision-making to predict the attacks of the whitefly. The deployment of layered design and prototype is depicted in the earlier sections. The four sensors (temperature, humidity, rainfall, and wind speed) and a microcontroller have been deployed on the selected zone to assess the result. Cotton is developed in May and finishes in November in the selected zone. The deployment time of hardware is from May to November of 2018 and from May to November of 2019. The proposed model captured the temperature data as displayed in Figures 14 and 15 for the year 2018 and 2019 with daily maximum temperature, every day minimum temperature, and daily average temperature.

Figures 14 and 15 plot the maximum, minimum, and average temperatures from 1st May to 1st December for the year of 2018 and 2019. Maximum temperature was 47°C and 48°C in June month and minimum temperature was 5°C and 4°C in November for the year of 2018 and 2019, respectively. The plotted graph represents the maximum temperature in the blue line, the minimum temperature in the red line, and the average temperature in the green line. The X-axis represents the time interval and Y-axis represents temperature in Celsius.

Figure 16 shows daily data about average temperature, humidity, rainfall, and wind speed from May to Nov of 2018 captured from sensors, stored in the database, and then downloaded in the CSV form.

Figure 17 shows daily data about average temperature, humidity, rainfall, and wind speed from May to Nov of 2019 captured from sensors, stored in the database, and then downloaded in the CSV form.

5.1. Performance of RBFN Model

Performance of the RBFN is detected in terms of accuracy, precision, recall, and f-measure. Precision is the fraction of the correct prediction out of the total prediction made, and recall is the ratio of the accurate prediction to all the prediction in the binary class. The execution of RBFN is performed in Python language by using the “Keras” library. The achievement of the RBFN algorithm is measured by using the “sklearn.metrics” library in Python with the accuracy of RBFN 82.88%, high F1, precision, recall, support, Cohen’s kappa, ROC AUC, log loss, and confusion matrix of different predictive features, as shown in Table 7 and 8, respectively.

The actual and predicted values of 2018 and 2019 plotted, as shown in Figure 18.

Figure 18 plots the output as expected and predicted results. The plotted graph represents the expected (actual) results in the blue line and the predicted results in the orange line. It is observed that there is a fluctuation in the results which is why we have not got 100% accuracy in the result. The X-axis represents the record of test data, and the Y-axis represents the prediction output from 0 to 1.

5.2. Field Evaluation of Proposed Model

Field evaluation is performed by observing the economic threshold level (ETL) of whitefly of 5 adult or nymph or both per leaf [32] in the fields at different times. One-acre sampling points of the cropping area plotted from May to November of 2018 and 2019 in the experiment plot and observation were started at the start of May. Infield evaluation below the ETL mean does not exist and above the ETL mean exists. The maximum whitefly has been observed in July 15, 2018 to August 15, 2018 and May 15, 2019 to August 30, 2019. In the selected experimental area, a maximum of 24 whiteflies per leaf has been observed. These 24 whiteflies consist of different forms of whitefly such as egg, pupal, and adults. The observed whitefly intensity is presented in Table 9.

The intensity of whitefly in May to Nov. 2018 has been observed during field evaluation, as shown in Figure 19.

During the field evaluation, the population of whitefly has been observed, and the observed data are plotted in Figure 19. In Figure 19, the maximum intensity of whitefly has been observed during July and August in the year of 2018. The plotted graph represents the X-axis as a time interval and the Y-axis as the intensity of the whitefly population.

The intensity of whitefly in May to Nov. 2019 has been observed during field evaluation, as shown in Figure 20.

Again in 2019, population of whitefly has been observed during field evaluation, and the observed data are plotted in Figure 20. In Figure 20, the maximum intensity of whitefly has been observed during the end of July and start of the August in the year of 2019. The plotted graph represents the X-axis as a time interval and the Y-axis as the intensity of the whitefly population.

Hot spots of whitefly above ETL have been observed during a field evaluation of May to Nov. 2018 in the experimental area, as shown in Figure 21.

Figure 21 displays different whitefly hotspot points in the experimental area. It shows different whitefly intensity levels for different experimental points. The graph plots in three-dimension represent the length, width of the plot, and intensity of the whitefly population. The 72.5% hotspots of whitefly above ETL have been observed during field evaluation in the experimental area in 2018.

Hot spots of whitefly above ETL have been observed during a field evaluation of May to Nov. 2019 in the experimental area, as shown in Figure 22.

Figure 22 also displays different whitefly hotspot points in the experimental area for the year of 2019. It shows different whitefly intensity levels for different experimental points. The above graph plots in three-dimension represent the length, width of the plot, and intensity of the whitefly population. The 74.5% hotspots of whitefly above ETL have been observed during field evaluation in the experimental area in 2019.

The average 73.5% hotspots of whitefly above ETL have been observed during field evaluation in the experimental area in 2018 and 2019, while on the other, the deep neural network prediction of whitefly accuracy of 82.88% has been observed. Efficient monitoring of environmental parameters is important for effective prediction processes to achieve the desired results.

5.3. Limitation of the Study

The prediction is based on the abiotic factor only. Many other factors such as the number of host plants, area of host plant cultivation, presence of predators, and pesticide usage affect the pest population. The factors are important but out of the scope of the study.

6. Conclusion and Future Work

The IoT-assisted crop field context in terms of temperature, humidity, rainfall, and wind speed is used to monitor the environment daily to predict the whitefly attack to take necessary action for the adoption of control measures. The necessities are upgraded by the predominant conditions in the field to effectively serve the target of prediction. These predictions are used to train and test the RBFN algorithm for the deep learning model to optimize these predictions to prevent the attack of whitefly in the cotton crop field. The prediction proved to be very effective regarding the recommendation of pesticides. The prediction of real-time sensor-based environmental data i.e., temperature, humidity, rainfall, and wind speed helps to increase the yield of the crop with high accuracy. The implementation of the suggested model shows major developments in controlling the whitefly attack on the cotton crop area.

The pest prediction needs to be evaluated for other types of pests on different other crops. The inclusion of other factors of pest predictions such as the area of host crops available for the pest can significantly improve the accuracy of the pest prediction mode. Different other biotic and abiotic factors can improve the accuracy of the pest prediction model.

Data Availability

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

Conflicts of Interest

The authors declare that they have no conflicts of interest regarding the publication of this paper.