Next Article in Journal
Innovation and Optimization Logic of Grassroots Digital Governance in China under Digital Empowerment and Digital Sustainability
Next Article in Special Issue
Metaheuristics Based Energy Efficient Task Scheduling Scheme for Cyber-Physical Systems Environment
Previous Article in Journal
Climate Policy and Foreign Direct Investment: Evidence from a Quasi-Experiment in Chinese Cities
Previous Article in Special Issue
Integrating Blockchain with Artificial Intelligence to Secure IoT Networks: Future Trends
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Smart Water Quality Prediction Using Atom Search Optimization with Fuzzy Deep Convolutional Network

by
Mesfer Al Duhayyim
1,*,
Hanan Abdullah Mengash
2,
Mohammed Aljebreen
3,
Mohamed K Nour
4,
Nermin M. Salem
5,
Abu Sarwar Zamani
6,
Amgad Atta Abdelmageed
6 and
Mohamed I. Eldesouki
7
1
Department of Computer Science, College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al-Kharj 16273, Saudi Arabia
2
Department of Information Systems, College of Computer and Information Sciences, Princess Nourah Bint Abdulrahman University, P.O. Box 84428, Riyadh 11671, Saudi Arabia
3
Department of Computer Science, Community College, King Saud University, P.O. Box 28095, Riyadh 11437, Saudi Arabia
4
Department of Computer Sciences, College of Computing and Information System, Umm Al-Qura University, Mecca 24382, Saudi Arabia
5
Department of Electrical Engineering, Faculty of Engineering and Technology, Future University in Egypt, New Cairo 11835, Egypt
6
Department of Computer and Self Development, Preparatory Year Deanship, Prince Sattam Bin Abdulaziz University, Al-Kharj 16278, Saudi Arabia
7
Department of Information System, College of Computer Engineering and Sciences, Prince Sattam Bin Abdulaziz University, Al-Kharj 16278, Saudi Arabia
*
Author to whom correspondence should be addressed.
Sustainability 2022, 14(24), 16465; https://doi.org/10.3390/su142416465
Submission received: 16 September 2022 / Revised: 3 December 2022 / Accepted: 5 December 2022 / Published: 8 December 2022
(This article belongs to the Special Issue IoT Quality Assessment and Sustainable Optimization)

Abstract

:
Smart solutions for monitoring water pollution are becoming increasingly prominent nowadays with the advance in the Internet of Things (IoT), sensors, and communication technologies. IoT enables connections among different devices with the capability to gather and exchange information. Additionally, IoT extends its ability to address environmental issues along with the automation industry. As water is essential for human survival, it is necessary to integrate some mechanisms for monitoring water quality. Water quality monitoring (WQM) is an efficient and cost-effective system intended to monitor the quality of drinking water that exploits IoT techniques. Therefore, this study developed a new smart water quality prediction using atom search optimization with the fuzzy deep convolution network (WQP-ASOFDCN) technique in the IoT environment. The WQP-ASOFDCN technique seamlessly monitors the water quality parameters using IoT devices for data collection purposes. Data pre-processing is carried out at the initial stage to make the input data compatible for further processing. For water quality prediction, the F-DCN model was utilized in this study. Furthermore, the prediction performance of the F-DCN approach was improved by using the ASO algorithm for the optimal hyperparameter tuning process. A sequence of simulations was applied to validate the enhanced water quality prediction outcomes of the WQP-ASOFDCN method. The experimental values denote the better performance of the WQP-ASOFDCN approach over other approaches in terms of different measures.

1. Introduction

The Internet of Things (IoT) has progressively infused all forms of technological landscapes, namely, irrigation management, monitoring, agriculture, security, and health care. An IoT structure with cloud-centric memory and processing could evaluate the data through different sensors with decision-support networking nodes [1,2,3]. The IoT environment will assist intellectually applicable technology, rendering solutions that can be fruitful and helpful in smart dimensional irrigations of the agricultural environment [4]. Intellectual spectral detection related to the IoT environment promotes a sustainable ecosystem with machine learning (ML) methods [5,6]. IoT solutions for water quality (WQ) management and assessment have become significant with the advances in information and communication technology [7]. WQ can be generally examined using chemical, biological, and physical properties. The IoT-based WQ evaluation mechanism conducts WQ parameter checks to identify the risks of deviation and the continual degradation of WQ with the help of the real-time analysis of accumulated data to recommend the most suitable remedial action [8,9]. Reporting is now becoming feasible because of the IoT advancements in WQ managing applications.
Using IoT and wireless sensor networks (WSNs), a low-cost, real-time surveillance system will promptly send alerts through email and SMS [10,11]. However, several techniques have been formulated for assessing and monitoring WQ worldwide, which include fuzzy inference, the water quality index (WQI), and multivariate statistical methods [12]. To assess the WQ, even though many WQ variables have been observed as per the procedures described in the appropriate standards, the parameter selection process plays a vital role [6,13,14]. Today, with the advancements in ML algorithms, many researchers have faith that a huge volume of data are analyzed and captured successfully to address the large-scale and complex WQ assessment necessities [15]. In ML, a branch of artificial intelligence (AI) techniques can be employed for analyzing data and endeavors to extract effective patterns in the data to predict novel data. ML has been broadly used in various domains due to its flexible customization, convenient extensibility, and high precision [16,17]. Complicated nonlinear relational data are easily managed with ML, simplifying the detection of the underlying systems. The incredible adaptability of ML has shown its potential in the environmental science and engineering domains in recent times [18]. Thus, highly precise assessment outcomes are expected in spite of the complexity of utilizing ML for WQ evaluation and analysis.
This study developed a new smart water quality prediction using atom search optimization with a fuzzy deep convolution network (WQP-ASOFDCN) technique in the IoT environment. Data pre-processing was carried out at the initial stage to make the input data compatible for further processing. For water quality prediction, the F-DCN method was utilized in this study. Furthermore, the prediction performance of the F-DCN algorithm could be improved by using the ASO algorithm for the optimal hyperparameter tuning process. A sequence of simulations was conducted to validate the enhanced WQ prediction outcomes of the WQP-ASOFDCN method.
The rest of the paper is organized as follows. Section 2 provides the literature review, and Section 3 introduces the proposed model. Later, Section 4 offers experimental validation, and Section 5 concludes the study.

