Introduction

As human populations grow, energy needs increase. The availability and the optimality of energy are among the key issues which directly affect the social and economic status of any country [1]. In fact, more than 80% of energy obtains from three types of fossil fuels including oil, coal, and natural gas, and about 98% is generated through the carbon emission from fossil fuel combustion [2]. Furthermore, the production and the use of fossil fuels in engines with internal combustion cause environmental problems such as increasing the amount of carbon dioxide in the atmosphere and enhancing the average temperature of the earth environment [3]. Furthermore, the severe shortage of fossil fuels has led to the discovery of alternative fuels such as biodiesel [4].

Biodiesel, an alternative diesel fuel, is made from renewable sources such as vegetable oils and animal fats including sesame oil, sunflower oil, olive oil, etc., agricultural wastes, and small algae [5, 6]. Therefore, the cost of raw materials is about 60–75% of the total cost and price of biodiesel production. In addition, the identification of proper material for the production of biodiesel in each region is the most important factor that should be considered according to climate conditions [7]. Biodiesel production from edible oils leads to a shortage of food sources and nonedible oils are highly regarded as the raw material to produce biodiesel [8, 9]. In recent years, the use of low-cost sources of the plant for biodiesel production has been increasing. One of these plants is Moringa oleifera tree [10]. The plant of M. oleifera is an indigenous, available, and inexpensive tree.

Moringa oleifera is one of the species of the Moringaceae family which is found in many tropical and subtropical regions worldwide such as Africa, South Asia, South America, Himalaya region, India, Pakistan, the Pacific, and Caribbean Islands [10], and its seeds consist of 38–42% oil [11].

There are also two types of catalyst to produce biodiesel including homogeneous and heterogeneous catalysts. Heterogeneous catalysts are more affordable than homogeneous ones. Using heterogeneous catalysts, the washing stage is removed in the process of biodiesel production and it is also easier to separate biodiesel and catalyst. In addition, heterogeneous catalysts can be recovered and reused [12, 13]. Recently, heterogeneous catalysts in nano sizes are applied to produce biodiesel. Nanocatalysts have a high specific surface area than common catalysts which can be useful for the transesterification process [14].

Several researchers have studied biodiesel production in the presence of nanocatalysts. Wang et al. [15] studied biodiesel production from soybean oil in the presence of nano-MgO. In addition, Mohadesi et al. [16] produced biodiesel from sunflower oil using alkali metal oxides such as MgO/SiO2, CaO/SiO2, and BaO/SiO2. Tahvildari et al. [17] produced biodiesel from cooking oil by the transesterification method in the presence of MgO and CaO nanocatalysts. Moushoul et al. [18] applied CaO/Au nanoparticles as a heterogeneous nanocatalyst and sunflower oil as a source of oil in biodiesel production.

The main purpose of this study is to produce biodiesel from M. Oleifera seeds oil in the presence of MgO as an efficient nanocatalyst. To do so, the effective parameters such as temperature, reaction time, catalyst concentration in wt%, and methanol-to-oil molar ratio were optimized using an experimental design with the help of the Taguchi method. After the determination of optimized conditions, the produced biodiesel was blended with diesel fuel in different volume ratios, and also, their properties such as pour point, flash point, cloud point, viscosity, and density were obtained and compared to the international standards. As far as we know, the biodiesel production has not been performed with the use of M. oleifera seeds oil in the presence of MgO nanocatalyst.

Materials and methods

Materials

In this work, M. oleifera seed oil was employed as an oil source and prepared from Bushehr province located in south of Iran. Methanol (purity ≥ 99.9%) was purchased from Merck company (Germany) and MgO nanocatalyst (purity > 99%) was purchased from the US Research Nanomaterials (United State of America). In addition, n-hexane was purchased from Merck Company and was used for the extraction of oil from M. oleifera seeds.

Extraction of oil

The seeds of M. oleifera was gathered and then crushed. Soxhlet apparatus was then utilized to extract oil from the crushed M. oleifera seeds using n-hexane as solvent. The extracted oil was next purified by distillation to remove any hexane from oil. The recovered hexane can be reused for the extraction, and the purified oil would be used to produce biodiesel.

After the extraction of oil from M. oleifera seeds, gas chromatography (GC, Varian CP3800 model) analysis was applied to determine the fatty acid components of oil. The oil components are given in Table 1. The components of fatty acids in the M. oleifera oil are necessary for biodiesel production.

Table 1 GC analysis of the oil extracted from Moringa oleifera seeds

Experimental design methodology

To optimize different parameters on biodiesel production using MgO nanoparticles, the experimental design was applied. For this purpose, the Taguchi method using L9 orthogonal array was exploited with the help of MINITAB software. Table 2 shows the experimental design results to determine the optimum conditions for the production of biodiesel.

Table 2 The Taguchi method using L9 orthogonal array

Transesterification process

