This study employs diverse machine learning models, including classic artificial neural network (ANN), hybrid ANN models, and the imperialist competitive algorithm and emotional artificial neural network (EANN), to predict crucial parameters such as fresh water production and vapor temperatures. Evaluation metrics reveal the integrated ANN-ICA model outperforms the classic ANN, achieving a remarkable 20% reduction in mean squared error (MSE). The emotional artificial neural network (EANN) demonstrates superior accuracy, attaining an impressive 99% coefficient of determination (R2) in predicting freshwater production and vapor temperatures. The comprehensive comparative analysis extends to environmental assessments, displaying the solar desalination system's compatibility with renewable energy sources. Results highlight the potential for the proposed system to conserve water resources and reduce environmental impact, with a substantial decrease in total dissolved solids (TDS) from over 6,000 ppm to below 50 ppm. The findings underscore the efficacy of machine learning models in optimizing solar-driven desalination systems, providing valuable insights into their capabilities for addressing water scarcity challenges and contributing to the global shift toward sustainable and environmentally friendly water production methods.

  • The study employs diverse machine learning models to predict crucial parameters such as fresh water production and vapor temperatures.

  • Machine learning models including classic artificial neural network (ANN), hybrid ANN models, and the imperialist competitive algorithm (ANN-ICA) and emotional artificial neural network (EANN)

  • The EANN model emerges as the most accurate in predicting freshwater production and vapor temperatures.

The escalating global water crisis necessitates innovative approaches to address freshwater scarcity (Yavari et al. 2022; Nejatian et al. 2023), with a particular focus on sustainable and energy-efficient desalination methods (Kumar et al. 2022). Among the emerging solutions, the air humidification–dehumidification (HD) technique for saltwater desalination, especially in low capacities, has gained prominence (Mohamed et al. 2021; Su et al. 2023). A notable subset of this approach involves solar water desalinations, utilizing solar energy either directly or indirectly (Mutar & Alaiwi 2023). Early attempts primarily employed direct solar water purifiers, and extensive research aimed at enhancing their efficiency (Taner & Dalkilic 2019; Ni et al. 2023). However, issues such as coating clouding, reduced transparency, and diminished device efficacy hindered their widespread commercialization (Duan et al. 2023).

The urgency of addressing global water scarcity, exacerbated by population growth, climate change, and increasing water demands across various sectors, underscores the critical need for innovative solutions (Taner 2015; Ingrao et al. 2023). Desalination, particularly solar-driven methods, presents a promising avenue to augment freshwater supply (Shokri & Sanavi Fard 2023; Zhang et al. 2024). As the world grapples with the challenge of providing clean water to burgeoning populations, it becomes imperative to explore and refine technologies that not only meet these demands but also operate sustainably (Abdelfattah & El-Shamy 2024; Hassan et al. 2024). The intersection of solar energy utilization and desalination techniques offers a potentially transformative solution (Nikolaidis 2023). Therefore, an exploration of the solar desalination system within a net-zero energy consumption building aiming to contribute novel insights into enhancing the efficiency of freshwater production through renewable energy sources is needed.

In contrast, the indirect method harnesses solar energy through technologies like solar collectors, subsequently applying this energy to power the water softening process (Jasim et al. 2023; Saedpanah et al. 2023). This indirect approach boasts higher efficiency overall, as the saltwater avoids direct contact with the solar absorber, mitigating operational challenges (Djellabi et al. 2022). Within the realm of indirect methods, the HD process within solar water tanks has garnered significant attention in recent years. The HD exhibits promising characteristics, offering a viable avenue for freshwater production in an energy-efficient manner (Xue et al. 2023).

Standard mathematical techniques are employed in the optimization and modeling of thermal processes (Li et al. 2023). Theoretically, it is feasible to construct an appropriate model to represent a multitude of thermal processes involved in desalination water (Prado de Nicolás et al. 2023). However, such models cannot be developed for processes characterized by variables and nonlinear relationships. A number of variables influence the distillation process, including the flow rate of the inlet water, the temperature of the environment, the intensity of solar radiation, the velocity of the wind, the concentration level, the length of the concentrator, and the temperature of the absorber plate and glass (Hammoodi et al. 2023). It is exceedingly challenging to formulate a mathematical model that can accurately predict and optimize dependent variables when all independent variables are considered. The incorporation of machine learning models signifies a pioneering approach to assessing and optimizing system performance (Emad Azhar Ali et al. 2021; Chen et al. 2023; Siahaan & Asrol 2023; Wei et al. 2024). This interdisciplinary fusion of renewable energy and advanced computational techniques opens avenues for not only understanding the intricacies of solar-driven desalination but also for innovatively tackling the challenges associated with its implementation (Yaghoubi et al. 2022; Misbah Inayat et al. 2023). The dialogue within this research extends to the nuanced comparison of these models, sparking discussions on their respective strengths, weaknesses, and potential synergies.

To advance this paradigm, the performance of a solar desalination system integrated into a net-zero energy consumption building is developed. This study uses a variety of machine learning models, including the classic artificial neural network (ANN), a hybrid ANN model, and the novel imperialist competitive algorithm and emotional artificial neural network (EANN). These models are used to predict critical parameters such as freshwater production and vapor temperatures using input data that include solar intensity, ambient temperature, inlet water flow, and inlet water temperature. This study makes a significant contribution by conducting a comprehensive comparative analysis of these machine learning models, revealing their efficacy in predicting key performance indicators of the solar desalination system. Its goal is to provide valuable insights into optimizing system efficiency and expanding the applicability of solar water desalination technologies by investigating the strengths and limitations of each model. As a result, this comparative study could add a new perspective to ongoing efforts to address water scarcity through sustainable and energy-efficient means. Meanwhile, due to the limited amount of data required for machine learning models in such scenarios, selecting an appropriate model capable of effectively training and predicting data is crucial.

Process description

