Continuous Integrated Process of Biodiesel Production and Puriﬁcation—The End of the Conventional Two-Stage Batch Process?

: In this research, optimization of the integrated biodiesel production process composed of transesteriﬁcation of edible sunﬂower oil, catalyzed by commercial lipase, with simultaneous extraction of glycerol from the reaction mixture was performed. Deep eutectic solvents (DESs) were used in this integrated process as the reaction and extraction media. For two systems, choline chloride:glycerol (ChCl:Gly) and choline chloride:ethylene glycol (ChCl:EG), respectively, the optimal water content, mass ratio of the phase containing the mixture of reactants (oil and methanol) with an enzyme and a DES phase (mass ratio of phases), and the molar ratio of deep eutectic solvent constituents were determined using response surface methodology (RSM). Experiments performed with ChCl:Gly resulted in a higher biodiesel yield and higher glycerol extraction efﬁciency, namely, a mass ratio of phases of 1:1, a mass fraction of water of 6.6%, and a molar ratio of the ChCl:Gly of 1:3.5 were determined to be the optimal process conditions. When the reaction was performed in a batch reactor under the optimal conditions, the process resulted in a 43.54 ± 0.2% yield and 99.54 ± 0.19% glycerol extraction efﬁciency ( t = 2 h). Unfortunately, the free glycerol content was higher than the one deﬁned by international standards ( w G > 0.02%); therefore, the process was performed in a microsystem to enhance the mass transfer. Gaining the same yield and free glycerol content below the standards ( w G = 0.0019 ± 0.003%), the microsystem proved to be a good direction for future process optimization.


Introduction
In order to reduce the excessive depletion of fossil fuel stocks and its negative impact on the environment, environmentally friendly alternative fuels are increasingly being explored [1]. Biodiesel, a mixture of fatty acid methyl esters, stands as a suitable replacement for fossil diesel due to its reduced greenhouse gas and impurity emissions compared to fossil diesel combustion [2][3][4][5]. The use of biodiesel in a mixture with fossil diesels such as B5, B7, and B20 blends has become common in Europe [6]. Therefore, the production of significant quantities of biodiesel for the lowest possible price is required for its competitiveness on the market [7]. Nowadays, the most common industrial process for biodiesel production is the transesterification of vegetable oils with methanol, carried out in a batch reactor with an alkaline catalyst. Besides the fact that several hours are needed to achieve a sufficient yield in the batch production process, synthetized biodiesel requires additional expensive purification methods to become suitable for application in internal combustion engines [1,8].
Other approaches in biodiesel production include heterogeneous transesterification [9,10] and transesterification under supercritical conditions [11][12][13], the dilution/ flower oil and methanol were used as substrates and the commercial enzyme lipase from Thermomyces lanuginosus was used as a catalyst in transesterification, while a DES was used as the reaction medium and as an extraction medium for biodiesel purification. Two DESs were used for integrated production and purification of biodiesel: choline chloride with glycerol (ChCl:Gly) as an HBD and choline chloride with ethylene glycol (ChCl:EG) as an HBD. RSM was applied to optimize the process conditions where biodiesel yield was an objective function. For the two systems that differed in the DES used, the optimal values of the mass ratio of the phase containing a mixture of reactants (oil and methanol) with an enzyme and a DES phase (mass ratio of phases), water content, as well as the molar ratio of the DES constituents were determined by numerical optimization. Finally, the integrated biodiesel production and purification process was carried out under optimal conditions in a batch reactor and in a microreactor.

