1 Introduction

The economic growth status of any nation can be measured based on pattern and utilization quality of its energy. Energy is one of the most important social amenities, which plays a crucial role in nation’s socio-economic building by improving the standard of living and life quality. In fact economy is linearly related to the energy because economy expands as energy demand increases. Thus it brings along a restyle in the energy consumption pattern, which in turn varies with the source and accessibility of its energy, conversion loss and end use efficiency. Several sources of energy such as wood, coal, oil, petroleum and nuclear material, have been explored. However, overdependence on these conventional sources of energy has led to consequential ecological and environmental problems [1]. In general, fossil energy source is associated with depletion and emission of large volume of greenhouse gases, which are regarded as the main contributor to global warming. Global warming has been identified as one of the causes of climate change. The utilization of biomass derived energy such as biodiesel, bio-ethanol, bio-hydrogen, and biogas has the potential to alleviate some of these menaces [2]. According to Refaat [3], biodiesel has been identified as a green fuel due to its environmentally beneficial attributes and its renewable nature compared to fossil diesel.

Biodiesel, as an unsullied burning renewable fuel, is often produced via transesterification process. In this process, plant oil or animal fat is allowed to react with alcohol (methanol, ethanol, or buthanol) in the presence of catalyst. During the reaction process, triglycerides contain in the oil or fat are converted into fatty acid alkyl esters, which is the common name of biodiesel. If methanol is used as a co-reactant, fatty acid methyl esters (FAME) will be produced, while fatty acid ethyl esters (FAEE) are produced, when ethanol is used. Glycerol is also formed as an undesired product during the reaction, which can easily be separated from the product mixtures by using centrifuge. Thus, biodiesel feedstock plays a major role in its production.

The utilization of edible vegetable oils from palm kernel, soybean, groundnut, coconut etc. and animal fats for biodiesel production has recently been of great concern because many people believe it could lead to food crisis [4]. Due to this constructive criticism, the recent research and development in the production of biodiesel is focused on its synthesis from second generation (non-edible) feedstock such as Jatropha curcas seed oil, Chinese tallow seed oil, sunflower seed oil, tobacco seed oil, and others. Due to the availability in abundance and low cost of these non-edible seed oils, it is thus possible to synthesize biodiesel from them in a sustainable manner. A recent problem in the environment is the generation of large quantity of white lead (Leucaena leucocephala) seed. These seeds and its shells litter the whole environment, thus resulting in recalcitrant pollution and attraction of rodents [5]. Meanwhile, oil can be derived from the Leucaena leucocephala seed and employed as a feedstock for biodiesel production. The Leucaena leucocephala is a small fast-growing leguminous tree which belongs to a family of Fabaceae and it is commonly known as white lead tree [6]. It is non-edible crop and abundantly available in Nigeria. The plant is made of flowers, narrowly oblong leaves, stem, and shells. Contained in the shells are bead necklace-like row of seeds. The seeds are flat, oval, a rich glossy brown colour. Since this crop grows annually and is available in abundance, oil can therefore continuously be extracted from its seeds and subsequently used as a feedstock for biodiesel production.

In general, the extraction of oil from seeds is being undertaken by mechanical, aqueous enzymatic, supercritical fluid, microwave-assisted and solvent methods [7,8,9]. Solvent extraction technique has been considered as one of the most promising methods for oil recovery from the seeds. However, so many works showed that traditional optimization technique, also known as one factor at a time (OFAAT), was employed to evaluate the influence of extraction parameters on oil yield. In the OFAAT method, experiments are carried out by varying a factor and keeping all other variables constant. This should be repeated for all the factors considered, thus resulting in an unnecessary number of experiments. In order to optimize the effective process variables with the minimum number of experiments, the application of experimental design techniques can be useful. One of the most common first order experimental design techniques used for process analysis and modeling is 2k factorial design. In this technique, the influence of individual variable and its interaction with other variables could be evaluated [4].