The solar water heater and water desalination combination device was chosen in accordance with Figure 1. Water desalination, hot water tank, fresh water tank, solar collectors, pumps, and control system are the components of the apparatus. The HD method was implemented in the water desalination. Continuously, these two processes are contained within a container. By applying an opposite flow of air and salt water to a polymer that is resistant high temperatures, humidity is introduced into the air, resulting in an increase in both temperature and humidity. The capacity to absorb moisture from the air increases significantly as the temperature rises; for instance, the absolute humidity difference of over 250 g/kg of dry air separates two temperatures ranging from 30 to 70 °C. Evaporation of water molecules facilitates the removal of residual salts, which is reflected in the outgoing flow of salt water (flow 4 in Figure 1). From the upper portion of the polymer, warm, humid air escapes and enters the dehumidification section. For the purpose of dehumidifying the airflow, a tubular condenser is employed in the dehumidification section. As illustrated in Figure 1, the incoming cold water is utilized as a cooling fluid within this compressor, causing it to preheat. After exiting the compressor, the preheated water is introduced into the hot water tank. By circulating through the condenser's outer surface, humid air is cooled. Any residual moisture in the air is precipitated onto the condenser surface, where it is collected as fresh water in the dehumidifier's lower section.
Figure 1

Schematic of solar water heater/water desalination combination device.

Figure 1

Schematic of solar water heater/water desalination combination device.

Close modal

The solar energy is transferred from the collectors to the water in the tank via a heat exchanger. The control system is configured to activate the solar pump in the event that it detects a potential increase in tank temperature caused by solar collectors, as determined by temperature measurements of the collector's surface and the interior of the tank. d) Flows 5 and 6 in Figure 1, which illustrate the internal fluid circulation as the tank temperature rose to 70 °C, the water desalination commenced operation in response to the control system's instruction. Additionally, the humidifying pump associated with water circulation in the polymer was activated via a control valve. Comparing and contrasting cold water flows within the compressor as well.

The salt water at the outlet of the compressor experiences a temperature increase of up to 60 °C as a result of the heat transfer capability of the compressor and the inherent airflow within the water desalination. The volume of water in the tank is supplemented with preheated water from the compressor; this water is then utilized as sanitary hot water both during the day and at night. A design has been developed to ensure that the quantity of hot water consumed is synchronized with the intensity of the incoming cold water flow, thereby preventing water waste in the device. Similary to the stream number 4, the polymer emits hot water with a temperature ranging from 55 to 60 °C; it enters the hot water tank after exiting the humidification section.

Artificial neural network

To evaluate the performance of the solar desalination system within a net-zero energy consumption building, a classic ANN model is employed as a predictive tool. The ANN model is chosen for its ability to capture complex nonlinear relationships within the input parameters solar intensity, ambient temperature, inlet water flow, and inlet water temperature and predict the corresponding outputs, namely, the production of fresh water and vapor temperatures.

Before training the ANN model, the input data undergo thorough preprocessing to ensure uniformity and effectiveness (de Oliveira et al. 2023; Ghasemi et al. 2023). This includes normalization of the input features to a standardized scale, preventing dominance by certain variables. The target outputs, representing fresh water production and vapor temperatures, are also scaled accordingly. This preprocessing step is crucial for enhancing the convergence and stability of the neural network during training (Samadi et al. 2021).

The architecture of the ANN model is designed based on the complexity of the problem and the nature of the input–output relationships (Nourani et al. 2019a). The input layer comprises neurons corresponding to the four input parameters: solar intensity, ambient temperature, inlet water flow, and inlet water temperature. The number of neurons in the hidden layers is determined through iterative experimentation to achieve optimal performance. The output layer consists of two neurons, corresponding to the predicted fresh water production and vapor temperatures (Figure 2). Number of hidden layers determined through experimentation for optimal performance and number of neurons in each hidden layer are selected based on iterative testing.
Figure 2

ANNs topology schemes with four input data and two output data.

Figure 2

ANNs topology schemes with four input data and two output data.

Close modal
In neural networks, the sigmoid (logistic) activation function, which is defined as Equation (1), is widely applied. The exponential function is utilized in its formulation, which restricts the output values to the range of 0 to 1. The function approximates 1 as the input x approaches positive infinity, and 0 as x approaches negative infinity, in an arithmetic progression. The sigmoid function is ideally suited for binary classification problems and as an activation function in the hidden layers of neural networks due to its smooth gradient and squashing behavior (Kumar &Singh Sodhi 2023):
(1)
Equation (2) represents the hyperbolic tangent (tanh) activation function, which resembles the sigmoid but produces values between −1 and 1. It produces smooth gradients and compresses input values, similar to the sigmoid. The primary differentiation resides in the range of outputs. In situations where it is advantageous for optimization processes to keep the mean of the activations near zero, the tanh function is frequently favored due to its zero-centered nature. The tanh function is frequently utilized in hidden layers due to its superior performance in dynamics learning when compared to the sigmoid (Ankalaki & Thippeswamy 2023):
(2)

To introduce nonlinearity into the model, rectified linear units (ReLU) are chosen as the activation function for the hidden layers. ReLU is well-suited for capturing complex relationships and preventing the vanishing gradient problem. For the output layer, linear activation functions are employed as they facilitate direct regression predictions, aligning with the continuous nature of the output variables (Equation (3)):

(3)
Forward propagation computes the activation of each neuron in the hidden layers and output layer using the ReLU and linear activation functions, respectively (Equation (4)):
(4)
where l represents the layer index, is the activation of the jth neuron in layer l, is the weight connecting the ith neuron in layer l − 1 to the jth neuron in layer l. is the activation of the ith neuron in layer l − 1, is the bias term for the jth neuron in layer l.
The backpropagation algorithm is utilized for training the ANN model. During the training process, the model learns the weights and biases that minimize the difference between the predicted outputs and the actual values (Equation (5)):
(5)
where θ represents weights or biases, t denotes the iteration, α is the learning rate and is the gradient of the loss with respect to θ. It is Iterated through the dataset stage for multiple epochs, adjusting weights and biases to minimize the loss function in training (El Jaafari et al. 2021).

