Biogas from Anaerobic Digestion as an Energy Vector: Current Upgrading Development

: The present work reviews the role of biogas as advanced biofuel in the renewable energy system, summarizing the main raw materials used for biogas production and the most common technologies for biogas upgrading and delving into emerging biological methanation processes. In addition, it provides a description of current European legislative framework and the potential biomethane business models as well as the main biogas production issues to be addressed to fully deploy these upgrading technologies. Biomethane could be competitive due to negative or zero waste feedstock prices, and competitive to fossil fuels in the transport sector and power generation if upgrading technologies become cheaper and environmentally sustainable.


Introduction
Anaerobic digestion (AD) converts organic wastes into biogas. This bio-based product makes a full contribution to the main targets of the current energy transition by replacing fossil resources and reducing the methane emissions related to the disposal of biodegradable waste, thus reducing the amounts of greenhouse gas (GHG) emissions. Furthermore, the use of the resulting digestates for enriching agricultural soils also contributes to create carbon sinks.
After AD processes, the biogas can be upgraded to biomethane, which is considered an attractive renewable energy alternative to natural gas. Biogas upgrading to biomethane can help to meet current objectives on energy, environmental and waste management policies. Today, biomethane is usually used as fuel in the transport sector or injected into the gas grid, saving tons of CO2-equivalent emissions [1].
To become climate-neutral by 2050, the transport sector must decrease current GHG emissions by 90% [2]. In this context, the use of biofuels, such as bioethanol, biodiesel and biogas, may contribute to overcome this challenge [3]. On the other side, in the transition to renewable energy and transport systems, producers and consumers will deal with changes in the energy market and variable energy production timing. The integration of different energy vectors will be essential to cover the total energy demand, and biofuels such as biogas can play an important role of backup energy [4].
In the European Union (EU), the long-term decarbonization strategy expects an increase in biomass and waste-derived energy from 140 million tons of oil equivalent uses [14,18]. However, it is important to highlight that the deployment of biogas and biomethane in the future market will very much depend on the implementation of policies aimed at decarbonizing the energy system to support the production and use of these energy carriers.

Current Policy Framework for Biogas Energy Vector: The Case of the European Union
The development and deployment of biogas and biomethane technologies have been greatly promoted thanks to effective government policies. Therefore, policy support is a key factor to promoting the production and use of biogas and biomethane. Since regulatory policies vary between countries and regions, the development and use of biogas and biomethane has been uneven in the world, with Europe being the largest producer of biogas, followed by China and the United States [14].
In China, the government has promoted the development of the biogas industry, especially in rural areas. In 2019, the Chinese National Development and Reform Commission defined the major actions to support the use of biomethane in the transport sector with a document on biogas industrialization and biogas upgrading [14]. In the United States, the government has also promoted the use of biogas, highlighting the support of the state and federal government for the use of biomethane in the transport sector, making the country a world leader in this sector. Although China and the United States have significant development and implementation of biogas technology, they are still quite far from that achieved in Europe, which is responsible for more than half of the biogas production in the world [14].
The EU has promoted the development and utilization of renewable energy through different policies. In 2016, the European Commission (EC) set the revised Renewable Energy Directive 2018/2001/EU (RED II) [22], which entered into force in 2018. This new directive sets a target of at least 32% for renewable energy by 2030, with 14% renewable energy in the transport sector. The latter incorporates a 3.5% sub-target for advanced biofuels and biogas. According to the European Biogas Association (EBA), the RED II can be seen as a step forward for the large-scale implementation of renewable gas in the next decade. It will facilitate access for biomethane to the natural gas network, extend guarantees of origin for renewable electricity to renewable gas and facilitate cross-border biomethane trade [15].
The European bioeconomy strategy was published in 2018. The document included a specific plan with 14 actions aiming at (1) scaling up and strengthening the bio-based sectors, (2) rapidly deploying bioeconomy across Europe and (3) protecting the ecosystem and understanding the ecological limitations of the bioeconomy [23]. In addition, the EC launched an Action Plan focusing on the design and production of a circular economy to ensure the use of resources within Europe in the long term [24]. Both strategies adopted by the EU promote the use of biological resources and the reuse of residues, creating a good perspective for the development and use of biogas and biomethane.
Although there is a growing interest in biomethane production, its production costs are still higher than those of conventional natural gas. Therefore, biomethane production needs to be supported by favorable government regulations, public funding and/or tax incentives [25]. In Europe, several countries have introduced different support mechanisms to promote the development of biomethane production and use. For example, Germany has achieved a great development of biomethane production and injection into the natural gas network through different support mechanisms such a sharing of investment costs for grid connections, re-financing programs, tax reductions and feed-in tariffs, plus bonuses if biogas is upgraded [25,26]. The use of biomethane as transportation fuel has also increased in the EU. In 2019, the consumption of biomethane increased by 44.3%, which is attributed to legislation in Sweden and Italy that encouraged the use of this biofuel in transportation [27].

Biomass Feedstock: Characteristics, Potential, and Logistics
There is no doubt about the huge potential offered by using sustainable, non-foodrelated feedstocks for the production of biogas and biomethane, which could cover about 20% of today's worldwide gas demand [28,29]. Wastes from agriculture, livestock, urban areas and industry have adverse effects on health and the environment. These organic wastes become the main emitters of greenhouse gases other than CO2 (methane and nitrous oxide) if they are not carefully disposed [28,29]. AD is one of the most favorable biomass conversion technologies to convert organic waste into renewable energy and effectively mitigate GHG emissions. In addition, digestate is produced during AD of waste materials, which can be used as an organic fertilizer due to its high nutrient content [30]. This process gives a second life to materials that would otherwise be considered waste. The result of using these previously unwanted materials provides a renewable energy source in the form of biogas, various by-products and organic fertilizers made from a genuine non-fossil production method [31]. AD is an expanding technology that offers the ideal scenario, where a continuous circulation of resources can be successful as a long-term alternative to organic waste management.
Historically, AD has been associated primarily with the treatment of animal manure (swine, cattle and poultry) and sewage sludge (SS) from aerobic wastewater treatment plants. However, current increased environmental awareness has motivated new waste management strategies and supports the production of renewable energies. The application of AD in organic waste has increased in attractiveness from a policy-making point of view, as it is now considered a reliable technology [32].
The raw materials that can be used to produce biogas can come from three sources, agricultural, industrial and municipal, which generate a large number of raw materials that can be treated by AD for biogas production ( Figure 2). The most common organic raw materials used for biogas production are: organic (biodegradable) fraction of municipal solid waste (OFMSW), SS, organic industrial and commercial wastes, food wastes, manure from livestock and energy crops. All of them are characterized by their high content of biodegradable organic matter [33].
The main factors affecting the digestion efficiency are feedstock quality, pretreatment processes, design and process conditions such as temperature, C/N ratio, pH, hydraulic retention time and organic loading [33]. Theoretically, the AD process can decompose the organic fraction of any feedstock to produce biogas, which has a high percentage of methane (50-70%). However, the energy content of the different raw materials is a key factor in the productivity of biogas plants. Therefore, methane production varies greatly with the different types of substrates depending on their composition and characteristics. Sugar and starch crops can result in high methane yields of up to 450 Nm 3 of CH4/ton of volatile solids (VS) [35]. On the other hand, lignocellulosic biomass only produces up to 0.33 Nm 3 of CH4/g of VS [36][37][38][39][40][41][42][43].
On the other hand, both the application of previous feedstock pretreatments and anaerobic co-digestion (AcoD) of two or more substrates can favor the generation of biogas from certain wastes. Pretreatment is an important step in AD process as it removes inappropriate compounds and easy the accessibility of nutrients to microbes [44]. In recent years, many studies have investigated various pretreatments for biogas production enhancement, including physical (grinding/milling, irradiation), physico-chemical (steam explosion, liquid hot water), chemical (alkali, acid, oxidizing agents, organic solvent) or biological (ammonia fiber explosion, ionic liquids or fungal). Their effects are diverse, and all are aimed at altering the structure to improve digestibility [43]. The use of thermal, chemical and mechanical pretreatment processes may improve the biogas production process by 24%, 21% and 33%, respectively [45].
Likewise, the co-digestion of two or more substrates that complement each other provides a better balance between macro and micronutrients and their availability, reduces the inhibitory potential of the mixture due to a dilution effect and improves the buffering capacity and moisture balance. AcoD allows improvement of the efficiency of the process by increasing the biodegradable component, broadening the number of microbial species participating in the digestion process and increasing the concentrations of active biomass. The selected co-substrate must favor these synergistic effects by balancing deficient components, overcoming inhibition and improving methane yield [46]. This leads to better process stability and higher biogas generation [47,48].
Sewage sludge is the most used co-substrates in AD (62%), followed by animal waste (e.g., animal manure and slaughterhouse waste) (16%), food and agro-industrial waste (15%) and other co-substrates such as yard waste, algae, sewage and agricultural waste [49]. Stimulating the degradation of organic matter and strengthening the microbial metabolism are key factors to be considered in further research [50]. Some characteristics of the main biomasses potentially available for the generation of biogas by DA are briefly discussed below.

