Desalination Plant Performance Prediction Model Using Grey Wolf Optimizer Based ANN Approach

The present era of advances in desalination plants revolves around the involvement of artificial intelligence techniques in ameliorating their modeling and operational performance. Among the two objectives, an accurate modeling of the plant’s behavior may certainly help the design engineers to operate the plant in more stable and controlled operating conditions so as to achieve higher plant efficiency. Furthermore, this helps eliminate the risk to the operator’s life and reduces production time, energy, and money. From the literature, it is observed that Artificial Neural Network (ANN) has been the most extensively used approach for modeling and simulation of the desalination plant. However, ANN has the concept of biases and weights updation for better prediction and accuracy of the predicted model, but the conventional methods do not yield desirable results. So, the updation of biases and weights using optimization algorithms is preferred in the literature. Therefore, this paper presents the Grey Wolf Optimizer based ANN (GWO-ANN) approach for desirable prediction and accuracy of models. Further, six models (GWO-ANN Model-1 to Model-6) are proposed to more accurately predict the Reverse Osmosis (RO) desalination plant’s performance. For this investigation, we have considered four experimental inputs (feed water salt concentration, condenser inlet temperatures, evaporator inlet temperatures, and feed flow rate) and one output (permeate flux). The simulation results predict output performance in quite proximity to the experimental datasets. The simulated hybrid GWO-ANN models (best of best results of GWO-ANN Model-2: <inline-formula> <tex-math notation="LaTeX">$\text{R}^{2} \,\,=98.9$ </tex-math></inline-formula>%, Error = 0.007) show superior results than the reported results from the existing Response Surface Methodology (RSM) (<inline-formula> <tex-math notation="LaTeX">$\text{R}^{2} \,\,=98.5$ </tex-math></inline-formula>%, Error = 0.100) and ANN models (<inline-formula> <tex-math notation="LaTeX">$\text{R}^{2} =98.8$ </tex-math></inline-formula>%, Error = 0.060) and other PSO-ANN Model (<inline-formula> <tex-math notation="LaTeX">$\text{R}^{2} \,\,=96.3$ </tex-math></inline-formula>%, Error = 0.025) and GA-ANN model (<inline-formula> <tex-math notation="LaTeX">$\text{R}^{2} =98.7$ </tex-math></inline-formula>%, Error = 0.008). This research exemplifies the involvement of superior nature-inspired intelligent techniques in this modern era to further enhance the savings in production time, energy, and investment of desalination plants.


