Introduction

Environmental deterioration and the depletion of fossil fuels are the two main causes of the world’s severe energy problem. Petroleum supplies are rapidly running out due to the massive exploitation and use of fossil fuels [1, 2]. Biodiesel is a kind of renewable fuel derived from vegetable oils, waste oils, and animal fats [3, 4]. It is renewable, nontoxic, biodegradable, has better combustion efficiency, reduced exhaust emissions, and a higher cetane number than diesel fuel [5]. So, it is very important to find ways to make biodiesel from non-edible oils, like used food oil, soybean oil, Jatropha, Pongamia, Mahua, lemongrass oil, and so on [6, 7]. Waste cooking oils are edible oils; however, they are more ecologically beneficial since they can be recycled and are less expensive than vegetable oils. The use of waste oil offers many advantages, including economic, environmental, and waste management benefits. But it cannot be used directly in diesel engines because of its high viscosity, low volatility, and poor oxidation stability [8, 9]. Various processes are utilized in the manufacturing of biodiesel. However, the transesterification technique is the most cost-effective manufacturing approach. The mechanism and chemical reaction for the transesterification process is shown in Eq. 1.

(1)

Assessing biodiesel output is crucial for determining fuel quantity. Factors affecting biodiesel yield include alcohol molar ratio, catalyst quantity, reaction temperature, speed, and time. Optimizing numerous parameters in the transesterification process is tedious, time-consuming, and economically unviable due to the vast number of required tests [10]. Different mathematical tools are used to address this issue. Mathematical models provide valuable insights for process analysis and prediction, optimizing input parameters to improve outputs. The response surface method (RSM) is a potential statistical approach for optimizing biodiesel production process parameters. Several research uses response surface methodology (RSM) to optimize the process parameters in biodiesel synthesis. Lee et al. [11] used response surface methodology (RSM) to optimize biodiesel (BD) yield of 96.57% from Jatropha biodiesel. Sukjit and Punsuvon [12] used the RSM to optimize the transesterification process of Jatropha biodiesel. They achieved a remarkable yield of 93.55% by using a mixed oxide catalyst consisting of CaO and MgO. Carvalho et al. [13] used response surface methodology to optimize the process variables and achieve a biodiesel production yield of 96.79% from cotton seed oil. Zhao et al. [14] employed RSM with a solid catalyst Cs2O/c–Al2O3 to produce biodiesel from animal fat and the biodiesel output was 95.5%. Onukwuli et al. [15] have produced BD from cotton seed oil and optimized the yield of BD with the use of RSM and ANOVA. Their results reveal that the optimum BD yield of 96% was achieved. Renita et al. [16] studied the production of BD from macroalgae Caulerpa peltata and optimized its yield using RSM. There results show that the highest yield of 95% was obtained. Aworanti et al. [17] studied the effect of calcium oxide as a heterogeneous catalyst for BD production from waste cooking oil and to optimize the yield using RSM and central composite design. There results show that 94.10% of BD yield was obtained. Maleki and Esmaeili [18] used Fe3O4/SiO2@ZnO as a heterogeneous nanocatalyst for BD production from waste cooking oil and optimized yield with the use of RSM techniques. A maximum of 97.23% BD yield was obtained with their Box–Behnken design. Rahman et al. [19] also used RSM and ANOVA techniques for the optimization of BD yield from waste palm oil. They found that a maximum of 94.5% yield can be obtained. Abdullahi et al. [20] optimized the yield of BD prepared from allamanda seed oil using BBD of RSM. The maximum yield obtained was 90.67%. Mittal and Ghosh [21] synthesized a BD from spirulina microalgae with the help of calcium methoxide catalyst and optimized the yield with RSM technique. The highest yield of 99% was obtained. However, the optimization method is a standard method that includes a lot of expensive and time-consuming tests that are done one after the other. But the connections between the variables are not explained by this approach. Therefore, most of the time, statistical study design methods are used rather. DoE and RSM are two different techniques that are utilized frequently to make BD production processes effective. The DoE method changes all the process factors at the same time to get the maximum amount of data from the fewest well-planned experiments. The RSM, on the other hand, is a set of mathematical and statistical tools for building an empirical model that connects the BD yield to the important process factors.