Organic Fraction of Municipal Solid Waste
Domestic solid waste is generated as a consequence of human activities and it is rapidly increasing worldwide [51]. About 2 billion tons (0.11-4.54 kg/person every day) of municipal solid waste are produced annually and about one-third is not properly managed from the environmental point of view. High-income countries generate about 680 million tons per year (ca. 34% of the waste produced globally) with relatively less food and green waste content (32% of total waste), and a higher plastic, cardboard, paper, glass and metal content [52]. In contrast, the waste collected from middle-and low-income countries has a total content of 53-56% of food and green waste [52].
Due to its potential for reducing GHG emissions and its possibilities for increasing nutrient and energy recovery, conversion of OFMSW through AD has received increasing attention. There is a compilation of OFMSW characteristics in 43 cities belonging to 22 different countries and a report on the results of investigations related to biogas production [53]. The total solids (TS) and volatile solids (VS) from all these studies ranged between 20% and 40% (in wet weight basis), while the VS/TS was estimated to be 80-95%. For a 75-95% VS/TS ratio, a total biogas production of 300-600 Nm 3 /ton VS may be obtained. The main rate-limiting step during AD of OFMSW is the hydrolysis phase. Therefore, it is important to explore different alternatives to speed up this step, such as subjecting biomass to different pretreatment processes, as discussed above [44,45]. However, although pretreatments may increase the biodegradability of the substrate and the conversion yields, these processes may increase overall costs and limits its economic feasibility.

Cattle Manure
Animal wastes can be used as sources of biomass-based conversion processes, especially in bio-energy and bio-fertilizer production. Today, developed countries tend to decrease the number of farmers but increase the number of animals. This trend is also transforming livestock production in developing countries. Livestock contributes to nearly 40% of the total agricultural production in developed countries and 20% in developing countries, supporting the livelihoods of at least 1.3 billion people worldwide, since 34% of the dietary protein supply comes from livestock [54,55].
Today, in most countries, intensive livestock farming is being continuously developed [50]. The most frequent sources of meat supply in the world are domestic animal species such as cattle, pigs and poultry and, to a lesser extent, buffalo, sheep and goats. In Europe, livestock population in 2019 amounted to 143 million heads of pigs, 77 million heads of bovine animals and 74 million heads of sheep and goats, according to FAO [56].
The specific amount of livestock manure per animal relies on many aspects such as feeding regime, stage of the process, type of production system, etc., and the method of housing used [57]. Livestock activities have an environmental impact when manure is not effectively managed [58][59][60][61]. On the other hand, animal manure is considered an attractive natural resource for renewable energy production, and can also replace industrial fertilizers and improve soil fertility [62,63]. However, the low C/N ratio, high nitrogen content, the small amount of VS and, in some cases, its high proportion of components with low degradability potential such as lignocellulosic biomass are important limitations for the use of manure in AD [64][65][66].

Sewage Sludge
Wastewater treatment plants (WWTPs) generate SS as the main by-product, which represent a major problem in WWTPs since its final disposal may represent up to 50% of the operating cost [68]. One of the processes commonly used for the stabilization of SS in WWTPs is AD. The AD of SS is an established technology in developed countries with widely recognized benefits [69]. Currently, municipal wastewater treatment sites provide a high proportion of the biogas produced in AD plants and there is still enormous potential to be exploited around the world [70]. In general, this process is integrated by the so-called primary and secondary sludge, also known as mixed sludge, and about onethird of the solid matter in the sludge is converted into biogas (equivalent to approximately 50% of the organic matter). Primary sludge or raw sludge is obtained by gravitational sedimentation in the primary settler. It has a high content of organic matter and is easily degradable. Under optimal digestion conditions, a methane yield of 315-400 Nm 3 /ton organic dry matter (ODM) can be expected [71,72]. Secondary sludge, also called activated sludge, is the result of biological treatment of wastewater. It has a smaller degradable fraction than primary sludge and therefore a lower biogas yield. Under optimal digestion conditions, a methane yield of 190-240 Nm 3 /ton ODM can be achieved. In the case of using the digestate for agricultural use, the quality management standards must be respected [73]. It is estimated that WWTP treating over 100,000 population equivalents (PE) can generate 876,000 Nm 3 of biogas annually (at 6.5 kWh/Nm 3 ) and 5694 MWh of electricity and thermal energy [70].

Lignocellulosic Biomass
The abundance and low costs of lignocellulose make this biomass source an attractive substrate for the production of second-generation biofuel, including bioethanol and biomethane [43]. In addition, the use of lignocellulose is considered crucial for the reduction of atmospheric CO2 since it is a reservoir of this compound [74]. In contrast, the complex structure of lignocellulosic biomass represents a major bottleneck for bio-based processes, as it is highly recalcitrant to biological degradation and thus results in low biomethane yield [75]. With the aim of altering its structure and increasing its digestibility, lignocellulose can be subjected to different pretreatment processes (physical, physicalchemical, chemical and biological), as discussed previously.
On the other hand, lignocellulosic residues have a high C/N ratio. Therefore, codigestion of lignocellulosic residues and other organic wastes is often reported. Methane productions of 290 and 178 Nm 3 /ton VS were achieved for rice straw: 217 and 223 Nm 3 /ton VS and 372 Nm 3 biogas/ton VS with corn straw and 269 Nm 3 /ton VS with wheat straw. In the case of fallen leaves, asparagus stem and garden ornaments, the methane production results were 82, 242 and 45 Nm 3 /ton VS, respectively [50].
The timber industry also produces large amounts of residual wood biomass annually [76], which could serve as raw material for AD plants. Investigations with fir and pine, major representatives of softwoods, show low yields in fir and untreated pine, with 30-85 Nm 3 of CH4/g VS and 54 Nm 3 CH4/ton VS, respectively [74]. These yields increased to 141-276 Nm 3 CH4/ton VS using FIR [77] and to 178-224/CH4/ton VS when using pine [77,78] after subjecting these biomass feedstocks to physical and physico-chemical pretreatments.