The 2k factorial is a first order experimental design technique useful for developing and optimizing physical and chemical processes [10]. The statistical experimental design approach to optimization of the extraction process can lead to reduction in number of experiments required coupled with the requirement of less resources (time and feedstock) [11]. Using 2k factorial, it is possible to measure each control variable at two levels, which can be coded as − 1 (low level) and + 1 (high level). This design technique is made up of all possible combination of such levels of the k factors [10]. Therefore, each row of the design matrix consists of all coded values (− 1s and 1s) or a combination of the two values and represents a particular process condition [10]. However, the number of experimental runs required is equivalent to 2k provided that no single design point repeats itself. Therefore, in this work, the 2k factorial design has been applied to the optimization of extraction of oil from Leucaena leucocephala seed (LLS) using n-hexane as solvent. The variables considered were the particle size, temperature, time and solvent/solid mass ratio. Also, the extracted oil was characterized based on physicochemical properties, functional groups and gas chromatography-mass spectroscopy analyses.

2 Materials and method

2.1 Materials

The LLS shells were plucked from its tree situated behind Owolabi hall, Afe Babalola University, Ado-Ekiti, Nigeria. All the chemical compounds used in this study, including n-hexane, potassium hydroxide (KOH), ethanol (95%), hydrochloric acid (HCl), diethyl ether, chloroform and phenolphthalein were of analytical grade bought from Sigma-Aldrich and used as received.

2.2 Seed processing

The LLS shells were carefully opened and the seeds were handpicked from them. The collected seeds were thereafter examined for freshness, washed with clean water and sun dried for 12 h. Approximately two hundred grams (200 g) of the seed was taken from the dried seeds and was dried to constant mass in an oven at 110 °C in order to determine the initial moisture content. The percentage moisture content of the seeds was determined by using Eq. (1).

$$\% {\text{moisture}}\, = \, \frac{{w_{1} - w_{2} }}{{w_{1} }} \times 100\%$$
(1)

where w1 and w2 are the weights of seeds before and after drying to constant mass, respectively.

Thereafter, the dried L. leucocephala seeds were crushed with the aid of mortar and pestle and the sample was divided into two portions. The first and second portions were allowed to pass through sieve meshes of ≤ 0.6 mm and ≤ 1.2 mm, respectively according to experimental design (Table 1).

Table 1 Studied range of each variable in actual and coded form

2.3 The 2k factorial experimental design

In this study, four process independent variables which include particle size (P), extraction temperature (T), extraction time (t) and solvent/solid ratio (S) are of interest, with oil extraction yield as the response. However, the response was determined via extraction process with the aim to identify the optimum extraction condition that would provide maximum oil recovery from the seed. A total of sixteen (16) experimental runs were conducted according to a 2k factorial design with the four process variables (24 = 16 points). Table 1 presents the experimental design matrix for a 24 factorial design.

2.4 Extraction experiment

The apparatus employed in the present study was soxhlet extractor. The extractor is made up of boiling flask, condenser, thimble and extraction chamber. 40 g of LLS powder wrapped in a white muslin cloth was placed in a thimble of the extractor. A 500 mL boiling flask containing required amount of n-hexane was gently attached to the end of the extractor and the whole set up was placed on a heating mantle in order to heat up the extractor contents. The extraction process was conducted according to the experimental conditions (Table 2). Each operation was carried out in two replicates and the mixture of extracted oil and solvent was heated at 70 °C in order to recover the extracted oil. The yield of the extracted Leucaena leucocephala seeds oil (LLSO) was gravimetrically calculated by Eq. (2).

Table 2 Factorial design fοr extraction process variables
$$LLSO \,yield\, \left( {{\text{wt}}\% } \right) = \frac{{weight\,of\,extracted\,oil\, \left( {\text{g}} \right)}}{{weight\,of\,LLS\,kernel\,used\, \left( {\text{g}} \right)}} \times 100\%$$
(2)

