Optimization of biodiesel production from Nahar oil using Box-Behnken design, ANOVA and grey wolf optimizer

. Biodiesel manufacturing from renewable feedstocks has received a lot of attention as a viable alternative to fossil fuels. The Box-Behnken design, analysis of variance (ANOVA), and the Grey Wolf Optimizer (GWO) algorithm were used in this work to optimise biodiesel production from Nahar oil. The goal was to determine the best operating parameters for maximising biodiesel yield. The Box-Behnken design is used, with four essential parameters taken into account: molar ratio, reaction duration and temperature, and catalyst weight percentage. The response surface is studied in this design, and the key factors influencing biodiesel yield are discovered. The gathered data is given to ANOVA analysis to determine the statistical significance. ANOVA analysis is performed on the acquired data to determine the statistical significance of the components and their interactions. The GWO algorithm is used to better optimise the biodiesel production process. Based on the data provided, the GWO algorithm obtains an optimised yield of 91.6484% by running the reaction for 200 minutes, using a molar ratio of 7, and a catalyst weight percentage of 1.2. As indicated by the lower boundaries, the reaction temperature ranges from 50 °C. The results show that the Box-Behnken design, ANOVA, and GWO algorithm were successfully integrated for optimising biodiesel production from Nahar oil. This method offers useful insights into process optimisation and indicates the possibilities for increasing the efficiency and sustainability of biodiesel production. Further study can broaden the use of these strategies to various biodiesel production processes and feedstocks, advancing sustainable energy technology.


