Next Article in Journal
Harnessing ICT Resources to Enhance Community Disaster Resilience: A Case Study of Employing Social Media to Zhengzhou 7.20 Rainstorm, China
Next Article in Special Issue
Advancing Sustainable Wastewater Treatment Using Enhanced Membrane Oil Flux and Separation Efficiency through Experimental-Based Chemometric Learning
Previous Article in Journal
A Method for Calculating Water Demand for Sediment Transport Based on the Principles of River Dynamics
Previous Article in Special Issue
Recovered Reverse-Osmosis Water and MgO Nanoparticles for Improved Performance of Solar PV/T Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Integrated Modeling of Hybrid Nanofiltration/Reverse Osmosis Desalination Plant Using Deep Learning-Based Crow Search Optimization Algorithm

1
Interdisciplinary Research Centre for Membrane and Water Security, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia
2
Operational Research Centre in Healthcare, Near East University, TRNC, Mersin 10, Nicosia 99138, Turkey
3
Department of Chemical Engineering, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia
*
Authors to whom correspondence should be addressed.
Water 2023, 15(19), 3515; https://doi.org/10.3390/w15193515
Submission received: 1 September 2023 / Revised: 28 September 2023 / Accepted: 4 October 2023 / Published: 9 October 2023
(This article belongs to the Special Issue Membrane Technologies for Wastewater Treatment and Resource Recovery)

Abstract

:
The need for reliable, state-of-the-art environmental investigations and pioneering approaches to address pressing ecological dilemmas and to nurture the sustainable development goals (SDGs) cannot be overstated. With the power to revolutionize desalination processes, artificial intelligence (AI) models hold the potential to address global water scarcity challenges and contribute to a more sustainable and resilient future. The realm of desalination has exhibited a mounting inclination toward modeling the efficacy of the hybrid nanofiltration/reverse osmosis (NF–RO) process. In this research, the performance of NF–RO based on permeate conductivity was developed using deep learning long short-term memory (LSTM) integrated with an optimized metaheuristic crow search algorithm (CSA) (LSTM-CSA). Before model development, an uncertainty Monte Carlo simulation was adopted to evaluate the uncertainty attributed to the prediction. The results based on several performance statistical criteria (root mean square error (RMSE) and mean absolute error (MAE)) demonstrated the reliability of both LSTM (RMSE = 0.1971, MAE = 0.2022) and the LSTM-CSA (RMSE = 0.1890, MAE = 0.1420), with the latter achieving the highest accuracy. The accuracy was also evaluated using new 2D graphical visualization, including a cumulative distribution function (CDF) and fan plot to justify the other evaluation indicators such as standard deviation and determination coefficients. The outcomes proved that AI could optimize energy usage, identify energy-saving opportunities, and suggest more sustainable operating strategies. Additionally, AI can aid in developing advanced brine treatment techniques, facilitating the extraction of valuable resources from the brine, thus minimizing waste and maximizing resource utilization.

1. Introduction

