Process Optimization of Biodiesel from Used Cooking Oil in a Microwave Reactor: A Case of Machine Learning and Box–Behnken Design

: In the present investigation, response surface methodology (RSM) and machine learning (ML) are applied to the biodiesel production process via acid-catalyzed transesteriﬁcation and esteriﬁcation of triglyceride (TG). In order to optimize the production of biodiesel from used cooking oil (UCO) in a microwave reactor, these models are also compared. During the process, Box–Behnken design (BBD) and an artiﬁcial neural network (ANN) were used to evaluate the effect of the catalyst content (3.0–7.0 wt.%), methanol/UCO mole ratio (12:1–18:1), and irradiation time (5.0–9.0 min). The process conditions were adjusted and developed to predict the highest biodiesel yield using BBD with the RSM approach and an ANN model. With optimal process parameters of 4.94 wt.% catalyst content, 16.76:1 methanol/UCO mole ratio, and 8.13 min of irradiation time, a yield of approximately 98.62% was discovered. The coefﬁcient of determination (R 2 ) for the BBD model was found to be 0.9988, and the correlation coefﬁcient (R) for the ANN model was found to be 0.9994. According to the ﬁndings, applying RSM and ANN models is advantageous when optimizing the biodiesel manufacturing process as well as making predictions about it. This renewable and environmentally friendly process has the potential to provide a sustainable route for the synthesis of high-quality biodiesel from waste oil with a low cost and high acid value.


Introduction
In recent years, the consumption of energy has significantly increased as a result of a shift toward less traditional ways of living as well as a general rise in the world's population. The upward trend in energy demand has been met by an increase in the utilization of petroleum fuels, which is having a devastating effect on the environment in the form of increased temperatures caused by global warming and a reduction in the amount of forest cover. The use of fossil fuels as a source of energy is fraught with constraints. Because of this, there has been a quest for an alternative fuel that can be replenished, such as biofuel, because the demand for energy is growing at such a rapid rate [1].
Biodiesel's appeal as a replacement fuel source has increased as a result of the ongoing petroleum product crisis. Biodiesel is a renewable fuel that is also biodegradable, is environmentally friendly, has low emissions, and is non-toxic; it may be used in conventional diesel engines [2]. The production of biodiesel can be carried out through either a homogenous or a heterogenous process. Homogeneous synthesis, which exhibits high levels of catalytic activity, typically involves the employment of chemical catalysts. However, there are several drawbacks, such as the inevitability of the generation of wastewater during the washing process, which cannot be recycled, and the fact that when homogeneous catalysts are employed, a one-step procedure is typically insufficient to create high-quality biodiesel [3].
Environmental restrictions and streamlining of current processes are driving a shift away from homogeneous catalysts toward predominantly heterogeneous catalysts. There is no longer any need to remove water from the commercial biodiesel production process or neutralize homogeneous catalysts when using heterogeneous catalysts. In addition, solid catalysts are simple to recycle, since they can be filtered out of the reaction mixture [4]. There are a variety of methods that could be used to increase the quantity and quality of biodiesel production from biomass sources. These primarily depend on the synthesis and quality monitoring of the production, with esterification and transesterification being the most common and cost-effective techniques [5].
The processes of transesterification and esterification are both dependent on the conditions of the reaction. The values of these reaction parameters have a direct impact on the biodiesel production process as well as the amount of fatty acid methyl ester (FAME) produced. Response surface methodology (RSM) was applied to conduct a thorough evaluation of the effects that input parameters have on output values. Utilizing this method will allow producing experiment matrices that are dependent on the input parameters one provides. This will allow attaining the best possible outcomes. RSM has been utilized by a number of studies for the purpose of optimizing yields by collecting appropriate comparisons of reaction parameters, which has finally resulted in lower costs, material reductions, and time savings [6].
An artificial neural network (ANN) is a method of prediction and modeling that has shown to be effective. It is a machine learning (ML) technique that was developed by simulating the functioning of the human brain. An ANN is a useful tool for problemsolving in the fields of engineering and research, particularly in situations where traditional modeling methods are ineffective, such as when a problem is nonlinear or complex. The performance of biodiesel-based fuels may be predicted by an ANN that has been trained, tested, and verified using data. This type of ANN could also be used to increase biodiesel production by increasing the yield of FAME through optimization [7].
This study describes a method for producing biodiesel from used cooking oil (UCO) in a microwave reactor using heterogeneous catalysts made from acid-activated forms of palm seed cake (PSC). To improve the biodiesel production process, RSM based on Box-Behnken design (BBD) and ML based on ANN algorithms are used. They are utilized to assess a wide range of variables (including catalyst content, methanol/UCO mole ratio, and irradiation time), as well as their interactions, and to reduce the number of required experimental trials in order to carry out the experiment more quickly and accurately. Because of this, BBD and ANN are superior to other systems in terms of their ability to forecast, effectiveness at parameter adjustment, and number of required repetitions. That is, the novelty of this research is that it applies BBD and ANN analytical tools to the UCO biodiesel process with a sulfonated palm seed cake (SPSC) catalyst by making useful models and judging how well those models work.

