Introduction

The world's population is expanding quickly, which has led to a rise in the consumption of finite fossil fuels. This hypothetical situation is a fantastic method to support the development of biodiesel as a new green fuel. Coal, natural gas, and crude oil are currently the main energy sources used in the world [1, 2]. These traditional energy sources are non-renewable and continuously depleted. This problem prompts scientists all over the world to look for new energy sources [3, 4]. Biodiesel is one of these substitutes that become more and more popular due to its benefits. Due to fewer air pollutants and greenhouse gas emissions than traditional petro-diesel, biodiesel is environmentally benign, renewable, biodegradable, and non-toxic. It can be made from animal fats and oils, edible vegetable oil, and non-edible vegetable oil [5, 6]. Because it conflicts with food, edible vegetable oil is not advised as a feedstock for biodiesel manufacturing, especially in developing nations. Additionally, the production costs of such oil facilities are too high compared to their profits to employ non-edible oil [7].

On the other hand, the rate of production of edible oil is rising globally as a result of the rising rate of demand for consumption of edible oil [8]. As a result, there is an increase in the byproduct discharge (waste cooking oil). The researchers reported waste cooking oil (WCO) discharged from various eateries and the food industry as a substitute raw material for biodiesel manufacturing. This substance can be used to produce biodiesel, which lowers the cost of producing biofuel [9,10,11]. Esterification and transesterification reactions are needed because the WCO contains the highest amount of neutral oil (NO) and some free fatty acids (FFA). According to some published research, H2SO4 is employed as a homogeneous acid catalyst to first esterify FFA before trans-esterifying it with a base catalyst. H2SO4, however, is not advised because it pollutes the environment [12, 13]. In numerous studies, base catalysts were used to convert WCO to biodiesel. However, WCO includes between 14 and 18 weight percent of FFA, which prevents full conversion of WCO to biodiesel using such catalysts [14].

A form of carbonaceous material called biochar is produced when biomass is thermo-chemically converted in an oxygen-limited environment. Biochar provides a number of advantages over standard catalysts like NaOH, H2SO4, and others. First off, its processing is straightforward and its feedstock is renewable. Biochar can be produced either as the primary byproduct of biomass carbonization or as a byproduct of rapid pyrolysis and biomass gasification [15]. Depending on the application, the physicochemical characteristics of biochar can be easily applied. To functionalize biochar, a number of modification procedures were created. These benefits make biochar an excellent candidate for use in the field of heterogeneous catalysis [15, 16].

Rice husk biochar was modified and employed as a catalyst to create biodiesel from spent cooking oil, in accordance with the findings of prior investigations [17]. The shortcoming of this study was the absence of optimization to determine the ideal operating state to increase biodiesel yield. Furthermore, when compared to rice husk, sugarcane bagasse was far more readily available in Ethiopia. Sugarcane bagasse is a solid waste generated by agriculture and industry that is rich in cellulose and polysaccharides, making it an ideal starting point for the synthesis of biochar [1, 15].

And many types of biochar demonstrated their unique characteristics in the catalytic processes, which serves as an important point of reference for the creation of catalysts based on biochar [15]. A by-product of sugar-making plants in particular, sugarcane bagasse may be converted into biochar, which not only lowers the cost of making biochar but also offers a workable method for disposing of sugarcane bagasse. However, the catalytic capacity of a single bagasse biochar remains restricted and slow. Therefore, modifying sugarcane bagasse biochar to increase its catalytic efficiency is essential and advantageous.

In fact, magnetic biochar catalyst, also known as biochar impregnated with ferrite ions, has attracted a lot of interest lately [18]. As opposed to more traditional methods like filtration or centrifugation, magnetic biochar catalyst is known to have a simple yet quick separation from reaction products. Even though the reaction mixture has a high viscosity, the magnetic catalyst has a good recovery rate [14, 17].