Waste and Sewage from Agriculture-Related Industries
About 33% of the total food produced globally for human consumption is lost through the supply chain (production, distribution, consumption and post-harvest handling stages) [79,80]. This represents around 1.6 Gtons of food per year and a production value of EUR 625 billion [81]. The properties of such wastes include 73-100 g/kg TS; pH 4; 6-18% VS; 20 C/N; and >80% moisture content [82].
The use of AD to generate methane is a favorable technique for processing fruit and vegetable waste since it has high moisture content and is easily biodegradable. Due to the low TS content and high VS content of fruit and vegetable waste, they are rapidly hydrolyzed in the AD process, leading to acidification. As a result, methane production is inhibited and the final efficiency of AD is affected [83]. To address the acidification problem, several solutions have been proposed, including co-digestion with other materials, adjustment of the inoculum concentration, pretreatment of raw materials prior to AD and monitoring of the reactor conditions [84]. Gunaseelan [85] compared the extent and rates of the potential methane conversion of 54 fruit and vegetable waste samples and eight standard biomass samples. The ultimate methane yields (B0) and kinetics of fruit wastes ranged from 180 to 732 Nm 3 /ton VS and 0.016 to 0.122 d −1 , respectively, while vegetable wastes ranged from 0.190 to 0.400 Nm 3 /g VS and 0.053 to 0.125 d −1 , respectively.
Many types of industrial wastewater that are considered unsuitable for AD are currently treated with advanced anaerobic reactor systems. There are three main types of wastewater: processing, sanitary and cleaning. The compositions and quantities of these wastewater depend on the industrial sectors they are coming from. The application of anaerobic wastewater treatment is largely limited to wastewater with a COD of 3000-40,000 mg/L, for example, in the vegetable and fruit, starch, sugar and alcoholic beverages sectors. Recently, fewer contaminated wastewater effluents (COD of about 1500-3000 mg/L, and even below 1500 mg/L) have been successfully treated by certain AD systems, for example, in dairies, breweries and the fruit juice, soft drink and mineral water sectors [86][87][88].

Algae
Microalgae is a diverse microbial group with more than 20,000 species recognized to date, comprising a heterogeneous mixture of photosynthetic eukaryotic and prokaryotes [89]. The macromolecular composition of microalgae mainly contains carbohydrates (7-69% of VS), proteins (15-84% of VS) and lipids (1-63% of VS) [90]. Usually, their dry matter content is about 20% and the ash content represents about 10% of the total dry weight.
Recently, several photobioreactors prototypes (e.g., tanks, tubes, and closed systems) have been developed for growing microalgae biomass on a commercial scale. Some examples of microalgae biomass used for AD are: Chlorella sorokiniana, Spirulina dunaliella, Spirulina maxima, Chlorella vulgaris, Scenedesmus obliquus, Euglena gracilis, Spirulina maxima, Durvillea Antarctica and Nannochloropsis oculata [89]. In general, the specific methane yield using whole algae biomass ranges between 90 and 440 mL methane/g VS [91,92]. In AD with C. sorokiniana and C. vulgaris, the conversion of algae-COD into biogas reached up to 40-73% and the highest methane yield was obtained using dried and ground algae [93].
Some drawbacks of AD treatment of microalgae have been described. For instance, unprocessed microalgae were not considered as the best substrate for biogas production due to their low biodegradability and low biogas performance. Some pretreatments can break down the cell walls of the microalgae, thus increasing biomass biodegradability and methane yields [94][95][96]. Therefore, the biomass residues of microalgae after extraction of lipids and amino acids serves as a good candidate for its methanogenic conversion through AD [97]. Another drawback is the low C/N ratio of the microalgae biomass and/or ammonia inhibition, which can be balanced by adding substrates with high carbon content [98,99].

Biogas Upgrading Technologies
Since 2016, the research interest on biogas upgrading technologies has increased significantly in terms of scientific publications ( Figure 3), with special attention in using SS from WWTPs. A total of 602 scientific publications related to biogas upgrading were identified. The scientific publications were searched on Web of Science (WoS) using the search equation TS = ("biogas upgrad*" OR "upgrad* biogas" OR "biogas up grad*" OR "up grad* biogas" OR "upgrad* of biogas" OR "up grad* of biogas" OR "biogas purifi*" OR "purifi* biogas" OR "purification of biogas") AND PY = (2017 OR 2018 OR 2019 OR 2020). From this total publication, China accounts for 19.9% of the articles, followed by Spain, Italy and the United States, with 13.0%, 12.3% and 7.3%, respectively.  Figure 4 shows the specific technological distribution of the articles aimed at biological upgrading. Among them, biomethanation is the most studied process, corresponding to 41% of the articles standing out the in situ and ex situ addition of hydrogen. Photosynthetic upgrading using microalgae is in the second place, with 33% of publications. These biogas upgrading technologies are mainly located in small and medium WWTP. Currently, upgrading biogas from DA is the most common biomethane production route, with biomass gasification remaining far away in the global market [100]. The biogas upgrading methods can be divided into two different categories: sorption and separation technologies [10]. Among different upgrading methods, water scrubber and membranes are the most used technologies in the UE, followed by PSA and chemical scrubber [15]. The technologies implemented at the industrial scale for the upgrading of biogas are described in the following sections.