The transesterification process was employed to prepare biodiesel from M. oleifera seeds oil in the presence of MgO nanocatalyst. Furthermore, a refrigerant was used to prevent methanol evaporation and better control of temperature. After the reflux system was established to prevent methanol evaporation, 30 g of the oil extracted from the M. oleifera seeds was transferred into a 250 mL three-neck flask and placed on a heater to reach the specified temperature. A blend of methanol and catalyst was then poured into a beaker and mixed by a magnetic stirrer. Sufficient amount of methanol during the transesterification reaction is necessary to break the glycerine-fatty acid linkages. After mixing the solution of methanol and catalyst, the mixture was added to the oil, and its temperature was checked by a thermometer every 10 min. When the reaction time completed, the biodiesel formed. Afterwards, the mixture was poured into a separatory funnel, and three phases formed after 24 h. The lowest and highest sections of the funnel would be the catalyst and biodiesel phase, respectively, and glycerol would place between them. Eventually, the biodiesel yield was calculated as follows:

$${\text{Biodiesel yield (\%)}}\;{ = }\;\frac{{{\text{Weight of biodiesel produced }}\; \times \; 1 0 0}}{\text{Weight of oil }}.$$
(1)

Combining biodiesel with diesel

The produced biodiesel in optimum conditions was blended with the diesel fuel in the ratio of 25, 50, and 75 volumetric percent, and their properties were measured. The mixture of biodiesel and diesel has been indicated as “BX”, where “X” is the percentage of biodiesel in the mixture [19]. The physical properties of the produced biodiesel such as pour point, flash point, cloud point, viscosity, and density were then determined in accordance with the ASTM D6751 and EN14241 international standards.

Characterization of catalyst

To determine the characteristics of MgO nanocatalyst, several analyses such as transmission electron microscopy (TEM), scanning electron microscope (SEM), Brunauer–Emmett–Teller (BET), and energy-dispersive X ray spectroscopy (EDX) were used. SEM (TESCAN VEGA, Czech Republic) was used to determine morphology, pores, and cavities inside the catalyst. In addition, EDX (TESCAN Mira3-FEG, Czech Republic), TEM (Zeiss LEO 906, Germany), and BET (ASAP 2020, USA) were used to determine elemental analysis, size of particles, and specific surface area of the catalyst, respectively.

Results and discussion

Characterization of the catalyst

In this work, MgO nanocatalyst was used in transesterification process for biodiesel production. The SEM image of this catalyst is shown in Fig. 1. As can be seen from the SEM image, the particles sizes are very small. In addition, there are a great number of pores in the surface of the catalyst which can be useful for transesterification reaction. The specific surface area of the catalyst increases with increasing number of pores inside the catalyst and the transesterification process occurs on the surface of the catalyst.

Fig. 1
figure 1

The SEM image of MgO nanocatalyst

In addition, the TEM image of this nanocatalyst is shown in Fig. 2 confirming that the particles are in nanoscale. The catalyst particles exhibit a heterogeneous and asymmetric distribution, and the presence of pores and inter-mass gaps provides sites for external materials.

Fig. 2
figure 2

The TEM image of MgO nanocatalyst

In addition, the BET analysis was applied to measure the specific surface area of nanocatalyst, and the results showed that the specific surface area and the volume of pores in the MgO nanocatalyst were 14.19 m2/g and 0.045 cm3/g, respectively.

Moreover, the EDS analysis of MgO nanocatalyst is shown in Fig. 3. As can be seen, all components of the catalyst are composed of Mg (52.72 wt%) and O (47.28 wt%) elements.

Fig. 3
figure 3

The EDS analysis of MgO nanocatalyst

Determination of optimum conditions

To determine the optimum conditions in the biodiesel production, MINITAB software was applied. To do so, the Taguchi method using L9 orthogonal array model was employed to design the experiments to decrease the number of tests. The results of experimental design based on Table 2 are listed in Table 3.

Table 3 The biodiesel yield and S/N (signal-to-noise) ratio in different conditions

As given in Table 3, the optimal conditions for the biodiesel production are the reaction temperature of 45 °C, reaction time of 4 h, methanol/oil molar ratio of 12:1 and catalyst concentration of 1 wt%. In optimum conditions, the biodiesel yield was found to be 93.69% which was a considerable amount. In addition, the S/N ratio (signal-to-noise) to optimize the parameters using the Taguchi method is shown in Fig. 4. The greater S/N ratio corresponds to the smaller variance of the output characteristic around the desired value and corresponds to the better performance characteristics [20]. According to the obtained results, the biodiesel yield increased by increasing methanol-to-oil molar ratio, and it also decreased by increasing the amount of catalyst in wt%. The reason for this is that glycerin extensively dissolved in excess methanol by increasing methanol content, sustaining methanol from reacting with the catalyst, and, hence, makes it hard to separate methanol from biodiesel and glycerin [21, 22]. As a result, a reduction in the production of biodiesel may occur in the presence of high catalyst content because of the high saponification [23]. In addition, the highest biodiesel yield was achieved at high contact times and low temperatures. At high temperatures, the solubility of methanol rises in the oil and leads to increase the efficiency of biodiesel production [24]. In addition to this, an increase in the temperature of the reaction intensifies the saponification reaction of the triglyceride [25]. Moreover, methanol at high temperatures evaporates and decreases the contact of methanol with the oil and catalyst [26].

