# The Synergy of Renewable Energy and Desalination:
## 5 Energy Efficient Operation of Centrifugal Pumping System in Desalination
Consequently, the following is the input to hidden layer neuron \(j\):  
\[h_{j}=\left(w_{ij}^{h}\cdot x_{1}\right)+\left(w_{2j}^{h}\cdot x_{2}\right)+ \cdots+\left(w_{nj}^{h}\cdot x_{n}\right) \tag{3}\]  
where \(i\) and \(j\) stand for the number of input and hidden layer neurons, respectively, and \(w_{y}^{h}\) is the weight between the input and hidden layer. This sum is then passed through an activation function, which decides how active the hidden node should be. After calculating the weighted sum \(h_{j}\), the activation function \(f(h_{j})\) transforms \(h_{j}\) to determine how active the node should be. For the Rectified Linear Unit (ReLU) activation function:  
\[f\left(h_{j}\right)=max\big{(}0,\ h_{j}\big{)} \tag{4}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multirow{2}{*}{**Accuracy (\%)**} & \multicolumn{2}{c}{**Computational Time**} & \multicolumn{2}{c}{**Ease of**} & \multirow{2}{*}{**Applicability Range**} \\  & & **(Hrs)** & & **Implementation** & \\ \hline Empirical Scaled Models & 85–90 & up to 0.5 & High & Limited to specific designs \\ \hline CFD & 90–95 & 10–20 & Moderate & Wide range of conditions \\ \hline Machine Learning (ML) & 80–95 & 1–5 & Moderate to High & Data-dependent \\ \hline Analytical Methods & 75–85 & 0.1–0.5 & Very High & Basic designs only \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of various performance prediction methods. The processed signals from the hidden layer are combined again with new weights to produce the final result at the output layer. To reduce the root means square error:  
\[RMSE=\left(\frac{1}{N}{\sum_{i=1}^{N}}(y_{i}-\hat{y}_{i})^{2}\right)^{\frac{1}{2}} \tag{5}\]  
the weights of the linked neurons are changed. Here, \(y_{i}\) is actual value, \(\hat{y}_{i}\) is the predicted value, and \(N\) is a number of data points. The ANN aims to minimize RMSE by tweaking its weight. During training, the network adjusts its weights \(w_{ij}^{h}\) to reduce errors in case its prediction is wrong. The error (RMSE) is sent backward through the network. Each weight \(w_{ij}^{h}\) is adjusted slightly to reduce future errors. This is a so-called backpropagation method. The error signal at hidden node j is calculated as:  
\[\delta_{j}=\left({\sum_{k}\delta_{k}w_{jk}}\right)f^{\prime}(h_{j}) \tag{6}\]  
where \(\delta_{j}\) is the error at output node \(k\), \(w_{jk}\) is the weight connecting hidden node \(j\) to output node \(k\), and \(f^{\prime}(h_{j})\) is a derivative of the activation function. Over time, the ANN learns to map inputs to accurate outputs. Hidden layers allow the network to learn complex relationships. Figure 11: Structure of an ANN with an input, a hidden, and an output layer. In a desalination system, the output might predict energy demand, optimize pump speed, or warn of corrosion risks. The selection of artificial neural networks as a predictive and optimization tool in renewable energy-driven desalination systems is rooted in their unique ability to model non-linear, high-dimensional relationships inherent in intermittent renewable energy generation, dynamic desalination demand, and complex system interdependencies. Unlike traditional statistical methods like regression models, which struggle with non-stationary data and multi-variable interactions, ANNs excel at capturing hidden patterns in heterogeneous datasets, such as solar irradiance fluctuations, wind speed variability, and membrane fouling dynamics. For instance, recurrent neural networks (RNNs) and long short-term memory (LSTM) architectures are particularly adept at time-series forecasting, enabling precise prediction of renewable energy availability, like solar/wind generation 24-72 h ahead and demand-side water requirements. This capability is critical for optimizing energy storage dispatch strategies and preemptively adjusting desalination loads to align with renewable supply, thereby mitigating the \"load vs. generator\" duality of storage systems.