Most of the literature reported different RSM techniques to optimize the yield of BD with the help of edible and non-edible oil by varying the different parameters, however very few have reported with the use of BBD techniques to predict the BD yield with the use of nonlinear regression methods using ANOVA. However, the objective of this paper is to predict the biodiesel yield and cost study by varying five factors such as, catalyst dose (g/l), reaction temperature (°C), reaction time (min), methanol (ml) and oil (ml) for the transesterification reaction of waste cooking oil using RSM based Box–Behnken design in 46 experimental runs with the help of Design Expert software version 13.

Materials and Methods

Waste cooking oil (WCO) for the transesterification process are collected from the kitchen of Ambedkar Bhavan Boys hostel mess of Madan Mohan Malaviya University of Technology Gorakhpur, Uttar Pradesh, India. Chemicals of analytical grade are purchased from SD fines chemicals, Mumbai, India. Before the transesterification process WCO was filtered followed by heating at 100 °C for 10 to 15 min to remove the moisture content in the WCO.

Methods

A combination of TiO2–ZnO was synthesized using the sol–gel technique. The TiO2–ZnO preparation included using a varied ratio of TiO2 and ZnO, ranging from 10:1 to 10:4, for various grades. The concentration of ZnO in the solution was altered to modify the ZnO doping on the TiO2 surface. The TiO2 and ZnO solution was agitated at a temperature of 60 ± 2 °C to achieve a paste-like precursor mixture. Additionally, a step heating method was used to dope ZnO onto the surface of TiO2. First, the sample was heated at a temperature of 105 ± 2 °C for a duration of 1 h, and then it was further heated for 2 h at a temperature of 200 °C. Further, the nanocatalyst mixture underwent calcination at a temperature of 475 ± 2 °C for an additional duration of 2 h [22]. After preparation, TiO2–ZnO was analyzed by FTIR, XRD, SEM and EDAX analysis. The FTIR analysis (Thermo Scientific Nicollet 6700, United State) was performed to study the molecular bond available in the catalyst. The doping of ZnO on the surface was analyzed by XRD (Panalytical X Pert pro diffractometer, Netherland), SEM and EDAX analysis was used to check the morphological structure and elemental composition with the help of Zeiss Gemini 300, Germany apparatus respectively. All the testing was done at IIT Roorkee.

Once cooled, the produced catalyst was used instead of the traditional NaOH catalyst for the synthesis of biodiesel. Table 1 shows the properties of biodiesel prepared using TiO2–ZnO catalyst. Fuel (biodiesel) properties such as, density, flash point, fire point, viscosity and calorific value of were measured with the help of measuring instruments such as hydrometer, Pensky marten (Anton Parr, U.K.), viscometer (SVM 3000 viscometer, Anton Parr, U.K.) and bomb calorimeter (Parr 6300, USA). The procedure described in ASTM standard was used for the density, flash point, fire point, viscosity and calorific value determination. An experiment was conducted to determine the best volumetric ratio of methanol to waste cooking oil for maximum yield of biodiesel production. The molar ratio of methanol to waste cooking oil was evaluated in the range of 3:1–1:3. Various catalyst doses ranging from 1 to 10 g/l were evaluated to optimize the catalyst dosage.

Table 1 Properties of biodiesel prepared using TiO2–ZnO catalyst

Experimental Model

The importance of catalyst used in the biodiesel production was analyzed in terms of WCOBD yield and WCOBD production cost. These two output parameters were analyzed in terms of the five most influencing input parameters A [Time (min)], B [catalyst dose (g/l)], C [Temperature (oC)], D [methanol (ml)], and E [Oil (ml)], respectively. Initially the single parameter optimization method was used to study the effect of input parameters A, B, C, D, and E on the WCOBD yield and production cost. Box–Behnken experimental design (BBED) was used to predict the relation between WCOBD yield and WCOBD production cost with input parameters. The range of input parameters for the BBED was decided based on the result obtained from a single parameter study. The ranges of input parameters for the WCOBD study were presented in Table 2.

