Continuous Ultrasound-Assisted Esteriﬁcation and Transesteriﬁcation of Palm Fatty Acid Distillate for Ethyl Ester Production

: Ethyl ester production from palm fatty acid distillate (PFAD) with ethanol in the presence of sulfuric acid and potassium hydroxide was performed in a continuous three-step process using the ultrasound clamps and an ultrasonic probe. The ultimate goal was to produce biodiesel from the PFAD. In the ﬁrst and second esteriﬁcation steps, 16 units of a 400 W ultrasound clamp (20 kHz) were attached 100-m apart along each tubular reactor. In the third transesteriﬁcation step, a 1000-W ultrasonic homogenizer (18 kHz) was used in a 100-mL continuous reactor. A composite central design of experiments and the response surface methodology (RSM) were used to develop predictive models and identify the optimal conditions of each step based on the purities of ethyl ester. The optimal conditions in the ﬁrst step were 46.1 vol.% ethanol, 1.4 vol.% sulfuric acid, and purity 66.68 wt.% ethyl ester. In the second step, the optimized conditions were 57 vol.% ethanol, and 2.1 vol.% sulfuric acid, purity 95.32 wt.% ethyl ester. The ﬁnal transesteriﬁcation step was carried out with 14.6 vol.% ethanol and 3.9 gKOH L − 1 . As a result, a ﬁnal ethyl ester purity of 98.15 wt.% was achieved in the biodiesel using the three-step process.