The rising demand for freshwater, stemming from burgeoning population numbers, expansive industrial endeavors, and rapid urban growth, has driven us into a global water sustainability crisis [1,2]. This crisis manifests in several ways: deteriorating freshwater resources due to over-exploitation of surface waters and groundwater reserves, protracted periods of drought impaired by climate shifts, the encroachment of seawater into freshwater reserves, accelerated depletion of groundwater levels, and increased salinization and contamination of our freshwater bodies. Such precarious circumstances jeopardize both national and global water security [3]. As a response to these pressing challenges, the world is increasingly turning to the desalination of brackish water and saltwater as primary sources of a dependable water supply [4]. This process involves the extraction of salt from water, making it suitable for diverse uses such as agricultural irrigation, industrial processes, and daily household needs [5,6]. Highlighting the immense promise of this technique, the United Nations put forward that saltwater desalination can augment our water reserves beyond what the natural hydrological cycle can offer.
Addressing the escalating need for freshwater, the primary strategies being adopted are desalination through thermal methods and membrane-based separation techniques [5]. Digging deeper into these methods, two prominent processes emerge: reverse osmosis (RO)—a membrane-based technology, and multistage flash distillation (MSF)—a heat-driven purification approach [7]. Thermal desalination, primarily using the MSF method, is frequently lauded for its efficiency, particularly when handling water with a high salt concentration. The resulting water or ‘permeate’ from this method is of superior quality [4]. On the other hand, the global desalination landscape is dominated by the RO system, with a staggering 90% of facilities around the world harnessing this technique. The RO method leverages semi-permeable membranes to sieve out salts and other unwanted minerals from water [8]. Its popularity is not unwarranted; RO is recognized for its economical nature, impressive salt rejection rates, and the high quality of the resultant water. Its adaptability is another selling point—RO systems have found homes in diverse environments, ranging from standard water and sewage treatment plants to cutting-edge wastewater recovery and reuse initiatives. Nonetheless, the RO method is not without its challenges. Factors such as the requirement for high feed pressures; considerable energy and cost expenditures; the need for periodic membrane maintenance; and fluctuations in temperature, energy, and costs depending on the time of day or season, continually push researchers and technologists to innovate and improve RO systems [7].
Membrane fouling has long been identified as one of the fundamental challenges associated with the RO desalination technique. However, recent studies suggest that this problem can be considerably mitigated, if not wholly resolved, by integrating the RO process with nanofiltration (NF), especially in the realm of seawater desalination. The incorporation of NF into RO systems substantially enhances the efficiency of the desalination process by actively reducing the presence of organics, pollutants, and ionic strength, and by softening the water. This combined approach also leads to a notable decrease in the overall expenditure tied to desalination [9,10]. The appeal of NF extends beyond its capacity to complement RO. Researchers laud its multiple benefits, such as cost-effective operation and maintenance, impressive water throughput (flux), operation at reduced pressures, and its relatively low installation expenses [10]. That said, a singular reliance on NF is not without its drawbacks. While it can treat various water impurities effectively, NF in isolation falls short in adequately reducing the high salinity inherent in seawater to produce potable water. This shortcoming is where the combined might of NF and RO shines through, achieving better desalination results [11]. Emerging research in the realm of membrane technologies, be it NF, RO, or innovative hybrid separation processes, consistently underscores that energy consumption stands as the most daunting challenge in their operational spectrum. It is evident that the desalination processes are composed of multifaceted components like permeate rate, conductivity, recovery, rejection rate (RR), permeate quality (PQ), pH (potential hydrogen) levels, energy consumption, and associated costs. In a pursuit to optimize these factors, various experimental undertakings have advocated for blended solutions, such as the NF–RO combination and the NF–SWRO–MSF hybrid process. In these innovative configurations, NF primarily functions as an efficient pre-treatment stage, preparing the ground for the more intensive RO desalination process [12,13].
Generally, membrane processes in desalination have predominantly been based on linear or polynomial correlations, even though these methods may generalize the complex dynamics of the desalination procedure [14,15,16]. In contrast to these mathematical and traditional paradigms, which often settle for lower precision, the modern technological landscape, marked by the beginning of Industry 4.0 and the growing field of the Industrial Internet of Things (IoT), has seen artificial intelligence (AI) algorithms making substantial inroads into various industrial spheres [17]. Rather than the novel computing methodologies which prioritize absolute accuracy and unerring truth, the world of soft computing embraces the nuances of imprecision, accepts degrees of truth, grapples with uncertainty, and is amenable to approximations in order to accomplish a specific objective [18,19,20]. This adaptive approach has been validated using cutting-edge studies, which reveal that sophisticated intelligent systems possess the prowess to assimilate experimental data with impeccable accuracy in the realm of desalination [4,21,22,23,24,25]. Nevertheless, the journey of integrating data-driven algorithms into the ecosystem of desalination processes, including RO and NF, has not been devoid of hurdles. Artificial Neural Networks (ANNs), although revolutionary, have come under scrutiny for certain limitations: their propensity for overfitting, challenges with plant-specific performance optimization, the intricacies of their internal tuning parameters, and concerns over data homogeneity and inadequate neuron configurations [26].
Achite et al. [27] introduced a hybrid model known as the M5-Gorilla Troops Optimizer (GTO), built upon a blend of the M5 and GTO algorithms. This research employed nine diverse parameters including raw water production (RWP), water turbidity, conductivity, TDS, salinity, pH, water temperature (WT), SM, and O2 as inputs for CD modeling. The comparative analysis highlighted in the study robustly positions the M5-GTO model as superior in CD modeling accuracy against numerous established models such as multiple linear and nonlinear regression, an artificial neural network, multivariate adaptive regression splines, an M5 model tree, k-nearest neighbor, a least-squares support vector machine, a general regression neural network, and random forest (RF). This was exemplified by the recorded values of various error metrics and correlation coefficient criteria for the M5-GTO, all demonstrating significant improvements over the least effective algorithm, the LSSVM. The findings further ranked M5 and RF algorithms second and third, respectively. Moreover, the research provided insight into the significant impact of RWP and WT on CD alterations, showcasing the inverse relationship of RWP with CD and the direct relation of WT with CD. In the study conducted by Firzin et al. [28], a novel BLSTM-HHO algorithm was introduced for an improved groundwater table (GWT) and drought predictions. This innovative algorithm notably outperformed other benchmark algorithms such as the standalone BLSTM, LSTM, ANN, SARIMA, and ARIMA in terms of prediction accuracy and performance criteria. Similarly, in the research conducted by Yan et al. [29] an innovative approach to predicting influent ammonia nitrogen (NH3-N) concentration in wastewater treatment plants was proposed, leveraging the synergistic capabilities of the rolling decomposition method and deep learning algorithms. The integrated model delineated in the study notably circumvents information leakage during the decomposition process, showcasing enhanced performance compared to standalone GRU models as evidenced by reduced RMSE, MAE, and MAPE values. The study robustly underscores the superiority of the proposed model over other integrated models trained with information leakage, highlighting notable strides in prediction accuracy. Recognizing these challenges, the scientific community has proposed an advanced model called the long short-term memory (LSTM) model. This model is further strengthened by integrating a powerful metaheuristic optimization algorithm—the crow search algorithm (CSA)—promising enhanced performance and adaptability in desalination processes.
In an effort to handle challenges faced in the field of desalination modeling, we sought to leverage the advanced capabilities of the LSTM network. The primary focus of this study was to refine the model’s performance, particularly for the uncertainty analysis and prediction of the hybrid NF–RO desalination process. To realize this aim, we employed a state-of-the-art metaheuristic optimization technique, the CSA. A noteworthy novelty of our methodology was the inclusion of the Particle Swarm Optimization (PSO) algorithm. This algorithm was instrumental in recognizing the optimal combination of features, serving as a foundation to our in-depth modeling, statistical evaluations, and graphical analysis. Such a strategic approach was intended to maximize the accuracy of the hybrid algorithms (LSTM-CSA) as well as the LSTM in its single form. For modeling purposes, the six most important parameters were accurately sourced from seventy-three distinct data points. The chosen independent parameters covered a diverse range: temperature (°C), time duration (h), pressure levels (kg/cm2), feed flow rate (m3/h), and feed conductivity (μs/cm). On the other hand, our target or dependent parameter was identified as the permeate conductivity (μS/cm). Through the feature selection insights collected from the PSO algorithm, two distinct datasets were crafted. The result of our study is expected to show a comprehensive evaluation of these models, with both training and testing datasets subjected to performance metrics like the root mean square error (RMSE) and the mean absolute error (MAE). The finding was that explaining models powered by the metaheuristic algorithms notably outperformed the singular LSTM model in terms of accuracy.
It is worth mentioning that the use of deep learning in the desalination process, as illustrated in the given abstract and introduction, holds significant promise in revolutionizing the efficacy and sustainability of water desalination [6,30,31,32]. The application of LSTM networks integrated with an optimized metaheuristic CSA in the hybrid NF–RO desalination process enhances the overall performance, offering notable advantages. One of the primary benefits is the increased accuracy in predicting the desalination process outcomes, with substantial reductions in root mean square error (RMSE) and mean absolute error (MAE), demonstrating the reliability of AI models. This integration also optimizes energy usage, enabling the identification and exploitation of energy-saving opportunities for more sustainable operation. Additionally, AI contributes to the development of advanced brine treatment techniques, minimizing waste and maximizing resource utilization by facilitating the extraction of valuable resources from the brine. The models accurately evaluate and mitigate the uncertainty associated with predictions, ensuring more consistent and reliable desalination results. The comprehensive optimization of various desalination factors, including permeate rate and conductivity, underscores the significant enhancement AI brings to water treatment and desalination, addressing and overcoming many challenges inherent in traditional methods [33,34,35].
The goals and objectives of this research are primarily centered around tackling global water scarcity by enhancing desalination processes, specifically focusing on the hybrid NF–RO process. This research aims to develop a model for evaluating the performance of NF–RO based on permeate conductivity, utilizing deep LSTM integrated with an optimized metaheuristic CSA and LSTM-CSA. By adopting uncertainty Monte Carlo simulation, this study evaluates the uncertainty attributed to prediction, aiming to prove the reliability of both LSTM and the LSTM-CSA in terms of various performance statistical criteria. This research further addresses the key challenges faced in the RO desalination technique, aiming to enhance its efficiency by integrating it with NF, and subsequently optimizing various parameters involved in desalination processes. This study also seeks to leverage the advanced capabilities of the LSTM network and the CSA to refine the model’s performance, particularly for the uncertainty analysis and prediction of the hybrid NF–RO desalination process. This paper is committed to maximizing the accuracy of the hybrid algorithms and providing a comprehensive evaluation, contributing to the optimization of energy usage, identification of energy-saving opportunities, and the development of more sustainable operating strategies in desalination processes.

