## 1 Introduction  
The use of biogas as a fuel comprises three essential aspects. biogas is a renewable fuel that is produced from the anaerobic digestion of wastes such as animal manure, food, agricultural, domestic wastes, and sewage sludge. This gas contains methane (CH\({}_{4}\)) and carbon dioxide (CO\({}_{2}\)) as major components, with the latter reaching concentrations up to 40% or even more depending on reactor conditions. Methane content in biogas has average values between 51-55% [1]--data reported from the evaluation of Italian biogas plants treating different organates--the high CO\({}_{2}\) levels adversely affect the heating value of biogas, combustion characteristics and composition of emitted gases [2]. The valorization of this gas to produce energy aids in climate change mitigation and reduces the use of fossil fuels. The digestion process also generates a digestate, that can be treated as a residue or as a valuable by-product used as an organic amendment [3, 4], allowing nutrient recycling. A great emphasis has been placed on increasing the efficiency in biogas production as a second-generation biofuel [5; 6]. The continuous increase in the global energy demand and the fact that the primary energy resources available, such as oil, natural gas, coal and nuclear fuel are not renewables, forces the scientific community to search for alternative sources and increase the efficiency of conversion processes for producing bioenergy. Anaerobic digestion can also contribute to reducing the environmental impact and emission of CH\({}_{4}\) as it allows targeting conversion processes, eliminating uncontrolled degradation and dispersed emission of pollutants. In this way, the valorization of biogas can be achieved in waste treatment plants for producing energy or upgraded to achieve a quality similar to that of natural gas [7]. Several studies have focused on improving digestion performance of sewage sludge by the application of different techniques, through the addition of supplements [8; 9; 10], the application of pre-treatments [11; 12; 13], and co-digestion [14; 15; 16] as a way of enhancing biogas production and benefiting from the common utilization of plant equipment. The introduction of a pre-treatment unit in an existing digestion plant causes changes in the electrical and thermal demand because of the additional equipment installed. There is an increasing concern about the energy demand and emissions derived from the use of fossil fuels, creating social pressure for making alternative fuels more accessible and economically feasible in accordance with sustainability criteria. Renewable sources offer a wide range of attractive options, as they are unlimited, but the degree of dispersion that this type of energy production has may condition their feasibility [17]. Digestion plants for treating sewage sludge, livestock, food and agricultural wastes to produce biogas have been installed worldwide. However, several studies reported that the plant scale closely affects techno-economic viability, which is associated with the availability of financial incentives such as feed-in tariffs and electricity selling price [18; 19]. Levelized costs related to electricity production are lower for large-scale plants because large-scale devices have more efficient conversion coefficients and lower capital costs per unit of electricity produced [20]. Additionally, energy performance studies should consider the whole plant configuration and the energy demand linked with each specific process unit. Otherwise, any attempt to increase biogas yields may lead to a disappointing global performance because of the extra energy demand [21]. The use of biogas in engines and boilers has become the most common way of valorizing biogas. The use of combined heat and power (CHP) engines for heat and electricity production shows better performance in terms of greenhouse gas (GHG) emission reduction due to the on-site use of electricity [22].