2.5 Characterization of the extracted LLSO

The physicochemical properties such as specific gravity, kinematic viscosity, pH, acid value, saponification value, cetane number, free fatty acid, pour point, flash point cloud point, solubility, iodine value, and average molecular weight were determined according to American Society for Testing and Method (ASTM) standard procedures. The quality of the extracted oil was further ascertained by Fourier transform infrared (FTIR) spectrophotometer (IR Affinity 1S, Shimadzu, Japan) in which the functional groups present in it were determined. Moreover, gas chromatography-mass spectrometry (Hewlett Packard 6890S, Palo Alto, USA) analysis was conducted in order to determine fatty acid composition of the LLSO.

3 Results and discussion

3.1 Statistical analysis of experimental data

The extraction of oil from LLS was carried out according to the experimental conditions shown in Table 2. It was observed that sixteen extraction experiments were conducted with two levels of particle size, extraction temperature, extraction time and solvent/solid ratio according to the experimental design suggested by Design Expert software version 7.0.0. Run 5 which was conducted at 50 °C extraction temperature, 2 h extraction time, solvent/solid ratio of 10:1 and LLS particle size of ≤ 0.6 mm provided maximum oil yield to be 53.95%, this value of LLSO yield is quite similar to the oil yield (53.0%) obtained at run 4, which was conducted under the same conditions of extraction time and others except the extraction temperature. The lowest oil yield of 38.06% was provided by run 6 at low levels of temperature (50 °C), time (1 h) and solvent/solid ratio (7.5) except particle size that was fixed at maximum level (≤ 1.2 mm). The regression model equation which correlates the dependent and independent variables in terms of coded factor is given in Eq. 3.

$$Y = 45.06 - 2.06P + 0.44T + 4.81t + 0.19S - 0.69PT + 0.19Pt - 0.44PS - 1.56Tt + 0.31TS + 0.69tS$$
(3)

where P, T, t and S are the particle size, extraction temperature, extraction time and solvent/solid ratio, respectively. These are the main effects. While PT, Pt, PS, Tt, TS and tS represent interaction effects.

Generally, there were good agreements between the experimental and predicted values of the extracted LLSO yield. The correlation coefficient (R2) extensively evaluates the correlation between the experimental data and the predicted yields of the LLSO. The experimental results and the predicted values obtained from the model (Eq. 3) as shown in Table 2 were compared. It was found that the predicted values matched the experimental values reasonably well with R2 = 0.9974. This indicates that 99.74% of the variations for LLSO yield are described by the independent parameters and this also implies that the model does not account for only about 0.26% of variation. In addition, Adjusted R2 (Adj-R2) was measured to further ascertain the model fitness. Since the Adj-R2 value (0.9922) was very close to the corresponding R2 value, the adequacy of the model fits was confirmed.

3.2 Analysis of variance (ANOVA) for LLSO yield

The significance and adequacy of the model were evaluated by the analysis of variance (ANOVA). Table 3 presents the results of the quadratic response surface model fitting in the form of ANOVA. ANOVA measures the significance and adequacy of the model [11]. The F-value which compares variation from the model with the variation associated with experimental error was found to be clearly larger, thus confirming the adequacy of the model fits. The probability distribution and the corresponding values, along with the extraction variable estimate, are also given in Table 3. The P-values (Prob > F) were used as a tool to check the significance of each of the coefficients, which in turn, are needed to understand the pattern of the mutual interactions between the test parameters. According to Zarei et al. [12], if the P-value of an estimated variable is less than 0.0500, it indicates that the variable is significant. However, P, T, t, PT, PS, Tt, and tS are the significant model terms as their P-values are less than 0.05.

Table 3 ANOVA analysis for 2k factorial design

3.3 Analysis of main effects