2. Experimental Methods

In this study, we aimed to model a complex hydro-environmental system using six parameters, which were sampled at seventy-three different points. The independent variables consisted of temperature (°C), time (h), pressure (kg/cm2), flow feed (m3/h), and conductivity feed (μS/cm), while the dependent variable was permeating conductivity (PC) (μS/cm). The data were obtained from the Saline Water Desalination Research Institute (SWDRI) of the Saline Water Conversion Corporation (SWCC), Saudi Arabia [36], and open-source data were collected from [8]. Refer to [36] for details of the experimental analysis and set-up discussion; the diagram is presented in Figure 1a. An essential stage in developing deep learning models is the processing of gathered data and the selection of the right model combination. The intricacy of these built models can be tackled by employing a multiple heuristic approach such as the CSA and understanding the extent of AI systems to manage complex and nonlinear-system-like desalination.
In this work, we employed a Monte Carlo simulation (Figure 1b) to investigate the uncertainty, and the PSO metaheuristic algorithm was used to solve this problem. In Figure 1c is the objective function for selecting optimal features using the PSO algorithm. Further pre-processing using normalization to improve the accuracy of the prediction was carried out. The model development also takes into consideration 5k-fold cross-validation to provide a more comprehensive insight into how the model performs across different subsets of data. The 5k-fold cross-validation provides a more reliable assessment of how a model will perform on unseen data by using different data subsets for training and validation [37]. It is widely used in ML to tune hyperparameters and assess the generalization capability of models. Figure 2 presents the descriptive statistics for visualization that provide a summary of the main aspects of the data, offering a snapshot of their main characteristics [37]. It is often the first step in data analysis, simplifying large amounts of data in a sensible way. In the scenario described in Figure 2a indicating the temperature in an NF/RO system to show a sharp drop, several factors could be responsible, and it is crucial to examine the experimental setup and conditions to determine the exact cause. It might be related to an experimental error, where an issue with the equipment, such as a malfunctioning temperature sensor, could give inaccurate readings. Another possibility could be a sudden change in the system parameters or operating conditions, such as a sudden influx of feed water at a different temperature or a change in the ambient conditions. An unexpected drop in temperature could also relate to the system’s performance, indicating potential issues or inefficiencies within the NF–RO process itself, such as unexpected heat loss. It is crucial to thoroughly investigate the system, review the experimental procedure, and check the equipment to accurately diagnose the reason behind the sudden temperature drop.
In this paper, deep learning and CSA are applied to improve the performance and efficiency of hybrid NF–RO desalination processes. Specifically, a LSTM network, a type of recurrent neural network, is used to model the desalination process. The LSTM network is adept at learning from sequences of data, which makes it suitable for modeling complex processes such as desalination where numerous variables interact over time. LSTM is integrated with the CSA, a metaheuristic optimization algorithm. The CSA is inspired by the behavior of crows and is used to optimize the parameters of the LSTM network, ensuring that the model makes the most accurate predictions possible. Before developing this LSTM-CSA model, an uncertainty analysis is conducted using a Monte Carlo simulation to evaluate potential uncertainties related to the predictions made by the model. This innovative approach utilizing both LSTM and CSA is designed to enhance the prediction of the performance of the NF–RO desalination process based on permeate conductivity, a key parameter in assessing the effectiveness of the desalination process. This research aims to optimize energy usage and suggest more sustainable operating strategies for desalination, ultimately leading to enhanced water recovery rates, reduced energy consumption, and improved overall efficiency of the desalination process. In a more technical understanding, the LSTM network is trained using historical data from the desalination process, learning to identify patterns and relationships that are not easily discernible. It then uses this learning to make predictions about the performance of the desalination process under various conditions. The CSA is applied to fine-tune the parameters of the LSTM network, ensuring that it operates as effectively as possible. The integration of deep learning with the CSA thus presents a robust and innovative approach to optimizing the performance of NF–RO desalination processes, contributing to advancements in addressing global water scarcity challenges. The performance criteria used to calculate the models’ accuracy are presented in the following equations [38,39]:
R M S E = 1 N i = 1 N ( Y   p Y ( o ) ) 2
M A E = i = 1 N y p y o N  
MSE = i = 1 N Y p Y o )   2   N
where   Y p r e ,   i   Y c o m , i   Y p r e ¯ and Y c o m ¯ indicate the predicted and computed values Y , with N as the means for the data points.

2.1. Long-Term Memory Neural Network (LSTM)

The LSTM neural network emerges as an advanced variation of the recurrent neural network (RNN). Its inception was specifically aimed at addressing the inherent shortcomings of traditional RNNs, especially their inability to retain memory over extended sequences (see Figure 3). A significant triumph of LSTM over its predecessor is its prowess in resolving issues tied to vanishing and exploding gradients, which historically plagued the training of RNNs. This enhanced capability not only rectifies these problems but also augments the accuracy of models based on recurrent networks—a notable advancement as reported in the literature [40]. Diving deeper into their structure, LSTM neural networks introduce a set of intricate memory cells. Unlike the transient memory of conventional RNNs, these memory cells exhibit a longer retention span. The configuration of these cells can be visualized as interconnected chains, echoing the modular repetition in conventional RNNs. In their research, Li et al. [41] emphasized the unique structure of these repeating units. LSTM neural networks boast a range of specialized components, each designed meticulously to process and hold onto extensive sequences. These components not only ensure that information is accurately captured but also make it possible for the network to decide what to remember and what to discard, granting LSTM neural networks their signature ability to remember sequences over a protracted period.
At the heart of the LSTM structure lies the memory cell, an intricate assembly pivotal to the LSTM neural network’s prowess. This memory cell is crafted as a network of sigmoid neurons interconnected in a manner that offers a unique self-feedback loop. Such a configuration allows the memory cell to fine-tune its operations, selectively choosing what information to retain and what to dispose of over prolonged durations. Aside from the memory cell and hidden state, LSTM neural networks have three specialized gates, each serving a distinct purpose. The research of Zaytar & El Amrani [42] emphasized the essence of these gating mechanisms. Their ability to judiciously regulate the influx and efflux of information renders the LSTM neural network its unique capability to maintain relevant data and discard the superfluous, ensuring optimum performance over extended sequences.

2.2. Crow Search Algorithm (CSA)

The CSA is an optimization algorithm inspired by the social behavior and memory capability of crows, specifically their ability to hide food and remember its location for future use. This nature-inspired heuristic approach is relatively new compared to other swarm intelligence techniques, yet it has been shown to have competitive performance for certain optimization problems [43,44]. The program emulates the crow’s behavior by dividing the search space into various sub-regions, each symbolizing a potential food source. It then modulates the positions of these sub-regions, drawing parallels to how crows hide and recover food. Within the CSA algorithm, a collective optimization method, agents are employed where each one represents a crow, facilitating the exploration of the search area. These agents collaborate, sharing insights about the most promising food sources identified so far. In this distance-centric communication method, agents in closer proximity exchange more extensive information compared to those positioned farther away [44].
In addition to its exploration prowess, the CSA incorporates an exploitation strategy that homes in on pinpointing the optimal solution. This mechanism adjusts the positions of agents relative to the most promising food source identified thus far. The CSA has demonstrated its efficacy in solving optimization challenges in fields like engineering design, feature selection, and image processing. Furthermore, Figure 4 presents a comprehensive flowchart detailing the CSA’s process, highlighting its primary stages. The swarm of crows is initialized randomly within a d-dimensional space. The fitness of each crow is assessed using a specific fitness function, and based on this evaluation, an initial memory value is assigned. Every crow saves its hiding location in its memory variable, denoted as mi. To update its position, a crow selects another random crow, represented as xj, which in turn produces a random value. If this value surpasses the awareness probability threshold ‘AP’, the crow xi will track xj to pinpoint the location mj.

3. Results

In recent times, the convergence of the Industrial Revolution 4.0 with the adoption of emerging Artificial Intelligence (AI) and Internet of Things (IoT) technologies has marked a significant advancement in the fields of wastewater treatment and desalination plants. This revolution represents the peak of efforts aimed at effectively harnessing these advanced technologies to address crucial water management challenges. Within this context, the integration of ML techniques into the operational framework of desalination processes has gained substantial attention. This integration is seen as a pivotal approach to optimize and precisely control various aspects of the desalination process. Previous studies have already underscored the potential and feasibility of employing ML methodologies in this domain. In this section, we employed the novel deep learning-based LSTM algorithm and CSA as evolutionary optimization data-driven techniques to simulate the PC (μS/cm) in a desalination plant. As mentioned above, a stationary analysis was carried out through the application of Augmented Dickey–Fuller (ADF) and Phillips–Perron (PP) tests. This approach was adopted to address the nonstationary nature of each individual input as well as the independent and dependent variables. Although this sort of data mining and enhancement is not a conventional procedure in advanced engineering problems like desalination plants, its significance has been highlighted and recognized as a critical stage in the field of data analysis. The result for the training phase based on several performance indicators is presented in Table 1. Prior to model development, appropriate feature engineering owing to the complexity of the system was conducted using GA algorithms. Hence, the GA used a robust nonlinear input feature selection approach.
The GA was developed in MATLAB 2022b to select the best optimal objective function for model development. The GA feature can help researchers select the most important input variables for modeling and predicting the PC of a complex environmental system. Table 1 shows the indicators based on MAE, MSE, and RMSE, which help to evaluate the accuracy and reliability of the predicted models. It is worth noting that the deep learning LSTM model is a type of recurrent neural network (RNN) commonly used for sequence prediction tasks, such as time series data like PC in this case. For this purpose, modeling was performed using three LSTM, LSTM-GA, and LSTM-CSA algorithms. Python language was used for all implementations on a PC with a 3 GHz Core i7 processor and 64 GB of RAM. The lower the MSE, the closer the predicted values are to the actual values. In this case, LSTM-CSA-M2 has the lowest MSE (0.1447), indicating that it has the best overall predictive accuracy among the four models. Similar to MSE, lower RMSE values suggest better predictive performance. Here, the LSTM-CSA-M2 again has the lowest RMSE, indicating that it makes predictions with the smallest average error magnitude. It can be seen that metaheuristic optimization techniques are primarily used for solving optimization problems. It is well-suited for problems where finding the optimal solution is challenging due to complex, non-linear, and multi-dimensional search spaces; hence, its superiority is not surprising. It is well known that the choice between the CSA and the LSTM model depends on your specific problem domain, the nature of your data, and your goals. If your goal is to optimize parameters or find optimal solutions in complex spaces, the CSA might be more suitable. On the other hand, if the problem is to capture the temporal patterns, the LSTM model could be the better choice. Figure 5 presents the probability cumulative distribution function between the observed and simulated variables. In the analysis regarding NF–RO desalination utilizing LSTM and LSTM-CSA models, it is vital to precisely assess potential errors and experiment shortcomings. Uncertainty analysis, performed using a Monte Carlo simulation prior to model development, should be critically evaluated for comprehensive and accurate execution using various error criteria. The integration of LSTM with the CSA requires precise tuning; any integration issues could negatively affect the results, leading to inaccuracies in permeate conductivity predictions. This research’s reliance on diverse parameters for modeling introduces the possibility of another potential error. Accurate and consistent measurements are fundamental to ensure the reliability of model predictions. Concerning the observed temperature drop (Figure 2a) in the NF–RO system, a thorough investigation is necessary to determine if it is an experimental error, a system issue, or a valid result. Comprehensive analysis, considering all potential errors, is crucial for validating the research findings and their real-world applicability in desalination processes.
The CDF is a statistical concept used to compare the distribution of observed (empirical) data with that of simulated (model-generated) data. It provides insights into how closely the simulated data matches the observed data in terms of their distribution and the likelihood of specific values occurring. The graph displayed that LSTM-CAS-M2 has the highest agreement between the observed and simulated PC. A good match between the observed and simulated CDFs suggests that the simulated PC data closely resemble the observed data in terms of their distribution. Since the CDFs align well, this indicates that the model’s predictions are consistent with the real-world desalination data. The comparison of CDFs is widely used in various fields, such as climate modeling, financial risk assessment, and quality control. Further numerical comparison of the results is presented using MAE measures. The MAE indicated the average absolute difference between the predicted and actual values. It gives a sense of the average magnitude of errors without squaring them. From the training results it can be seen that the MAE of LSTM-M1 = 0.0945, the MAE of LSTM-M2 = 0.0644, the MAE of the LSTM-CSA-M1 = 0.0399, and the MAE of the LSTM-CSA-M2 = 0.0945. The results show that the LSTM-CSA-M1 has the lowest MAE (0.0399), implying that it has the smallest average absolute error in predicting PC during the training phase (see Table 2). On the other hand, the LSTM-CSA-M2 has the lowest value for RMSE (0.3804), suggesting that it is the most accurate model in predicting PC in the training phase (see Figure 6).
However, the LSTM-CSA-M2 performs the best across all three metrics (MSE, RMSE, and MAE) among the four models during the training phase for PC. The LSTM-CSA-M1 has the second-best performance, with the lowest MAE indicating the smallest average absolute error. These metrics collectively offer insight into the accuracy and precision of the model’s predictions, helping to identify which model is most suitable for predicting PC in the desalination plant’s training phase. In intricate processes like desalination, where uncertainties arise from both human activities and the characteristics of the source water, the connections among physicochemical factors are prone to being nonlinear due to these uncertain factors. The evidence in Table 2 indicates that the PC simulation was shown to be a satisfactory and reliable simulation in the testing phase. The quantitative comparison of the testing phase depicted that MSE measures the average of the squared differences between the predicted and actual values. Lower MSE values indicate that the model’s predictions are closer to the actual values. In this case, the LSTM-CSA-M1 and LSTM-CSA-M2 have the lowest MSE values, suggesting that these models have better overall prediction accuracy in comparison to the other models. The numerical accuracy for each model in the testing phase was as follows: LSTM-M1 (MSE = 0.3168, RMSE = 0.5628, MEA = 0.1468), LSTM-M2 (MSE = 0.4284, RMSE = 0.6545, MEA = 0.1884), the LSTM-CSA-M1 (MSE = 0.1985, RMSE = 0.4456, MEA = 0.1985), the LSTM-CSA-M2 (MSE = 0.1992, RMSE = 0.4463, MEA = 0.1292). Similarly, the lower RMSE values indicate better predictive performance. Similarly, LSTM-CSA-M1 and LSTM-CSA-M2 have the lowest RMSE values, implying that these models are better at minimizing prediction errors. In this case, the LSTM-CSA-M2 has the lowest MEA value, suggesting that it has the smallest average prediction error. Based on these metrics, it appears that the models with the prefix LSTM-CSA (LSTM with CSA) tend to perform better than the other models (LSTM without CSA) across all three metrics. Additionally, between the LSTM-CSA-M1 and the LSTM-CSA-M2, the latter (LSTM-CSA-M2) seems to outperform the former with slightly lower values in most metrics (see Figure 7).

4. Conclusions

In the face of ever-growing ecological challenges and the critical importance of the sustainable development goals, it is evident that innovative solutions are a necessity. This research highlights the transformative potential of artificial intelligence in advancing desalination processes, particularly in addressing the global issue of water scarcity. By focusing on the hybrid NF–RO process, this study introduces an AI model using deep learning LSTM combined with the metaheuristic CSA, termed the LSTM-CSA. This model was rigorously tested based on several performance criteria and validated using both external and internal validation techniques, with a preliminary uncertainty assessment using a Monte Carlo simulation. The statistical performance of the models was commendable. The LSTM model displayed noteworthy accuracy, but the LSTM-CSA outperformed it, suggesting that the integration of the CSA with deep learning augments predictive capability. This was further corroborated via innovative 2D graphical visualization methods, such as the CDF and fan plot, which added depth to the accuracy evaluation by accounting for various other assessment indicators. Beyond just the technical accomplishments, the broader implications of this research are profound. AI, as demonstrated, can be critical in making desalination processes more energy-efficient, opening avenues for substantial energy savings. It can further guide the development of advanced techniques to treat brine, allowing for resource extraction and thereby ensuring minimal wastage. In essence, an AI model is not only reliable promise for enhancing desalination processes but also propels the sector toward a more sustainable and efficient future. The quantitative summary is presented in the following points.
  • LSTM-M1: this model has an MSE of 0.3168, an RMSE of 0.5628, and an MEA of 0.1468. Among the models listed, it performs better than LSTM-M2 but is outperformed by both LSTM-CSA variants in all three metrics, indicating it has good predictive accuracy and reliability.
  • LSTM-M2: This model demonstrates the highest error rates across all three metrics, with an MSE of 0.4284, RMSE of 0.6545, and MEA of 0.1884, indicating it has the least predictive accuracy and reliability among the listed models.
  • LSTM-CSA-M1: this model outperforms the LSTM models in all metrics with an MSE of 0.1985, RMSE of 0.4456, and MEA of 0.1985. Its error rates are lower, showcasing enhanced predictive accuracy and reliability, substantiating the effectiveness of integrating the CSA with LSTM.
  • LSTM-CSA-M2: this model reveals error metrics very close to the LSTM-CSA-M1, with an MSE of 0.1992, RMSE of 0.4463, and an MEA of 0.1292. It has the lowest MEA among all models, indicating it has the smallest average prediction error, making it the most reliable model for predictions among the ones listed.

Author Contributions

Conceptualization, S.I.A. and J.U.; Data curation, N.B.; Funding acquisition, S.I.A. and J.U.; Investigation, S.I.A., J.U. and D.U.L.; Methodology, J.U.; Project administration, I.H.A.; Resources, I.H.A.; Software, I.A. and A.G.U.; Supervision, I.H.A.; Validation, D.U.L. and N.B.; Visualization, S.I.A.; Writing—original draft, J.U. and A.G.U.; Writing—review and editing, I.A. and A.G.U. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Deanship of Research Oversight and Coordination (DROC) at King Fahd University of Petroleum & Minerals (KFUPM) under the Interdisciplinary Research Center for Membranes and Water Security.

Data Availability Statement

Data are available upon request.

Acknowledgments

Authors would like to acknowledge all support from the Interdisciplinary Research Center for Membranes and Water Security and that of DROC at King Fahd University of Petroleum and Minerals.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Werner, A.D.; Bakker, M.; Post, V.E.A.; Vandenbohede, A.; Lu, C.; Ataie-Ashtiani, B.; Simmons, C.T.; Barry, D.A. Seawater intrusion processes, investigation and management: Recent advances and future challenges. Adv. Water Resour. 2013, 51, 3–26. [Google Scholar] [CrossRef]
  2. Hoekstra, A.; Chapagain, A.; Aldaya, M.; Mekonnen, M. Water Footprint Manual: State of the Art. 2009. Available online: www.waterfootprint.org (accessed on 20 September 2023).
  3. Son, M.; Yoon, N.; Jeong, K.; Abass, A.; Logan, B.E.; Cho, K.H. Deep learning for pH prediction in water desalination using membrane capacitive deionization. Desalination 2021, 516, 115233. [Google Scholar] [CrossRef]
  4. Baig, N.; Usman, J.; Abba, S.I.; Benaafi, M.; Aljundi, I.H. Fractionation of dyes/salts using loose nanofiltration membranes: Insight from machine learning prediction. J. Clean. Prod. 2023, 418, 138193. [Google Scholar] [CrossRef]
  5. Curto, D.; Franzitta, V.; Guercio, A. A review of the water desalination technologies. Appl. Sci. 2021, 11, 670. [Google Scholar] [CrossRef]
  6. Mahadeva, R.; Kumar, M.; Patole, S.P.; Manik, G. An optimized PSO-ANN model for improved prediction of water treatment desalination plant performance. Water Supply 2022, 22, 2874–2882. [Google Scholar] [CrossRef]
  7. Feria-Díaz, J.J.; Correa-Mahecha, F.; López-Méndez, M.C.; Rodríguez-Miranda, J.P.; Barrera-Rojas, J. Recent desalination technologies by hybridization and integration with reverse osmosis: A review. Water 2021, 13, 1369. [Google Scholar]
  8. Adda, A.; Hanini, S.; Bezari, S.; Laidi, M.; Abbas, M. Modeling and optimization of small-scale NF/RO seawater desalination using the artificial neural network (ANN). Environ. Eng. Res. 2021, 27, 200383. [Google Scholar] [CrossRef]
  9. Hilal, A.M.; Althobaiti, M.M.; Eisa, T.A.E.; Alabdan, R.; Hamza, M.A.; Motwakel, A.; Al Duhayyim, M.; Negm, N. An Intelligent Carbon-Based Prediction of Wastewater Treatment Plants Using Machine Learning Algorithms. Adsorpt. Sci. Technol. 2022, 2022, 8448489. [Google Scholar] [CrossRef]
  10. Hilal, N.; Al-Zoubi, H.; Darwish, N.A.; Mohammad, A.W.; Abu Arabi, M. A comprehensive review of nanofiltration membranes: Treatment, pretreatment, modelling, and atomic force microscopy. Desalination 2004, 170, 281–308. [Google Scholar] [CrossRef]
  11. M’nif, A.; Bouguecha, S.; Hamrouni, B.; Dhahbi, M. Coupling of membrane processes for brackish water desalination. Desalination 2007, 203, 331–336. [Google Scholar] [CrossRef]
  12. Hassan, T.; Parveen, S.; Bhat, B.N.; Ahmad, U. Seasonal Variations in Water Quality Parameters of River Yamuna, India. Int. J. Curr. Microbiol. Appl. Sci. 2017, 6, 694–712. [Google Scholar] [CrossRef]
  13. Choi, S.Y. A Review About Membrane-Based Water Desalination. Act. Sched. 2020, 1–8. [Google Scholar]
  14. Ilyushin, Y.V.; Kapostey, E.I. Developing a Comprehensive Mathematical Model for Aluminium Production in a Soderberg Electrolyser. Energies 2023, 16, 6313. [Google Scholar] [CrossRef]
  15. Pershin, I.M.; Papush, E.G.; Kukharova, T.V.; Utkin, V.A. Modeling of Distributed Control System for Network of Mineral Water Wells. Water 2023, 15, 2289. [Google Scholar] [CrossRef]
  16. AlSawaftah, N.; Abuwatfa, W.; Darwish, N.; Husseini, G. A comprehensive review on membrane fouling: Mathematical modelling, prediction, diagnosis, and mitigation. Water 2021, 13, 1327. [Google Scholar]
  17. Bhati, M.S. Industrial Internet of Things (IIoT): A Literature Review. Int. J. Res. Eng. Appl. Manag. 2018, 4, 304–307. [Google Scholar]
  18. Behroozi, A.H.; Kasiri, N.; Mohammadi, T. Multi-phenomenal macroscopic investigation of cross-flow membrane flux in microfiltration of oil-in-water emulsion, experimental & computational. J. Water Process Eng. 2019, 32, 100962. [Google Scholar] [CrossRef]
  19. Tao, H. Groundwater Level Prediction using Machine Learning Models: A. Neurocomputing 2022, 489, 271–308. [Google Scholar]
  20. Alhaji, U.; Chinemezu, E.; Isah, S. Bioresource Technology Reports Machine learning models for biomass energy content prediction: A correlation-based optimal feature selection approach. Bioresour. Technol. Rep. 2022, 19, 101167. [Google Scholar] [CrossRef]
  21. Baig, N.; Matin, A.; Faizan, M.; Anand, D.; Ahmad, I.; Khan, S.A. Antifouling low-pressure highly permeable single step produced loose nanofiltration polysulfone membrane for efficient Erichrome Black T/divalent salts fractionation. J. Environ. Chem. Eng. 2022, 10, 108166. [Google Scholar] [CrossRef]
  22. Wang, X.; Xu, Z.; Gou, X. Allocation of fresh water recourses in China with nested probabilistic-numerical linguistic information in multi-objective optimization. Knowl.-Based Syst. 2020, 188, 105014. [Google Scholar] [CrossRef]
  23. Le, M.S.; Liou, Y.A. Spatio-temporal assessment of surface moisture and evapotranspiration variability using remote sensing techniques. Remote Sens. 2021, 13, 1667. [Google Scholar] [CrossRef]
  24. Straub, J. Expert system gradient descent style training: Development of a defensible artificial intelligence technique. Knowl.-Based Syst. 2021, 228, 107275. [Google Scholar] [CrossRef]
  25. Zeltner, D.; Schmid, B.; Csiszár, G.; Csiszár, O. Squashing activation functions in benchmark tests: Towards a more eXplainable Artificial Intelligence using continuous-valued logic. Knowl.-Based Syst. 2021, 218, 106779. [Google Scholar] [CrossRef]
  26. Karimanzira, D.; Rauschenbach, T. Deep Learning Based Model Predictive Control for a Reverse Osmosis Desalination Plant. J. Appl. Math. Phys. 2020, 8, 2713–2731. [Google Scholar] [CrossRef]
  27. Achite, M.; Farzin, S.; Elshaboury, N.; Valikhan Anaraki, M.; Amamra, M.; Toubal, A.K. Modeling the optimal dosage of coagulants in water treatment plants using various machine learning models. Environ. Dev. Sustain. 2022, 2022, 1–27. [Google Scholar] [CrossRef]
  28. Farzin, S.; Anaraki, M.V.; Naeimi, M.; Zandifar, S. Prediction of groundwater table and drought analysis; a new hybridization strategy based on bi-directional long short-term model and the Harris hawk optimization algorithm. J. Water Clim. Chang. 2022, 13, 2233–2254. [Google Scholar] [CrossRef]
  29. Yan, K.; Li, C.; Zhao, R.; Zhang, Y.; Duan, H.; Wang, W. Predicting the ammonia nitrogen of wastewater treatment plant influent via integrated model based on rolling decomposition method and deep learning algorithm. Sustain. Cities Soc. 2023, 94, 104541. [Google Scholar] [CrossRef]
  30. Jones, E.; Qadir, M.; van Vliet, M.T.H.; Smakhtin, V.; Kang, S. The state of desalination and brine production: A global outlook. Sci. Total Environ. 2019, 657, 1343–1356. [Google Scholar] [CrossRef]
  31. Khayet, M.; Cojocaru, C.; Essalhi, M. Artificial neural network modeling and response surface methodology of desalination by reverse osmosis. J. Membr. Sci. 2011, 368, 202–214. [Google Scholar] [CrossRef]
  32. Libotean, D.; Giralt, J.; Giralt, F.; Rallo, R.; Wolfe, T.; Cohen, Y. Neural network approach for modeling the performance of reverse osmosis membrane desalting. J. Membr. Sci. 2009, 326, 408–419. [Google Scholar] [CrossRef]
  33. Li, B.; Yue, R.; Shen, L.; Chen, C.; Li, R.; Xu, Y.; Zhang, M.; Hong, H.; Lin, H. A novel method integrating response surface method with artificial neural network to optimize membrane fabrication for wastewater treatment. J. Clean. Prod. 2022, 376, 134236. [Google Scholar] [CrossRef]
  34. Jawad, J.; Hawari, A.H.; Zaidi, S.J. Modeling and sensitivity analysis of the forward osmosis process to predict membrane flux using a novel combination of neural network and response surface methodology techniques. Membranes 2021, 11, 10070. [Google Scholar] [CrossRef] [PubMed]
  35. Yao, D.; Zhang, F.; Feng, G.; Zhang, Y.; Meng, J. High-flux PSF/PES-COOH hollow fiber loose nanofiltration membrane for high-efficiency dye-salt separation. J. Environ. Chem. Eng. 2022, 10, 108180. [Google Scholar] [CrossRef]
  36. Hamed, O.A.; Hassan, A.M.; Al-Shail, K.; Farooque, M.A. Performance analysis of a trihybrid NF/RO/MSF desalination plant. Desalin. Water Treat. 2009, 1, 215–222. [Google Scholar] [CrossRef]
  37. Usman, J.; Salami, B.A.; Gbadamosi, A.; Adamu, H.; GarbaUsman, A.; Benaafi, M.; Abba, S.I.; Othman, M.H.D.; Aljundi, I.H. Intelligent optimization for modelling superhydrophobic ceramic membrane oil flux and oil-water separation efficiency: Evidence from wastewater treatment and experimental laboratory. Chemosphere 2023, 331, 138726. [Google Scholar]
  38. Pham, Q.B.; Sammen, S.S.; Abba, S.I.; Mohammadi, B.; Shahid, S.; Abdulkadir, R.A. A new hybrid model based on relevance vector machine with flower pollination algorithm for phycocyanin pigment concentration estimation. Environ. Sci. Pollut. Res. 2021, 28, 32564–32579. [Google Scholar] [CrossRef]
  39. Sammen, S.S.; Mohammed, T.A.; Ghazali, A.H.; Sidek, L.M.; Shahid, S.; Abba, S.I.; Malik, A.; Al-Ansari, N. Assessment of climate change impact on probable maximum floods in a tropical catchment. Theor. Appl. Climatol. 2022, 148, 15–31. [Google Scholar] [CrossRef]
  40. Hrnjica, B.; Bonacci, O. Lake Level Prediction using Feed Forward and Recurrent Neural Networks. Water Resour. Manag. 2019, 33, 2471–2484. [Google Scholar] [CrossRef]
  41. Li, X.; Peng, L.; Yao, X.; Cui, S.; Hu, Y.; You, C.; Chi, T. Long short-term memory neural network for air pollutant concentration predictions: Method development and evaluation. Environ. Pollut. 2017, 231, 997–1004. [Google Scholar] [CrossRef]
  42. Zaytar, M.A.; El Amrani, C. Sequence to Sequence Weather Forecasting with Long Short-Term Memory Recurrent Neural Networks. Int. J. Comput. Appl. 2016, 143, 7–11. [Google Scholar]
  43. Maleki, A.; Askarzadeh, A. Optimal sizing of a PV/wind/diesel system with battery storage for electrification to an off-grid remote region: A case study of Rafsanjan, Iran. Sustain. Energy Technol. Assess. 2014, 7, 147–153. [Google Scholar] [CrossRef]
  44. Zubaidi, S.L.; Ortega-Martorell, S.; Al-Bugharbee, H.; Olier, I.; Hashim, K.S.; Gharghan, S.K.; Kot, P.; Al-Khaddar, R. Urban water demand prediction for a city that suffers from climate change and population growth: Gauteng province case study. Water 2020, 12, 1885. [Google Scholar] [CrossRef]