Materials Chemicals
The following chemicals were used to perform the experiment. Acetylacetone, acetonitrile, n-hexane, n-heptane, hydrochloric acid, methanol, sodium periodate, and tris (hydroxymethyl)aminometal (TRIS) were produced by VWR Chemicals, BDH Prolabo (Lutterworth, United Kingdom). Edible sunflower oil (Zvijezda, Zagreb, Croatia) was purchased at a local store. Enzyme lipase from Thermomyces lanuginosus (Lipolase 100 L) and a fatty acid methyl ester (FAME) mix GLC-10 were purchased from Sigma-Aldrich Handels GmBH (Vienna, Austria). Glycerol was purchased from Kemika (Zagreb, Croatia) and ethanol from Gram mol d.o.o. (Zagreb, Croatia). Choline chloride and 4-nitrophenyl acetate were purchased from Acros Organics (Geel, Belgium), the ethylene glycol was purchased from Lach-Ner (Prague, Czech Republic), and acetic acid from Carlo Erba Reagents (Sabadell, Spain). With the exception of sunflower oil, chemicals and reagents were of analytical grade and were used without any further purification.

Preparation of Deep Eutectic Solvents (DESs)
Choline chloride (ChCl) and glycerol (Gly), and choline chloride and ethylene glycol (EG) in different molar ratios were used to prepare anhydrous ChCl:Gly and ChCl:EG DESs, respectively (Table 1). After weighing each component according to the desired molar ratio, the components were placed in a Schott bottle (V = 50 mL) and mixed on a magnetic stirrer (MS-H-S, DLAB, Ontario, CA, USA) at 200 rpm and 50 • C. The process was carried out for 30-60 min until a homogeneous, colorless, transparent liquid was obtained. DESs were then cooled to 25 • C. In order to optimize the integrated process composed of simultaneous biodiesel production (by transesterification) and purification (glycerol extraction), experiments were carried out according to the experimental plan (Table 2), changing the mass ratio of a reaction phase (oil, methanol, enzyme, and water) and the DES phase, water content, and molar ratios of DES constituents ( Table 2). The required masses of oil and methanol were weighed into conical centrifuge tubes (V = 15 mL), with their molar ratio always being 1:3.4 [38]. The content of the centrifuge tubes was well homogenized on a homogenizer (Vibromix 10, Tehtnica, Železniki, Slovenia) and the appropriate amount of DESs was added into the centrifuge tube. The content of the centrifuge tubes was well homogenized, followed by the addition of water and lipase according to the experimental plan ( Table 2). The initial concentration of lipase was equal in all performed experiments (γ E,0 = 0.1 mg mL −1 ). After homogenization, the centrifuge tubes were attached to a rack and placed in a shaker (Innova 4330 Refrigerated Incubator Shaker, New Brunswick Scientific, Enfield, CT, USA) for 2 h at 400 rpm and at a temperature of 40 • C. After incubation, the centrifuge tubes were removed and immediately centrifuged (Universal 320 R, Hettich, Buford, GA, USA) for 10 min at 4000 rpm and at 40 • C. As a result, two clearly visible layers were formed. Layer volumes were measured and the top layer containing mainly biodiesel was centrifuged again for 10 min at 14,000 rpm and at 40 • C in order to completely precipitate the DES that may have remained during the first centrifugation. Biodiesel samples obtained in this manner were analyzed by gas chromatography and on a spectrophotometer. Based on the measured concentrations of biodiesel and glycerol in the samples, the yield of biodiesel (Y), the extraction efficiency of glycerol (η), and the mass fraction of glycerol in biodiesel (w G ) were calculated.