Table 2 Parameters with range for the BBED model

BBED study was performed for five input parameters (A, B, C, D, and E) and three factors. Total 46 number of experiments were suggested by the BBED. The list of total experimental planning with experimental, predicted and % error value for WCOBD yield and WCOBD production cost were reported in Table 3.

Table 3 Responses of the transesterification for WCOBD yield

The WCOBD yield and WCOBD production cost were determined by the Eqs. 2 and 3, respectively.

$$ {\text{WCOB}}\,{\text{Yield}}\,{(}\% {)}\, = \,\frac{{{\text{Weight}}\,{\text{of}}\,{\text{WCOB}}}}{{{\text{Weight}}\,{\text{of}}\,{\text{oil}}\,{\text{in}}\,{\text{sample}}}} \times {100,} $$
(2)
$$ {\text{WCOB}}\,{\text{Production}}\,{\text{Cost}}\,{\text{(INR)}}\,{ = }\,\frac{{{\text{(methanol}}\,{\text{price}}\,{ + }\,{\text{oil}}\,{\text{price}}\,{ + }\,{\text{catalyst}}\,{\text{price)}}}}{{{\text{Volume}}\,{\text{of}}\,{\text{WCOB(ml)}}}} \times 1000. $$
(3)

Cost analysis study was conducted to determine the cost for the preparation of 1 L biodiesel. For this, methanol was purchased at the rate of 28 INR/l, waste cooking oil (25 INR/l) was taken. The catalyst price was decided based on the TiO2 and ZnO price. Approx. catalyst price of 0.2 INR/g was considered for all the experiments.

The % error for the WCOBD yield and WCOBD production cost were calculated as Eq. 4.

$$ \% \,{\text{error}} = \,\frac{{{\text{Actual}}\,{\text{value}}\, - {\text{Predicted}}\,{\text{value}}}}{{{\text{Actualvalue}}}} \times 100. $$
(4)

Results and Discussion

Characterization of TiO2 and TiO2–ZnO

ZnO-doping on the surface of TiO2 has been analyzed by FTIR, XRD, SEM, and EDAX analysis. The FTIR and XRD analysis of TiO2 and TiO2–ZnO are shown in Fig. 1a, b while Fig. 2a–d represents SEM image of TiO2, EDAX of TiO2, SEM image of TiO2–ZnO and EDAX of TiO2–ZnO, respectively. The FTIR spectra (Fig. 1a) has been presented within the 500–4000 cm−1 wavenumber range. It has been noted that the variation in peaks between 500 and 1400 cm−1, which is mainly due to Ti–O–Ti stretching vibration and the TiO2 lattice vibration, [23]. The water adsorption for the TiO2 and TiO2–ZnO is indicated by peaks between 1500 and 1700 cm−1 [24]. Minor variation in the peaks between 3200 and 3600 cm−1 is mainly due to variation of surface hydroxyl groups (OH) peak for TiO2–ZnO [25]. Figure 1b shows there are distinct peaks at 25°, 48°, and 62°, while multiple peaks have been noted between 30–40°, 52–60°, and 65–80°. Overall, the sharp peaks at 25, 48, and 62°, as well as some peaks at 30–40°, are primarily attributed due to the presence of Ti elements. The presence of other minor impurities in the TiO2 material may be responsible for other multiple peaks [26, 27]. The TiO2 utilized is extensively encapsulated with ZnO nanoparticles, as evidenced by the lesser peaks of other impurities. The presence of Zn and ZnO-based compounds on the TiO2 surface is also indicated by peaks available at 38, 47, and 63° [28]. Figure 2a, b indicate SEM image and EDAX analysis of TiO2. It clearly shows the variation in morphological structure of the elements and elemental analysis shows that 56.79% O and Ti with 43.21% on the weight basis. Figure 2c, d indicate SEM image and EDAX analysis of TiO2–ZnO. It confirms that ZnO is doped in the surface of TiO2. The deposition of ZnO on the TiO2 surface is also confirmed by the EDAX analysis of the TiO2–ZnO. The elemental analysis of TiO2–ZnO has been presented in Fig. 2d. Elemental study suggests 40.08% Ti, 3.49% Zn and 56.43% O on the weight basis. Highest composition of O indicates due to presence of oxygen in TiO2, ZnO respectively. The small composition of Zn indicates it is coated on the surface of TiO2.

