Open Access
This article is

- freely available
- re-usable

*Energies*
**2017**,
*10*(1),
130;
doi:10.3390/en10010130

Article

An Improvement in Biodiesel Production from Waste Cooking Oil by Applying Thought Multi-Response Surface Methodology Using Desirability Functions

^{1}

Department of Mechanical Engineering, University of La Rioja, 26004 Logroño, La Rioja, Spain

^{2}

Built Environment and Engineering, Leeds Beckett University, Leeds LS1 3HB, UK

^{*}

Author to whom correspondence should be addressed.

Academic Editor:
Thomas E. Amidon

Received: 22 November 2016 / Accepted: 13 January 2017 / Published: 21 January 2017

## Abstract

**:**

The exhaustion of natural resources has increased petroleum prices and the environmental impact of oil has stimulated the search for an alternative source of energy such as biodiesel. Waste cooking oil is a potential replacement for vegetable oils in the production of biodiesel. Biodiesel is synthesized by direct transesterification of vegetable oils, which is controlled by several inputs or process variables, including the dosage of catalyst, process temperature, mixing speed, mixing time, humidity and impurities of waste cooking oil that was studied in this case. Yield, turbidity, density, viscosity and higher heating value are considered as outputs. This paper used multi-response surface methodology (MRS) with desirability functions to find the best combination of input variables used in the transesterification reactions to improve the production of biodiesel. In this case, several biodiesel optimization scenarios have been proposed. They are based on a desire to improve the biodiesel yield and the higher heating value, while decreasing the viscosity, density and turbidity. The results demonstrated that, although waste cooking oil was collected from various sources, the dosage of catalyst is one of the most important variables in the yield of biodiesel production, whereas the viscosity obtained was similar in all samples of the biodiesel that was studied.

Keywords:

biodiesel; waste cooking oil; catalysis; multi-response surface methodology## 1. Introduction

In recent scenarios, the consumption of energy has increased greatly due to the change in life styles and the significant growth of population. This increase of energy demand has been supplied by the use of fossil resources, which is having a serious environmental impact on global warming and deforestation. Fossil fuels are limited sources of energy. Thus, this increasing demand for energy has led to a search for an alternative, renewable fuel, such as biodiesel. Biodiesel is renewable, clean and environmentally acceptable as it is derived from vegetable oils and animal fats [1]. Waste cooking oil could be a potential replacement for vegetable oils for the production of biodiesel due to its low raw material cost and because it solves the disposal problem [2,3]. The quantity of waste cooking oil that is generated annually is immense, and the methods of disposal of waste cooking oil are problematic as the may contaminate water in the environment. The amount of waste cooking oil that each country generates varies with the use of the vegetable oil. The potential amount of waste cooking oil to be collected in Spain is estimated at 150 million liters per year [4].

Production of biodiesel from waste cooking oils involves a fossil energy saving of 21% in comparison to the use of crude oil, and an energy saving of 96% compared to fossil diesel production [5]. Each kilogram of collected waste cooking oil can be converted into 0.92–0.97 kg of biodiesel. The production of biodiesel from waste cooking oil is one of the best ways to utilize it efficiently and economically. Biodiesel is synthesized by direct transesterification of vegetable oils, in which the corresponding triglycerides react with a short-chain alcohol in the presence of a catalyst. The catalyst improves the solubility and hastens the reaction [6,7]. Typically used alkaline catalysts are sodium hydroxide (NaOH) and potassium methoxide (KOCH

_{3}) [8]. The transesterification process is influenced by several process variables. The type and dosage of catalyst, process temperature, agitation speed, agitation time, water content and impurities, are the main variables that affect biodiesel yield [9,10]. Thus, the amount and type of products that are formed during frying affect either the biodiesel properties or the transesterification reaction. For example, the water in waste cooking oil affects the methyl ester yield by favoring a saponification reaction [11,12,13]. To remove the undesirable compounds in waste cooking oil, pretreatment is necessary prior to transesterification.The transesterification process involves many variables that affect the reaction. In addition, optimizing so many reaction factors requires a great number of experiments, which are laborious, time-consuming, and not economically viable. Accordingly, a few investigators have used response surface methodology (RSM) to minimize the number of experiments that are necessary to find an optimal combination of process or input variables. Furthermore, due to the simultaneous effects of some process variables on the system, the designed application of modeling tool, such as the RSM response, are essential for maximizing productivity and reducing the costs of the production process. RSM is a statistical method that is used widely to model and optimize processes. It uses the input variables of the process and their responses or outputs to identify the combined effect of the input variables and to obtain the best response [14]. RSM attempts to replace the implicit functions of the original design optimization problem with an approximation model that is traditionally a polynomial function (regression model) and, therefore, less expensive to evaluate. When there is more than one output, several response surfaces should be optimized using Multi-Response Surface Methodology (MRS). This paper used MRS with desirability functions [15] to find the best combination of input process variables in biodiesel production from waste cooking oil in several optimization scenarios. The dosage of catalyst, process temperature, mixing speed, mixing time, humidity and impurities of waste cooking oil are the input variables that were considered in this case. The outputs studied are: yield, turbidity, density, viscosity and high heating value (HHV) (Figure 1).

## 2. Materials and Methods

#### 2.1. Materials

To prepare biodiesel by NaOH catalyzed transesterification, used cooking sunflower oils of domestic origin were collected from various local restaurants and used as raw materials. Prior to transesterification, these samples of waste cooking oils were filtered by a cellulose filter to remove any insoluble impurities and heated at 100 °C for 10 min to remove most of the moisture. All chemicals, including methanol (98%) and NaOH, were of analytical reagent grade. Experiments were conducted in a laboratory scale setup, with 50 mL of the oil heated to the desired temperature using a water bath and a magnetic hot plate stirrer with a temperature controller. The speed of the stirrer was kept constant throughout each experiment. The amounts of NaOH and methanol were then added to the oil. The heating and stirring were stopped after the reaction had reached the preset reaction time. The biodiesel was washed by deionized water several times until the waste water had become clear. This biodiesel then was added to glass containers and were subsequently analyzed to determine the yield (η), turbidity (Turb), density (ρ), viscosity (µ) and higher heating value (HHV).

#### 2.2. Response Surface Method for Optimizing Biodiesel

The RSM method seeks to establish the relationships between input variables (i.e., independent variables) and one or more output variables (i.e., response variables). Box and Wilson introduced it in 1951 [16] for experimental data that were gathered to provide a model or optimal response. RSM was developed originally to model experimental responses, but has been used with other techniques to optimize industrial processes and products [17,18]. Essentially, RSM consists of a collection of statistical techniques that use a regression model that relies on a low-degree polynomial function (Equation (1)):
where Y is an experimental response, f is a function that consists of cross-products of the polynomial’s terms, X
where the linear part is the first summation, the quadratic part is the second part and the product of the pairs of all variables is the third part. The values of coefficients b
where A and B are the limiting values, s is an exponent that indicates the importance of achieving the target value, X is the input vector and f

$$Y=f\left({X}_{1}{,X}_{2}{,X}_{3},\dots {,X}_{k}\right)+e$$

_{1}, X_{2}, X_{3}…, X_{k}are the input vectors and e is an error. The quadratic model (second-order) is a commonly used polynomial function. It is seen in Equation (2):
$$Y={b}_{0}+{\displaystyle \sum _{i=1}^{n}{b}_{i}\xb7{X}_{i}}+{\displaystyle \sum _{i=1}^{n}{b}_{ii}\xb7{X}_{i}^{2}}+{\displaystyle \sum _{i=1}^{n-1}{\displaystyle \sum _{j=i+1}^{n}{b}_{ij}\xb7{X}_{i}\xb7{X}_{j}}}+e$$