Imperialist competitive algorithm

ICA is a nature-inspired optimization algorithm that draws inspiration from socio-political concepts. In this algorithm, a population of solutions is categorized into imperialists and colonies, mirroring the hierarchical structure of societies. The main objective is to find optimal solutions through a process of assimilation, where weaker entities strive to improve by aligning with stronger ones, and revolution, introducing randomness to prevent premature convergence (Khalilnejad et al. 2018; Jaafari et al. 2019; Manmohan & Shalij 2022).

The algorithm begins by generating an initial population P of solutions, each represented as a vector in the decision space. A fitness function F(xi) is then employed to assess the quality of each solution, serving as a guiding metric for the subsequent competitive dynamics. The top M solutions are designated as imperialists, while the rest become colonies.

Assimilation is a pivotal process in ICA, embodying the collaborative nature of the algorithm. The assimilation probability for each colony toward each imperialist is determined based on their fitness values (Equation (6)). This probability influences the updating of the colony's position towards its corresponding imperialist (Equation (7)). The assimilation process thus allows the weaker solutions to benefit from the influence of stronger ones:
(6)
(7)
where j iterates over imperialists. is the position of the corresponding imperialist, and is a random parameter in the range .
To inject diversity and prevent premature convergence, a revolution process is introduced. Random perturbations are added to the positions of colonies, represented by (Equation (8)). This stochastic element ensures exploration of the search space, aiding the algorithm in escaping local optima:
(8)
where α is a random perturbation factor. Imperialistic competition is a fundamental aspect wherein the fitness of newly assimilated colonies is compared to existing imperialists. If a colony outperforms its current imperialist, it becomes a new imperialist, thereby simulating a competitive environment that facilitates the emergence of stronger solutions.

The algorithm iteratively refines the positions of imperialists and colonies based on assimilation, revolution, and competition outcomes. This dynamic interplay continues until a termination criterion is met, such as a predefined number of iterations or the attainment of a specific fitness threshold (Lei et al. 2019).

ICA and ANN integrated model

To enhance the performance and optimization capabilities of the solar desalination system, an integrated model is proposed, combining the strengths of the ANN and the Imperialist ICA. This hybrid model aims to leverage the learning capabilities of the ANN for predictive modeling while harnessing the competitive dynamics of the ICA for refining the parameters of the solar desalination system (Gao et al. 2020).

The integrated approach begins with the initialization of the ANN model, comprising an input layer representing solar intensity, ambient temperature, inlet water flow, and inlet water temperature. Hidden layers with ReLU activation functions and an output layer with linear activation functions are structured to predict fresh water production and vapor temperatures. The ANN model is trained using the backpropagation algorithm, iteratively updating weights and biases to minimize the error between predicted and actual values.

Simultaneously, the ICA is employed to optimize the parameters of the solar desalination system. The decision variables, analogous to the positions of imperialists and colonies in ICA, are adjusted through the assimilation process. The assimilation probability for each colony toward each imperialist is determined based on the fitness values of the colonies. The position of each assimilating colony is updated, incorporating the influence of the corresponding imperialist. Random perturbations are introduced through the revolution process to maintain diversity and prevent premature convergence. The hybridization of the ANN and ICA involves an iterative process where the ANN's predictions guide the assimilation dynamics of the ICA. The fitness values of the solutions, driven by the ANN's performance, influence the assimilation probabilities and subsequent updates to the decision variables. This collaborative approach aims to capitalize on the learning capacity of the ANN while utilizing the ICA's optimization prowess.

Emotional artificial neural network

The EANN represents a significant advancement in the field of artificial neural networks (ANN), as it enables neurons to generate agents that possess the ability to modify cognitive, emotional, and executive functions when necessary (Sharghi et al. 2018; Molajou et al. 2021). In further clarification, EANN models represent advancements in the field of ANN models through the incorporation of a synthetic sensing unit that can secrete hormones to regulate the functions of nodes (nuclei). Furthermore, it is possible to dynamically modify the hormone weights in EANN models in accordance with the input and output values of the nodes (Sharghi et al. 2019). One significant benefit of this model is its efficacy in addressing research challenges that involve restricted data accessibility (Nourani et al. 2019b).

The principal objective of the EANN under consideration is to develop an optimal neural network that minimizes computational complexity, thereby enabling the understanding of complex and nonlinear systems.

The effectiveness of the system is substantially impacted by the accuracy of this model. Nevertheless, it is imperative to consider the equilibrium between precision and computational burden. Elevated levels of precision frequently necessitate augmented computational effort and intricacy (Prakash & Srinivasan 2009). Despite the intrinsic nonlinearity of real systems, linear models are frequently utilized to circumvent this.

For plants with inaccessible equations, the evaluation based on input and output data becomes essential, bypassing the need for an in-depth understanding of the internal plant structure. Among the various techniques available, the neural network model for each output is detailed in the following equation:
(9)
Equation (3) demonstrates a computational complexity of O(m × n) in terms of complexity, as a result of the incorporation of a concealed layer. In this context, N signifies the quantity of inputs, and m denotes the quantity of neurons in the hidden layer. Inputs to neural networks consist of both current and historical data, in addition to historical outputs. Feedback transmission takes place between input and output units within every hidden node of the EANN, as depicted in Figure 3. The hormones Ha, Hb, and Hc are actively secreted by these nodes; the parameters of these hormones are modified in the training phase of the model according to the input and output values.
Figure 3

The process of an EANN node model (Sharghi et al. 2018).

Figure 3

The process of an EANN node model (Sharghi et al. 2018).

Close modal

Throughout the training process, hormonal constants exert influence on other nodal units. In this specific EANN configuration, the output of the ith node, housing the three hormones Ha, Hb, and Hc, is calculated as per the following equations:

(10)
(11)