Materials
The UCO feedstock, which had a high free fatty acid (FFA) concentration, was received for free from a number of eateries located in the vicinity of Silpakorn University in Nakhon Pathom, Thailand. It was first filtered to remove any contaminants, and then, it was heated in an oven at a temperature of 100 • C for 0.5 h in order to evaporate any remaining moisture. The palm seed cake (PSC) was acquired from Absolute Palm Co., Ltd., Bangkok, Thailand. Sulfonic acid (SO 3 H), zinc chloride (ZnCl 2 ) and methanol were all analyticalgrade chemicals (Merck Ltd., Bangkok, Thailand, better than 99% purity) that were utilized precisely as supplied. In our previous publication [8], we described the preparation and characterization of the SPSC catalyst used in this study for biodiesel production.

Biodiesel Synthesis from UCO in a Microwave Reactor
The following is a description of the experimental procedure that was employed for the synthesis of biodiesel as displayed in Figure 1. The processes of transesterification and esterification of triglyceride (TG) were carried out in a glass reactor with a capacity of 250 mL, which was fitted with a condenser and a mechanical stirrer and put inside of a home microwave oven manufactured by Samsung in Korea. The pressure in the microwave reactor was kept at atmospheric level. Following the addition of the constant 50 g of UCO and the required amount of the synthesized SPSC catalysts (at catalyst content of 3.0, 5.0, and 7.0 wt.%), the methanol was then added to the waste oil at varied methanol/UCO molar ratios of 12:1, 15:1, and 18:1. Under the influence of microwave irradiation, the reaction was carried out at 800 W for varying amounts of time in the range of 5.0-9.0 min before it was abruptly terminated by being rapidly cooled in an ice bath [9]. Gas chromatographymass spectrometry (GC-MS, QP2010 Plus, Shimadzu Corporation, Japan) was utilized to determine the biodiesel's composition. The instrument was fitted with a flame ionization detector and a capillary GC column (DB-WAX, Carbowax 20M, 30 m × 0.32 mm × 0.25 µm) utilizing the inner standard method described by Buasri et al. [10]. The temperature ranged from approximately 60 • C to 325 • C. The yield of UCO biodiesel was determined by first calculating the weight of UCO biodiesel, then dividing that weight by the weight of UCO, and finally multiplying that number by 100 to obtain the %yield of biodiesel.