Fig. 4
figure 4

The S/N ratio for the optimization of parameters using the Taguchi method

Furthermore, signal-to-noise ratio (S/N) is a measure that compares the level of the desired signal to the level of background noise. In fact, the higher the S/N, indicating that it is closer to the target. As shown in Fig. 4, the signal-to-noise ratio would be maximum at optimum conditions (i.e., S/N = 39.343).

The highest yield of biodiesel was compared with the previous studies and results are given in Table 4. As shown in this table, the biodiesel produced in this study is comparable to the previous studies.

Table 4 Comparing results with the previous studies

Physical properties of the biodiesel

To determine the physical characteristics of biodiesel, the biodiesel was blended with the diesel fuel in different volume ratios (B25, B50, B75, and B100), and their properties such as density, kinematic viscosity, pour point, cloud point, and flash point were measured. The best ratio for the blending of biodiesel with the diesel fuel was obtained according to the international standards with the ability of using the produced fuel in the extensive range of operating conditions [19]. The results are given in Table 5.

Table 5 Physical properties of different blendings of the produced biodiesel with the diesel

Density can affect the atomization efficiency of the fuel [8]. In the present study, the density of the produced biodiesel and the diesel fuel were 0.88 and 0.83 g/m3, respectively. According to the standard EN 1421, the density of B00, B25, and B50 is not within the standard range, and hence, these blends of the produced biodiesel with the diesel fuel cannot be used in motor vehicles.

In addition, viscosity is one of the important properties of diesel fuels indicating the ability of fuel’s flow as well as its atomization. As a result, a fuel with higher viscosity results in poor combustion and thereby leading to emit more smoke and more greenhouse gases. The kinematic viscosity of pure biodiesel produced by MgO nanocatalyst was found to be 4.7 mm2/s which was in the range of ASTM D6751 standard (1.9–6 mm2/s). The viscosity of the diesel fuel is 2.8 mm2/s which is smaller than that of the produced biodiesel. According to ASTM 6751D, the viscosity of all combinations of the produced biodiesel with the diesel are found to be within the standard range; however, only the mixtures of B75 and B100 are within the standard range in accordance with the EN 1421 standard.

Another important property of diesel fuels is the flash point. Fuels having a higher flash point provide more safety during storage and transport [21]. In accordance with the obtained results, the flash point of biodiesel is larger than the diesel fuel, and hence, it makes the fuel safer during transport and storage. The flash point of B25 and B50 productions is not in the range of standard; however, the mixtures of B75 and B100 are within the standard range (bigger than 130) and so is used in motor vehicles.

In addition, the results show that the pour point of fuel increases with increasing the biodiesel volume percent during the blending process. Therefore, at low temperatures, vehicles feeding by a blend of the produced biodiesel with the diesel would favor more problems in comparison to the conventional diesel fuel and so not being used in a motor vehicle during the winter because of disrupting the engine performance.

Cloud point depends on temperature, and at low temperatures, fuel is eligible to form wax crystals with the ability of blocking fuel lines and filters in fuel systems [32].

In addition, the results disclosed that the produced fuel’s pour point increases with increasing the biodiesel content in the blending process.

Conclusions

In the present study, MgO nanocatalyst was employed to produce biodiesel from M. oleifera seeds oil using the transesterification process. To do so, the effect of various parameters such as temperature, contact time, catalyst concentration, and methanol/oil molar ratio was investigated upon the biodiesel production and the best operating conditions were obtained for the highest biodiesel efficiency using the statistical software of MINITAB and the Taguchi method. The results indicated that the highest biodiesel efficiency was found to be at the methanol-to-oil molar ratio of 12:1, the reaction time of 4 h, the temperature of 45 °C, and the catalyst concentration of 1 wt%, and hence, the biodiesel efficiency of 93.69% was achieved. To improve the physical properties of the produced biodiesel fuel, it was blended with the diesel fuel in various volume ratios, and the fuels of B25, B50, B75, and B100 were produced. Furthermore, the physical properties of the produced biodiesel and the produced biodiesel blended with the diesel fuel were determined such as density, kinematic viscosity, flash point, pour point, and cloud point. All these properties were measured in accordance with the international standards of ASTM D 6751 and ASTM D 14214. By increasing the produced biodiesel volume percent in the fuel blending, some physical properties such as cloud point and pour point are beyond the limit of the standard. Despite these limitations, the other fuel properties are within the standard criteria. The density of B75 and B100 is in the range of standard; however, the blendings of B25 and B50 are slightly lower than the standard criteria. In addition, the produced biodiesel viscosity and its blending with the diesel fuel in different volume ratios are in the standard criteria. In addition, the produced biodiesel flash point and its blending with the diesel fuel in different volume ratios increase in comparison to the diesel fuel, which make the produced fuels safer during transport and storage. Moreover, the flash point of B75 and B100 was higher than the standard range, and so these blendings are proper fuels for use in motor vehicles.