The glandularity factor must therefore be calibrated throughout the EANN's training phase. This calibration guarantees that the glands are supplied with an ideal quantity of hormones. It is possible to implement schemes that activate Hh hormone values by employing input samples such as the training dataset's average input values. Following this, hormone values are revised by the learning process in accordance with the output network and the correlations delineated in Equations (4) and (5). The purpose of this iterative procedure is to attain an appropriate correspondence between the goals of the time series and the EANN model.

Backpropagation, which is fundamental to supervised learning in ANNs, modifies the network's parameters in a methodical fashion to enhance performance. The algorithm consists of two passes. One forward and one backward. During the forward pass, the network's layers process the input data X, and predictions Y are generated by calculating the weighted sums. The error or loss L is subsequently calculated through a comparison between the actual target values and the predictions. The fundamental concept underlying backpropagation is the subsequent backward pass, during which the chain rule of calculus is employed to compute the gradient of the loss with respect to the network's parameters. The update procedure for a weight w in the network is as given in the following equation:
(12)

Here, α represents the learning rate, regulating the step size of the parameter updates. The partial derivative signifies the rate of change of the loss with respect to the weight w, guiding the network to adjust its parameters in the direction that minimizes the error. This iterative process is reiterated until the network converges to a state where the loss is minimized, and the model generalizes well to unseen data.

Model evaluation

The machine learning models are evaluated using a separate validation dataset not utilized during the training phase. Performance metrics such as mean squared error (MSE), and coefficient of determination (R2) are employed to assess the accuracy of the model in predicting fresh water production and vapor temperatures (Equations (13) and (14)). In addition, the model's generalization capability is tested on an independent testing dataset to ensure its applicability to unseen data:
(13)
(14)
where is the true value, and is the predicted value.

ANN results

The error curve during the training phase of the optimal network for the ANN model's evaluation, testing, and training phases is depicted in Figure 4. The mean square error network error for the training, evaluation, and testing patterns, respectively, is 0.0011, 0.0013, and 0.0037 for this topology. Within 0.50 s and 12 iterations, this network converges. According to regression analysis, the explanation coefficients for teaching, evaluation, and testing patterns are 0.9989, 0.9630, and 0.9862, respectively.
Figure 4

MSE index for ANN model.

Figure 4

MSE index for ANN model.

Close modal

The outcomes of utilizing ANN with various algorithms and threshold functions (Table 1) indicate that the network with the most accurate prediction of temperature and water vapor production has the 4–16–2 structure. This architecture demonstrates that the middle layer of the network consists of a solitary layer and 16 neurons. As the number of intermediate layers increased, there was little discernible change in the error rate during network training; in fact, in many instances, the error rate even increased. Furthermore, the outcomes of utilizing various activity functions demonstrated that the backpropagation learning algorithm in conjunction with the ReLU activity function could generate accurate predictions.

Table 1

Coefficients and statistical indicators of ANN by using various algorithms and threshold functions

Activation functionNeuron hidden 1Neuron hidden 2R2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 0.9891 0.9653 0.9646 0.0427 0.1395 0.4596 24 
Logarithm 10 0.9885 0.9776 0.9689 0.0170 0.0827 0.2701 14 2.36 
Logarithm 20 0.9898 0.9899 0.9889 0.0011 0.0027 0.0034 10 0.45 
Logarithm 30 0.9795 0.9693 0.9739 0.0020 0.2371 0.2411 15 2.75 
Logarithm, tangent 20 10 0.9789 0.9781 0.9795 0.0021 0.0056 0.0020 14 2.25 
Logarithm, tangent 10 0.9693 0.9566 0.9658 0.0019 0.0461 0.0351 12 1.98 
ReLU 10 0.8889 0.9230 0.8762 0.2160 0.0113 0.0337 14 1.95 
ReLU 10 0.8845 0.8789 0.8769 0.0431 0.0597 0.0155 17 2.12 
ReLU 12 0.8611 0.8953 0.8946 0.0240 0.0413 0.0267 19 2.24 
ReLU 16 0.9989 0.9630 0.9862 0.0011 0.0013 0.0037 12 1.87 
Activation functionNeuron hidden 1Neuron hidden 2R2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 0.9891 0.9653 0.9646 0.0427 0.1395 0.4596 24 
Logarithm 10 0.9885 0.9776 0.9689 0.0170 0.0827 0.2701 14 2.36 
Logarithm 20 0.9898 0.9899 0.9889 0.0011 0.0027 0.0034 10 0.45 
Logarithm 30 0.9795 0.9693 0.9739 0.0020 0.2371 0.2411 15 2.75 
Logarithm, tangent 20 10 0.9789 0.9781 0.9795 0.0021 0.0056 0.0020 14 2.25 
Logarithm, tangent 10 0.9693 0.9566 0.9658 0.0019 0.0461 0.0351 12 1.98 
ReLU 10 0.8889 0.9230 0.8762 0.2160 0.0113 0.0337 14 1.95 
ReLU 10 0.8845 0.8789 0.8769 0.0431 0.0597 0.0155 17 2.12 
ReLU 12 0.8611 0.8953 0.8946 0.0240 0.0413 0.0267 19 2.24 
ReLU 16 0.9989 0.9630 0.9862 0.0011 0.0013 0.0037 12 1.87 

As illustrated in Figure 5(a), the actual data for the quantity of water produced and the temperature of water vapor are more consistent with the forecast data. An analysis of Figure 5 reveals that both the practical and predicted data exhibit a high degree of accuracy in proximity to the 45° line. This observation underscores the remarkable predictive capability of neural networks with respect to the data pertaining to water vapor temperature and freshwater production. Additionally, the gradient descent changes over time in the optimal network with 4–16–2 topology are illustrated in Figure 5(b). It gradually approaches its minimum value as time progresses, at which point the network converges to the intended topology.
Figure 5

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using ANN.

Figure 5

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using ANN.

Close modal

ANN-ICA results

The ANN-ICA model outcomes are displayed in Table 2. This model exhibits superior performance to the classic ANN model. Consequently, the R2 index values for the training, testing, and validation phases of this model are 0.9735, 0.9683, and 0.9851, respectively. Figure 6 illustrates the error curve that occurs during the training phase of the optimal network utilized in the evaluation, testing, and training phases of the ANN model.
Table 2