The contribution of each of the estimated factors was evaluated by Pareto graphic analysis and is presented in Fig. 1. As it can be seen in this figure among the variables, extraction time (73.87%) contributes the most to the extraction of oil from LLS. In this study, extraction time 1 and 2 h were used. The high level of time was found to have a significant effect on LLSO yield as affirmed in some of the runs such as run 4, 5, 8, 11, 13 and 15 (Table 2). These experimental runs were conducted under different conditions except the extraction time (2 h) that was the same. This indicates that time must have played an important role in the yield of extracted oil from LLS since a run 9 that was carried out for 1 h with other parameters being the same as those of aforementioned runs, resulted in a low LLSO yield (45.13%).

Fig. 1
figure 1

Pareto graphic analysis

Particle size is the second parameter that contributes positively to the yield of LLSO with percentage contribution of 13.57% as shown in Fig. 1. Two values of particle size (≤ 0.6 mm and ≤ 1.2 mm) were considered and low level particle size was found to have a significant effect on LLSO yield as confirmed in most of the runs like 4, 5, 8, and 11. Besides, maximum LLSO yield was recorded when particle size of ≤ 0.6 mm was considered with other variables fixed at maximum level. This observation is attributed to the fact that smaller particle size enhances the interfacial area between the LLS powder (solid) and n-hexane (solvent), and therefore the rate of material transfer becomes higher and the distance the oil diffuses within the LLS powder becomes smaller. This observation is similar to the reported work of Miranda et al. [13], where the lesser particle size provided a maximum oil yield.

The third most significant factor is the extraction temperature, which contributes 0.61% to the LLSO yield as also shown in Fig. 1. This result indicates that the parameter had no significant effect on the oil extraction yield and this might be attributed to the insolubility of the oil at the temperatures considered and as a result, extraction rate was reduced. However, the maximum yield of LLSO obtained at low level of temperature (50 °C) was an indication that diffusion coefficient was improved and the rate of extraction was also favoured.

Solvent/solid ratio contributes the least to the LLSO extraction yield as low as 0.11% according to the Pareto graphic analysis displayed in Fig. 1. In the present study, the solvent/solid ratio was fixed at 7.5:1 v/w and 10:1 v/w. At high level of ratio (10:1 v/w), the maximum extraction yield of LLSO was achieved. This is because at maximum solvent concentration the mass transfer coefficient increases, thus enhancing extraction rate [14]. Meanwhile, at low level of n-hexane/LLS powder ratio (7.5:1 v/w), least oil extraction yield was obtained because the solvent could not circulate freely as it formed a viscous solution with the solid material, which resulted in progressive decrease in the rate of extraction. This observation reported in this current study is comparable to results reported on extraction studies by the previous researchers [15,16,17].

3.4 Analysis of interaction effect

According to the ANOVA analysis (Table 3), six interaction effect terms were identified and only four of these terms were significant. They are PT, PS, Tt, and tS. Figure 2 shows the plot of combined effect of particle size (P) and extraction temperature (T) on the LLSO extraction yield (Y) while holding extraction time (t) and solvent/solid ratio (S) constant at 1 h and 7.5:1 v/w, respectively. It was revealed that maximum oil extraction yield could be obtained from the process at 70 °C using LLS powder with particle size of ≤ 0.6 mm compared to LLS powder having particle size of ≤ 1.2 mm. Similarly, when the extraction was conducted at 50 °C, the oil yield was high at low level of particle size compared to that of high level. High extraction yield at ≤ 0.6 mm particle size indicates that rate of extraction increased as particle size decreased.

Fig. 2
figure 2

Plot of LLS oil yield (Y) versus particle size (P) at extraction temperature of 50 °C and 70 °C, 1 h extraction time and solvent/solid ratio of 7.5:1 v/w

