Significant investments and studies have been conducted to provide adequate sources of alternative fuels in different countries due to the importance of the role of energy in the world, the non- renewability of fossil fuels and environmental issues arising from these fuels . Biofuels such as biodiesel are obtained from edible and non-edible plants, animal fats, waste oils, etc. Today, countries pay special attention to biodiesel because the source of this fuel is animal and vegetable fats. Germany has already passed laws that allow the use of 5% biodiesel in diesel fuel. According to the standard, biodiesel is a mixture of long chain mono-alkyl esters of fatty acids resulting from the reaction of an alcohol with renewable lipids . In most cases, the most important sources of non-renewable lipids are animal and vegetable oils. Triglycerides are the main component of these oils. Therefore, in addition to the ester, another valuable product called glycerin is obtained as a result of this reaction. The standard specifications that a fuel product resulting from the reaction of alcohol with triglycerides (transesterification reaction) should have in order to be recognized as biodiesel are measured by ASTM 6751 standard. Over 95% of world biodiesel production uses edible oils as raw materials. The used oils include edible oils such as sunflower oil , soybean , palm oil , and others. Biodiesel produced from edible vegetables oils is celled the first-generation biofuel. In addition, there are many concerns about using a potential food source as a biofuel. To solve this problem, the use of non-edible oils has also been studied. Among the non-edible oils for biodiesel production, Jatropha Curcas, and caoutchouc seed oils were studied. Biodiesel produced from non-edible vegetable oils is called second generation biofuel . Biodiesel, which is produced mostly from vegetable oils, is a mixture of mono-alkyl esters and is thought to replace diesel as a fuel.
Edible and non-edible vegetable oils can be used as raw material in biodiesel production. Biodiesel has been produced from a variety of vegetable oil sources such as soybean, sunflower, cottonseed, and so on [7-10]. However, the future of utilizing these edible oils is uncertain due to the increased global food demand. Moreover, the use of edible oils for biodiesel increases its production cost significantly. Biodiesel fuel is very similar to diesel fuel in terms of chemical properties, but unlike diesel fuel, it does not contain harmful substances such as sulfur, nitrogen, sulfate, and polycyclic aromatics. Figure 1 displays the molecular structure of biodiesel.
Figure 1. Molecular structure of biodiesel 
The use of biodiesel leads to a significant reduction in the number of unburnt hydrocarbons, carbon monoxide, and suspended particulate matter emitted from the exhaust. Nitrogen oxides from the biodiesel production process show a slight decrease or increase. Due to the presence of oxygen (about 11% wt) in the structure of biodiesel fuel, its combustion is complete, so the amount of carbon in suspended particles is decreased. Likewise, the absence of sulfur compounds in it is another reason for the compatibility of this fuel with the environment [11, 12]. Due to its excellent lubrication performance, biodiesel can effectively reduce the abrasion of engine components and increase engine service life. Biodiesel not only has a high cetane number and good combustion performance, but also has a good degradation that does damage human health . In addition, biodiesel has a high flash point that is suitable for transportation and storage . Biodiesel has good viscosity and high boiling point and cetane number. It is easy to use. It is biodegradable and non-toxic and lacks aromatic substances [15, 16]. According to these properties, it is a suitable alternative for petroleum fuel that has been considered by many countries. The reaction efficiency of biodiesel production depends on the reaction conditions. The amount of free fatty acid in the oil sample, water, reaction temperature, type, amount of catalyst, alcohol to oil ratio, stirring speed, and reaction time are important parameters for biodiesel production . In the following, some of the factors in the efficiency of biodiesel production will be examined.
Effect of free fatty acid and water
Free fatty acids and water in oily substances can significantly influence ester performance and glyceride conversion in the transesterification reaction with the base catalyst. All raw materials for biodiesel production such as oily raw materials, alcohol, and catalysts should be largely water-free. Prolonged exposure to atmospheric air of the base catalyst reduces the effect of the catalyst through the contact of the catalyst with moisture and carbon dioxide in the air. In addition, the raw materials used in catalytic transesterification with bases should have less than 0.5% wt free fatty acid (FFA) . The higher the acidity of the oil, the lower the conversion and efficiency of the transesterification. If FFA is present in large amounts in the initial oil, a base catalyst is needed to neutralize the FFA. The reaction between the base catalyst and the FFA leads to the consumption of catalyst and the formation of soap and waters, which is called saponification (Figure 2). The water in the reaction hydrolyzes the glycerides to form soap and glycerol (Figure 3). Furthermore, water can enhance ester hydrolysis to form FFA, which reduces ester performance (Figure 4). Soap formed during the saponification increases the viscosity or gel formation, which interferences with the transesterification reaction as well as glycerol separation .
Figure 2. Step-by-step transesterification reactions
Figure 3. Free fatty acid saponification in transesterification
Figure 4. Triglyceride saponification in transesterification
Figure 5. Methyl ester hydrolysis in transesterification
Low quality raw materials such as cooking oil are considered for biodiesel production because of their cheaper price.
However, these raw materials usually contain the large amounts of EFA and water due to prolonged exposure to heat, moisture, and food contamination. Therefore, direct use of base catalysts in the transesterification of these oils has a low efficiency that pre-treatment of these oils is necessary to remove FFA and water .
Effect of alcohol type and alcohol to oil ratio
Stoichiometrically, three moles of alcohol are required for esterifying one mole of triglyceride in the transesterification stage. Due to the reaction reversibility, excess alcohol is commonly used in the transesterification to promote the reaction toward the product. In general, 98% conversion is achievable in the ratio of 1:6 alcohol to oil for reactions performed with base catalyst, and increasing the alcohol used in the reaction does not increase the conversion efficiency . The optimal ratio of alcohol to oil can vary depending on the oil quality and the type of oil used. It has been reported that a maximum of 92% of the conversion was obtained using a ratio of 1:10 methanol to oil for the production of biodiesel from Karanja oil .
Leung and Guo  reported that canola oil was esterified 98% by transesterification using a 1:6 alcohol to oil ratio. In cooking oil esterification, a 1:7 ratio of alcohol to oil was required to obtain 94% esterification.
In Cynara Cardunculus L. oil transesterification, the optimal ethanol to oil ratio was 1:12, while increasing the ethanol to oil ratio to 1:15 reduced esterification . Rashid and Anwar  reported that further increase of alcohol used in transesterification of rapeseed oil beyond its optimal ratio (1:6) leads to the decrease in esterification. When too much alcohol is used in transesterification, the polarity of the reaction mixture increases, and thus it increases the solubility of glycerol again in the ester phase and causes an inverse reaction between the glycerol and the ester or glyceride. As a result, it reduces the esterification efficiency. Reactions containing acid catalysts use more alcohol than base catalysts. In some cases, an alcohol to oil ratio of 1:245 has been reported and up to 99% conversion was observed . The type of alcohol used in the transesterification can affect the reaction efficiency. Methanol is mostly used in transesterification due to its economic benefits . Disadvantages of using methanol are the dependence on oil resources and lower solubility of glyceride in methanol. It has been reported that at least 3 minutes is required for mixing methanol with triglyceride in soybean oil methanolysis . This time is about 2-3 minutes for methanolysis of soybean oil and sunflower oil [28, 29]. The insolubility of triglyceride in methanol has been reported due to mass transfer resistance or mass transfer limitation. To solve this problem, several methods have been used including the use of severe mechanical agitation, cosolvent , the use of supercritical conditions [31-33], and other techniques such as microwave [34, 35] and ultrasonic [36, 37]. Effort to improve triglyceride mass transfer has been investigated using the other alcohols such as ethanol, propanol, and butanol [38-41].
Biodiesel produced using ethanol is completely renewable. The main problem with metanalysis is the lower reactivity of ethoxide. If ethanol is used instead of methanol, the length of the carbon chain increases, which leads to a decrease in nucleophilicity and reactivity of the ethoxide compared to methoxide . Lower polarity of ethanol has advantages and disadvantages in the transesterification process. On the one hand, lower polarity of ethanol reduces the initial mass resistance to metanalysis, and thus it increases the initial reaction rate. On the other hand, it improves the interaction of ester and glycerol in the presence of reaction catalyst and causes the process of saponification. Therefore, saponification occurs faster in ethanolysis and the concentration of soap is higher than methanolysis in the biodiesel production stage .
Effect of reaction time and temperature
In general, the reaction conversion efficiency increases with increasing reaction time. The reaction begins with two types of raw materials: alcohol and oil. After beginning the reaction, diglyceride and monoglyceride are formed as reaction mediators and act as surfactants to increase the mass transfer of triglyceride to methanol. At this stage, the reaction mixture is one or two phases depending on the amount and types of alcohol used in the reaction and the reaction conditions. Glycerol is then formed as a by-product of the reaction and separated as an additional phase. If the reaction is catalyzed homogenously, the glycerol separation often leads to the catalyst dissolution in the glycerol phase, which reduces the catalyst concentration in the reaction mixture, and thus slows down the reaction rate. Reaction rate and rate constant are used in kinetic researches to evaluate the rate of reaction progress. These kinetic parameters are sometimes evaluated based on the shunt reaction mechanism in which three moles of triglyceride react with three moles of alcohol to produce three moles of ester and one mole of glycerol .
Although kinetic models can be simplified using the shunt reaction mechanism, it is unlikely that three methanol, molecules simultaneously attack the triglyceride molecule to form the three methyl ester molecules. The reaction of converting triglyceride into diglyceride is often a rate-limiting step that controls the overall reaction kinetics. Transesterification is highly dependent on the reaction temperature and more efficient at higher temperatures. Higher temperatures lead to more energy in the reacting molecules, which can lead to faster molecular vibration and movement. Therefore, reacting molecules have a better chance of colliding with each other. In the kinetically controlled region, the temperature dependence of the reaction rate is often used to calculate the reaction activation energy by plotting the constant logarithm of the velocity versus the reaction temperature  known as Arrhenius equation.
Where, K is the rate constant, A is a pre- exponential factor, is the activation energy, R is gas constant, and T is reaction temperature.
Activation energy is the minimum energy required to perform the reaction. If the reaction temperature increases, the rate constant also increases. Therefore, the reaction proceeds at a faster rate. Homogenous transesterification with the base catalyst can be performed at a temperature lower than the room temperature. Higher temperatures are commonly used, especially when an acid catalyst is used. However, the reaction temperature should be less than the boiling point of the corresponding reactant alcohol, which is 65 for methanol and 78 for ethanol. High temperature up to 220 is usually required to achieve the optimum efficiency of the reaction involving the acid catalyst.
If the reaction takes place at temperatures above the boiling point of the reactant alcohol, pressure should be applied to the reaction mixture to keep the reactant alcohol in the liquid phase.
Effect of catalyst type
For the biodiesel synthesis from edible and non-edible oils, in addition to enzymes, two types of homogeneous or heterogeneous acid and base catalysts are used. Homogeneous catalysts are difficult to recover and lead to waste generation. Today, the use of heterogeneous catalysts has become more common so that the catalyst can be easily recovered after biodiesel production. The most common method for biodiesel synthesis is through the transesterification reaction, in which a catalytic chemical reaction including vegetable oil and alcohol is used produce the alkyl esters of fatty acids and glycerol . Triglycerides, as the main component of vegetable oil, contain three long-chain fatty acids that are converted into the structure of esterified glycerol. When triglycerides react with alcohol (such as methanol), three fatty acid chains are removed from the glycerol chain and combined with methanol to produce fatty acid methyl esters (FAME). Glycerol is produced as a by-product. The type of catalyst is one of the most important parameters in the transesterification reaction. The choice of catalyst is an important step in determining the percentage of biodiesel production, and depends on the type and quality of raw materials.
Most commercial processes use base catalysts due to their high reaction efficiency, short reaction time and low reaction temperature . Homogeneous base catalysts such as NaOH and KOH are the most active species for this purpose under normal conditions . A base catalyst process can produce a biodiesel product with high purity and better efficiency in a short time (30-60 minutes) . However, it is very sensitive to the reactants purity. It is clear that humidity and high FFA content of vegetable oils are important parameters in catalytic esterification reactions . The FFA presence leads to the soap formation and reduces the efficiency of biodiesel production . On the other hand, homogeneous acid catalysts have been used for this purpose, but require longer reaction times compared to base transesterification processes. Acid catalysts are commonly used for oils with high FFA content. This method requires high amount of alcohol, high pressure (170-180 KPa), and expensive stainless-steel equipment . The use of an acid catalyst not only requires a long reaction time, but also produces acidic wastewater and corroded equipment .
In the production of industrial biodiesel, the two-stage method of acid and base catalyst is used due to the presence of fatty acids. In the first stage, an esterification reaction is performed using an acid catalyst and the amount of free fatty acid is reduced. In the second stage, the base catalyst is used in the transesterification to increase the efficiency and control the test conditions. Recent studies showed that a heterogeneous photocatalytic process may be performed to efficiently esterify fatty acids without the problems of an acid catalyst. The first research was conducted by Corro et al. in 2013 . They used ZnO/SiO2 photocatalyst to esterify the FFAs in Jatropha Curcas oil, which has a fatty acid content of over 18%.
Photocatalyst in biodiesel synthesis
Three important methods have been developed to replace vegetable oils as diesel fuel including pyrolysis, microemulsion, and transesterification. Transesterification, also called alcoholysis, is the reaction of a fat or oil with an alcohol to form esters and glycerol. A catalyst is often used to improve reaction rate and efficiency. Due to the reversibility of the reaction, excess alcohol is used to shift the balance towards the products. Primary and secondary aliphatic alcohols with 1-8 carbons are used for this purpose. These alcohols include methanol, ethanol, propanol, and butanol. Methanol and ethanol have been most used due to their low cost and chemical and physical benefits (short chain length) . The transesterification reaction is performed a corroding to the following equations.
The kinetic equations for the transesterification reactions are, respectively, shown below for all reaction materials.
Where, TG is triglyceride, DG is diglyceride, MG is monoglyceride, GL is Glycerol, and A is alcohol and B is biodiesel.
Heterogeneous catalysts are inexpensive efficient processes for biodiesel production by reduction free fatty acids (FFA) in oil. Sunlight is an inexpensive and environmentally friendly technology that makes it economical to use. The main mechanism to explain the performance of heterogeneous photocatalysts in biodiesel production was presented by Corro et al.  which is as follows:
1- When a heterogeneous photocatalyst is exposed to sunlight, electron pairs form a hole that transfer to the surface of the photocatalyst and interact with surrounding molecules.
2- Free electrons and holes are transferred to the surrounding molecules, and convert the molecules into free radicals.
3- The molecules around methanol and FFA are in the oil, which are irradiated during the heterogenous photocatalyst esterification with methanol and FFA. The photo- esterification process is displayed in the following Figure 6.
Figure 6. Photo- esterification mechanism
With UV- irradiation, the esterification process is performed in the following steps:
1- Transfer of methanol (CH3OH) and FFA (HOOC-R) to the photocatalyst surface. This step can be improved using optimal stirring conditions in the reenactor.
2- Adsorption of methanol and FFA in the photocatalyst surface
3- Thg reaction takes place in the adsorbed phase on the photocatalyst surface during the following steps:
a) The UV photon collides with a photocatalyst to create an electron-hole.
b) Due to the high oxidizing potential, the holes can react with the adsorbed materials on the catalyst surface to form hydrogen ions (H+) and CH3O radicals.
C) Hoo = C- R radical is then formed by the oxidation of HOOC- R absorbed on the catalyst surface by the generated .
4- The formed H+, CH3O, and HOO = C-R react together and then the intermediate and final product are formed.
5- Water and fatty acid methyl ester is desorbed during photo esterification.
6- Transfer of products from the catalyst surface to the liquid phase. This step can be improved by the optimal stirring conditions in the reactor.
In recent research, the effect of different parameters on the photocatalyst efficiency was investigated in the biodiesel production process.
So far, various studies have been conducted on acid and base catalysts to produce biodiesel, but a few studies have been reported on photocatalysts and waves in biodiesel production. We refer to these studies in the following.
The use of vegetable oils was introduced in the early 1980s as a competitive source of gasoline. The advantages of vegetable oils as biofuels include breadth of application, ease of access, renewability, high heat content, lower aromatic content, and biodegradability. The energy supply issues prompted special attention to this fuel, but its commercial production did not begin until the late 1990s.
Mengli et al. synthesized highly active as well as reusable La3+ and ZnO- TiO2 photocatalyst by sol-gel method. In this research, edible oil wastes were used in a two–stage method. In the first stage, under ultraviolet irradiation, photocatalytic esterification of La3+/ Zno-TiO2 ethanol with free fatty acids was studied. In the second step, NaOH was used as the base catalyst for the transesterification of triglycerides with ethanol. At 35 , the molar ratio of ethanol to oil was 1:12, the amount of catalyst was 4 wt%, the UV-irradiation time was 3 hours, and the FFA conversion percentage was 96.14% .
Young-Moo et al. (2010) investigated the esterification of free fatty acids in vegetable oils using WO3/ ZrO2 heterogeneous catalyst. In this research, catalyst characterization was performed by BET, XRD, and FTIR methods. 10-30 wt% of WO3 was studied on ZrO2 surface. 78, 93 and 89% efficiency were seen in the presence of 10, 20, and 30% of WO3. The effect of temperature was studied on the efficiency of reaction. In 2 hours of reaction time, the conversion efficiency increased from 93 to 98% with increasing temperature from 75 to 200 .
Mazzocchia et al. (2004) investigated the transesterification of triglyceride to fatty acid methyl esters in the presence of a heterogeneous catalyst using microwaves. They found that the microwave method significantly reduced reaction time .
Lertsathapornsuk et al. (2005) studied the biodiesel production from three types of coconut oil, rice husk, and palm oil. They used microwave power of 800 watts and achieved the highest conversion rate in the sodium hydroxide 1% as a catalyst and a molar ratio of alcohol to oil of 1:9, and in 30s. In 30 seconds, conversion rates of 100, 94, and 83% were obtained for coconut oil, rice husk, and palm .
Corro et al. (2017) reported the biodiesel production from frying oil waste by a two- step process. In the first step, free fatty acids in the oil were esterified with methanol using a photocatalytic process, a semiconductor composite of Cr/SiO2 and Solar radiation as a light source. In the second step, transesterification of triglycerides with methanol was performed by thermal activation using solar radiation as a light source and NaoH. It was shown that the biodiesel obtained from this process has all the international requirements for application as a fuel .
Oloruntoba (2016) studied the efficacy of ZnO/SiO2 photocatalyst in the production of biodiesel with the help of waste oil .
Jitputti et al. used several different ZrO2/ , ZrO2SnO2/ , ZnO, KNO3/ZrO, and KL/KNO3 catalysts for the transesterification reaction of palm kernel oil and coconut oil. The results showed that ZrO2/ had the highest performance compared to the other catalysts .
Chai et al. (2012) used Pt nanoparticles and g-C3N4 nanolayers to investigate the photocatalytic activity of TiO2 in the visible region. In this research, urea precursor was used for the synthesis of g-C3N4, and the thickness of the synthesized g-C3N4 plates was 10 nm. In this research, it was observed that if Pt-TiO2 and g-C3N4 are used in a ratio of 70 to 30, the maximum photocatalyst activity will be obtained for H2 production .
Caixia Feng et al. (2014) studied the Ag2CO3 effect on the amount of photocatalytic activity of TiO2 in the degradation process. In this research, Ag2CO3/P25 and Ag2CO3/TiO2 were synthesized as a photocatalyst. The photocatalytic activity of these two composites was studied using oxidation-reduction reaction of propylene under visible light. Ag2CO3 was considered as a reference. Systems I and II were used. System I used a glass reactor with a Xenon lamp and system II used a quartz reactor with a Xenon lamp. In system I, the light intensity was about 9 m.w.cm-2. In system II, the light intensity was 40 m.w.cm-2. In system I, the highest efficiency was related to the Ag2CO3/TiO2 composite, which removed about 90% of propylene within 4 hours of irradiation, while Ag2CO3/ P25 showed only 35% degradation. In system II, both synthesized composites of Ag2CO3/ P25 and Ag2CO3/ TiO2 reported about 90% removal .
Weilin Wang et al. (2017) used a one-step method to synthesize sulfur-doped TiO2 nanolayer photocatalyst on reduced graphene oxide (TiO2-S/rGO). The results showed that doping with sulfur decreased the TiO2 gap band. They found that the presence of rGO in the structure of this photocatalyst increases electron transfers and electron-hole separation, which results in an increase in photocatalyst efficiency .
Dong et al. (2017) synthesized a three-component heterogeneous g-C3N4 photocatalyst modified with nanolayer TiO2 and ZnO. To study the efficiency of the synthesized photocatalyst, they used the degradation of p-toluene sulfonic acid (p- TSA) in the visible region. For the synthesis of modified g-C3N4, HNO3 acid solution was used by thermal solvent method. Results showed that g-C3N4 modification increases the surface area from 8.175m2.g-1 to 21.83 m2.g-1. The energy gap of modified g-C3N4 decreased from 2.71 eV to 2.68eV, as compared with unmodified g- C3N4. By increasing the surface area and decreasing the energy gap, an increase in the degradation rate was observed .
Secula et al. (2008) investigated the response surface model and simulation of the degradation of dye effluent containing Reactive black 5 (RB5) azo dye using CCD method. The findings showed that the model was the second order, which was obtained during 16 experiments proposed by the software at the optimal conditions at the initial concentration of TiO2= 0.458 g. L1-, Fe3+ = 40.243 mg. L-1, and H2O2 = 825.3 mg. L-1. The maximum dye degradation was 99.3% .
In research aimed at optimizing glucose-sulfonate acid catalyst for palm oil esterification reaction, Lokman et al. used the RSM method and CCRD model. In this research, a one-step reaction was performed in a reflux system at 65 . RSM method takes into account the relationship among three variables that significantly affect FFA conversion. These variables include alcohol to oil molar ratio, loaded catalyst concentration, and reaction time. The results showed that the catalyst concentration parameter had the highest effect on the conversion rate and yield efficiency. The optimum conditions were reported as 94.5% FFA conversion and 92.4% biodiesel efficiency using RSM method .
Biodiesel has different properties used to measure fuel quality and capabilities. To determine the quality of produced biodiesel, the characteristics of biodiesel fuel have been checked based on ASTMD standards and the results were compared with the standard. Oil is an economic material for biodiesel production. The research was done using cheap sources of oil. Oxidation derivatives such as various acids are formed during the heating of oil. The formation of such compounds leads to an increase in the viscosity and acid number of oil. Due to this increase in acid number, the yield of biodiesel produced from waste oil is lower than that of fresh oil. The findings show that the biodiesel performance is reciprocally related to the acid number of the primary oil. However, it is possible to use the waste oil used for transesterification by adding an esterification step with photocatalysts. Photocatalysts are promising catalysts in the production of biodiesel fuel due to their efficiency in the light presence. Heterogeneous photocatalysts are separated from the reaction solution by filtration. Photocatalysts with magnetic properties also have the ability to separate the reaction with a magnet. These types of catalysts have shown high recovery capability. Reuses of photocatalysts reduce the cost of repeated use of acid and base catalysts for the biodiesel production. The results of the research have shown that the esterification step in the presence of a photocatalyst reduces free fatty acids and will increase the efficiency of biodiesel production.
No potential conflict of interest was reported by the authors.