Coefficients and statistical indicators of ANN-ICA by using various algorithms and threshold functions

Activation functionNeuron hidden 1Neuron hidden 2R2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 10 0.9139 0.9532 0.7786 0.0183 0.0451 0.0474 89 8.0 
Logarithm 20 0.9200 0.8977 0.8840 0.0455 0.0559 0.0526 69 8.1 
Logarithm 35 0.9001 0.9430 0.8564 0.0270 0.0385 0.0337 99 8.2 
Logarithm 10 0.9328 0.9319 0.8871 0.0306 0.0553 0.0805 89 8.9 
Logarithm, tangent 20 15 0.8825 0.8495 0.9022 0.0372 0.0343 0.0421 86 8.6 
Logarithm, tangent 15 10 0.8882 0.8801 0.8050 0.0417 0.0533 0.0484 78 8.1 
ReLU 20 0.9535 0.9594 0.9716 0.0008 0.0004 0.0039 76 7.5 
ReLU 10 0.9701 0.9453 0.9108 0.0021 0.0345 0.0021 64 8.3 
ReLU 15 0.8017 0.7547 0.6875 0.0355 0.0658 0.0938 75 8.8 
ReLU 10 0.9735 0.9683 0.9851 0.0073 0.0041 0.0019 97 7.8 
Activation functionNeuron hidden 1Neuron hidden 2R2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 10 0.9139 0.9532 0.7786 0.0183 0.0451 0.0474 89 8.0 
Logarithm 20 0.9200 0.8977 0.8840 0.0455 0.0559 0.0526 69 8.1 
Logarithm 35 0.9001 0.9430 0.8564 0.0270 0.0385 0.0337 99 8.2 
Logarithm 10 0.9328 0.9319 0.8871 0.0306 0.0553 0.0805 89 8.9 
Logarithm, tangent 20 15 0.8825 0.8495 0.9022 0.0372 0.0343 0.0421 86 8.6 
Logarithm, tangent 15 10 0.8882 0.8801 0.8050 0.0417 0.0533 0.0484 78 8.1 
ReLU 20 0.9535 0.9594 0.9716 0.0008 0.0004 0.0039 76 7.5 
ReLU 10 0.9701 0.9453 0.9108 0.0021 0.0345 0.0021 64 8.3 
ReLU 15 0.8017 0.7547 0.6875 0.0355 0.0658 0.0938 75 8.8 
ReLU 10 0.9735 0.9683 0.9851 0.0073 0.0041 0.0019 97 7.8 
Figure 6

MSE index for ANN-ICA model.

Figure 6

MSE index for ANN-ICA model.

Close modal
The temporal correspondence between the predicted and observed values for the quantity of water produced and the temperature of water vapor is enhanced, as depicted in Figure 7(a). Upon examination of Figure 7, it becomes evident that the practical and predicted data demonstrate a considerable level of precision in relation to the 45° line. This observation highlights the exceptional prognostic capacity of neural networks in relation to the data concerning the temperature of water vapor and the production of freshwater.
Figure 7

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using ANN-ICA.

Figure 7

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using ANN-ICA.

Close modal

EANN results

Based on the error curve it is possible to achieve the most favorable outcomes in terms of fresh water production and water vapor temperature across all three phases of training, evaluation, and testing (Figure 8). The MSE for the training, validation, and test stage is 0.0345, 0.0124, and 0.0347, respectively. In 1.8 s, this network converges after 10 iterations. The results of the regression analysis indicate that the R2 for training, validation, and testing phase are 0.9899, 0.9811, and 0.9724, respectively.
Figure 8

MSE index for EANN model.

Figure 8

MSE index for EANN model.

Close modal
Based on the data presented in Table 3, it is evident that dynamic ANN models were chosen for this study. This is because the input delay of the output signal enhances the learning capacity of the network, surpassing that of the optimized hybrid model and ANN models during both the training and evaluation phases. Predictions hold an advantage. The outcomes of implementing various algorithms and threshold functions in the EANN model for the return network are presented in Table 3, correspondingly. Through a comparative analysis of the convergence times of networks constructed using various algorithms, it is possible to deduce that the ReLU algorithm facilitated rapid convergence for the networks, whereas the graded mixed gradient learning algorithm imposed a prolonged convergence time. Figure 9 displays the correlation between predicted and observed results. This figure demonstrates that the EANN model effectively predicts fresh water production and water vapor temperature.
Table 3

Coefficients and statistical indicators of EANN by using various algorithms and threshold functions

Activation functionR2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 0.9655 0.9724 0.9457 0.0452 0.0242 0.1322 34 
Logarithm, tangent 0.9768 0.9702 0.9628 0.0314 0.0941 0.0989 81 
ReLU 0.9899 0.9811 0.9724 0.0345 0.0124 0.0347 46 
Activation functionR2 trainingR2 validationR2 testR2 trainingR2 validationR2 testEpochTime
Logarithm 0.9655 0.9724 0.9457 0.0452 0.0242 0.1322 34 
Logarithm, tangent 0.9768 0.9702 0.9628 0.0314 0.0941 0.0989 81 
ReLU 0.9899 0.9811 0.9724 0.0345 0.0124 0.0347 46 
Figure 9

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using EANN.

Figure 9

A comparison between measured and predicted data: (a) fresh water production and (b) vapor temperatures using EANN.

Close modal

Results comparison

The results of the machine learning model show that the EANN model has higher accuracy in predicting fresh water production and water vapor temperature compared to traditional ANN and ANN-ICA. The EANN model shows better predictive ability than the ANN and ANN-ICA models for water vapor temperature and fresh water production in solar water desalination plants. The ANN-ICA model shows quicker convergence and modeling execution compared to other models. This characteristic indicates the model's excellence in the specific aspect of modeling time. Based on the results obtained and the features of the EANN model, it can be inferred that these networks have a significant ability to replicate complex and nonlinear processes, such as heat and mass transfer operations in desalination for producing drinkable water. The findings indicate that learning models can accurately depict complex and varied conditions, including ambient temperature, radiation intensity, and other atmospheric factors that affect the functioning of desalination systems. Machine tools are efficient instruments that can replicate these processes inexpensively and quickly. This research's findings align with those presented in the studies carried out by Nazghelichi et al. (2011) and Hamdan et al. (2014).