Introduction
Despite their widespread usage in a variety of fields, such as manufacturing, transportation, and construction, diesel engines do have an adverse effect on the environment (Hoang, 2021a;Mohapatra et al., 2022). Pollutants released by diesel engines include sulphur dioxide (SO2), particulate matter (PM), and nitrogen oxides (NOx) (Barik and Vijayaraghavan, 2020;Lamas et al., 2015;Yang et al., 2019). Smog may have negative impacts on the air quality and people's health since NOx and PM help to create it (Nagarajan et al., 2022;Stelmasiak et al., 2017). These emissions are linked to respiratory disorders, heart problems, and higher death rates (Bakır et al., 2022;Serbin et al., 2021). Diesel engine SO2 emissions can damage ecosystems and contribute to acid rain. Carbon dioxide (CO2) emissions from diesel engines are an important source of greenhouse gas emissions that contribute to climate change (Geng et al., 2017;Nguyen et al., 2021). In 2019, direct emissions from the transportation sector were around 8.9 GtCO2eq/yr., accounting for roughly 23% of overall energy-related CO2 emissions. The CO2 emissions from the motorised transport sector accounted for roughly 69% of overall emissions from transportation (Skea et al., 2022). Burning diesel fuel produces CO2 emissions that contribute to global warming and its side effects, such as temperature increase, sea level rise, and extreme weather (Domachowski, 2021). Black carbon, sometimes referred to as soot, is a small particulate substance released by diesel engines that absorbs sunlight and causes global warming. Black carbon particles may also settle on snow and ice, speeding up melting and causing glaciers and polar ice caps to melt (Malla et al., 2022).
The environmental effect of diesel engines has been attempted to solve these environmental issues. This entails enacting stronger pollution regulations, creating cleaner diesel fuels, and introducing emission control technology like diesel particulate filters (DPFs) and the environmental effect of diesel engines has been attempted to solve these environmental issues (Wang et al., 2023). Stricter emission regulations, the creation of cleaner diesel fuels, and the advent of pollution-controlling technology like DPFs and selective catalytic reduction (SCR) systems are some examples of this. In order to lessen the environmental effect of diesel engines and develop sustainable transportation systems, the switch to alternative fuels like | 712 ISSN: 2252-4940/© 2023. The Author(s). Published by CBIORE biodiesel or electrification is also being studied. Biodiesel has the potential to play an important role in reaching net zero ambitions and transitioning to a low-carbon economy (Jin and Wei, 2023). When biodiesel is generated from sustainable feedstocks and utilised as a substitute for fossil fuel, it can help reduce CO2 and other GHG emissions (Silviana et al., 2022;Zhang et al., 2022). This emission decrease contributes to initiatives to mitigate climate change and attain net zero emissions. Biodiesel is a renewable energy source obtained from renewable resources such as vegetable oils, animal fats, algae and recycled cooking oil Kalyani et al., 2023;Ruiz et al., 2021). We may lessen our dependency on fossil fuels and the pollution connected with them by adopting biodiesel. Biodiesel may be generated in a sustainable manner by using organic waste products or specialised feedstock (da Silva Neto et al., 2020;Tuan Hoang et al., 2021;Yaashikaa et al., 2022). Biodiesel may be utilised in current diesel engines and infrastructure without requiring substantial changes (Ahmad and Saini, 2022;Dey et al., 2020;Hoang et al., 2021). This enables for a more gradual shift to a lower-carbon fuel source without needing significant adjustments to automobiles or refuelling facilities. The option to mix biodiesel and fossil fuel in various ratios adds flexibility throughout the changeover (Babadi et al., 2022;Gul et al., 2019;Silviana et al., 2022).
Integration with other renewable energy systems: Biodiesel may be used in conjunction with other renewable energy systems such as wind and solar power (Silviana et al., 2022) (Soulayman and Dayoub, 2019). It can be created during times of surplus renewable energy output using methods such as power-to-liquid, in which renewable electricity is used to generate hydrogen, which is then mixed with CO2 to form renewable diesel or synthetic biodiesel (Abdullah et al., 2019;Mayer et al., 2020;Zullaikah et al., 2021). This integration contributes to the balancing of intermittent renewable energy generation and the decarbonization of many industries. Biodiesel production can help to support sustainable rural development by generating new economic possibilities in agriculture, waste management, and biofuel production (Hoang, 2021b;Sharma and Sharma, 2021). It has the potential to diversify farmers' revenue streams, boost local employment, and lessen reliance on imported fossil fuels. Biodiesel helps to larger sustainable development goals by assisting rural communities and sustainable land use practises (Molino et al., 2018). However, it is critical to guarantee that biodiesel production is sustainable and does not have negative consequences such as deforestation, biodiversity loss, or competition with food production. Responsible feedstock procurement, adherence to environmental regulations, and the implementation of sustainable land use practises are critical for maximising biodiesel's beneficial benefits on net zero aims and overall sustainability (Kolakoti et al., 2022). Because of numerous major features, biodiesel from nonedible sources is seen to be a better alternative than vegetable oil biodiesel. To begin with, nonedible plant seeds like jatropha, Nahar, Karanja, and algae have a far greater oil content than typical vegetable oil crops such as soybeans or rapeseed. This means that a greater amount of biodiesel may be derived from the same amount of non-edible plant seed. Another benefit is that these non-edible plants may be grown in a variety of conditions, including non-arable land and waste lands, which reduces competition for agricultural land. Furthermore, as compared to typical crops, these sources use substantially less water (Patel et al., 2019).
The literature reveals that biodiesel manufacturing process is non-linear and complex. The biodiesel yields from the transesterification process depends on several control factors like catalyst used, reaction temperature, duration of reaction and many more. It necessitates the optimization to find the best control settings for maximum output. Also, optimisation is required for biodiesel manufacturing processes to meet a variety of essential goals. To begin, optimisation increases the overall efficiency of the production process by maximising feedstock conversion and minimising waste. This efficiency boosts productivity while simultaneously lowering manufacturing costs, making biodiesel increasingly financially viable. Second, optimisation guarantees that the biodiesel produced is of uniform quality. By carefully optimising process parameters such as reaction conditions and catalyst usage, the qualities of the biodiesel may be regulated within desirable ranges, satisfying specified performance and infrastructure compatibility criteria (Pimentel et al., 2009). Furthermore, optimisation is required while transitioning from laboratory-scale to commercial-scale operations. It contributes to addressing scalability, process stability, and cost-effectiveness issues, ensuring a seamless transition and successful commercialization of biodiesel production. Overall, biodiesel production optimisation is critical for attaining efficient, cost-effective, and sustainable processes, as well as assuring high-quality biodiesel that fulfils regulatory criteria and can be effectively commercialised (Gasparatos et al., 2022;Rulli et al., 2016).
Meta heuristic optimization is an attractive option in such conditions. Because of its distinct features, Grey Wolf Optimisation (GWO) is an excellent choice for optimising the biodiesel manufacturing process. One significant benefit is GWO's superior global search capacity, which allows it to investigate a large range of alternative solutions and identify the best configuration. This is especially useful in biodiesel manufacturing, where several interconnected process parameters must be optimised at the same time. GWO's simplicity and ease of deployment make it a viable alternative for field researchers and practitioners. Its ease of integration into current manufacturing processes or optimisation frameworks increases its use (Thirunavukkarasu et al., 2023). Furthermore, GWO has a fast convergence rate, quickly convergent to nearoptimal solutions and minimising computational time. This enables more effective decision-making and rapid modifications in biodiesel manufacturing processes. GWO's capacity to manage numerous targets, addressing the complicated tradeoffs inherent in biodiesel production optimisation, is another major benefit. GWO supports the balance of objectives such as conversion efficiency, cost minimization, and environmental impact reduction by assigning suitable fitness metrics. Furthermore, GWO exhibits durability and flexibility, allowing it to handle dynamic situations and changing restrictions while maintaining constant optimisation performance even in the midst of uncertainty. Its adaptability is demonstrated by successful implementations in a variety of optimisation settings, emphasising its potential for resolving the complexities and constraints inherent in biodiesel production (Makhadmeh et al., 2022;Veza et al., 2022). Hence, in the present study, an attempt is made to optimize the biodiesel production process from Nahar (Ceylon ironwood) feedstock. The Box-Behnken design will be used for design of experiment, analysis of variance will be used for model development. The developed model will be used as cost function for Grey Wolf Optimizer. Finally, GWO will be employed for optimizing the control factors (reaction temperature, reaction duration, molar ratio, and catalyst wt.%) to provide the maximum yield of biodiesel with minimum resources.