2. Literature Review

In [19], a DL-based BiLSTM technique (DLBL-WQA) was established to predict the WQ features of the Yamuna River, India. The presented techniques did not execute missing value imputation and only concentrated on the learning method without comprising a loss function applied to the trained errors. The presented technique demonstrated an original approach that comprises the missing value imputation during the first step, the second step makes the feature mapping in the offered input data, the third step comprises a BiLSTM infrastructure to increase the learning system, and finally, an optimization loss function can be implemented to decrease the trained errors. Pant et al. [20] examined the automated IoT-based WQ observing method. Different sensors were employed to monitor several parameters of water. The entire method contained an Arduino interfacing the sensor and GSM element to remotely observe the data. This whole method was solar-powered, and the device helped access the WQ and monitor the distinct water bodies in real-time.
Bhardwaj et al. [21] proposed an IoT-based real-time infrastructure for performing WQ monitoring, management, and alerts to take action depending upon the contamination and toxic parameter levels, gadgets, and application efficiency as the primary part of the presented technique. ML techniques were used to examine the WQ trends and device observation and management structure. Prasad et al. [22] discovered the suitability of implementing AutoDL for WQA by learning a comparative betwixt AutoDL and convention techniques and study to predict the WQ, a suitable class dependent upon the WQ index separating water bodies as various classes. In [23], two new hybrid DT-based ML algorithms were presented to achieve further accurate short-term WQ predictive outcomes. The fundamental techniques of the two-hybrid approaches of the two hybrid approaches were XGBoost and RF, which correspondingly existed as an advanced data denoising method—complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN).
Liu et al. [24] concentrated on a WQ predictive system that needed higher-quality data. During this procedure of the creation and function of smart WQ observing methods dependent upon IoT, big data were created even more often at the maximum speed, developing WQ data difficulties. In order to benefit from the optimum efficiency of LSTM and DNNs from the predictive time-series, a drinking-WQ technique was planned and introduced to predict WQ big data with the use of a recent DL model in this work. Saravanan et al. [25] examined a novel supervisory control and data acquisition (SCADA) method that was combined with IoT for real-time WQ observation. Its purpose was to determine the contamination of water, leakage in pipelines, and even automatic measure of parameters (e.g., color, temperature, and flow sensors) in real-time by utilizing an Arduino Atmega 368 and employing a Global System for Mobile Communication (GSM) element.
In [26], the authors established an IoT-based intelligent fish tracking and farming control method containing a predicting approach that allowed for automatic WQ management and assisted in following the breeding and selling of freshwater fishes. The authors also presented a group of WQ indicator-predicting approaches to a fishpond intelligent management element that primarily identified and removed abnormal data by utilizing the local outlier factor (LOF) system related to DBSCAN. Zhou et al. [27] examined a WQ predictive system dependent upon a multi-source TL to the water environment IoT method to efficiently utilize the WQ data of nearby monitoring points to improve the predictive accuracy. Initially, a WQ predictive structure dependent upon multi-source TL was generated. In detail, the general features in the WQ instances of several neighboring and target monitoring points were extracted after being aligned. Lopez et al. [28] introduced a system dependent upon ML and IoT, which measured and predicted future WQ parameters. The day-to-day WQ data were obtained in the Muvattupuzha River in Kerala and the LSTM-NN was utilized to bring out the time series form in the data.
Although several WQ prediction models are available, the development of accurate WQ prediction models is still necessary. The existing approaches do not focus on the hyperparameter selection process, which mainly influences the classification model’s performance. The hyperparameters such as epoch count, batch size, and learning rate selection are essential to attain effectual outcomes. Since the trial and error method for hyperparameter tuning is tedious and erroneous, metaheuristic algorithms can be applied. Therefore, in this work, we employed the ASO algorithm for the parameter selection of the FDCN model.

3. The Proposed Model

In this study, a new WQP-ASOFDCN approach was formulated for a smart water quality monitoring system in the IoT platform. The presented WQP-ASOFDCN technique seamlessly monitors the water quality parameters using IoT devices for data collection purposes. In the presented WQP-ASOFDCN technique, a series of subprocesses are performed: data collection, data preprocessing, F-DCN-based water quality prediction, and ASO-based hyperparameter tuning. Figure 1 demonstrates the working process of the proposed model.

3.1. Data Collection and Data Pre-Processing