Environmental evaluations

In light of the concurrent production of two commodities, hot water and potable water, this strategy ought to be evaluated in comparison to alternative approaches. The current and established processes utilized in the manufacturing of these two products require substantial consumption of fossil fuels or electricity equivalents. The application of household membrane water desalinations is restricted to brackish water with total dissolved solids (TDS) greater than 2,000 ppm. This occurs when, according to the test results, the salinity of the incoming water into the solar combination device is not restricted. The quality of the water produced by the desalination is among its most influential functional parameters. The investigation involved the sampling and chemical analysis of both incoming and outgoing water in order to assess the device's performance in water desalination.

Based on the findings, a greater quantity of water salts were captured and observed as a result of the evaporation process and water concentration; the inlet water contained a TDS concentration exceeding 6,000 ppm, whereas the outlet water contained less than 50 ppm TDS. Conversely, to heat 300 L of water to 60 °C using a gas water heater or boiler (with an average efficiency of 80%), approximately 60 MJ of energy is required. In addition to producing 1 L of gasoline, more than 2 m3 of gas are required; 4.2 kg of carbon dioxide are produced when gasoline vehicles are burned, while the combustion of one million cubic feet (28,300 m3) of natural gas results in the emission of 3.60 tons of carbon dioxide. On this basis, wood is required to provide hot water. Using the fuel specified, a residential unit can generate 2.4 kg of carbon dioxide on a daily basis. Approximately 0.56 kg of carbon dioxide is generated as a result of the electricity utilized by this device. The amount will also be reduced to zero if photovoltaic panels are utilized during the day, when it is extremely hot. As a result, the quantity of environmentally detrimental gases emitted by this design is negligible and can be disregarded.

With the increased volume of salt water entering the device being utilized as sanitary hot water, this will result in the conservation of additional water resources in the field of produced wastewater (Ma et al. 2023; Madelatparvar et al. 2023), due to the fact that conventional water desalination apparatuses release the majority of the incoming water as wastewater. With regard to the quantity of saline water released into the environment, it is possible to assert that no saline water enters the environment. A minimal quantity of generated hot water will be discharged locally and in conjunction with the sewage from the building, exclusively on specific days when the amount of sunlight is optimal or when hot water consumption is low. However, depending on the intended use, it may be possible to conserve this water for future use. Consequently, this design exhibits environmental compatibility and has the potential to facilitate the proliferation of renewable energy sources and the construction of structures that consume zero energy.

Examining the solar desalination system integrated into a net-zero energy consumption building, this research endeavor is situated at the critical juncture of solar energy utilization and desalination techniques. By employing a range of machine learning models including classic ANN, hybrid ANN-ICA models, and EANN, the performance of the system can be evaluated and optimized in a novel and innovative manner.

The methodology section provides a comprehensive account of the formulation and execution of the machine learning models. The classic ANN functions as a predictive instrument by identifying intricate connections among input parameters. Concurrently, the ICA implements an optimization strategy inspired by nature, which promotes competitive dynamics in order to enhance system parameters. By integrating ANN and ICA, the integrated model presents an innovative and comprehensive methodology that leverages the learning capabilities of ANN for predictive modeling and the competitive dynamics of ICA for optimization.

In addition, an innovative paradigm is introduced by the EANN, which permits neurons to modify their cognitive, emotional, and executive functions. The research effectively utilizes the EANN model, which is renowned for its resilient performance in hydrological investigations, to tackle the obstacles posed by the scarcity of data.

Model evaluation metrics, including MSE, and R2, provide a quantitative assessment of the models' accuracy in predicting crucial parameters. The results indicate that the integrated ANN-ICA model outperforms the classic ANN, displaying superior accuracy and convergence rates. The EANN emerges as the most accurate in predicting freshwater production and vapor temperatures, demonstrating its efficacy in handling studies characterized by limited data availability. In the ANN optimal model, MSE for training, validation, and testing are 0.0011, 0.0013, and 0.0037, with R2 of 0.9989, 0.9630, and 0.9862, respectively. In the ANN-ICA optimal model, R2 index for the training, testing, and validation phases of this model is 0.9735, 0.9683, and 0.9851, respectively. However, for the EANN model MSE for the training, validation, and test stage is 0.0345, 0.0124, and 0.0347, respectively. Meanwhile, R2 for training, validation, and testing phase are 0.9899, 0.9811, and 0.9724, respectively.

The comprehensive comparative analysis extends beyond model evaluation, encompassing environmental assessments. The solar desalination system, concurrently producing hot water and potable water, proves to be environmentally compatible, offering advantages over traditional processes involving substantial energy consumption. The study evaluates the concurrent production of hot water and potable water in comparison to alternative approaches, highlighting the substantial energy consumption in current processes. The investigation focuses on household membrane water desalination, restricted to brackish water with a TDS greater than 2,000 ppm. Chemical analysis reveals a significant reduction in TDS concentration from the inlet water (6,000 ppm) to the outlet water (less than 50 ppm), showcasing the device's desalination performance. Additionally, the design proves environmentally compatible, conserving water resources and minimizing detrimental gas emissions, fostering the proliferation of renewable energy sources and energy-efficient structures. The environmentally friendly nature of the proposed solar desalination system aligns with the growing importance of sustainable and energy-efficient solutions in the face of global water crises.

The authors would like to acknowledge the support of the Deputy for Research and In-novation – Ministry of Education, Kingdom of Saudi Arabia for this research through a grant (NU/IFC/2/SERC/-/14) under the Institutional Funding Committee at Najran University, Kingdom of Saudi Arabia

All relevant data are included in the paper or its Supplementary Information.