Biodiesel preparation
Nahar seeds were procured from a supplier in Delhi, India. To minimise moisture content, the seeds were sun-dried for two | 713 ISSN: 2252-4940/© 2023. The Author(s). Published by CBIORE days in the month of May 2023. The dried seed kernels were mechanically extracted to in Assam, India, giving raw oil corresponding to 64% of the total weight. The raw oil was purified and used in the research. The analytical grade chemicals used in the study were procured locally from Chawri Bazar, Delhi, India. The physicochemical characteristics and fatty acid content of Nahar oil were evaluated throughout the characterisation process. As a first step the FFA analysis was conducted. It revealed the FFA on higher side (Leung et al., 2010;Murugapoopathi and Vasudevan, 2021). It was decided to attempt standardized and well documented two-step acid-base (H2SO4 + KOH) transesterification technique to overcome this. CaO (heterogenous catalyst) sourced from waste chicken eggs was employed as catalyst. The main physio-chemical properties of Nahar biodiesel are shown in Table 1. The objective of the paper was to optimize the control factor during this entire process to have best biodiesel yield with least possible resources. The following control factors were employed in the study ( Table  2). The design of experiments (DoE) technique response surface methodology (RSM) was employed for planning the sets of experimental runs. The Box-Behnken design was used for this purpose.

Response surface methodology
RSM (Response Surface Methodology) is a statistical approach that is commonly used in experimental design and optimisation. It entails the development and use of mathematical models in order to comprehend the link between the response variable significance and the controllable factors or variables. RSM provides a methodical way to optimising complicated processes and systems by exploring the design space effectively. RSM's capacity to model and forecast the response surface is one of its primary features, allowing researchers to discover the ideal settings for the input variables to obtain the intended output. RSM may efficiently predict the coefficients of the mathematical model by using a minimum number of experimental runs, saving time and resources as compared to a complete factorial design. RSM is generally comprised of three major steps: experimental design, model fitting, and response surface analysis. A welldesigned series of experiments is carried out during the experimental design stage by altering the input variables pursuant to a preset design matrix. For each input variable combination, the response variable is assessed (Sharma and Sahoo, 2022).
Following that, the data acquired is utilised to create a mathematical model that reflects the connection between the response variable and the input variables. Models that are commonly employed include linear, quadratic, and higher-order polynomial models. The model is then verified to see how well it predicts the response variable. Following the validation of the model, response surface analysis is used to investigate the relationship between the response variable and the input variables. To visualise the response surface and identify regions of optimal response, contour plots, 3D surface plots, and other graphical representations are utilised. Engineering, chemistry, pharmacology, agriculture, and manufacturing have all found uses for RSM. It may be used to optimise processes, create new products, estimate parameters, and enhance quality. RSM enables researchers and engineers to make sound judgements based on mathematical models and statistical analysis, resulting in more efficient and cost-effective process optimisation.