As a result, the primary goal of this work was to prepare and use sugarcane bagasse-based magnetic catalysts for the generation of biodiesel from WCO. This study examined the synthesis of magnetic biochar from the angles of its generation, activation, and use in biodiesel. In order to increase its catalytic activity, first biochar was made from sugarcane bagasse and then modified by ferrite ions. The synthetic catalyst had the necessary properties and was used in the synthesis of biodiesel. Design Expert version 11 was used to create the experiment. The experiment was run in a randomly chosen order. Additionally, biodiesel production was optimized utilizing a synthesized catalyst. The synthesized biodiesel was evaluated and validated according to ASTAM and EN standards.

Materials and methods

Materials

WCO and sugarcane bagasse were used as the primary raw materials in this study's biodiesel production. WCO was collected from the student cafeteria of Wachemo University. The second resource, sugarcane bagasse, was sourced from a cast drift site near the Ethiopian city of Hossana.

Sulfuric acid (purity, 98%), methanol (purity, 99.8%), distilled water, sodium hydroxide, hydrochloric acid, phenolphthalein indicator, and FeSO4·7H2O were purchased from the Kirkos Chemicals and Equipments Shopping Center in Addis Ababa. All of the compounds were analytically graded before use, requiring no additional purification.

Electronic balances and magnetic stirrers were utilized in this experiment, together with separator funnels, volumetric flasks, water baths, ovens, beakers, plastic sample holders, heating mantles, Bunsen burners, and centrifuge separators in the Organic Chemistry lab. Furnace, Thermogravimetric Analyzer (TGA- 4000), and Fourier Transform Infrared Spectroscopy (FTIR, L1600300 Spectrum TWO UTA) were utilized at the Material Science and Engineering laboratory. In the Civil and Environmental Engineering lab at Jimma Institute of Technology, Jimma University, viscometer (model, DV2T) was employed. At Addis Ababa University, Bruauer-Emmett-Teller (BET) (HORIBA SA9600 USA model) was used.

Catalyst synthesis and characterization

Preparation of magnetic biochar catalyst

Procedure for magnetic biochar catalyst preparation was adopted by small modification from literature reported by [19]. Sugarcane bagasse was the biochar's primary source ingredient for the experiment. After being cleaned with deionized water and dried in an oven set to 80 °C, the collected sample was crushed using a plant crusher. The powder was put into sealed bags and kept in dry dishes for subsequent use after passing through a 40-mesh screen. By employing sugarcane bagasse powder as a precursor, pyrolysis, and FeSO4·7H2O as an iron source, magnetic biochar (Fe-BC) was created. To be more precise, 3.17 gm. of FeSO4·7H2O was weighed in a beaker (250 mL), and then it was dissolved in pure water and combined with 10 g of biochar powder. The mixtures were agitated at a 500 rpm/min speed for 12 h at room temperature, and then they were dried to a constant weight in an oven at 105 °C. To ensure uniform particle size, the resulting Fe-BC was ground through a 1-mm sieve after being cooled to room temperature. NaOH (1 M) solution was used to adjust the catalyst's pH at 7.

Characterization of magnetic biochar catalyst

FTIR characterization of catalyst The catalyst sample's functional groups and complete bonds were identified using FTIR spectroscopy. By sending a laser beam through the solid sample at a resolution of 4 cm−1 in the range of 4000 cm−1 to 400 cm−1, the infrared spectra bands were recorded. The bonds and related functional groups of catalyst were examined.

Thermogravimetric analysis The thermogravimetric analyzer was used to measure the mass loss during a heating ramp rate in order to test the catalyst's thermal stability. There was a 20 °C/min heating rate. The catalyst's weight losses and associated degradation temperatures were noted and examined.

Determination of physical and textural properties The method suggested by was used to determine the bulk density was determined by applying ASTMD 1298. Porosity of the produced catalyst was determined by method used in [20]. Specific surface area, pore volume and pore size were determined by BET method.

Purification of crude waste cooking oil