Integrated Biodiesel Production and Purification in a Batch Reactor
The integrated biodiesel production and purification process was carried out in a laboratory double wall batch reactor (V = 10 mL, t = 2 h, 400 rpm, and T = 40 • C; Figure 1). Three different compositions of reaction media were used. In Experiment I, the synthesis of biodiesel was performed in an aqueous medium (0.01 mol L −1 phosphate buffer, pH 7.4, water content of 4.6% w/w) without DES addition. Experiment II was performed with DES addition at initial conditions used as the central point of the experimental plan (mass ratio of phases 1:1, mass fraction of water of 4.6%, and molar ratio of DES constituents of 1:3; Table 2), while Experiment III was performed at optimized conditions (mass ratio of phases ratio 1:1, mass fraction of water of 6.6%, and molar ratio of DES constituents of 1:3.5). All experiments were performed at the same molar ratio of oil and methanol (1:3.4) and at equal initial lipase concentrations (γ E,0 = 0.1 mg mL −1 ) as in the experiments performed for optimization purposes. ton, MA, USA) were connected to the microreactor by PTFE tubes, with the first pump supplying oil mixed with lipase, while methanol mixed with a DES was fed with the second pump. The oil to methanol ratio (1:3.4) and enzyme concentration in the inlet stream (γE,0 = 0.1 mg mL −1 ) were kept constant as in the batch processes. A microreactor was placed in a water bath heated to 40 °C to carry out the process at the optimum temperature for transesterification. The total flow was 1.96 μL min −1 (τ = 120 min).

Influence of Temperature on the Efficiency of Glycerol Extraction
In order to investigate the influence of temperature on the extraction efficiency, batch experiments were performed at 40 °C , 50 °C , and 60 °C. The integrated production and biodiesel purification process was carried out in a glass batch reactor with double walls (V = 10 mL). Appropriate weights of oil and methanol (molar ratio 1:3.4) were added in the eutectic solvent, while the reaction was started with the addition of an aqueous lipase suspension. The initial concentration of the enzyme in the reaction mixture was γE,0 = 0.1 mg mL −1 . The reactor was placed on a magnetic stirrer, and the reaction mixture was stirred at 400 rpm for 48 h. Afterwards, the reaction mixture was transferred to a separation funnel to separate the biodiesel phase from the deep eutectic solvent phase. The sample of the biodiesel phase was analyzed by gas chromatography.

Integrated Biodiesel Production and Purification Process in a Microsystem
The integrated biodiesel production and purification process was performed in a microsystem to investigate any potential enhancements of the process ( Figure 1). The synthesis of biodiesel was carried out in a polytetrafluoroethylene (PTFE) tubular microreactor (length:diameter = 1.2 m:500 µm, with a total volume of 236 µL). The PTFE microreactor was equipped with a Y-shaped input. Two piston pumps (Harvard Apparatus, Holliston, MA, USA) were connected to the microreactor by PTFE tubes, with the first pump supplying oil mixed with lipase, while methanol mixed with a DES was fed with the second pump. The oil to methanol ratio (1:3.4) and enzyme concentration in the inlet stream (γ E,0 = 0.1 mg mL −1 ) were kept constant as in the batch processes. A microreactor was placed in a water bath heated to 40 • C to carry out the process at the optimum temperature for transesterification. The total flow was 1.96 µL min −1 (τ = 120 min).

Influence of Temperature on the Efficiency of Glycerol Extraction
In order to investigate the influence of temperature on the extraction efficiency, batch experiments were performed at 40 • C, 50 • C, and 60 • C. The integrated production and biodiesel purification process was carried out in a glass batch reactor with double walls (V = 10 mL). Appropriate weights of oil and methanol (molar ratio 1:3.4) were added in the eutectic solvent, while the reaction was started with the addition of an aqueous lipase suspension. The initial concentration of the enzyme in the reaction mixture was γ E,0 = 0.1 mg mL −1 . The reactor was placed on a magnetic stirrer, and the reaction mixture was stirred at 400 rpm for 48 h. Afterwards, the reaction mixture was transferred to a separation funnel to separate the biodiesel phase from the deep eutectic solvent phase. The sample of the biodiesel phase was analyzed by gas chromatography.