_{0}, b_{i}, b_{ii}and b_{ij}are determined by regression analysis, although these functions do not always provide good results for complex problems that involve many nonlinearities and inputs. The reason is that they cannot be adjusted when the data are sparse as they are continuous functions that are defined by polynomials. The p-value (or Prob. > F) is defined as the probability of obtaining a result that is equal to or greater than what was actually observed. This assumes that the model is accurate. The p-value can be computed by analyzing the variance (ANOVA). If it exceeds the model’s F and the model has no term that exceeds the significance level (e.g., α = 0.05), the model will suffice within a confidence interval of (1–α). Some researchers have used ANOVA to determine the effect of the process variables or inputs on the process outputs [19,20]. If there is more than one output for a problem, the latter is described as MRS. It causes and suggests that outputs are in conflict, because the optimal configuration may differ greatly from one output to output. Harrington [15] suggested a compromise. It provides desirability functions for each output, Equations (3) and (4), as well as an overall desirability, namely the geometric mean of the D (desirability) of each output (Equation (5)):
$${d}_{r}^{\mathrm{m}\mathrm{a}\mathrm{x}}=\{\begin{array}{cc}0& {\mathit{if}\text{}f}_{r}\left(X\right)A\\ {\left(\frac{{f}_{r}\left(X\right)-A}{B-A}\right)}^{S}& \mathit{if}\text{}A\le {f}_{r}\left(X\right)\le B\\ 1& {\mathit{if}\text{}f}_{r}\left(X\right)B\end{array}$$

$${d}_{r}^{\mathrm{m}\mathrm{i}\mathrm{n}}=\{\begin{array}{cc}1& {\mathit{if}\text{}f}_{r}\left(X\right)A\\ {\left(\frac{{f}_{r}\left(X\right)-B}{A-B}\right)}^{S}& \mathit{if}\text{}A\le {f}_{r}\left(X\right)\le B\\ 0& {\mathit{if}\text{}f}_{r}\left(X\right)B\end{array}$$

$$D={\left({\displaystyle \prod _{r=1}^{R}{d}_{r}}\right)}^{1/R}$$

_{r}is the model for prediction. It is desirable to use a second higher degree polynomial to optimize responses [21]. In the desirability approach, each estimated response is transformed into a unit-less utility that is bounded by 0 < d_{r}< 1. A higher value of d_{r}indicates a more desirable response value. The optimization aspect of the R package v.1.6 [22] looks for a combination of importance factors (or weights from 1 to 3) that satisfies the process criteria of each response and input.## 3. Experiments Design

In order to create accurate models with the minimum amount of data to support the initial hypotheses, RSM must establish a design of experiments (DoE) [23]. Several methods have been suggested. However, this requires a design matrix (inputs) to be constructed in order to measure the response or outputs. A Box–Behnken design (BBD) [24] with three factors and three levels was used in this case. The input variables that were used to develop the DoE were methanol/oil molar ratio (M), catalyst (C), temperature (T), speed (S), time (t), humidity (H) and impurities (I). The experimentally selected factors for optimization and their respective ranges were as follows: methanol/oil molar ratio (6:1–9:1), quantity of NaOH catalyst (1–2 wt. %), reaction temperature (20–40 °C), reaction speed (500–1000 rpm), humidity (0–3 wt. %) and impurities (0–3 wt. %). The variable ranges that are provided in Table 1 were adopted to cover the intervals that commonly are utilized in literature [25,26,27,28,29].

Once the inputs and levels have been set as in Table 1, the design matrix and their corresponding combination of operating conditions are generated using the Statistical Software R (R Development Core Team, Auckland, New Zealand) [30]. In this case, 56 experiments are needed to cover the entire range of possibilities and to determine the optimal production of biodiesel. The design matrix (see Table 2) shows the number of experiments and the corresponding values for the combination of variables (ratio oil, catalyst, temperature, speed, time, humidity and impurities).

The response variable that was used to select the biodiesel yield was established in each experiment after phase separation. The biodiesel yield can be calculated using Equation (6) [31]:

$$\mathrm{Yied}=\frac{weightofproduct\text{\hspace{0.17em}}\left(g\right)}{weightofrawoil\text{\hspace{0.17em}}\left(g\right)}\times 100$$

In addition to yield, the following variables were determined in the final biodiesel product: turbidity measurements were carried out with a 2100Q Turbidimeter (Hach Company, Loveland, CO, USA). Kinematic viscosity values were determined with Cannon–Fenske viscometers (Cannon Instrument Co., State College, PA, USA) at a temperature of 40 °C following the standard ASTM D445 method [32]. Density measurements were carried out using a pycnometer according to ASTM D941 [33]. The HHV of the biodiesel was obtained in a bomb calorimeter (Parr-1351, Parr Instrument Company, Moline, IL, USA), according to the ASTM D2015 standard method [34].

## 4. Using Response Surface Methodology to Optimize Biodiesel Variables

The reaction conditions for pretreatment and biodiesel production have been optimized using RSM by many authors. For example, the RSM technique was applied by Mumtaz et al. [35] for optimization of biodiesel production from rice bran and sunflower oils. Mansourpoor and Shariati [36] used the RSM technique to optimize the biodiesel production from sunflower oil. Yuan et al. [37] studied the use of waste rapeseed oil with high free fatty acids as feedstock for production of biodiesel using RSM to optimize the conditions for maximum conversion to biodiesel and understand the significance and interaction of the factors affecting the biodiesel production. The biodiesel yield was obtained by Dhingra et al. using the RSM technique on Karanja oil using KOH as catalyst [38].

Several researchers have used the RSM to obtain the optimal combination of inputs or process variables in biodiesel yield. However, most of this work is based on the modeling and optimization of relatively few output and input variables. This makes the optimization problem much easier. For example, Aworanti et al. [39] investigated the effects of methanol to oil molar ratio, catalyst amount and reaction time on the transesterification of waste cooking oil to biodiesel using RSM. Omar et al. [40] used RSM to study the relationship of methanol to oil molar ratio, catalyst loading, reaction time and reaction temperature on methyl ester yields and free fatty acid conversion in heterogeneous transesterification of waste palm cooking oil to biodiesel by Sr/ZrO

_{2}catalyst.Other authors, such as Noshadi [41], have investigate the process variables that affect acid-catalyzed transesterification of waste cooking oil with methanol in a continuous reactive distillation column, in order to better understand the relationship between operating conditions and the response yield, and to determine the optimal condition of the process using RSM. Rashid et al. [42] applied RSM with central composite rotatable design to explore the optimum conditions for transesterification of Moringa oleifera oil. The four process input variables that were considered were reaction temperature, reaction time, methanol/oil molar ratio and catalyst concentration.

Furthermore, Hameed et al. [43] studied the influence of process variables (methanol/oil molar ratio, reaction time and amount of catalyst) on the production of biodiesel from palm oil using KF/ZnO catalyst. In this case, the effects of three transesterification process variables were studied simultaneously on the response (yield) using RSM based on central composite design (CCD). Ghoreishi and Moein [44] applied RSM to analyze the effect of four independent variables (molar ratio of methanol to oil, reaction temperature, pressure and time) on the yield of the biodiesel production by the supercritical methanol method. Waste vegetable oil was used as raw material and the transesterification reaction took place in a supercritical batch reactor. In a similar fashion, Azócar et al. [45] studied the application of waste frying oil mixed with rapeseed oil as a feedstock for the effective production of fatty acid methyl esters in a lipase-catalyzed process. RSM was used to optimize the interaction of four variables: the percentage of waste frying oils (WFO) in the mixed feedstock, the methanol-to-oil ratio, the dosage of Novozym as a catalyst and the reaction temperature. Pullen and Saeed [46] studied the effects of catalyst type, number of reaction stages, the free fatty acid and moisture content for optimized biodiesel production from rapeseed oil. De Paola et al. [47] used a factor analysis to evaluate the effect of process variables on yields of biodiesel production from husk oil. The two variables considered are mixing rate and enzyme loading, since it has been recognized that they affect process performance singularly and through interaction effects. Furthermore, Ghadge and Raheman [12] used a central composite rotatable design to study the effect of methanol quantity, acid concentration and reaction time on the reduction of free fatty acid content of mahua oil during its pre-treatment for the production of biodiesel. Each of the three variables significantly affected the acid value of the product, with methanol being the most effective followed by reaction time and acid catalyst concentration. Using response surface methodology, a quadratic polynomial equation was obtained for acid value by multiple regression analysis.

Kim et al. [48] studied the optimization of experimental variables, such as catalyst type, catalyst concentration, and molar ratio of methanol to oil and reaction temperature, on the transesterification for the production of rapeseed methyl ester. According to the Taguchi method, the catalyst concentration played the most important role in the yield of rapeseed methyl ester.

More recently, Dwivedi and Sharma [49] implemented the Box–Behnken response surface methodology for maximizing biodiesel yield from Pongamia oil by optimizing four process variables. They were: methanol-to-oil molar ratio, catalyst (KOH) concentration, reaction temperature and reaction time. Hamze et al. [29] applied RSM based on Box–Behnken design to investigate the effects of the main process variables, including the methanol-to-oil molar ratio, catalyst concentration, and reaction temperature, on the biodiesel yield. The results revealed that the catalyst concentration is the most important parameter.

In this study, the biodiesel variables or outputs of yield, density, viscosity and high heating value were optimized when the input or process variables were the methanol-to-oil molar ratio, the dosage of catalyst, process temperature, mixing speed, mixing time, humidity and impurities of waste cooking oil.

## 5. Results

#### 5.1. Experimental Results

#### 5.2. Analysis of Variance

Equation (2) was fitted using the data shown in Table 2 to obtain regression equations for all responses with the use of the R Base package [30,50]. For each response, second-order polynomial models were constructed. Then, the most accurate model was selected with the use of several criteria (R2, p-value, mean absolute error (MAE) and root mean square error (RMSE)).

Equations (7)–(11) show the second-order polynomial functions that were obtained to model yield (η), turbidity (Turb), density (ρ), viscosity (µ) and high heating value (HHV). These equations show how a combination of second-order polynomials that are formed by combining the input variables provide the output.

η = −355.81892 + 96.8359·M − 7.50198·M

^{2}+ 13.61993·M·C − 53.42693·C^{2}+ 7.60976·T − 0.12404·T^{2}− 29.99115·H + 10.00732·C·H + 4.98413·H^{2}
Turb = 190.98147 − 34.29524·M + 2.6746·M

^{2}− 9.20669·M·C + 15.08333·C^{2}+ 2.59409·t − 0.04323·t^{2}− 0.01376·M·S + 0.07336·C·S − 0.70959·C·T − 46.81611·H + 4.85389·M·H − 74.14871·I + 4.99833·M·I + 0.59234·T·I + 5.46056·H·I + 2.56599·I^{2}
ρ = 1.33807 − 0.09641·M + 0.00469·M

^{2}− 0.00537·t + 0.00055·M·t – 1 × 10^{-5}·M·S + 1 × 10^{-5}·t·S + 0.00028·M·T − 0.00037·C·T − 0.00016·t·T − 0.04724·H + 0.00306·M·H + 3 × 10^{-5}·S·H + 0.00078·t·I – 3 × 10^{-5}·S·I
µ= 6.573 − 0.01721·M·t + 0.00107·T

^{2}+ 0.3601·M·H − 1.32117·C·H + 0.08747·t·H − 0.00473·S·H + 0.25198·H^{2}+ 0.26241·M·I − 0.06006·T·I
HHV = 20.21439 + 0.41141·M − 1.82536·C + 0.5899·C

^{2}− 0.003·M·t − 0.00875·M·T − 6 × 10^{-5}·S·T + 0.00217·T^{2}+ 0.77049·H − 0.33924·C·H + 0.01583·t·H − 0.00122·S·H + 0.09299·H^{2}+ 0.06526·M·I − 0.01564·T·ITable 4, Table 5, Table 6, Table 7 and Table 8 show the results of ANOVA for each of the final quadratic models. The p-value of most process variables is less than 0.01. Thus, the variables used for quadratic models are statistically significant. The multiple correlation coefficient (R

^{2}) is a measure of the variation about the mean of the values provided by the regression model. All values of R^{2}in the following results are close to 1. This indicates that these models have good predictive capability.MAE and RMSE are calculated to determine the generalization capacity of the quadratic models using the samples shown in Table 4 according to Equations (12) and (13):

$$MAE=\frac{1}{m}\cdot {\displaystyle \sum _{k=1}^{m}\left|{Y}_{k\text{}\mathrm{Experiment}}-{Y}_{k\text{}\mathrm{Model}}\right|}$$

$$RMSE=\sqrt{\frac{1}{m}{\displaystyle \sum _{k=1}^{m}{\left({Y}_{k\text{}\mathrm{Experiment}}-{Y}_{k\text{}\mathrm{Model}}\right)}^{2}}}$$

In this case, Y

_{k}_{Experiment}are the experimentally-obtained responses, and Y_{k}_{Model}are responses from the quadratic models that RSM and m experiments produced. Prediction errors are shown in Table 9. The maximum error corresponds to η (MAE equal to 10.445 and RMSE equal to 12.803), and the minimum error corresponds to ρ (MAE equal to 0.009 and RMSE equal to 0.012).Figure 2 shows the relationship between the actual values that were obtained experimentally (Table 1) and the predicted (quadratic models) values of η (Figure 2a), Turb (Figure 2b), ρ (Figure 2c), µ (Figure 2d), and HHV (Figure 2e). The figures show that these models suffice for the prediction of these values, as the residuals that were obtained are small and the correlations between actual and predicted values are high.

In order to test the proposed models, 15 new experiments that had not been used during the training process were conducted (See Table 10).

Table 11 shows the errors obtained from the 15 new experiments. The maximum error corresponds to η (MAE equal to 15.081 and RMSE equal to 22.853), and the minimum error corresponds to ρ (MAE equal to 0.063 and RMSE equal to 0.066).

#### 5.3. Multi-Response Optimization

Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, Table 18, Table 19 and Table 20 show the combination of process variables that were studied in examining the biodiesel production process by means of desirability functions using the Desirability package [51] according to nine different criteria.

The first and second columns show, respectively, the inputs and outputs that were studied, and the goal that was established in the optimization process. The third column shows the degrees of importance considered in the optimization process. Finally, the fourth column shows the optimized values obtained and the fifth column shows the desirability values.

Table 12 shows the results when the design requirements that are based on yield production, turbidity, density, viscosity and HHV of biodiesel were considered with the same level of importance (equal to one). In this case, the value of the overall desirability was 0.710.

Table 13 shows the results when the design required were based on maximizing yield were considered with a higher level of importance than other process criteria. The goal that was established was a value of three (maximum), and the overall desirability obtained was 0.709. Table 14 shows the results when the design requirements that were based on minimize turbidity. The overall desirability obtained was 0.710. Table 15 shows the results when the design requirements were based on minimizing the density and viscosity. The overall desirability obtained in this case was 0.467. Table 16 shows the results when the design requirements were based on maximizing the H. The overall desirability obtained was 0.626. Table 17 shows the results when the design requirements were based on minimizing the density and viscosity. The overall desirability obtained in this case was 0.710. Table 18 shows the results when the design requirements that were based on minimizing the speed of agitation. The overall desirability obtained was 0.710. Table 19 shows the results when the design requirements were based on minimizing the time. The overall desirability obtained in this case was 0.710. Finally, Table 20 shows the results when the design requirements were based on minimizing the molar ratio oil. The overall desirability obtained in this case was 0.710. From the results that appear in Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, Table 18, Table 19 and Table 20, it can be seen that the process variables are very similar for all different design requirements that were studied. Thus, for example, the ranges of values for the molar ratio oil for the different design requirements that were studied extend from 6.06–7.35, whereas the ranges for the catalyst was 0.73 wt. %–0.78 wt. %. The time and speed of agitation were, respectively, 19.98–20 s and 499.96 rpm–500.01 rpm, and the temperature varied from 20–33.70 °C. In addition, the humidity and impurities in the waste cooking oil were, respectively, 0 wt. %–1.82 wt. % and 0.77 wt. %–2.70 wt. %. Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, Table 18, Table 19 and Table 20 show that the values of humidity and impurity are practically zero. This indicates that, as the humidity and impurity values increase, the rest of the variables (η, Turb, ρ, µ, and HHV) decrease. From these results, it follows that the optimal process variables for different design requirements were found in a relatively narrow range.

Once the different biodiesel optimization scenarios were obtained, nine new experiments according to the combination of process variables that appear in Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, Table 18, Table 19 and Table 20 were prepared in order to determine the accuracy of the proposed methodology. Table 21 shows the values of different biodiesel outputs according to the nine biodiesel optimization scenarios that were studied. This table shows that the experimentally-obtained values for the nine biodiesel optimization scenarios did not differ significantly from those that application of the MRS methodology produced (see the results of Table 12, Table 13, Table 14, Table 15, Table 16, Table 17, Table 18, Table 19 and Table 20). In this case, in order to compare the different errors in predicting the outputs according to the nine design requirements under study, MAE and RMSE were obtained from the normalized data. It is common practice to normalize the data in statistical processes so that all variables use the same scale (i.e., 0–1). In this case, the data were normalized by subtracting the minimum value from each original value and dividing by the range of each variable as shown in Equation (14):
where Y

$${Y}_{k,\text{}norm}=\frac{{Y}_{k}-\mathrm{min}\left(Y\right)}{\mathrm{range}\text{\hspace{0.17em}}(Y)}$$

_{k,norm}are the normalized outputs of the models that were developed with RSM and of those that were obtained experimentally. The error that appears in the last two columns represents the MAE and RMSE that were normalized for each variable in each of the nine biodiesel optimization scenarios that were studied. However, the normalized MAE and RMSE in the last two rows correspond to the errors in each of the outputs that were studied. For example, when minimize the turbidity is considered to be an optimization variable for biodiesel production, the errors obtained are the smallest (MAE = 0.04 and RMSE = 0.02), but when minimize the viscosity and density are considered, the error is the largest (MAE = 0.12 and RMSE = 0.08). In contrast, the maximum errors obtained for each of the outputs are lower when predicting viscosity (MAE = 0 and RMSE = 0.01) and greater when predicting turbidity (MAE = 0.03 and RMSE = 0.09). In addition, the values of MAE and RMSE that were obtained for each of the different outputs are all in acceptable agreement according to the texting error.## 6. Conclusions

This work was carried out to investigate yield, turbidity, density, viscosity, and HHV of biodiesel from waste cooking oil. Response surface methodology based on the Box–Behnken design was used to study the effects of the process variables on the biodiesel production from waste cooking oil. According to the ANOVA, the results obtained demonstrated that, although waste cooking oil was collected from different sources, the molar ratio and dosage of catalyst are one of the most important factors in the yield of biodiesel production (see Table 4), whereas the humidity is one of the lowest factor. In addition, humidity and impurities are one of the most important factor for increasing the turbidity (see Table 5), whereas for the HHV the dosage of catalyst is the most important factor (see Table 8). Finally, the dosage of catalyst is one of the most important factors in the biodiesel production. The optimal conditions for maximum yield were found to be: molar ratio of 6.52, catalyst loading of 0.78 wt. %, reaction time of 19.99 min, reaction speed of 499.67 rpm, temperature of 24.44 °C, humidity of 0.21 wt. %, and impurities of 0.17 wt. %. The maximum biodiesel yield under these conditions was 100%. In addition, the optimal conditions for maximum heating value were found to be: molar ratio of 6.4, catalyst loading of 1 wt. %, reaction time of 20 min, reaction speed of 499.6 rpm, temperature of 33.7 °C, humidity of 0.21 wt. %, and impurities of 0.16 wt. %. The maximum biodiesel yield under these conditions was 100%. In conclusion, the optimal conditions for humidity and impurities in all biodiesel optimization scenarios were closest to the minimum values of the range (0 wt. %, and 0 wt. %). The fuel properties of the biodiesel complied with international standards. Thus, the present study confirmed the high quality of the biodiesel that was produced from waste cooking oil.

## Acknowledgments

The authors wish to thank the University of La Rioja for its support through Project ADER 2014-I-IDD-00162.

## Author Contributions

Experimental works: Marina Corral Bobadilla, Fátima Somovilla Gómez, Rubén Lostado Lorza and Eliseo P. Vergara González. Development of predictive models and optimization: Rubén Escribano García. Results analysis and manuscript preparation: All authors.

## Conflicts of Interest

The authors declare no conflict of interest.

## References

- Meka, P.K.; Tripathi, V.; Singh, R.P. Synthesis of biodiesel fuel from safflower oil using various reaction parameters. J. Oleo Sci.
**2007**, 56, 9–12. [Google Scholar] [CrossRef] - Yan, J.; Zheng, X.; Li, S. A novel and robust recombinant Pichia pastoris yeast whole cell biocatalyst with intracellular over expression of a Thermomyces lanuginosus lipase: Preparation, characterization and application in biodiesel production. Bioresour. Technol.
**2014**, 151, 43–48. [Google Scholar] [CrossRef] [PubMed] - Phan, A.N.; Phan, T.M. Biodiesel production from waste cooking oils. Fuel
**2008**, 87, 3490–3496. [Google Scholar] [CrossRef] - Ministerio de Agricultura, Alimentación y Medio Ambiente. Gobierno de España. Available online: http://www.mapama.gob.es/es (accessed on 16 June 2016).
- Centro de Investigaciones Energéticas, Medioambientales y Tecnológicas. Available online: http://www.ciemat.es (accessed on 16 June 2016).
- Atabani, A.; Silitonga, A.; Badruddin, I.A.; Mahlia, T.; Masjuki, H.; Mekhilef, S. A comprehensive review on biodiesel as an alternative energy resource and its characteristics. Renew. Sustain. Energy Rev.
**2012**, 16, 2070–2093. [Google Scholar] [CrossRef] - Balakrishnan, K.; Olutoye, M.A.; Hameed, B.H. Synthesis of methyl esters from waste cooking oil using construction waste material as solid base catalyst. Bioresour. Technol.
**2013**, 128, 788–791. [Google Scholar] [CrossRef] [PubMed] - Shahid, E.M.; Jamal, Y. Production of biodiesel: A technical review. Renew. Sustain. Energy Rev.
**2011**, 15, 4732–4745. [Google Scholar] [CrossRef] - Borges, M.E.; Díaz, L. Recent developments on heterogeneous catalysts for biodiesel production by oil esterification and transesterification reactions: A review. Renew. Sustain. Energy Rev.
**2012**, 16, 2839–2849. [Google Scholar] [CrossRef] - Yaakob, Z.; Mohammad, M.; Alherbawi, M.; Alam, Z.; Sopian, K. Overview of the production of biodiesel from Waste cooking oil. Renew. Sustain. Energy Rev.
**2013**, 18, 184–193. [Google Scholar] [CrossRef] - Kulkarni, M.G.; Dalai, A.K. Waste cooking oil an economical source for biodiesel: A review. Ind. Eng. Chem. Res.
**2006**, 45, 2901–2913. [Google Scholar] [CrossRef] - Ghadge, S.V.; Raheman, H. Process optimization for biodiesel production from mahua (Madhuca indica) oil using response surface methodology. Bioresour. Technol.
**2006**, 97, 379–384. [Google Scholar] [CrossRef] [PubMed] - Enweremadu, C.C.; Barawa, M.M. Technical aspects of production and analysis of biodiesel from used cooking oil—A review. Renew. Sustain. Energy Rev.
**2009**, 13, 2205–2224. [Google Scholar] [CrossRef] - Myers, R.H. Response Surfaces Methodology, 1st ed.; Allyn and Bacan Inc.: Boston, MA, USA, 1971. [Google Scholar]
- Harrington, E.C. The desirability function. Ind. Qual. Control
**1965**, 21, 494–498. [Google Scholar] - Box, G.E.; Wilson, K.B. On the experimental attainment of optimum conditions. J. R. Stat. Soc. Ser. B (Methodological)
**1951**, 13, 1–45. [Google Scholar] - Lostado, R.; García, R.E.; Martinez, R.F. Optimization of operating conditions for a double-row tapered roller bearing. Int. J. Mech. Mater. Des.
**2016**, 12, 353–373. [Google Scholar] [CrossRef] - Lostado, R.; Escribano, R.; Martínez, M.A.; Múgica, R. Improvement in the design of welded joints of EN 235JR low carbon steel by multiple response surface methodology. Metals
**2016**, 6, 205–226. [Google Scholar] [CrossRef] - Moussaoui, K.; Mousseigne, M.; Senatore, J.; Chieragatti, R.; Lamesle, P. Influence of milling on the fatigue lifetime of a Ti6Al4V titanium alloy. Metals
**2015**, 5, 1148–1162. [Google Scholar] [CrossRef] - Gopalsamy, B.M.; Mondal, B.; Ghosh, S. Taguchi method and ANOVA: An approach for process parameters optimization of hard machining while machining hardened steel. J. Sci. Ind. Res. India
**2009**, 68, 686–695. [Google Scholar] - Derringer, G.; Suich, R. Simultaneous optimization of several response variables. J. Qual. Technol.
**1980**, 12, 214–219. [Google Scholar] - Kuhn, M. Desirability: Desirabiliy Function Optimization and Ranking. Available online: http://CRAN.R-project.org/package=desirability (accessed on 25 August 2016).
- Montgomery, D.C. Design and Analysis of Experiments; John Wiley & Sons: New York, NY, USA, 2008. [Google Scholar]
- Box, G.E.; Behnken, D.W. Some new three level designs for the study of quantitative variables. Technometrics
**1960**, 2, 455–475. [Google Scholar] [CrossRef] - Atapour, M.; Kariminia, H.R.; Moslehabadi, P.M. Optimization of biodiesel production by alkali-catalyzed transesterification of used frying oil. Process Saf. Environ. Prot.
**2014**, 92, 179–185. [Google Scholar] [CrossRef] - Farag, H.; El-Maghraby, A.; Taha, N.A. Optimization of factors affecting esterification of mixed oil with high percentage of free fatty acid. Fuel Process. Technol.
**2011**, 92, 507–510. [Google Scholar] [CrossRef] - Silva, G.F.; Camargo, F.L.; Ferreira, A.L. Application of response surface methodology for optimization of biodiesel production by transesterification of soybean oil with ethanol. Fuel Process. Technol.
**2011**, 92, 407–413. [Google Scholar] [CrossRef] - Hamze, H.; Akia, M.; Yazdani, F. Optimization of biodiesel production from the waste cooking oil using response surface methodology. Process Saf. Environ. Prot.
**2015**, 94, 1–10. [Google Scholar] [CrossRef] - El-Gendy, N.S.; El-Gharabawy, A.A.; Amr, S.S.; Ashour, F.H. Response surface optimization of an alkaline transesterification of waste cooking oil. Int.J. ChemTech Res.
**2015**, 8, 385–398. [Google Scholar] - R: The R Project for Statistical Computing. Available online: https://www.r-project.org/ (accessed on 25 July 2016).
- Leung, D.Y.C.; Guo, Y. Transesterification of neat and used frying oil: Optimization for biodiesel production. Fuel Process. Technol.
**2006**, 87, 883–890. [Google Scholar] [CrossRef] - ASTM D445. Standard Test Method for Kinematic Viscosity of Transparent and Opaque Liquids. Available online: http://www.astm.org/Standards/D445 (accessed on 25 March 2016).
- ASTM D941. Standard Test Method for Density and Relative Density of Liquids by Lipkin Bicapillary Pycnometer. Available online: http://www.astm.org/Standards/D941 (accessed on 25 March 2016).
- ASTM D2015-00 Test Method for Gross Calorific Value of Coal and Coke by the Adiabatic Bomb Calorimeter. Available online: http://www.astm.org/Standards/D2015 (accessed on 12 April 2016).
- Mumtaz, M.W.; Adnan, A.; Anwar, F.; Mukhtar, H.; Raza, M.A.; Ahmad, F. Response surface methodology: An emphatic tool for optimized biodiesel production using rice bran and sunflower oils. Energies
**2012**, 5, 3307–3328. [Google Scholar] [CrossRef] - Mansourpoor, M.; Shariati, A. Optimization of biodiesel production from sunflower oil using response surface methodology. Chem. Eng. Process Technol.
**2012**, 3. [Google Scholar] [CrossRef] - Yuan, X.; Liu, J.; Zeng, G.; Shi, J.; Tong, J.; Huang, G. Optimization of conversion of waste rapeseed oil with high FFA to biodiesel using response surface methodology. Renew. Energy
**2008**, 33, 1678–1684. [Google Scholar] [CrossRef] - Dhingra, S.; Bhushan, G.; Dubey, K.K. Development of a combined approach for improvement and optimization of Karanja biodiesel using response surface methodology and genetic algorithm. Energy
**2013**, 7, 495–505. [Google Scholar] [CrossRef] - Aworanti, O.A.; Agarry, S.E.; Ajani, A.O. Statistical optimization of process variables for biodiesel production from waste cooking oil using heterogeneous base catalyst. Br. Biotechnol.
**2013**, 3, 116–132. [Google Scholar] [CrossRef] - Omar, W.N.; Amin, N.A. Optimization of heterogeneous biodiesel production from waste cooking palm oil via response surface methodology. Biomass Bioenergy
**2011**, 35, 1329–1338. [Google Scholar] [CrossRef] - Noshadi, I.; Amin, N.A.S.; Parnas, R.S. Continuous production of biodiesel from waste cooking oil in a reactive distillation column catalyzed by solid heteropoly acid: Optimization using response surface methodology (RSM). Fuel
**2012**, 94, 156–164. [Google Scholar] [CrossRef] - Rashid, U.; Anwar, F.; Ashraf, M.; Saleem, M.; Yusup, S. Application of response surface methodology for optimizing transesterification of Moringa oleifera oil: Biodiesel production. Energy Convers. Manag.
**2011**, 52, 3034–3042. [Google Scholar] [CrossRef] - Hameed, B.H.; Lai, L.F.; Chin, L.H. Production of biodiesel from palm oil (Elaeis guineensis) using heterogeneous catalyst: An optimized process. Fuel Process. Technol.
**2009**, 90, 606–610. [Google Scholar] [CrossRef] - Ghoreishi, S.M.; Moein, P. Biodiesel synthesis from waste vegetable oil via transesterification reaction in supercritical methanol. J. Supercrit. Fluids
**2013**, 76, 24–31. [Google Scholar] [CrossRef] - Azócar, L.; Heipieper, H.J.; Muñoz, R.; Navia, R. Improving fatty acid methyl ester production yield in a lipase-catalyzed process using waste frying oils as feedstock. J. Biosci. Bioeng.
**2010**, 109, 609–614. [Google Scholar] [CrossRef] [PubMed] - Pullen, J.; Saeed, K. Investigation of the factors affecting the progress of base catalyzed transesterification of rapeseed oil to biodiesel FAME. Fuel Process. Technol.
**2015**, 130, 127–135. [Google Scholar] [CrossRef] - De Paola, M.; Ricca, E.; Calabrò, V.; Curcio, S.; Iorio, G. Factor analysis of transesterification reaction of waste oil for biodiesel production. Bioresour. Technol.
**2009**, 100, 5126–5131. [Google Scholar] [CrossRef] [PubMed] - Kim, S.T.; Park, Y.T. Application of Taguchi experimental design for the optimization of effective parameters on the rapeseed methyl ester production. Environ. Eng. Res.
**2010**, 15, 129–134. [Google Scholar] [CrossRef] - Dwivedi, G.; Sharma, M.P. Application of Box-Behnken design in optimization of biodiesel yield from Pongamia oil and its stability analysis. Fuel
**2015**, 147, 279. [Google Scholar] [CrossRef] - Lenth, R.V. Response-surface methods in R, using rsm. J. Stat. Softw.
**2009**, 32, 1–17. [Google Scholar] [CrossRef] - Max, K. Desirability Function Optimization and Ranking. Available online: https://CRAN.R-project.org/package=desirability (accessed on 28 March 2016).

**Figure 2.**Scatter diagram of: (

**a**) Yield (η); (

**b**) turbidity (Turb); (

**c**) density (ρ); (

**d**) viscosity (µ); and (

**e**) high heating value (HHV).

**Table 1.**Independent variables and experimental design levels used with the Box–Behnken design (BBD) method.

Inputs | Notation | Magnitude | Levels | ||
---|---|---|---|---|---|

−1 | 0 | +1 | |||

Ratio oil | M | 6/1 | 7.5/1 | 9/1 | |

Catalyst | C | wt. % | 1 | 1.5 | 2 |

Time | t | min | 20 | 30 | 40 |

Speed | S | rpm | 500 | 750 | 1000 |

Temp | T | °C | 20 | 30 | 40 |

Humidity | H | wt. % | 0 | 1.5 | 3 |

Impurity | I | wt. % | 0 | 1.5 | 3 |

Sample | Inputs | ||||||
---|---|---|---|---|---|---|---|

Molar Ratio | Catalyst (wt. %) | Time (min) | Speed (rpm) | Temp (°C) | Humidity (wt. %) | Impurity (wt. %) | |

25 | 6 | 1 | 30 | 500 | 30 | 1.5 | 1.5 |

29 | 6 | 1 | 30 | 1000 | 30 | 1.5 | 1.5 |

27 | 6 | 2 | 30 | 500 | 30 | 1.5 | 1.5 |

31 | 6 | 2 | 30 | 1000 | 30 | 1.5 | 1.5 |

41 | 6 | 1.5 | 20 | 750 | 20 | 1.5 | 1.5 |

45 | 6 | 1.5 | 20 | 750 | 40 | 1.5 | 1.5 |

9 | 6 | 1.5 | 30 | 750 | 30 | 0 | 0 |

13 | 6 | 1.5 | 30 | 750 | 30 | 0 | 3 |

11 | 6 | 1.5 | 30 | 750 | 30 | 3 | 0 |

15 | 6 | 1.5 | 30 | 750 | 30 | 3 | 3 |

43 | 6 | 1.5 | 40 | 750 | 20 | 1.5 | 1.5 |

47 | 6 | 1.5 | 40 | 750 | 40 | 1.5 | 1.5 |

26 | 9 | 1 | 30 | 500 | 30 | 1.5 | 1.5 |

30 | 9 | 1 | 30 | 1000 | 30 | 1.5 | 1.5 |

28 | 9 | 2 | 30 | 500 | 30 | 1.5 | 1.5 |

32 | 9 | 2 | 30 | 1000 | 30 | 1.5 | 1.5 |

42 | 9 | 1.5 | 20 | 750 | 20 | 1.5 | 1.5 |

46 | 9 | 1.5 | 20 | 750 | 40 | 1.5 | 1.5 |

10 | 9 | 1.5 | 30 | 750 | 30 | 0 | 0 |

14 | 9 | 1.5 | 30 | 750 | 30 | 0 | 3 |

12 | 9 | 1.5 | 30 | 750 | 30 | 3 | 0 |

16 | 9 | 1.5 | 30 | 750 | 30 | 3 | 3 |

44 | 9 | 1.5 | 40 | 750 | 20 | 1.5 | 1.5 |

48 | 9 | 1.5 | 40 | 750 | 40 | 1.5 | 1.5 |

49 | 7.5 | 1 | 20 | 750 | 30 | 0 | 1.5 |

53 | 7.5 | 1 | 20 | 750 | 30 | 3 | 1.5 |

17 | 7.5 | 1 | 30 | 750 | 20 | 1.5 | 0 |

21 | 7.5 | 1 | 30 | 750 | 20 | 1.5 | 3 |

19 | 7.5 | 1 | 30 | 750 | 40 | 1.5 | 0 |

23 | 7.5 | 1 | 30 | 750 | 40 | 1.5 | 3 |

51 | 7.5 | 1 | 40 | 750 | 30 | 0 | 1.5 |

55 | 7.5 | 1 | 40 | 750 | 30 | 3 | 1.5 |

50 | 7.5 | 2 | 20 | 750 | 30 | 0 | 1.5 |

54 | 7.5 | 2 | 20 | 750 | 30 | 3 | 1.5 |

18 | 7.5 | 2 | 30 | 750 | 20 | 1.5 | 0 |

22 | 7.5 | 2 | 30 | 750 | 20 | 1.5 | 3 |

20 | 7.5 | 2 | 30 | 750 | 40 | 1.5 | 0 |

24 | 7.5 | 2 | 30 | 750 | 40 | 1.5 | 3 |

52 | 7.5 | 2 | 40 | 750 | 30 | 0 | 1.5 |

56 | 7.5 | 2 | 40 | 750 | 30 | 3 | 1.5 |

33 | 7.5 | 1.5 | 20 | 500 | 30 | 1.5 | 0 |

37 | 7.5 | 1.5 | 20 | 500 | 30 | 1.5 | 3 |

35 | 7.5 | 1.5 | 20 | 1000 | 30 | 1.5 | 0 |

39 | 7.5 | 1.5 | 20 | 1000 | 30 | 1.5 | 3 |

1 | 7.5 | 1.5 | 30 | 500 | 20 | 0 | 1.5 |

5 | 7.5 | 1.5 | 30 | 500 | 20 | 3 | 1.5 |

3 | 7.5 | 1.5 | 30 | 500 | 40 | 0 | 1.5 |

7 | 7.5 | 1.5 | 30 | 500 | 40 | 3 | 1.5 |

2 | 7.5 | 1.5 | 30 | 1000 | 20 | 0 | 1.5 |

6 | 7.5 | 1.5 | 30 | 1000 | 20 | 3 | 1.5 |

4 | 7.5 | 1.5 | 30 | 1000 | 40 | 0 | 1.5 |

8 | 7.5 | 1.5 | 30 | 1000 | 40 | 3 | 1.5 |

34 | 7.5 | 1.5 | 40 | 500 | 30 | 1.5 | 0 |

38 | 7.5 | 1.5 | 40 | 500 | 30 | 1.5 | 3 |

36 | 7.5 | 1.5 | 40 | 1000 | 30 | 1.5 | 0 |

40 | 7.5 | 1.5 | 40 | 1000 | 30 | 1.5 | 3 |

Sample | Outputs | ||||
---|---|---|---|---|---|

η | Turb (NTU) | ρ (g/mL) | µ (mm^{2}/s) | HHV (MJ/Kg) | |

25 | 93 | 0.65 | 0.83 | 7.03 | 42.70 |

29 | 93 | 1.05 | 0.85 | 5.15 | 41.83 |

27 | 40 | 1.78 | 0.822 | 5.65 | 42.06 |

31 | 9.5 | 58.5 | 0.83 | 5.05 | 41.78 |

41 | 29 | 8.48 | 0.84 | 5.40 | 41.94 |

45 | 29 | 0.21 | 0.85 | 5.93 | 42.19 |

9 | 87 | 86 | 0.83 | 6.00 | 42.22 |

13 | 76 | 1 | 0.86 | 5.40 | 41.94 |

11 | 75 | 1.89 | 0.85 | 8.05 | 43.17 |

15 | 77 | 1.18 | 0.83 | 5.39 | 41.94 |

43 | 31 | 2.44 | 0.85 | 4.67 | 41.61 |

47 | 57 | 2.94 | 0.79 | 7.40 | 42.87 |

26 | 88 | 6 | 0.83 | 9.83 | 43.99 |

30 | 55 | 3.52 | 0.80 | 6.07 | 42.26 |

28 | 50 | 3.81 | 0.79 | 9.24 | 43.72 |

32 | 23 | 1.66 | 0.79 | 6.38 | 42.40 |

42 | 59 | 1.09 | 0.81 | 6.16 | 42.30 |

46 | 91 | 2.45 | 0.83 | 7.97 | 43.13 |

10 | 83 | 6.29 | 0.82 | 5.67 | 42.07 |

14 | 90 | 1.42 | 0.80 | 5.65 | 42.06 |

12 | 90 | 1.01 | 0.82 | 7.81 | 43.06 |

16 | 71 | 10.14 | 0.85 | 10.15 | 44.14 |

44 | 85 | 0.67 | 0.84 | 6.15 | 42.29 |

48 | 82 | 1.01 | 0.81 | 6.17 | 42.30 |

49 | 93 | 1.47 | 0.80 | 8.96 | 43.59 |

53 | 89 | 1.62 | 0.82 | 8.20 | 43.24 |

17 | 92 | 1.06 | 0.81 | 6.47 | 42.44 |

21 | 95 | 0.69 | 0.82 | 9.40 | 43.79 |

19 | 91 | 1.53 | 0.83 | 9.43 | 43.81 |

23 | 86 | 1.61 | 0.81 | 7.24 | 42.80 |

51 | 94 | 0.22 | 0.84 | 6.13 | 42.28 |

55 | 89 | 0.42 | 0.83 | 11.99 | 44.99 |

50 | 63 | 0.34 | 0.82 | 0 | 39.45 |

54 | 87 | 0.36 | 0.81 | 4.48 | 41.52 |

18 | 45.5 | 53 | 0.82 | 5.97 | 42.21 |

22 | 23 | 1.09 | 0.82 | 5.32 | 41.91 |

20 | 24.6 | 0.64 | 0.80 | 6.07 | 42.25 |

24 | 22 | 18.03 | 0.81 | 4.67 | 41.61 |

52 | 66 | 0.31 | 0.81 | 4.08 | 41.33 |

56 | 90 | 1.01 | 0.84 | 5.77 | 42.12 |

33 | 93 | 1.18 | 0.82 | 5.65 | 42.06 |

37 | 83 | 1.34 | 0.84 | 8.22 | 43.25 |

35 | 100 | 0.56 | 0.81 | 6.10 | 42.27 |

39 | 93 | 0.72 | 0.73 | 6.36 | 42.39 |

1 | 98 | 0.48 | 0.84 | 3.78 | 41.20 |

5 | 75 | 1.85 | 0.79 | 11.98 | 44.99 |

3 | 86 | 2 | 0.81 | 4.82 | 41.68 |

7 | 86 | 1.59 | 0.77 | 7.15 | 42.75 |

2 | 83 | 2.71 | 0.79 | 12.14 | 45.06 |

6 | 82 | 0.9 | 0.82 | 8.16 | 43.22 |

4 | 88 | 0.63 | 0.83 | 6.03 | 42.23 |

8 | 95 | 0.94 | 0.81 | 6.35 | 42.38 |

34 | 78 | 0.74 | 0.81 | 5.83 | 42.14 |

38 | 77 | 7.42 | 0.82 | 8.59 | 43.42 |

36 | 93 | 0.78 | 0.83 | 5.54 | 42.01 |

40 | 85 | 1.96 | 0.82 | 7.81 | 43.06 |

Variable | Degrees of freedom | Sum of Square | Mean Square | F Value | p-Value | Significance Code |
---|---|---|---|---|---|---|

M | 1 | 1211.3 | 1211.3 | 6.0928 | 0.017267 | * |

M^{2} | 1 | 2992.5 | 2992.5 | 15.0525 | 0.000325 | *** |

M × C | 1 | 10,324.9 | 10,324.9 | 51.9357 | 3.98 × 10^{-9} | *** |

C^{2} | 1 | 4004.9 | 4004.9 | 20.1451 | 4.63 × 10^{-5} | *** |

T | 1 | 67 | 67 | 0.337 | 0.564327 | |

T^{2} | 1 | 2819 | 2819 | 14.1802 | 0.000462 | *** |

H | 1 | 0 | 0 | 0.0002 | 0.988511 | |

C × H | 1 | 498.1 | 498.1 | 2.5057 | 0.120145 | |

H^{2} | 1 | 1610.2 | 1610.2 | 8.0996 | 0.006541 | * |

Residuals | 47 | 9343.7 | 198.8 | |||

R^{2} | 0.846 | - | - | - | - |

Significance codes: 0 “***” 0.001 “**” 0.01 “*” 0.05 “.” 0.1 “ ” 1.

Variable | Degrees of freedom | Sum of Square | Mean Square | F Value | p-Value | Significance Codes |
---|---|---|---|---|---|---|

M | 1 | 672.6 | 672.57 | 6.8629 | 1.24 × 10^{-2} | * |

M^{2} | 1 | 379.6 | 379.58 | 3.8733 | 5.60 × 10^{-2} | . |

M·C | 1 | 481.1 | 481.06 | 4.9088 | 3.25 × 10^{-2} | * |

C^{2} | 1 | 601.6 | 601.62 | 6.1389 | 1.75 × 10^{-2} | * |

t | 1 | 0 | 0 | 0 | 9.98 × 10^{-1} | |

t^{2} | 1 | 366.4 | 366.44 | 3.7392 | 6.02 × 10^{-2} | . |

M·S | 1 | 44.1 | 44.08 | 0.4497 | 5.06 × 10^{-1} | |

C·S | 1 | 1011.1 | 1011.13 | 10.3175 | 2.60 × 10^{-3} | ** |

T | 1 | 108.6 | 108.56 | 1.1077 | 2.99 × 10^{-1} | |

C·T | 1 | 266.4 | 266.4 | 2.7183 | 1.07 × 10^{-1} | |

H | 1 | 954.2 | 954.19 | 9.7365 | 3.35 × 10^{-1} | ** |

M·H | 1 | 486.7 | 486.72 | 4.9665 | 3.15 × 10^{-2} | * |

I | 1 | 1011.8 | 1011.83 | 10.3246 | 2.60 × 10^{-3} | ** |

M·I | 1 | 691.1 | 691.14 | 7.0524 | 1.13 × 10^{-2} | * |

T·I | 1 | 1207.6 | 1207.62 | 12.3225 | 1.12 × 10^{-3} | ** |

H·I | 1 | 425.6 | 425.63 | 4.3431 | 4.36 × 10^{-2} | * |

I^{2} | 1 | 672.6 | 672.57 | 6.8629 | 1.24 × 10^{-2} | * |

Residuals | 1 | 379.6 | 379.58 | 3.8733 | 5.60 × 10^{-2} | . |

R^{2} | 0.8304 | - | - | - | - | - |

Significance codes: 0 “***” 0.001 “**” 0.01 “*” 0.05 “.” 0.1 “ ” 1.

Variable | Degrees of freedom | Sum of Square | Mean Square | F Value | p-Value | Significance Codes |
---|---|---|---|---|---|---|

M | 1 | 0.002408 | 0.002408 | 11.0961 | 1.87 × 10^{-3} | ** |

M^{2} | 1 | 0.002043 | 0.002043 | 9.4134 | 3.86 × 10^{-3} | ** |

t | 1 | 0.000626 | 0.000625 | 2.8818 | 9.74 × 10^{-2} | . |

M·t | 1 | 0.000535 | 0.000535 | 2.4668 | 1.24 × 10^{-1} | |

M·S | 1 | 0.000229 | 0.000229 | 1.0563 | 3.10 × 10^{-1} | |

t·S | 1 | 0.002631 | 0.002631 | 12.1215 | 1.22 × 10^{-3} | ** |

S^{2} | 1 | 0.001614 | 0.001614 | 7.4355 | 9.45 × 10^{-3} | ** |

M·T | 1 | 0.000399 | 0.000399 | 1.8386 | 1.83 × 10^{-1} | |

C·T | 1 | 0.000831 | 0.000831 | 3.8272 | 5.74 × 10^{-2} | . |

t·T | 1 | 0.002083 | 0.002083 | 9.5978 | 3.56 × 10^{-3} | ** |

S·T | 1 | 0.001085 | 0.001085 | 4.9986 | 3.10 × 10^{-2} | * |

H | 1 | 1.6E-06 | 1.62E-06 | 0.0075 | 9.32 × 10^{-1} | |

M·H | 1 | 0.000379 | 0.000379 | 1.7466 | 1.94 × 10^{-1} | |

S·H | 1 | 0.001178 | 0.001178 | 5.4282 | 2.49 × 10^{-2} | * |

t·I | 1 | 1.63E-05 | 1.63E-05 | 0.075 | 7.86 × 10^{-1} | |

S·I | 1 | 0.002431 | 0.002431 | 11.203 | 1.79 × 10^{-3} | ** |

Residuals | 40 | 0.008681 | 0.000217 | |||

R^{2} | 0.8249 | - | - | - | - | - |

Significance codes: 0 “***” 0.001 “**” 0.01 “*” 0.05 “.” 0.1 “ ” 1.

Variable | Degrees of freedom | Sum of Square | Mean Square | F Value | p-Value | Significance Codes |
---|---|---|---|---|---|---|

M·t | 1 | 2.524 | 2.524 | 1.3462 | 2.52 × 10^{-1} | |

S^{2} | 1 | 1.383 | 1.383 | 0.7375 | 3.95 × 10^{-1} | |

T^{2} | 1 | 1.613 | 1.613 | 0.8601 | 3.59 × 10^{-1} | |

M·H | 1 | 21.914 | 21.914 | 11.6874 | 1.33 × 10^{-3} | ** |

C·H | 1 | 37.86 | 37.86 | 20.1916 | 4.70 × 10^{-5} | *** |

T·H | 1 | 5.704 | 5.704 | 3.0419 | 8.78 × 10^{-2} | . |

S·H | 1 | 32.831 | 32.831 | 17.5093 | 1.27 × 10^{-4} | *** |

H^{2} | 1 | 3.889 | 3.889 | 2.074 | 1.57 × 10^{-1} | |

M·I | 1 | 2.316 | 2.316 | 1.2353 | 2.72 × 10^{-1} | |

T·I | 1 | 10.54 | 10.54 | 5.6212 | 2.20 × 10^{-2} | * |

Residuals | 46 | 86.252 | 1.875 | |||

R^{2} | 0.7635 | - | - | - | - | - |

Significance codes: 0 “***” 0.001 “**” 0.01 “*” 0.05 “.” 0.1 “ ” 1.

Variable | Degrees of freedom | Sum of Square | Mean Square | F Value | p-Value | Significance Codes |
---|---|---|---|---|---|---|

M | 1 | 1.3244 | 1.3244 | 10.9006 | 2.00 × 10^{-3} | ** |

C | 1 | 1.912 | 1.91204 | 15.7373 | 2.86 × 10^{-4} | *** |

C^{2} | 1 | 0.0526 | 0.05259 | 0.4329 | 5.14 × 10^{-1} | |

M·t | 1 | 0.002 | 0.00199 | 0.0164 | 8.99 × 10^{-1} | |

S^{2} | 1 | 0.1591 | 0.15914 | 1.3098 | 2.59 × 10^{-1} | |

M·T | 1 | 0.1132 | 0.11318 | 0.9315 | 3.40 × 10^{-1} | |

S·T | 1 | 0.1062 | 0.10621 | 0.8741 | 3.55 × 10^{-1} | |

T^{2} | 1 | 0.6665 | 0.66652 | 5.4859 | 2.41 × 10^{-2} | * |

H | 1 | 0.517 | 0.51699 | 4.2551 | 4.55 × 10^{-2} | * |

C·H | 1 | 0.5179 | 0.51788 | 4.2625 | 4.53 × 10^{-2} | * |

t·H | 1 | 0.4687 | 0.46874 | 3.858 | 5.63 × 10^{-2} | . |

S·H | 1 | 1.6756 | 1.67561 | 13.7913 | 6.09 × 10^{-4} | *** |

H^{2} | 1 | 0.5589 | 0.55887 | 4.5999 | 3.79 × 10^{-2} | * |

M·I | 1 | 0.0383 | 0.03825 | 0.3148 | 5.78 × 10^{-1} | |

T·I | 1 | 0.6052 | 0.60519 | 4.9811 | 3.12 × 10^{-2} | * |

Residuals | 41 | 4.9814 | 0.1215 | |||

R^{2} | 0.7977 | - | - | - | - | - |

Significance codes: 0 “***” 0.001 “**” 0.01 “*” 0.05 “.” 0.1 “ ” 1.

**Table 9.**Results of the predicted error process criteria for yield (η), turbidity (Turb), density (ρ), viscosity (µ), and high heating value (HHV) using the quadratic models.

Errors | η | Turb (NTU) | ρ (g/mL) | µ (mm^{2}/s) | HHV (MJ/Kg) |
---|---|---|---|---|---|

MAE | 10.445 | 6.305 | 0.009 | 0.980 | 0.231 |

RMSE | 12.803 | 8.293 | 0.012 | 1.230 | 0.296 |

Sample | Inputs | ||||||
---|---|---|---|---|---|---|---|

Molar Ratio | Catalyst (wt. %) | Time (min) | Speed (rpm) | T (°C) | Humidity (wt. %) | Impurity (wt. %) | |

1 | 6.35 | 1.16 | 21.79 | 531.17 | 38.04 | 1.37 | 2.66 |

2 | 8.77 | 1.49 | 39.99 | 804.66 | 26.08 | 2.07 | 1.84 |

3 | 6.98 | 1.7 | 22.05 | 587.12 | 27.44 | 2.98 | 1.8 |

4 | 7.48 | 1.57 | 21.41 | 881.61 | 37.85 | 2.86 | 0.6 |

5 | 6.3 | 1.57 | 23.74 | 531.29 | 36.59 | 1.77 | 0.9 |

6 | 6.2 | 1.56 | 25.97 | 808.46 | 20.3 | 0.58 | 1.39 |

7 | 6.64 | 1.27 | 32.54 | 747.92 | 38.14 | 1.58 | 1.54 |

8 | 7.95 | 1.91 | 25.67 | 772.08 | 29.35 | 1.51 | 0.12 |

9 | 7.36 | 1.03 | 37.08 | 526.82 | 39.83 | 2.39 | 2.32 |

10 | 7.31 | 1.71 | 32.93 | 528.27 | 34.67 | 1.02 | 1.98 |

11 | 6.75 | 1.2 | 29.07 | 711.16 | 34.27 | 2.57 | 2.17 |

12 | 8.76 | 1.35 | 25.69 | 929.16 | 26.92 | 0.33 | 1.34 |

13 | 7.9 | 1.69 | 24.33 | 855.05 | 34.23 | 0.3 | 0.94 |

14 | 8.49 | 1.86 | 28.35 | 830.26 | 31.21 | 2.17 | 0.11 |

15 | 7.31 | 1.71 | 32.93 | 528.27 | 34.67 | 1.02 | 1.98 |

**Table 11.**Results of the errors in yield (η), turbidity (Turb), density (ρ), viscosity (µ), and HHV using the quadratic models.

Errors | η | Turb (NTU) | ρ (g/mL) | µ (mm^{2}/s) | HHV (MJ/Kg) |
---|---|---|---|---|---|

MAE | 15.081 | 9.130 | 0.063 | 1.941 | 0.449 |

RMSE | 22.853 | 14.648 | 0.066 | 2.202 | 0.556 |

**Table 12.**The first biodiesel optimization scenario: all variables considered to be equally important.

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.24 | 0.921 |

C | Minimize → 1 | 1.0 | 0.75 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 499.99 | 1.000 |

T | In range → 30 | 1.0 | 20.40 | 1.000 |

H | In range → 1.5 | 1.0 | 0.20 | 1.000 |

I | In range → 1.5 | 1.0 | 0.15 | 1.000 |

η | Maximize → 9.50 | 1.0 | 99.99 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.232 |

µ | Minimize → 3.79 | 1.0 | 8.00 | 0.496 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.431 |

Overall Desirability | 0.710 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.52 | 0.827 |

C | Minimize → 1 | 1.0 | 0.78 | 1.000 |

t | Minimize → 20 | 1.0 | 19.99 | 1.000 |

S | Minimize → 500 | 1.0 | 499.67 | 1.000 |

T | In range → 30 | 1.0 | 24.44 | 1.000 |

H | In range → 1.5 | 1.0 | 0.21 | 1.000 |

I | In range → 1.5 | 1.0 | 0.17 | 1.000 |

η | Maximize → 9.50 | 3.0 | 100.00 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.247 |

µ | Minimize → 3.79 | 1.0 | 7.78 | 0.523 |

HHV | Maximize → 20.52 | 1.0 | 21.53 | 0.422 |

Overall Desirability | 0.709 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.24 | 0.921 |

C | Minimize → 1 | 1.0 | 0.75 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 499.99 | 1.000 |

T | In range → 30 | 1.0 | 20.40 | 1.000 |

H | In range → 1.5 | 1.0 | 0.20 | 1.000 |

I | In range → 1.5 | 1.0 | 0.15 | 1.000 |

η | Maximize → 9.50 | 1.0 | 99.99 | 1.000 |

Turb | Minimize → 0.21 | 3.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.232 |

µ | Minimize → 3.79 | 1.0 | 8.00 | 0.496 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.431 |

Overall Desirability | 0.710 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 7.35 | 0.551 |

C | Minimize → 1 | 1.0 | 1.00 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 500.01 | 1.000 |

T | In range → 30 | 1.0 | 26.79 | 1.000 |

H | In range → 1.5 | 1.0 | 0.00 | 1.000 |

I | In range → 1.5 | 1.0 | 0.10 | 1.000 |

η | Maximize → 9.50 | 1.0 | 94.35 | 0.938 |

Turb | Minimize → 0.21 | 1.0 | 3.23 | 0.965 |

ρ | Minimize → 0.74 | 3.0 | 0.82 | 0.025 |

µ | Minimize → 3.79 | 3.0 | 7.04 | 0.228 |

HHV | Maximize → 20.52 | 1.0 | 21.43 | 0.378 |

Overall Desirability | 0.467 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.40 | 0.868 |

C | Minimize → 1 | 1.0 | 1.00 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 499.60 | 1.000 |

T | In range → 30 | 1.0 | 33.70 | 1.000 |

H | In range → 1.5 | 1.0 | 0.21 | 1.000 |

I | In range → 1.5 | 1.0 | 0.16 | 1.000 |

η | Maximize → 9.50 | 1.0 | 136.97 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.241 |

µ | Minimize → 3.79 | 1.0 | 9.86 | 0.274 |

HHV | Maximize → 20.52 | 3.0 | 22.04 | 0.256 |

Overall Desirability | 0.626 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.09 | 0.972 |

C | Minimize → 1 | 3.0 | 0.73 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 499.96 | 1.000 |

T | In range → 30 | 1.0 | 29.78 | 1.000 |

H | In range → 1.5 | 1.0 | 0.20 | 1.000 |

I | In range → 1.5 | 1.0 | 0.17 | 1.000 |

η | Maximize → 9.50 | 1.0 | 100.00 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.224 |

µ | Minimize → 3.79 | 1.0 | 8.03 | 0.493 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.430 |

Overall Desirability | 0.710 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.24 | 0.921 |

C | Minimize → 1 | 1.0 | 0.75 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 3.0 | 499.99 | 1.000 |

T | In range → 30 | 1.0 | 20.40 | 1.000 |

H | In range → 1.5 | 1.0 | 0.21 | 1.000 |

I | In range → 1.5 | 1.0 | 0.15 | 1.000 |

η | Maximize → 9.50 | 1.0 | 99.99 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.232 |

µ | Minimize → 3.79 | 1.0 | 8.00 | 0.496 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.431 |

Overall Desirability | 0.710 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 1.0 | 6.09 | 0.972 |

C | Minimize → 1 | 1.0 | 0.73 | 1.000 |

t | Minimize → 20 | 3.0 | 19.98 | 1.000 |

S | Minimize → 500 | 1.0 | 499.96 | 1.000 |

T | In range → 30 | 1.0 | 29.78 | 1.000 |

H | In range → 1.5 | 1.0 | 0.20 | 1.000 |

I | In range → 1.5 | 1.0 | 0.16 | 1.000 |

η | Maximize → 9.50 | 1.0 | 100.00 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.224 |

µ | Minimize → 3.79 | 1.0 | 8.03 | 0.493 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.430 |

Overall Desirability | 0.710 |

Goal | Importance | Value | Desirability | |
---|---|---|---|---|

M | Minimize → 6 | 3.0 | 6.00 | 1.000 |

C | Minimize → 1 | 1.0 | 0.72 | 1.000 |

t | Minimize → 20 | 1.0 | 20.00 | 1.000 |

S | Minimize → 500 | 1.0 | 499.96 | 1.000 |

T | In range → 30 | 1.0 | 29.78 | 1.000 |

H | In range → 1.5 | 1.0 | 0.19 | 1.000 |

I | In range → 1.5 | 1.0 | 0.17 | 1.000 |

η | Maximize → 9.50 | 1.0 | 100.00 | 1.000 |

Turb | Minimize → 0.21 | 1.0 | 0.00 | 1.000 |

ρ | Minimize → 0.74 | 1.0 | 0.83 | 0.219 |

µ | Minimize → 3.79 | 1.0 | 8.07 | 0.488 |

HHV | Maximize → 20.52 | 1.0 | 21.55 | 0.431 |

Overall Desirability | 0.710 |

**Table 21.**Experimental outputs that were obtained according to the nine biodiesel optimization scenarios.

Optimization Scenarios | Experimental Values Obtained | ||||||
---|---|---|---|---|---|---|---|

η | Turb (NTU) | ρ (g/mL) | µ (mm^{2}/s) | HHV (MJ/Kg) | MAE | RMSE | |

1st Scenario | 0.98 | 0.03 | 0.89 | 0.34 | 0.20 | 0.05 | 0.03 |

2nd Scenario | 0.99 | 0.02 | 0.63 | 0.27 | 0.16 | 0.09 | 0.05 |

3rd Scenario | 0.98 | 0.01 | 0.89 | 0.34 | 0.21 | 0.04 | 0.02 |

4th Scenario | 0.00 | 0.92 | 0.00 | 0.00 | 0.00 | 0.12 | 0.08 |

5th Scenario | 0.98 | 0.02 | 0.77 | 1.00 | 0.99 | 0.06 | 0.03 |

6th Scenario | 0.98 | 0.02 | 0.98 | 0.35 | 0.20 | 0.07 | 0.04 |

7th Scenario | 0.97 | 0.01 | 0.89 | 0.34 | 0.20 | 0.04 | 0.03 |

8th Scenario | 0.98 | 0.03 | 0.94 | 0.35 | 0.20 | 0.10 | 0.07 |

9th Scenario | 0.98 | 0.02 | 0.99 | 0.37 | 0.20 | 0.05 | 0.03 |

MAE | 0.02 | 0.03 | 0.02 | 0.00 | 0.01 | 0.07 | 0.04 |

RMSE | 0.06 | 0.09 | 0.08 | 0.01 | 0.02 | 0.25 | 0.14 |

© 2017 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).