The water quality parameter is primarily gathered using IoT sensor devices in the sensor node from different places such as drinking water, irrigation, river, etc. [29], and the mathematical expression is given in Equation (1):
D s = D 1 ,   D 2 , , D m  
where D s indicates the dataset, and   D m denotes the m-number of sensor dataset D. The information gathered modules consist of different devices such as an analogue to digital converter, a WQ sensor array, a Raspberry Pi 4 microprocessor, a real-time database (firebase), a 5 V lithium-ion battery (power supply), and a GSM element. The WQ sensor array includes the following: the pH sensor SEN0161 determines the existence of acidity or alkalinity of any solution on a logarithmic scale; the digital temperature sensor DFR0198 provides accurate readings between −55 and 125 °C; the analogue sensor DFR0300 was utilized to measure the water sample’s electrical conductivity; the turbidity sensor SEN0189 was used in the design to detect the presence of suspended particles by using light. WQ-sensed information was transformed from analogue-to-digital forms and sent to the Raspberry Pi 4, which transmits the WQ-sensed information to a real-time database (firebase) via the MQTT protocol. The presented method exploits a data-cleaning procedure to manage missing values and outliers. The percentage of missing values in the data can be slightly high; thus, the proposed method used the mean method to fill in the missing values.
The water quality classification performance of the WQP-ASOFDCN method was studied by utilizing a water quality dataset. The dataset contained 3000 samples with three classes, as depicted in Table 1. The data samples were classified into three types based on turbidity. It is known that the turbidity for drinking water should ideally be less than 1 NTU and should not be more than 5NTU. Beyond this limit, the sample was rejected. The proposed approach predicted the turbidity of water into three classification groups: ‘Acceptable’, ‘Permissible’, and ‘Rejected’.

3.2. Water Quality Prediction Module

In this study, the pre-processed data were forwarded into the F-DCN method to perform the prediction process. A deep convolution network (DCN) refers to a deep network comprising multi-layers of convolution, and the CNN relevant to traditional LeNet is the widely employed DCN [30]. The CNN is constructed by stacking more than one layer and comprises fully connected, pooling, nonlinear conversion, and successive convolutional layers along with the input and output, resulting in a sequence of breakthroughs for predictive tasks. Convolution can be undertaken at the convolution layer to extract features from local neighborhoods on the feature map in the preceding layer. Next, the outcome incorporated with additive bias was passed onto the following layer via a nonlinear activation function. For the convolution process, the values of the unit in i th feature maps in the l th layers, represented by 0 i , was measured using Equation (2):
0 i l = w i l x l + b i l  
where wi and b i indicate the weight and bias for the i - th feature maps of l - th layers in the CNN module, correspondingly, and χ denotes an input of l - th layers in the CNN module. The nonlinear conversion can be carried out using the activation function:
( y d ) i l = g 0 i l  
From the expression, g indicates the activation function, viz., ReLU with g x = m a x 0 ,   x . Deep networks incorporate the hierarchical feature, and several prediction tasks have also been advantaged by deep models due to the importance of depth. However, the complication of the network having additional layers is that the gradient vanishing initially hinders convergence. This solution specifies that a deep method must generate no high training errors compared to the original counterpart. The presented F-DCN method for predicting water quality depends on the F-DCN module. The F-DCN models consist of the predictor, the input, the DCN, the fuzzy network (FN), and fusion. First, the input dataset flows over the following two channels: DCN for neural representation and FN for fuzzy representation. Afterward, both modules process the dataset and the outcomes of every epoch from DCN and FN are combined with the fusion model. Currently, the node in the fusion model might implement two operational modes: up–down and down–up transmissions. First, it must further transfer the fusion outcome to the predictor and then evaluate the values of the loss function to tune the parameter in the following stage. In the training stage of F-DCN, the model parameters can be repeatedly upgraded by minimalizing the values of the loss function. When the model is trained, the forecasted outcome is attained by inputting the dataset into the models.
The architecture of FDCN is demonstrated in Figure 2. Every node in the input layers is interconnected to the fuzzification layers and utilizes the membership function to calculate the degree that the input nodes belong to a specific fuzzy set.
u i = e ( x i μ i ) 2 / σ i 2 , i ,  
In Equation (2), μ i represents the mean, and σ i 2 indicates the variance. During the AND/OR operation, AND is a widely employed fuzzy operation, given below:
( y f ) i 1 = j = 1 Π u j =   min   u 1 ,   u 2 u n ,  
In Equation (3), n indicates the node count on l 1 th fuzzy layer, which connects to the i - th nodes. The O R operation performs equivalent fuzzy logic rules through the connections among nodes. The resultant fusion layer node can be incorporated into the outcomes of the DCN part to adaptively adjust the fuzzy rule.
During DCN, the deep residual architecture is utilized since the training efficiency can be subjected to the depth of the DCN method. It should be noted that the fuzzy DNN uses the DNN architecture to classify datasets. In the presented method, the deeper model with the residual network structure was utilized for the predictive task, since it was shown to be effective enough to train deeper networks. The main concept of residual learning is to study the additive remaining function g regarding the input of the k - th residual units ( ResU) X k :
X k + 1 = X k + g X k ,  
In Equation (4), X k and X k + 1 represent the input and output of the k th remaining units, correspondingly, and g indicates the remaining function. The DCN architecture with the residual unit has dual nonlinear transformations and dual two-convolutions.
An input might be a long series of observations for spatiotemporal predictive problems where the spatiotemporal property is difficult to learn. In this work, one convolution layer could clearly define nearby dependency in a spatial region, and a stack of convolution layers could substantially capture higher spatial dependency. Therefore, the presented F-DCN method explored the water quality’s spatial and temporal properties for accurate prediction.

3.3. Training Process of F-DCN Model