The primary method of WCO purification is washing. It is mostly used to get rid of salts, light solid residues, and other contaminants from the WCO. 2000 ml of crude WCO were gathered in a volumetric flask. As soon as the clean wash water was visible, the collected sample was constantly washed with distilled water heated to 80 °C. Degumming and Drying: Degumming is the process of purging the crude WCO of any heavy particles, phospholipids, and other contaminants. Water degumming with conventional technique was employed to clean the WCO of such significant contaminants. The WCO was cooked at 70 °C while the first sample of distilled water was heated at 90 °C. After that, 3% (v/v) of hot distilled water was gradually added, and stirring was maintained at 350 rpm for one hour. WCO was then stirred and allowed to cool to room temperature. The centrifuging separation was done at 350 rpm for 30 min thanks to the cooled WCO. The WCO was separated from the black precipitate that had developed at the tubes' bottoms. To get rid of any remaining water content, degummed WCO was next dried on a heating mantle for 30 min at 105 °C.

Determining physicochemical properties of waste cooking oil

After the purifying process, the WCO's physiochemical characteristics were identified. ASTMD 6751 was primarily used to determine the following properties: acid value, saponification value, viscosity, moisture content, density, and FFA content.

Design of experiment and biodiesel production

Design of experiment

The experiment was created using Design Expert (version 11) software. The Box Bhenken Design approach (BBD), derived from the Response Surface Method (RSM), and was used to design the experiment. Table 1 lists the three levels of the four key process variables: temperature, methanol to oil molar ratio, catalyst weight, and reaction time. Twenty-nine tests in total were conducted.

Table 1 Design factors with their range values

Biodiesel production

In contrast to earlier studies, the methodology used in the current study to manufacture biodiesel from WCO is unique. Transesterification and esterification processes are necessary in science, WCO with FFA and NO. Here, transesterification and esterification were carried out simultaneously in a single batch reactor using a Fe-BC catalyst. The whole production process is shown in Fig. 1. A 500 ml three-necked batch reactor with an overhead motor stirrer (maximum 2000 rpm) furnished with stainless steel rod stirrers to give the necessary mixing and a condensing coil makes up the experimental setup. The reactor was placed inside a thermostat-controlled water heater bath.

Fig. 1
figure 1

Generalized biodiesel production process from WCO

Methanol and Fe-BC catalysts were combined first. Following the addition of WCO and the catalyst and methanol mixture, the 250-ml conical flask was transferred to a 500-ml three-necked batch reactor. The conical flask was then set up on the heating mantle and heated to 40, 55, and 70 °C while being vigorously mixed. The mixture was allowed to settle in a separating funnel when the reaction time was up. Phase separation began within ten minutes, and it took one hour to complete. Biodiesel made up the top layer, and water and a catalyst-heavy mixture of contaminants made up the bottom. Filtration was used to separate the catalyst from the bottom phase. To remove contaminants, the separated biodiesel was washed twice with distilled water heated to 80 °C (3%v/v of biodiesel by volume). Obtained biodiesel was dried at 105 °C for 30 min.

Characterization of produced biodiesel

Physiochemical properties

Physiochemical properties of biodiesel: Acid Value, Moisture Content, FFA, Iodine Value, Density, Saponification Number, Flash Point, Cetane Number, Viscosity, HHV and Ash Content were characterized according to ASTM D6751 methods.

Instrumental characterization

FTIR spectroscopic analysis FTIR spectroscopy was used to determine the available functional groups and entire bonds of the biodiesel sample. The infrared spectra bands were recorded by passing of a beam of light through the solid sample at a resolution of 4 cm−1 in the range of 4000–400 cm−1. The associated functional groups and bonds were analyzed.

Result and discussion

Characterization result of catalyst

FTIR analysis

