Small-Scale Biodiesel Production Plants—An Overview

: Small-scale plants that produce biodiesel have many social, economic and environmental advantages. Indeed, small plants signiﬁcantly contribute to renewable energy production and rural development. Communities can use/reuse local raw materials and manage independently processes to obtain biofuels by essential, simple, ﬂexible and cheap tools for self-supply. The review and understanding of recent plants of small biodiesel production is essential to identify limitations and critical units for improvement of the current process. Biodiesel production consists of four main stages, that are pre-treatment of oils, reaction, separation of products and biodiesel puriﬁcation. Among lots of possibilities, waste cooking oils were chosen as cheap and green sources to produce biodiesel by base-catalyzed transesteriﬁcation in a batch reactor. In this paper an overview on small-scale production plants is presented with the aim to put in evidence process, materials, control systems, energy consumption and economic parameters useful for the project and design of such scale of plants. Final considerations related to the use of biodiesel such as renewable energy storage (RES) in small communities are discussed too. production including analytical methods.


Introduction
During last years, research is focusing on design and implementation of small plants to produce biodiesel from waste cooking oils (WCO), in order to achieve the double aim of making people independent in biofuel production and taking advantage of wastes destined to expensive disposals.
Biodiesel is a renewable, biodegradable and green energy source, which can be used as a fuel in the transport sector and for heating, without the need to make modifications to engines or boilers, in partial or total replacement of the diesel fuel. As a biofuel, it guarantees the reduction of polluting emissions, as it does not contain sulfur and aromatic compounds, and it contributes to the reduction of particulate matter emitted [1]. Biodiesel may be effectively used in pure form or blended with fossil diesel. European motor manufacturers undertook successful tests on blends with different diesel compositions (5-10%, 25-30%, 100% pure) [2]. Minor modifications (seals, piping) are required when 100% biodiesel is used, but no change is necessary in the distribution system, therefore avoiding expensive infrastructure changes. Biodiesel is also used as an efficient heating oil.
The biodiesel use decreases global warming impacts, reduces emissions, increases energy independence and has positive impact on agriculture. The use of 1 kg of biodiesel leads to the reduction of 3 kg of CO 2 [3]. Consequently, CO 2 emissions are significantly lower by 65-90% than with conventional diesel use, as well as particulate emissions and other harmful emissions. Moreover, biodiesel has a high lubricity and fast biodegradability.
European countries promoted and regulated the use of biodiesel by specific legislation and publication of strict guidelines in compliance with European Committee for Standardization (CEN). The European fuel standard EN 14214 was developed in co-operation In the last 10 years, the production of biodiesel in Europe reached more than 12.5 billion of liters per year [7] and the production of each country is reported in Figure 1.
Biodiesel is a mixture of alkyl esters usually produced by the following transesterification of triglycerides with alcohol ( Figure 2).
The reaction between oil and alcohol is facilitated by a catalyst. The most used inputs are oil, short chain alcohol such as methanol or ethanol, catalyst (alkaline [9], acid [10], or enzymatic [11,12]), water (optional) and electricity. The main by-product in biodiesel production is glycerol, that can be used pure in different fields or diluted in water and used as a dust suppressant fertilizer (when potassium hydroxide KOH is used as catalyst) or in anaerobic digesters. Production of biodiesel in small-scale plants is convenient for the high safety, ease of realization, low-cost single units and inexpensive process monitoring [13]. Biodiesel production entails the handling of flammable liquids (methanol, vegetable oil, biodiesel, glycerol) and hazardous chemicals (catalysts and neutralizers), as well as the Energies 2021, 14,1901 3 of 20 operation of electrical equipment. Consequently, operators are required to wear personal protective equipment. Particularly, they must take care when they handle methanol, add and mix hydroxide, and introduce methoxide into oil. Methanol must be protected from heat and ignition sources, stored in a bermed, diked or bunded, well-ventilated area, capable of containing at least 110% of the volume of the largest methanol storage tank in the contained area [14,15].  Biodiesel is a mixture of alkyl esters usually produced by the following transesterification of triglycerides with alcohol ( Figure 2). The reaction between oil and alcohol is facilitated by a catalyst. The most used inputs are oil, short chain alcohol such as methanol or ethanol, catalyst (alkaline [9], acid [10], or enzymatic [11,12]), water (optional) and electricity. The main by-product in biodiesel production is glycerol, that can be used pure in different fields or diluted in water and used as a dust suppressant fertilizer (when potassium hydroxide KOH is used as catalyst) or in anaerobic digesters. Production of biodiesel in small-scale plants is convenient for the high safety, ease of realization, low-cost single units and inexpensive process monitoring [13]. Biodiesel production entails the handling of flammable liquids (methanol, vegetable oil, biodiesel, glycerol) and hazardous chemicals (catalysts and neutralizers), as well as the operation of electrical equipment. Consequently, operators are required to wear personal protective equipment. Particularly, they must take care when they handle methanol, add Furthermore, methanol should be purchased only from reputable sources, as indicated by the Methanol Institute [16].
According to the European Biomass Industry Association (EBIA) [3], the current production costs of biodiesel from rapeseed oil are approximately 0.50 €/L (equivalent to 15 €/GJ assuming a lower heating value of 37 MJ/kg). These costs depend on the biomass prices and the size and type of production plant. The EBIA estimated short-term investment costs of about 150 €/kWh for a 400 MWh plant. These costs may decrease on the long term by about 30% for a larger-sized plant (thermal input capacity of 1000 MWh).
Energies 2021, 14, 1901 4 of 20 Production costs of rapeseed, as well as other seed oils, biodiesel are significantly affected by the yield and valorization of by-products, such as oil seed cake and glycerol.
You et al. [17] compared the costs of biodiesel production plants with different capacities. The plant capacity, price of feedstock oil, and yields of glycerol and biodiesel were the most significant variables affecting the economic viability of biodiesel process.
The most important economic cost factors are related to capital costs such as fixed capital cost (FCC) and total capital investment cost (TCC), as well as total manufacturing cost (TMC). For the comparison between different capacity plants, net annual profit after taxes (NNP), after-tax rate of return (ARR), and biodiesel break-even price (BBP) could be used.
Therefore, the cost of small-scale biodiesel production strongly depends on the producer's choice of oil source, process, equipment and local/global market.
In small-scale plants the total cost of production corresponds to 72.38% of revenues, whereas the capital cost was estimated as 16.90% of production costs. Additionally, in the case of small-scale plants, the cost of production includes the costs of management, maintenance, raw materials, personnel, waste disposal, and charges [18].
Biodiesel produced in small-scale plants is mostly addressed to small communities (e.g., families, companies, farms, villages). Moreover, possible users are institutes with canteens and restaurants producing high amount of waste oil. As an example, the small system BioPro TM 380 is recently used in USA [19]-in university campus, casinos, hotels, resorts, prisons, military bases, farmers-to produce biodiesel from cooking oil, with economic and environmental benefits.
Suffice it to know that use of biodiesel in modern engines in universities reduces the emissions of CO 2 and particulates in atmosphere by 88% and 55%, respectively. It is expected that in 2040 biodiesel from renewable sources will replace entirely petro-diesel in all military missions in USA. Small biodiesel production units were investigated also in developing rural areas, as in Mango'o village (Cameroon) [20], in order to meet the local energy needs, prevent depopulation and reduce dependence from fossil fuels. As well in Yemen [21], the implementation of small plants to produce biodiesel from WCO has been studied since 2015, when a conflict blocked the supply of diesel oil and essential public services. After a preliminary step in laboratory to find optimal production conditions, the feasibility of small and medium scale plants was studied starting from the economic situation in Yemen. Another important study was done in a Malaysian island, Langravi, in order to convert WCO to biodiesel as an alternative fuel for diesel vehicles [22].
Recently, the use of biodiesel as an energy storage system (ESS) as smart energy for small communities gained great interest among the scientific community [23].
It is evident that the recent research trend is to find alternative biofuels with economic/technical feasibility and environmental sustainability. The small-scale plants meet all these needs, because they can produce a standard-quality biodiesel with a proper investment also in economically underdeveloped regions by optimization of energy consumption and its efficient distribution.
In view of this, in the present paper we compared small plants described in literature and we analyzed the main biodiesel production units (pre-treatment, reaction, product separation and purification); then, we went through the criteria to select materials of reactors, tanks, pipes, seals and connections; finally, we reviewed cheap, rapid and reliable methods to follow the reaction during time and evaluate the performances in single process units with minimal equipment needed.
Finally, the analysis of energy consumption with some case-studies is presented. The integration of a small-scale system for biodiesel production from wastes in a smart-energy system is also discussed as a source of renewable energy storage (RES) for the need of small communities by means of a nanogrid energy optimization system.