Water and Organic Scrubber
This upgrading technology is the most common upgrading technique and there are several commercial suppliers in a wide range of capacities. It uses water as selective absorbent that is often implemented at industrial scale due to better impurities tolerance and fewer costs than other absorbents. The solubility of all components increases when pressure is higher, and CO2 is more soluble than CH4 according to Henry's Law. Therefore, the process is based on the higher aqueous solubility of CO2 compared to CH4 that is 26 times lower at 25 °C [11].
The biogas to be upgraded is injected into an absorption column with pressure and temperature, 4-10 bar and 40 °C, accordingly [10]. The water leaves the absorption column filled with plastic packing to increase mass transfer between water and biogas. Figure 5 shows how water is lead to a flash tank to recover traces of CH4 and transferred back to the biogas inlet [101]. For water recycling, a desorption column filled with a plastic packing is used together with a counter flow of air to release CO2. Before sending the water back to the absorption column, it is cooled down in order to increase the differences in solubility between methane and CO2 and improve their separation [10,[102][103][104].  Water scrubbing can be performed with low-quality water using a single-pass scrubber, or with high-quality water using sequential units and a two-stage stripping process for water regeneration. Depending on the operating pressure and temperature, about 0.1-0.2 m 3 of water/Nm 3 of biogas are required [105]. Energy consumption for raw biogas is between 0.25 and 0.3 KWh/Nm 3 , rely upon the capacity of the facility [102]. It should be emphasized that energy consumption for clean biogas can be three times the cost for raw biogas due to the water regeneration step due to the large amounts of required water. Finally, the collected methane is subjected to a drying step, reaching up to 97% purity.
This process is also useful for the removal of H2S because it is more soluble than CO2 in water. High pressure water scrubbing, with operating pressure around 10 bar, is the most used to remove CO2 and H2S [106]. Stripping with air is not favorable when H2S concentration level is high because the water quickly becomes polluted with elementary sulfur, which causes corrosion and operational problems. Biogas upgrading with water scrubbing is an efficient technology with low chemical requirement and high methane recovery (up to 98%). The investment cost is around EUR 2500 per Nm 3 /h at design flow rates in plants with capacities of 500-1000 Nm 3 /h [11]. In addition, high amounts of water and energy consumption are needed [101].
Organic solvents such as methanol (CH3OH), N-methyl pyrrolidone (NMP) and polyethylene glycol ethers (PEG) can be used instead of water to absorb CO2. A preremoval of H2S is recommended in this process to maintain solvent absorption conditions. The biogas is compressed to 6-8 bar and cooled before injected into the bottom of the absorption column. The organic solvent is cooled and provided in the top of the absorption column to maintain a temperature around 20 °C [10]. Although this process improves efficiency in terms of CO2 separation and anticorrosion properties compared to water scrubbing, energy requirements and the cost of the organic solvents are higher, which make the process more expensive in terms of operation. Organic solvent requires a biogas pre-conditioning step to remove water and heating steps to achieve the desorption of CO2 at 40 °C ( Figure 6) [106]. In addition, a regeneration step of the organic solvent is required, which usually implies high temperatures. Similar to water scrubbing, the use of organic solvents also results in less than 2% CH4 losses [102]. Organic solvent seems to be a better investment option in biogas upgrading plants under 500 Nm 3 /h than water scrubbing or membrane technology, for which investment costs are above EUR 5000 per Nm 3 /h at design flow rates.

Chemical Scrubber
Chemical absorption technologies mainly use amines as the solvent.

Gas conditioning
Condensate Cooler Heater is mainly used as solvent since it presents higher CO2 absorption capacity when compared to MDEA alone. Figure 7 shows a typical amine scrubber system. First, the amine solution is introduced to the top of the absorption column while biogas enters from the bottom. The CO2 then reacts with the amine solution by an exothermic reaction and is absorbed. This increases the temperature of the absorber and facilitates the absorption of CO2 by improving the solubility of CO2 in the amine solution. The absorption column often contains a random or packed bed operating at 1-2 bar. The liquid from the bottom of the absorption column is then pumped to the top of the stripper column through a heat exchanger for regeneration (CO2 is released and amines are recovered). The regeneration column is equipped with a reboiler at 120-150 °C that provides heat to boil the amines solution and to release CO2. The CH4 concentration is up to 99% and H2S can also be absorbed completely. This process operates in atmospheric pressure, giving low operational costs. In contrast, this upgrading system involves high investment costs due to the heat requirements for the regeneration of the amine solution. Another drawback of this technology is the requirement to treat waste chemicals, corrosion and contaminants, which increases the complexity of the process [101]. Besides amines, other solutions such as aqueous alkaline salts have also been used for chemical scrubber [10].
Chemical scrubber is, together with membrane separation, the most common technology in biogas upgrading facilities, but it requires higher capital costs (around EUR 3200 per Nm 3 /h at design flow rates in capacities under 1000 Nm 3 /h) [11]. The energy consumption for raw biogas is between 0.05-0.15 kWh/Nm 3 and the CH4 losses are less than 0.1% [102]. It should be noted that H2S can be adsorbed in the amine solution, resulting in an increase in heat consumption if it is not removed in the first step. Heat requirements are between 0.50 and 0.75 kWh per Nm 3 of biogas treated, giving a total energy consumption close to 1 kWh per Nm 3 of raw biogas.

Pressure Swing Adsorption
During PSA, CO2 is separated from biogas under elevated pressure. Then, the pressure decreases, resulting in gas release. It is based on molecular characteristics and the affinity of the CO2 to an adsorbent material, such as silica-gel zeolites and activated carbon, typically. CO2 is adsorbed on the adsorbent surface by van der Waals forces. This absorbent is often packed in vertical pressurized columns (Figure 8). The biogas is compressed to 4-10 bar and injected in a H2S removal unit. Subsequently, there are four adsorption columns, which are fed in parallel with biogas to maintain a continuous operation [103]. Biomethane is collected from the top of the adsorption columns, decreasing their pressure. Depending on the absorbent material is possible to remove not only CO2 but also N2, O2 or water [10]. These adsorption columns alternate steps of pressurization and depressurization, followed by a step of regeneration where the saturated column is venting to ambient pressure and purging with upgraded biogas for desorption [103]. This cycle normally lasts about 10 min.
In 2018, PSA was the fourth-most operated biogas upgrading technology in the EU, close to amine scrubbing in number of facilities [100]. The power demand is less than 0.3 KWh per Nm 3 for raw biogas [103] and CH4 recovery varies between 96% and 98% [102].
The investment costs decrease from EUR 2700 per Nm 3 /h at design flow rates of 600 Nm 3 /h to EUR 1500 per Nm 3 /h for plants with a capacity over 1500 Nm 3 /h [11]. Another advantage of PSA is that no chemicals are needed during the process, but the operation is complex.

Membrane Separation
Gas separation by membranes has been in the market for decades. Membranes are semi-permeable barriers that allow compounds to pass through depending on their permeability and difference in temperature, concentration or pressure. Pore-flow and solution-diffusion are the two process models used in membrane separation. Pore-flow separation with polymeric membranes is frequently used for gas [106]. Biogas upgrading membrane technology permeates CO2 through the membrane and retains methane in the inlet side ( Figure 9). However, when using conventional membranes, the biogas upgrading process also retains N2 and permeates H2O, O2, H2S and CO2 [103].

Recirculat ion
Cellulose acetate and polyimide are the most used commercial membranes for biogas separation. Cellulose acetate reaches separation of CH4 close to 98%, is cheap and has an easy manufacture [101]. As an alternative, polyamide materials offer high mechanical and thermal stability and show high permeability and selectivity. These membranes are now economically competitive and allow the separation of CO2 and H2S when compared to conventional technologies. Improvements in membrane material are being investigated, aimed at obtaining higher permeability without lowering gas selectivity. An increase in CH4 recovery from 80% to 99.5% can be achieved by using a multistage membrane process [107].
Inorganic membranes such as zeolite, activated carbon, silica, carbon nanotubes and metal-organic framework present more mechanical strength, thermal stability, and resistance against any chemicals than polymeric membrane. However, the manufacturing of inorganic membranes is complex and expensive. The main developments in membrane separation methods are focused on mixed matrix membranes, which integrate both polymeric membranes and inorganic membranes.
H2S and siloxanes affect membrane performance and must be removed from raw biogas. In addition, it is necessary to remove water, aerosols and oil droplets by filtration prior entering to the membrane unit. Furthermore, more effective separation methods are needed for mixtures such as CO2/CH4, H2S/CH4 and other mixtures with impurity traces. In this context, there is intensive research on developing new membrane materials for efficient biogas upgrading.
Membranes can be classified based on the operating pressure. High-pressure membranes operate at 8-20 bar, while low-pressure membranes operate at atmospheric pressure. The process can be gas/gas separation or gas/liquid separation because of the separation media. There are four commercial configurations for gas/gas membrane: the single stage, the two-stage with sweep biogas stream, the two-stage with a recirculation loop and the three-stage with sweep biogas stream [108]. Configuration without recirculation shows fewer operational costs but less performance in CH4 separation.
Cellulose acetate and polyimide in dry process is the most extended technology for biogas upgrading. Biogas is pressurized between 5 and 10 bar after the gas conditioning step [10,102]. The biogas with a significant amount of methane of 10-15% (v/v) is recirculated to the compressor step and led to the membrane again to improve the CH4 purity in the outlet gas. Under these conditions, CO2 solubility and diffusion coefficient are higher than CH4, therefore increasing the permeability of this compound. The CO2 and other impurities diffuse to the side of the membrane with lower pressure while CH4 remains to the side of the membrane with higher pressure.
Membranes show disadvantages such as extensive pretreatment and low CH4 purity when biogas passes through the membrane only one time. Biogas pretreatment integrates particles removal, H2O, H2S, NH3, VOCs and siloxanes by condensation and activated carbon filtration. This pretreatment is crucial to avoid a rapid deterioration and clogging of the membrane. On the other hand, CH4 recoveries of 98-99% are getting in gas-liquid units or two-stage gas-gas units with recirculation of the permeate from the second membrane module [103]. The lifetime of the membrane is guaranteed by manufacturers for 5 to 10 years [106]. Membrane technology is a cost-effective alternative to the absorption biogas upgrading systems due to a reduction in the cost of the polymeric membranes over time and fewer energy requirements.
The capital cost of gas-gas membrane units is under EUR 2500 per Nm 3 /h for design flow in capacities above 500 Nm 3 /h and it can reach an investment cost of EUR 6000/Nm 3 h in small plants [11]. Operating costs are in the range of EUR 0.13-0.22/Nm 3 of biogas treated [103]. Energy consumption for raw biogas is 0.18-0.20 kWh/Nm 3 , which is lower than that of PSA or water scrubber technologies [102].

Cryogenic Separation
Cryogenic separation operates at low temperatures (−170 °C) and high pressures (about 80 bar), allowing the liquefaction of certain gases such as CO2 and H2S. During this process, biogas temperature is decreased gradually and liquefied CH4 is separated from both CO2 and the other components to meet quality standards for Liquefied Natural Gas (LNG) [103]. With the aim of reaching the quality of natural gas, this process must be repeated up to four times. Figure 10 shows a simplified diagram of a cryogenic separation process. It can be noted that the system uses a high number of equipment: compressors, turbines, heat exchangers and distillation columns, which have high capital and operational costs. In addition, a pretreatment that involves the removal of water, H2S, dust particles, halogens, siloxanes and other unwanted components is necessary. The biogas is compressed from 80 bar to 100 bar and cooled until −55 °C to liquefy the CO2. The remaining gas stream is then cooled to −85 °C to remove CO2 in the solid phase [101]. There are a few commercial plants already in operation using this upgrading technology [102]. However, it still requires further development. This system can reach a CH4 recovery of up to 97% and produce LBM with low extra energy. The energy use is over 0.76 kWh per Nm 3 for raw biogas.

Cost Associated to Biogas Production and Conventional Upgrading Technologies
Feedstock costs and availability determine the economic viability of the biomethane facility. The average cost of biomethane production through biogas upgrading is around EUR 15.7 per million British thermal units (MBtu). Most of this cost is attributed to the production of biogas, while the upgrading processes represent 10-20% of the overall production costs, considering an upgrading facility with the capacity of treating 3.5 million m 3 of biogas per year. Investment and operating costs along with methane recovery and removal efficiency of the minor components are the main factors to consider during the selection of the upgrading technology [11]. The cost of the upgrading process can vary significantly for different plant sizes and regions. Compared to Europe, North America shows lower upgrading costs due to larger plant sizes [14]. Biomethane grid connection renders a potential additional cost. To reach cost-effective plants, they must be located near to gas distribution systems, with typical network connection costs being around EUR 2.49/MBtu, split almost equally between pipeline infrastructure and grid injection and connection costs [109].
The biomethane production costs can be reduced over time as the upgrading technologies improve and natural gas gets more expensive. The use of CO2 and methane avoiding their emissions also improves the cost competitiveness of biomethane. Figure 11 shows the investment and maintenance costs for different biogas production technologies excluding feedstock. Livestock manure has a significantly lower biogas production yield than crop residues, as mentioned in Section 2. Today, biogas from large biodigesters, flow rates above 750 m 3 /h and the use of crop residues as feedstock seem to be the best option to produce biogas at competitive costs [110].

Dryer Cooler
Expansion col um n

Gas state CH4
Solid/liquid CO2 Figure 11. Investment and maintenance costs for biogas production technology per unit of energy produced in 2018. HH = household; "HH Advanced" includes pre-manufactured biodigesters made of more expensive composite material; "HH Basic" includes biodigesters constructed in place using traditional construction materials such as sand, gravel and cement. Adapted from [14].
Water and organic scrubber, amine chemical scrubber, membranes (gas permeation) and PSA are the most widely applied technologies to upgrade biogas from anaerobic digestion to methane [111]. Cryogenic upgrading is still in development in terms of separation of key compounds such as oxygen, nitrogen and hydrogen. The systems of membranes and chemical scrubber with amines have taken a big step forward in the past 5 years. Membrane technology has demonstrated achievements in the treatment of biogas streams with different origins (e.g., WWTP organic, WWTP and by-product treatment plant biogas production plants from energy crops), different specifications and end uses of biomethane. Applications such as network injection at different pressures and flows, fuel, vehicle Bio-CNG (compressed natural gas) or Bio-LNG have been implemented. Biogas upgrading by membranes is the main technology chosen in the case of WWTP. In addition, the membrane technology has undergone significant improvements compared to other commercial separation technologies, being fast and cheaper due to the lowering of the membrane production costs. PSA systems using zeolite also result in low production and investment costs [112].
Investment costs and operating costs of the biogas upgrading technologies depend mainly on the capacity of the facilities. Figure 12 shows biomethane capital costs for each upgrading technology for plants with similar investment costs in capacity, ranging from EUR 200 to 2000 per Nm 3 /h. On the other hand, Figure 13 indicates that the energy consumption estimated to upgrade 250 Nm 3 /h is between 0.15 and 0.35 kWh/Nm 3 , with water scrubber the technology having the highest consumption and amine scrubber the lowest consumption. In addition, amine scrubber has a heat consumption of 0.45 kWh/Nm 3 of clean biogas, resulting in an overall energy consumption of 0.60 kWh/Nm 3 of biogas inlet.

Biological Upgrading Development
Biological upgrading technology is a real opportunity versus catalytic methanation. The latter requires much higher temperatures, is less tolerant to biogas impurities and it is convenient to larger scale projects (above 5 MW) [4]. The biological methanation suits small gas facilities and it is flexible in connecting to intermittent supplies of hydrogen.
There are different layouts to implement a biological methanation facility. One of them is separating the CO2 contained in biogas via a conventional physico-chemical process and then only purified streams of CO2 and hydrogen in ex situ reactor that improves the process efficiency. Gas storage is also an important factor to be considered in the implementation of these facilities; different settings are possible depending on whether it is for storage of hydrogen, biogas or CO2 before biomethanation process.
The biological upgrading of biogas is based on the use of bioreactors with autotrophic microorganisms capable of using the CO2 fraction of the biogas as a carbon source, so that the biogas is enriched in methane. In general lines, two autotrophic metabolism pathways are distinguished from an industrial point of view: (i) the photoautotrophic pathway, mediated by microalgae that use solar radiation to fix CO2 and (ii) the chemoautotrophic pathway, in which CO2 is reduced to carbon monoxide, methane or other organic compounds by bacteria.
This last route is known commercially as Power-to-Gas, or more specifically Powerto-Methane, because the process uses the electrolysis of water to generate hydrogen gas and its subsequent biological conversion together with CO2 into methane (Equation (1)). However, the use of power in the microbial electrolysis of organic compounds to produce hydrogen is of great interest since it allows the use of organic waste to produce hydrogen [114]. On the other hand, electric currents can be used to generate protons (H + ) and electrons (e − ) that are directly used by archaea together with CO2 (Equation (2)) in what is known as electro-methanogenesis [115]. This review is focused on the photosynthetic and the methanation of hydrogen and CO2 technologies, because of the higher technological readiness level (TRL) reported.

CO2 + 4 H2 → CH4 + 2 H2O
(1) There are some references at the industrial level of biological methanation driven by Viessmann and Electrochaea [116,117]. Both use a stirred tank reactor configuration where archaea microorganisms consume hydrogen and CO2 in a biological Sabatier reaction (4 H2 + CO2 = CH4 + 2 H2O). The reaction takes place at 35-70 °C and 1-10 bar, in contrast to the catalytic methanation that works at temperatures and pressures of >250 °C and 20-40 bar, respectively. The facilities get the H2 via water electrolysis with energy demand around 5 kWh/m 3 H2. The Viessmann facility (MicrobEnergy demonstration plant, operated at the Schwandorf sewage) worked until the end of December 2014. It reached a stable production volume with a biogas quality of more than 98% methane and a hydrogen content as low as 2%. In March 2015, the facility was relocated to Allendorf, producing methane from hydrogen using the tested biological process. Then, the resulting methane was fed via the existing feed-in systems into the natural gas grid. The CO2 required for this process could be obtained from raw biogas or be supplied from the gas processing plant. In this context, the power-to-gas process using the resulting raw biogas from AD plants can be considered as upgrading [116].
A biological alternative to reduce energy consumption and water footprint of H2 production is the bio-electrochemical pathway. This alternative consists of the use of a bio-anode where microorganisms consume COD generating electrons, which are subsequently used in the cathode to produce H2.

Hydrogenotrophic Biogas Upgrading
Storing surplus renewable energy in the form of renewable gases by means of converting hydrogen, produced from electrolysis of water, and a stream of CO2 from biogas into methane finds in biogas an indispensable ally to incorporate the energy potential generated in the digestion to the circular economy. The hydrogenotrophic methanogenic upgrading has a high tolerance to impurities and moderate operating conditions compared to catalysts upgrading, and both are currently the subject of numerous studies, planned and under development, at a demonstration scale [118].
The main bottleneck in the development of the technology is the low solubility of hydrogen in water, limiting its transfer rate and, therefore, its conversion to biomethane. To face this challenge, different configurations of bioreactors (fed with biogas or with CO2 separated from the biogas stream through different technologies) have been developed. During ex situ biomethanation, biogas (or CO2 separated from the biogas stream through different technologies) is sent to an external reactor where CO2 reacts with the H2 generated from renewable electricity. A different approach consists of supplying hydrogen directly into the anaerobic digester, known as in situ biomethanation. In situ biomethanation upgrading seems to show greater economic attractiveness [119] than the ex situ alternative.
Among the ex situ technologies reported, plug flow bioreactors [120] and biotrickling filters [121] are capable of reaching conversion efficiencies greater than 99% and biomethane productivities of up to 38-40 m 3 per m 3 of reactor and day (m 3 /mR 3 d). This configuration allows the effective adaptation of non-specific anaerobic cultures to the operating conditions of the upgrading [122] in which both hydrogenotrophic and acetotrophic archaea predominate as a consequence of the relevant role of homoacetogens in the formation of acetate as intermediate [123].
The acetoclastic methanogens (Methanosarcinals) in collaboration with the acetate oxidizing syntrophic bacteria (Firmicutes) are responsible for 70% of the methane production in hydrogenotrophic biogas upgrading and 30% is due to the reduction of CO2 by hydrogenic methanogens [124]. The addition of H2 also means an alteration in bacterial community and in the balance of endogenous H2. Methanogenic hydrogentrophic bacteria increase, producing methane from CO2 in biogas. On the contrary, oxidative synthotrophics bacteria decrease because of the pressure exerted [125,126].
On a pilot scale, TLRs of 3 to 5, the rates achieved are more modest in biotrickling filters, from 3 m 3 /mR 3 d up to 6 m 3 /mR 3 d at increasing the operating pressure [127,128] to facilitate the transfer of hydrogen to the liquid phase. In addition, it has been observed a great capacity to adapt to fluctuations and intermittency in the supply of hydrogen, relevant in the context of power-to-methane, and the stability of the operation in the long term [127].
From a different point of view, hydrogen is a metabolite present, to a greater or lesser extent, during the anaerobic fermentation of organic compounds in all industrial digestion processes. This raises the interest of its use as a co-substrate of anaerobic digestion to increase the methane content in the biogas or even the direct production of biomethane during digestion in situ upgrading. The in-situ process adds to the limitation to the transfer of hydrogen, the challenge of maintaining the efficiency of the removal of organic matter under conditions that are thermodynamically unfavorable for acetogenesis due to the high partial pressure of hydrogen and under conditions of agitation that are far from favoring the transfer of poorly soluble gases.
On a commercial scale, the feasibility of integrating an intermittent stream of hydrogen into sludge digesters using Venturi-type ejectors has been tested [129], but the bulk of recent research is still on a laboratory scale. At this scale, novel configurations such as membrane bioreactors treating complex wastes [130] or UASB for the treatment of different wastewater have been studied [131], reaching methane concentrations above 90%. The process is unstable under certain operating conditions, with the accumulation of volatile fatty acids [132] and increase in pH (>8) [133] associated with the displacement of the CO2/bicarbonate equilibrium. In this sense, the increase in operating pressure (up to 2-7 bar) of sludge digestion [134] and food waste digestion [135] has succeeded in improving the quality of biomethane (up to 92-94%), as in the ex-situ process, and in controlling the pH in a neutral range for the digestion process.

Photosynthetic Biogas Upgrading
Microalgae-based biogas upgrading allows the concomitant elimination of H2S and CO2 from raw biogas because of the photosynthetic fixation of CO2 into microalgae biomass and bacterial H2S oxidation to sulphate with the O2 generated during microalgae growth [136]. This process is typically carried out in open or closed photobioreactors interconnected to biogas bubble absorption columns. The nutrients required to allow the lithoautotrophic bacteria growth (which can utilize H2S as a source of energy and CO2 as a source of carbon) and microalgae can be supplied by the aqueous fraction (after centrifugation) of the digestate. This configuration permits nutrients' recovery from anaerobic digestion as algal and bacterial biomass.
Microalgae exhibiting high growth rates (and therefore high CO2 fixation rates) are preferred in photobioreactors of microalgae and bacterial used for biogas upgrading. Thus, microalgae such as Nannochloropsis, Chlorella and Scenedesmus are desired. However, microalgae population structure in photosynthetic upgrading unit changes with time as a result of the seasonal variations in temperature, irradiation and composition of digestate. In this context, Pseudanabaena sp., Chroococcidiopsis sp., Chloromonas sp. Cyanosarcina sp., Synechocystis aquatilis, Geitlerinema sp., Woronichinia sp, Limnothrix sp. and Microspora sp. have been found in open algal ponds devoted to the purification of biogas.
This high rate of growth enhances the environmental sustainability of the process, reduces biogas upgrading operating costs and provides an algal biomass that can be further valorized as a biofertilizer or bio-stimulant [137].
When digestates are employed as a source of water and nutrients, the high concentrations of microalgae potentially generated in the photobioreactor cultivation broth require a biomass harvesting decoupled from the effluent of the photobioreactor, which is typically negligible because of the high evaporation rates to avoid light limitation. The optimal process configuration validated by the Institute of Sustainable Processes at Universidad de Valladolid consists of an open photobioreactor, which entails lower investment and operating costs compared to enclosed counterparts.
The open system allows a fixing microalgae productivity in the system via a controlled biomass wasting. This provides a biomass-free culture broth employed as absorption solution in a bubble column constructed with fine bubble diffusers instead of packed bed absorption units [137]. Figure 14 depicts this configuration. The main process variables that determine the quality of the upgraded biogas generated and nutrient recovery in algal-bacterial photobioreactors are the pH and alkalinity of the cultivation broth, the liquid to biogas ratio and flow mode operation in the absorption column and microalgae productivity control. Thus, using a cultivation broth as scrubbing solution at a high pH, from 9 to 11, and inorganic carbon between 1200 and 2000 mg/L, guarantees an effective CO2 and H2S absorption in the scrubbing unit, with CO2 concentrations in the range of 1-2% and negligible H2S concentrations typically achieved in optimized systems [104]. Process operation with high microalgae productivities (15-30 g/m 2 d, attained via a high biomass wastage rate from the bottom of the settler) gets a high pH in the culture broth and a large recovery of the digestate nutrients fed to the high-rate algal pond [137]. Finally, the liquid to biogas ratio should be maintained at low values, usually from 1 to 2, preventing an excessive desorption of the dissolved O2 and N2 to biomethane. However, the ratio should be high enough to avoid the acidification of the scrubbing solution that it must keep under 8.3 in the column, which would ultimately limit CO2 absorption. Process operation in co-current flow is preferred in order to avoid sulfur accumulation in the biogas diffusors, which has been observed under counterflow operation [137].
This technology was initially optimized at TLR 5 in indoor and outdoor photobioreactors, both in 180 L high-rate algal ponds or 120 L enclosed tubular photobioreactors, using synthetic biogas and real digestates [138]. In addition, this technology was validated outdoors at TLR 6 in a 10 m 3 high-rate algal pond and in enclosed photobioreactors (11 m 3 ) using real industrial and agricultural wastewater under the framework of the European project INCOVER. This project also developed and validated a control strategy capable of providing a high quality biomethane (<2.5%, CO2; <1%, O2) in order to cope with inherent variations of light, temperature and pH under outdoor conditions [139]. This technology is being further scaled up to TLR 7 under the framework of the European BBI project URBIOFIN in an 80 m 3 high-rate algal pond fed with urban solid waste digestate and biogas (Figure 15), which represents the last step prior to full-scale implementation. The major technology bottlenecks identified are [140]: (i) the need to operate at high alkalinity without external addition of chemicals, (ii) poor performance under cold climate conditions, (iii) high solid content and turbidity of digestates and (iv) a poor microalgae settleability hindering biomass productivity control.
Those bottlenecks can be overcome by dosing digestate to compensate water evaporation losses, installing the photobioreactor under a greenhouse, optimizing solidliquid separation after anaerobic digestion and implementing dissolved air flotation units.
A recent techno-economic analysis, comparing photosynthetic biogas upgrading with a traditional technology (adsorption filter preceding a water scrubbing unit for a reference biogas flow rate of 300 Nm 3 /h), showed that the operating costs of biogas upgrading can decrease from EUR 0.2/Nm 3 to EUR 0.03/Nm 3 . The latter figure including the cost of algal biomass harvesting and drying [137].

Microaerobic H2S Removal into Biological Upgrading Process
Physical and chemical treatments for the desulfurization of biogas have been shown to be more disadvantageous compared with biological treatments in terms of operating costs [141]. Biological biogas desulfurization can be performed either in additional units mainly through biotrickling filters or directly in anaerobic digesters, i.e., by applying microaerobic conditions during the digestion process [142]. Biological treatment of contaminated biogas is a relatively new trend. Other gas desulfurization approaches suffer from high operation costs and produce waste that needs to be disposed of. This method is economically more advantageous and is more environmentally friendly than other techniques. Biological desulfurization of biogas can proceed at lower temperatures and pressures, as well as with limited or no reagent consumption [141].
Microaerobic conditions in a digester are a simple and effective technique for direct H2S removal [143,144]. Microaeration consists in dosing a small amount of air or oxygen (0.005-5 L O2/L reactor per day) into the AD system. This technique is also known as limited aeration, micro-aeration, oxygenation, micro-oxygenation and microaerobic digestion.
Sulfide oxidation involves the following reactions: Microaeration exhibits high removal efficiency (up to 99%) and low operating costs and slightly modifies the anaerobic process [141]. Microaerobic removal of H2S with the supply of O2 (93% purity from an O2 generator) to the headspace of a full-scale digester (2400 m 3 ) has been reported for sewage. The average H2S concentration in the digester under anaerobic conditions was 1840 ppmv. H2S concentration gradually dropped once the microaerobic condition is applied to an average concentration of H2S in the biogas of 180 ppmv with a removal efficiency of 90.2%. Operating costs of EUR 0.0011/m 3 of biogas were estimated [145].
The cost of microaerobic processes for treating WWTP sludge with FeCl3 addition and with the utilization of iron-sponge-bed filter inoculated with thiobacteria has been studied by Díaz et al. [146]. The injection of concentrated O2 as the most profitable option was reported. Furthermore, it presented the highest robustness towards variations in the price of electricity, FeCl3 and in the H2S concentration.
Microaerobic processes have been applied with success on a full-scale in many agricultural waste and sludge digesters but these results have not been reported. Further research and promotion are needed to design full-scale implementation from current pilot-scale studies [143].
Microaerobic digestion technology has attractive advantages of accelerating hydrolysis, preventing volatile fatty acid accumulation, and resulting in high biogas yields. This method has been suggested as an effective measure for helping to solve the anaerobic digestion problems and therefore improve the stability of the AD systems [143]. Recent research has also demonstrated that microaerobic digestion is an effective strategy to enhance the biotransformation of recalcitrant compounds and even organic micropollutants [147]. Oxygen dosage is the key factor to achieve the different advantages of the microaerobic processes [148].

Business Models of Biogas Industry
Biogas is a very versatile energy carrier since it is produced from a wide variety of biomass resources (crop residues, animal manure, the organic fraction of urban and industrial solid waste and wastewater sludge) and it can be used for different energy purposes, such as heat and power by direct combustion or the production of biomethane through upgrading.
A successful biogas plant requires the development of a sustainable business model, and it is necessary to consider some key aspects such as (i) contracting the volume of residues required for the capacity of the plant; (ii) finding the ideal location for the plant; (iii) obtaining the agreements for the sale of biogas/biomethane in advance; (iv) developing the complete business model considering digestion process, biogas and digestate uses, etc.; and (v) searching for investors.
The business model may consider involving partners, utilizing third party investments or other traditional "cooperative" models. The latter includes a centralized digester, in which feedstock coming from different locations are treated, or centralized processing, where biogas and digestate from different digester are processed. Both cases could be owned by a municipality or a third party [149]. Other important parameters for the economic profitability of the biogas production facilities are the plant size, the raw material availability and the transportation related to the feedstock supply. These factors are highly correlated between each other, since larger facilities and/or certain biomass types could need longer distances to meet the feedstock requirements [150].
Therefore, the business models in the biogas industry are quite different and classified according to the raw material used, detailed below.

Biogas from Agri-Food Sector
Different business models have been developed for the agri-food sector, depending on the type of digestion process (mono-digestion or co-digestion) and on the end use of the biogas obtained and valorization of the digestate. The digestion process can use a single waste or substrate (mono-digestion) or two or more substrates (co-digestion). Several studies show that mono-digestion processes are constrained by some factors such as nutritional imbalance, lack of diversified microorganisms and the effect of operational factors. Anaerobic co-digestion processes could help overcome those difficulties, improving the biogas production of the digesters [151]. For example, a bioreactor originally planned to treat agricultural waste could also use municipal bio-waste. In this context, the operator/owner of the treatment plan could charge a tipping fee and increase the final revenues. Several business models can be established depending on the end use of the biogas: both on-site and off-site use of thermal and/or power production, off-site sale of compressed or liquefied biomethane typically used for transportation fuel, both on-site and off-site use of biomethane for injection into the natural gas network or biobased material generation [152]. Successful business models should contemplate the proper management of the digestate, either disposal in an environmentally correct manner or use as fertilizer, compost or other value-added products to improve the economic profitability of the biogas plant [149].

Biogas from Wastewater Sector
In the wastewater sector, the generated SS is usually transformed into biogas through anaerobic digestion. Through this process, in addition to produce biogas, the sludge is stabilized, and its dry matter content is reduced. Similar to the agri-food sector in Section 6.1, different business models can be developed based on the number of substrates used in the digestion process, the end use of biogas and the valorization of the resulting digestate (also known as digested sludge) [70].
The main raw material deriving from wastewater treatment plants is the SS, which is composed of primary and secondary sludge (mono-digestion). Each country might promote the co-digestion of such sludge with other organic substrates, such as municipal and industrial bio-wastes, through national legislation mechanisms.
As mentioned before, different options for biogas utilization exits, both on-site and off-site: conversion to heat and/or power or upgrading to biomethane for injection into the natural gas network or for transportation fuels. The best option will depend on the plant size and energy demand. According to the IEA, the minimum recommended plant size for upgrading to biomethane is 100 Nm 3 . For smaller plants, CHP technology would be a more suitable option since CHP technology is less sensitive to biogas plant sizes.
After the anaerobic digestion process, the digested sludge can be used in agriculture after a composting process or be transported to an incineration plant or landfill. The valorization or final disposal of the sludge will depend on legal boundaries and costs.

Biogas from Organic Fraction of Municipal Solid Waste
OFMSW is another interesting source to produce biogas and/or biomethane. However, running a biogas plant based on municipal biowaste is more expensive than treating agri-food residues. This is due to the presence of inert materials such as plastics, glass, metals, etc., which must be removed prior to subjecting biowaste to anaerobic digestion. Pretreatment of biowaste is therefore essential. Different mechanical sorting processes have been developed to remove these contaminants and recover a "clean" biowaste that can be used as substrate for anaerobic digestion [153]. In this regard, THE separate collection of biowaste will become mandatory in the EU in 2023 [22], which will help reduce the inert content of biowaste from households, increasing the possibilities for using biowaste as raw material for biogas plants as an alternative to subjecting it to composting processes.
As stated in the previous sections, different business models can be established for the municipal biowaste according to the type of digestion process, the end use of the biogas obtained and the valorization of the digestate.
The operation mode and type of the AD system can result in different digestion efficiency of the municipal biowaste. Mono-digestion and co-digestion (e.g., SS, energy crops) of municipal biowaste can be contemplated for biogas production to meet the waste characteristics required for an optimal conversion process [154]. In addition, methanogenesis can be performed in the same reactor (single-phase AD systems) or separately (two-phase AD systems). The selection of using either a single-phase or a twophase system depends directly on the waste characteristics. For instance, single-phase AD systems are preferred for proteinaceous waste, while a two-phase AD system is most suitable for vegetable market waste. Thermophilic digestion is also suitable for AD of municipal biowaste, since it may increase the biogas production potential when compared to the same process at mesophilic conditions [155].
Biogas from OFMSW plants can be upgraded and distributed in the current gas network to be used as fuel for heating/cooling and electricity (replacing natural gas), or directly converted into heat and power in a CHP unit. From an economic point of view, district heating represents an attractive alternative for rural areas (villages with 500-1500 inhabitants), where municipal biowaste is available in lower quantities. In addition, upgrading of the biogas into biomethane and injection into the grid or distributed as fuel, is also feasible at larger scales. For instance, upgrading of biogas to biomethane substantially represents the total use of biogas in Sweden, the Netherlands and Germany [156].
The resulting digestate, from the AD processing of municipal biowaste, can then finally be subjected to composting process to produce fertilizer and soil improver, if the digestate is derived from clean feedstocks. Depending on the quality of the digestate, it can be directly used or mixed with other biowaste prior to the composting processes.

Conclusions
Biogas can play a major role in local energy systems and it helps to decarbonize the gas grid and transportation sector. Natural gas companies have backed biomethane to introduce renewable energy in their systems.
Large amounts of waste feedstocks are produced worldwide which can be used as raw materials to produce energy. The full use of the potential production of biogas and biomethane could cover up to 20% of the worldwide gas demand. Furthermore, biogas from AD has become more than an energy vector because it treats feedstocks such as animal manure or OFMSW that induce serious environmental concerns.
The biogas upgrading technologies which are more commonly implemented today are water scrubber and chemical absorption, the latter being the cheapest. Depending on the size of the biomethane facility, the tendency is to use membrane upgrading technologies, leaving biological upgrading for small plants. The Power-to-Methane route that uses the electrolysis of water to generate hydrogen gas by renewable energy for hydrogenotrophic biological upgrading emerges as a promising technology in these scenarios.
For a greater development of biogas and biomethane production, it is necessary to establish a new legal framework in which these AD and upgrading technologies are sponsored as they contribute to energy system decarbonization and circular economy mandates.