I. INTRODUCTION
Desalination and water treatment plants play a vital role in achieving the global demand for clean and safe water [1]- [4]. In this regard, various professionals, engineers, researchers, Governmental Organizations, Non-Governmental Organizations (NGOs), International Desalination Associations (IDA), and World Health Organization (WHO) are actively involved The associate editor coordinating the review of this manuscript and approving it for publication was Yongming Li . in this field [5]- [8]. The quality and the quantity of the safe water from these plants depends on their design, management, and control [8]- [10]. Therefore, hydrologists and environmental experts are always interested in learning more about these plants [11]- [14].
Two approaches often used to learn more about the plants include: (a) onsite plant's performance investigations, including in-plant examinations and research, and (b) offsite plant's performance investigations, including modeling, simulation, and control [10], [11]. The onsite plant's investigations are a time-money-energy-consuming process, sometimes unsafe for the engineers or workers, while offsite modeling investigations and predictions are safe, and may be performed by employing a single laptop or personal computer [11], [12]. But, one of the key concerns of environmental scientists, engineers and plant managers has always been the accuracy with which they can estimate the plant's performance [12]. Accurate prediction of the plant's performance and production is challenging, but evaluating it using prior time-series records gives valuable data for planning, designing, and operating the plants [9], [10]. As a result, researchers are attempting to anticipate performance precisely and cost-effectively. The performance prediction/forecasting of desalination and water treatment plants may differ from one place to the other [1], [12].
In recent decades, ANN-based models have proven to be a reliable tool for estimating nonlinear modeling parameters, and researchers have used them in a variety of water treatment and desalination plant investigations [10], [12]. These are advanced machine learning models that operate on the principle of trying to minimize errors [9], [10]. However, numerous studies demonstrate that hybridization with GA [27], [28], PSO [24]- [26], and Grey Wolf Optimizer (GWO) [20] can improve the ability of ANN-based models. Mirjalili et al. [29] were the first to introduce the GWO algorithm. Further, this algorithm is quite beneficial in artificial intelligence modeling and simulations [20]. Mohammadi et al. [20] developed a hybrid SVR-GWO model to precisely predict the water level fluctuations of Titicaca Lake of the South American continent.
According to the literature, hybridized ANN models have been found to be more appropriate and reliable for predicting process outcomes than the conventional non-hybridized ones. Some examples are listed here to help better understand the technique and investigations. Mohamed et al. (2015) developed a static var compensator (SVC) controller for minimizing power system oscillations using a hybrid GWO-ANN model [30]. They used 30 search agents and 150 iterations in their model, and they found a smaller error value with a faster convergence rate. Further, Tikhamarine et al. (2020) recently developed hybrid models (GWO-ANN) for monthly streamflow forecasting in water resource management [31]. For their modeling studies, they used monthly streamflow information spanning 130 years. In their model, they used 100 search agents and 1000 iterations. GWO-ANN models have worked well with massive datasets. In summary, the literature suggests GWO based ANN models are suitable for both small and big datasets. As per our best knowledge from available literature, the effectiveness of GWO-ANN has not been investigated till date for desalination applications, and hence, the hybrid GWO-ANN technique has been employed in this study for desalination.

A. THE BASIC PROBLEM OF ANN IS OBSERVED AS
According to Xu et al. (2015) [32], the basic ANN model, which is trained using backpropagation (BP) learning algorithms, has been widely used in the various field of engineering, but it has some limitations as follows: 1) Sometimes it has been observed that the BP algorithm may easily fall into a local minimum, and as a result, the network cannot converge and reveal the optimal solutions. 2) The convergence speed of the BP neural network is slow, and therefore, it affects the execution time of the model. According to the literature, the BP algorithm performs well in a wide range of engineering and medical applications. However, it may do not always meet the designers' high accuracy expectations.

B. THE NECESSITY OF HYBRIDIZATION
To overcome the BP algorithm limitations in the ANN modeling, several metaheuristics and the other algorithm (GA [27], [28], PSO [24]- [26], and GWO [20], etc.) have been developed by the researchers in the last few decades. The beauty of these algorithms are that they have fast convergence speed and sometimes do not fall in local minima. As a result, they provide the best weights and biases to support ANN in high accuracy outcomes. Therefore, the results suggest that hybrid models (i,e. GA-ANN, PSO-ANN, GWO-ANN, etc.) perform better than the basic ANN model. In addition, hybrid models can also combine the best features of all models to get the desired result. Therefore, hybrid models are necessary to improve the prediction accuracy and the fast convergence rate.

C. WHY GWO IS SELECTED COMPARED TO OTHER ALGORITHMS
Literature reveals that an accurate modeling performance depends on the specific selection of the algorithms and the modeling parameters. Literature also suggests that natureinspired algorithm such as GWO has excellent search capabilities to achieve global optima. In addition, this algorithm is able to adjust itself as per the objective functions. Also, this can work appropriately for linear and nonlinear systems.  which encourages us to dig deeper into this topic. Therefore, we have been selected this algorithm (GWO) to support the ANN for an accurate outcome with minimum errors. We have employed reverse osmosis (RO) desalination plant datasets for investigation and validated the results with the existing models.

