Moisture Estimation in Cabinet Dryers with Thin-Layer Relationships Using a Genetic Algorithm and Neural Network

: Nowadays, industrial dryers are used instead of traditional methods for drying. When designing dryers suitable for controlling the process of drying and reaching a high-quality product, it is necessary to predict the gradual moisture loss during drying. Few studies have been conducted to compare thin-layer models and artiﬁcial neural network models on the kinetics of pistachio drying in a cabinet dryer. For this purpose, ten mathematical-experimental models with a neural network model based on the kinetic data of pistachio drying were studied. The data obtained was from a cabinet dryer evaluated at four temperatures of inlet air and di ﬀ erent air velocities. The pistachio seeds were placed in a thin layer on an aluminum sheet on a drying tray and weighed by a scale attached to the computer at di ﬀ erent times. In the neural network, data was divided into three parts: Educational (60%), validation (20%) and testing (20%). Finally, the best mathematical-experimental model using a genetic algorithm and the best neural network structure for predicting instantaneous moisture were selected based on the least squared error and the highest correlation coe ﬃ cient.


Introduction
During the past few years, some studies have focused on applying neural network models for different engineering applications [1,2]. As an example, Baghban et al. [3] used an artificial neural network (ANN) approach for predicting the heat transfer of coiled tube heat exchanger. Additionally, pulsating heat pipes' thermal resistance has been estimated by Ahmadi et al. [4] with the help of an ANN. In addition to these, some investigations have been done on evaluating the thermal performance of various applications with the help of neural networks [5][6][7][8]. Among these applications, artificial neural networks have been widely used in drying processes and other processes [9][10][11][12][13][14][15][16]. Farkas [17] focused on ANN modeling of heat and mass transfer in drying technology. As mentioned in the results, neural networks can be properly utilized in order to detect the moisture distribution in a fixed-bed

Study Procedure
Thin layer models were used to predict the instantaneous moisture content. Calculation of coefficients and a computer simulation of pistachio drying were used to optimize and control the relevant drying systems. In this research, the data were obtained from an experimental cabinet dryer at temperatures of 50 • C, 55 • C, and 60 • C, and air velocity of 0.75 m/s and 1.25 m/s. Before the experiment, the moisture content of pistachios was measured in the range of 37-36% (based on wet weight). During the drying process, the moisture dropped from 37% to 5%.

Designing an Artificial Neural Network to Predict Instantaneous Moisture
The purpose of this section is to predict the moisture content of pistachios during drying by taking into account three input parameters-the velocity of hot air temperature, temperature, and time, all using artificial neural networks. Hence, the multi-layer perceptron (MLP) networks with the learning algorithms of Leungberg-Marguerite were used to train the network. A neural network was designed with three input neurons (temperature, air velocity, and time) and a neuron output layer (moisture content). In this research, Matlab 7.12 software was used. Also, to increase the accuracy and speed of convergence, the artificial neural network, input and output data including inlet air temperature (T i ), contact time (t i ), inlet air velocity (v i ) and moisture content (M) were calculated in the form of a dimensionless unit in the range of (0-1).
M e and M i express the final moisture content and the initial moisture content, respectively. T n , t n and v n indicate the temperature, time, and the inlet air velocity in the dimensionless form. Table 1 presents the semi-experimental thin-layer drying equations. In each of the following forms, a prevalent thin layer model was examined.  Kassem (1998), [38] For all models, the model equation coefficients, the Mse and R values, as well as the regression line were evaluated. The Midilli thin-layer model has the best matching (lowest error, highest regression coefficient) compared to other models ( Figure 1).

Comparison of the Accuracy Associated with Different Models of Thin-Layer Drying
The comparison of the correlation coefficient (R 2 ) for ten thin-layer models is shown in Figures  2 and 3.

Comparison of the Accuracy Associated with Different Models of Thin-Layer Drying
The comparison of the correlation coefficient (R 2 ) for ten thin-layer models is shown in   Table 2.  Figure 2. Comparison of the sum-of-squared-errors for ten thin-layer models.
For the Midili model, the coefficients of the thin-layer equation for all experiments are presented in Table 2. As shown in Table 2, for the Page model at a specific air velocity with decreasing air temperature, the coefficient K increases at first, then decreases. Also, power n reduces then increases. Also, at a constant temperature, with decreasing air velocity, K increases and power n decreases.