A popular technique for identifying the functional groups of materials is FTIR spectroscopy which was used in this study. The FT-IR spectra graph was shown by Fig. 2, which was smoothen into 250 points. The Fe–O bond characteristic signal at 584 cm−1 further supported the existence of magnetic particles by demonstrating successful magnetization of biochar [19]. The stretching vibration peak of C=O in the carboxyl group is responsible for two additional peaks in the FTIR spectra of Fe-BC at 1650 cm−1 and 1683 cm−1 [21]. The -OH stretching vibration has been ascribed to the adsorption peaks at 3744 and 3300–3400 cm−1 [19,20,21]. The C-H vibrations produced by alkyl groups are represented by the absorption peak at 2932 cm−1 (-CH2 and -CH3). This aliphatic formation's stretching of the C-H bond is a sign that cellulose is present [19,20,21]. Peak ascribed by C=O stretching in ketene groups at 2375 cm−1 [22]. The band at 1000 and 903 cm−1 assigned by –C–H and =C–H group, respectively [21]. The presence of a magnetic component in the biochar was typically validated by the FT-IR spectra of Fe-BC, and the biochar's spectra were also corroborated by the IR spectrum of biomass biochar found in the literature [17, 21, 23, 24].

Fig. 2
figure 2

FTIR analysis of biomass derived magnetic biochar catalyst

TGA analysis

The thermal stability of Fe-BC catalyst was evaluated by TGA. The prepared catalyst TGA profile was displayed in Fig. 3. Typically, weight loss occurred in four stages (region 1, region 2, region 3 and region 4). Even after preconditioning, the release of physically adsorbed material, volatile substances, and hydrogen-bonded water in catalyst was seen in region 1 (up to 100.39 °C) temperature range. In this region very small weight loss (1.97%) has been observed. In region 2, from 100.39 to 249.98 °C) medium weight loss about (11.82%) was happened. This was due to breakdown of biochar cellulose. In third region, about 7.4% weight loss happened from 249.98 to 450.32 °C. This was due to destruction of hemicellulose and cellulose components [25]. The TGA curve in Fig. 3 shows that the deterioration was greatest between 450.32 and 661.08 °C about 20.47% loss. The main consequence of the inter- and intra-molecular dehydration mechanisms that lead to the breakdown of attached iron and biochar bonds [25, 26]. In addition, it was caused by carbonization and the formation of ash from broken down monomers. As a whole, thermal stability of synthesized catalyst in this study was good and that is viable for biodiesel production catalysis.

Fig. 3
figure 3

TGA analysis of biomass derived magnetic biochar catalyst

Physical properties of the catalyst

The magnetic biochar catalysts made from synthetic biomass’s physical characteristics were identified as shown in Table 2. The BET technique was used to determine a certain surface area. The specific surface area of the currently synthesized catalyst was 165 m2/g, which was more than the specific surface area of fresh rice husk /K2O-20%/Ni-5% reported by [27] and equivalent to similar literature values [28]. In addition, larger pore diameter catalysts are crucial because they can more easily catalyze chemical processes. According to the physical characteristics of the catalyst used in this study, it can catalyze the conversion of WCO into biodiesel.

Table 2 Physical properties of synthesized catalyst and literature result

Physiochemical properties of waste cooking oil

Physiochemical properties: Moisture Content, Density, Kinematic Viscosity, Acid Value, and FFA of WCO were determined. The results were available in Table 3. The WCO has a density that is within the range of vegetable oil density (0.86–0.9)g/ml. According to Table 3, the WCO has a high FFA concentration, which suggests that esterification can convert the WCO to FAMEs. Contrarily, transesterification reaction is required when NO is present in the WCO. Except for FFA, all of the other metrics in Table 3 were below the ASTMD 6751 limit. Both FFA and NO were converted into biodiesel with careful consideration, and product output was optimized.

Table 3 Physiochemical properties of waste cooking oil

Experimental and ANOVA results

A total of 29 experiments were conducted according to run order distributed randomly. The actual and predicted biodiesel yields were shown in Table 4.

Table 4 Experimental and software results