Introduction
A by-product of the production of refined palm oil (RPO) is a low-cost product known as palm fatty acid distillate (PFAD) [1]. PFAD is not edible and is commonly used as a feedstock for the production of soap, animal feed, and oleochemical products [2]. Moreover, vitamin E, which has a high market value, is extracted commercially from PFAD, so it can also be used as a feedstock for health foods and in the pharmaceutical industry [3]. PFAD comprises mainly free fatty acids (FFA) and is a promising biofuel feedstock [4]. On average 72.53 million tons of crude palm oil (CPO) production could be produced in 2020 [5]. In addition, there is no official production data of PFAD, however, the estimated PFAD production was estimated based on the approximately 4% of FFA in CPO [6]. Thus, approximately 2.9 million tons per year of PFAD was produced. For the largest CPO production countries such as Indonesia, Malaysia, and Thailand, the CPO production was 43.5, 19.9, and 3.1 million tons, and the approximate production of PFAD was 1.74, 0.796, and 0.124 million tons, respectively. The use of ultrasound (US) can assist the mixing of immiscible liquids in biodiesel production by inducing sonochemical reactions [7]. US treatment has been applied to biodiesel production to decrease the reaction time, decrease the consumption of chemical reactants, and increase the product yield [8,9]. The dramatic effect of US stems from cavitation, which involves the rapid collapse of ultrasonically generated bubbles, causing localized pressure and temperature spikes as well as strong microscale mixing. US treatment is frequently used in various applications such as oil emulsification, food production, and homogeneous mixing for chemical reactions [10]. In particular, US treatment has been used for homogeneous esterification in the production of biodiesel from high-FFA feedstocks. For example, Hayyan et al. [11] studied the US treatment of low-grade palm oil (LGPO). They found that sonication induced esterification reactions, indicating that US treatment is an appropriate and beneficial route for the production of biodiesel. The initial 20% FFA in the LGPO was decreased to less than 3% under the optimum conditions, which involved 2 wt.%, H 2 SO 4 , a methanol-to-LGPO ratio of 10:1, and a reaction time of 300 min at 50 • C [11]. Mohod et al. [12] studied the application of acoustic cavitation for methyl ester production from a high-FFA karanja oil. The acid value (AV) of the karanja oil was reduced from 14.15 mgKOH g −1 to less than 2.7 mgKOH.g −1 after processing with a methanol-to-oil molar ratio of 5:1 and 2% H 2 SO 4 loading at ambient temperature [12]. Andrade-Tacca et al. [13] used US treatment to achieve auto-induced temperature increases and mechanical mixing to reduce the AV of jatropha oil (36.56 mgKOH.g −1 ) by acid-catalyzed esterification pretreatment. The esterification conversion efficiencies were 56.73% and 83.23% after US treatment for 10 and 30 min, respectively. These FFA conversion efficiencies were much higher than those achieved with mechanical mixing (i.e., 36.76 and 42.48% after 10 and 30 min reaction, respectively). Furthermore, the AVs of the jatropha oil esters were 15.82 and 23.12 mgKOH.g −1 when US and stirring were used, respectively, after 10 min reaction. Thus, clearly US has a significantly better effect than mechanical mixing in reducing the AV of jatropha oil [13]. Trinh et al. [14] carried out biodiesel production from rubber seed oil (RSO) using an US homogenizer at a frequency of 18 kHz and power of 500 W. After esterification, the high FFA content of the RSO was reduced from 40.14% to 0.75% under the optimal conditions, which were a methanol-to-oil molar ratio of 23:1, 7.5 wt.% H 2 SO 4 , and 30 min sonication time at 50 • C [14]. Joshi et al. [15] also investigated the esterification of karanja oil using US treatment. The esterification process was optimized by selecting operating parameters for an US horn and an US flow cell. The US horn reactor reduced the AV from 10.5 to less than 2.34 mgKOH.g −1 after treatment with a methanol-to-oil molar ratio of 6:1, 1.5 wt.% H 2 SO 4 , 70% duty cycle, and 90 min reaction time. In contrast, the US flow cell reduced the AV of the karanja oil to less than 2.77 mgKOH.g −1 under the optimal conditions: 1.5 wt.% H 2 SO 4 , methanol-to-oil molar ratio of 6:1, 70% amplitude, and 0.33 L.min −1 flow rate. Maximum AV conversions of 77% or 74% were obtained using the US horn and US flow cell, respectively, making the former superior to the latter [15].
The high FFA content in PFAD is the main problem for producing biodiesel because soap is formed during transesterification, and the yield of biodiesel is reduced. To solve this problem, the three-step processing of ethyl esters in PFAD was tested using US treatment in each step. Esterification was carried out in the first step to convert the high FFA content of PFAD to ethyl esters. Although most of the FFAs in PFAD were removed, the remaining FFAs still exceeded the limit of acceptability for biodiesel production using base-catalyzed transesterification. Therefore, the FFAs in the first-step esterified oil must be decreased using a second processing step. The reactions in the first and second steps of the US-assisted esterification are shown in Equation (1). For the third step, the partial triglycerides of esterified oil from the second step are converted to ethyl esters by transesterification. The US-assisted transesterification of triglycerides and ethanol is shown in Equation (2). Actually, selecting numbers of biodiesel production processes from oil are dependent on the total FFA content and quality of the raw materials. The maximum content of FFAs acceptable in a base-catalyst transesterification is approximately 2 wt.%, and preferably less than 1 wt.% [16]. Therefore, the high FFA content in PFAD is the main problem for producing biodiesel because soap is formed during transesterification, and the yield of biodiesel is reduced. PFAD mainly consists of 90.61 wt.% FFA, which is quite difficult to convert 90.61 wt.% FFA in PFAD to less than 2 wt.% by a single step of acid-catalyzed esterification as the single step esterification requires additional acid catalyst and methanol consumption [17]. Moreover, the formation of generated wastewater during the esterification process inhibits the progress of the esterification reaction [18]. (1) The use of US treatment in multi-stage biodiesel production has been previously investigated. Gole and Gogate (2013) optimized the methanol molar ratio and the sulfuric acid concentration for two-step methyl ester production from high AV Nagchampa oil using US, microwaves (MW), and microwaves followed by US (MW/US). Esterification was employed to decrease the AV of Nagchampa oil from 18.9 to 1.7 mgKOH.g −1 to prevent saponification reactions. The optimal methanol-to-oil molar ratios were 4:1, 3:1, and 2:1 and the optimal sulfuric acid concentrations were 3, 3, and 2 wt.% for US, MW, and MW/US treatments, respectively. For the transesterification reaction, the optimum amount of KOH required in all three methods was 1 wt.%, and the optimal methanol-to-oil molar ratios were 6:1, 6:1, and 4:1 for the US, MW, and MW/US treatments, respectively. They concluded that microwaves combined with US improved the rate of biodiesel processing, and also allowed the use of less methanol and energy [19].
In Thailand, biodiesel is commonly produced from crude palm oil [20]. Methanol is used as the alcohol in the esterification and transesterification reactions [21]. However, methanol is toxic and dangerous and can be converted into formaldehyde and, further, into formic acid. Generally, the methanol used in conventional biodiesel production is produced from petrochemicals. In contrast, ethanol is non-toxic, and its production in Thailand is based on the fermentation of cassava, molasses, and sugarcane raw materials. Moreover, ethanol contains more carbon than methanol, giving it a higher heating value on combustion [22]. Currently, ethanol is widely used in transesterification to prepare ethyl ester from low-FFA oil with a biodiesel production process in batch mode. However, a few studies have attempted to extend the use of ethanol to esterification reactions for the production of biodiesel from high-FFA oil using US treatment. Hanh et al. [23] studied biodiesel production from oleic acid by US-assisted esterification with ethanol, butanol, and propanol. They varied the alcohol-to-oleic-acid ratio, concentration of acid catalyst, and sonication time. The optimum conditions for operation were an alcohol-to-oleic-acid molar ratio of 3:1, 5 wt.% H 2 SO 4 , and 120 min irradiation time at 60 • C [23]. Kumar et al. [24] used US treatment to produce ethyl esters from coconut oil. The optimum conditions were an ethanol-to-oil molar ratio of 6:1, 0.75 wt.% KOH, and 7 min reaction time. The best yield (98.2%) was obtained at an ethanol-to-oil molar ratio of 6:1, whereas the same result was achieved with an ethanol-to-oil molar ratio of 8:1 in a conventional batch process [24]. From the above literature review, homogeneous catalysts have been most widely investigated in the transesterification and esterification of oils to produce the biodiesel. The advantages of homogeneous catalysts are that they have a faster reaction, cheaper catalyst, and require lower catalyst loading than heterogeneous catalysts. To date, the continuous production of ethyl esters using US clamps on a tubular reactor with homogeneous catalysts of KOH and H 2 SO 4 has been rarely reported. Thus, in the current study, we performed two-step continuous esterification using H 2 SO 4 followed by continuous transesterification using potassium hydroxide (KOH) as the base catalyst in US-modified tubular reactors. The raw materials, PFAD, the first-step esterified oil, and the second-step esterified oil, were used in the first, second, and third steps, respectively. The key component in this novel process is the US-assisted tubular reactor for the continuous production of palm fatty acid distillate ethyl ester (PFADE as biodiesel). The US treatment improves the physical and mass transfer effects of the raw materials and, thus, enhances chemical reactions via the shock waves produced by cavitation [25]. An assessment of the parameters influencing PFADE production in our US-modified tubular reactor was also carried out, and we optimized the ethanol content, H 2 SO 4 content, KOH loading, and length of US clamps based on the purity of the end-product PFADE over the three processing steps. To achieve this optimization, we used a five-level, three-factor central composite design (CCD) of experiments using the response surface methodology (RSM). Finally, the total average electricity and chemical consumption for the US-assisted process are reported for the treatment of PFAD at a flow rate of 25 L h −1 .