Fig. 1
figure 1

a FTIR b XRD characterization of TiO2 and TiO2–ZnO (nanocatalyst)

Fig. 2
figure 2

Fe-SEM analysis of TiO2 and TiO2–ZnO a SEM image of TiO2 b EDAX of TiO2 c SEM image of TiO2–ZnO d EDAX of TiO2–ZnO

Single Parameter Optimization Study

Single parameter optimization technique has been used to study the effect of input parameters in terms of % WCOBD yield. The effect of input parameters methanol/oil ratio, time, temperature, and catalyst dose has been presented in Fig. 3a–d, respectively.

Fig. 3
figure 3

Single parameter optimization study in term of WCOBD yield a methanol/oil ratio b time c Temperature d Catalyst dose

Figure 3a explains the % WCOBD yield increases with an increase in methanol to oil ratio (volume) up to 1:1 then decreases thereafter. Higher methanol composition in the oil, methanol ration helps in the conversion of oil into methanol by changing complex group with methyl group [29]. So, an oil to methanol ratio of 1:1 has been considered for further study. The effect of esterification time on % WCOBD yield has been presented in Fig. 3b. The effect of time states maximum % WCOBD yield of 88% has been noticed at operation time of 120 min. After 120 min operation time biodiesel deteriorated due to catalytic and thermal activity [30]. While Fig. 3c states the maximum 88% yield can be obtained at 65 °C temperature. Lower temperature restricts the oil and methanol reaction and biodiesel formation. At higher temperature methanol may be converted to vapor form without making any reaction with WCO. So, optimum temperature 65 °C has been optimized for WCOBD preparation. Figure 3d explains the effect of catalyst dose on WCOBD production. It is noted maximum BD yield can be noted at catalyst dose of 2.5 g/L.

BBM for BD Yield Determination

The 3D plot for % WCOBD in terms of catalyst dose, temperature, methanol (ml), WCO (ml), and time has been predicted in Fig. 4a–d respectively. The plot between actual experimental data for % WCOBD with data predicted by % WCOBD with BBM design has been presented in Fig. 4e.

Fig. 4
figure 4

Effect of different parameters on %WCOBD yield a Catalyst dose and time b Temperature and time c Methanol and time d Oil and time e Predicted vs Actual BD yield using RSM

The plot between predicted and actual BD yield (%) is shown in Fig. 4. The graph shows that predicted values are very close to the experimental values, it means that the model developed for the correlation between the variables factors shows good description of the experimental data on the BD yield. Figure 4a–d indicates % WCOBD enhances with catalyst dose, temperature, methanol (ml), WCO (ml) and showing their maximum value at catalyst dose: 2.5 g/l, temperature: 65 °C, methanol: 50 ml, WCO: 50 ml respectively. Further increase in catalyst dose, temperature, methanol, WCO indicates decrement in % WCOBD yield. The actual and predicted data relation Fig. 4e shows −7.90–7.19% error between experimental and predicted data. The relation between % WCOBD yield with catalyst dose: 2.5 g/l, temperature: 120 min, methanol: 50 ml, WCO: 50 ml is presented in Eq. 5.

$$ {\text{BD Yield}} : - {701}.{93 } + \, 0.{26} \times {\text{ A}} + {27}.{75} \times {\text{ B }} + {17}.{18} \times {\text{C }} + { 2}.{77} \times {\text{ D }} + { 3}.{5} \times {\text{E }} + \, 0.0{5} \times {\text{A}} \times {\text{ B }} + \, 0.00{6} \times {\text{A}} \times {\text{C}} + 0.00{5} \times {\text{A}} \times {\text{D}} - 0.00{1} \times {\text{A}} \times {\text{E}} + 0.{5}0 \times {\text{B}} \times {\text{C}} + 0.0{8} \times {\text{B}} \times {\text{D}} - \, 0.{16} \times {\text{B}} \times {\text{A}} + \, 0.00{4} \times {\text{C}} \times {\text{D }} + 0.00{4} \times {\text{C}} \times {\text{E}} - \, 0.0{1} \times {\text{D}} \times {\text{E}} - \, 0.00{4} \times {\text{A}}^{{2}} - { 12}.00 \times {\text{B}}^{{2}} - \, 0.{15} \times {\text{C}}^{{2}} - 0.0{25} \times {\text{D}}^{{2}} - 0.0{1} \times {\text{E}}^{{2}} . $$
(5)