Model terms are considered significant when the P-value is less than 0.0500. In Table 5, the model terms A2, B2, D2, AC, BC, CD, A, B, C, and D are important. Model terms are not significant if the value is higher than 0.1000. The F-value for the lack of fit, 0.80, indicates that the lack of fit is not significant in comparison to the pure error. A significant Lack of Fit F-value has a 65.14% possibility of being caused by noise. High values of the coefficient of determination terms—Predicted R2 of 0.8428, Adjusted R2 value of 0.9278, and R2 of value of 0.9639 also lent credence to the constructed model's sufficiency and importance. This suggests that 96.39% of the variation in the experimental outcomes was explained by quadratic model.

Table 5 The correlation results of suggested quadratic model

External studentized residual represented in Fig. 4a is vital to check goodness of data fit on regression line under established model. All the residuals were fitted on linear regression line. This implies that data was well fitted and is possible to predict the response variable under given ranges of process variables. In addition, Fig. 4b represented the relation of actual and pridicted biodiesel yield. In this plot predicted and actual yield values were distributed on linear line that indicates the actual and predicted values are closer to each other. This was supported by highest R2 value. This was similar with reported literature [29].

Fig. 4
figure 4

a Normal plots of residuals and b actual versus predicted biodiesel yield values

Interaction effects of process variables

The interaction effect of temperature and methanol to WCO ratio was represented in Fig. 5a. The interaction effect of both variables was significant on response parameter. The increase in the methanol to oil molar ratio led to the highest possible biodiesel yield, as shown by the 3-D surface plot in Figure (a). This demonstrated that employing a high methanol to WCO molar ratio produced the highest levels of biodiesel. Since WCO contained 20.91 weight percent of FFA, this needs high amount of methanol to be converted into esters. Because of the high amount of methanol content resulted in maximum biodiesel yield [30]. Contrarily, when other variables were maintained at their median values, increasing the temperature led to low biodiesel output. Because methanol has light hydrocarbon nature and ability to easily evaporate from reaction media at higher temperature, this led into low biodiesel yield.

Fig. 5
figure 5

T3D surface plot of the interaction effects: a methanol to oil molar ratio and temperature, b reaction time and temperature c reaction time and methanol to oil molar ratio, and d catalyst concentration and reaction time on the biodiesel yield

In Fig. 5b, the interaction effect of reaction time and temperature demonstrated significant effect. At low level of both variables demonstrated low biodiesel yield. High value of temperature resulted in low yield and medium value of time resulted in high biodiesel yield. Because, FFA to be convert to esters requires relatively higher time than temperature. The interaction effect of retention time and the ratio of methanol to oil was represented in Fig. 5c. Their P-value (< 0.0001) indicates significant effect on response parameter. As illustrated from the Fig. 5, long reaction time can reverse the equilibrium towards reactant side [30]. The interaction effect matched the catalyst concentration and time was shown in Fig. 5d. The increment of catalyst and time would result in low yield of biodiesel. Because of excess use of catalyst could result in activation of side reaction. The main reactions (simultaneous esterification and transesterification) could be less. Using the appropriate amount of catalyst is more suggested.

Numerical optimization

Figure 6 involved the response ultimate goal and range values of factors with their optimization criteria. The ultimate goal was maximizing the biodiesel yield within the given range values of process parameters. The obtained optimum conditions were evaluated by maximum desirability value of 1 and validated by experimentally (biodiesel yield = 98.27%), while software predicted yield was 98.32%. There was very small deviation in experimental and software predicted yield value. The result was better when compared to [27, 28, 31].

Fig. 6
figure 6

Optimization criteria and optimum conditions

Characterization of optimum product (Biodiesel)

Physiochemical properties