D. THE MAIN CONTRIBUTIONS OF THIS PAPER ARE
1) To utilize the hybrid GWO-ANN model in the performance analysis of RO desalination plants' to achieve high prediction outcomes.
To the best of our knowledge and based on an exhaustive literature review, this GWO-ANN technique is being proposed and utilized for modeling the RO desalination plant performance for the first time. 2) To improve the modeling performance. Gil et al., 2018 [33], developed two models and reported their modeling performance as follows: ANN model (R 2 = 98.8%) and RSM model (R 2 = 98.5%). We have employed the same datasets in our models and achieved better results (GWO-ANN Model-2, R 2 = 98.9%).
3) To minimize the errors with minimum number of iterations.
Gil et al., 2018 [33], reported minimum error (0.060) for their ANN model and the minimum number of iterations (13). We have employed the same datasets in our models and achieved better results (GWO-ANN Model-2, minimum error: 0.007 and the minimum number of iterations 8).
In this regard, our significant contribution is the proposed six hybrid models (GWO-ANN Model-1 to GWO-ANN Model-6), and the simulation results show that we have achieved better results than the existing (ANN and RSM) and other models (PSO-ANN and GA-ANN). We have recorded minimum errors near to zero for the proposed models with minimum iterations. Kindly refer to more comparison detail for all proposed models in Table 3.

II. DATASETS USED FOR INVESTIGATIONS
We used the RO desalination plant dataset reported previously by Gil et al., 2018 [33]. We considered four experimental inputs: feed flow rate and water salt concentrations; evaporator and condenser inlet temperatures; and permeate flux as an experimental output with their operating ranges reported in Table 1 [33]. As shown in figure 2, a total of 88 datasets were considered for the modeling and simulation, while the entire set of data has been divided into three parts: training (75 percent), validation (20 percent), and testing (05 percent).

III. PROPOSED METHODOLOGY
This section has been separated into three subsections to comprehend the proposed methodology better. In the first and second subsections, we discuss the fundamental concepts of ANN and GWO. Later, the proposed models based on the hybrid GWO-ANN method are thoroughly presented in the third subsection using mathematical equations and an appropriate flow diagram.

A. ARTIFICIAL NEURAL NETWORK (ANN)
Several artificial intelligence techniques, including ANN, Fuzzy Logic (FL), ANFIS, and SVM, have been extensively used in various engineering applications over the last three decades. Among these, ANN, in particular, has found wide applications due to its proficient features. ANN is a promising artificial intelligence based technique that investigates the relationship between events by simulating the nature and protocol of human brain activity in realtime problem-solving [9], [18], [34]- [37]. The input, hidden, and output layers make up the architecture of an ANN. Furthermore, each layer has its own set of possible nodes connected in a feed-forward or reverse manner. Literature suggests [9], [16], [18], [34]- [37] that the precise modeling parameters and appropriate design architecture makes ANN a perfect technique. As a result, the researcher's first priority is to comprehend and implement it in order to create the best possible design. There is also a need to collect an adequate amount of input-output datasets. The inputoutput datasets are then divided into three groups: training, validation, and testing for performance investigation. During the training phase, the ANN learns how input and output pairs interact. Furthermore, the validation phase is essential to adapt and improve the correctness of the learning process. The prediction has then been assessed as part of the testing phase after conducting the training and validation stages [9], [38].