Oils Used in Small-Scale Biodiesel Production
Oils used for the biodiesel production in a small-scale plant can be own-produced, purchased or recovered from wastes.

Own-Produced Oils
Many farmers are interested to process own-produced oilseeds. The farmer investment in their crops may be minimal and oilseeds are a relatively cheap oil source, but the economic feasibility of biodiesel production require the evaluation of such crops farm at full market prices. The storage of oilseeds, that are not processed immediately, is an additional cost to the total expense.
The preliminary extraction of oil from oilseeds-generally by a mechanical press-may improve the profitability of biodiesel production. During the extraction, oil is separated from the meal portion of the seed used as a livestock feed or for other applications. The expenses of oil extraction include investment costs of the pressing equipment, and operating costs for fuel, labor, and repairs. For this reason, small-scale biodiesel producers may not find this option attractive.

Purchased Oils
Virgin oil purchased from oilseed crushers or processors is the most expensive feedstock for biodiesel production, but it has the highest quality. Typically, the cost of oilseeds or oils, that are not own-produced, is more than 70% of total costs. Even though the virgin oil or seeds may be free, producers need to consider their time and transportation costs to determine the overall profitability [13].
WCO, also called used cooking/frying oil or waste vegetable oil, is edible oil used several times in a deep-fat fryer. Usually, it is relatively clean and easy to process. Instead, a more "dirty" biodiesel feedstock is the recovered grease in grease traps, that are installed by restaurants to prevent tube fouling and sewer blockages [28][29][30][31][32][33][34]. Fats from industrial food grease trap, scum from the grease trap at wastewater treatment station and sludge from sumps and septic tanks are other feedstocks for biodiesel production [33,35].
While oilseeds are rural resources, waste oils and greases originate in urban areas. Their purchasing cost is lower than virgin oil cost, but their processing cost is higher because of impurities.
Another option is to purchase filtered used oils from companies that collect waste oil from restaurants and other food processing companies. These pre-treated used oils are cheaper than virgin oils, but they have lower quality and limited quantity and geographic availability.
Finally, the cheapest option for small-scale producers is to collect waste oils themselves from local restaurants. In this case, oils can have very low quality, requiring pre-treatments to produce a good-quality feedstock. Moreover, oil supplies could be seasonal depending on restaurant activity.

Small-Plant Units
The biodiesel production consists of four main steps: production of oil, pre-treatment of oil, reaction and biodiesel purification, as reported in Figure 3. treatments to produce a good-quality feedstock. Moreover, oil supplies could be seasonal depending on restaurant activity.

Small-Plant Units
The biodiesel production consists of four main steps: production of oil, pre-treatment of oil, reaction and biodiesel purification, as reported in Figure 3.