Equipment
A schematic diagram of the continuous production of ethyl ester from PFAD using US clamps on a tubular reactor is shown in Figure 1. To achieve the homogeneous mixing of PFAD and ethanol, they were heated until molten for mixing before the first esterification step. In the first step, a 5-m-long helical static mixer (HSM) was installed to mix the PFAD, ethanol, and sulfuric acid; subsequently, the mixture flowed through the US tubular reactor (denoted US-x in the process flow diagram). In the second step, the HSM was not required to blend the raw materials, that is, the first-step esterified oil, ethanol, and sulfuric acid. The US-modified tubular reactors in both the first and second steps consisted of sixteen US clamps mounted on the surface of a stainless-steel tube in which the double esterification reaction for continuous ethyl ester production from PFAD was conducted. The US clamps were operated at a fixed frequency of 20 kHz and their maximum power (400 W) gave 6400 W total power (16 × 400 W). The US waves penetrate the tubular reactor through the US clamps and the tube wall [28]. The acoustic energy density (AED) was examined for US clamps on tubular reactors, which is defined as the ultrasonic power (P US ) divided by the total volume of the mixtures in the ultrasound clamp (V total ), as expressed in Equation (3) [29,30]. Therefore, the AED of ultrasound clamps depends upon the total volume of the sample taken for sonication. In the US reactor, the 250 mL mixture was contained in the ultrasound clamps with an AED of 25.6 W mL −1 at 6400 W total ultrasonic power. The clamps act as adapters and boosters to increase the US amplitude, and the US provided energy input into the flowing mixture in the tube reactor. The dimensions of the US clamps were 65 mm in length, 20 mm in height, and 3 mm wide, and were made of an aluminum alloy [28]. In the third step, a 1000-W, 18-kHz probe-type US emitter and a cylindrical reactor made of stainless-steel were used to accelerate the transesterification reactions between the second-step esterified oil and potassium ethoxide (C 2 H 5 KO).
Here, AED is the acoustic energy density; P US is the ultrasonic power (W); and V total is the total volume of the mixture (mL). Process flow diagram for the continuous production of biodiesel from palm fatty acid distillate (PFAD) using ultrasound (US) clamps on tubular reactors. T1 and T7 are the ethanol tanks, T2 is the PFAD tank, T3 is the tank containing PFAD mixed with ethanol, T4 and T8 are sulfuric acid tanks, T5 is the first-step continuous separator, T6 is the first-step esterified oil tank, T9 is the second-step continuous separator, T10 is the second-step esterified oil tank, T11 is a potassium ethoxide tank, P1 is the pump for mixing PFAD and ethanol, P2 is the chemical pump for mixed PFAD and ethanol, P3 and P7 are chemical pumps for H 2 SO 4 , P4 is the circulating pump for the first-step esterified oil, P5 is the chemical pump for the first-step esterified oil, P6 is the chemical pump for ethanol, P8 is the chemical pump for the second-step esterified oil, P9 is chemical pump for potassium ethoxide, M is the stirrer, HT1 is the band heater, TC is the temperature controller, HT2 is a submersible oil heater, HSM is a helical static mixer, SM is a mixing element, UG are US generators, S are sampling ports, US-1 and US-2 are the US clamps in the first and second steps, respectively, and US-3 is the continuous-flow US reactor in the third step.