Measurement of the Concentration of Fatty Acid Methyl Esters and Glycerol by Gas Chromatography
The concentration of fatty acid methyl esters (FAMEs) and glycerol was determined on a gas chromatograph equipped with a flame ionization detector (FID detector) and a Zebron ZB-Wax GC capillary column (length: 30 m; internal diameter: 0.53 mm; film thickness: 1.00 µm). Concentrations of FAME and glycerol were determined as described elsewhere [38]. For 1 min, the column was heated starting at a temperature of 180 • C, with heating to 230 • C at the rate of 5 • C min −1 , while the FID detector operated at 240 • C. According to the method, the total duration of analysis for each sample was 15 min, and nitrogen with a flow rate of 1.97 mL min −1 was used as the carrier gas. A mixture of the FAME mix GLC-10 was used as a standard to identify the corresponding fatty acid esters. The sample for analysis was diluted 100-fold to obtain concentrations in the area covered by the calibration diagram. N-heptane was used as the solvent for sample preparation to determine the concentration of FAME, while ethanol was used as the solvent for sample preparation in the analysis of glycerol. After homogenization, the sample was filtered and analyzed. The retention times for the individual components were as follows: 7.74 min for palmitic, 10.59 min for stearin, 10.87 min for oleic, 11.58 min for linoleic, and 12.62 min for α-linolenic (linolenic) esters. The retention time for glycerol was 9.02 min, using the same method. To determine repeatability, all measurements were performed in triplicate.

Spectrophotometric Measurement of Glycerol Concentration
The concentration of glycerol in the sample was determined as described by Bondioli and Della Bella [39]. Briefly, 0.5 g of the biodiesel sample (±0.1 mg) was weighed into a 10-mL conical centrifuge tube. The sample was then dissolved in 2 mL hexane and 2 mL working solvent was added. The resulting mixture was then homogenized for 5 min and centrifuged for 15 min at 2000 rpm and 25 • C. After centrifugation, the upper layer (biodiesel) was removed and 0.5 mL of the lower layer was transferred to a 10-mL conical centrifuge tube. In this sample, 1.5 mL of working solvent (equal volumes of distilled water and 95% ethanol) and 1.2 mL sodium periodate solution were added. The resulting sample was homogenized for 30 s, followed by the addition of 1.2 mL of 0.2 mol L −1 acetylacetone solution. The conical centrifuge tubes were placed in a pre-thermostated water bath (Thermomix 1420, Braun, Melsungen, Germany) at 70 • C for 1 min, with manual stirring. After thermostating at 70 • C, the sample was transferred to a water bath at 20 • C for 2 min with manual stirring. The samples were then centrifuged at 2000 rpm and 25 • C for 1 min. Thus, 1 mL of the sample was obtained and transferred to plastic cuvettes and analyzed spectrophotometrically (UV-1601, Shimadzu, Kyoto, Japan) at a wavelength of λ = 410 nm. To determine repeatability, all measurements were performed in triplicate and the glycerol concentration was calculated based on the calibration curve.

Measurement of Lipase Activity
The measurement of lipase activity was based on the solvolysis of 0.0375 mol L −1 of 4-nitrophenyl acetate. Briefly, 100 µL of sample was added to 3900 µL of 0.05 mol L −1 Tris-HCl buffer, pH 8, and homogenized. After homogenization, 950 µL of the mixture was transferred to a UV cuvette previously thermostated at 40 • C in a water bath. The reaction was started by adding 50 µL of 0.0375 mol L −1 of 4-nitrophenyl acetate previously dissolved in acetonitrile. The enzyme activity was determined spectrophotometrically (UV-1800, Shimadzu, Kyoto, Japan) by measuring the change in absorbance at the wavelength of λ = 400 nm, with a total determination time of 20 s. To determine repeatability, all measurements were performed in triplicate.

Optimization of the Extraction Process by Response Surface Methodology (RSM)
Impacts of the three separate variables (water content (X 1 ), DES composition (X 2 ), and mass ratio of phases (X 3 )) on the biodiesel yield (Y) were assessed by applying the Box-Behnken design implemented in Statistica version 10.0 (StatSoft Inc., Tulsa, OK, USA). The impact of independent variables was investigated at three levels (−1, 0, and 1) through 15 experiments according to the experimental design. The parameters of the second-order polynomial model were estimated to describe the experimental data (Equation (1), [40]) where Y is the predicted response; β 0 , β i , β ii , and β ij are regression coefficients for intercept, linear, quadratic, and interaction terms, respectively, and X i and X j are the independent variables.