The proposed empirical relation between output and input parameters has been examined by model like linear, interactive, quadratic, cubic, sequential and sum of squares investigation. The adequacy and fit summary for the % WCOBD yield in term of input parameters has been tabulated in Table 4. The DOE suggested model has been indicated [bold] in the Table 4 and 6.

Table 4 Adequacy and fit summary of the % WCOBD yield

The adequacy of the % WCOBD yield suggests the p value and lower p value suggest the quadratic model is most appropriate for current model [31]. While the fit summary suggests adjusted and predicted R2 is 0.9309 and 0.8465, respectively. It is also noted that the difference between adjusted and predicted R2 is less than 0.2, which confirms the appropriate relation between predicted and adjusted R2. The symmetrical importance of the square mean variation (fraction) due to square mean residual and regression fault is considered by ANOVA. The ANOVA for the % WCOBD is presented in Table 5.

Table 5 ANOVA for quadratic model for % WCOBD yield

The current analysis for % WCOBD yield suggests their high F value of 31.31. This value indicates only 0.01% variation in results due to high noise. This signifies significant dependency of % WCOBD yield on input parameters. The factor methanol and oil suggest F value of 115.75 and 113.98 having p value < 0.0001. It is already reported that p value < 0.05 can be considered as significant model. Overall, the term D, E, AD, DE, A2, B2, C2, D2, E2 can be considered as significant parameters. The F-value (lack of fit) 31.31 suggests the present model is significant.

BBM for WCOBD Cost

The 3-D plot for WCOBD cost in terms of catalyst dose, temperature, methanol (ml), WCO (ml), and time has been predicted in Fig. 5a–d, respectively. The plot between actual experimental data for WCOBD cost with data predicted by WCOBD cost with BBM design is presented in Fig. 5e.

Fig. 5
figure 5

Effect of different parameters on WCOBD cost a Catalyst dose and time b Temperature and time c Methanol and time d Oil and time e Predicted vs Actual WCOBD cost using RSM

The graph Fig. 5e shows that predicted values are very close to the experimental values for WCOBD cost, it means that the model developed for the correlation between the variables factors shows good description of the experimental data on the WCOBD cost. Figure 5a–c indicates WCOBD cost reduces with catalyst dose, temperature and methanol (ml) and showing their maximum value at catalyst dose: 2.5 g/l, temperature: 120 min, and methanol: 50 ml respectively. Further increase in catalyst dose, temperature, and methanol indicates increment in WCOBD cost. While the WCOBD cost decreases with the oil volume. After a certain increment in oil dose WCOBD cost has been noticed almost constant. The actual and predicted data relation Fig. 5e shows −19.56–13.87% error between experimental and predicted data. The relation between WCOBD cost with catalyst dose, temperature, methanol, and WCO is presented in Eq. 6.

$$ {\text{BD price}}/{\text{ l}} : {648}.{82}\, + \,0.0{22}\, \times \,{\text{A}}\, + \,{2}.{26}\, \times \,{\text{B }} - {7}.{78}\, \times \,{\text{C }} - {2}.{35}\, \times \,{\text{D }} - {9}.{6}0\, \times \,{\text{E }} - 0.0{4}\, \times \,{\text{A}}\, \times \,{\text{B }} - 0.00{5}\, \times \,{\text{A}}\, \times \,{\text{C }} - 0.00{5}\, \times \,{\text{A}}\, \times \,{\text{D}}\, + \,0.00{1}\, \times \,{\text{A}}\, \times \,{\text{E }} - 0.{42}\, \times \,{\text{B}}\, \times \,{\text{C }} - 0.0{8}\, \times \,{\text{B}}\, \times \,{\text{D}}\, + \,0.{3}0\, \times \,{\text{B}}\, \times \,{\text{E }} - 0.00{4}\, \times \,{\text{C}}\, \times \,{\text{D}}\, + \,0.0{1}\, \times \,{\text{C}}\, \times \,{\text{E}}\, + \,0.0{2}\, \times \,{\text{D}}\, \times \,{\text{E}}\, + \,0.00{2}\, \times \,{\text{A}}^{{2}} \, + \,{3}.{35}\, \times \,{\text{B}}^{{2}} \, + \,0.0{6}\, \times \,{\text{C}}^{{2}} \, \times \,0.0{2}\, \times \,{\text{D}}^{{2}} \, + \,0.0{4}\, \times \,{\text{E}}^{{2}} . $$
(6)