The authors declare there is no conflict.

Ankalaki
S.
&
Thippeswamy
M. N.
2023
A novel optimized parametric hyperbolic tangent swish activation function for 1D-CNN: Application of sensor-based human activity recognition and anomaly detection
.
Multimedia Tools and Applications
1
31
. https://doi.org/10.1007/s11042-023-15766-3.
Chen
T. C.
,
Najat Rashid
Z.
,
Theruvil Sayed
B.
,
Sari
A.
,
Kateb Jumaah Al-Nussairi
A.
,
Samiee-Zenoozian
M.
&
Shokatian-Beiragh
M.
2023
Evaluation of hybrid soft computing model's performance in estimating wave height (M. Najafzadeh, ed.)
.
Advances in Civil Engineering
2023
,
1
13
. https://www.hindawi.com/journals/ace/2023/8272566/.
de Oliveira
R. S.
,
de Oliveira
M. J. L.
,
Nascimento
E. G. S.
,
Sampaio
R.
,
Nascimento Filho
A. S.
&
Saba
H.
2023
Renewable energy generation technologies for decarbonizing urban vertical buildings: A path towards net zero
.
Sustainability
15
(
17
),
13030
. https://www.mdpi.com/2071-1050/15/17/13030.
Djellabi
R.
,
Noureen
L.
,
Dao
V.-D.
,
Meroni
D.
,
Falletta
E.
,
Dionysiou
D. D.
&
Bianchi
C. L.
2022
Recent advances and challenges of emerging solar-driven steam and the contribution of photocatalytic effect
.
Chemical Engineering Journal
431
,
134024
.
Duan
L.
,
Walter
D.
,
Chang
N.
,
Bullock
J.
,
Kang
D.
,
Phang
S. P.
,
Weber
K.
,
White
T.
,
Macdonald
D.
,
Catchpole
K.
&
Shen
H.
2023
Stability challenges for the commercialization of perovskite–silicon tandem solar cells
.
Nature Reviews Materials
8
(
4
),
261
281
.
El Jaafari
I.
,
Ellahyani
A.
&
Charfi
S.
2021
Rectified non-linear unit for convolution neural network
.
Journal of Physics: Conference Series
1743
(
1
),
012014
.
Emad Azhar Ali
S.
,
Sajjad Hussain Rizvi
S.
,
Lai
F.-W.
,
Faizan Ali
R.
&
Ali Jan
A.
(
2021
)
Predicting delinquency on mortgage loans: An exhaustive parametric comparison of machine learning techniques
.
International Journal of Industrial Engineering and Management
12
(
1
),
1
13
.
Gao
W.
,
Raftari
M.
,
Rashid
A. S. A.
,
Mu'azu
M. A.
&
Jusoh
W. A. W.
2020
A predictive model based on an optimized ANN combined with ICA for predicting the stability of slopes
.
Engineering with Computers
36
(
1
),
325
344
.
Ghasemi
M.
,
Samadi
M.
,
Soleimanian
E.
&
Chau
K.-W.
2023
A comparative study of black-box and white-box data-driven methods to predict landfill leachate permeability
.
Environmental Monitoring and Assessment
195
(
7
),
862
.
Hamdan
M. A.
,
Khalil
R. A. H.
&
Abdelhafez
E. A. M.
2014
Comparison of neural network models in the estimation of the performance of solar still under Jordanian climate
.
Journal of Clean Energy Technologies
1
(
3
),
238
242
.
Hammoodi
K. A.
,
Dhahad
H. A.
,
Alawee
W. H.
&
Omara
Z. M.
2023
A detailed review of the factors impacting pyramid type solar still performance
.
Alexandria Engineering Journal
66
,
123
154
.
Hassan
Q.
,
Viktor
P.
,
Al-Musawi
T. J.
,
Mahmood Ali
B.
,
Algburi
S.
,
Alzoubi
H. M.
,
Khudhair Al-Jiboory
A.
,
Zuhair Sameen
A.
,
Salman
H. M.
&
Jaszczur
M.
2024
The renewable energy role in the global energy transformations
.
Renewable Energy Focus
48
,
100545
. https://linkinghub.elsevier.com/retrieve/pii/S1755008424000097.
Jaafari
A.
,
Zenner
E. K.
,
Panahi
M.
&
Shahabi
H.
2019
Hybrid artificial intelligence models based on a neuro-fuzzy system and metaheuristic optimization algorithms for spatial prediction of wildfire probability
.
Agricultural and Forest Meteorology
266–267
,
198
207
.
Khalilnejad
A.
,
Sundararajan
A.
&
And Sarwat
A. I.
2018
Optimal design of hybrid wind/photovoltaic electrolyzer for maximum hydrogen production using imperialist competitive algorithm
.
Journal of Modern Power Systems and Clean Energy
6
(
1
),
40
49
.
Kumar
A.
&
Singh Sodhi
S.
2023
Classification of data on stacked autoencoder using modified sigmoid activation function
.
Journal of Intelligent & Fuzzy Systems
44
(
1
),
1
18
.
Kumar
R.
,
Pandey
A. K.
,
Samykano
M.
,
Aljafari
B.
,
Ma
Z.
,
Bhattacharyya
S.
,
Goel
V.
,
Ali
I.
,
Kothari
R.
&
Tyagi
V. V.
2022
Phase change materials integrated solar desalination system: An innovative approach for sustainable and clean water production and storage
.
Renewable and Sustainable Energy Reviews
165
,
112611
.
Li
J.
,
Deng
Y.
,
Xu
W.
,
Zhao
R.
,
Chen
T.
,
Wang
M.
,
Xu
E.
,
Zhou
J.
,
Wang
W.
&
Liu
D.
2023
Multiscale modeling of food thermal processing for insight, comprehension, and utilization of heat and mass transfer: A state-of-the-art review
.
Trends in Food Science & Technology
131
,
31
45
.
Ma
M.
,
Tam
V. W. Y.
,
Le
K. N.
,
Butera
A.
,
Li
W.
&
Wang
X.
2023
Comparative analysis on international construction and demolition waste management policies and laws for policy makers in China
.
Journal of Civil Engineering and Management
29
(
2
),
107
130
.
Madelatparvar
M.
,
Hosseini
M. S.
&
Zhang
C.
2023
Polyurea micro-/nano-capsule applications in construction industry: A review
.
Nanotechnology Reviews
12
(
1
).
https://doi.org/10.1515/ntrev-2022-0516
.
Manmohan
C. M.
&
Shalij
P. R.
2022
Optimal prediction of manufacturing parameters for integration of lean and sustainability with QMS in SMES
.
Arabian Journal for Science and Engineering
47
(
12
),
15865
15873
.
Misbah Inayat
S.
,
Rafay Zaidi
S. M.
,
Ahmed
H.
,
Ahmed
D.
,
Kausar Azam
M.
&
Ahmad Arfeen
Z.
2023
Risk assessment and mitigation strategy of large-scale solar photovoltaic systems in Pakistan
.
International Journal of Industrial Engineering and Management
14
(
2
),
105
121
.
Mohamed
A. S. A.
,
Ahmed
M. S.
,
Maghrabie
H. M.
&
Shahdy
A. G.
2021
Desalination process using humidification–dehumidification technique: A detailed review
.
International Journal of Energy Research
45
(
3
),
3698
3749
.
Molajou
A.
,
Nourani
V.
,
Afshar
A.
,
Khosravi
M.
&
Brysiewicz
A.
2021
Optimal design and feature selection by genetic algorithm for emotional artificial neural network (EANN) in rainfall-runoff modeling
.
Water Resources Management
35
(
8
),
2369
2384
.
Nazghelichi
T.
,
Kianmehr
M. H.
&
Aghbashlo
M.
2011
Prediction of carrot cubes drying kinetics during fluidized bed drying by artificial neural network
.
Journal of Food Science and Technology
48
(
5
),
542
550
.
Nejatian
N.
,
Abbaspour
M.
,
Javidan
P.
,
Nia
M. Y.
,
Shacheri
F.
,
Azizi
H.
,
Nia
M. Y.
,
Pazoki
A.
,
Pazoki
M.
,
Amiri
M. J.
&
Abbasi
S.
2023
Evaluation of the vulnerability and pathways of groundwater pollution in the Zanjanrud river basin by an integrated modeling approach
.
Modeling Earth Systems and Environment
10
,
2295
2308
. https://link.springer.com/10.1007/s40808-023-01897-x.
Nourani
V.
,
Davanlou Tajbakhsh
A.
,
Molajou
A.
&
Gokcekus
H.
2019a
Hybrid wavelet-M5 model tree for rainfall-runoff modeling
.
Journal of Hydrologic Engineering
24
(
5
),
04019012
.
Nourani
V.
,
Molajou
A.
,
Uzelaltinbulat
S.
&
Sadikoglu
F.
2019b
Emotional artificial neural networks (EANNs) for multi-step ahead prediction of monthly precipitation; case study: Northern Cyprus
.
Theoretical and Applied Climatology
138
(
3–4
),
1419
1434
.
Prado de Nicolás
A.
,
Molina-García
A.
&
Vera-García
F.
2023
Performance evaluation and feasibility study of a cooling tower model for zero liquid discharge-desalination processes
.
Energy Conversion and Management
297
,
117673
.
Samadi
M.
,
Afshar
M. H.
,
Jabbari
E.
&
Sarkardeh
H.
2021
Prediction of current-induced scour depth around pile groups using MARS
.
CART, and ANN Approaches. Marine Georesources and Geotechnology
39
(
5
),
577
588
.
Sharghi
E.
,
Nourani
V.
,
Molajou
A.
&
Najafi
H.
2019
Conjunction of emotional ANN (EANN) and wavelet transform for rainfall-runoff modeling
.
Journal of Hydroinformatics
21
,
136
152
.
Siahaan
A. A.
&
Asrol
M.
2023
Development of a machine learning model for predicting hardness in the water treatment pharmaceutical industry
.
International Journal of Industrial Engineering and Management
14
(
2
),
138
146
.
Su
Y.
,
Liu
L.
,
Gao
X.
,
Yu
W.
,
Hong
Y.
&
Liu
C.
2023
A high-efficient and salt-rejecting 2D film for photothermal evaporation
.
iScience
26
(
8
),
107347
.
Taner
T.
2015
Alternative energy of the future: A technical note of PEM fuel cell water management
.
Journal of Fundamentals of Renewable Energy and Applications
5
(
3
),
1
4
. https://www.omicsonline.com/open-access/alternative-energy-of-the-future-a-technical-note-of-pem-fuel-cell-watermanagement-.php?aid=52570.
Taner
T.
&
Dalkilic
A. S.
2019
A feasibility study of solar energy-techno economic analysis from Aksaray city, Turkey
.
Journal of Thermal Engineering
5
(
1
),
25
30
.
Wei
X.
,
Chammam
A.
,
Feng
J.
,
Alshammari
A.
,
Tehranian
K.
,
Innab
N.
,
Deebani
W.
&
Shutaywi
M.
2024
Power system monitoring for electrical disturbances in wide network using machine learning
.
Sustainable Computing: Informatics and Systems
42
,
100959
. https://linkinghub.elsevier.com/retrieve/pii/S2210537924000040.
Yaghoubi
D.
,
Dorodiyan
M.
&
Amin Adibi
M.
2022
Time-cost estimation probabilistic model using MCS in quantitative risk analysis in BOT renewable energy projects
.
International Journal of Industrial Engineering and Management
13
(
4
),
250
264
.
Yavari
F.
,
Salehi Neyshabouri
S. A.
,
Yazdi
J.
,
Molajou
A.
&
Brysiewicz
A.
2022
A novel framework for urban flood damage assessment
.
Water Resources Management
36
(
6
),
1991
2011
. https://link.springer.com/10.1007/s11269-022-03122-3.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).