Pre-Treatment of Waste Oils
Waste oil is usually dark colored and murky because of chemical changes-due to the high temperatures of cooking processes leading to polymerization, hydrolysis, oxidation-and food leftovers or other insoluble impurities after frying or food processing. The quality of waste oil depends on different properties, such as free fatty acids (FFAs) and water content, density, kinematic viscosity at 40 °C, acidity, saponification value, peroxide value and iodine number. FFAs and water in oil make happen saponification and hydrolysis, with consequent reduced selectivity of reaction to biodiesel. Since feedstock quality is very important and has to be suitable to obtain standard biodiesel accordingly to quality regulations of each country, waste oils need to be pre-treated before transesterification.
The first stage is the removal of food particles (chunkles) and insoluble impurities from waste oils, usually by filtration. A 100 micron sock filter [36], cotton cloth, adsorbent filter [37], consecutive filters with different mesh (1 mm, 0.5 mm and 10 µm) [38] and Whatman filter paper no. 41 [39] were used in small-scale biodiesel plants. Secondly, preheating is often performed to settle water out. In most cases, a temperature of 50-54 °C is considered enough to evaporate water [40,41]. In a lab procedure, Waickman [36] suggested to pre-heat waste oils to 70 °C. A higher temperature (100 °C) was reached in a heating pre-treatment of waste frying oils, followed by the removal of dissolved salts by water and, successively, by the adsorption on silica gel. Later, silica gel was separated by vacuum filtration and oil was de-colored at 80-110 °C by 5% activated clay. The moisture content is reduced to below 500 ppm by heating up the samples even above 110 °C [38].
Finally, oil is usually titrated to calculate the acidity and to calculate the additional amount of catalyst required to neutralize FFAs and to successfully complete the transesterification reaction. Indeed, when the FFA content is less than 1% no pre-treatment is necessary, otherwise it is possible to add extra alkali catalyst in order to neutralize the FFAs by forming soap.
Extra catalyst is usually added in a feedstock with less than 3-4% FFA, in order to convert the FFAs into soap, then removed. Nevertheless, when the FFAs level is higher than 5% other techniques are considered, including acid esterification, steam stripping, nanocatalytic technology, biological conversion, glycerolysis, supercritical esterification, and simultaneous in situ conversion [32,[42][43][44][45][46][47]. Among them, the most convenient approach is the acid catalysis followed by alkali catalysis. The acid pre-treatment effectively reduces the FFAs content, but acids can damage metal equipment. In this case, tanks need

Pre-Treatment of Waste Oils
Waste oil is usually dark colored and murky because of chemical changes-due to the high temperatures of cooking processes leading to polymerization, hydrolysis, oxidationand food leftovers or other insoluble impurities after frying or food processing. The quality of waste oil depends on different properties, such as free fatty acids (FFAs) and water content, density, kinematic viscosity at 40 • C, acidity, saponification value, peroxide value and iodine number. FFAs and water in oil make happen saponification and hydrolysis, with consequent reduced selectivity of reaction to biodiesel. Since feedstock quality is very important and has to be suitable to obtain standard biodiesel accordingly to quality regulations of each country, waste oils need to be pre-treated before transesterification.
The first stage is the removal of food particles (chunkles) and insoluble impurities from waste oils, usually by filtration. A 100 micron sock filter [36], cotton cloth, adsorbent filter [37], consecutive filters with different mesh (1 mm, 0.5 mm and 10 µm) [38] and Whatman filter paper no. 41 [39] were used in small-scale biodiesel plants. Secondly, pre-heating is often performed to settle water out. In most cases, a temperature of 50-54 • C is considered enough to evaporate water [40,41]. In a lab procedure, Waickman [36] suggested to pre-heat waste oils to 70 • C. A higher temperature (100 • C) was reached in a heating pre-treatment of waste frying oils, followed by the removal of dissolved salts by water and, successively, by the adsorption on silica gel. Later, silica gel was separated by vacuum filtration and oil was de-colored at 80-110 • C by 5% activated clay. The moisture content is reduced to below 500 ppm by heating up the samples even above 110 • C [38].
Finally, oil is usually titrated to calculate the acidity and to calculate the additional amount of catalyst required to neutralize FFAs and to successfully complete the transesterification reaction. Indeed, when the FFA content is less than 1% no pre-treatment is necessary, otherwise it is possible to add extra alkali catalyst in order to neutralize the FFAs by forming soap.
Extra catalyst is usually added in a feedstock with less than 3-4% FFA, in order to convert the FFAs into soap, then removed. Nevertheless, when the FFAs level is higher than 5% other techniques are considered, including acid esterification, steam stripping, nanocatalytic technology, biological conversion, glycerolysis, supercritical esterification, and simultaneous in situ conversion [32,[42][43][44][45][46][47]. Among them, the most convenient approach is the acid catalysis followed by alkali catalysis. The acid pre-treatment effectively reduces the FFAs content, but acids can damage metal equipment. In this case, tanks need to be coated with Teflon or plastic or super-alloy tanks. Moreover, extra methanol is required in acid pre-treatments. For this reason, when oil contain 3-15% of FFAs, another solution is the removal of FFAs from oil by vacuum distillation. Then, the oil can be converted into biodiesel and the FFAs can be used as animal feed or esterified separately [42].

Reactor
Different types of catalysts and alcohols can be used in transesterification, but we focus on alkali transesterification with methanol. Most biodiesel is produced by homogeneous base catalysis because the reaction occurs at low temperature and atmospheric pressure, leading to high conversion in a minimum time [48]. Moreover, capital and operating costs Energies 2021, 14, 1901 7 of 20 are low, and the resulting plant is easy to manage. Methanol is the most used alcohol in biodiesel production, because of its low cost and physical/chemical features. Batch transesterification is the preferred technology for small-scale biodiesel productions.
The biodiesel production requires 11% (w/w) of methanol during the transesterification, but most producers use 18-22% of methanol to ensure a more complete reaction, mostly when whole oilseeds or contaminated waste greases are used [13]. Although largescale biodiesel producers recycle the excess methanol, small-scale producers tend to find technically and economically unfeasible the methanol recovery.
It is clear that the reactor is the heart of the process and its design aims to reach high product yields taking into account the configuration, construction materials, kinetics of the reaction, heat and mass transfer, and all reaction parameters. A batch stirred reactor is the simplest configuration in small plants. Critical variables which significantly influence the final conversion are reaction temperature and time, amount of catalyst, molar ratio of alcohol to oil, use of co-solvent and mixing intensity [39,49]. The stoichiometry for the reaction is 3:1 alcohol to lipids, but this is usually increased to 6:1 for a higher product yield. The rate of reaction increases as the temperature increases up to a temperature of 60 • C, under the boiling point of methanol at atmospheric pressure. A low amount of catalyst could give a low yield, but a too high amount of catalyst may give saponification.
In a lab scale, many studies investigate the optimal operating conditions for the reaction. A volume of 500 mL of filtered waste sunflower oil were heated up to 55 • C and poured into a conical flask with methanol (alcohol/oil 1:4.5 v/v) and NaOH as catalyst (0.5%) [50]. The same volume reactor, equipped with a mechanical stirrer, was used from Encinar et al. [51] to transesterify waste frying oil with methanol at different operating conditions. The optimal conditions were methanol/oil molar ratio of 6:1, potassium hydroxide as catalyst at 1% concentration, and temperature of 65 • C. A better performance was observed in a two-stage process where glycerol was separated after each stage. A two-stage transesterification was investigated in laboratory scale by other researchers: the first stage was conducted at 55-60 • C, whereas the second stage was conducted without any heating [41]. Another configuration consists of two reactor tanks connected to pumps for recirculating and mixing of reactants, and equipped with a mechanical mixer with impellers and static mixers [40]. Homogeneous alkaline transesterification was also performed at 60 • C using methanol (maximum yield at alcohol/oil molar ratio of 12:1) and NaOH as catalyst in a modified 1 L dissolution apparatus with automatic temperature control bath and paddle stirring rate [21].
In a pilot scale, Olaoye et al. [52] designed a 12 L reactor provided of a helical-ribbonlike mixer. The tank was cylindrical at the top and conical at the bottom for an easier product discharge. Transesterification of pre-treated waste cooking oils was carried out at 6:1 molar ratio of alcohol to oil, temperature of 62 • C, and 421 rpm stirrer speed.
Two 15 L reactors were designed and constructed to transesterify waste frying oil with methanol at 60 • C. A steel mixer was used for mixing catalyst and the plant was integrated in a closed loop integrated process [37].
A 20 L unit ( Figure 4) consisting of two concentric cylinders with a shaft connected to an electric motor promoting the mixing of reaction mixture was also developed [53,54].
Transesterification of pre-heated vegetable oils and waste cooking oils-containing low amounts of FFAs-was catalyzed by sodium hydroxide (1.4% of oil weight), with methanol in excess (molar ratio of 6:1), stirred at 200 rpm for 3 h at a temperature of 60 • C. Glycerol was separated by gravity in situ after settling for 24 h and removed by a valve at the bottom.
A higher-capacity reactor was designed by Abbaszaadeh et al. [55]. The 70 L batch stirred was equipped with mechanical (by a pitched blade turbine down flow with two inclined blades at 45 • ) and hydraulic mixing systems ( Figure 5).  Transesterification of pre-heated vegetable oils and waste cooking oils-containing low amounts of FFAs-was catalyzed by sodium hydroxide (1.4% of oil weight), with methanol in excess (molar ratio of 6:1), stirred at 200 rpm for 3 h at a temperature of 60 °C. Glycerol was separated by gravity in situ after settling for 24 h and removed by a valve at the bottom.
A higher-capacity reactor was designed by Abbaszaadeh et al. [55]. The 70 L batch stirred was equipped with mechanical (by a pitched blade turbine down flow with two inclined blades at 45°) and hydraulic mixing systems ( Figure 5). Waste oils from the dining facilities on Auburn's main campus were processed in a 208 L batch plant with methanol and NaOH at 57 °C [56].
Cooking oil produced in campus dining facilities was recycled also at the University of Cincinnati in a 250 L pilot reactor, equipped with a hot water heater and a circulation system. About 54-64 L/week of biodiesel can be produced with NaOH at 60 °C and volume ratio oil to methanol of 5:1 [57].
A 316 L reactor provided of a mechanical stirrer and reflux condenser to avoid alcohol evaporation was used to process about 10 L/h of frying oil for local power generation in Morocco [58].
The production of biodiesel from waste vegetable oil was also scaled up from laboratory scale to small and medium scale (500-600 and 2000 L/day of biodiesel, respectively), and the production line configuration was optimized in both cases [21].  Transesterification of pre-heated vegetable oils and waste cooking oils-containing low amounts of FFAs-was catalyzed by sodium hydroxide (1.4% of oil weight), with methanol in excess (molar ratio of 6:1), stirred at 200 rpm for 3 h at a temperature of 60 °C. Glycerol was separated by gravity in situ after settling for 24 h and removed by a valve at the bottom.
A higher-capacity reactor was designed by Abbaszaadeh et al. [55]. The 70 L batch stirred was equipped with mechanical (by a pitched blade turbine down flow with two inclined blades at 45°) and hydraulic mixing systems ( Figure 5). Waste oils from the dining facilities on Auburn's main campus were processed in a 208 L batch plant with methanol and NaOH at 57 °C [56].
Cooking oil produced in campus dining facilities was recycled also at the University of Cincinnati in a 250 L pilot reactor, equipped with a hot water heater and a circulation system. About 54-64 L/week of biodiesel can be produced with NaOH at 60 °C and volume ratio oil to methanol of 5:1 [57].
A 316 L reactor provided of a mechanical stirrer and reflux condenser to avoid alcohol evaporation was used to process about 10 L/h of frying oil for local power generation in Morocco [58].
The production of biodiesel from waste vegetable oil was also scaled up from laboratory scale to small and medium scale (500-600 and 2000 L/day of biodiesel, respectively), and the production line configuration was optimized in both cases [21]. Waste oils from the dining facilities on Auburn's main campus were processed in a 208 L batch plant with methanol and NaOH at 57 • C [56].
Cooking oil produced in campus dining facilities was recycled also at the University of Cincinnati in a 250 L pilot reactor, equipped with a hot water heater and a circulation system. About 54-64 L/week of biodiesel can be produced with NaOH at 60 • C and volume ratio oil to methanol of 5:1 [57].
A 316 L reactor provided of a mechanical stirrer and reflux condenser to avoid alcohol evaporation was used to process about 10 L/h of frying oil for local power generation in Morocco [58].
The production of biodiesel from waste vegetable oil was also scaled up from laboratory scale to small and medium scale (500-600 and 2000 L/day of biodiesel, respectively), and the production line configuration was optimized in both cases [21].
Other small-scale reactors were designed for vegetable oils and can be used in a batch biodiesel production from pre-treated waste cooking oils.
Rahmat et al. [59] designed a reactor producing 500 mL of biodiesel per batch and consisting of a conical glass column, circulation pump and static mixer (considered more effective than the agitator blades), sprayer, electrical heating, thermostat, hand thermometer, distributing pipeline, regulated DC power supply. Glycerol was gradually separated in situ as soon as it was produced during the reaction and removed by a valve at the bottom of the reactor. This configuration was found to be more effective than traditional one, increasing Energies 2021, 14,1901 9 of 20 the biodiesel production and decreasing the use of methanol in excess (molar ratio 5:1) and the processing time.
A pilot reactor-producing 10 L of biodiesel at full capacity-was designed and realized to convert fish oil with potassium hydroxide as catalyst at 30 and 60 • C [60].
A 50 L reactor was designed from Shahare et al. [61]. It consisted of a vessel and a jet mixing mechanism.
Ramesh et al. [62] proposed a pilot plant to produce 250 L/day of biodiesel from Jatropha oil.
A mobile unit-producing 100 L of biodiesel per hour-was designed and built in Brazil [63]. It consists of storage tanks for the reagents and products, a power generator, two 180 L-capacity reactors equipped with mechanical stirrers and heating coils, two settler tanks for the phase separation and purification units.
A batch reactor producing 180 L of biodiesel per batch and a maximum of 4 batches per day was investigated with the aim to cover the energy needs of the population in a small village in Cameroon [20].
Finally, vegetable oil and low-cost animal fats with high free fatty acid were used for biodiesel production in a pilot plant with the capacity of about 100 kg per day, scaling up from laboratory scale to pilot scale. After decreasing the FFA level by one or two step acid catalyzed pretreatment, alkaline catalyzed transesterification was carried out with methanol and potassium hydroxide at 60 • C and 300 rpm as stirring rate [64].

Separation of Biodiesel from By-Products
The first step of product recovery in most biodiesel plants is the separation of esters and glycerol, based on significantly different densities between the two phases. This difference is enough to use inexpensive gravity separation techniques. Decanter systems are usually used in small-scale batch production and their design depend on residence time and product mixture flow rate. Generally, they have a range of length/diameter ratio of 5-10 [43]. The product is usually allowed to settle down into a separating funnel for a certain time [21,39,50,57], depending on several factors such as pH, size of glycerol droplets in the reaction mixture, etc. [43]. Two distinct liquid phases are separated: crude biodiesel at the top and glycerol at the bottom ( Figure 6). biodiesel production from pre-treated waste cooking oils.
Rahmat et al. [59] designed a reactor producing 500 mL of biodiesel per batch and consisting of a conical glass column, circulation pump and static mixer (considered more effective than the agitator blades), sprayer, electrical heating, thermostat, hand thermometer, distributing pipeline, regulated DC power supply. Glycerol was gradually separated in situ as soon as it was produced during the reaction and removed by a valve at the bottom of the reactor. This configuration was found to be more effective than traditional one, increasing the biodiesel production and decreasing the use of methanol in excess (molar ratio 5:1) and the processing time.
A pilot reactor-producing 10 L of biodiesel at full capacity-was designed and realized to convert fish oil with potassium hydroxide as catalyst at 30 and 60 °C [60].
A 50 L reactor was designed from Shahare et al. [61]. It consisted of a vessel and a jet mixing mechanism.
Ramesh et al. [62] proposed a pilot plant to produce 250 L/day of biodiesel from Jatropha oil.
A mobile unit-producing 100 L of biodiesel per hour-was designed and built in Brazil [63]. It consists of storage tanks for the reagents and products, a power generator, two 180 L-capacity reactors equipped with mechanical stirrers and heating coils, two settler tanks for the phase separation and purification units.
A batch reactor producing 180 L of biodiesel per batch and a maximum of 4 batches per day was investigated with the aim to cover the energy needs of the population in a small village in Cameroon [20].
Finally, vegetable oil and low-cost animal fats with high free fatty acid were used for biodiesel production in a pilot plant with the capacity of about 100 kg per day, scaling up from laboratory scale to pilot scale. After decreasing the FFA level by one or two step acid catalyzed pretreatment, alkaline catalyzed transesterification was carried out with methanol and potassium hydroxide at 60 °C and 300 rpm as stirring rate [64].

Separation of Biodiesel from By-Products
The first step of product recovery in most biodiesel plants is the separation of esters and glycerol, based on significantly different densities between the two phases. This difference is enough to use inexpensive gravity separation techniques. Decanter systems are usually used in small-scale batch production and their design depend on residence time and product mixture flow rate. Generally, they have a range of length/diameter ratio of 5-10 [43]. The product is usually allowed to settle down into a separating funnel for a certain time [21,39,50,57], depending on several factors such as pH, size of glycerol droplets in the reaction mixture, etc. [43]. Two distinct liquid phases are separated: crude biodiesel at the top and glycerol at the bottom ( Figure 6).  Other methods used to separate glycerol in small-scale plants are electrostatic coalescence [55], centrifugation [52] and hydrocyclone-based system [43].

Purification
Purification of crude biodiesel is necessary to remove residual excess alcohol, excess catalysts, soap and glycerol and leads to a clear product (Figure 7).

Purification
Purification of crude biodiesel is necessary to remove residual excess alcohol, excess catalysts, soap and glycerol and leads to a clear product (Figure 7). Three main approaches are adopted for purifying biodiesel obtained from waste oils: water washing, dry washing, and membrane extraction (usually in continuous processes [65]). Usually, hot distilled water-approximately 30% of the biodiesel volume [50] or the same volume [21]-is added to biodiesel [39]. Slightly acidic water removes calcium and magnesium and neutralizes the residual base catalyst [43]. The catalyst can be extracted by successive rinses with distilled water [39,51,57].
After simultaneous transesterification and glycerol removal [59], biodiesel can be mixed with water at 60 °C and stirred for five, before settling for two hours.
Washing is preferably gentle in order to avoid emulsions [41]. Other researchers recommend aeration to wash biodiesel, minimizing the risk of emulsification [37,40].
Although the separation between esters and water is typically rapid and complete, drying is required to remove water and obtain a standard biodiesel. Vacuum driers, molecular sieves, silica gel, etc., can be used to this aim in a batch process [43]. Oven drying at 60 °C for one hour [59], heating at 70 °C [39], adsorption on sodium sulfate [39,62] or on CaCl2 followed by filtration [51] are other possibilities.
Wet washing of biodiesel has some disadvantages, such as high-water consumption, sewage output, emulsion formation, and drying of final product. Alternatively, dry washing could be a good option. AmberliteTM BD10 [56], ion exchange resins and magnesium silicate powder as filter aid [66] are used to this aim, whereas methanol can be recovered by vacuum distillation [55] or heating at 80 °C [51,56].
In a mobile unit producing 100 L of biodiesel per hour, the excess alcohol in ester and glycerol phase is removed, separately, by evaporation and condensed to be recycled as reagent. Then, the ester phase is transferred to a water washing column to remove glycerol and to a distillation column to remove water and residual alcohol [63].
Traces of glycerol in the biodiesel can be removed by rapid gelification in a cold room (≤4 °C) [57]. The glycerol phase can be acidified with sulfuric acid, to neutralize any residual catalyst and to decompose the soaps formed during the reaction [51].

Material Selection and Chemical Compatibility
Biodiesel production comprises the reactant storage, their processing in the plant and the product storage. The storage of reactants and products entails their contact with tanks, while the reaction mixture is in contact with reactors and all plant equipment, such as mixers, pumps, pipes, seals, gaskets, valves and heaters.
The material selection is essential to guarantee process safety, to avoid losses of corrosive/toxic substances and to limit plant damages during time. Nevertheless, the use of the best materials in all production steps is very expensive. The study of the chemical compatibility can help to select cheaper materials where possible. Three main approaches are adopted for purifying biodiesel obtained from waste oils: water washing, dry washing, and membrane extraction (usually in continuous processes [65]). Usually, hot distilled water-approximately 30% of the biodiesel volume [50] or the same volume [21]-is added to biodiesel [39]. Slightly acidic water removes calcium and magnesium and neutralizes the residual base catalyst [43]. The catalyst can be extracted by successive rinses with distilled water [39,51,57].
After simultaneous transesterification and glycerol removal [59], biodiesel can be mixed with water at 60 • C and stirred for five, before settling for two hours.
Washing is preferably gentle in order to avoid emulsions [41]. Other researchers recommend aeration to wash biodiesel, minimizing the risk of emulsification [37,40].
Although the separation between esters and water is typically rapid and complete, drying is required to remove water and obtain a standard biodiesel. Vacuum driers, molecular sieves, silica gel, etc., can be used to this aim in a batch process [43]. Oven drying at 60 • C for one hour [59], heating at 70 • C [39], adsorption on sodium sulfate [39,62] or on CaCl 2 followed by filtration [51] are other possibilities.
Wet washing of biodiesel has some disadvantages, such as high-water consumption, sewage output, emulsion formation, and drying of final product. Alternatively, dry washing could be a good option. AmberliteTM BD10 [56], ion exchange resins and magnesium silicate powder as filter aid [66] are used to this aim, whereas methanol can be recovered by vacuum distillation [55] or heating at 80 • C [51,56].
In a mobile unit producing 100 L of biodiesel per hour, the excess alcohol in ester and glycerol phase is removed, separately, by evaporation and condensed to be recycled as reagent. Then, the ester phase is transferred to a water washing column to remove glycerol and to a distillation column to remove water and residual alcohol [63].
Traces of glycerol in the biodiesel can be removed by rapid gelification in a cold room (≤4 • C) [57]. The glycerol phase can be acidified with sulfuric acid, to neutralize any residual catalyst and to decompose the soaps formed during the reaction [51].

Material Selection and Chemical Compatibility
Biodiesel production comprises the reactant storage, their processing in the plant and the product storage. The storage of reactants and products entails their contact with tanks, while the reaction mixture is in contact with reactors and all plant equipment, such as mixers, pumps, pipes, seals, gaskets, valves and heaters.
The material selection is essential to guarantee process safety, to avoid losses of corrosive/toxic substances and to limit plant damages during time. Nevertheless, the use of the best materials in all production steps is very expensive. The study of the chemical compatibility can help to select cheaper materials where possible.
Since in small plants biodiesel is usually produced by basic transesterification with methanol, it is important to study the chemical compatibility of all reagents (oil, methanol, catalyst) and products (biodiesel, glycerol) involved in all production steps.
The interaction between biodiesel and materials of equipment and components was investigated in literature. The compatibility of biodiesel with metallic (aluminum, steel, copper, stainless steel, bronze, miscellaneous) and polymeric (high density polyethylene, nitrile rubber, miscellaneous) materials was reviewed in [67]. The recommended materials for equipment, pipelines, facilities, tanks, containers and other elements that are in direct contact with biodiesel are: -Metals: aluminum, steel, stainless steel; -Elastomers: Viton, fluorosilicone, HiFluor, fluorocarbon, Chemraz, Teflon; -Polymers: polypropylene, polyethylene, high-density polyethylene, fluorinated materials, nylon.
Copper and zinc-usually used in check valves of heat exchangers, pressure relief valves and other process systems-are not chemically compatible with biodiesel because they cause greenish discoloration and corrosion of components. Moreover, these metals in contact with biodiesel accelerate its oxidation and degradation with consequent formation of high sediment that may clog filters [69].
Other metals-lead, tin, bronze, brass-facilitate biodiesel oxidation and sediment formation [68]. Aluminum is good to be used in storage tanks, but not in reactors because it is degraded by hydroxide-based catalysts. Indeed, stainless steel is the most chemically resistant material for reactors.
In addition, corrosion can be due to impurities in biodiesel such as water, glycerol, free fatty acids and residual catalyst. Therefore, quality control reduces risks. Among polymeric materials, Teflon, Viton, nylon and fluorinated plastics have good compatibility [70].
Chemical compatibility of pipes, seals and connections need to be tested too. Resistance of chemically resistant fluoroelastomer, Buna-nitrile, FKM ( ® Viton) and Expanded Polytetrafluoroethylene (PTFE) was investigated by submerging each material in methanol for 24 h. Among them, PTFE showed the best performance [69].

Analysis Methods in Small Plants
Long and expensive standard analysis are a serious limitation in small-scale biodiesel plants, because they considerably affect the production cost. Simple and low-cost methods have been proposed in literature as effective to obtain good-quality biodiesel meeting international standards for use.

Analysis in Pre-Treatment
After WCO filtration and water removal, it is important the evaluation of free fatty acid content in oil, in order to decide upon the following steps (reaction or further pretreatments). The most simple method is classic titration where oil is dissolved in a isopropanol/water (90/10 v/v.) solution and titred using 0.1 N isopropanol/KOH solution and phenolphthalein as indicator [71].

Analysis during Reaction and before Product Separation
Chromatography-based analysis (GC [72,73], HPLC [11]) are traditional methods to follow the reaction progress and to verify when it is complete. Nevertheless, these methods require long analysis and expensive equipment and columns, which is why it is not possible to follow continuously the reaction.
FTIR (Fourier transform infrared) and NIR (near infrared) are reliable spectroscopic techniques. The FTIR analysis was used to evaluate the biodiesel quality by the methyl ester content measurement [74], but also to on-line monitor the functional group changes during the transesterification [75]. The NIR analysis was applied to determine the content of water and methanol in biodiesel samples [76] and for the in-line monitoring of the reaction [77].
Alternative methods have been recently proposed in literature. They are very easy to perform and based on spectrophotometry [78] and ultrasounds [79]. However, the most promising and cheapest solutions in small plants are continuous measures of refractive index [80,81] or viscosity [82]. Tubino et al. [80] used a digital refractometer to on-line monitor the biodiesel synthesis by methanolysis with KOCH 3 . This method measures the refractive index and correlate it with triolein concentration. Instead Zabala et al. [81] consider the off-line measure of refractive index more reliable and stable than on-line measure. Ellis et al. [82] used an acoustic wave solid state viscometer to monitor the reaction until the end-point as verified by gas-chromatography.
Reaction completeness could be verified by the 27/3 (sometimes called 3/27) test [83]. This test is simple, effective and cheap to pick up traces of triglycerides in biodiesel, by dissolving 3 mL of biodiesel in 27 mL of methanol [71,84]. Since pure biodiesel is completely soluble in methanol, turbidity is due to unreacted glycerides. Therefore, the 27/3 test is qualitative but not quantitative. Moreover, it is not sensitive to glycerol, because it is soluble in methanol. It is convenient to carry out this test on a centrifuged sample before the product separation, in order to continue the reaction if is not complete.

Analysis before Biodiesel Washing
After the product separation and before the possible washing by water, it is convenient to carry out the blue bromophenol soap test, in order to detect soap content and prevent emulsions.

Analysis during Biodiesel Water Washing
Crude biodiesel needs to be washed one or more times to remove impurities. Biodiesel is effectively washed when washing water is clear and with the same pH as before the washing step. A further analysis is the shake-em up test, based on vigorous shaking of washed biodiesel and water: if water and biodiesel separate quickly and the water is clear, soap content in biodiesel is very low.

Analysis on Biodiesel
Pure biodiesel should be clear, without water, soap, particles or microbial growth. The pHLip Test is commercially available to determine biodiesel quality in terms of oxidation and soap, glycerol, catalyst and acid content. This test is cited as reliable in lab manual and web sites about biodiesel [85]. Moreover, cloud point test and gel point test are essential to determine biodiesel quality and prevent filter blockage. Cloud point is temperature at which biodiesel becomes cloudy, while gel point is temperature at which biodiesel starts to gel. If the outdoor temperature is lower than cloud and gel point, it is necessary to mix biodiesel with petro-diesel.

Energy Consumption
The production of biodiesel and glycerol from oleaginous crops and residual oils permits to use their potential energy content.
With reference to the production of biodiesel from waste oil in a small-scale plant, the flow sheet including analytical systems and energy inputs is reported in Figure 8.
The energy inputs are referred to the energy required from the pumps (P), the heating and stirring systems (E).
Recycle of methanol guarantees higher process sustainability. During biodiesel production it is possible to estimate energy requirements and to compare it with the heating value of produced biodiesel. The net balance is favorable and biodiesel can be considered as renewable energy storage (RES) system. By this way energy supply could be planned and optimized, by the control and optimization of energy supply and storage.
Consequently, the production process could be integrated in a scheme of rationalization of consumption and use of the accumulated energy in an aggregate management, with continuous automated operations, for the integration of storage systems into nanogrid which can operate both in grid-connected and in isolated systems. The energy inputs are referred to the energy required from the pumps (P), the heating and stirring systems (E).
Recycle of methanol guarantees higher process sustainability. During biodiesel production it is possible to estimate energy requirements and to compare it with the heating value of produced biodiesel. The net balance is favorable and biodiesel can be considered as renewable energy storage (RES) system. By this way energy supply could be planned and optimized, by the control and optimization of energy supply and storage.
Consequently, the production process could be integrated in a scheme of rationalization of consumption and use of the accumulated energy in an aggregate management, with continuous automated operations, for the integration of storage systems into nanogrid which can operate both in grid-connected and in isolated systems.

Energy Storage
Energy storage is related to the heating value of biodiesel, as a liquid biofuel, which can be stored and used when and where necessary.
In Directives 2009/28/EC and 2009/30/EC of the European Parliament and of the Council, sustainable biofuels are defined as biofuels that guarantee savings in greenhouse gas emissions generated by the entire production chain, increasing in the time, compared to fossil fuels.
In order to encourage the development of biofuels produced from waste, residues, cellulosic materials of non-food and lignocellulosic materials, Directive 28 and the ILUC Directive account the relative energy contribution as twice the other sustainable biofuels. For this reason, these biofuels are defined as "double-counting biofuels" [86].
The evaluation of the energy aspects of the production process was assessed to estimate the potential of biodiesel as an unconventional energy storage system, with reference only to the quantity of sustainable double-counting biodiesel [18] and to lower heating values.
The data of several industrial biodiesel plants in Italy were analyzed. The energy consumption per unit of product was estimated with reference to the production data

Energy Storage
Energy storage is related to the heating value of biodiesel, as a liquid biofuel, which can be stored and used when and where necessary.
In Directives 2009/28/EC and 2009/30/EC of the European Parliament and of the Council, sustainable biofuels are defined as biofuels that guarantee savings in greenhouse gas emissions generated by the entire production chain, increasing in the time, compared to fossil fuels.
In order to encourage the development of biofuels produced from waste, residues, cellulosic materials of non-food and lignocellulosic materials, Directive 28 and the ILUC Directive account the relative energy contribution as twice the other sustainable biofuels. For this reason, these biofuels are defined as "double-counting biofuels" [86].
The evaluation of the energy aspects of the production process was assessed to estimate the potential of biodiesel as an unconventional energy storage system, with reference only to the quantity of sustainable double-counting biodiesel [18] and to lower heating values.
The data of several industrial biodiesel plants in Italy were analyzed. The energy consumption per unit of product was estimated with reference to the production data from companies producing over than 5000 t/year of biodiesel from waste oils in small-scale plants [87].
The power available on the biodiesel market based on data of sustainable doublecounting biodiesel consumed in Italy in 2017 is reported in Table 2 for different feedstocks. It is interesting to estimate the energy consumption per unit of product for industrial plants operating in Italy for the production of biodiesel from waste oils, with reference to small-scale plants, about 10-15 t/day.
Data are referred to a production of about 6400 t of biodiesel with a heating value of 37-42 MJ/kg from waste oils (44%) and waste animals fats (56%), consuming 2900 MWh/y of electrical energy and 8300 MWh/y of thermal energy. The biodiesel production requires 4.67 MJ/kg of thermal specific energy and 1.67 MJ/kg of electrical specific energy, for total 6.30 MJ/kg (15-17%). It is evident that the energy requirement for the biodiesel production is lower than energy provided by biodiesel combustion. Therefore, the energy balance of the fuel production chain is positive. The energy and power available represent the energy storage potentiality of biodiesel, close to 80-85%.

Energy Indicators for Small-Scale Plants
The main energy indicators for small-scale biodiesel production from waste oils are energy use efficiency, energy productivity and net energy [88,89]. Energy indicators require the evaluation of process variables such as input energy, output energy and yield. The input energy is calculated by adding the energy contributions related to human work, reagents, catalyst as well as the consumption of electricity and machinery. Instead, the output energy consists of the energy contributions of products and catalyst. The yield of the reaction is defined as the ratio between mass of biodiesel produced and mass of oil.
In the work of Ayoola et al. [88], the reaction from groundnut oil was carried out by magnetic stirring and the input and output energies included the oil pre-treatment and the biodiesel purification by washing. In the work of Yari et al. [89], the reaction from fish oil was assisted by microwaves and the pre-treatment and washing process were not included. The input and output energies and the energy indicators in the two works were compared in Table 3. Table 3. Comparison between the input and output energies and the energy indicators.

Ayoola et al. [88]
Yari et al. [ Since the yields are comparable, the differences observed in the values of the energy indicators can be attributed to different input and output values. Among inputs, electricity consumption seems to have particular importance (52.37 MJ/L vs. 0.629 MJ/L) which depends on the type of process adopted as well as on the energies required for the oil pre-treatment and the biodiesel washing. Additionally, the energy content of the waste oil used is different in the two works (31.25 MJ/L for groundnut oil and 41.929 MJ /L fish oil).
A specific study on the energy consumption of oil pre-treatment is reported in Palanisamy et al. [90]. This work proposed a 20 L-module with the function of removing impurities by filtration and traces of water by a vacuum pump and a condenser. The estimated consumption was 157 Wh/L vs 386 Wh/L required by traditional heating. The water content was reduced to 500 ppm.

Economic Analysis
An economic evaluation is required to verify that small-scale biodiesel production performed by the final consumer is competitive with petro-diesel production ( Table 4). The biodiesel production cost is lower than the selling price in an economically feasible process. Table 4. Production costs of biodiesel from waste vegetable oil in the individual items, per unit of available energy [18].

Items Unit Values
Specific energy available on an annual basis kWh/kg per anno 10. Inputs in biodiesel production are the energy worker or human labor expense, oils, alcohol, catalyst, electricity, machine, rant land, service and maintenance, contributing to the total production cost [89,91]. It strongly depends on the type and cost of feedstock, conversion technology and production scale. A reasonable biodiesel production cost of 0.6-0.7 $/L needs a production cost of 100,000 ton/year [21]. The capital investment cost is the capital necessary for the process equipment design, building and installation, while the biodiesel production cost includes all plant operating costs, general expenses and the recovering of the capital investment [92]. Labor time and electrical energy input are important factors to consider. Labor time include the time spent to mix the catalyst with alcohol, to transfer the catalyst and oil in the reaction vessel, to wash the product and to maintain the equipment. The electrical costs include the power consumed by the heating elements and by the electric motor. The small-scale biodiesel production can be started with relatively little capital investment. Nevertheless, the choice of feedstock is very important since the use of vegetable oils contributes to the 77% of the biodiesel production cost [92]. Waste cooking oils as feedstock and salvaged materials for plant units greatly decrease costs of production [93]. Total production costs from waste oils reported in literature are 0.6541 $/L, 1.201 $/L [91] and other values in Table 5.
Biodiesel, glycerol and residual alcohol, oil and catalyst are usually considered outputs in biodiesel production [89].

Conclusions
Biodiesel is industrially produced by alkaline transesterification, obtained by reacting the oil-based raw materials (oils and fats) with a short-chain alcohol, usually methanol, in order to obtain esters and glycerol. Processes and materials, as well as control and analysis systems, have been investigated with reference to small scale, modular or transportable, biodiesel production plant. These systems could represent an energy storage system in an aggregate management, with continuous automated operations, for the integration of storage systems into the nanogrid which can operate both in grid-connected and in isolated systems able to be used as renewable energy storage RES system. Energy storage is inherent in the calorific value of biodiesel, as a liquid biofuel, which can be stored and used when and where necessary for the need of small communities by means of a nanogrid energy optimization system.
Integration of power systems using biodiesel produced by RES System and their integration into nanogrid represent an opportunity for massive and distributed diffusion of storage systems at user communities whose installations are managed in real time from the community Producers. By this way it is possible to make the end user aware and proactive of the energy system by providing the implementation of a hybrid system based on nanogrid, for individual users capable of integrating RES generation. The production of biodiesel and by-products such as glycerol, from oleaginous crops and residual oils, permits to use the potential energy content of such residual oils, which from waste (family waste or from a condominium building or a series of condominiums, or from hotels, restaurants, tourist complexes, school canteens) become an energy resource, with reference to systems and plants of small size, so as to satisfy, if possible, the same needs of the communities that produced them. The production process could be integrated in a scheme of rationalization of consumption and use of the accumulated energy in an aggregate management, with continuous automated operations, for the integration of storage systems into the nanogrid which can operate both in grid-connected and in isolated systems.