Procedure
With reference to Figure 1, the temperature of PFAD in tank T2 was maintained by a band heater (HT1) and a submersible oil heater (HT2) at 50 • C for the preparation of the raw material for the first step. In mixing tank T3, anhydrous ethanol from T1 and molten PFAD from T3 were blended using a chemical pump (P1) to circulate the immiscible mixture until a homogeneous mixture was obtained. To maintain the temperature of the mixture in mixing tank T3 at 50 • C during the continuous process, it was heated with a submersible oil heater (HT2) and was then mixed by a circulating pump. For the preparation of the mixture for the first step in tank T3, PFAD and ethanol were continuously dosed into the 5-m-long HSM by a digital chemical pump (P2). In tank T4, the sulfuric acid was also constantly dosed into the first-step tubular reactor (US-1) by a digital chemical pump P3. Therefore, the mixture of PFAD, ethanol, and sulfuric acid entered through the HSM to US-1. Samples were taken from sampling ports (S1 to S9) and the first-step mixture flowed to a separator (T5) to separate the first-step esterified oil and wastewater. The continuous wastewater separator was designed to separate the light and heavy liquid phases by gravity. Subsequently, the first-step esterified oil in separator T5 flowed into tank T6. In the second-step processing, the temperature of the first-step esterified oil was maintained at 50 • C by heater HT2. The ethanol in tank T7 and oil in tank T6 were constantly dosed into reactor US-2 using the chemical pumps, and the sulfuric acid in tank T8 was fed to US-2 by a chemical pump. The products from US-2 (second-step esterified oil including the wastewater) were fed into a second-step separator (T9). For the final step, the second-step esterified oil in tank T10 and potassium ethoxide solution in tank T11 were continuously dosed into the probe-type US reactor US-3 by two chemical pumps for the final production of ethyl esters. The third-step samples were collected from the outlet port of US-3. The residence time of the mixture in US-3 was approximately 19 s when calculated based on 25 L h −1 PFAD. Three 30-mL samples were taken at 2-min intervals at locations 100 to 900 mm along the lengths of US-1 and US-2 at sampling ports S1 to S9 (for the first and second steps) and at outlet port S3 (for the third step), as shown in Figure 1. To avoid further reaction, all samples were immediately cooled with water at 0 • C to stop the reactions. Subsequently, the impurities in the samples such as residual ethanol, residual catalyst, and residual glycerol were eliminated with water. After the purification process, the samples were then tested using thin layer chromatography with a flame ionization detector (TLC/FID) to evaluate the ethyl ester, TG, DG, MG, and FFA contents in the esterified oil produced in the first and second steps as well as the biodiesel produced in the third step. In the analysis of samples, TLC/FID (model: IATROSCAN MK-65; Mitsubishi Kagahu latron Inc.; Tokyo, Japan) was used to evaluate and reliably quantify ethyl ester, TG, DG, MG, and FFA contents. The samples dripped onto the silica chromatography were then TLC/FID to separate a wide variety of chemical compounds of oils. The analytical chemicals in TLC/FID were mixtures of hexane, diethyl ether, and formic acid (50:20:0.3 vol.%) in the first mobile phase, and hexane and benzene (1:1 vol.%) in the second mobile phase. In the first step, the oil sample was diluted with hexane. The 1 µL sample was then spotted on the zero points of chromarods with a micro dispenser. Subsequently, the chromarods were developed in the development tank of the first mobile phase for the 80 graduation mark on the rod holder (hold on an approximately 20 min). After that, the chromarods developed in the development tank of the second mobile phase did not exceed the 100 graduation mark on the rod holder (hold on an approximately 30 min). After development is completed the mobile phase remaining on the chromarods must be removed by a rod dryer (model: TK-10) at 110 • C for 10 min. The chromarods were scanned using FID to investigate the peaks of triglyceride (TG), diglyceride (DG), monoglyceride (MG), free fatty acid (FFA), and ester under operating conditions of a 165 mL.min −1 of hydrogen flow rate and 2.0 L.min −1 of air flow rate [31]. To calibrate the instrument, six standard samples, namely tripalmitin; palmitic acid; methyl palmitate (Nacala Tesque, Kyoto, Japan); 1,3-distearin; DL palmitin (mono palmitin) (Sigma Aldrich, USA); and, 1,2-di-stearin 99% (Research Plus, USA) were used [32]. The TLC/FID analyzer was used to evaluate the ethyl ester conversion levels in the biodiesel at each sampling port of the US-1, US-2, and US-3 reactors to allow analysis using the RSM. All experiments were repeated three times, and the averages of ethyl ester purity were reported. Under the optimum conditions, the ethyl ester contents were confirmed by gas chromatography with a flame ionization detector (GC-FID), (Agilent, model: GC 7820A; Santa Clara, CA, USA) equipped with capillary column (Agilent, model: CP9080; Santa Clara, CA, USA, 0.32 mm internal diameter, 30 m length, and 0.25 µm film thickness). Operating conditions of the GC were 1 mL.min −1 carrier gas flow (He), 22.578 cm s −1 average velocity, 1.0 µL injection volume, 290 • C inlet temperature, 50:1 split ratio, 50 mL min −1 split flow, and 52.3 kPa pressure. Operating conditions of FID were 300 • C detector temperature, 30 mL min −1 H 2 flow rate, 300 mL min −1 air flow rate, and 25 mL min −1 make up gas flow rate (N 2 ). Finally, the samples obtained under optimized run conditions (model-based interpolation from RSM) were analyzed to verify that the biodiesel met the required standards for biodiesel in Thailand, the United States of America, and Europe.