Artificial Neural Network (ANN) Modeling
Multi-layer perceptron (MLP) networks were developed in Statistica v.10.0 software (StatSoft Inc., Tulsa, OK, USA) for the prediction of biodiesel yield based on water content, DES composition, and mass ratio of phases. The artificial neural network (ANN) training was performed with separation of data into training, test, and validation sets in a 70:15:15 ratio. A back error propagation algorithm was applied for the model training to ensure the minimum value of the error function. The model performance was evaluated based on R 2 and root mean squared error (RMSE) values for training, testing, and validation.

Optimization of Biodiesel Synthesis and the Glycerol Extraction Process
In order to optimize the integrated biodiesel synthesis and glycerol extraction process, the influence of three variables on biodiesel yield and extraction efficiency were analyzed at three levels.
The first chosen variable was the mass ratio of a reaction phase (oil, methanol, enzyme, and water) and a DES (ChCl:Gly or ChCl:EG) phase. According to Hayyan et al. [41], while purifying the produced biodiesel, biodiesel and the DES mass ratio have a significant impact on extraction efficiency, which is the highest for the 1:1 mass ratio. Therefore, a 1:1 mass ratio of a reaction phase (oil, methanol, enzyme, and water) and the DES phase was chosen as the initial value. To cover the entire range of phase ratios, the lower and higher levels were set to be 1:9 and 9:1, respectively.
The second analyzed variable was the mass fraction of water in the system. According to Merza et al. [42], water has a significant impact on biodiesel yield when using lipase as a catalyst, while water is necessary to keep the 3D structure of lipase. On the other hand, the water content should not be too high during the transesterification process because unwanted hydrolysis could occur [43]. Therefore, optimization of water content is necessary in order to obtain the highest possible yield.
Furthermore, based on previous research [34], the initial value was set at 4.6%, while the lower level was defined considering the water content in the original enzyme sample, which resulted in the minimal water content of 0.6% in the mixture. In order to keep the optimization step of 4%, the mass fraction of water was set to be 8.6% at the higher level.
The third chosen variable was the molar ratio of choline chloride and a hydrogen bond donor in a DES. Šalić et al. [33] highlighted that the extraction efficiency can be increased by changing the ratio of choline chloride and a hydrogen bond donor from 1:1 to 1:3. Therefore, the 1:3 molar ratio was chosen to be the initial value with step set to 1, and 1:2 and 1:4 as the lower and higher levels of the third variable, respectively.
The experimental plan obtained by the application of the Box-Behnken design implemented in the Statistica software package and the experimentally determined response values are shown in Table 2 for both investigated DESs.
It can be noticed that biodiesel yields are generally much higher in the ChCl:Gly system. According to Gorke et al. [44], who reported on higher lipase activity in ChCl:Gly compared to ChCl:EG, the reason could be the stronger hydrogen-bonding network in ChCl:Gly. Namely, ChCl:Gly has three hydroxyl groups (strong HBD sites), while ChCl:EG is composed of two hydroxyl groups [31]. Those HBD sites lower the chemical potential of DES components which makes DESs suitable as solvents. That way, the components, more specifically ethylene glycol or glycerol, no longer have a negative impact on the enzyme and that effect is, therefore, more pronounced with ChCl:Gly [43]. Furthermore, extraction efficiencies are also higher when using ChCl:Gly in most experiments. That agrees with research performed by Šalić et al. [33], where the same extraction efficiencies were obtained for a significantly shorter residence time in continuous experiments, where ChCl:Gly was used as the reaction and extraction medium. As for the glycerol content, it can be observed that purity according to standards for the direct use of biodiesel, i.e., glycerol content lower than 0.02% [18], has been achieved in only one run (run 11-0.007%, Table 2). In other runs, glycerol content was significantly higher, which indicates the necessity of further optimization.
After the experiments were carried out, volume activity of lipase was measured in the phase containing DESs, because the enzyme, as well as glycerol and other possible byproducts of transesterification, is being separated by them [31]. Based on the results shown in Figure 2, there is no noticeable trend that would indicate which DES is most suitable. However, the highest volume activity was measured in run 8 with the DES ChCl:Gly (9:1 mass ratio of phases, 8.6% of water, 1:3 DES molar ratio). That can be explained by the significant impact of a certain amount of water on the activity and stability of lipase [22]. Furthermore, activity was not measured in runs 5, 6, 9, and 10 due to gel formation caused by high DES excess (10:90 mass ratio of phases). Considering all the presented results, the ChCl:Gly DES can be considered as a more suitable reaction medium compared to the ChCl:EG DES. Additionally, change in enzyme volume activity was not noticed during single experiments (30 min).
ChCl:Gly. Namely, ChCl:Gly has three hydroxyl groups (strong HBD sites), while ChCl:EG is composed of two hydroxyl groups [31]. Those HBD sites lower the chemical potential of DES components which makes DESs suitable as solvents. That way, the components, more specifically ethylene glycol or glycerol, no longer have a negative impact on the enzyme and that effect is, therefore, more pronounced with ChCl:Gly [43]. Furthermore, extraction efficiencies are also higher when using ChCl:Gly in most experiments. That agrees with research performed by Šalić et al. [33], where the same extraction efficiencies were obtained for a significantly shorter residence time in continuous experiments, where ChCl:Gly was used as the reaction and extraction medium. As for the glycerol content, it can be observed that purity according to standards for the direct use of biodiesel, i.e., glycerol content lower than 0.02% [18], has been achieved in only one run (run 11-0.007%, Table 2). In other runs, glycerol content was significantly higher, which indicates the necessity of further optimization.
After the experiments were carried out, volume activity of lipase was measured in the phase containing DESs, because the enzyme, as well as glycerol and other possible byproducts of transesterification, is being separated by them [31]. Based on the results shown in Figure 2, there is no noticeable trend that would indicate which DES is most suitable. However, the highest volume activity was measured in run 8 with the DES ChCl:Gly (9:1 mass ratio of phases, 8.6% of water, 1:3 DES molar ratio). That can be explained by the significant impact of a certain amount of water on the activity and stability of lipase [22]. Furthermore, activity was not measured in runs 5, 6, 9, and 10 due to gel formation caused by high DES excess (10:90 mass ratio of phases). Considering all the presented results, the ChCl:Gly DES can be considered as a more suitable reaction medium compared to the ChCl:EG DES. Additionally, change in enzyme volume activity was not noticed during single experiments (30 min). In accordance with RSM, a second-order polynomial equation was used to describe the relationship between the response (biodiesel yield (Y)) and three variables (water content (X1), DES composition (X2), and the mass ratio of phases (X3)). The estimated model parameters and ANOVA results are given in Table 3 and the RSM plot in Figure 3. According to Teng et al. [45], the variable has a significant impact on the response if p < 0.05. The results showed that water content in the linear (p < 0.0001) and quadratic term (p < 0.0001) has a significant positive effect on biodiesel yield in the ChCl:Gly system. Furthermore, it can be noticed that the phase mass ratio (X3) has a significant negative effect in In accordance with RSM, a second-order polynomial equation was used to describe the relationship between the response (biodiesel yield (Y)) and three variables (water content (X 1 ), DES composition (X 2 ), and the mass ratio of phases (X 3 )). The estimated model parameters and ANOVA results are given in Table 3 and the RSM plot in Figure 3. According to Teng et al. [45], the variable has a significant impact on the response if p < 0.05. The results showed that water content in the linear (p < 0.0001) and quadratic term (p < 0.0001) has a significant positive effect on biodiesel yield in the ChCl:Gly system. Furthermore, it can be noticed that the phase mass ratio (X 3 ) has a significant negative effect in the linear term (p = 0.0055) and a significant positive effect in the quadratic term (p < 0.0001). The results also showed the significant positive effect of the X 1 ·X 3 interaction term (p = 0.0009). Similar results were obtained for the model describing biodiesel yield in the ChCl:EG system, where the water content in the linear term (p < 0.0001), the phase ratio in the linear term (p < 0.0001), and the X 1 ·X 3 interaction term (p < 0.0001) showed a significant positive effect on biodiesel yield. To highlight the interactive effects of the independent variables on biodiesel yield, 3D response surfaces are presented in Figure 3. The plots were obtained by presenting the response variable versus two independent variables (the third was kept constant). For the ChCl:Gly system (Figure 3(a1-c1)), it can be noticed that biodiesel yield increases with the water content increase until the optimum water counter value is reached. Furthermore, biodiesel yield decreases with the increase in the mass ratio of phases. In case of the ChCl:EG system (Figure 3(a2-c2)), biodiesel yield increased with the water content increase, the DES composition increase, and the increase in the mass ratio of phases.
Based on the R 2 values of the developed RSM models (0.9452 for the ChCl:Gly system and 0.9541 for the ChCl:EG system), it can be concluded that the RSM models describe the experimental data with high precision. As previously presented by Le Man et al. [46], the model is considered adequate when R 2 > 0.75, which was achieved. Analysis of variance (ANOVA) showed that the proposed models were significant (p < 0.05) and that the F-values for the models were higher than the F-critical = 2.007 (F(ChCl:Gly) = 31.43, F(ChCl:EG) = 46.21).
Taking into account that the high R 2 value does not guarantee that the model will fit the data well, residual analysis was also performed. Results of the residual analysis are presented in Figure 4. Residuals were arranged nearly around the line (Figure 4(a1,a2)) and the histograms presenting the classification of residuals (Figure 4(c1,c2)) showed a specific bell shape, and therefore, the assumption on normality was convinced. Moreover, by analyzing the plots showing residuals versus predicted values (Figure 4(b1,b2)), it can be noticed that residuals were randomly distributed, demonstrating good agreement between model and experimental data. Residual analysis also showed that the order of the experimental run cannot change the results because residuals alter close to zero (Figure 4(d1,d2)). The obtained results indicated the reliability of the developed response surface model for the analyzed range of input variables.   specific bell shape, and therefore, the assumption on normality was convinced. Moreover, by analyzing the plots showing residuals versus predicted values (Figure 4(b1,b2)), it can be noticed that residuals were randomly distributed, demonstrating good agreement between model and experimental data. Residual analysis also showed that the order of the experimental run cannot change the results because residuals alter close to zero (Figure 4(d1,d2)). The obtained results indicated the reliability of the developed response surface model for the analyzed range of input variables.  Furthermore, optimization was performed based on the desirability profiles obtained from the RSM predicted values. The desirability scale in the range from 0 (undesirable) to 1 (very desirable) was used. Since the optimization of two processes was carried out, there were cases in which it was not possible to achieve the maximum response of both processes under the same conditions (process variables). In those cases, the optimal conditions were those that correspond to the maximum biodiesel yield since the values of (c1) Furthermore, optimization was performed based on the desirability profiles obtained from the RSM predicted values. The desirability scale in the range from 0 (undesirable) to 1 (very desirable) was used. Since the optimization of two processes was carried out, there were cases in which it was not possible to achieve the maximum response of both processes under the same conditions (process variables). In those cases, the optimal conditions were those that correspond to the maximum biodiesel yield since the values of glycerol extraction efficiency are generally high and their changes with the changes in process variables are not as pronounced as in the case of biodiesel yield. Therefore, the optimal conditions for integrated biodiesel synthesis and glycerol extraction regarding biodiesel yield were the following: water mass content 6.6%, molar ratio of DES constituents 1:3.5, and mass ratio of phases 1:1. The performance of the developed RSM model for the prediction of glycerol extraction regrading biodiesel yield was evaluated under selected optimal process conditions. As presented in Table 4 for experiment III, glycerol extraction regarding biodiesel yield of 43.54 ± 0.2% was obtained, which was not significantly different (p > 0.05) from the model-predicted value of 47.13%. It can be concluded that the RSM model can efficiently predict the glycerol extraction regarding biodiesel yield.