All determined physiochemical parameters were displayed in Table 6. In EN 14214 specifications, density of standard biodiesel can be in the range of 0.86–0.9 g/ml. In this experiment, biodiesel density was 0.88 g/ml which indicates the good ignition property of the fuel. The density of the fuel affects its atomization, combustion, and lubrication; fuel with lower density will result in good combustion and lubrication, which is indirectly related to ignition delay time; fuel with higher density requires longer ignition delay time. In addition, the temperature has a significant impact on the fuel density; as temperature rises, fuel density decreases, resulting in a need for less ignition delay time. The produced biodiesel moisture content was 0.03 (v/v) % which was in a limit of ASTM D6751 that indicates good fuel quality, fuel can easily burn. In ASTM D6751-03, the kinematic viscosity of conventional biodiesel is in the range of 1.9–6 mm2/s. In present work, kinematic viscosity was 4.5mm2/s that implies fuel can easily lubricate. Other important fuel quality parameter is acid value. Its value in this experiment was 0.47mgKOH/g in range of specification. Produced from WCO in present study has Cetane number of 52. This implies that produced biodiesel met the international standard.

Table 6 Biodiesel physiochemical properties

FTIR characterization result

The FT-IR bands of biodiesel synthesized from WCO were shown in Fig. 7 and interpreted based on the literatures and standards [32]. The stretching band at 3050 cm−1 associated with O–H (alcohol), at 3006–2852 cm−1 associated with O–H and C-H shows presence of alkanes, alkenes and methylene. The spectrum bending band at1650.5 cm−1 associated with -C=C and spectrum band at 1762.75 cm−1 assigned by C=O (carbonyl group). The starching band at 1630 cm−1 associated with C-O indicates alkoxyl group. The bending bands at 679.7–761 cm−1 assigned with =C–H (alkene group) and stretching band at 590 indicates (C–H)n shows alkane group. The spectra band at 2000 cm−1 attributed with C=C=N stretching in ketenimine, the peak at 1750 cm−1 related with C=O stretching in carboxylic acid, and the absorption band at 2260 cm−1 associated with CN stretching in nitrile. The peaks of IR spectrum of currently produced biodiesel exhibited similarity with biodiesel produced from peanut oil [33] and produced from palm oil, sunflower and soya bean oil [34].

Fig. 7
figure 7

FT-IR bands of biodiesel produced from WCO

Test for catalyst reusability

The utilized Fe-BC catalyst was cleaned with acetone to ensure catalytic stability and then dried for one hour at 60 °C to remove any tars and adsorbed contaminants as explained by [35]. After every cycle run, this procedure was carried out. The generation of biodiesel from WCO was tested three times under ideal processing conditions. The Fatty acid methyl esters (FAMEs) yield for three successive runs showed that there was no discernible decrease in FAMEs yield. At the fourth run, as seen in Fig. 8, the FAMEs yield started to fall. The catalyst exhibited good cycles when compared to silica sulfuric acid catalyst reported by [20]. This may be the result of active compounds leaking into the reaction medium and adsorbent materials blocking the active sites [36].

Fig. 8
figure 8

Repeated use of Fe-BC catalyst in the synthesis of biodiesel from WCO

Conclusion

The primary goal of this work was to prepare and use sugarcane bagasse-based magnetic catalysts for biodiesel production from WCO. The catalyst was prepared doping magnetic material in sugarcane bagasse biochar. TGA, FTIR analysis, physical and textural properties of catalyst were determined and interpreted. The synthetic catalyst had the suitable properties and was used in the production of biodiesel. WCO was used as main feedstock for biodiesel production. Four factors (temperature, methanol to oil ratio, catalyst concentration and reaction time) with three levels were designed by BBD method. A total of 29 experiments were conducted according to run order. The optimized biodiesel yield obtained through experiment was 98.27% obtained at 43.60 °C, 9.98 ratio, 49.95 min, 1.76 wt%, of temperature, methanol to oil molar ratio, reaction time and catalyst weight respectively. All determined physiochemical properties indicated that biodiesel met ASTM and EN standards. In general, synthesized catalyst had performed simultaneous reaction (esterification and trans-esterification) in single batch reactor and showed suitability and stability.