The effect of particle size (P) and solvent/solid ratio (S) on the LLSO yield is shown in Fig. 3. When the extraction was carried out using ratio of 7.5:1 v/w at 50 °C for 1 h, an increase in particle size resulted in decrease in LLSO yield. Similarly, when the extraction process was conducted using n-hexane/LLSO powder ratio of 10:1 v/w at 50 °C for 1 h, an increase in particle size was also found to reduce the LLSO extraction yield. The reduction in oil yield at both high and low levels of ratio indicates that irrespective of concentration of the n-hexane used, the particle size of the LLS powder plays a critical role in the extraction process. A similar observation was reported by Miranda et al. [13] in the optimization of oil extraction from Mexican pumpkin seeds (MPS) where the minimum particle size resulted in maximum MPS oil yield.

Fig. 3
figure 3

Plot of LLS oil yield (Y) versus particle size (P) at solvent/soild ratio of 7.5:1 v/w and 10 v/w, 50 °C extraction temperature and 1 h extraction time

Figure 4 illustrates the interaction effect of temperature and time on oil extraction yield for particle size of ≤ 0.6 mm and solvent/solid ratio of 7.5:1 v/w. As it obvious from Fig. 4, oil yield decreased with increasing extraction temperature when the extraction time was fixed at 2 h. The reason for this observation is thought to be the fact that extraction yield could not be favoured at high levels of both temperature and time because diffusion coefficient becomes reduced and the rate of extraction also decreased. In other words, low level of extraction time (1 h) resulted in increase in oil extraction yield with increasing extraction temperature. This observation confirmed that using a combination of high levels of temperature and time could not favour oil extraction yield. This is probably because high level of temperature or time is sufficient enough to improve the diffusion coefficient which would enhance the extraction rate.

Fig. 4
figure 4

Plot of LLS oil yield (Y) versus extraction temperature (T) at extraction time of 1 h and 2 h, ≤ 0.6 mm particle size and solvent/soild ratio of 7.5:1 v/w

To study the combined effect of extraction time and solvent/solid ratio on oil extraction yield, the experiments were conducted at fixed particle size and extraction temperature of ≤ 0.6 mm and 50 °C, respectively. As it can be seen in Fig. 5, oil yield increased with increasing time when the extraction process was conducted using a solvent/solid ratio of 10:1 v/w. The same trend was also observed when a solvent/solid ratio of 7.5:1 v/w was used during extraction process. However, as seen in Fig. 5, high extraction rate was observed when solvent/solid ratio of 10:1 v/w was used. This is due to the rapid solution of the oil on the surface of LLS (solid) and increase in the driving force for mass transfer resulting from the high n-hexane concentration [13].

Fig. 5
figure 5

Plot of LLS oil yield (Y) versus extraction time (t) at solvent/solid ratio of 7.5:1 v/w and 10:1 v/w, h, ≤ 0.6 mm particle size and solvent/soild ratio of 7.5:1 v/w

3.5 Numerical optimization of extraction process parameters

Having determined the optimum process parameters for the extraction of oil from LLS to be ≤ 0.6 mm particle size, 50 °C extraction temperature, 2 h extraction time and solvent/solid ratio of 10:1 v/w. A further experimental run was conducted at these conditions and the experimental oil extraction yield was 54.08%. However, the predicted oil extraction efficiency was suggested to be 53.19% which is slightly less than the actual value by 1.65%. This result indicates that maximum oil yield could be achieved when the extraction of oil from LLS is carried out under the aforementioned optimized factors combination.

3.6 Characterization of the extracted oil

3.6.1 Physicochemical properties of the extracted LLSO

The quality of the extracted oil from LLS which was evaluated based on its physical and chemical characteristics is presented in Table 4 and the results obtained were compared with values reported in the literatures [18,19,20]. The specific gravity of the oil at 25 °C was determined to be 0.912, which was slightly less than the value reported by Hakimi et al. [20] as 0.920 at 15 °C. This difference is due to the fact that density is a function of temperature [21] and decreases as temperature increases [22]. The high kinematic viscosity indicates that LLSO cannot be used as it is to power diesel or vehicular engine, thus needs to be transesterified in order to reduce the viscosity of the oil.

Table 4 Physicochemical properties of the extracted LLS oil