Artificial Neural Networks (ANN) Modelling
In order to additionally enhance the description and prediction of biodiesel yield, MLP models were proposed. The networks selected based on their performance are given in Table 5. For the system with the ChCl:Gly, MLP 3-9-1 was selected as the optimum. The described ANN ensured good agreement between the experimental data and the model-predicted data for training, testing, and validation (R 2 > 0.9900). The selected MLP was characterized by three neurons in the input layer, nine neurons in the hidden layer, and one neuron in the output layer, and the hidden activation function was exponential, while the output activation function was the identity function. The ANN selected as the optimum for the prediction of biodiesel yield in the system with the ChCl:EG was MLP 3-8-1 and it showed very good agreement between the model and the experiment for training, testing, and validation (R 2 > 0.9690). In order to determine the influence of input variables on the output, a global sensitivity analysis was performed. A higher global sensitivity coefficient corresponds to a higher influence of the input. It can be noticed that water content has the most significant effect on the biodiesel yield for both systems (global sensitivity coefficient around 60%), followed by the phase ratio with sensitivity around 30% ( Figure 5). As for the RSM model, the DES composition showed to be the least important variable.

Integrated Production and Purification of Biodiesel-Batch Reactor versus Microreactor
After the process optimization, three additional experiments on a laboratory shaker (t = 2 h, 400 rpm, and T = 40 °C) were performed. In Experiment I, the initial conditions were the same as in previous research [20,28]. After 2 h, the obtained yield was 61.61%, as presented in Table 4. In order to obtain biodiesel (Y > 96%), the process needs to be performed for 24 h [47]. As mentioned before, in order to enhance the process and to perform parallel biodiesel synthesis and purification, a DES was introduced in the system instead of a buffer. Two experiments were performed using a DES as the reaction and extraction medium. Experiment II was performed under initial conditions, while Experiments III and IV were performed under the optimal conditions. As can be seen from results shown in Table 4, in both reaction systems, batch and microreactor, for experiments performed with a DES (Experiments II, III, and IV), a slightly lower yield in comparison to Experiment I was obtained. The reason for this is probably a decrease in enzyme activity for reactions performed with a DES. According to Xu et al. [48], the constituting components of a DES can have an inhibitory effect on enzyme activity by changing the secondary structure of the enzyme.
On the other hand, although the biodiesel yield was lower, in all experiments performed with a DES, the mass fraction of glycerol in biodiesel was lower in comparison to

Integrated Production and Purification of Biodiesel-Batch Reactor versus Microreactor
After the process optimization, three additional experiments on a laboratory shaker (t = 2 h, 400 rpm, and T = 40 • C) were performed. In Experiment I, the initial conditions were the same as in previous research [20,28]. After 2 h, the obtained yield was 61.61%, as presented in Table 4. In order to obtain biodiesel (Y > 96%), the process needs to be performed for 24 h [47]. As mentioned before, in order to enhance the process and to perform parallel biodiesel synthesis and purification, a DES was introduced in the system instead of a buffer. Two experiments were performed using a DES as the reaction and extraction medium. Experiment II was performed under initial conditions, while Experiments III and IV were performed under the optimal conditions. As can be seen from results shown in Table 4, in both reaction systems, batch and microreactor, for experiments performed with a DES (Experiments II, III, and IV), a slightly lower yield in comparison to Experiment I was obtained. The reason for this is probably a decrease in enzyme activity for reactions performed with a DES. According to Xu et al. [48],