1. Introduction
In recent times, the rapid surge in industrialization and human population has led to a noticeable escalation in various types of waste, primarily encompassing domestic, industrial, and agricultural waste [
1]. These wastes either require disposal or necessitate a reduction in their pollution load. However, their economic evaluation is of paramount importance, and different assessment methodologies have gained significance in recent times [
2].
In Turkey, hazelnut shells are highly valued and have a high calorific value (4100–4400 cal/g) and are widely used as a fuel, especially in regions where hazelnuts are produced. Pentosan, which is a by-product in the petrochemical industry, such as furfural and furfuryl alcohol, is present in hazelnut shells in an amount of 25–30%. Hazelnut shells are used to produce briquettes, activated carbon, and industrial coal through carbonization [
3].
There are many areas where olive pulp is used. Examples of these are fertilizer and animal feed in agriculture, bitumen addition in the construction sector, and in road construction. In addition, it is also reported in studies that it is used as fuel due to the high energy it provides [
2].
An important approach to reducing the management costs of product samples is to reduce the weight of the products. One way to reduce product weight is to apply drying techniques. Drying the product is a technique that brings about the problem of energy use, thus necessitating the design of energy-efficient drying systems. In addition to energy transmission, convection, and radiation-based heating systems, microwave heating systems that provide direct energy to materials through an electromagnetic field approach have also been developed. This method, known as microwave drying, is widely used for treating various types of waste due to its numerous potential advantages [
4].
The microwave drying method has been applied in various ways, including meat processing [
5], in the food industry [
6], with pulp [
7], hazelnut shells [
1] and mango peels [
8].
Energy auditing can be utilized as an important tool in assessing the life cycle of agricultural products, serving as an initial step in recognizing plant production that leads to increased efficiency. Energy, being a crucial input not only in agriculture but also in various sectors, assists in enhancing productivity, increasing food security, and developing rural economies [
9]. When it comes to energy system modelling, what comes to mind is implementing energy systems by modeling them in a computer environment and performing analyzes on these models. Analyzes of various scenarios can be carried out through these models [
10].
Practical systems are intricate, and to ensure their optimal operation, the utilization of models or structural and mathematical representations becomes imperative. This accounts for the heightened prevalence of modeling practices in contemporary science. Traditional mathematical tools are not adequately embraced for addressing indistinct and undetermined systems; nevertheless, intelligent modeling methods demonstrate significant efficacy in this domain [
11].
Mathematical models are significantly used in food drying, as in many other fields. These methods aim to describe the drying process. The use of artificial intelligence methods is effective in developing models with high accuracy. One of the advantages of these methods is their ease of applicability. Therefore, the popularity of using algorithms and methods, such as Adaptive Neuro-Fuzzy Inference System (ANFIS), Artificial Neural Networks (ANN), Fuzzy Inference System (FIS), and Genetic Algorithms (GA), is increasing day by day [
12]. Machine learning is significant today because the human brain is unable to efficiently manage exponentially increasing information, thus necessitating machine support. Artificial intelligence is a field divided into many subdisciplines. The application of these methods in the field of drying, as in other fields, is a process that continues to be developed. For this reason, research in this field remains valid, as in many other fields [
11].
Currently, machine learning methods are successfully used in various fields, from medicine to agriculture, for both current data modeling and future predictions. There are many types of machine learning method, and ANN is one such method capable of producing high-accuracy predictions [
13]. The ANN prediction technique has become widely used in many fields today. Simulating the working of the human brain in a simple manner, ANNs hold a significant place in Artificial Intelligence Technologies. ANN methodology has many important features, including the ability to learn from data, make generalizations, and work with an unlimited number of variables [
14].
ANNs are function networks that establish relationships similar to the relationships between nerve cells called neurons. They have become widespread in many fields in parallel with the development of computer technologies in recent times. In science and engineering, they provide accurate and rapid solutions, especially for regression and classification problems. In terms of drying technologies, ANNs are used for various purposes such as modeling drying kinetics, dryer design and optimization, process control, and energy control [
15].
To eliminate the process and time costs of experimental procedures, accurately predicting the drying curve by modeling the behavior of the system would be a significant advantage. Using a trained ANN for this modeling is a valid approach. Additionally, the increasing input and output parameters due to systemic changes can also be easily integrated into the ANN model. Moisture content, which is considered an important parameter in drying studies, allows for the measurement of the amount of water and vapor within the material [
16].
ANFIS method is a technique that emerges from the combined application of fuzzy logic and artificial neural network principles. ANFIS can be trained with known or desired values and utilized to calculate unknown values. Widely employed in recent years for solving non-linear problems, ANFIS demonstrates considerable success in determining the relationships between input and output variables [
17].
In many studies, both ANFIS and ANN methods have been employed. Dash et al. (2023) modeled the ultrasonic-assisted osmotic dehydration of cape gooseberry using ANFIS [
18]. Soni et al. (2022) applied ANN to predict the friction coefficient of nuclear-grade graphite [
19]. Jena and Sahoo (2013) used ANN to model the propagation of mushrooms and vegetables in a fluidized bed dryer [
20]. Pusat et al. (2016) estimated the coal moisture content in the convective drying process using ANFIS [
21]. Dolatabadi et al. (2018) utilized artificial neural networks (ANNs) and adaptive neuro-fuzzy inference systems (ANFIS) to model the simultaneous adsorption of dye and metal ions from aqueous solutions using sawdust [
22]. One of the studies that designed an ANN and ANFIS system which predicts moisture dissipation and energy consumption is that of Kaveh et al. (2018). In this study, the author examined potatoes, garlic and melon and used a convective hot air dryer as a drying device [
23].
The main objective of this study is to mathematically model the drying process using experimentally obtained data from different waste materials. Simulations based on these models aim to reduce the time and energy expended in laboratory experiments, thereby helping to determine the most suitable conditions for the drying industry. The study specifically aimed to develop mathematical models of the drying process using ANN and ANFIS methods and to compare the performance of these mathematical models. In this study, microwave energy was utilized and, as waste materials, prina, and hazelnut shells were selected. Although it is known that both models are used together or separately in many fields, this is one of the pioneering studies developed for modeling the drying of food waste, particularly the waste of olives and hazelnuts, which are significant products in Turkey.
2. Materials and Methods
2.1. Waste Samples
The hazelnut shells (
Corylus avellana L.) used in this study were obtained from Ordu Province, Turkey. Experiments were conducted at 120, 350, and 460 W microwave power levels. According to the wet base, the first moisture value was found to be 13 ± 1% on average. In all drying experiments, hazelnut shells weighed weighing 100 g were set on the glass plate in a thin layer form. The final moisture value was determined as 1.1 ± 0.8 [
1].
The prina samples for the experiments used in the ANN and ANFIS models were taken from a factory producing olive oil in Turkey and used in the laboratory. Laboratory setups are designed to keep microwave power at 90 W, 360 W and 600 W levels. The thickness of the prina layers was set to 7 mm. Drying experiments were continued in the microwave apparatus until the prina moisture reached 12% (w.b.) and measurements were made periodically [
2].
A Beko brand, 2450 MHz frequency, 800 W power, 19-L capacity, turntable microwave oven was arranged appropriately for the drying of all products. The experiments were conducted in triplicate for each parameter. The averages of the data were utilized.
The moisture content data over time for prina and hazelnut shell products obtained from a microwave dryer with different power levels are provided in
Table 1 and
Table 2, respectively. In
Table 1 and
Table 2, the mw value represents the moisture content on a wet basis as a percentage, while the md value represents the moisture content on a dry basis as a percentage. Partial data used for moisture estimation of the prina and hazelnut shell products are provided as an example. In calculating these values, wet mass (Mw) was used as shown in Equations (1)–(3). Measurements for 75 min at 90 W for prina and 55 min at 120 W for hazelnut shell are shown.
Table 1 and
Table 2 are sample datasets illustrating the time-dependent variations of mw and md values at specific microwave powers for prina and hazelnut shell products, respectively. Considering this dataset, microwave power and time were chosen as inputs, and mw and md were selected as outputs when creating models for ANN and ANFIS. To enhance the sensitivity and accuracy of the models, separate models were generated for each output value with the same learning function, transfer function, and number of neurons. The predicted mw and md values were then used to calculate the dimensionless moisture ratio (MR) and drying rate (DR).
2.2. Theoretical Principle
In the experimental data used to create the data set in the study, moisture content was calculated using two different equations. Equation (1) calculated the moisture content on a wet basis, while Equation (2) calculated this content on a dry basis. The equation used to calculate the dimensionless moisture ratio is given in Equation (3): [
24,
25]
where M
d: Dry weight (g), M
w: Wet weight (g), MR: Dimensionless moisture ratio, m: Moisture content of sample at a specific time (g water/g wet matter), m
0: Initial moisture content (g water/g wet matter).
2.3. Drying Rate
The drying rate, which represents the change in moisture content of the dried product over unit time, is calculated using Equation (4) [
26,
27].
where m
d(t) represents the moisture content at time t (kg water/kg dry matter), m
d(t+Δt) indicates the moisture content at t + Δt, and Δt is the time difference (min).
2.4. Analysis Using ANN
In this study, an Artificial Neural Network (ANN) was employed to develop a formula based on the tangent sigmoid (tansig) transfer function. MATLAB software was utilized for creating and testing ANN models. Hence, a preferred ANN architecture consisting of one input layer, one hidden layer, and one output layer was chosen. There is no universally accepted rule for determining the number of neurons in the hidden layer when constructing ANN models. In this study, preliminary experiments were conducted on waste drying trial data with different numbers of neurons in the hidden layer. It was observed that employing 10 neurons in the hidden layer yielded better results in predicting drying rate and moisture content values compared to using a greater number of neurons. Consequently, the number of neurons in the hidden layer was fixed at 10 for all the ANN architectures developed in this study.
The output layer consists of a neuron representing the mw and md separately. Input data were divided into three segments: training, testing, and validation, randomly selected. ANN was trained using the Levenberg–Marquardt (LM) learning algorithm. The training of the neural network was conducted using MATLAB software. ANN is a highly effective method in solving nonlinear optimization problems [
28].
An illustration of one of the ANN architectures used in the study is shown in
Figure 1. While a linear transfer function was employed in the output layer of the created ANNs, tanh-sigmoid transfer function was tested in the hidden layer [
29].
In ANNs, neuron weights are updated following a specific learning rule throughout the training iterations. The jth neuron receives an activation signal from the input layer, which is a weighted sum. The formula for this weighted sum, denoted as ‘h’, is provided in Equation (5) [
30].
In Equation (5), the symbol ‘wij’ represents the weights governing the connections from the input layer neurons to the neurons situated within the hidden layer. ‘bj’ stands for the biases associated with the neurons in the hidden layer. The variables ‘i’ and ‘j’ denote the respective quantities of neurons within the input layer and the hidden layer.
The resultant sum is subsequently employed in the creation of the output neuron, denoted as ‘H
j’, through the utilization of the activation function ‘f’. Typically, the tangent sigmoid function serves as the activation function in the hidden layer, and its mathematical representation is provided in Equation (6).
As a consequence, output neurons receive signals, as depicted in Equation (7), originating from hidden neurons.
In the given equations, the weight parameter used in the hidden layers is represented by ‘wkj’ and the bias value used in these layers is represented by ‘bk’.
As shown in
Figure 1, the Artificial Neural Network (ANN) consists of three layers. The first layer, the input layer, receives the microwave power and drying time values as inputs. The second layer, the hidden layer, is composed of 10 neurons. These neurons are numbered from h
0 to h
9, and the value transmitted to each neuron is calculated using Equation (5) with the appropriate i and j values. The diagram in
Figure 1 illustrates one of the ANN models, which were separately created for MR and DR predictions but share the same architecture. In this context, the value in the output layer represents either the MR or DR value. Equation (7) is used to obtain the calculated value in the output layer.
In the study, drying time and applied power are provided as inputs to the ANN, while the network is expected to predict mw and md to calculate the moisture content and drying rate. For each ANN trial, 80% of the total drying trial data were used for training the network, 15% of training data for validation during training iterations, and 15% of training data were randomly selected as test data to assess the model’s predictive accuracy. After the training, testing and validation processes were completed, the remaining 20% of the data obtained from the experimental studies were given to the ANN model to predict. The closeness between the actual measured values and the model’s predictions was evaluated using commonly used regression metrics in machine learning applications, including the coefficient of determination (R
2) and error terms such as Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE) [
26].
The results of the mw and md tests were examined using analysis of variance, depending on the microwave power level (one-way ANOVA). To see if the differences were significant, the LSD (Least Significant Different) test was used.
2.5. Analysis Using ANFIS
ANFIS models have a five-layer structure, with three hidden layers located between the input and output layers. These three hidden layers respectively encompass input membership functions, rules, and output membership functions. Additionally, it is known that they include backpropagation algorithms in the Sugeno and Mamdani fuzzy logic classes [
31].
Figure 2 shows the ANFIS architecture with five layers, consisting of two inputs and one output.
Fuzzification Layer: This layer fuzzifies the inputs of the system using membership functions. The changes in membership degrees are determined by the membership functions.
µ
Ai and µ
Bi-2 are the degrees of membership functions for fuzzy sets A
i and B
i [
32].
Rule Layer: Each node in this layer represents the rules and their number based on the Takagi–Sugeno fuzzy system. The output of each rule node is the product of the membership degrees coming from the first layer.
w
i, represents the firing strength for each rule [
32].
Normalization Layer: The outputs of this layer are expressed as normalized firing strengths.
repsents the normalized firing strength.
Defuzzification Layer: This layer converts the fuzzy values back to crisp values, and the contribution of each node to the model output is determined in this layer.
p
i, q
i and r
i constitute the parameter set of this node [
33].
Output Layer: There is only one node in this layer. The output values of the nodes from the previous layer are summed to obtain the actual output value of the ANFIS system.
The experimental datasets, consisting of 35 datasets for hazelnut and 1598 datasets for prina, were divided into two parts: 80% for training and 20% for validating the ANFIS model. Each dataset included two independent variables as inputs and one dependent variable as the output. Three membership function nodes were assigned to each independent variable.
The experimental data were fitted into a first-order Takagi–Sugeno model to train the ANFIS model. Input and output membership functions (MFs) were selected based on minimizing the Root Mean Square Error (RMSE) during ANFIS training, utilizing two methods: backpropagation and a hybrid approach combining forward and backward passes [
34].
2.6. Statistical Analysis
The closeness between the actual measured values and the model estimates was assessed using the coefficient of determination (R
2) and error metrics (Root Mean Square Error (RMSE) and Mean Absolute Percentage Error (MAPE)), which are commonly employed in machine learning applications for regression analysis (Equations (14)–(16)). In this study, the parameters of the models were estimated through nonlinear regression analysis conducted using MATLAB. The predictive performance of the developed ANFIS models was evaluated based on the determination coefficient (R
2), RMSE, and MAPE. The model exhibiting the highest R
2, lowest RMSE, and MAPE below 10% demonstrated superior performance in predicting md and mw values to calculate MR and DR against drying time. [
4,
7,
35].
where MR
teo,i is the ith predicted moisture ratio, MR
exp,i is the ith experimental moisture ratio, and MR
avg,i is the average experimental moisture ratio.
The results of the MR and DR tests were subjected to analysis of variance (ANOVA), depending on the microwave power level (one-way ANOVA). To ascertain the significance of differences, Tukey’s test was applied. All statistical analyses were performed using SPSS (PASW Statistics 18, SPSS Ltd., Hong Kong, China). Significant differences were defined as those with p-values less than 0.05.
3. Results
Drying data obtained experimentally for both prina and hazelnut shells was used to create an ANN model and train the model. This developed ANN model used a neural network structure with a single hidden layer, containing two input variables and, accordingly, one output variable, to independently predict the time-dependent mw and md to calculate moisture and drying rate of the selected products. While the input data of the developed ANN model consist of the drying time of the products and the microwave power values applied to the products, the output data of the model include mw and md.
One of the issues addressed in this study is the creation of an ANN model that is compatible with experimental data for MR and DR parameters and includes the drying characteristics of hazelnut shells and prina. A model was successfully implemented, allowing the generation of drying curves without the need for experimentation under various drying conditions in a conveyor dryer. Consequently, MR and DR parameters can be effectively estimated for hazelnut shell and prina drying.
The moisture ratios of hazelnut shell and prina obtained at different drying times, using three tests, are illustrated in
Figure 3 and
Figure 4. The reduction in drying time associated with an increase in drying power can be attributed to the elevated water vapor pressure within the samples, promoting the migration of moisture. The moisture ratios of prina and hazelnut shell exhibited a rapid decline as the drying time increased. The persistent decrease in the moisture ratio implies that diffusion plays a dominant role in internal mass transfer. Similar findings were noted in experiments involving drilling sludge, zucchini slices and hazelnut shell [
1,
4,
26].
Figure 3 and
Figure 4 present the experimental moisture ratio alongside predictions from ANN and ANFIS models for the respective test data points. It is evident that the system is highly effective in accurately estimating moisture ratio values across all experimental conditions.
While designing the ANN architecture, various neuron numbers were experimented with in preliminary studies conducted on the data from hazelnut shell and prina drying experiments. It was observed that employing 10 neurons in the hidden layer yielded superior results compared to using a larger number of neurons for estimating both mw and md.
Model predictions and experimental measurements were observed to have the same trends and overlap. Upon examination of the numerical values, it is evident that the Moisture Ratio values, presented as a function of drying time, align well with both the experimental results and the predictions made by the ANN and ANFIS models. Similar results were reported by Buluş et al. (2023) and Levent et al. (2023) in the ANN model for MR [
26,
36].
Microwave heating allows for faster mass transfer within the product and generates more heat due to volumetric heating at higher powers. The variation in moisture content with drying rate is shown in
Figure 5 and
Figure 6. Consistent with the findings of Buluş et al. (2023), an increase in wavelength power corresponds to an increase in drying rate [
26]. Although the drying rate is initially rapid in the early stages of the drying process, it subsequently slows down in the later stages.
When comparing the estimated moisture content with the drying rate values, it was observed that they were not consistent.
Although random pieces of the datasets were taken for validation, training, and testing in the tool used, this process was also performed manually before using the tool. For the construction of the Artificial Neural Network model, two inputs, time and microwave power of hazelnut shell and prina, were chosen, while md and mw were designated as outputs separately.
In the ANN model with a single hidden layer, the hidden layer utilized the tangent sigmoid function as its activation function, and the transfer function employed a linear transfer function. The learning algorithm employed was the Levenberg–Marquardt algorithm (trainlm). Through analysis of results obtained from multiple experiments involving the hidden layer, the number of neurons was determined to be 10.
Figure 7 displays the error log graph of the ANN training.
Figure 7 shows the graphical representation of the mean square error of the models selected as the optimal system. The mean square error is shown to prove the accuracy of the training process. As a result of the experiments, the lowest verification mean square error was marked in the 12th epoch for hazelnut shells and in the 490th epoch for prina. The circle in the figure indicates the point where the validation performance is optimal (i.e., where the lowest error value is reached). The regression graphs given in
Figure 8 show the regression outputs created for the test, validation and training data allocated for the ANN model from the experimental (target) data obtained. This graph also gives the regression output for all data. For hazelnuts with training mean square error < 0.0005, correlation coefficients of 0.9984, 0.9705, 0.9992 and 0.9848 were obtained for training, testing, validation and general data, respectively. The fact that the correlation coefficient is close to one indicates that there is an acceptable fit in the data sets. Considering these, the developed ANN network model predicted the moisture rate and drying rate to a level close to reality [
37].
ANFIS was employed to predict the md and mw of hazelnut shell and prina under varying microwave power and over time. ANFIS, based on the Takagi–Sugeno fuzzy inference system, consists of two main components: membership functions and fuzzy inference rules. Membership functions map each point in the input space to a membership value (or degree of membership) in the combined fuzzy set, ranging from 0 to 1. Fuzzy inference rules are a set of if–then rules that define the nature of the output values.
In this research, 1598 data points obtained from experimental results—comprising 1278 (80%) for training and 320 (20%) for testing—were utilized in the ANFIS model. “fuzzy tool” was used to create the MATLAB application of the specified model and the model was created based on the same input parameters as the ANN model.
Figure 9 and
Figure 10 illustrates the training and test datasets derived from experimentally obtained data in hazelnut shell and prina drying, focusing on the specified rate for both ANFIS models. In these figures, the dot represents the test data and the circle represents the training data. The two models, each featuring two inputs and one output, underwent 500 training rounds with the given datasets. The resulting training error graph is presented in
Figure 11 and
Figure 12, showcasing the evolution of the training error throughout the training process. The data predicted by the fuzzy network exhibit similarity to the actual data.
The ANFIS rules were established through the training of the developed models, as depicted in
Figure 13 and
Figure 14. Specifically,
Figure 13a and
Figure 14a illustrate the rules formulated for the estimation of the mw parameter, while
Figure 13b and
Figure 14b showcase the rules generated for the estimation of the DR parameter. In total, nine rules were derived from the training process and subsequently utilized for making predictions.
In
Figure 13 and
Figure 14 the blue tones assist in visualizing the extent to which specific rules influence the output. A darker shade in the output column indicates an increase in the rule’s weight or impact. On the other hand, the sections corresponding to inputs use yellow and red colors to indicate the influence and validity of these rules on the inputs.
Comparative analysis revealed that the ANFIS model exhibited a closer alignment of predicted md values with experimental data when compared to the ANN model. Conversely, the ANN model demonstrated superior performance in predicting MR values. This observation aligns with findings from a study on mango slices, where the Takagi–Sugeno fuzzy model was employed to estimate effective diffusivity, yielding similar results [
38]. Additionally, Buluş et al., (2023) reported that the combination of fuzzy logic and neural networks proves to be a suitable and reliable approach for modeling and predicting the drying kinetics of drilling sludge [
26].
The aim is to achieve the closest R
2 value to 1 and RMSE and MAPE values closest to 0. For R
2, ANN and ANFIS values ranging from 0.981340 to 0.999999 imply a high level of correlation. A MAPE < 0.10 indicates high accuracy in prediction, 0.10–0.20 indicates good prediction, 0.20–0.50 indicates reasonable prediction, and MAPE > 0.50 indicates lack of accuracy in prediction [
13]. As seen in
Table 3, the MAPE values indicate both good and reasonable predictions.
The obtained values were subjected to Analysis of Variance (ANOVA) to assess the statistical significance of differences between the means, and LSD test was used for post hoc analysis. The results revealed that the difference among DR values was statistically significant at the 1% significance level, as determined by the LSD test. It was also observed that it was significant for DR, as seen in
Table 4 and
Table 5.
Upon thorough examination of all the tables, it is evident that the values generated by the ANN and ANFIS models exhibit close proximity to each other. Statistically, means labeled with the same letter, as determined by the F test, indicate that they are significantly different from one another.
5. Conclusions
This study involves the development of ANN and ANFIS models to predict moisture content and drying rate values of hazelnut shells and olive pomace. The objective of creating these models is to enable the storage or reuse of products without conducting drying processes in a laboratory setting. One of the goals is to eliminate the costs associated with experimental setups. The energy costs in a laboratory setting for microwave drying of hazelnut shells have been approximately calculated as 0.25 kWh for 75 min at 120 W, 0.22 kWh for 20 min at 350 W, and 0.20 kWh for 15 min at 460 W.
To develop the models, 80% of the drying data obtained in the laboratory for both products were used for training the model, and 20% were set aside for validation. The R-squared (R2), Mean Absolute Percentage Error (MAPE), and Root Mean Square Error (RMSE) values were calculated for the results. For moisture content, it was seen that the R2 value ranged from 0.981340 to 0.999999, the RMSE value ranged from 0.000012 to 0.015010, and the MAPE value ranged from 0.034268 to 23.833481.
These values indicate that both models produce results close to reality when considering the moisture content parameter. However, for the drying rate, the prediction values obtained with both models did not match the actual values as closely, as shown by the resulting graphs.