Experimental Design
The three steps in the US-assisted continuous PFADE production process were optimized using RSM and the data from the CCD experiments. A five-level and three-factor CCD was used to explore the ethyl ester purity obtained via the continuous esterification processes in the first and second steps (i.e., the response). The independent variables had five coded levels, −α, −1, 0, +1, and +α, in the CCD to achieve the rotatability of the design. The axial point (α x ) was calculated based on the total parameters (k). The number of variables (k) was three in the first-and second-step experiments. Therefore, the five levels of the independent variables were (aside from scaling and shift) −1.682, −1, 0, +1, and +1.682, as determined by Equation (4) [33,34]. For the third transesterification step, two independent variables were manipulated to make k = 2. The five level codes were −1.414, −1, 0, +1, and +1.414, as determined by Equation (4) [33,34]. As above-mentioned concerning the coded factor levels, the experimental values of the parameters of each experiment are presented in Table 1, and the experimental design of the first, second, and third steps is shown in Table 2. After all continuous processing steps were completed, the ethyl ester purities were fit to second-order polynomials using multiple regression analysis. The second-order polynomial model of each predicted model is given by Equation (5) [35]. Both first and second steps of the continuous esterification process had the following parameters: ethanol loading (E 1 for first step, and E 2 for second step), sulfuric acid loading (C 1 and C 2 , for the first and second steps, respectively), and length of US clamps (L 1 and L 2 , for first-and second-step). The third-step transesterification process had two independent variables: ethanol (E 3 ) and KOH loading (C 3 ). The dependent variables: EE 1 , EE 2 , and EE 3 were the ethyl ester purities of the first, second, and third steps, respectively. The models for the prediction of the ethyl ester purities in the first, second, and third steps were fitted with Microsoft Excel's solver tool. Here, α x is the axial point for rotatability, and k is the number of variables.
Here, Y is the response variable (purity of ethyl ester, wt.%); x i and x j are the uncoded independent variables (ethanol, sulfuric acid, and KOH loadings and the length of US reactor); β 0 , β i , β ii , and β ij are the intercept, linear, quadratic, and interaction terms coefficients, respectively; k is the number of variables; and ε is the fitting error.