Biodiesel Synthesis from UCO in a Microwave Reactor
The following is a description of the experimental procedure that was em the synthesis of biodiesel as displayed in Figure 1. The processes of transesterifi esterification of triglyceride (TG) were carried out in a glass reactor with a cap mL, which was fitted with a condenser and a mechanical stirrer and put insid microwave oven manufactured by Samsung in Korea. The pressure in the mic actor was kept at atmospheric level. Following the addition of the constant 5 and the required amount of the synthesized SPSC catalysts (at catalyst conten and 7.0 wt.%), the methanol was then added to the waste oil at varied met molar ratios of 12:1, 15:1, and 18:1. Under the influence of microwave irradiat action was carried out at 800 W for varying amounts of time in the range of before it was abruptly terminated by being rapidly cooled in an ice bath [9]. G tography-mass spectrometry (GC-MS, QP2010 Plus, Shimadzu Corporation, utilized to determine the biodiesel's composition. The instrument was fitted w ionization detector and a capillary GC column (DB-WAX, Carbowax 20M, 30 m × 0.25 µm) utilizing the inner standard method described by Buasri et al. [10 perature ranged from approximately 60 °C to 325 °C. The yield of UCO bio determined by first calculating the weight of UCO biodiesel, then dividing tha the weight of UCO, and finally multiplying that number by 100 to obtain th biodiesel.

Design of Experiments (DoE) by BBD Modeling
In order to obtain the highest quality biodiesel yield from the transesterifi esterification process, it is necessary to take into account a variety of process [11]. Some of these factors include the amount of catalyst content, the mole rat anol to UCO, and the amount of time spent under irradiation. As a result, the carried out in accordance with a DoE that was created using Design-Expert version 13 (Stat-Ease, Inc., Minneapolis, Minnesota, United States of America) strated in Table 1. The RSM optimization strategy was used with aid from B trials were carried out in a randomized way by adjusting the values of the pro bles in accordance with the DoE. To assess the model's fit, the analysis (ANOVA) test was used [12].

Design of Experiments (DoE) by BBD Modeling
In order to obtain the highest quality biodiesel yield from the transesterification and esterification process, it is necessary to take into account a variety of process parameters [11]. Some of these factors include the amount of catalyst content, the mole ratio of methanol to UCO, and the amount of time spent under irradiation. As a result, the tests were carried out in accordance with a DoE that was created using Design-Expert ® Software, version 13 (Stat-Ease, Inc., Minneapolis, Minnesota, United States of America), as demonstrated in Table 1. The RSM optimization strategy was used with aid from BBD, and 20 trials were carried out in a randomized way by adjusting the values of the process variables in accordance with the DoE. To assess the model's fit, the analysis of variance (ANOVA) test was used [12]. ANN are a subfield of artificial intelligence (AI) or ML, two branches of computer science that aim to create technology that mimics human intellect. AI is being applied across a wide variety of industries to find solutions to difficult and nonlinear issues. ANN is a type of algorithm that attempts to mimic the working of the neurological central systems of animals, most notably the brain. An ANN is able to learn from previous experiences, is fault-tolerant, and can process data that is noisy and complex. After being trained, an ANN is able to improve upon the information it was initially created to anticipate while also making accurate predictions of new data [13]. For modeling of the process parameters of the acid-catalyzed transesterification and esterification reaction, a feed-forward backpropagation (BP) multi-layer perception (MLP) neural network analysis is performed using the Levenberg-Marquardt (LM) algorithm [14]. MATLAB ® software R2020b 9.9.0.1467703 (MathWorks, Inc., Natick, MA, USA) employs the neural network utility for this purpose. The training parameters of the ANN are presented in Table 2. The application of the ANN with the LM algorithm consisted of 3 stages based on a set of input and output data of the DoE with replication. These stages were then subdivided into 3 subsets and referred to as training, testing, and validation, respectively [15]. In addition to analyzing the interactive effects of input variables on yield of biodiesel, suitable models were also developed [16]. The procedure for manufacturing biodiesel utilizing an SPSC catalyst from UCO and methanol in a microwave reactor is depicted in Figure 2. This procedure was improved using BBD and ANN modeling. Table 2. Process parameters of ANN training, modeling, and optimization for biodiesel production [15].

Property
Value/Comment The data in ANN modeling were randomly partitioned into 3 subsets: training, validation, and testing data. During the first step, 70% of the data from the experimental dataset were randomly selected, and the weighted parameters of the connections were refined until the mean squared error (MSE) between experimental and expected biodiesel yield was reached. In the second step, 15% of the data were chosen at random to test the "trained", and the ANN employed the weighted parameters computed in the previous stage. Finally, in the third stage, 15% of the remaining data subsets were utilized to validate the final estimation of biodiesel yield using the previously mentioned ANN constructed in two steps [17,18]. The experimental data that have been gathered may be utilized to make predictions about the yield for datasets that have not yet been collected, as well as about the experimental conditions that will provide the highest yield. The training dataset typically comprises the experimental values or data that are input, as well as the experimental findings that are output. This type of dataset is used to understand the relation between the input and output functions. A portion of the experimental dataset is used for training, and this portion, which is referred to as the training dataset, is used [19].
ChemEngineering 2023, 7, x FOR PEER REVIEW 5 of 19 constructed in two steps [17,18]. The experimental data that have been gathered may be utilized to make predictions about the yield for datasets that have not yet been collected, as well as about the experimental conditions that will provide the highest yield. The training dataset typically comprises the experimental values or data that are input, as well as the experimental findings that are output. This type of dataset is used to understand the relation between the input and output functions. A portion of the experimental dataset is used for training, and this portion, which is referred to as the training dataset, is used [19].

Modeling and Optimization of Biodiesel Process Using RSM
The BBD was used in a total of 20 different tests in order to optimize the three most important transesterification and esterification variables. These factors were the catalyst content, the methanol-to-oil mole ratio, and the irradiation time. The experimental design is presented in Table 3, together with the actual and predicted %FAME content values.
The maximum yield of biodiesel was achieved with a catalyst loading of 7.0 wt.% and a methanol/UCO mole ratio of 18:1 after a reaction time of 7 min. Nevertheless, the lowest biodiesel yield was obtained with a methanol/UCO mole ratio of 12:1, an irradiation period of 5 min, and a catalyst component of 5 wt.%. In order to provide an accurate forecast of the amount of biodiesel that may be generated, the experimental data were put through a series of nonlinear regression analyses, which led to the development of a quadratic model (Equation (1)).
where Y denotes the responses (biodiesel yield) that have been forecasted, and the letters A, B, and C stand for the code values that have been assigned to the test variables of Figure 2. Schematic of making biodiesel from UCO and methanol with an SPSC catalyst in a microwave reactor using BBD and ANN modeling.

Modeling and Optimization of Biodiesel Process Using RSM
The BBD was used in a total of 20 different tests in order to optimize the three most important transesterification and esterification variables. These factors were the catalyst content, the methanol-to-oil mole ratio, and the irradiation time. The experimental design is presented in Table 3, together with the actual and predicted %FAME content values.  The maximum yield of biodiesel was achieved with a catalyst loading of 7.0 wt.% and a methanol/UCO mole ratio of 18:1 after a reaction time of 7 min. Nevertheless, the lowest biodiesel yield was obtained with a methanol/UCO mole ratio of 12:1, an irradiation period of 5 min, and a catalyst component of 5 wt.%. In order to provide an accurate forecast of the amount of biodiesel that may be generated, the experimental data were put through a series of nonlinear regression analyses, which led to the development of a quadratic model (Equation (1)).
where Y denotes the responses (biodiesel yield) that have been forecasted, and the letters A, B, and C stand for the code values that have been assigned to the test variables of catalyst content, methanol/UCO mole ratio, and irradiation time, respectively. The interaction terms are denoted by the letters AB, AC, and BC, whereas the quadratic terms are denoted by the letters A 2 , B 2 , and C 2 . A synergistic impact is indicated by a positive parameter in a regression equation. This type of impact occurs when the result grows as the amount of input from independent variables increases. On the other hand, a negative sign indicates the opposite effect, which is a situation in which the response improves as the number of input factors decreases [20].
The results of an ANOVA testing the BBD model's appropriateness and suitability are presented in Table 4. The fact that the model has an F-value of 909.89 indicates that it is significant. A noise level of this magnitude would only have a 0.01% probability of producing an F-value of this magnitude. According to the results of the regression analysis, all three of the parameters had a substantial influence on the FAME content. This conclusion is supported by the p-values. If the p-value for a model term is less than 0.0500, then it can be considered significant. The F-value for the Lack of Fit is 681.75, which indicates that the Lack of Fit is significant. There is just a 0.01% possibility that a Lack of Fit F-value that high might be caused by noise. This probability is extremely low. The regression model gives an accurate description of the experimental data, demonstrating that there is a successful correlation between the three transesterification/esterification process parameters that affect the amount of biodiesel produced [21].  Figure 3 presents the results of a comparison between the data obtained through experimentation and the data that the empirical BBD model predicted. The determination coefficient (R 2 ), the adjusted determination coefficient (R 2 adj ), and the predicted determination coefficient (R 2 pred ), each came in at 0.9988, 0.9977, and 0.9805, respectively. The high values for all of the determination coefficients provide evidence that the BBD modeling has a high level of significance, and they provide support for the existence of an outstanding correlation between the independent variables. During this time period, the coefficient of variation (C.V.) was equal to 1.04%. The C.V. had a value that was quite low, which is an indication that this fitted model is more predictable [22].  Figure 3 presents the results of a comparison between the data obtaine perimentation and the data that the empirical BBD model predicted. The coefficient (R 2 ), the adjusted determination coefficient (R 2 adj), and the pred nation coefficient (R 2 pred), each came in at 0.9988, 0.9977, and 0.9805, respecti values for all of the determination coefficients provide evidence that the B has a high level of significance, and they provide support for the existence o ing correlation between the independent variables. During this time period, of variation (C.V.) was equal to 1.04%. The C.V. had a value that was quite an indication that this fitted model is more predictable [22]. The three-dimensional (3D) surface plots and interaction plots show were used to explore the interactions that occurred between the three param content, methanol/UCO mole ratio, and irradiation time) that were studi transesterification and esterification of the UCO. This allowed for the possib observations being made. Using Design-Expert ® Software (version 13), we create the 3D response surface as well as the interaction plots between para The three-dimensional (3D) surface plots and interaction plots shown in Figure 4 were used to explore the interactions that occurred between the three parameters (catalyst content, methanol/UCO mole ratio, and irradiation time) that were studied during the transesterification and esterification of the UCO. This allowed for the possibility of visual observations being made. Using Design-Expert ® Software (version 13), we were able to create the 3D response surface as well as the interaction plots between parameters of biodiesel yield for all of the design circumstances.
produced. The conversion of TG rose from more than 44% to more than 98% throughout this time period. The amount of biodiesel produced is proportional to the mole ratio of methanol to oil and can greatly rise. The catalyst level of 7.0 wt.% and a methanol/UCO mole ratio of 12:1 were found to produce the lowest yield. Based on the data presented, it appears that the mole ratio of methanol to oil had a more substantial impact on the generation of biodiesel than the catalyst content did. The equilibrium of the reaction determines whether a transesterification and esterification reaction may be reversed or not. Reversible reactions are controlled by equilibrium. For this reason, the mole ratio of methanol to UCO needs to be greater than the stoichiometric amount in order to achieve a satisfactory level of final TG conversion [23].  From graphs, it can be determined that biodiesel yield is dependent on input variables. Reaction time under irradiation is a crucial factor in the production of UCO biodiesel, as it influences the rate of transesterification and esterification reaction. According to the 3D surface responses, biodiesel production increases rapidly during the initial phases of the manufacturing process but then levels off to a negligible level. This process can be The surface plot reveals an interaction between the amount of catalyst present and the mole ratio of methanol to UCO, which has a major impact on the amount of biodiesel produced. The conversion of TG rose from more than 44% to more than 98% throughout this time period. The amount of biodiesel produced is proportional to the mole ratio of methanol to oil and can greatly rise. The catalyst level of 7.0 wt.% and a methanol/UCO mole ratio of 12:1 were found to produce the lowest yield. Based on the data presented, it appears that the mole ratio of methanol to oil had a more substantial impact on the generation of biodiesel than the catalyst content did. The equilibrium of the reaction determines whether a transesterification and esterification reaction may be reversed or not. Reversible reactions are controlled by equilibrium. For this reason, the mole ratio of methanol to UCO needs to be greater than the stoichiometric amount in order to achieve a satisfactory level of final TG conversion [23].
From graphs, it can be determined that biodiesel yield is dependent on input variables. Reaction time under irradiation is a crucial factor in the production of UCO biodiesel, as it influences the rate of transesterification and esterification reaction. According to the 3D surface responses, biodiesel production increases rapidly during the initial phases of the manufacturing process but then levels off to a negligible level. This process can be characterized by the fact that, in the early stages, microwave irradiation facilitated the thermal collection of the reaction mixture, which led to the efficient production of biodiesel. Following that, the production of biodiesel decreases abruptly. The concentration of the catalyst can have an effect on biodiesel production. In accordance with the results, increasing the concentration of the catalyst accelerates production. This is attributable to the fact that a higher concentration of catalyst results in the formation of stronger nucleophiles in the system through the deportation of alcohol, thereby increasing biodiesel production. The significance of catalyst concentration is evidently demonstrated by these results [24].
The elliptical contour of the surface response map indicates that there is a significant relationship between the surface response chart's components. In addition to lowering yield, a catalyst concentration that is too high (more than 5.0 wt.%) can make it difficult to separate the aqueous layers while washing. An excessive amount of catalyst will also result in the production of biodiesel that is extremely viscous and cannot be used as a fuel for motors. At a catalyst concentration of 5.0 wt.%, the production of biodiesel results in the highest possible yield. In addition, there was an insufficient concentration of the catalyst used in the reaction, which led to a reduction in the amount of FAME that was produced [6].
Increases in both the methanol/UCO mole ratio and the irradiation time resulted in a greater percentage yield of FAME when the catalyst content was held constant. Also, increasing the alcohol/oil molar ratio initially improved the UCO biodiesel yield significantly in a shorter reaction time. Raising the percentage of methanol in the reaction medium with longer reaction times has minimal influence on biodiesel yield, and doing so decreases biodiesel production even more. Since the reaction is complete and equilibrium has been reached, the %yield of FAME has declined, since too much alcohol destroyed the catalyst activity, reducing its effectiveness. In addition, increasing the irradiation time has a significant impact on biodiesel yield, provided that the mole ratio of methanol to waste oil remains unchanged [25].
Using the numerical optimization capability of Design-Expert ® Software, it was possible to determine the ideal values for three variables: the catalyst content (A), the methanol/UCO mole ratio (B), and the irradiation time (C). With the assistance of RSM consisting of three components and three levels of BBD, the optimization of reaction variables was successfully accomplished. The optimization module found in Design-Expert will seek a combination of factor levels that will simultaneously satisfy the criteria that have been imposed on each of the replies and the factors [26]. According to the information presented in Figure 5, each of the variables and the responses pertaining to the upper-and lower-limit experimental range need to be in accordance with the creations defined for the best operating environment [27]. The regression model of the numerical technique predicted that a catalyst concentration of 4.94 wt.%, a methanol/UCO mole ratio of 16.76:1, and an irradiation time of 8.13 min would result in the highest possible biodiesel production of 98.62%.
imposed on each of the replies and the factors [26]. According to the information presented in Figure 5, each of the variables and the responses pertaining to the upper-and lower-limit experimental range need to be in accordance with the creations defined for the best operating environment [27]. The regression model of the numerical technique predicted that a catalyst concentration of 4.94 wt.%, a methanol/UCO mole ratio of 16.76:1, and an irradiation time of 8.13 min would result in the highest possible biodiesel production of 98.62%. The desirability contour plots and the percentage yield of FAME in the synthesis of UCO biodiesel under optimal reaction conditions are depicted in Figure 6, which makes use of BBD modeling. Each estimated response is then converted into a unitless utility that is bounded by a desirability value that is between 0 and 1, according to the desirability approach. A response value that is higher on the desirability scale suggests that it is more desirable [1]. In order to verify that this particular combination is the most effective one, there were three distinct tests conducted [28]. According to the findings, the overall response effectiveness was 98%, which is extremely similar to the predictions that were given by the model. As a consequence of this, the model that BBD modeling generated was assessed, and it was found to be accurate and effective for estimating the percentage yield of biodiesel that was obtained from UCO in a microwave reactor. This was accomplished through the use of a model that was shown to be accurate and efficient [29]. The desirability contour plots and the percentage yield of FAME in the synthesis of UCO biodiesel under optimal reaction conditions are depicted in Figure 6, which makes use of BBD modeling. Each estimated response is then converted into a unitless utility that is bounded by a desirability value that is between 0 and 1, according to the desirability approach. A response value that is higher on the desirability scale suggests that it is more desirable [1]. In order to verify that this particular combination is the most effective one, there were three distinct tests conducted [28]. According to the findings, the overall response effectiveness was 98%, which is extremely similar to the predictions that were given by the model. As a consequence of this, the model that BBD modeling generated was assessed, and it was found to be accurate and effective for estimating the percentage yield of biodiesel that was obtained from UCO in a microwave reactor. This was accomplished through the use of a model that was shown to be accurate and efficient [29].
Model validation, which serves the dual function of checking the accuracy of the model as well as the interpretation of the experimental data, often makes use of an adequacy check as one of its methods of data analysis. A mathematical model that has been shown to be accurate to a very high degree can be used to design an acceptable strategy for the actual process [30]. The DoE and the implications of any residual data from the biodiesel synthesis process are graphically represented in Figure 7, which is also included in this report. This demonstrates that the BBD modeling does not contain any errors that were not foreseen by the designers. According to the plot findings that are adequate, which can be seen in diagnostic plots for BBD modeling adequacy, the empirical model is acceptable for describing and optimizing the biodiesel production process of UCO utilizing solid catalyst in a microwave reactor and BBD-based RSM. This is because the empirical model utilizes solid catalyst in a microwave reactor. ChemEngineering 2023, 7, x FOR PEER REVIEW 11 of 19 Figure 6. The desirability contour plots and %biodiesel yield at optimal reaction conditions using BBD modeling. Figure 6. The desirability contour plots and %biodiesel yield at optimal reaction conditions using BBD modeling.
were not foreseen by the designers. According to the plot findings that are ad which can be seen in diagnostic plots for BBD modeling adequacy, the empirical m acceptable for describing and optimizing the biodiesel production process of UCO ing solid catalyst in a microwave reactor and BBD-based RSM. This is because the ical model utilizes solid catalyst in a microwave reactor.

Modeling and Regression of Biodiesel Process Using ANN
In the present investigation, a feed-forward BP of an ANN model was built conversion of UCO to biodiesel using MATLAB ® software. The input parameters model include the amount of catalyst present, the mole ratio of methanol to UCO, a amount of irradiation time. There are 3 neurons in the network's input layer, 1 ne the network's output layer, and 10 neurons in the network's hidden layer. The t functions known as TANSIG and PURELIN are used to model the neurons in the layer and output layer, respectively. In order to train the network, the LM trainin rithm was utilized, and the MSE was chosen to serve as the performance functi

Modeling and Regression of Biodiesel Process Using ANN
In the present investigation, a feed-forward BP of an ANN model was built for the conversion of UCO to biodiesel using MATLAB ® software. The input parameters for this model include the amount of catalyst present, the mole ratio of methanol to UCO, and the amount of irradiation time. There are 3 neurons in the network's input layer, 1 neuron in the network's output layer, and 10 neurons in the network's hidden layer. The transfer functions known as TANSIG and PURELIN are used to model the neurons in the hidden layer and output layer, respectively. In order to train the network, the LM training algorithm was utilized, and the MSE was chosen to serve as the performance function that needed to be minimized (the default). There were 20 data points utilized for the ANN modeling, of which 70% was used for training, 15% was utilized for validation, and 15% was utilized for testing. For the purpose of converting UCO into biodiesel in a microwave reactor, the MSE and correlation coefficient (R) were used to assess the performance of the ANN modeling [31]. Training and learning are integral parts of the network's operational procedure in its entirety [11]. For the purpose of this inquiry, a feed-forward BP network model with three layers was used. As can be seen in Figure 8, this model includes input, hidden, and output layers. Through a process of trial and error, the ideal number of hidden neurons was carefully determined. In order to accomplish this goal, investigation into the number of hidden neurons was conducted in order to design the network architecture. After that, every single one of these hidden neurons underwent training on multiple occasions, and they were further instructed to produce the highest value of R and the lowest output error based on MSE [32]. The ANN topology network (3-10-1) was determined to be the most effective one for the estimation of the amount of biodiesel that can be produced from UCO in a microwave reactor. needed to be minimized (the default). There were 20 data points utilized for the ANN modeling, of which 70% was used for training, 15% was utilized for validation, and 15% was utilized for testing. For the purpose of converting UCO into biodiesel in a microwave reactor, the MSE and correlation coefficient (R) were used to assess the performance of the ANN modeling [31]. Training and learning are integral parts of the network's operational procedure in its entirety [11]. For the purpose of this inquiry, a feed-forward BP network model with three layers was used. As can be seen in Figure 8, this model includes input, hidden, and output layers. Through a process of trial and error, the ideal number of hidden neurons was carefully determined. In order to accomplish this goal, investigation into the number of hidden neurons was conducted in order to design the network architecture. After that, every single one of these hidden neurons underwent training on multiple occasions, and they were further instructed to produce the highest value of R and the lowest output error based on MSE [32]. The ANN topology network (3-10-1) was determined to be the most effective one for the estimation of the amount of biodiesel that can be produced from UCO in a microwave reactor. The connection between the output and target data is demonstrated in Figure 9. As can be seen, a correlation may be drawn between the data using the straight lines. The training R is 1, while the validation R is 0.9999, and the testing R is 0.9989. In addition, R values for regression are used to determine how closely outputs and goals are correlated with one another. A close association can be shown by a R value of 1, while a random relationship can be indicated by a R value of 0. As a result, in terms of correlation, the prediction made using ANN modeling is significant, with an overall R value of 0.9994. The trainlm algorithm often takes a greater amount of memory but significantly less processing time. When there is no longer any generalization improvement, which may be determined by an increase in the MSE of the validation samples, training will automatically come to an end. The average squared deviation from the targets in terms of the outputs is what is meant by the term MSE. Lower values are better, and zero signifies no error [33]. Figure 10 is a representation of the best validation performance, which was generated from the curve of a different period. According to what has been demonstrated, the best validation performance is 0.0085 at the fifth of six epochs (green circle). The performance plot demonstrates no overfitting. The validation (green) and test (red) curves are comparable and near the best-fitting curve. In addition, it is notable that as the MSE value approaches zero, the prediction performance is enhanced [34]. Furthermore, the error histogram is one of the tools that may be utilized in order to gain further information on the neural network. The error histogram that was obtained for the regression curves pertaining to the selected network is depicted in Figure 11. An accurate signal of the values of the outliers was acquired, as can be shown. The connection between the output and target data is demonstrated in Figure 9. As can be seen, a correlation may be drawn between the data using the straight lines. The training R is 1, while the validation R is 0.9999, and the testing R is 0.9989. In addition, R values for regression are used to determine how closely outputs and goals are correlated with one another. A close association can be shown by a R value of 1, while a random relationship can be indicated by a R value of 0. As a result, in terms of correlation, the prediction made using ANN modeling is significant, with an overall R value of 0.9994. The trainlm algorithm often takes a greater amount of memory but significantly less processing time. When there is no longer any generalization improvement, which may be determined by an increase in the MSE of the validation samples, training will automatically come to an end. The average squared deviation from the targets in terms of the outputs is what is meant by the term MSE. Lower values are better, and zero signifies no error [33]. Figure 10 is a representation of the best validation performance, which was generated from the curve of a different period.
According to what has been demonstrated, the best validation performance is 0.0085 at the fifth of six epochs (green circle). The performance plot demonstrates no overfitting. The validation (green) and test (red) curves are comparable and near the best-fitting curve. In addition, it is notable that as the MSE value approaches zero, the prediction performance is enhanced [34]. Furthermore, the error histogram is one of the tools that may be utilized in order to gain further information on the neural network. The error histogram that was obtained for the regression curves pertaining to the selected network is depicted in Figure 11. An accurate signal of the values of the outliers was acquired, as can be shown. Figure 12 shows a graph plot comparing the experimental data for biodiesel yields with the value calculated by the BDD and ANN modeling. This comparison can be found in the chart. It demonstrates that the results of both BDD and ANN modeling match the experimental values with a low amount of error. The BBD and ANN models' predicted values were within 3% of the actual value of the experiment, showing that the established models had good accuracy and were able to accurately forecast the obtained yield of biodiesel [35]. ChemEngineering 2023, 7, x FOR PEER REVIEW 14 of 19 Figure 9. Regression plots of training, validation, test, and overall data for ANN modeling.      Figure 11. Error histogram of the selected network for ANN modeling. Figure 12 shows a graph plot comparing the experimental data for biodiesel yields with the value calculated by the BDD and ANN modeling. This comparison can be found in the chart. It demonstrates that the results of both BDD and ANN modeling match the experimental values with a low amount of error. The BBD and ANN models' predicted values were within 3% of the actual value of the experiment, showing that the established models had good accuracy and were able to accurately forecast the obtained yield of biodiesel [35]. In addition, the efficiency of the generated BBD and ANN models in predicting biodiesel yield was assessed using mean absolute error (MAE) and average absolute deviation (AAD). MAE and AAD evaluate the precision and accuracy of a model. Low values were obtained for both MAE and AAD, indicating that the models fit well. The lower these statistical indicators are, the greater the model's performance [23,36]. RSM models had MAE and AAD values of 0.3995 and 0.5485, respectively, whereas ANN models had lower MAE and AAD values than RSM, which were 0.0460 and 0.0570, respectively. Based on the results of the statistical indices, the ANN model performed better than the RSM model.  Figure 12 shows a graph plot comparing the experimental data for biodiesel yields with the value calculated by the BDD and ANN modeling. This comparison can be found in the chart. It demonstrates that the results of both BDD and ANN modeling match the experimental values with a low amount of error. The BBD and ANN models' predicted values were within 3% of the actual value of the experiment, showing that the established models had good accuracy and were able to accurately forecast the obtained yield of bio diesel [35]. In addition, the efficiency of the generated BBD and ANN models in predicting bio diesel yield was assessed using mean absolute error (MAE) and average absolute devia tion (AAD). MAE and AAD evaluate the precision and accuracy of a model. Low values were obtained for both MAE and AAD, indicating that the models fit well. The lower these statistical indicators are, the greater the model's performance [23,36]. RSM models had MAE and AAD values of 0.3995 and 0.5485, respectively, whereas ANN models had lower MAE and AAD values than RSM, which were 0.0460 and 0.0570, respectively. Based on the results of the statistical indices, the ANN model performed better than the RSM model Furthermore, the model prediction was carried out using the ANN model, which ob tained a high R value. This confirmed that the ANN modeling had a superior generaliza tion ability to forecast biodiesel yield than the BBD modeling. The findings described here are in agreement with those discovered by previous researchers [11,18,37]. Therefore, i can be stated that RSM and ML techniques are effective methods for predicting the amount of biodiesel produced under various transesterification and esterification reaction conditions in a microwave reactor. Table 5 displays the experimental findings that were validated for BBD and ANN models. The biodiesel yield was predicted by the BBD modeling to be 98.62%, whereas i was 98.53% under different circumstances when using ANN modeling. It was found tha 98% biodiesel yield was achieved at the two optimum conditions of 4.94 wt.% catalys content (A), 16.76:1 methanol/UCO mole ratio (B), and 8.13 min of irradiation time (C) for the BBD model and 7 wt.% catalyst content, 18:1 methanol/UCO mole ratio, and 7 min o irradiation time for the ANN model. For the examination of the catalyst's reusability, the same BBD-model-optimized conditions are employed. The reusability of the heterogeneous solid acid catalyst is one of the most importan advantages of employing this type of catalyst. A catalyst that can go through more reuse Furthermore, the model prediction was carried out using the ANN model, which obtained a high R value. This confirmed that the ANN modeling had a superior generalization ability to forecast biodiesel yield than the BBD modeling. The findings described here are in agreement with those discovered by previous researchers [11,18,37]. Therefore, it can be stated that RSM and ML techniques are effective methods for predicting the amount of biodiesel produced under various transesterification and esterification reaction conditions in a microwave reactor. Table 5 displays the experimental findings that were validated for BBD and ANN models. The biodiesel yield was predicted by the BBD modeling to be 98.62%, whereas it was 98.53% under different circumstances when using ANN modeling. It was found that 98% biodiesel yield was achieved at the two optimum conditions of 4.94 wt.% catalyst content (A), 16.76:1 methanol/UCO mole ratio (B), and 8.13 min of irradiation time (C) for the BBD model and 7 wt.% catalyst content, 18:1 methanol/UCO mole ratio, and 7 min of irradiation time for the ANN model. For the examination of the catalyst's reusability, the same BBD-model-optimized conditions are employed. The reusability of the heterogeneous solid acid catalyst is one of the most important advantages of employing this type of catalyst. A catalyst that can go through more reuse cycles without needing to be reactivated is considered to be more stable [38]. Figure 13 depicts the outcome of the experiment, which shows that the SPSC catalyst was successful in completing up to five cycles, with a final biodiesel yield of 90%, under optimal reaction conditions (4.94 wt.% catalyst content, 16.76:1 methanol/UCO mole ratio, and 8.13 min of irradiation time). As a result, it was demonstrated that the PSC is an excellent use of bio-based material as a precursor for acid catalyst synthesis, which may be utilized for the esterification and transesterification of UCO. Because sulfonated bio-based catalysts are able to complete multiple reaction cycles while maintaining their stability [39], their cost-effectiveness is highlighted. irradiation time). As a result, it was demonstrated that the PSC is an excellent use of bio based material as a precursor for acid catalyst synthesis, which may be utilized for the esterification and transesterification of UCO. Because sulfonated bio-based catalysts are able to complete multiple reaction cycles while maintaining their stability [39], their cost effectiveness is highlighted.
The agricultural, food, chemical, and energy industries could all stand to benefit eco nomically from the possibility of producing biofuel and heterogeneous catalysts through the utilization of waste oil and agricultural biomass [40].

Conclusions
In the present study, the BBD of RSM and ANN of ML approaches were successfully employed for the purpose of predicting and optimizing the process parameters for the synthesis of biodiesel from UCO in a microwave reactor. The optimal results of the bio diesel manufacturing process were 4.94 wt.% of catalyst content, a mole ratio of 16.76:1 between methanol and UCO, and 8.13 min of irradiation time spent. This allowed for the conversion of 98.62% of waste oil to biodiesel to be achieved. Error analysis was conducted between anticipated and experimental values for both the BDD and ANN modeling, and it was discovered that the error % was too low. To produce a rigorous study in the nea future, (i) additional reaction variables such as stirring speed, temperature, and reaction time, (ii) different chemical reactors in relation to biodiesel production, and (iii) the leach ing of SPSC catalyst in biofuel should be considered.