Box-Behnken design
RSM analyses and models the connection between input factors and response variables using various experimental methods. Full Factorial Design, Central Composite Design, Box-Behnken Design, and Fractional Factorial Design are examples of RSM designs. The Box-Behnken design stands out among these due to its efficiency and adaptability for fitting secondorder response surface models. It has numerous benefits: For starters, it takes fewer experimental runs than complete factorial design or Central Composite Design while still obtaining critical quadratic response surface information, saving time, resources, and money. Second, the design points are equidistant from the centre point, resulting in a rotatable design that provides constant variance of calculated model coefficients across the design space, improving model prediction precision (Elkelawy et al., 2022). Thirdly, the Box-Behnken design, unlike the Central Composite Design, does not require the addition of cube points to estimate cubic effects, simplifying the experimental setup and lowering the number of runs. Finally, the design points are dispersed uniformly over the design space, with a special emphasis on the area around the optimum, allowing for efficient optimisation by allowing for the identification of optimal factor values and improvement of the response variable. Overall, the Box-Behnken design provides a well-balanced way to modelling the response surface, with fewer experimental runs, higher accuracy, and efficient optimisation capabilities, making it a popular choice in response surface technique (Manojkumar et al., 2022;Porwal, 2022).

Grey-Wolf Optimizer
The Grey Wolf Optimizer (GWO) is an optimisation algorithm inspired by nature that models the social hierarchy and hunting behaviour of grey wolves. It was created using the ideas of alpha, beta, delta, and omega wolves, which symbolise the most powerful and dominating members of a wolf pack. The population of wolves in the GWO algorithm symbolises various solutions to an optimisation issue. The position of each wolf correlates to a proposed solution, and their fitness affects their hunting capacity (Makhadmeh et al., 2022). The programme iteratively updates the locations of the wolves using a set of rules to find the best option. The Grey Wolf Optimizer algorithm's pseudo code is as follows (Abualigah et al., 2020;Makhadmeh et al., 2022): • Create a wolf population at random.
• Using the objective function, assess each wolf's fitness.
• Set the alpha, beta, and delta wolves as the three most fit individuals. • Set the bounds of the search space and the maximum number of iterations.  The GWO algorithm effectively explores and exploits the search space by leveraging grey wolf hunting behaviour and social interactions. The method seeks to converge approaching the global optimum by repeatedly updating the locations of the wolves. It has been effectively used to a variety of optimisation situations, demonstrating its ability to identify optimum solutions.