Response Surface Methodology (RSM) Models and Optimal Operating Points
As shown in Table 1, the variables for ethanol content, catalyst loading, and length of the US reactor were optimized using the RSM to achieve the maximum ethyl ester purity in each step. The experimental design matrices for the first, second, and third steps of the continuous process are shown in Table 2. Three predictive models were obtained for the first, second, and third steps, as shown in Equations (6)-(8), respectively. All were seconddegree polynomial functions. The coefficients in the fitted models, p-values for individual terms, coefficients of determination (R 2 ), and the adjusted coefficients of determination (R 2 adjusted), are shown in Table 3. The analysis of variance (ANOVA) results for each term in the predictive models describing the three continuous processing steps are listed in Table 4. Here, EE is the ethyl ester purity (EE 1 EE 2 , EE 3 for the first, second, and third steps, respectively (wt.%)), E is the ethanol loading (E 1 , E 2 , E 3 for the first, second, and third steps, respectively (vol.%)), C is the catalyst loading (C 1 , C 2 , C 3 for the first, second, and third steps, respectively (vol.%)), L is the length of the US reactor (L 1 and L 2 for the first and second steps, respectively (mm)), and β are the numerical coefficients for each step determined by least squares.
In the first esterification step, the ethanol content (19.8-70.2 vol.%), sulfuric acid content (0.6-7.4 vol.%), and length of the US reactor (100-700 mm) were varied. The results indicate that most of the FFAs in PFAD can be transformed to ethyl esters, giving ester purities of 17.52-73.72 wt.%. The verification experiments showed that 74.21 wt.% ethyl ester purity was achieved at the optimal set point with 64.5 vol.% ethanol, 0.6 vol.% H 2 SO 4 , and a 100-mm-long US reactor, as listed in Table 5. However, the use of large amounts of ethanol in the first step will contribute to high production costs. However, if the ethyl ester purity is decreased, the ethanol consumption will be reduced. Consequently, the desired purity of ethyl esters produced from the PFAD is used in Equation (6) as the response (EE 1 ), and the recommended ethanol (E 1 ), sulfuric acid (C 1 ), and the length of the US reactor (L 1 ) were obtained using the solver tool in Microsoft Excel. The results show that the ethyl ester purity sharply increased when ethanol consumption was increased from 44 to 46.5 vol.%, and the ethyl ester purity increased significantly when 46.5 vol.% ethanol was used in the reaction, even though PFAD conversion did not reach the maximum ethyl ester purity. Therefore, the recommended conditions for the first step were 46.1 vol.% ethanol, 1.4 wt.% H 2 SO 4 , and a 400-mm-long US reactor, which was predicted to obtain a 64 wt.% ester purity by the model. TLC/FID was used to analyze the ethyl ester purity from the experiment and verify the optimized run conditions, and 66.68 wt.% ethyl ester purity was obtained at a PFAD flow rate of 25 L.h −1 . The ethyl ester purity increased by 33.3% as the ethanol content was decreased from 64.5 to 46.1 vol.% in the US reactor.  Table 5. The ethanol loading determined the purity of ethyl ester in the first step. Consequently, the purity of ethyl ester (EE 2 ) for the second step was used in Equation (7) as the dependent variable, and the ethanol loading (E 2 ), sulfuric acid loading (C 2 ), and the length of the US reactor (L 2 ) were obtained using the Microsoft Excel solver tool. The results show that the ethyl ester purity sharply increased as the ethanol loading was varied between 35 and 57 vol.%, and the ethyl ester purity increased significantly when more than 57 vol.% ethanol was used in the reaction. Therefore, the recommended conditions for the second step were 57 vol.% ethanol, 2.1 wt.% H 2 SO 4 , and a 400-mm-long US reactor, which was predicted to obtain 95.5 wt.% ester purity by the model. An ester purity of 95.32 wt.% was achieved in the actual experiment. Furthermore, the ethyl ester purity increased by 38.7% as the ethanol content was decreased from 68.8 to 46.5 vol.% using the US reactor in the second step. The TLC/FID results showed that 95.32 wt.% ethyl ester purity was achieved under the recommended conditions with 57 vol.% ethanol, 2.1 vol.% sulfuric acid, and a 400-mm-long US reactor. The ethyl ester purity increased by 47% as the ethanol content was decreased from 92.1 to 57 vol.% in the second US-assisted esterification step.
For the third-step involving transesterification, the ethanol content (2.9-17.1 vol.%) and KOH (1.2-6.8 g.L −1 ) loadings were varied. Ethyl ester purities (EE 3 ) from 97.15 to 99.67 wt.% could be achieved in the third step, as shown in Table 5. To attain a high purity of ethyl esters, the residual FFA and partial glycerides in the second esterified oil should be converted in the final step. The results showed that 99.87 wt.% ethyl ester purity was achieved in the actual experiment under the optimal conditions with 14.6 vol.% ethanol and 3.9 g L −1 KOH with the probe-type US reactor.

Statistical Data Analysis of Predictive Models
A p-value of less than 0.05 and corresponding confidence level of 95% were used to determine the statistical significance of the coefficients in the model [36]. As shown by the data in Table 3, the linear ethanol term was significant in all models, having the lowest p-value. The lowest p-value in Equation (6) for the first step was found in the term β 1 E 1 , and the quadratic term in ethanol loading, β 4 E 1 2 , was ranked second. Therefore, the ethanol content (E 1 ) was the most significant parameter in the first step of the esterification process. Increasing the ethanol loading in the first step had a large impact on the conversion of FFA in the PFAD to ethyl esters. On the other hand, the US reactor length delivered a small significance for the ethyl ester purity in the first step esterification process. For example, the effect of the US reactor length on the purity of ethyl ester contour plot is shown in Figure 2a. The ethyl ester purity changed little along the length of the US reactor when the ethanol content was fixed. In the second step, modeled by Equation (7), the first-step esterified oil repeatedly underwent esterification, and the ethanol content in the linear term of (β 1 E 2 ) was the most significant parameter. In this step, the ethanol (E 2 ) loading was affected by the quadratic term β 6 E 2 2 to a lesser degree, as in the first step. The sulfuric acid content was influenced by β 2 C 2 and had a similar level of significance. However, the length of the US reactor had a low influence on the ester purity for the second step, and was similar to the first step. Although the length of the US reactor seems less important, it was still statistically significant at a corresponding confidence level of 95%. In Figure 2d, a higher value of ethyl ester (97 wt.%) was achieved when the ethanol was in the range of 65 to 93.6 vol.% and the US reactor length was between 100 and 700 mm. When the sulfuric acid contents was less than 3 vol.% or greater than 5 vol.% and the US reactor length was less than 300 mm or greater than 500 mm, 96.5 wt.% ethyl ester was found, as shown in Figure 2e. In the third step, modeled by Equation (8), the lowest p-value was obtained for the ethanol content (β 1 E 3 ). Therefore, for ethyl ester production using an US probe, the ethanol content significantly affects the ethyl ester purity. The linear terms for ethanol loading were β 1 E 1 in the first step, β 1 E 2 in the second step, and β 1 E 3 in the third step, and these were the most significant terms in the fitted models. The second most significantly ranked terms were the quadratic terms for ethanol loading: β 5 E 1 2 , β 6 E 2 2 , and β 3 E 3 2 . Thus, the ethanol loading was extremely significant for the US-assisted conversion of FFA in PFAD, the residual FFA in first-step esterified oil, and partial glycerides in the second-step esterified oil. The length of the US reactor had a less significant effect than other parameters in the first, second, and third steps, but the ethanol and catalyst loadings ranked higher. The statistical significance of the three models was evaluated with ANOVA, and the model significance was tested with the F-test. The results are listed in Table 4.  Figure 2 shows the contour plots of ethyl ester production using the developed models for all three steps. The effects of ethanol content, sulfuric acid content, and length of the US reactor on the ethyl ester purity from the first step are shown in Figure 2a-c, and for the second step, they are shown in Figure 2d-f. The contour plot in Figure 2g shows the relationship between the ethyl ester purity and the independent variables (KOH and ethanol) in the third processing step.