During the training procedure of the F-DCN model, the ASO algorithm was exploited in the presented method. The molecular dynamics simulates the mathematical modeling of the ASO approach [31]. In this work, the location of each atom from the search space can be affected by the mass, which implies the solution. ASO begins optimizing by arbitrarily making a collection of particles from N -dimension space. Then, the solution of each atom is evaluated according to the key functions. The atom upgrades the velocity and location from each iteration, and the location of an optimal atom is upgraded from each iteration. The velocity of a particle is a function of the acceleration, and the acceleration of the atom is evaluated according to Newton’s Second Law based on the ratio of force implemented to a particle’s mass. The mass of an ith atom in t   iteration ,   m i t , was calculated using the succeeding equation:
M i t = e F i t i t F i t B e s t t F i t B e s t t F i t W o r s t  
m i t = M i t j = 1 N   M j t  
From the expression, F i t B e s t t and F i t W o r s t indicate atoms with the optimal and worst values from the t h e   t t h iteration, and F i t i t correspondingly denotes the value of the ith atom main function from the Tth iterations. Regarding the problem reduction, F i t B e s t and F i t W o r s t can be considered according to the following expression:
F i t B e s t t = m i n   F i t i t ,   i 1 , 2 ,   ,   N
F i t W o r s t t = m a x   F i t i t ,   i 1 , 2 , , N  
In each period, the neighbor count of each atom that interacts is determined as follows:
K t = N N 2 × T T  
where T describes the whole quantity of iterations, or in other words, the life of the system. Note that the variable K is a function of time, gradually decreasing the iteration. The force implemented in each particle contains two types: communication force and internal constraint force. The Lennard-Jones potential approach defines the interaction forces, and the internal constraint force, interconnected to bond length potential and varies according to the distance between each atom and the optimal atom, was calculated using the following expression.
F i d t = j K B e s t     r a n d j F i j ( t ) d  
F i j t = α ( 1 t 1 T ) 3 e 20 t T [ 2 ( h i j t ) 13 h i j t ) 7
G i d t = λ t x b e s t d t x i d t , λ t = β e 20 T T  
where F and G describe the interaction and internal constraint forces; r a n d j denotes an arbitrary value within [0, 1]; and   K B e s t represents the set of atom populations encompassing K atoms with the optimal main function value. Additionally, x b e s t d t illustrates the position of an optimum atom from the t t h iteration from d dimension space, λ t demonstrates the Lagrangian co-efficient, α refers to the depth co-efficient, and β indicates the weight coefficient.
The subsequent expression evaluated the acceleration of i - t h particles from the d dimension space and τ period:
a i d t = F i d t m i d t + G i d t m i d t = α ( 1 e 20 T T × j K b e s t   r i [ 2 × ( h i j t ) 13 h i j t ) 7 m i t X j d t X i d | X i t , X j t | 2 + β e 20 T T X b e s t d t X i d t m i t  
The final step in each iteration is to upgrade the location and velocity of the particles, which is accomplished in the following formula:
v i d t + 1 = r a n d i d v i d t + a i d t  
x i d t + 1 = x i d t + v i d t + 1  
Each upgrade and computation were continuously implemented until the ending criteria were satisfied. Finally, the value and position of the optimal atom’s main function were considered the optimal approximation of the problem as explained in Algorithm 1.
Algorithm 1: Pseudocode of ASO Algorithm
Arbitrarily   initialize   a   set   of   atoms   X   ( solutions )   and   its   velocity   v   and   F i t B e s t = I n f .
While the end state is not fulfilled, do
For   every   atom ,   X i do
     Evaluate the fitness value Fit;
          If   F i t i < F i t B e s t , then
                F i t B e s t = F i t i ;
                X B e s t = X i ;
      End If
      Estimate the mass;
          Determine   its   K neighbors;
          Compute   the   constraint   force   G i   and   the   interaction   force   F i ;
      Evaluate the acceleration;
     Upgrade the velocity;
     Upgrade the position;
End For.
End While.
Define   the   optimal   solution   so   far   X B e s t

4. Performance Evaluation

The proposed model was simulated using the Python 3.6.5 tool. The proposed model experiments were conducted on a PC i5-8600k, GeForce 1050Ti 4 GB, 16 GB RAM, 250 GB SSD, and 1 TB HDD. The parameter settings were as follows: learning rate: 0.01; dropout: 0.5, batch size: 5; epoch count: 50; and activation: ReLU. Figure 3 reports the confusion matrices offered by the WQP-ASOFDCN approach to the water quality classification process. The figure implies that the WQP-ASOFDCN method proficiently detected the water quality class labels.
Table 2 reports the overall water quality classification results of the WQP-ASOFDCN method on 80% of the TR and 20% of the TS databases in terms of different measures such as accuracy ( a c c u y ), precision ( p r e c n ), recall ( r e c a l ), F-score ( F s c o r e ), and Mathew correlation coefficient (MCC). Figure 4 highlights the results of the WQP-ASOFDCN method on 80% of the TR data. The WQP-ASOFDCN system had detection instances under the ‘acceptable’ class with an a c c u y of 97.04%, p r e c n of 95.22%, r e c a l of 96.25%, F s c o r e of 95.73%, and MCC of 93.47%. Additionally, the WQP-ASOFDCN algorithm identified instances under the ‘permissible’ class with an a c c u y of 94.75%, p r e c n of 93.04%, r e c a l of 90.93%, F s c o r e of 91.97%, and MCC of 88.09%. In addition, the WQP-ASOFDCN method identified samples under the ‘rejected’ class with an a c c u y of 96.96%, p r e c n of 94.80%, r e c a l of 95.89%, F s c o r e of 95.34%, and MCC of 93.09%.
Figure 5 demonstrates the results of the WQP-ASOFDCN method on 20% of the TS database. The WQP-ASOFDCN system had detection instances under the ‘acceptable’ class with an a c c u y of 97.50%, p r e c n of 94.38%, r e c a l of 97.11%, F s c o r e of 95.73%, and MCC of 93.98%. Similarly, the WQP-ASOFDCN algorithm detected samples under the ‘permissible’ class with an a c c u y of 95.83%, p r e c n of 94.58%, r e c a l of 93.20%, F s c o r e of 93.89%, and MCC of 90.73%. Moreover, the WQP-ASOFDCN methodology recognized samples under the ‘rejected’ class with an a c c u y of 98%, p r e c n of 97.72%, r e c a l of 96.83%, F s c o r e of 97.27%, and MCC of 95.70%.
Table 3 displays the overall water quality classification results of the WQP-ASOFDCN method on 70% of the TR and 30% of the TS databases. Figure 6 exhibits the results of the WQP-ASOFDCN technique on 70% of the TR database. The WQP-ASOFDCN system identified instances under the ‘acceptable’ class with an a c c u y of 97.62%, p r e c n of 97.60%, r e c a l of 95.44%, F s c o r e of 96.51%, and MCC of 94.72%. Similarly, the WQP-ASOFDCN technique detected samples under the ‘permissible’ class with an a c c u y of 97.05%, p r e c n of 95.09%, r e c a l of 95.92%, F s c o r e of 95.51%, and MCC of 93.31%. Additionally, the WQP-ASOFDCN model identified samples under the ‘rejected’ class with an a c c u y of 96.86%, p r e c n of 94.56%, r e c a l of 95.94%, F s c o r e of 95.24%, and MCC of 92.90%.
Figure 7 exhibits the results of the WQP-ASOFDCN approach on 30% of the TS database. The WQP-ASOFDCN technique identified instances under the ‘acceptable’ class with an a c c u y of 98.11%, p r e c n of 97.09%, r e c a l of 96.74%, F s c o r e of 956.91%, and MCC of 95.55%. Additionally, the WQP-ASOFDCN technique detected samples under the ‘permissible’ class with an a c c u y of 98%, p r e c n of 96.24%, r e c a l of 98.08%, F s c o r e of 97.15%, and MCC of 95.62%. Furthermore, the WQP-ASOFDCN system had detection instances under the ‘rejected’ class with an a c c u y of 98.33%, p r e c n of 98.37%, r e c a l of 96.78%, F s c o r e of 97.57%, and MCC of 96.31%.
The training accuracy ( T R a c c ) and validation accuracy ( V L a c c ) achieved by the WQP-ASOFDCN algorithm under the test database is shown in Figure 8. The simulation values denoted by the WQP-ASOFDCN method gained higher values of T R a c c and V L a c c . To be specific, the V L a c c was greater than T R a c c .
The training loss ( T R l o s s ) and validation loss ( V L l o s s ) acquired by the WQP-ASOFDCN technique under the test database are displayed in Figure 9. The simulation values indicate that the WQP-ASOFDCN approach exhibited the least values of T R l o s s and V L l o s s . Seemingly, the V L l o s s was less than the T R l o s s .
A clear precision–recall (PR) study of the WQP-ASOFDCN approach under the test database is shown in Figure 10. The figure shows that the WQP-ASOFDCN algorithm had improved values of PR values in each class label.
A detailed ROC investigation of the WQP-ASOFDCN methodology under the test database is presented in Figure 11. The results showed that the WQP-ASOFDCN algorithm outperformed its capacity in classifying varying classes in the test database.
Table 4 and Figure 12 shows the comparative results of the WQP-ASOFDCN model with other ML models [21]. The experimental values inferred that the RF, XGBoost, and NB models resulted in lower water quality classification outcomes. At the same time, the KNN model tried to reach many performances with an a c c u y of 92.84%, p r e c n of 91.12%, r e c a l of 90.36%, and F s c o r e of 94.52%. Although the LGBM model accomplished near-optimal results, the WQP-ASOFDCN model attained superior performance with an a c c u y of 98.15%, p r e c n of 97.23%, r e c a l of 97.20%, and F s c o r e of 97.21%.
Table 5 reports the computation time (CT) complexity of the proposed model with the existing models. The results indicate that the NB model showed higher CT, followed by the LGBM model, which offered a somewhat decreased CT value. Although the XGBoost, NB, and KNN models reached closer CT values, the proposed model outperformed them with a minimal CT of 23.17 s. Therefore, the experimental results assured the enhanced performance of the proposed model over the other existing models. The proposed model’s enhanced outcomes were due to the hyperparameter tuning using the ASO algorithm.

5. Conclusions

In this study, a novel WQP-ASOFDCN approach was formulated for a smart water quality monitoring system in the IoT environment. The presented WQP-ASOFDCN technique seamlessly monitors the water quality parameters using IoT devices for data collection purposes. In the presented WQP-ASOFDCN technique, a series of subprocesses are performed: data collection, data preprocessing, F-DCN-based water quality prediction, and ASO-based hyperparameter tuning. In the WQP-ASOFDCN model, the prediction performance of the F-DCN model was improved by using the ASO algorithm for the optimal hyperparameter tuning process. To validate the enhanced water quality prediction outcomes of the WQP-ASOFDCN method, a sequence of experiments was conducted. The simulation values denoted the betterment of the WQP-ASOFDCN model over other approaches in terms of the different measures. In the future, hybrid metaheuristic optimizers can be applied to foster the predictive outcomes of the F-DCN method. In addition, the computational complexity of the proposed model will be examined in the future and feature selection approaches can be designed to improve the accuracy and decrease the computation complexity.

Author Contributions

Conceptualization, M.K.N.; Methodology, M.A.D.; Software, N.M.S.; Validation, M.A., N.M.S. and A.S.Z.; Formal analysis, H.A.M.; Investigation, M.A.; Resources, M.I.E.; Data curation, M.I.E.; Writing—original draft, M.A.D., H.A.M., M.K.N., N.M.S., A.S.Z. and A.A.A.; Writing—review & editing, M.A.D., M.A. and M.I.E.; Visualization, A.A.A.; Supervision, A.S.Z.; Funding acquisition, H.A.M. All authors have read and agreed to the published version of the manuscript.

Funding

Princess Nourah bint Abdulrahman University Researchers Supporting Project number (PNURSP2022R114), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. The authors would like to thank the Deanship of Scientific Research at Umm Al-Qura University for supporting this work by Grant Code: (22UQU4310373DSR45). Research Supporting Project number (RSP2022R459), King Saud University, Riyadh, Saudi Arabia.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

This article does not contain any studies with human participants performed by any of the authors.

Data Availability Statement

Data sharing is not applicable to this article as no datasets were generated during the current study.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Ighalo, J.O.; Adeniyi, A.G.; Marques, G. Internet of Things for Water Quality Monitoring and Assessment: A Comprehensive Review. In Artificial Intelligence for Sustainable Development: Theory, Practice and Future Applications; SpringerNature: Cham, Switzerland, 2021; pp. 245–259. [Google Scholar]
  2. Sithole, M.P.P.; Nwulu, N.I.; Dogo, E.M. Dataset for a wireless sensor network based drinking-water quality monitoring and notification system. Data Brief 2019, 27, 104813. [Google Scholar] [CrossRef] [PubMed]
  3. Dogo, E.M.; Nwulu, N.I.; Twala, B.; Aigbavboa, C. A survey of machine learning methods applied to anomaly detection on drinking-water quality data. Urban Water J. 2019, 16, 235–248. [Google Scholar] [CrossRef]
  4. Chen, H.; Chen, A.; Xu, L.; Xie, H.; Qiao, H.; Lin, Q.; Cai, K. A deep learning CNN architecture applied in smart near-infrared analysis of water pollution for agricultural irrigation resources. Agric. Water Manag. 2020, 240, 106303. [Google Scholar] [CrossRef]
  5. Ullo, S.L.; Sinha, G.R. Advances in Smart Environment Monitoring Systems Using IoT and Sensors. Sensors 2020, 20, 3113. [Google Scholar] [CrossRef] [PubMed]
  6. Udanor, C.; Ossai, N.; Nweke, E.; Ogbuokiri, B.; Eneh, A.; Ugwuishiwu, C.; Aneke, S.; Ezuwgu, A.; Ugwoke, P.; Christiana, A. An internet of things labelled dataset for aquaponics fish pond water quality monitoring system. Data Brief 2022, 43, 108400. [Google Scholar] [CrossRef] [PubMed]
  7. Mukta, M.; Islam, S.; Barman, S.D.; Reza, A.W.; Khan, M.S.H. IoT Based Smart Water Quality Monitoring System. In Proceedings of the 2019 IEEE 4th International Conference on Computer and Communication Systems (ICCCS), Fukuoka, Japan, 5–8 August 2019; pp. 669–673. [Google Scholar]
  8. Azrour, M.; Mabrouki, J.; Fattah, G.; Guezzaz, A.; Aziz, F. Machine learning algorithms for efficient water quality prediction. Model. Earth Syst. Environ. 2022, 8, 2793–2801. [Google Scholar] [CrossRef]
  9. Jan, F.; Min-Allah, N.; Düştegör, D. IoT Based Smart Water Quality Monitoring: Recent Techniques, Trends and Challenges for Domestic Applications. Water 2021, 13, 1729. [Google Scholar] [CrossRef]
  10. Mabrouki, J.; Azoulay, K.; Elfanssi, S.; Bouhachlaf, L.; Mousli, F.; Azrour, M.; el Hajjaji, S. Smart System for Monitoring and Controlling of Agricultural Production by the IoT. In IoT and Smart Devices for Sustainable Environment; Springer: Cham, Switzerland, 2022; pp. 103–115. [Google Scholar]
  11. Aldhyani, T.H.; Al-Yaari, M.; Alkahtani, H.; Maashi, M. Water quality prediction using artificial intelligence algorithms. Appl. Bionics Biomech. 2020, 2020, 6659314. [Google Scholar] [CrossRef]
  12. Fuentes-Pérez, J.F.; Sanz-Ronda, F.J. A Custom Sensor Network for Autonomous Water Quality Assessment in Fish Farms. Electronics 2021, 10, 2192. [Google Scholar] [CrossRef]
  13. Bedi, S.; Samal, A.; Ray, C.; Snow, D. Comparative evaluation of machine learning models for groundwater quality assessment. Environ. Monit. Assess. 2020, 192, 776. [Google Scholar] [CrossRef]
  14. Manoj, M.; Kumar, V.D.; Arif, M.; Bulai, E.-R.; Bulai, P.; Geman, O. State of the Art Techniques for Water Quality Monitoring Systems for Fish Ponds Using IoT and Underwater Sensors: A Review. Sensors 2022, 22, 2088. [Google Scholar] [CrossRef]
  15. Paepae, T.; Bokoro, P.N.; Kyamakya, K. From Fully Physical to Virtual Sensing for Water Quality Assessment: A Comprehensive Review of the Relevant State-of-the-Art. Sensors 2021, 21, 6971. [Google Scholar] [CrossRef]
  16. Khan, M.S.I.; Islam, N.; Uddin, J.; Islam, S.; Nasir, M.K. Water quality prediction and classification based on principal component regression and gra-dient boosting classifier approach. J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 4773–4781. [Google Scholar]
  17. Wu, J.; Wang, Z. A Hybrid Model for Water Quality Prediction Based on an Artificial Neural Network, Wavelet Transform, and Long Short-Term Memory. Water 2022, 14, 610. [Google Scholar] [CrossRef]
  18. Khatri, P.; Gupta, K.K.; Gupta, R.K. Assessment of Water Quality Parameters in Real-Time Environment. SN Comput. Sci. 2020, 1, 340. [Google Scholar] [CrossRef]
  19. Khullar, S.; Singh, N. Water quality assessment of a river using deep learning Bi-LSTM methodology: Forecasting and validation. Environ. Sci. Pollut. Res. 2022, 29, 12875–12889. [Google Scholar] [CrossRef]
  20. Pant, D.; Bhatt, A.; Khan, M.; Nautiyal, O.P.; Adhikari, P. Automated IoT based Smart Water Quality Assessment System. In Proceedings of the 2019 8th International Conference System Modeling and Advancement in Research Trends (SMART), Moradabad, India, 22–23 November 2019; pp. 98–104. [Google Scholar]
  21. Bhardwaj, A.; Dagar, V.; Khan, M.O.; Aggarwal, A.; Alvarado, R.; Kumar, M.; Irfan, M.; Proshad, R. Smart IoT and Machine Learning-based Framework for Water Quality Assessment and Device Component Monitoring. Environ. Sci. Pollut. Res. 2022, 29, 46018–46036. [Google Scholar] [CrossRef]
  22. Prasad, D.V.V.; Venkataramana, L.Y.; Kumar, P.S.; Prasannamedha, G.; Harshana, S.; Srividya, S.J.; Harrinei, K.; Indraganti, S. Analysis and prediction of water quality using deep learning and auto deep learning techniques. Sci. Total Environ. 2022, 821, 153311. [Google Scholar] [CrossRef]
  23. Lu, H.; Ma, X. Hybrid decision tree-based machine learning models for short-term water quality prediction. Chemosphere 2020, 249, 126169. [Google Scholar] [CrossRef]
  24. Liu, P.; Wang, J.; Sangaiah, A.K.; Xie, Y.; Yin, X. Analysis and Prediction of Water Quality Using LSTM Deep Neural Networks in IoT Environment. Sustainability 2019, 11, 2058. [Google Scholar] [CrossRef] [Green Version]
  25. Saravanan, K.; Anusuya, E.; Kumar, R.; Son, L.H. Real-time water quality monitoring using Internet of Things in SCADA. Environ. Monit. Assess. 2018, 190, 556. [Google Scholar] [CrossRef] [PubMed]
  26. Gao, G.; Xiao, K.; Chen, M. An intelligent IoT-based control and traceability system to forecast and maintain water quality in freshwater fish farms. Comput. Electron. Agric. 2019, 166, 105013. [Google Scholar] [CrossRef]
  27. Zhou, J.; Wang, J.; Chen, Y.; Li, X.; Xie, Y. Water Quality Prediction Method Based on Multi-Source Transfer Learning for Water Environmental IoT System. Sensors 2021, 21, 7271. [Google Scholar] [CrossRef] [PubMed]
  28. Lopez, A.L.; Haripriya, N.A.; Raveendran, K.; Baby, S.; Priya, C.V. Water quality prediction system using LSTM NN and IoT. In Proceedings of the 2021 IEEE International Power and Renewable Energy Conference (IPRECON), Kollam, India, 24–26 September 2021; pp. 1–6. [Google Scholar]
  29. Nemade, B.; Shah, D. An efficient IoT based prediction system for classification of water using novel adaptive in-cremental learning framework. J. King Saud Univ. Comput. Inf. Sci. 2022, 32, 5121–5131. [Google Scholar]
  30. Chen, W.; An, J.; Li, R.; Fu, L.; Xie, G.; Alam Bhuiyan, Z.; Li, K. A novel fuzzy deep-learning approach to traffic flow prediction with uncertain spatial–temporal data features. Futur. Gener. Comput. Syst. 2018, 89, 78–88. [Google Scholar] [CrossRef]
  31. Zhao, W.; Wang, L.; Zhang, Z. A novel atom search optimization for dispersion coefficient estimation in groundwater. Futur. Gener. Comput. Syst. 2019, 91, 601–610. [Google Scholar] [CrossRef]
Figure 1. Working principle of the proposed model.
Figure 1. Working principle of the proposed model.
Sustainability 14 16465 g001
Figure 2. Structure of the FDCN.
Figure 2. Structure of the FDCN.
Sustainability 14 16465 g002
Figure 3. Confusion matrices of the WQP-ASOFDCN system. (a,b) TR and TS database of 80:20 and (c,d) TR and TS database of 70:30.
Figure 3. Confusion matrices of the WQP-ASOFDCN system. (a,b) TR and TS database of 80:20 and (c,d) TR and TS database of 70:30.
Sustainability 14 16465 g003
Figure 4. The average analysis of the WQP-ASOFDCN system under 80% of the TR database.
Figure 4. The average analysis of the WQP-ASOFDCN system under 80% of the TR database.
Sustainability 14 16465 g004
Figure 5. The average analysis of the WQP-ASOFDCN system under 20% of the TS database.
Figure 5. The average analysis of the WQP-ASOFDCN system under 20% of the TS database.
Sustainability 14 16465 g005
Figure 6. The average analysis of the WQP-ASOFDCN system in 70% of the TR database.
Figure 6. The average analysis of the WQP-ASOFDCN system in 70% of the TR database.
Sustainability 14 16465 g006
Figure 7. The average analysis of the WQP-ASOFDCN system in 30% of the TS database.
Figure 7. The average analysis of the WQP-ASOFDCN system in 30% of the TS database.
Sustainability 14 16465 g007
Figure 8. The T R a c c and V L a c c analysis of the WQP-ASOFDCN system.
Figure 8. The T R a c c and V L a c c analysis of the WQP-ASOFDCN system.
Sustainability 14 16465 g008
Figure 9. The T R l o s s and V L l o s s analysis of the WQP-ASOFDCN system.
Figure 9. The T R l o s s and V L l o s s analysis of the WQP-ASOFDCN system.
Sustainability 14 16465 g009
Figure 10. Precision–recall analysis of the WQP-ASOFDCN system.
Figure 10. Precision–recall analysis of the WQP-ASOFDCN system.
Sustainability 14 16465 g010
Figure 11. The ROC curve analysis of the WQP-ASOFDCN system.
Figure 11. The ROC curve analysis of the WQP-ASOFDCN system.
Sustainability 14 16465 g011
Figure 12. Comparative analysis of the WQP-ASOFDCN system with other existing approaches.
Figure 12. Comparative analysis of the WQP-ASOFDCN system with other existing approaches.
Sustainability 14 16465 g012
Table 1. The dataset details.
Table 1. The dataset details.
ClassNo. of Instances
Acceptable1000
Permissible1000
Rejected1000
Total Number of Instances3000
Table 2. The WQ classification outcome of the WQP-ASOFDCN system under 80:20 of the TR/TS database.
Table 2. The WQ classification outcome of the WQP-ASOFDCN system under 80:20 of the TR/TS database.
LabelsAccuracyPrecisionRecallF-ScoreMCC
Training Phase (80%)
Acceptable97.0495.2296.2595.7393.47
Permissible94.7593.0490.9391.9788.09
Rejected96.9694.8095.8995.3493.09
Average96.2594.3594.3694.3591.55
Testing Phase (20%)
Acceptable97.5094.3897.1195.7393.98
Permissible95.8394.5893.2093.8990.73
Rejected98.0097.7296.8397.2795.70
Average97.1195.5695.7295.6393.47
Table 3. The WQ classification outcome of the WQP-ASOFDCN system under 70:30 of the TR/TS database.
Table 3. The WQ classification outcome of the WQP-ASOFDCN system under 70:30 of the TR/TS database.
LabelsAccuracyPrecisionRecallF-ScoreMCC
Training Phase (70%)
Acceptable97.6297.6095.4496.5194.72
Permissible97.0595.0995.9295.5193.31
Rejected96.8694.5695.9495.2492.90
Average97.1795.7595.7795.7593.64
Testing Phase (30%)
Acceptable98.1197.0996.7496.9195.55
Permissible98.0096.2498.0897.1595.62
Rejected98.3398.3796.7897.5796.31
Average98.1597.2397.2097.2195.83
Table 4. Comparative analysis of the WQP-ASOFDCN system with other existing methodologies.
Table 4. Comparative analysis of the WQP-ASOFDCN system with other existing methodologies.
MethodsAccuracyPrecisionRecallF-Score
WQP-ASOFDCN98.1597.2397.2097.21
LGBM Algorithm94.1594.2189.4791.79
XGBoost Algorithm90.9292.8391.0190.79
Naïve Bayes Algorithm89.8292.2289.4494.70
KNN Algorithm92.8491.1290.3694.52
Random Forest Algorithm90.5794.9190.6392.40
Table 5. The CT analysis of WQP-ASOFDCN with the existing models.
Table 5. The CT analysis of WQP-ASOFDCN with the existing models.
MethodsComputational Time (s)
WQP-ASOFDCN23.17
LGBM Algorithm68.68
XGBoost Algorithm42.49
Naïve Bayes Algorithm82.68
KNN Algorithm49.95
Random Forest Algorithm43.53
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Al Duhayyim, M.; Mengash, H.A.; Aljebreen, M.; K Nour, M.; M. Salem, N.; Zamani, A.S.; Abdelmageed, A.A.; Eldesouki, M.I. Smart Water Quality Prediction Using Atom Search Optimization with Fuzzy Deep Convolutional Network. Sustainability 2022, 14, 16465. https://doi.org/10.3390/su142416465

AMA Style

Al Duhayyim M, Mengash HA, Aljebreen M, K Nour M, M. Salem N, Zamani AS, Abdelmageed AA, Eldesouki MI. Smart Water Quality Prediction Using Atom Search Optimization with Fuzzy Deep Convolutional Network. Sustainability. 2022; 14(24):16465. https://doi.org/10.3390/su142416465

Chicago/Turabian Style

Al Duhayyim, Mesfer, Hanan Abdullah Mengash, Mohammed Aljebreen, Mohamed K Nour, Nermin M. Salem, Abu Sarwar Zamani, Amgad Atta Abdelmageed, and Mohamed I. Eldesouki. 2022. "Smart Water Quality Prediction Using Atom Search Optimization with Fuzzy Deep Convolutional Network" Sustainability 14, no. 24: 16465. https://doi.org/10.3390/su142416465

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop