water Article Integrated Modeling of Hybrid Nanofiltration/Reverse Osmosis Desalination Plant Using Deep Learning-Based Crow Search Optimization Algorithm Sani. I. Abba 1 , Jamilu Usman 1, * , Ismail Abdulazeez 1 , Dahiru U. Lawal 1, * , Nadeem Baig 1 , A. G. Usman 2 and Isam H. Aljundi 1,3 1 2 3 * Citation: 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 Interdisciplinary Research Centre for Membrane and Water Security, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia; sani.abba@kfupm.edu.sa (S.I.A.); ismail.abdulazeez@kfupm.edu.sa (I.A.); nadeembaig@kfupm.edu.sa (N.B.); aljundi@kfupm.edu.sa (I.H.A.) Operational Research Centre in Healthcare, Near East University, TRNC, Mersin 10, Nicosia 99138, Turkey; abdullahigusman@gmail.com Department of Chemical Engineering, King Fahd University of Petroleum and Minerals, Dhahran 31261, Saudi Arabia Correspondence: jamilu.usman@kfupm.edu.sa (J.U.); dahiru.lawal@kfupm.edu.sa (D.U.L.) 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. Academic Editor: Anshul Yadav Received: 1 September 2023 Keywords: desalination; machine learning; uncertainty; permeate conductivity; deep learning Revised: 28 September 2023 Accepted: 4 October 2023 Published: 9 October 2023 Copyright: © 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). 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 Water 2023, 15, 3515. https://doi.org/10.3390/w15193515 https://www.mdpi.com/journal/water Water 2023, 15, 3515 2 of 17 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 heatdriven 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–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 Water 2023, 15, 3515 3 of 17 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–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–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 Water 2023, 15, 3515 4 of 17 (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–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–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 Water 2023, 15, x FOR PEER REVIEW Water 2023, 15, 3515 5 of 17 5 of 17 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 developing deep combination. learning models the processing of gathered datacan andbe thetackled selection the the right model Theisintricacy of these built models by of emright model combination. The intricacy of these built models can be tackled by employing ploying a multiple heuristic approach such as the CSA and understanding the extent of aAI multiple approach such the CSA and understanding the extent of AI systems systemsheuristic to manage complex andasnonlinear-system-like desalination. to manage complex and nonlinear-system-like desalination. 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. In this work, we employed a Monte Carlo simulation (Figure 1b) to investigate the unIn this we metaheuristic employed a Monte Carlowas simulation (Figure to investigate the1c certainty, andwork, the PSO algorithm used to solve this1b) problem. In Figure uncertainty, and the PSO metaheuristic algorithm was used to solve this problem. In is the objective function for selecting optimal features using the PSO algorithm. Further Fiugure 1c is the objective function for features using the PSO was algorithm. pre-processing using normalization to selecting improve optimal the accuracy of the prediction carried Further pre-processing using normalization to improve the accuracy of the prediction out. The model development also takes into consideration 5k-fold cross-validation towas procarried out. The model development alsohow takesthe into consideration vide a more comprehensive insight into model performs5k-fold across cross-validation different subsets to data. provide more comprehensive insight intoahow modelassessment performs across of Thea5k-fold cross-validation provides morethe reliable of howdifferent a model subsets of data. The 5k-fold cross-validation provides a more reliable assessment of how will perform on unseen data by using different data subsets for training and validation [37]. will perform unseen data by usingand different subsets for training andof Ita ismodel widely used in ML on to tune hyperparameters assess data the generalization capability 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 Water 2023, 15, 3515 6 of 17 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 RMSE = MAE = MSE = 2 1 N Y − Y ( p) (o ) N ∑ i =1 ∑iN=1 y( p) − y(o) N ∑iN=1 Y( p) − Y(o) N (1) (2) 2 (3) where Y pre, i Ycom,i Ypre and Ycom indicate the predicted and computed values Y, with N as the means for the data points. Water 2023, 15, x FOR PEER REVIEW Water 2023, 15, 3515 7 of 17 7 of 17 2. Input-output visualization in terms of (a) embedded responseplot plot and and (b) Figure Figure 2. Input-output visualization in terms of (a) embedded response (b) box boxplot plotshowing showing the outliers and basic descriptive statistic. the outliers and basic descriptive statistic. 2.1. Long-Term Memory Network 2.1. Long-Term Memory Neural Neural Network (LSTM)(LSTM) The LSTM network emerges as an advanced variation of the recurrent The LSTM neural neural network emerges as an advanced variation of the recurrent neural neural network (RNN). Its inception was specifically aimed at addressing the inherent network (RNN). Its inception was specifically aimed at addressing the inherent shortcom- shortof traditional RNNs, especially theirtoinability to retainover memory over seextended ings ofcomings traditional RNNs, especially their inability retain memory extended sequences (see Figure 3). A significant triumph of LSTM over its predecessor is its prowess quences (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 Water 2023, 15, x FOR PEER REVIEW Water 2023, 15, 3515 8 of 17 in resolving issues tied to vanishing and exploding gradients, which historically plagued 8 of 17 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 netthe training of RNNs. This enhanced capability not only rectifies these problems but also works introduce a set of intricate memory cells. Unlike the transient memory of convenaugments the accuracy of models based on recurrent networks—a notable advancement as tional RNNs, these memory cells exhibit a longer retention span. The configuration of reported in the literature [40]. Diving deeper into their structure, LSTM neural networks these cells can be visualized as interconnected chains, echoing the modular repetition in introduce a set of intricate memory cells. Unlike the transient memory of conventional conventional RNNs. In their research, Li et al. [41] emphasized the unique structure of RNNs, these memory cells exhibit a longer retention span. The configuration of these cells these repeating units. LSTM neural networks boast a range of specialized components, can be visualized as interconnected chains, echoing the modular repetition in conventional each designed meticulously to process and hold onto extensive sequences. These compoRNNs. In their research, Li et al. [41] emphasized the unique structure of these repeating nents not only ensure that information is accurately captured but also make it possible for units. LSTM neural networks boast a range of specialized components, each designed the network to decide whatand to remember and what to discard, granting LSTM neural meticulously to process hold onto extensive sequences. These components notnetonly works their signature ability to remember sequences over a protracted period. ensure that information is accurately captured but also make it possible for the network At the heart LSTM structure lies memory cell, anLSTM intricate assembly pivotal to decide whatof tothe remember and what tothe discard, granting neural networks their tosignature the LSTMability neuraltonetwork’s prowess. This memory cell is crafted as a network of sigremember sequences over a protracted period. moid neurons interconnected instructure a mannerlies that a unique self-feedback loop. Such a At the heart of the LSTM theoffers memory cell, an intricate assembly pivotal configuration thenetwork’s memory cell to fine-tune operations, choosing whatof to the LSTMallows neural prowess. Thisits memory cell selectively is crafted as a network information to retain and what to dispose of over prolonged durations. Aside from the a sigmoid neurons interconnected in a manner that offers a unique self-feedback loop. Such memory cell and hidden state, LSTM neural networks have three specialized gates, each configuration allows the memory cell to fine-tune its operations, selectively choosing what serving a distinct purpose. research of Zaytar El Amranidurations. [42] emphasized the esinformation to retain andThe what to dispose of over&prolonged Aside from the sence of these gating mechanisms. Their ability to judiciously regulate the influx and efmemory cell and hidden state, LSTM neural networks have three specialized gates, each flux of information renders The the LSTM neural network its unique to the maintain serving a distinct purpose. research of Zaytar & El Amrani [42]capability emphasized essence relevant data and mechanisms. discard the superfluous, ensuring optimum performance over extended of these gating Their ability to judiciously regulate the influx and efflux of sequences. information renders the LSTM neural network its unique capability to maintain relevant data and discard the superfluous, ensuring optimum performance over extended sequences. Figure The LSTM neural network general architecture. Figure 3. 3. The LSTM neural network general architecture. 2.2. Crow Search Algorithm (CSA) 2.2. Crow Search Algorithm (CSA) The CSA optimization algorithm inspired the social behavior and memory The CSA is is anan optimization algorithm inspired byby the social behavior and memory capability of crows, specifically their ability to hide food and remember its location for 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 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 swarm intelligence techniques, yet it has been shown to have competitive performance for for certain optimization problems [43,44]. The program emulates the crow’s behavior by 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 Water 2023, 15, 3515 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 9 of 17 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 soagents far. In this distance-centric method, in closer search area. These collaborate, sharing communication insights about the most agents promising food proximity exchange informationcommunication compared to those positioned farther sources identified somore far. Inextensive this distance-centric method, agents in closer away [44]. exchange more extensive information compared to those positioned farther proximity In[44]. addition to its exploration prowess, the CSA incorporates an exploitation strategy away that homes in on to pinpointing the optimal solution. mechanism the positions In addition its exploration prowess, the CSAThis incorporates anadjusts exploitation strategy that homes in on pinpointing optimal solution. This identified mechanismthus adjusts of of agents relative to the mostthe promising food source far. the Thepositions CSA has agents relativeits to efficacy the mostin promising food source identified thus Thelike CSAengineering has demondemonstrated solving optimization challenges in far. fields strated its efficacy in solving challenges in fields like engineering design, design, feature selection, andoptimization image processing. Furthermore, Figure 4 presents a feature selection, and image processing. Furthermore, Figure 4 presents a comprehensive comprehensive flowchart detailing the CSA’s process, highlighting its primary stages. The flowchart detailing the CSA’srandomly process, highlighting its primary stages. swarm of crows is initialized within a d-dimensional space.The Theswarm fitness of ofcrows each is initialized randomly a d-dimensional space. The fitness of evaluation, each crow isan assessed crow is assessed using awithin specific fitness function, and based on this initial using a specific function, based onits this evaluation, anininitial memoryvariable, value is memory value isfitness assigned. Everyand crow saves hiding location its memory assigned. Every crow saves its hiding location in its memory variable, denoted as mi. as To denoted as mi. To update its position, a crow selects another random crow, represented update its in position, a crow selects anothervalue. random crow,value represented as xj, which in turn xj, which turn produces a random If this surpasses the awareness produces a threshold random value. If this value surpasses probability threshold ‘AP’, probability ‘AP’, the crow xi will track xjthe toawareness pinpoint the location mj. the crow xi will track xj to pinpoint the location mj. Figure4.4.Exploitation Exploitationand andexploration explorationof ofCSA CSAmodel model(a) (a)f1 f1<<1,1,(b) (b)f1f1>>11. Figure 3. Results 3. Results In recent times, the convergence of the Industrial Revolution 4.0 with the adoption of In recent times,Intelligence the convergence of the Industrial Revolution 4.0 with thehas adoption emerging Artificial (AI) and Internet of Things (IoT) technologies markedofa emerging Artificial Intelligence (AI) and Internet of Things (IoT) technologies has marked significant advancement in the fields of wastewater treatment and desalination plants. This arevolution significantrepresents advancement in theoffields of aimed wastewater treatment and desalination plants. the peak efforts at effectively harnessing these advanced This revolution the peak of management efforts aimedchallenges. at effectively harnessing these adtechnologies to represents address crucial water Within this context, the vanced technologies to address crucial water management challenges. Within this context, integration of ML techniques into the operational framework of desalination processes has the integration of MLattention. techniques intointegration the operational framework of desalination gained substantial This is seen as a pivotal approach toprocesses optimize 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 and precisely control the various aspects the desalination process. studiesin have already underscored potential andoffeasibility of employing MLPrevious methodologies 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 Water 2023, 15, 3515 10 of 17 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. Table 1. Results of PC in desalination plant for LSTM. Training Phase Testing Phase MSE RMSE MEA MSE RMSE MEA LSTM-M1 0.3945 0.6281 0.0945 0.3168 0.5628 0.1468 LSTM-M2 0.5444 0.7378 0.0644 0.4284 0.6545 0.1884 Table 1. Results of PC in desalination plant for LSTM. LSTM-M1 LSTM-M2 Water 2023, 15, 3515 1.0 1.0 0.8 0.8 Probability Probability Training Phase MSE RMSE MEA 0.3945 0.6281 0.0945 0.5444 0.7378 0.0644 0.6 0.4 LSTM-M1 Training Phase 0.2 0.4 LSTM-M1 Testing Phase Observed PV Simulated PC 0.0 0.0 1.0 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0 1.0 LSTM-M2 Testing Phase 0.8 0.6 LSTM-M2 Training Phase 0.4 0.2 Probability 0.8 Probability 0.6 0.2 Observed PC Simulated PC 0.0 Observed PC Simulated PC 0.6 0.4 0.2 Observed PC Simulated PC 0.0 0.0 0.0 0.2 0.4 0.6 0.8 1.0 .2 1.0 1.0 0.8 0.8 Probability Probability Testing Phase MSE RMSE MEA 11 of 17 0.3168 0.5628 0.1468 0.4284 0.6545 0.1884 0.6 0.4 LSTM-CSA-M1 Training Phase 0.2 Observed PC Simulated PC 0.0 0.0 0.2 0.4 0.6 Figure 5. Cont. 0.8 1.0 .3 .4 .5 .6 .7 0.6 0.4 LSTM-CSA-M1 Testing Phase 0.2 Observed PC Simulated PC 0.0 0.2 0.4 0.6 0.8 1.0 1212 of of 17 17 1.0 1.0 0.8 0.8 Probability Probability Water 2023, 15, 15, x FOR Water 2023, 3515PEER REVIEW 0.6 0.4 LSTM-CSA-M2 Training Phase 0.2 Observed PC Simulated PC 0.0 0.6 0.4 LSTM-CSA-M2 Testing Phase 0.2 Observed PC Simulated PC 0.0 0.0 0.2 0.4 0.6 0.8 1.0 0.2 0.4 0.6 0.8 1.0 Figure (CDF)of ofPC PCsimulation. simulation. Figure5.5.The Theprobability probabilitydistribution distribution function function (CDF) TheCDF CDFisisaastatistical statisticalconcept concept used used to to compare (empirThe comparethe thedistribution distributionofofobserved observed (empirical)data datawith withthat that of of simulated simulated (model-generated) into how ical) (model-generated)data. data.ItItprovides providesinsights insights into how closely the simulated data matches the observed data in terms of their distribution and closely the simulated data matches the observed data in terms of their distribution and thelikelihood likelihoodofofspecific specific values values occurring. occurring. The hashas the The graph graphdisplayed displayedthat thatLSTM-CAS-M2 LSTM-CAS-M2 the highest agreement between the observed and simulated PC. A good match between 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 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 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 comthat the model’s are consistent the real-world desalination data. Therisk comparison of CDFspredictions is widely used in various with fields, such as climate modeling, financial parison 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 assessment, and quality control. Further numerical comparison of the results is presented using MAE measures. The MAE indicated the average absolute difference between the using MAEand measures. The MAE indicated average absolute difference between predicted actual values. It gives a sensethe of the average magnitude of errors withoutthe predicted actual It gives a sense of errors without squaring and them. Fromvalues. the training results it canof bethe seenaverage that themagnitude MAE of LSTM-M1 = 0.0945, the MAE of LSTM-M2 0.0644, the MAE of the = 0.0399, and the=MAE squaring them. From the=training results it can be LSTM-CSA-M1 seen that the MAE of LSTM-M1 0.0945, ofMAE the LSTM-CSA-M2 0.0945. the TheMAE results that the LSTM-CSA-M1 the of LSTM-M2 ==0.0644, ofshow the LSTM-CSA-M1 = 0.0399, has andthe thelowest MAE of MAE (0.0399), implying that it has the smallest average absolute errorhas in predicting the LSTM-CSA-M2 = 0.0945. The results show that the LSTM-CSA-M1 the lowest PC MAE during the training phase (see Table 2). On the other hand, the LSTM-CSA-M2 has the (0.0399), implying that it has the smallest average absolute error in predicting PC during lowest valuephase for RMSE that ithand, is the the mostLSTM-CSA-M2 accurate model has in predicting the training (see (0.3804), Table 2).suggesting On the other the lowest PC in the training phase (see Figure 6). value for RMSE (0.3804), suggesting that it is the most accurate model in predicting PC in the training phase (see Figure 6). Table 2. Results of PC in desalination plant for LSTM-CSA. Table 2. Results of PC in desalination plant for LSTM-CSA. Training Phase MSETraining RMSE Phase MEA LSTM-CSA-M1 LSTM-CSA-M2 LSTM-CSA-M1 LSTM-CSA-M2 0.1664 MSE 0.1447 0.1664 0.1447 0.4079 RMSE 0.3804 0.4079 0.3804 0.0399 MEA 0.0945 0.0399 0.0945 Testing Phase MSE RMSEPhaseMEA Testing 0.1985 0.4456 MSE RMSE 0.1985 MEA 0.1992 0.4463 0.1292 0.1985 0.4456 0.1985 0.1992 0.4463 0.1292 x FOR PEER REVIEW Water 2023, 15, 3515 1313of of 17 MAE-Values for PC (µS/cm) 0.24 0.20 0.16 MAE-Training MAE-Testing 0.12 0.08 0.04 LSTM-M1 LSTM-M2 LSTM-CSA-M1 LSTM-CSA-M2 Models Combinations 0.70 RMSE-Values PC (µS/cm) 0.65 RMSE-Training RMSE-Testing 0.60 0.55 0.50 0.45 0.40 0.35 LSTM-M1 LSTM-M2 LSTM-CSA-M1 LSTM-CSA-M2 Figure 6. Error values of PC between the observed and simulated values. Models Combination However, the LSTM-CSA-M2 performs across values. all three metrics (MSE, RMSE, Figure 6. Error values of PC between the observedthe andbest simulated and MAE) among the four models during the training phase for PC. The LSTM-CSA-M1 has the second-best performance, performs with the lowest indicating the smallest However, the LSTM-CSA-M2 the bestMAE across all three metrics (MSE,average RMSE, absolute error. These metrics collectively offer insight into the accuracy and precision of and MAE) among the four models during the training phase for PC. The LSTM-CSA-M1 the model’s predictions, helping to with identify most suitable predicting PC has the second-best performance, thewhich lowestmodel MAEisindicating the for smallest average in the desalination plant’s training phase.offer In intricate like desalination, where absolute error. These metrics collectively insight processes into the accuracy and precision of uncertainties arise from both human activities and the characteristics of the source water, the model’s predictions, helping to identify which model is most suitable for predicting the connections among physicochemical factors are prone to being nonlinear due to these PC in the desalination plant’s training phase. In intricate processes like desalination, uncertain factors. The evidence in Table 2 indicates that the PC simulation was shown to where uncertainties arise from both human activities and the characteristics of the source be a satisfactory and reliable simulation in the testing phase. The quantitative comparison water, the connections among physicochemical factors are prone to being nonlinear due of the testing phase depicted that MSE measures the average of the squared differences to these uncertain factors. The evidence in Table 2 indicates that the PC simulation was between the predicted and actual values. Lower MSE values indicate that the model’s shown to be a satisfactory and reliable simulation in the testing phase. The quantitative Water 2023, 15, x FOR PEER REVIEW Water 2023, 15, 3515 14 of 17 14 of 17 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 aretocloser to thevalues. actual values. In thisthe case, the LSTM-CSA-M1 and predictions are closer the actual In this case, LSTM-CSA-M1 and LSTMLSTM-CSA-M2 have the lowest MSE values, suggesting that these models have better CSA-M2 have the lowest MSE values, suggesting that these models have better overall overall prediction accuracy in comparison to the other models. The numerical prediction accuracy in comparison to the other models. The numerical accuracyaccuracy for each for each model in the testing phase was as follows: LSTM-M1 (MSE = RMSE = model in the testing phase was as follows: LSTM-M1 (MSE = 0.3168, 0.3168, RMSE = 0.5628, 0.5628, MEA = 0.1468), LSTM-M2 (MSE = 0.4284, RMSE = 0.6545, MEA = 0.1884), the LSTMMEA = 0.1468), LSTM-M2 (MSE = 0.4284, RMSE = 0.6545, MEA = 0.1884), the LSTM-CSACSA-M1 = 0.1985, RMSE = 0.4456, MEA 0.1985),the theLSTM-CSA-M2 LSTM-CSA-M2 (MSE (MSE == 0.1992, M1 (MSE(MSE = 0.1985, RMSE = 0.4456, MEA = =0.1985), 0.1992, RMSE = 0.4463, MEA = 0.1292). Similarly, the lower RMSE values indicate better predictive RMSE = 0.4463, MEA = 0.1292). Similarly, the lower RMSE values indicate better predictive performance. LSTM-CSA-M1and andLSTM-CSA-M2 LSTM-CSA-M2have havethe the lowest RMSE valperformance. Similarly, Similarly, LSTM-CSA-M1 lowest RMSE values, ues, implying that these models are better at minimizing prediction errors. In this case, implying that these models are better at minimizing prediction errors. In this case, the the LSTM-CSA-M2 lowest MEA value,suggesting suggestingthat thatitithas has the the smallest smallest average LSTM-CSA-M2 hashas thethe lowest MEA value, average prediction prediction error. error. Based Based on on these these metrics, metrics, ititappears appearsthat thatthe themodels modelswith withthe theprefix prefixLSTMLSTMCSA CSA (LSTM (LSTM with with CSA) CSA)tend tendto toperform performbetter betterthan thanthe theother othermodels models(LSTM (LSTMwithout withoutCSA) CSA) across three metrics. metrics.Additionally, Additionally,between betweenthe theLSTM-CSA-M1 LSTM-CSA-M1 and LSTM-CSAacross all three and thethe LSTM-CSA-M2, M2, the latter (LSTM-CSA-M2) seems to outperform former with slightly lower values the latter (LSTM-CSA-M2) seems to outperform thethe former with slightly lower values in in most metrics (see Figure 7). most metrics (see Figure 7). Figure Figure 7. 7. Fan Fanplot plot showing showing the the MSE MSE error error values values for for the the training training and and testing testing phases. phases. 4. Conclusions Conclusions 4. In the the face face of of ever-growing ever-growing ecological ecological challenges challenges and and the the critical critical importance importance of of the the In sustainable development goals, it is evident that innovative solutions are a necessity. This sustainable development goals, it is evident that innovative solutions are a necessity. This research highlights highlights the in in advancing desaliresearch the transformative transformativepotential potentialofofartificial artificialintelligence intelligence advancing denation processes, particularly in addressing the global issue of water scarcity. By focusing salination processes, particularly in addressing the global issue of water scarcity. By foon the hybrid NF–RONF–RO process,process, this study an AI model deep learning LSTM cusing on the hybrid thisintroduces study introduces an AIusing model using deep learncombined with the metaheuristic CSA, termed thetermed LSTM-CSA. This modelThis wasmodel rigorously ing LSTM combined with the metaheuristic CSA, the LSTM-CSA. was tested based on several performance criteria and validated using both external and internal rigorously tested based on several performance criteria and validated using both external validation a preliminary a Monte Carlo and internaltechniques, validation with techniques, with a uncertainty preliminaryassessment uncertaintyusing assessment using a simulation. The statistical performance of the models was commendable. The LSTM model Monte Carlo simulation. The statistical performance of the models was commendable. The displayed noteworthy but accuracy, the LSTM-CSA outperformed it, suggesting that the LSTM model displayedaccuracy, noteworthy but the LSTM-CSA outperformed it, sugintegration of the CSA with deep learning augments predictive capability. This was further gesting that the integration of the CSA with deep learning augments predictive capability. corroborated viacorroborated innovative 2D suchmethods, as the CDF This was further viagraphical innovativevisualization 2D graphicalmethods, visualization suchand as fan plot, which added depth to the accuracy evaluation by accounting for various other the CDF and fan plot, which added depth to the accuracy evaluation by accounting for 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 Water 2023, 15, 3515 15 of 17 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. 2. 3. 4. 5. 6. 7. 8. 9. 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. [CrossRef] 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). 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. [CrossRef] 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. [CrossRef] Curto, D.; Franzitta, V.; Guercio, A. A review of the water desalination technologies. Appl. Sci. 2021, 11, 670. [CrossRef] 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. [CrossRef] 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. 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. [CrossRef] 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. [CrossRef] Water 2023, 15, 3515 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 16 of 17 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. [CrossRef] M’nif, A.; Bouguecha, S.; Hamrouni, B.; Dhahbi, M. Coupling of membrane processes for brackish water desalination. Desalination 2007, 203, 331–336. [CrossRef] 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. [CrossRef] Choi, S.Y. A Review About Membrane-Based Water Desalination. Act. Sched. 2020, 1–8. Ilyushin, Y.V.; Kapostey, E.I. Developing a Comprehensive Mathematical Model for Aluminium Production in a Soderberg Electrolyser. Energies 2023, 16, 6313. [CrossRef] 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. [CrossRef] AlSawaftah, N.; Abuwatfa, W.; Darwish, N.; Husseini, G. A comprehensive review on membrane fouling: Mathematical modelling, prediction, diagnosis, and mitigation. Water 2021, 13, 1327. Bhati, M.S. Industrial Internet of Things (IIoT): A Literature Review. Int. J. Res. Eng. Appl. Manag. 2018, 4, 304–307. 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. [CrossRef] Tao, H. Groundwater Level Prediction using Machine Learning Models: A. Neurocomputing 2022, 489, 271–308. 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] Le, M.S.; Liou, Y.A. Spatio-temporal assessment of surface moisture and evapotranspiration variability using remote sensing techniques. Remote Sens. 2021, 13, 1667. [CrossRef] Straub, J. Expert system gradient descent style training: Development of a defensible artificial intelligence technique. Knowl.-Based Syst. 2021, 228, 107275. [CrossRef] 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. [CrossRef] Karimanzira, D.; Rauschenbach, T. Deep Learning Based Model Predictive Control for a Reverse Osmosis Desalination Plant. J. Appl. Math. Phys. 2020, 8, 2713–2731. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] 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. [CrossRef] [PubMed] 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. [CrossRef] 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. [CrossRef] 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. Water 2023, 15, 3515 38. 39. 40. 41. 42. 43. 44. 17 of 17 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. [CrossRef] 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. [CrossRef] Hrnjica, B.; Bonacci, O. Lake Level Prediction using Feed Forward and Recurrent Neural Networks. Water Resour. Manag. 2019, 33, 2471–2484. [CrossRef] 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. [CrossRef] 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. 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. [CrossRef] 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. [CrossRef] 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.