B. GREY WOLF OPTIMIZER (GWO)
Numerous optimization algorithms such as GA, PSO, GWO, etc., have been found to assist ANN to improve its performance further. In this regard, the GWO technique was conceived by Mirjalili et al. [29], which was inspired by the grey wolves hunting behavior and attitude. In this process, wolves generally live in a group of 5 to 12 individuals, with 2 of them leading each group. Based on the efficacy, decisionmaking power, and efficiency of each in the group, the grey wolves members have been divided into alpha wolves (α), beta wolves (β), delta wolves (δ), and omega wolves (ω) as illustrated in figure 3. As a result of this division, the group develops a strong social hierarchy. The α wolves are leaders of the group that influences decision-making and final judgments. The β wolves are subordinate wolves or advisors in the second level of the group and assist the α wolves in their judgments. Likewise, the δ wolves follow the α and β wolves in the next lower level. There are five types of δ with different functions, according to Mirjalili et al. [29]: (i) Scouts: They are used to monitor and control the territory's boundaries and to alert the pack in the event of danger; (ii) Sentinels: they protect and ensure the pack's safety; (iii) Elders: they are potent wolves who used to be α or β wolves in the future; (iv) Hunters: wolves used to assist α and β by hunting prey and providing food for the pack; (v) Caretakers: wolves in charge of caring for the injured, sick, and weak wolves. The ω wolves, who follow the superior wolves and are the last to feed, make up the lowest level of this group.
Mathematical equations governing and representing the hunting process are: The strong social and hunting behavior of the grey wolves is modeled in a statistical framework to address an optimization problem. Besides, the grey wolves (α, β, and δ wolves) hunt in three steps: tracking, encircling, and attacking the prey. α wolves are the finest option while in order of priority, the β, δ, and ω wolves, are the next-tolast options. In the GWO iterations, the grey wolves assess the potential hunt situation and update their position accordingly. Thus, the mathematical equations for this hunting process are as follows [29]: Step 1 Tracking: Grey wolves track prey for hunting in the first stage.
Step 2 Encircling: In the second stage, grey wolves encircle the prey for hunting, and the mathematical equations for the encircling behavior of the grey wolves have been explained as below; where, X = position vectors of the hunter (Grey wolves); X p = position vectors of the hunt (Prey); i = current iteration; A and C = weighted coefficient vectors; A = 2 a. r 1 − a and C = 2. r 2 ; r 1 and r 2 = random vectors in [0,1]; a = 2 1 − i i m ; and i m = maximum iterations.
Step 3 Attacking: Grey wolves track and encircle their prey in the first and second stages, and now they are ready to attack in the third stage. As discussed earlier, α wolves guide the groups; sometimes β wolves also take part, while in order of priority, the δ, and ω wolves, are the next-to-last options. From a mathematical point of view, α, β, and δ have the potential information about the position of the prey in the search space. Thus, as per their priority in the group, we have three solutions for the best search agents (α, β, and δ). They are in-charge of estimating prey positions and assisting other agents in updating their positions in accordance with the best search agents' positions. Now, updates are represented in equations 1 and 2: Thus, the final modified position vector of hunting Grey wolves is presented as: It can be concluded that, X 1 , X 2 , and X 3 may be considered as the best solutions for populations of α, β, and δ wolves at i th iteration, while, updating values of A 1 , A 2 , A 3 , C 1 , C 2 and C 3 can be estimated by the equation of coefficient vectors as presented previously.

C. HYBRID GWO-ANN MODEL
The GWO algorithm is combined with ANN to find an accurate ANN model while attempting to minimize the drawbacks of the backpropagation (BP) algorithm. In the proposed concept, there are two critical steps. In the first step, the GWO algorithm is used to determine the best initial biases and weights. The neural network is trained using the BP method in the second step. This improves the performance of BP in the search for global optima. As discussed earlier, the most significant variables in ANN training are weights and biases. Therefore, choosing the right set of initial estimates of biases and weights is necessary to provide the best accuracy. The weights and biases are evaluated for the proposed model, and the Mean Square Error (MSE), which determines the difference between the actual input and anticipated output, is used to assess the model fitness. Equation (10) shows the mathematical formulation of the MSE as follows [17], [18], [39]:  where, y p k = real experimentally derived output;ŷ p k = predicted output of the neural network, N = no. of patterns; and M = no. of output nodes. A lower MSE value is favorable and indicates a more accurate model. Finally, figure 4 depicts the suggested hybrid GWO-ANN model architecture for predicting the permeate flux of a RO desalination plant. First, the input-output datasets are assembled for the modeling, then arranged in a suitable manner, and finally divided into individual sets of training, validation, and testing. Later, the other essential initial modeling parameters, such as hidden layer nodes, activation function, error functions, etc., are selected. The grey wolf population is then initialized, and each grey wolf is assigned a random place inside the space, and subsequently, the fitness of each grey wolf for ANN evaluated, and the best fitness determined. If the grey wolf's fitness reaches the acceptable superior accuracy, the position vector is saved for that grey wolf, and the best ANN parameters are given.

