COMBINING ARTIFICIAL NEURAL NETWORK AND MOTH-FLAME OPTIMIZATION ALGORITHM FOR OPTIMIZATION OF ULTRASOUND-ASSISTED AND MICROWAVE-ASSISTED EXTRACTION PARAMETERS: BARK OF

In this study, the extraction parameters of Pinus brutia bark were optimized using a hybrid artificial in telligence technique. Firstly, the bark samples were extracted by ultrasound-assisted extraction and micro -wave-assisted extraction which are defined as ‘green’ extraction methods at different conditions. The selected extraction parameters for ultrasound-assisted extraction were 0:100; 20:80; 40:60; 80:20 (%) ethanol: water ratios; 40 ºC, 60 °C extraction temperatures and 5 min, 10 min, 15 min, 20 min extraction times and for mi -crowave-assisted extraction were 90, 180, 360, 600, 900 (W) microwave power, 0:100; 20:80; 40:60; 60:40; 80:20 (%) ethanol: water ratios. Then Stiasny number, condensed tannin content and reducing sugar content of all extracts were determined. Next, the prediction models were developed for each studied parameter using Artificial Neural Network. Finally, the extraction parameters were optimized using Moth-Flame Optimization Algorithm. After that optimization process, while the extraction time was the same (5 min), the ethanol: water ratio and extraction temperature values differed for the optimization of all studied assays of ultrasound-assisted extraction. Also, microwave power and ethanol: water ratio variables were found in different values for each assay of microwave-assisted extraction. The results showed that the Artificial Neural Network and Moth-Flame Optimization could be a novel and powerful hybrid approach to optimize the extraction parameters of Pinus brutia barks with saving time, cost, chemical and effort. Developing prediction model for UAE extraction parameters of Pinus brutia bark using ANN Developing prediction model for MAE extraction parameters of Pinus brutia bark using ANN Optimization of UAE extraction parameters of Pinus brutia bark using MFO algorithm Optimization of MAE extraction parameters of Pinus brutia bark using MFO algorithm