The output and input parameters relation has been explained by parameters like linear, interactive, quadratic, cubic, sequential and sum of squares investigation [32]. The adequacy and fit summary for the WCOBD cost in terms of input parameters is tabulated in Table 6.

Table 6 Adequacy and fit summery of the WCOBD cost analysis

The adequacy of the WCOBD cost suggests quadratic model is most appropriate for current model and lower p value reinforces these things. While the fit summary suggests adjusted and predicted R2 is 0.9313 and 0.8472 respectively. It is also noted that the difference between adjusted and predicted R2 is less than 0.2, which confirms the appropriate relation between predicted and adjusted R2. The symmetrical importance of the square mean variation (fraction) due to square mean residual and regression fault is considered by ANOVA. The ANOVA for the WCOBD cost has been presented in Table 7.

Table 7 ANOVA for quadratic model

The current analysis for WCOBD cost suggests their high F value of 31.48. This value indicates only 0.01% variation in results due to high noise. This signifies significant dependency of WCOBD cost on input parameters. The factor methanol and oil suggest F value of 22.07 and 415.87 having p value < 0.0001. It is already reported that p value < 0.05 can be considered as significant model. Overall, the term D, E, D2, and E2 can be considered as significant parameters. The F-value (lack of fit) of 31.48 suggests the present model is significant.

Overall, the relation suggests the oil and methanol cost is playing a key role in the BD cost. Here catalyst cost does not play a major role in the overall WCOBD cost.

Comparative Study

The comparison of current work with another recent work is shown in Table 8. It shows that many researchers have used the optimization technique to obtain the maximum yield of biodiesel with the help of response surface methodology, but no one has shown the cost for the preparation of biodiesel. Hence the current work has also used optimization technique for the prediction of biodiesel yield but also shown the cost analysis for the preparation of biodiesel. Current research suggests that a maximum 88% yield was obtained but the actual preparation cost for biodiesel was INR 47.29 /l.

Table 8 Comparative study of present study with other recent study

Conclusion

Waste cooking oil has been used to produce biodiesel with the help of TiO2–ZnO nanocatalyst. The biodiesel yield and their cost depend on the bio-oil, methanol and catalyst cost. The type of catalyst used can be a major factor in the preparation of economical and efficient biodiesel. So, photo catalyst can be an alternative option as a catalyst for biodiesel production. The biodiesel yield and their cost can be optimized with the help of BBD model using response surface methodology in design expert software. In the preparation of TiO2–ZnO, TiO2:ZnO weight ratio of 10:4 has been optimized by single parameter study. The maximum actual and predicted biodiesel yield of 88% has been noted at catalyst dose 2.5 g/l, methanol 50 ml, waste cooking oil (WCO) 50 ml, time 120 min and temperature 65 °C respectively. While the cost of biodiesel of INR 61.36 has been calculated at maximum biodiesel yield. While optimization based on cost basis suggest minimum cost of INR 47.29/l can be achieved at catalyst dose 2.5 g/l, methanol 25 ml, waste cooking oil (WCO) 75 ml, time 120 min and temperature 65 °C, respectively. Overall, the % error between actual and predicted biodiesel yield varies in the range of −7.90–7.19%. The minimum actual and predicted WCOBD cost was found to be INR 47.29/l and INR 44.68/l with % error in the range of −19.56–13.87%.