IV. RESULTS AND DISCUSSION
This section has been separated into three subsections, in order to understand the valuable findings and novelty VOLUME 10, 2022 TABLE 3. Comparison with existing models: used same experimental datasets for modeling [33]. * the comparison included the best performance of all dataset stages, while for the individual best performance stages (training, validation, and testing), refer to TABLE 2.  of the investigation. In the first subsection, we have performed optimization of the developed model as per the proposed flow diagram (discussed earlier in the proposed methodology section, figure 4). Later, we have selected the best-optimized models, compared them to existing ones, and discussed their fruitful findings in the second subsection. In the last subsection, we have chosen and proposed the best-of-best model and analyzed its novelty in-depth.

A. OPTIMIZATION
The current models employed the {4: n:1} neural network architecture, where 4 is the number of experimental inputs, 1 refers to the number of outputs, and n is the number of hidden layer nodes, which varies from 1 to 20. In addition, the Levenberg-Marquardt training algorithm (trainlm), maximum iterations 1000, 1 hidden layer (H = 1), and 15 grey wolf populations also have been employed in modeling. The next step is to simulate and optimize the models after designing (architecture) and involving the best parameters. For optimizations, a regressive hit and trial-error method, already proven in literature with a systematic approach, was employed to achieve the best outcomes.
As discussed earlier in the description of the dataset, the data has been divided into three parts: training (75%), validation (20%), and testing (05%). In this regard, the simulation results (R 2 and MSE) demonstrate interesting outcomes. Table 2 depicts the performance (predicted permeate flux (L/h.m 2 )) at various stages of simulation: training, validation, testing, and all (collectively). The trend shows that the single hidden layer node is poorly suitable for projected outcomes with the lowest R 2 and highest MSE. Furthermore, 6 to 11 hidden layer nodes worked relatively better for individual training, validation, and testing, whereas 15 nodes performed best-of-best of all datasets {figure. 5 (a, b)}. We would like to emphasize here that such a piece of investigation is vital for every process in order to estimate the right number of nodes in ANN to achieve best performance, and GWO does it very effectively.

B. BEST-OPTIMIZED MODELS AND THEIR COMPARISON TO THE EXISTING MODELS
After regressive optimization and the systematic approach, we chose the four best-optimized models (GWO-ANN Model-1, GWO-ANN Model-2, GWO-ANN Model-3, and GWO-ANN Model-4), as shown in Table 3. We found that all four models perform better than the existing ANN and RSM models [33] and the other PSO-ANN and GA-ANN models for the same datasets. As a result, the beauty of all presented models is that they are able to analyze plant performance with minimal errors and minimum iterations with the best performance expressed through R 2 and MSE. In addition, we have also included combination of datasets as {80% (training & validation) & 20% testing}, and {70% (training & validation) & 30% testing} for our modeling investigations. For this, we have proposed two models (GWO-ANN Model-5 and GWO-ANN Model-6), and we have also recorded better results than the existing models. Table 4 presents the performances in all stages (training and validation, testing, and all) for GWO-ANN Model-5 and GWO-ANN Model-6.
In summary, all models are multivariable, multilayer, and multitasking models and are appropriate for the investigation of the desalination plants' performance as well as other industrial applications.