INTRODUCTION
The evaluation of plant wastes increases its importance with the development of technology and the 3-R (reduce, reuse, recycle) philosophy becoming more and more widespread. One of these wastes that are being evaluated is also tree bark. Tree bark generally constitutes 9-15 % of the tree's volume and 13-21 % of its dry weight (Diamantopoulou 2005), but due to the its heterogeneous structure and its variable chemical structure, it cannot be fully evaluated. In addition, it has been reported that the barks are not ideal fuel materials for energy production due to the causing excessive ash (Feng et al. 2013).
The bark also attracts the attention of researchers due to its components and bioactive properties. Some bioactive properties of tree bark such as antioxidant (Dróżdż andPyrzynska 2019, Hamad et al. 2019), antimicrobial (Kumar et al. 2018, Blondeau et al. 2020) and anticancer (Mishra et al. 2016, Rabadeaux et al. 2017, etc. have been proven by scientists. These properties are thought to be due to phytochemicals and polyphenolic components such as flavonoids, phenolic acids, and tannins so on. One of the most important bioactive components of bark is tannin. In addition to being used especially in leather layering (Khanbabaee and van Ree 2001), tannins are used in many industrial areas such as wood protection (Laks et al. 1988), tannin phenol-formaldehyde resins instead of phenol formaldehyde production (Panamgama 2007), carbon foam production (Tondi and Pizzi 2009), acoustic absorber (Lacoste et al. 2015), filter for pollutant agents (Aboulhassan et al. 2016), thermoplastic production (Nicollin et al. 2013).
According to their chemical structure, tannins are classified as hydrolyzable tannins and condensed tannins. Hydrolyzable tannins are gallic acid derivatives (3,4,5-trihydroxy benzoic acid) which are simple mixtures of pyrogallols, gallic acid, ellagic acid and glucose esters with gallic or digallic acids. Condensed tannins include complex chemical structures of polyphenolic compounds, which include polyhydroxyfluvan-3-ol oligomer groups and polymers bound by carbon-carbon bonds between flavonol subunits (Hagerman 1989). Condensed tannins make up more than 90 % of tannin production in the world (Rowe and Conner 1979). Because condensed tannins are more reactive and more abundant in nature and therefore more important than hydrolyzable tannin both commercially and chemically (Barbehenn and Constabel 2011).
The materials studied are extracted to obtain tannins and/or other bioactive ingredients from plant sources. The values of bark extraction for the tanning are affected by many parameters such as the age of the tree, the geographic features of the growth area of the tree and the area where the bark is taken from the wood (Pohjamo et al. 2003). In addition, the extraction type and conditions have also a significant effect on the amount of tannins obtained (Gironi andPiemonte 2011, Moreira et al. 2017). Such as maceration and Soxhlet extraction, many traditional extraction methods have been used for years. However, since these extraction methods require a high amount of solvent and a long time between 1-24 hours, researchers have now turned to more effective and more 'green' extraction methods (Ameer et al. 2017). Some of these new methods are ultrasound assisted extraction (UAE) techniques (Tiwari 2015) and microwave assisted extraction (MAE) techniques (Li et al. 2013). It has been proven by many studies that both techniques have higher efficiency in less time and with less solvent compared to traditional methods (Dahmoune et al. 2014).
Since extraction parameters have a significant effect on the component to be obtained, extraction conditions need to be optimized to obtain the highest amount of components (Bouras et al. 2015). In the literature, traditional methods such as response surface method (RSM) are generally used for optimization of extraction parameters (Ali et al. 2018, Rhazi et al. 2019. Artificial neural networks (ANN) are one of the soft-computing techniques proved in many studies that give more accurate results compared to traditional methods Goswami 2017, Gürgen et al. 2019). Also, new optimization methods have been developed constantly and added to the literature by researchers with the understanding of the importance of optimization and the development of software science day by day. Optimization algorithms have been developed by imitating the events or living things which the researchers were inspired. One of these new optimization algorithms is Moth-Flame Optimization (MFO) that is nature-inspired heuristic paradigm was developed by (Mirjalili 2015). In this study, MFO algorithm was used in the optimization process.
The tannins obtained from the barks of mimosa and quebracho trees are commercially available and have been used for years (García et al. 2013). However, tannins obtained from pine species are not yet in a commercialization process (Lacoste et al. 2013). Therefore, optimization of extraction conditions is of great importance to enlarge the process for the ultimate purpose of commercialization. The aim of this study is modeling and optimization the extraction parameters of Turkish red pine (Pinus brutia) bark with UAE and MAE extractions. This study includes five steps, given below;

Data collection
The experiments were carried out by Atılgan and the data used in this study were presented in her master thesis (Atılgan 2018). Shortly, the experimental studies can be expressed follows; Turkish red pine (Pinus brutia Ten.) barks were used as material. Turkish red pine bark sample was obtained from Yalova Forest Operation Directorate. The bark samples were kept for a few weeks until it reaches 10-15 % humidity at room temperature, after removing wood, stone, metal pieces, algae, and leaves. The samples were ground in a laboratory type Fritsch mill for extraction.

Stiasny number
For the Stiasny reaction, 50 mL of 0,4 % aqueous extract solution was taken. This solution was reacted with 10 mL of 40 % formaldehyde and 5 mL of concentrated HCl solution. The mixture was boiled under a magnetic stirrer for 30 minutes under coolant, after which the precipitated substances were filtered under a vacuum from the crucibles of porosity 3, which had previously been determined with a dry blank weight. Then it was washed with 500 mL of boiling water and dried and weighed in an oven at 105 ºC. The number of Stiasny was determined by going through weight loss (Yazaki and Hillis 1977).

Condensed tannin content
The determination of condensed tannin (proanthocyanidin) was carried out as described by Govindarajan and Mathew (1965) and the results were expressed as cyaniding equivalents per amount of extracted bark (Fuleki and Francis 1968). 0,5 mL of the aqueous extract is taken into a bottle of teflon cap and mixed with 5 mL of anthocyanidin reagent. The mouth of the bottle is loosely closed to prevent pressure build-up and kept in a water bath at 95 ºC for 15 minutes. At the end of the period, the bottle is cooled and the absorbance at λ= 530 nm is measured against the blanks prepared in the same way in the spectrophotometer.

Reducing sugar content
1 mL sample was taken into the test tube and 1,5 mL 3, 5-dinitrosalicylic Acid (DNS) reagent was added on it. It was kept in a boiling water bath for 5 minutes and the test tube was allowed to cool in the bath at room temperature for 10 minutes. 6,5 mL of water was added to this solution and the absorbance of the solution was measured at 540 nm. The blank solution was prepared with 1,5 mL DNS and 8.5 mL pure water (Miller 1959).
UAE was carried out using Bandelin Digitech DL 510 H ultrasonic bath and MAE was performed using Siemens microwave system. Extraction time is the boiling time of the solution. Extraction parameters and results of UAE and MAE were given in Table 1 and Table 2, respectively.

Modelling of extraction parameters using ANN
ANN is powerful soft-computing modeling tool (Tang and Chi 2005). It is known as a method developed by simulating the brain's cognitive learning process. It has been shown to be quite effective in complex problems. It can find solutions to many problems such as prediction, classification, clustering. The most important feature of neural networks is that complex systems can solve the problem by learning from the sample based on the past knowledge.
An artificial nerve cell consists of five main parts: inputs, weights, summation function, activation function and output. The structure of an artificial nerve cell was shown in Figure 1. Inputs (x 1 , x 2 , x 3 ,…,w n ) are information given to the cell from the external environment. ANN uses these inputs for learning process. Weights (w 1 , w 2 , w 3 ,…,w n ) are values that express the effect of the input data set or another processing element in a previous layer on this processing element. Summation function calculates the effect of all inputs and all the weights on this process element. Summation function can be described following Equation 1.
Where, x i is input value of the i. nerve cell, w ij is weight coefficient, n is the total number of inputs into the cell, b is the bias.
The activation function determines the cell output by processing the net input obtained from the summation function. In this study, sigmoid function was chosen as the activation function. The output of the nerve cell calculated using this function is shown as following Equation 2.
ANN contains many interconnected nerve cells, and the combination of these nerve cells is not random. Generally, cells come together in three layers and parallel in each layer to establish the network. The layer in which the inputs are applied is called the input layer, the layer from which the output is obtained is called the output layer. There is hidden layer(s) between these input and output layers. It is so named because its outputs cannot be directly observed; hidden layers can be one or more (Kartalopoulos 1997). The layers of UAE and MAE were shown in Figure 2 and Figure 3, respectively. Stiasny number, condensed tannin content and reducing sugar content of extracts were modeled separately for UAE. In other words, three prediction models were developed for UAE. Similarly, Stiasny number, condensed tannin content and reducing sugar content were modeled separately for MAE, and three prediction models were developed.  In this study, three (3) training algorithm as namely Bayesian regularization, Levenberg-Marquardt and Scaled Conjugate Gradient were used. In addition, 20 hidden neurons (from 1 to 20) were tested to obtain the best model for each training algorithm. Totally 60 different models were obtained for each output parameter. Mean square error (MSE) was the performance function that control the training process of the network. The data set were divided into three as training, validation and testing. Each data set was used for a different purpose. The training of the network was carried out using the training data set. Validation data set prevents memorization during the training process. The test data set was used only to determine the performance of the trained network. In this study, the prediction performance of the ANN models were evaluated with mean absolute percentage error (MAPE). Finally, the best models were determined and used for optimization process. The ANN model topology used in the studies was summarized in Table 3.
Where, e is the experimental result, p is the prediction result, and n is the number of samples.

Optimization of extraction parameters using MFO
Seyedali Mirjalili developed the MFO algorithm in 2015. Mirjalili compared the MFO algorithm with other well-known algorithms using 29 benchmarks and 7 real engineering problems and indicated that the results were highly competitive (Mirjalili 2015). Optimization studies using MFO algorithm become more attractive recently and it is used in many different areas (Yıldız and Yıldız 2017, Ebrahim et al. 2018, Bandopadhyay and Roy 2020. Moths fly by positioning at a fixed angle according to the moon to travel long distances on a flat road, which is defined as transverse orientation. Since the moon is too far away from the moth, the moths can fly straight long distance thanks to this mechanism. When moths came across a man-made artificial light, they try to maintain a light-like angle to fly in a straight line. But since such a light source is extremely close compared to the moon, maintaining an angle similar to the light source will not work for moths and even cause a fatal spiral fly path (Figure 4). The mathematical model of MFO is based on two components, moth and flame. While moths are the real search agents that move around the search area, flames are the best location for the moths ever obtained.
In the population-based MFO algorithm, moths are represented by a matrix as follows Equation 5.
Accordingly, flames can also be represented in a matrix similar to the moth matrix as follows Equation 6.
Where n is the number of moths and d is the number of variables for both matrixes Equation 7.

( )
, , MFO I P T = Where I is used to produce and initialize the population of moths randomly and also the fitness values of them; P is a main function that makes the moths move around the search space, and T is a termination criterion flag.
The position of each moth with regard to a flame is updated as per Equation 8.  Some of the possible positions that can be reached by a moth with respect to a flame using the logarithmic spiral were shown in Figure 5. The exploitation of the best solutions may degrade because of the updating of moths' position regarding to N different locations in the search space. To resolve this problem, there is an adaptive mechanism used for overcoming this issue by proposing a number of flames (Fno), the following Equation 11 is applied.
Where ν is the current number of iterations, N is the maximum number of flames, and T indicates the maximum number of iterations (termination criterion).
MFO algorithm parameters were presented in Table 4.

Modelling of extraction parameters using ANN
Some details and performance of obtained best models were given in Table 5 and Table 6, respectively. In this study, among the tried learning algorithms, the best models were obtained from the networks used LM learning algorithm for both every extraction method and studied parameters. The best models' architecture was given in Table 5. The architecture '3-10-1' means the network consist of 3 input, 10 hidden neurons and 1 output. The number of hidden neurons that give the best model is specific for each problem and each parameter of the problem and depends on many variables such as number of inputs, complexity of problem, researcher's experience and knowledge so on. Low hidden neurons cause high error values while a large number of hidden neurons causes memorization of data instead of training and increasing complexity of network. Therefore, it is very important to determine the ideal number of hidden neuron numbers. R (correlation coefficients) value gives information about the correlation between the predicted values and the real values. The closer the R-value is to one (1), the closer the predicted values to the real values. R values for all data were ranged between 0,945 and 0,992 of selected best networks in this study. This value was one of the parameters used to measure the performance of the network. The other performance parameters that is MAPE and MSE were given in Table 6. The MAPE value gives information about the accuracy of the network in predicting data. For example, if the MAPE value of a selected network is 10 %, that model predicts the data with an error of 10 %, which means that the reliability of the network is 90 %. In this study all MAPE values were found lower than 0,5 %. These results show that models can predict extraction parameters with very high accuracy. It is important that the MAPE values of training, validation, and test data sets are close to each other. If the MAPE value for the training data set is low with the MAPE value for the test or validation data set is high, it can be said that the network is memorizing. Here, all MAPE values are very low and close to each other. Therefore, the generalization capability of the network is high.
MSE was other performance criterion of ANN models. The MSE value was calculated by taking the average of the sum of the square of the differences between the prediction values and the actual values. The lower MSE value means the less the difference between the prediction and the actual value. The results show that the MSE values were quite small.

Optimization of extraction parameters using MFO
In this study, Stiasny number, condensed tannin and reducing sugar content were inputs for developing ANN model that was used for optimization process. A higher Stiasny number means more condensed tannin in the extractives (Feng et al. 2013). It was reported that a minimum Stiasny number of 65 % is essential to produce a high quality adhesive (Yazaki and Collins 1994). Condensed tannins, are also called proanthocyanidins (Kemppainen et al. 2014). Reducing sugar content by DNS method determine the amount of free sugars seen as impurities in the extracts (Gönültaş and Sarialan 2017). Low impurity is desired for obtaining high purity tannins.
In this study, the optimization process was carried out using the MFO algorithm. Objective function values were obtained using ANN models. The objective functions were maximization of Stiasny number, maximization of the condensed tannin content and minimization of reducing sugar content of obtained extracts, respectively.
The convergence curve of optimization process for UAE and MAE were given in Figure 6 and Figure 7, respectively. These graphs show that the MFO algorithm could complete the search processes. In other words, it was concluded that the number of iterations was sufficient.  The optimum extraction parameters for the UAE were given in Table 7. According to the optimization results, optimum value of Stiasny number was 88,84, optimum value of condensed tannin content was 56,01 mg/g CE and optimum value of reducing sugar content of extracted was 15,08 mg/g for UAE. The optimum extraction parameters for maximum Stiasny number were 82,73:17,22 % ethanol: water ratio, 53,20 °C extraction temperature, and an extraction time of 5 min. The optimum extraction parameters for the maximum condensed tannin content were determined as 49,48:50,52 % ethanol: water ratio, 52,48 °C extraction temperature, and an extraction time of 5 min. Finally, the optimum extraction parameters for minimum reducing sugar content were listed as follows; 71,64:28,36 ethanol: water ratio, 40,00 °C extraction temperature, and an extraction time of 5 min. The optimum extraction parameters for the MAE were shown in Table 8. According to the optimization results, optimum value of Stiasny number was 86,65, optimum value of condensed tannin content was 56,15 mg CE/g and optimum value of reducing sugar content of extracted was 20,72 mg/g for MAE. The optimum extraction parameters for maximum Stiasny number were 25,85:74,15 % ethanol: water ratio and 826,64 W of microwave power. The optimum extraction parameters for the maximum condensed tannin content were determined as 69,09:30,91 % ethanol: water ratio and 90,00 W of microwave power. Finally, the optimum extraction parameters for minimum reducing sugar content were listed as follows; 0,00:100,00 % ethanol: water ratio and 90,00 W of microwave power. UAE and MAE, which are environmentally friendly methods of recent times have been carried out for tannin analyzes of coastal pine and it was reported that tannin yield, total phenol, condensed tannins and Stiasny number give better results in 1 % NaOH and 5 % NaOH solutions (Ndazi et al. 2006).
In the study was performed by Brahim et al. (2014), MAE, UAE and traditional solvent extraction methods were used comparatively in the extraction process of leaf polyphenols of myrtle plant (Myrtus communis), and the extraction step was optimized. For these extraction methods, optimum extraction conditions were given as 42 % ethanol concentration, 500 W microwave power, 62 seconds extraction time, 32 mL/g solvent solids in the MAE method.
In the study conducted by Ghitescu et al. (2015), the effects of variables such as extraction time, temperature and ethanol concentration on polyphenols of the Picea abies barks were performed by using UAE method. The highest polyphenol content was obtained at the 60 min extract time, 54 °C extraction time and extraction temperature and 70 % ethanol concentration.
In a study, the extraction conditions of three phenolic compounds: total phenolics, flavonoids and condensed tannins, from White Horehound's leaves (Marrubium vulgare L.). were optimized. Distilled water and different organic solvents such as: methanol, ethanol and acetone, were used, with various concentrations (20-80 %, v/v), temperatures (20-60˚C) and extraction times (30-450 min). It has been reported that the condensed tannins optimum extraction parameters with 60 % aqueous acetone at 50 °C and for 180 min for the highest condensed tannin (Bouterfas et al. 2014).
Optimum ultrasound-mediated conditions of areca husk were optimized using RSM. The optimum extraction conditions were reported as ethanol concentration, 41 %; extraction temperature, 53 °C; and extraction time, 38 min. Also, the researchers draw attention that ethanol concentration was the most significant parameter (Chen et al. 2014).
The extraction conditions of polyphenols from spruce wood bark for MAE were optimized using support vector machines and an evolutionary algorithm. The extraction parameters were including temperature (30-60 °C), ethanol concentration (ethanol: water 30-80 %) and extraction time (1-55 min). The optimum conditions for maximum total polyphenols content were reported as ethanol concentration of 50 %, extraction time of 3 minutes and temperature of 60 °C (Ghitescu et al. 2017).
When all studies are evaluated together, it can be concluded that each optimization is specific and dependent on the studied material and extraction conditions.

CONCLUSIONS
In this study, the extraction parameters of Pinus brutia bark were optimized using a hybrid artificial intelligence technique (ANN and MFO). The important findings of this study were below; Among the tried learning algorithms, the best ANN models were obtained with LM algorithm for prediction of extraction parameters.
R values for all data were ranged between 0,945 and 0,992 of networks.
All MAPE values of ANN models were found lower than 0,5 %.
Optimum extraction time was found 5 minutes for all studied parameters for UAE. Optimum extraction temperatures were ranged between 40,00 and 53,20 °C and also optimum ethanol: water ratio was found in the broader range between 49,48:50,52 and 82,73:17,22 % for optimization all assays of UAE method.
Optimum ethanol: water ratio was found for all studied parameters with maximum 69,09:30,91 and minimum 0,00:100,00 % values. Optimum power value was found same for maximum condensed tannin content and minimum reducing sugar content with 90 W. However, it was suggested that optimum microwave power was 826,64 W for maximum Stiasny number by MFO algorithm for UAE method.