The high acid value and FFA content suggest that it is non-edible oil and therefore two-step transesterification method is appropriate in converting the oil to biodiesel [23]. The saponification value obtained in this current study falls within the range of values reported (194–203 mg KOH/g). This value as seen in Table 4 is high indicating that the LLSO can be used as raw material for soap production. In addition, high soap content in biodiesel to be produced from the extracted oil will reduce the friction between the rubbing parts of the diesel engine [24]. However, the average molecular weight of oil or fat, usually expressed in g/gmol, is a function of acid and saponification values of oil or fat [25]. Average molecular weight of LLSO in this study, was found to be 906 g/gmol, which was comparable to other extracted oils, 898 g/gmol [26] and 902 g/gmol [18].

The pH value of the extracted oil was found to be 5.68 and this implies that the LLSO is acidic, which is in line with the work reported on oil extraction from seeds by many researchers [5, 26]. The results obtained herein indicate that LLSO could be used as a low-grade feedstock for biodiesel production and other industrial chemicals where non-edible plant oil can serve as starting raw material.

3.6.2 FTIR analysis

The FTIR spectrum of the extracted LLS oil depicted in Fig. 6 displays peaks at 3531 cm−1 (NH stretch), 3452 cm−1 (OH stretch), 3002 cm−1 (=C–H stretch), 2913 cm−1 (CH antisymmetric stretch), 2849 cm−1 (CH symmetric stretch), 1741 cm−1 (C=O stretch of ester), 1460 cm−1 (CH3 antisymmetric deformation), 1376 cm−1 (CH3 symmetric deformation), 1202 cm−1 (C–O–C antisymmetric stretch), 1158 cm−1 (C–N stretch), 720 cm−1 (C–H2 methylene rock), 569 cm−1 (C–C–CN bend), and 422 cm−1 (Cl–C–O in plane deformation).

Fig. 6
figure 6

FTIR spectrum of LLS oil

3.6.3 Fatty acid composition of LLSO

The result of fatty acid compositional analysis on the extracted LLSO is shown in Fig. 7. The fatty acids standards were used to identify the peaks displayed in Fig. 7. Table 5 presents the fatty acid profile of the oil and it was found to contain four fractions, namely oleic acid (77.6%), palmitic acid (9.56%), pentadecanoic acid (7.34%) and behenic acid (5.50%). Pentadecanoic acid, a saturated fatty acid, is usually scarce and rarely fοund in other plant oils and thus indicates a good discovery. Pentadecanoic acid is being found at the level of 1.2% in the milk fat from cows [28]. It also comprises 3.61% of the fats from the fruit of the Durio graveolens [29]. It can be concluded that the extracted LLS oil is rich in oleic acid.

Fig. 7
figure 7

Gas chromatography-mass spectrometry analysis of LLS oil

Table 5 Fatty acid composition of LLSO

4 Conclusions

Based on the optimization studies carried out on oil extraction from LLS, extraction time has the highest percentage contribution of 73.87% while the solvent/solid ratio contributes the least to the oil extraction yield as low as 0.11%. The analysis of variance revealed a high coefficient of determination \(({{\text{R}}^{2} = 0.9974{\text{and}}\,{\text{Adj - R}}^{2} = 0.9922})\) and the interaction effect between extraction temperature and extraction time contributes significantly to the extraction process with percentage contribution of 7.79%, compared to other interaction terms. Under the optimum conditions, maximum oil extraction yield of 54.08% was obtained at particle size of ≤ 0.6 mm, 70 °C extraction temperature, 2 h extraction time and solvent/solid ratio of 10:1 v/w. The physicochemical properties of the extracted Leucaena leucocephala seed oil conformed to most of the values reported in the literature. In addition, the extracted oil possessed several functional groups that are similar to other plant oils and it is rich in oleic acid. Thus, this oil could be used as a biodiesel feedstock or as a raw material for the production of other industrial chemicals.