Figure 1. (a) Experimental pilot-plant setup; (b) uncertainty analysis; (c) PSO algorithms.
Figure 1. (a) Experimental pilot-plant setup; (b) uncertainty analysis; (c) PSO algorithms.
Water 15 03515 g001
Figure 2. Input-output visualization in terms of (a) embedded response plot and (b) box plot showing the outliers and basic descriptive statistic.
Figure 2. Input-output visualization in terms of (a) embedded response plot and (b) box plot showing the outliers and basic descriptive statistic.
Water 15 03515 g002
Figure 3. The LSTM neural network general architecture.
Figure 3. The LSTM neural network general architecture.
Water 15 03515 g003
Figure 4. Exploitation and exploration of CSA model (a) f1 < 1, (b) f1 > 1.
Figure 4. Exploitation and exploration of CSA model (a) f1 < 1, (b) f1 > 1.
Water 15 03515 g004
Figure 5. The probability distribution function (CDF) of PC simulation.
Figure 5. The probability distribution function (CDF) of PC simulation.
Water 15 03515 g005aWater 15 03515 g005b
Figure 6. Error values of PC between the observed and simulated values.
Figure 6. Error values of PC between the observed and simulated values.
Water 15 03515 g006
Figure 7. Fan plot showing the MSE error values for the training and testing phases.
Figure 7. Fan plot showing the MSE error values for the training and testing phases.
Water 15 03515 g007
Table 1. Results of PC in desalination plant for LSTM.
Table 1. Results of PC in desalination plant for LSTM.
Training PhaseTesting Phase
MSERMSEMEAMSERMSEMEA
LSTM-M10.39450.62810.09450.31680.56280.1468
LSTM-M20.54440.73780.06440.42840.65450.1884
Table 2. Results of PC in desalination plant for LSTM-CSA.
Table 2. Results of PC in desalination plant for LSTM-CSA.
Training PhaseTesting Phase
MSERMSEMEAMSERMSEMEA
LSTM-CSA-M10.16640.40790.03990.19850.44560.1985
LSTM-CSA-M20.14470.38040.09450.19920.44630.1292
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

Abba, S.I.; Usman, J.; Abdulazeez, I.; Lawal, D.U.; Baig, N.; Usman, A.G.; Aljundi, I.H. Integrated Modeling of Hybrid Nanofiltration/Reverse Osmosis Desalination Plant Using Deep Learning-Based Crow Search Optimization Algorithm. Water 2023, 15, 3515. https://doi.org/10.3390/w15193515

AMA Style

Abba SI, Usman J, Abdulazeez I, Lawal DU, Baig N, Usman AG, Aljundi IH. Integrated Modeling of Hybrid Nanofiltration/Reverse Osmosis Desalination Plant Using Deep Learning-Based Crow Search Optimization Algorithm. Water. 2023; 15(19):3515. https://doi.org/10.3390/w15193515

Chicago/Turabian Style

Abba, Sani. I., Jamilu Usman, Ismail Abdulazeez, Dahiru U. Lawal, Nadeem Baig, A. G. Usman, and Isam H. Aljundi. 2023. "Integrated Modeling of Hybrid Nanofiltration/Reverse Osmosis Desalination Plant Using Deep Learning-Based Crow Search Optimization Algorithm" Water 15, no. 19: 3515. https://doi.org/10.3390/w15193515

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