C. STATISTICAL VALIDATION OF MODEL FITNESS
In order to validate the proposed models (GWO-ANN Model-1 to GWO-ANN Model-6), the experimental permeate flux (RO desalination plant's performance) has been compared with the predicted permeate flux of all proposed models. For this, t-tests have been performed for all models (used 88 observations for both experimental and predicted models). We have observed that the experimental permeate flux values are in good agreement with predicted permeate flux values for all models. As a result, all models have been considered valid by the experiment with 95% of significance level (α = 0.05), as seen in Table 5. As illustrated in Table 5, the p-values of all proposed models satisfy the t-test conditions (p-value should be <0.05), recorded good Pearson Correlation (0.98 to 0.99) and noted hypothesized mean differences VOLUME 10, 2022 of zero. Therefore, all our models have been validated and tested. Table 3, we chose the four best-proposed models (GWO-ANN Model-1, GWO-ANN Model-2, GWO-ANN Model-3, and GWO-ANN Model-4) screened as much superior to previous models (RSM and ANN). Among them, proposed Model-2 outperforms the others. Also, it effectively achieves a high-quality performance expressed through regression co-efficient (R 2 ) with minimum errors (Error = ∼0.007) in 08 iterations, whereas the existing models took a higher number of 13 iterations [33] to meet the goal. This speaks of the efficiency of the algorithm in achieving optimal solutions with minimum calculations. Figure 6 further demonstrates that Model-2 can achieve the best outcome (training, validation, and testing) in 02 epochs. As further can be seen in figure 7, it can also minimize errors at all stages (i.e., training, validation, testing, and all), the testing stage outperforms (R 2 = 99.1%) and graphically illustrate a closer fit to experimental plant data. Furthermore, As shown in figure 8 (a), the experimental and estimated permeate flux values are quite near to each other for the testing stage (5%), which is a very intriguing outcome of Model-2. These results demonstrate that the proposed Model-2 is the best-fit to model such systems effectively. Similarly, figures 8 (b) and (c) indicate that experimental and estimated permeate flux values are reasonably near to each other for the testing stage (20%) for Model-5 and testing (30%) for Model-6 as well. It is also apparent that if the testing dataset is increased from 5 to 30%, the residual error between predicted and experimental results has been decreased, as illustrated in figure 8 (d).

V. CONCLUSION
In this study, a hybrid grey wolf optimizer (GWO) assisted artificial neural network (ANN) model has been proposed to optimize and predict RO desalination plants' permeate flux. The simulation results demonstrate that the GWO effectively aids ANN in determining optimal initial weights and biases, and thereby, increases convergence speed and decreases mean squared error (MSE) errors. The proposed model employs a global search algorithm analogous to hunting of prey by grey wolves so as to optimize the solution to the problem. Furthermore, when compared to the existing models (ANN and RSM) and two hybrid models (PSO-ANN and GA-ANN), the hybrid GWO-ANN model outperforms them very apparently. In this regard, we have proposed six hybrid models (GWO-ANN Model-1 to Model-6) to more accurately predict the plant's permeate flux. The simulation results predict output performance in quite proximity to the experimental datasets. The simulated hybrid GWO-ANN models (GWO-ANN Model-2: R 2 = 98.9%, Error = 0.007) show superior results than the reported results from the existing RSM (R 2 = 98.5%, Error = 0.100) and ANN model (R 2 = 98.8%, Error = 0.060) and other two hybrid models PSO-ANN (R 2 = 96.3%, Error = 0.025) and GA-ANN (R 2 = 98.7%, Error = 0.008). In addition, simulation results show that proposed hybrid models are able to obtain optimum weights and biases to support ANN for accurate prediction. We discovered errors in desirably minimum range (−0.2 to 0.2) and need for lesser iterations (8 to 11) to simulate the model than the existing models (13). Finally, the statistical t-test conditions have been satisfied and validated all the proposed models. In summary, this model is multivariable, multilayer, multitasking, and reliable, and it is able to evaluate plant performance with minimal VOLUME 10, 2022 errors and iterations while providing maximum performance. Thus, this model, we believe, is suitable not only for the desalination plant but may also serve as a benchmark and demonstrate success in modeling other process system applications equally effectively.

CONFLICT OF INTEREST
No conflict of interest ACKNOWLEDGMENT Rajesh Mahadeva would like to thank the Ministry of Education (MoE), Government of India, for providing research scholarships to carry out the study. Shashikant P. Patole would like to thank Khalifa University for its financial support through the internal fund for high-quality publication.