Data analysis
The Box-Behnken design (BBD) was followed for conducting the biodiesel production experiments. In the present study there were four control factors (independent parameters namely reaction temperature and time, wt.% of catalyst and molar ratio. The biodiesel yield was the response variable in the study. The BBD design helped in restricting the test runs to only 29. The design matrix was prepared and yield for east test run was recorded. The correlation matrix gives useful information about the correlations between factors in a dataset. The correlation coefficients show the degree and direction of these variables' associations. The following are the relationships between the variables: yield (%) shows a slight negative correlation (-0.0396) with reaction temperature (C), indicating a small unfavourable association. The yield tends to drop significantly as the reaction temperature rises. Yield (%) has a somewhat positive association (0.3356) with reaction time (Mins). This suggests that as the response time grows, so does the yield. Catalyst weight percent has a substantial negative connection (-0.8103) with yield. Catalyst weight percentage has a substantial negative connection (-0.8103) with yield (%). This is a substantial negative connection, implying that as the catalyst weight % grows, so does the yield. Yield (%) has a slight positive association (0.0728) with molar ratio (%). This means that when the molar ratio grows, so does the yield, but to a lesser amount. The correlations between yield (%) and all other variables are represented in the last row of the correlation matrix. It depicts the total influence of all factors on the yield. A substantial positive correlation coefficient (near to 1) suggests that the independent factors and the dependent variable have a considerable positive association. Understanding these relationships can assist researchers and practitioners in optimising process parameters. It may be feasible to generate improved yields in the process by modifying factors with significant correlations, such as reaction time and catalyst weight %. The data was used to create a correlation heatmap as depicted in Figure 1.

Analysis of variance
The ANOVA (Analysis of Variance) table (as shown in Table  3) contains statistical information on the importance of various factors and how they interact in the experimental results. Temperature (Temp.), Time (T), Catalyst wt.% (C), and Molar Ratio (MR) are the factors included in the provided ANOVA table. The first row provides the model's overall statistical analysis. The sum of squares (4786.13), degrees of freedom (df, 9), mean square (531.792), F-value (47.6701), and p-value (0.0001) are all displayed. The model is determined to be statistically significant, suggesting that no less than one of the variables or interactions has a substantial influence on the response variable. The rows showing Temp., T, C, and MR in first column reflect the separate major impacts of each component. For each component, they offer the sum of squares, degrees of freedom, mean square, F-value, and p-value. Temp. (temperature), T (time), and C (catalyst wt.%) are considered to be significant variables in this scenario since their p-values are less than the significance level (0.05). MR (molar ratio), on the other hand, has no significant effect (p-value = 0.1400). Then, Temp. * C, Temp. * MR, T * MR, T * T, C * C rows depict the interactions of the components. For each interaction term, they offer the sum of squares, degrees of freedom, mean square, Fvalue, and p-value. Some of the interactions, such as Temp. * C, Temp.*MR, and Temp.*T, are shown to be significant (p-values). Some interactions, such as temperature * C, temperature * MR, and temperature * T, are shown to be significant (p-values 0.05), showing that the combined impacts of these factors have a substantial impact on the response variable. The residual sum of squares, degrees of freedom, and mean square are all represented in this row. It indicates the model's unexplained variance or random error. Lack of Fit row as subcategory evaluates the lack of fit between the model and the data. The sum of squares, degrees of freedom, mean square, F-value (7721.331635), and p-value (0.0001) are all provided. A considerable lack of fit is discovered, suggesting that the model does not match the data well. The pure Error row in residual subcategory represents the error sum of squares, degrees of freedom, and mean square. It captures the random variation that exists within the experimental error.
In conclusion, the ANOVA table aids in determining the importance of various variables and interactions in explaining  Table 3. According to the Lack of suit study, more model refinement or tweaks may be necessary to better suit the data. (1) was employed to make prediction on all design point and the results are shown in Table 4. The Eq. (1) would be used as cost function for Grey-wolf optimization. The ANOVA analysis was used to develop the surface diagrams for showing the effects of control factors on the biodiesel yield.

Surface diagrams
RSM-based surface diagrams are excellent tools for visualising the detailed link between input factors and a response variable. These diagrams illustrate researchers in graphical form how modifications to the input factors affect the related response. Depending on the characteristics of the reaction or process under research, these diagrams can display a variety of patterns, such as downhill or upward slopes, spikes, or valleys, which indicate the system's complexity. RSM surface diagrams' key benefit is its capacity to discover optimal input settings and enhance understanding of interactions between variables. Researchers can identify the optimal mix of input factors that maximises the intended result by analysing the graphical depiction. This information is essential to decisionmaking and optimising processes in a variety of disciplines of study. The surface diagram in Figure 2a of the research depicts the effects of temperature and catalyst weight % on biodiesel yield. According to the data, a low catalyst weight percentage paired with a higher reaction temperature produces the highest biodiesel production. Notably, the greatest biodiesel output is recorded between 56 and 58 °C and a catalyst weight percentage range of 0.8 to 1.1 wt.%. These studies shed light on the best conditions for operation for the production of biodiesel.
Similarly, Figure 2b and Figure 2c show the impact of temperature and molar ratio, as well as time, on biodiesel production. The molar ratio has somewhat negative influence on biodiesel yield as depicted in Figure 2b, showing that raising the molar ratio could result in a slight decrease in the production of biodiesel. When we observed the combined effect of both molar ratio and temperature, then it was found that maximum yield was in zone when temperature was 58 °C and molar ratio was 13. On the other hand, the maximum yield was observed when time taken for rection was 200 mins while the molar ratio was 13. The impact of time on biodiesel output, on the other hand, is determined to be the smallest among all of the tested factors.
This work successfully examines and quantifies the effects of various input factors on biodiesel yield using RSM-based surface diagrams. The graphical portrayal of these interactions provides useful information for optimising biodiesel production operations as well as making educated renewable energy selections.

Optimization with GWO
The framework for the model's construction using ANOVA on experimental data set provides the basis for optimisation employing the Grey Wolf Optimizer (GWO) algorithm. To estimate the productivity of Nahar oil biodiesel within the hybrid framework of Response Surface Methodology (RSM) and GWO, the optimisation phase was carried out in MATLAB 2021b, using the capabilities of GWO. The GWO optimisation model inputs have been meticulously constructed and includes critical elements such as reaction temperature, reaction duration, methanol/oil molar ratio, and catalyst amount in terms of weight %. As the intended reaction output, the goal was to maximise the production of Nahar oil biodiesel. The RSM model's boundary conditions were employed as variables of input and output for GWO to drive the optimisation process. These variables were employed to optimise the power equation indices in order to get the best production of Nahar oil biodiesel. Table 5 displays the optimised variables obtained by the GWO model, offering significant insights into the best settings for maximising biodiesel production. Figure 3 depicts the iterative process of GWO optimisation, which shows the gradual refining of the parameters to converge on the ideal value. Interestingly, the optimisation procedure was remarkably efficient, requiring only 0.01 seconds and 4 rounds to achieve the optimised value. Such swift and efficient optimisation demonstrates the GWO algorithm's potential for facilitating biodiesel manufacturing processes and obtaining improved yields.
Overall, the use of RSM and GWO in this work allowed the construction of a robust model for optimising Nahar oil biodiesel output. The implementation of the GWO technique permitted efficient parameter estimation, lowering optimisation time while improving overall process efficacy.

Conclusion
Given the growing interest in biodiesel synthesis from renewable feedstocks as an alternative to fossil fuels, the goal was to discover the ideal operating parameters to maximise biodiesel yield. In this work, the Box-Behnken design, analysis of variance (ANOVA), and the Grey Wolf Optimizer (GWO) algorithm were employed to optimise biodiesel production from Nahar oil. The Box-Behnken design enabled the study of the response surface as well as the discovery of significant factors influencing biodiesel yield, such as molar ratio, reaction duration and temperature, and catalyst weight percentage. The gathered data was subjected to an ANOVA analysis to determine the statistical significance of the components and their interactions, yielding important insights into the biodiesel production process. Furthermore, the GWO algorithm was used to further optimize the process. Based on the data provided, the GWO algorithm optimized the yield to 91.6484% by reducing the reaction time to 200 minutes, utilizing a molar ratio of 7, and a catalyst weight percentage of 1.2. The reaction temperature remained within the specified bottom limits of 50 °C.
. The findings of this study give convincing proof for the effectiveness of a combined approach in optimizing biodiesel production from Nahar oil. The results add to our understanding of process optimization methods and highlight the potential for improving the efficiency and sustainability of biodiesel production. Researchers and industry experts could get higher yields and improved process performance by using this integrated strategy, leading to a more affordable and sustainable biodiesel manufacturing process. Furthermore, the achievement of this study offers up possibilities for future research into optimizing various biodiesel manufacturing techniques and exploring with alternative feedstocks. The future scope of this research is to further optimise the manufacturing of biodiesel from different feedstocks. This may be accomplished by investigating the suitability of the integrated technique to other feedstocks and broadening the range of process variables evaluated. Additionally, using sophisticated technologies such as machine learning and artificial intelligence might improve the optimisation process. The objective is to continuously increase the efficiency and long-term viability of biodiesel production, resulting in greener and more environmentally friendly power options.