Compositions and Yields of Oils in Each Continuous Processing
Step Table 6 summarizes the composition (in wt.%) with respect to FFAs, ethyl esters, TGs, DGs, and MGs, biodiesel yield, residual ethanol in the esterified oil, crude biodiesel, purified biodiesel, and wastewater generated in the three-step process. Photographs of the raw materials and products produced in the US reactor are shown in Figure 3. The reported yields from the three-step US-assisted process at a flow rate of 25 L h −1 PFAD were achieved under the recommended run conditions. All percentage yields in this study were relative to the initial weight percentage of PFAD (100 wt.%). Note that the yields of the first-step and second-step esterified oils were over 100 wt.% because the remaining catalysts and ethanol were included in the intermediate products from each processing step. That is, the crude products of the first, second, and third steps were not purified with water to remove the residual ethanol, residual acid catalyst, and residual base catalyst in these oils. The wastewater generated from the first and second steps (Figure 3c,d, respectively) mainly contains water, residual ethanol, and residual sulfuric acid. Thus, the heavier generated wastewater will accumulate at the bottom, and the lighter esterified oils will float to the top layer. The residual ethanol contents in the generated wastewater were determined by GC-FID. Note that the generated wastewater retards the forward reaction of acid-catalyzed esterification. Therefore, the wastewater from both the first and second steps must be removed as much as possible to increase the rate of the esterification reaction. In the continuous separation process, the generated wastewater from the first and second esterification steps was processed with a continuous separator. However, the time needed for phase separation after the first and second steps is too long, and this is the most time-consuming unit operation. Thus, the separation by gravity of the esterified oil and generated wastewater was observed to determine the settling time of the heavy phase. The results showed that approximately 180 and 110 min were required to separate the oil and water phases of the first and second-step wastewater, respectively, completely, and the continuous separation unit after esterification was designed based on laboratory-scale tests to separate the generated wastewater and esterified oil phases. As a result, yields of 11.89 and 79.37 wt.% wastewater were obtained in the first and second steps.  Figure 3e shows the glycerol suspended in crude biodiesel before purification. The glycerol suspended in the crude ethyl ester was not easily separated, which was the major problem in this stage. Therefore, the crude biodiesel mixed with suspended soap from third step was washed carefully and slowly with water to eliminate the soap and residual ethanol. As a result, the yield of purified biodiesel was significantly reduced, although a high yield of ethyl esters was obtained. The saponification reactions decrease the yields of ester, and the soap is very difficult to remove because it forms an emulsion [37,38]. In ethanolysis, the glycerol phase separation is more difficult than in methanolysis [39,40], and these results are similar to those obtained by Bart et al. [40] and by Anastopoulos et al. [41]. Regarding the residual ethanol in the oils, an excess of ethanol was used to drive the reaction forward and achieve high ethyl ester purities in each step. The unreacted ethanol was distributed between the intermediate products and the generated wastewater at each step, and the residual ethanol in products and wastewater was analyzed by GC, as listed in Table 6. The residual ethanol contents of the wastewater were as high as 7.7 wt.% in the first step and 44.65 wt.% in the second step. Consequently, the ethanol should be recovered from produced wastewater for industrial implementation. However, the average 18.14 and 27.87 wt.% residual ethanol in the first-and second-step esterified oil, respectively, should not be recovered because these are used in the reaction in the subsequent step. Note that 19.09 wt.% residual ethanol was detected in the crude ethyl ester after the completed separation of the third step, and it is not necessary to recover this because reverse reactions may occur if the mixtures are repeatedly heated to recover the residual ethanol. On average, 132.91 wt.% first-step esterified oil, 131.16 wt.% second-step esterified oil, 61.85 wt.% crude biodiesel, and 56.16 vol.% purified biodiesel, were obtained. The yields of the first-step and second-step esterified oils were rapidly achieved: within approximately 10 s of residence time in the US tubular reactors, as shown in Table 5. The final ethyl ester purity was 98.15 wt.%, and this meets the specifications for commercial biodiesel. In addition, the other properties of the produced ethyl ester were very close to the specifications of commercial biodiesel, as presented in Table 7.