Neural Network Modeling
There are recently growing interests in multi-layer networks in general [39,40]. To evaluate the performance of the multi-layer perceptron network, multi layers of different topologies with various neurons were used. In the first step, after learning the network, the mean squared error (MSE) of the network was calculated, and based on that, the most appropriate topology was selected. During the modeling, 60% of the data were randomly assigned as training data and the rest of them were taken as test data and validators. The setting parameters for the artificial neural network were chosen according to Table 3. The feed-forward back propagation network (FF-BP) with the LM (Levenberg-Marquardt) learning algorithm and tansig (hyperbolic tangent) as a transfer function for the hidden layer produced the least training error in comparison with other settings. In neural network modeling, mean squared error (MSE) was chosen as the objective function. By trial and error, the best topology was selected, and this topology has 9 neurons in hidden layer. That topology, for the test data, predicted the moisture content, while MSE was 0.0005, and regression coefficients of R = 0.996. The obtained results indicate the ability of the neural network as a tool for predicting changes in the content of moisture with the time that can be used in dry control systems [41,42]. In Table 3, the numerical values of the regulatory parameters of the neural network used in the modeling are presented. In the following, only the results of the best neural network topology are presented in the prediction of moisture content.  The evaluations of the actual data matching with the data obtained from the neural network were divided into three categories: Training 60%, validation 20%, and testing 20% (Figure 4). The value of the root-square errors and linear regression coefficients were calculated for each of the three groups ( Figure 5). In Figure 6, the predicted values by the neural networks were evaluated with the experimental results, and in Figure 6, the values of the correlation coefficient and the mean value of the errors were evaluated. One of the major issues with artificial neural networks is that the models are quite complicated. Overfitting is one of the biggest challenges that a machine learning engineer must combat. The most popular method to do so in practical applications is the so-called early stopping. For the aim of utilizing stopping method, the validation set, regardless of the testing set and the training data set, is needed for determining stopping criteria associated with the optimization algorithm. The learning algorithm in the ANN ends on the condition of increasing error for validation data, even though the learning keeps the decrease as a training data set. Whenever the calculated error associated with validation data augments and calculated for training data reduces, it is regarded as overfitting. In addition, the R 2 values of all three models are close to each other which proves no overfitting has occurred.   The evaluations of the actual data matching with the data obtained from the neural network were divided into three categories: Training 60%, validation 20%, and testing 20% (Figure 4). The value of the root-square errors and linear regression coefficients were calculated for each of the three groups ( Figure 5). In Figure 6    The evaluations of the actual data matching with the data obtained from the neural network were divided into three categories: Training 60%, validation 20%, and testing 20% (Figure 4). The value of the root-square errors and linear regression coefficients were calculated for each of the three groups ( Figure 5). In Figure 6, the predicted values by the neural networks were evaluated with the experimental results, and in Figure 6, the values of the correlation coefficient and the mean value of and the training data set, is needed for determining stopping criteria associated with the optimization algorithm. The learning algorithm in the ANN ends on the condition of increasing error for validation data, even though the learning keeps the decrease as a training data set. Whenever the calculated error associated with validation data augments and calculated for training data reduces, it is regarded as overfitting. In addition, the R 2 values of all three models are close to each other which proves no overfitting has occurred. According to Figure 7, the amount of the product moisture loss in 300 min for three temperatures of 50 • C, 55 • C, and 60 • C and two air velocities of 0.75 and 1.25 m/s is depicted. Convective heat transfer and mass transfer increased with increasing the temperature difference (∆T) and the convection coefficient (h). As shown in the figure above, mass transfer (the rate of moisture loss) was higher for higher air velocity, since the convection coefficient increased with rising the air velocity. Also in Figure 7, the rate of convective heat transfer increased with increasing air temperature for a constant air velocity. The material's final quality and increasing of the total energy demand are attributed to being unfavorable effects of higher velocity. The requirement of total energy and heat transfer throughout a constant drying rate period is increased by the higher air velocity. Therefore, drying with the conditions of exceedingly high air velocity and temperature is not recommended. The drying rate and moisture content reduced sharply. According to drying curves at various temperatures, drying happens in the declining-rate period, since a consistent-rate period in the drying does not exist. It was noted that the drying process was accelerated by increasing the drying temperature, therefore lessening the drying time.

Discussions
The moisture content of the drying product was measured by the time affected by three air temperatures, and two different velocities. According to the experimental results, at higher air velocities, the product is dried faster, due to the fact that with increasing airflow, the difference in the partial pressure of water vapor between the product and the drying air increases. As a result, the moisture transfer rate from the product to the dry air is increased, and the product is dried faster. Considering the slope of the moisture change curve, it can be understood that the drying speed is faster at the beginning of the operation (especially at higher speeds), but the drying rate is lessened by passing the time. According to the results among 10 models, the Midilli and Page thin-layer model and neural network model described the best drying behavior, which resulted in higher R values and lower MSEs. These models were optimized by the genetic algorithm. The air temperature is the most important factor in controlling the quality of pistachios during the drying process. As the temperature increases, the drying time and the M R decrease and the drying rate increases. The results of this analysis showed that the airflow rate has a significant effect on the drying rate of pistachios. Although the effect of airflow velocity on the drying rate is quite significant, its effect is less than air temperature. Furthermore, by referring to the experimental data and the good fit of R 2 associated with each data series from semi-experimental models, it was clear that the models showed perfect agreement with the experiments, and could easily be used to predict the equilibrium moisture for each set of variables at the given temperatures. Also, the trained neural network, with 60% of the experimental data, had the ability to predict moisture at any desired temperature and velocity within the test range. To ensure this, 20% of the experimental data were considered as test data. The regression coefficient for the test data was approximately R 2 = 0.992, which indicates its successful performance in predicting moisture.

Conclusions
In this study, the drying behavior of a cabinet dryer was investigated at different temperatures and velocities. For the objective of explaining the drying performance of the dryer, four thin-layer drying models were implemented. When comparing those models, the superior results were achieved by the Midilli and Kucuk models and Artificial Neural Network-Genetic Algorithm (ANN-GA) model. Also, these models illustrated great conformity with experimental data pertaining to a thin layer drying process. In all conditions, the values of Root mean square error (RMSE) have been less than 0.0004 and the values of R 2 have been higher than 0.992. It can be concluded, based on the results, that the proposed model properly explained the drying behavior of the cabinet dryer. Further study should be undertaken regarding other parameters affecting the proposed model, and checks on its efficiency. Moreover, the resilient consensus of switched multi-agent system must be evaluated in further investigations.