Electricity Consumption
In the startup process, 25 L of PFAD was warmed from room temperature to 50 • C and held at that temperature for 40 min using a submersible oil heater and a band heater to enable homogeneous mixing with a circulating pump. Therefore, a total energy consumption of 1.6 kW h was required in the first step. In the second step, no electricity prior to the actual process startup was required. In the third step startup phase, potassium ethoxide (C 2 H 5 KO) was circulated for 10 min by a pump that required 0.01 kW h. Thus, a total of 1.61 kWh electric power was consumed in the startup phases, and the first step of the continuous process included power consumption for maintaining the first-step esterified oil at 50 • C. Two chemical pumps were employed to feed the PFAD blended with ethanol and H 2 SO 4 continuously into US-1. In the first step, the total electricity consumption was 1.15 kWh (excluding the startup phase). In the second step, a total of 1.05 kWh electric power was consumed in total by the three chemical pumps used to feed the first-step esterified oil, ethanol, and sulfuric acid continuously into US-2. In the third step, two digital chemical pumps were used to feed the second-step esterified oil and C 2 H 5 KO solution into the US probe reactor, and the total electricity consumption in the third step was 0.52 kWh. The total energy consumption during the continuous operation of all three steps was 2.72 kWh, producing approximately 14 L h −1 of purified biodiesel from 25 L h −1 of PFAD (note that this excludes the energy consumption of the pre-startup process and biodiesel purification). On average, 0.194 kWh.L −1 energy consumption was required for the US-assisted PFADE production.

Conclusions
A three-step continuous process for making ethyl esters from PFAD using ethanol in the presence of H 2 SO 4 for use as biodiesel has been proposed. The process uses two tubular reactors with US clamps and a probe-type US reactor. The actual experiments achieved ethyl ester purities of 66.68 wt.% in the first esterification step, 95.32 wt.% in the second esterification step, and 99.87 wt.% in the third transesterification step. The oil yields obtained under the recommended conditions were 132.91 wt.% first-step esterified oil, 131.16 wt.% second-step esterified oil, 61.85 wt.% crude biodiesel, and 56.16 wt.% purified biodiesel. The recommended conditions for first-step esterification with sonication were 46.1 vol.% ethanol, 1.4 vol.% sulfuric acid, a 400-m-long US reactor (approximately 10 s), and a PFAD flow rate of 25 L h −1 . In the second step, the recommended conditions were 57.0 vol.% ethanol, 2.1 vol.% sulfuric acid, a 400-m-long US reactor (approximately 10 s), and flow rate of the first-step esterified oil of 25 L h −1 . In the final transesterification step, the recommended conditions were 14.6 vol.% ethanol, 3.9 g L −1 KOH, approximately 19 s in the US reactor, and a second-step esterified oil flow rate of 25 L h −1 . The major problem in the process is glycerol-ethyl ester separation in the third step because the soap suspended in the crude biodiesel does not separate from the light phase of the biodiesel. As a result, a low yield of purified biodiesel was obtained when the ethanolysis reaction was carried out. Therefore, methanolysis could be used for transesterification to convert the partial glycerides to methyl esters because the separation of the glycerol phase from crude methyl esters is more rapid than that with ethyl esters; moreover, the yield from the methanolysis reaction was also higher than that of ethanolysis. Even though ethanol was achieved to produce biodiesel using an ultrasound clamp in a continuous three-step process, this alcohol led to a low yield of purified biodiesel. Therefore, ethanol is nowadays not suitable for industrial applications due to their limitations. However, methanol is made from fossil fuels such as natural gas and coal [44]. On the other hand, ethanol is a renewable biofuel because it is made from biomass material such as molasses, cassava, and sugar cane. In the future, ethanol will be the most suitable substitute for methanol when fossil fuels begin to disappear and the price of fossil fuels and by-products from the petroleum fuels become more expensive. Industries will search for sources of raw materials to use to produce biofuel. Ethanol will be one of the preferred choices for biodiesel production. To consider the eco-friendly perspective, ethanol is more environmentally-friendly and can be produced cheaper and with fewer carbon emissions than methanol [45]. For further research and development of the need for more environmentally-friendly production technology of biodiesel, future studies can also study eco-friendly heterogeneous catalysts to evaluate the reaction time, recovery, and recycling of the catalyst [46,47].

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.