Addressing Challenges and Outcomes in the Biogas Sector: An Analysis of E ﬃ ciency, Economic Savings, and Environmental Impacts Using an Advanced SWOT Model

: This study, through the use of company data, o ﬀ ers an in-depth analysis of the current situation and future prospects of biogas plants and how they can promote economic advantages and environmental bene ﬁ ts. The geographical context of the Piana del Sele (Salerno, Italy) was chosen on the basis of objective criteria, including its relevance in the agro-industrial sector and the availability of accurate and reliable company data that was collected through IT systems, including software business performance monitoring and digital data analysis. This choice was fundamental to guaranteeing the validity and representativeness of our analyses and results. From a methodological point of view, mathematical formulas and algorithms were used, which allowed the calculation of the biogas producibility indices by type of biomass as well as the quanti ﬁ cation of the e ﬄ uents produced to then estimate the quanti ﬁ cation of the biogas and the interconnected economic savings. Furthermore, this study uses the SWOT (strengths, weaknesses, opportunities, and threats) approach in an innovative way by integrating renewable energy communities into it. The aim is to demonstrate the potential of biogas plants and how energy communities can transform weaknesses and threats into opportunities. The results show that the integration of biogas plants into the farm environment o ﬀ ers considerable potential, and although it is a challenge for small and medium-sized farms, it could bring energy self-su ﬃ ciency and economic surplus. Furthermore, the integration of renewable energy communities would be able to promote the diversi ﬁ cation of energy supply and transform weaknesses and threats into opportunities.


Introduction
Population growth, globalisation, and unrestrained consumption of resources [1] have generated various environmental and local problems [2][3][4] with significant repercussions on ecosystems and population health.Currently, environmental concerns are a prevalent topic on every political agenda.At the European level, strategies and measures to promote a sustainable future and a fair energy transition have been adopted since 1987 with the Brundtland Report.Since 1987, we have witnessed an evolution of the concept of sustainability [5] with the Sustainable Development Goals (SDGs), which strive to create a framework for economic policies that can harmonise economic growth and sustainable development, all the while safeguarding the well-being of the population.The concept of sustainable development and the energy transition are two interconnected elements that play a key role in addressing ongoing environmental and socio-economic challenges.In the first decade of the 21st century, due to environmental issues, renewable energy sources are playing a central role [6] with investment in the sector growing relentlessly since 2004, reaching USD 257 billion in 2011.The deployment of renewable technologies [7], in addition to being key to decarbonising the global economy, plays an important role for countries with low-efficiency rates, improving energy security [8][9][10][11].Furthermore, renewable energy production can generate effects on economic growth [12] as well as CO2 emissions.
The energy crisis and global warming can significantly affect the quality of human life standards [13], which is why at the governmental level, policy measures have been promoted to encourage the spread of renewable energy sources [14].In the last decade, biomass energy has seen remarkable success due to its dual role in energy production and waste management [15].In fact, through the process of anaerobic digestion, it is possible to transform crop and livestock waste and produce energy and biological compost.The latter also plays a central role in terms of food security, promoting the spread of economically sustainable models of organic farming.From a policy perspective, important milestones have been achieved through the European RED-II Directive (2018/2001/EU), and studies [16] have analysed through a comparative analysis biogas policy in Europe, confirming that economic instruments have proven to be effective and how policies might not have the same effect when adopted in different geographical and socio-economic contexts [16].
The use of energy from fossil fuels has generated problems on a local and global scale [2][3][4], with significant impacts on eco-systems and biodiversity loss.An interesting bibliometric analysis [15] has confirmed that bioenergy has garnered the highest level of success and consensus within the realm of renewable energy.Biogas, in particular, is positioned as a promising solution for producing clean energy and alleviating environmental impacts [17], as well as fostering circular economy processes [18].In the literature [19,20], several studies have analysed the effectiveness of biogas in different geographical areas [21,22] and confirmed the environmental, socio-economic benefits and interconnected externalities [23][24][25].
However, the originality of this study lies in a two-pronged analysis involving a consortium biogas plant and a small farm, with the aim of quantifying economic savings and assessing the possible achievement of energy self-sufficiency.
The geographical reference area is the Piana del Sele [26] in the province of Salerno (Italy).This area, with cattle and buffalo breeding [27] and a variety of agricultural crops [28], plays a central role in the Italian agro-industrial sector, producing products of excellence.However, livestock waste, if not properly managed, could generate eutrophication processes through soil and groundwater pollution.To observe strengths and weaknesses, several studies use the SWOT methodology [29,30], considering its economic and environmental advantages.However, although the expansion of the SWOT model is widely used in various sectors [31][32][33], no study on biogas presents an expansion of the SWOT model in order to investigate the contribution of renewable energy communities [7] to ensure a decentralised territorial distribution that can foster socioeconomic development [34].
This research confirms that anaerobic digestion plants have several potentials and also prove to be a viable alternative for the production of compost and organic fertiliser, which could generate a number of added values for the farm [35].However, the initial investment cost makes the development of small-and medium-sized enterprises difficult.In this context, the development of renewable energy communities [36] could inevitably make an important contribution to ensuring their development and the diffusion of new sustainable industrial paradigms in rural areas [37].The results confirm that a mediumsized agricultural enterprise could achieve energy self-sufficiency and obtain an energy surplus for the domestic market; moreover, the provision of an energy community would guarantee the delocalisation of facilities [7], with important economic and social spin-offs.
The next sections of the article will be as follows: (I) Materials and Methods; (II) Results and Discussion; (III) Conclusions.

Materials and Methods
This section provides a detailed overview of the methodologies and tools used in this study to conduct the analysis, as well as specifying the procedures adopted for data collection, processing, and interpretation.The data used for the current study were collected in accordance with the ethical principles of scientific research.All company data used was obtained through access to internal records and information resources of the company under study, subjected to a rigorous control process, and used for analysis.The company granted consent for the use of the data, guaranteeing the anonymity and confidentiality of sensitive information.The methodology for calculating biogas energy yields adopted in this study is mainly based on previously validated mathematical formulas available in the scientific literature.A reference Formula (1) from the literature [38] identifies the calculation of biogas produced by the plant with reference to the amount of volatile matter in the total biomass introduced into the digester expressed in Nm 3 /kgVS volatile matter and depending on the biodegradability of the biomasses conferred [38].
where the specific production of biogas (SPG) expressed in Nm 3 /tVS volatile substrate and (Qbiogas) indicates volumetric flow rate, referring to the specific gas production expressed in Nm 3 , and PVS indicates the amount of the volatile solids expressed in tons.
In this study, the formula was adapted based on the characteristic data available in the literature for the specific biomass and the actual data provided by the biogas plant.All of the formulas were applied to the specific data of the consortium plant and the case study company in order to make estimates of biogas production efficiency and economic and environmental benefits.However, in order to further refine the calculations, detailed information provided by the company's computer system was used, which allowed a double check of the data used.This study includes accurate calculations to observe the economic savings and to discuss, in the medium and long term, what the economic, environmental, and social benefits could be.These were made on the basis of current consumption trends derived from official data provided by the case study company and compared with biogas production and current electricity prices.To conduct these analyses, energy consumption in the year 2022 was divided into three macro areas (R1, R2, and R3), representing the energy consumption range.
In addition, based on the SWOT methodology [39,40], an extension of the model is presented in order to integrate and incorporate renewable energy communities [41,42] and demonstrate how they can transform weaknesses and threats into opportunities such as sharing the initial investment.In the literature, many studies [31][32][33] have adopted an expansion of the SWOT model in various sectors; however, no study has focused on biogas plants or renewable energy in general.This innovative approach represented through a theoretical framework, provides a clear and comprehensive explanation of the potential of biogas and the prospects for future local deployment, with possible social and economic repercussions.The expansion of the SWOT model was carried out following the analysis of company data and the identification of potential cooperation between the company under study and other renewable energy infrastructures.The use of company data and mathematical calculations based on the scientific literature, together with the expansion of the SWOT model, constitute the key methodological approach used in this study.
The presented framework (Figure 1) describes all the steps used to obtain the quantities of biogas produced in the consortium plant and then calculate, based on the case study of the company, what the standard energy consumption and possible economic benefits of implementing a biogas plant are.

Calculation of Producibility Indices by Biomass
This section analyses the amount of biogas produced by biomass and attempts to provide a clear and detailed description of the matrices used during the anaerobic digestion process.However, the amount of biogas generated depends on several factors: composition, temperature, and the organic load inserted [43][44][45][46].
Biogas is a mixture consisting of various types of gases from the breakdown of organic matter, consisting of methane and carbon dioxide, plus other compounds present in smaller quantities, including oxygen, nitrogen, carbon monoxide, hydrogen sulphide, ammonia, and water vapour.When biogas is augmented in cogeneration engines, it serves as an excellent fuel source for power generation.The composition of biogas exhibits considerable variability and is highly dependent on the feedstock [47].
The parameter for determining biogas production is the BMP (Biochemical Methane Potential), which indicates the maximum volume of biogas produced by the substrate and is expressed as Nm 3 /tvs, where VS is the number of volatile solids.This parameter is influenced by many factors, such as the degradation process, presence of nutrients, temperature, and type of substrate [38,48].
The most energy-exploitable component is the methane CH4 [49].In fact, for the purpose of energy evaluation of biogas, it is also necessary to indicate the percentage of methane (%CH4) present in the biogas expressed as a percentage of the BMP value, which usually varies between 50 and 80 percent [48].
Within this discussion, for simplification purposes, it is assumed that the methane potential coincided with the BMP values, although a more detailed evaluation should consider the percentage of methane within the biogas.
For the determination of producibility indices, total solids (TS) and volatile solids (VS) were calculated for each type of biomass, as the parameters are representative of the organic fraction that is decomposed in the digester.The value that best highlights biogas producibility is the volatile solids, as they indicate the content of organic matter that is decomposed [50][51][52].The reference values of TS and VS were obtained for each biomass from literature data and are given in the following sections.
In the following discussion, the production effects resulting from the co-digestion of different substrates have not been discussed because, from the data provided by the plant, the use of digester-initiated biomass is mainly attributable to buffalo wastewater, so it is assumed that the mixing effect of different biomasses is not significant for energy purposes.

Vegetation Waters from Olive Industry
The total solids (TS) and volatile solids (TVS) values of vegetation water were considered the values derived from the chemical characterisation of pitted pomace from the olive oil industry from tests conducted by the Animal Production Research Centre (Centro Ricerche Produzioni Animali or CRPA) [48] The chemical characterisation of the matrices used in the plant contains the following values: TSvegetationwater (total solids = 416.1 g/kg); VSvegetationwater (volatile solids = 97.1%TS);BMPvegetationwater (biochemical methane potential= 259.9 Nm 3 /tVS) where tVS is the amount of volatile solids expressed in tons [24].
In line with the literature [38,53] and based on the data available from the case study, Formulas (2)(3)(4) were adapted to calculate the total solids, the volatile solids in the digester, and the specific biogas production.The data used are those provided by the case study in the year examined.
Knowing the annual total weight of biomass conferred, it is possible to derive an estimate of the total solids sent to digestion as the product of the annual weight of the biomass conferred and the characterisation value of the  [48] where  is the annual weight of biomass delivered in kg and TS is the characteristic value of total solids in g/kg (2).
The amount of volatile solids  , is expressed as a percentage of the total solid, so the weight of volatile solids is derived by multiplying the amount of total solids previously calculated  , and the characterisation value percentage of volatile solids to total solids in olive pomace [48] where  , is the previously calculated total solids and  is the characteristic value expressed as a percentage of volatile solids to total solids (3).
The amount of biogas produced from the biomass is calculated by multiplying the biochemical methane potential value by the amount of volatile solids where BMPvegetation water is the biochemical methane potential expressed in Nm 3 /tVS and PVS,vegetationwater are the previously calculated volatile solids (4).

Cheese Serum
For the evaluation of the contribution to biogas production given by the valorisation of cheese serum [54], the parameters of chemical characterisation and average biogas production yields were taken from CRPA data reprocessing [55].Subsequently, to carry out the analysis, the values present in the literature relating to the average yields and the chemical characteristics of the serum will be used.The values are the following: VSserum (volatile solids = 55 kg/t); BMPserum (biochemical methane potential = 0.75 Nm 3 /kgVS) [55].
Using the same procedure as in Section 2.1.1,Formulas (3) and ( 4) were adapted to the data provided by the case study and the characteristic data obtained from the literature [55].
It is possible to estimate the weight of the volatile solids sent to digestion as the product of the annual weight  as it is of the serum biomass delivered and the characterisation value of the VS for whey [55], where  is the annual weight of biomass delivered in tons and VS is the volatile solids in kg/t (5).
Multiplying the characteristic value of biogas production  by the amount of volatile solids contained in the serum by the amount of volatile solids gives the volumetric biogas flow rate, where  is the methanogenic potential expressed in Nm 3 /kgVS and  , is the previously calculated total solids (6).

Buffalo Wastewater
The objective is to evaluate a biogas production yield coefficient from the digestion of buffalo wastewater alone.
For the calculation of the biogas production yield from buffalo wastewater, the parameters for the characterisation of total and volatile solids were provided by the plant and refer to periodic tests carried out on buffalo wastewater biomass performed at the plant with the appropriate instrumentation.The parameters are expressed in kg of total and volatile solids versus the weight of buffalo wastewater in kg (Table 1).The value used was obtained as the arithmetic mean of the three tests provided ( 7) and (8).
The average values calculated in this way are taken as characteristic values of total and volatile solids referred to as the buffalo wastewater biomass.
The weight of buffalo wastewater is assumed as the sum of the quantities of slurry and manure (9).
Similarly to the above, the weight of the total solids  , sent to digestion is calculated as the product between the annual weight of the biomass delivered  and the characterisation value of the TS referring to the livestock manure, where  is the annual weight of biomass delivered in kg and  is the total solids in g/kg (10).
The weight of the volatile solids  , is calculated by multiplying the characterisation value of the  and the annual weight of the biomass  (11).
Having calculated the total biogas production from water vegetation and serum from dairy, the amount of biogas produced from the digestion of buffalo wastewater alone is obtained by subtracting the amount of biogas produced from the digestion of vegetation water  , and serum  , from the total biogas production  (12).
For simplicity, it is assumed that BMP is assessed analytically by defining an index derived from the ratio between the quantity of biogas produced in the plant and associated with the digestion of the buffalo wastewater previously calculated as  , and the weight of volatile solids contained, where  is the biogas production index expressed in Nm 3 biogas/tVS (13).

Case Study: Livestock Farm
The quantification of the effluents produced by the case study of a buffalo livestock farm refers to the calculation methodology proposed by the Regional Regulations.The methodology considered the characterisation of the animals according to Table B of the Campania Region's Executive Decree No. 20 dated 26 January 2021 [56] for the buffalo species and for the different stabling cases that the regulations consider.
The Regional Decree clearly shows how buffalo wastewater production is highly dependent on the type of animal (animal for milk or meat production), the age (calves 0-6 months, buffaloes up to 1st calving, buffaloes in production), the type of housing (free or loose stalling), and the details of the housing (use of permanent litter, bedding, or cracked).
According to Table B of the Regional Decree, the calculation of buffalo wastewater is based on the calculation of the live weight of the animal (l.w.) expressed in kg/head identified in the table by animal category (in our case study, identified under the headings "dairy buffaloes in production", buffaloes in milk production up to 1st calving' and 'calves in weaning (0-6 months).
A specific algorithm ( 14) and ( 15) was used to quantify the slurry and the manure produced by the case study [56].

𝑉
where ° indicates the number of animals of the livestock farm subdivided for the different categorisations; (l.w.) indicates the live weight expressed in kg/cattle; regulatory value Vmanure indicates the reference value for the production of manure as identified in the legislation and expressed in m 3 per tons of live weight (l.w.); regulatory value Vslurry indicates the reference value for the production of slurry as identified in the legislation and expressed in m 3 per tons of live weight (l.w.); i indicates the category of animal referring to different types of stalling;  indicates manure volume effluent expressed in m 3 produced by all animals (14); and  indicates slurry volume effluent expressed in m 3 produced by all animals (15).
To consider the presence of more than one type of housing on the case study farm, index weights were assigned for each type.As communicated by the case study company, the most frequently used types were assigned a weight of 0.8 and for all other types a weight of 0.2 or 0.1. Below, .
Next, it is feasible to calculate the quantity of biogas potentially producible in the consortium biogas plant due to the quantity of wastewater produced by the company with the following formula: multiplying the biogas production indicator previously calculated  in Section 2.2 by the weight of livestock farm  (18).
The last section of this study aims to analyse the energy consumption of the livestock farm taken as a case study for the entire year 2022 in order to assess whether a small or medium-sized enterprise adopting a biogas plant can achieve energy self-sufficiency.Given the high initial cost of the investment, the objective of this project is to evaluate selfsufficiency and economic savings in terms of energy and subsequently consider the possibility of creating an agricultural energy community [57], which could be profitable due to the division of the initial investment costs among the participants.The analysis will focus on the entire year 2022, taking into consideration the farm's energy consumption.The company's electrical energy consumption is taken to be the quantities reported in the consumption bills, referring to the company's consumption bills.In addition, in order to make a detailed analysis of the consumption related to the company, consumption from the use of a small photovoltaic system owned by the company, which contributes to the overall energy consumption, was added to the consumption recorded on the bills.
Electrical energy consumption is estimated using the following Formula (19): where (F) indicates the electricity consumption referred to monthly bills expressed in kWh; (i) denotes the months of the year; (j) indicates the time slot of consumption (j = 1, 2, 3);  , indicates the energy produced by the photovoltaic system and consumed by the livestock farm expressed in kWh; and  indicates the electricity consumed in the year 2022 expressed in kWh.
In the analysis, electricity production from the farm's buffalo wastewater, as indicated by the plant's data, will also be considered.Through this detailed analysis, it will be possible to assess whether the biogas plant can cover the entire energy needs of the farm, bringing it to self-sufficiency.Economic aspects will also be taken into account, evaluating the savings achieved through the adoption of the biogas plant.

Results and Discussion
In this section, the results obtained in economic and environmental terms will be presented.First, an exploratory analysis of the consortium's biogas plant will be conducted, which plays a crucial role in assessing the efficiency and optimisation of operations within a plant fuelled by different biomasses.In the second step, we will calculate the biomass productivity indices, also focusing on case studies.The purpose of the exploratory analysis is to examine the quantity and quality of biomass used and identify inefficiencies and critical issues during production cycles in order to increase efficiency [58] and reduce environmental impacts [59].The exploratory analysis will provide a comprehensive overview of the characteristics and performance of the plant and will subsequently be used to obtain estimates for our case study to observe the energy efficiency and economic savings for a small-to medium-sized enterprise [60].The objective is to observe whether companies can meet their energy needs using internal and external renewable sources through the creation of renewable energy communities [41,61].Energy self-sufficiency plays a dual role, allowing for reduced consumption and optimised use of resources.In addition, connection to smart electricity grids would implement a sharing system where excess energy is fed into the national grid with economic and environmental benefits, as well as contributing to the reduction in energy poverty [62].

Description of the Consortium Plant
Figure 2 details the material flow, interconnections, and actions implemented within the consortium plant to promote a circular economy.Through this process, the aim is to maximise the utilisation of resources and reduce waste and environmental impact.In addition, energy efficiency strategies are also developed and implemented within the consortium plant, such as cogeneration, where electricity is used as an input within the neighbouring dairies.All observations are expressed in tons and are classified according to the type of biomass delivered.Based on annual company measurements, the data used in the following work were provided by declarations issued by the plant itself.The analysed plant is an anaerobic digestion plant consisting of a digester equipped with a gasometer dome and a cogeneration engine with a nominal installed power of 249 kW.The composition of the biomass that makes up the digester diet in 2022 has been detailed in Table 3.The data are broken down by type of biomass indicated in Table 3 by the letter (j), and for each of them, the quantities delivered to the plant for the months of the reference year, indicated by the letter (i) from January 2022 to December 2022, are shown.Table 3 indicates the amount of biomass delivered to the plant by biomass type and month of delivery (i).The digester diet is varied and follows the local production of the contributing farms.Whey, from the cheesemaking of buffalo milk, is produced by the dairies evenly throughout the year and delivered daily to the plant.However, it is necessary to elaborate on some relevant observations concerning the vegetation water.Vegetation water undergoes a storage process during olive harvesting and processing phases that generally range from October to February.But, in the consortium plant, it is stored in silos and is used throughout the year with a precise dose applied.For biomass related to buffalo manure, production is homogeneous since it is related to animal feed that does not undergo particular variations during the year.Buffalo slurry, on the other hand, is delivered during the winter months, months in which spreading on terns is prohibited, and therefore, the livestock farms participating in the consortium plant conferred it on the plant.The separated digestate, on the other hand, is an internal biomass of the plant and is dosed with an automatic system that measures the microbial activity inside the digester and when the values are low it activates the digestate recirculation mechanism.
The company, in managing the production cycle, reuses the digestate by recirculating it within the digester [63].For the estimation of producibility in the following discussion, it is assumed that this biomass does not contribute, in quantitative terms, new production to the total energy and biogas produced, as digestate is by definition a by-product of anaerobic digestion that has already been stabilised [63,64].
From the graphic representation (Figure 3), it can be seen that buffalo manure (81%) and serum (17%) are the matrices with the highest percentage, whereas buffalo slurry (2%) has a much lower percentage.Similarly, data on electricity production from biogas cogeneration were provided by the biogas plant based on the annual declarations provided to the Energy Services Operator (Gestore dei Servizi Energetici or GSE).The data provided refers to the year 2022 and indicates the amount of biogas produced and sent to the cogeneration process expressed in mass terms in cubic metres of biogas produced and the electricity produced and fed into the national public grid expressed in kWh of energy produced.The data refer to the twelve months of the year (Table 4).

Months Energy Production [kWh]
Biogas [m 3 ] Total 2,042,715.65999,366.00 Dividing the total energy produced by the plant by the total biogas produced gives an indicative index of energy production expressed as kWh/m 3 of biogas produced per year.This index is equal to 2.04 kWh/Nm 3 /year.
It should be noted that there was a lower production figure in July because the plant was down for about 5 days for routine maintenance.
In addition, the case study includes a varied diet but consists of 83% buffalo wastewater.With the objective of calculating the biogas production of the consortium plant, the composition and size of the farms, along with the type of manure, significantly affect the biogas production, as farm characteristics could change during the course of the year [56].
To estimate biogas production yields from the delivered buffalo waste fraction, we calculate the volumes of biogas produced from the known biomass fractions delivered to the plant, namely vegetation water and dairy whey.The results presented in Table 5 depict the respective values for total solids (TS) and volatile solids (VS), as elaborated in Section 2.1.1.By utilising the biogas production data related to the specific biomass, it becomes feasible to compute the percentage contribution of vegetation water digestion to the overall biogas production in the given year.This can be achieved by dividing the previously determined quantity by the total biogas output of the plant and then multiplying the result by 100 as elaborated below.In line with the previous biogas calculation in Section 2.1.1 the Materials and Methods, Formula (20) provides a simplified explanation of the calculation of the % This calculation provides a percentage representing the share of biogas production attributable specifically to the digestion of vegetation water and calculates the plant's total annual biogas production.At the conclusion of the analysis, the outcome is determined to be 13.78%.This figure is of particular importance since it highlights the effectiveness and efficiency of the use of agro-industrial waste and by-products in anaerobic digestion and the ability to significantly increase productivity, especially for small-scale plants fed only with livestock manure [48].

Calculation of Volatile Solids (kg) and Biogas Production (Nm 3 ) for Serum
The results in Table 6 are obtained, which describes the corresponding values for total solids (TS) and volatile solids (VS) as described in Section 2.1.2.This value expresses the annual biogas production associated with the degradation of the volatile solid content in the serum.It is therefore possible to calculate the contribution, expressed as a percentage, of biogas production from the digestion of whey alone compared to the total biogas produced by the plant.The annual biogas production from the digestion of whey alone is given by the following formula, which has already been used previously (21).
The use of dairy whey in the digester makes a significant contribution to biogas production because it brings a high content of organic matter to the digestion process that is biodegraded within the digester, as is all food industry processing waste [38]; however, due to its elevated acidity levels, it is mostly used in co-digestion with livestock manure.Calculating the contribution to biogas production attributable to the buffalo wastewater fraction alone, we obtain that buffalo wastewater contributes about 68.58% of the total amount of biogas produced (22).
Having all the variables available, it is possible to proceed to calculate the buffalo wastewater biogas production index.The latter will provide us with interesting results on the energy yields, economics, and environmental externalities that a biogas plant could generate.
The calculation of the biogas production index from buffalo wastewater was carried out by performing the ratio between the amount of biogas produced in the plant from the digestion of buffalo wastewater and the weight of volatile solids contained, using the previously mentioned Formula (13) in the Materials and Methods section: where  is the biogas production index expressed in Nm 3 /tVS.For the examined biogas plant, the following results are obtained and shown in Table 8.This value is an approximation that does not take into account biomass co-digestion effects, but in the specific analysis, it is considered acceptable since the composition of the total diet consists of 83% buffalo wastewater.In addition, the strong variability related to the type of livestock farm that affects biogas production [56] was also not taken into account because it makes up the majority of the diet and since the data provided refers to one year of plant operation, and therefore, it is assumed that these effects are distributed over time and are constant in a long-term analysis.

Calculation of Biogas Production (Nm 3 ) for Livestock Farm
The case study analysed concerns a buffalo farm located in the province of Salerno, in Campania (Italy), characterised by a herd divided as described in Table 9: Table 10 shows the estimate of the volumes of wastewater produced for the case study described in Section 2.1.3,the Materials and Methods and Table 11 indicates the values used and the calculation of the biogas produced.In order to estimate the company's energy consumption, consumption data were obtained from the bills reported for 2022 that were provided by the company.
Table 12 shows the company's energy consumption, which is divided into three macro-categories (R1, R2, and R3) and into photovoltaic production, where R1, R2, and R3 are the subdivisions of energy consumption during the day.In particular, R1 indicates energy consumption during weekday daytime hours, R2 indicates consumption during weekday morning and evening hours, and R3 indicates weekday nighttime and full-day holiday consumption and is given in kWh.The data were obtained from the electricity bills of the grid operator in the livestock farm case study.Total energy consumption  in the previously mentioned Formula (19) in Section 2.2, is equal to 37,576.00kWh/year.
As mentioned before, these refer to the electricity consumption range and are used to determine and set the cost of energy.From Table 12, it can be seen that the company has higher consumption in the range (R3), which gives it access to lower tariffs.
Considering an average cost of 0.365 € per kWh, the total expenditure is around EUR 13,715.24.
Multiplying the power production index, as calculated in Section 2.1 by the amount of biogas produced, calculated in Section 3.1.3by the buffalo wastewater produced by the livestock farm, it is possible to provide a potential estimate of the electrical energy that can be obtained from the contribution of the degradation of buffalo wastewater produced by the livestock farm and enhanced within the consortium plant.
The results are shown in the following Table 13: Applying the same price per kWh (0.365 €) results in an annual revenue of EUR 62,523.12.This would allow the company to achieve energy self-sufficiency and contribute to the national electricity grid, thus supporting a sustainable energy and agribusiness transition.
However, the initial investment required is very high and could be difficult for a small or medium-sized farm to sustain.In this situation, considering that the farm would achieve energy self-sufficiency and have a surplus of EUR 48,807.88,this study will aim to analyse, through a SWOT analysis, the possible creation of a renewable energy community.
The SWOT analysis (focusing on strengths, weaknesses, opportunities, and threats) serves as a valuable tool for gaining insights into the company's position concerning the establishment of the biogas plant and the formation of a renewable energy community.This method empowers us to evaluate the strengths, weaknesses, opportunities, and threats linked to this endeavour.It aids in the identification of strategies to optimise strengths, address weaknesses, leverage opportunities, and confront threats, all with the overarching objective of achieving energy self-sufficiency and sustainable operations for the company.Below, Figure 4 provides a visual representation of the SWOT analysis and its expansion.In the literature, there are several studies [30] on biogas that aim to observe the criteria for private stakeholders through the SWOT-HP-TOWS analysis.Subsequently, in the strengths section, three relevant characteristics are identified and analysed that represent significant internal advantages:  Environmental sustainability: The use of the biogas plant plays an important role in reducing the ecological footprint [65,66] and in favouring the energy transition.


Cost reduction: Biogas is produced using waste material, which would otherwise require disposal costs.This promotes the adoption of a sustainable and cost-effective approach, contributing to resource efficiency and the circular economy [21][22][23]. Waste management: A further interesting aspect is related to the correct management of waste, which, if not properly disposed of, can generate negative environmental externalities with repercussions on soil quality and consequences on human health.The use of the biogas plant allows us to treat and adequately exploit livestock effluents and crop waste, reducing the negative environmental impact and promoting soil quality and human health [67,68].
The second section concerns the weaknesses of biogas plants.Moreover, in this case, three macro-areas have been identified that will be discussed in detail below:  Initial investment: The initial investment for the installation of a system [69] is usually very high and requires a long-term payback period.This can pose a challenge for small farms that may have difficulty experimenting with and implementing the plant.


Dependence on the availability of organic material: One of the weaknesses is linked to the dependence on the availability of organic material [70].In this respect, the correct location of biogas plants is also important [71,72].


Management complexity: The management of the plant requires qualified personnel with specialised skills for its management and maintenance.This process, however, could favour the spread of green jobs [73].
The third section concerns the opportunities of biogas plants, which will be listed and described below:  Access to incentives and financing: These are important opportunities that, through feeding tariffs [74], are able to guarantee fixed repurchase prices.In addition, depending on the geographical area of reference, national governments could support the spread and development of biogas through public funding.In this respect, private financing programmes can also play an important role through financing and soft loans [75].


Positive corporate image: It improves the reputation among stakeholders and investors, increasing the level of corporate social responsibility.Moreover, this aspect also plays a crucial role in attracting new investors [76]. Additional economic revenue: The construction of a biogas plant guarantees the company added value, thanks to the production of thermal and electrical energy and biological soil improvers.In this perspective, it can contribute to improving synergies with agriculture, promoting the development of sustainable agriculture that could guarantee an additional source of income [20][21][22][23].
The last section covers threats, which will be discussed in detail below:  Ecological impact: An interesting aspect that deserves to be analysed among the threats of biogas plants is related to their ecological and environmental footprint.Several studies confirm that, if not regularly monitored and managed, they can generate significant environmental impacts [77,78] that should not be underestimated and, at the company level, should be analysed through a product life cycle assessment (LCA) procedure [79].Indeed, biogas plants are subject to several operational risks that can compromise their safety, efficiency, and production.Among the main risks are the accumulation of potentially explosive gases, contamination of feed materials, power problems, and equipment malfunctions.


Local resistance: The siting of a biogas plant could generate the "Nimby" (Not in My Back Yard) phenomenon [80,81] from residents due to concerns about odours and visual impact.From this perspective, local resistance can lead to significant challenges in terms of plant planning and approval. Environmental rules and regulations: Evolving regulations or environmental requirements can add operating costs and create obstacles to plant operations [82,83].
The integration of renewable energy communities within the SWOT model (Figure 4) is an important extension that, if adopted correctly, could generate numerous benefits in economic, environmental, management, and planning terms.Indeed, through careful analysis, it can be shown that these communities could play a significant role in turning weaknesses and threats into opportunities in the energy sector.Their integration into the model allows the potential impacts of renewable energy to be considered in the context of analysing strengths, weaknesses, opportunities, and threats.They contribute to the diversification of the energy supply [84], reducing dependence on conventional energy sources, and promoting energy security and community empowerment at the national and European levels [41].In addition, they promote the development of a circular economy [85], stimulating local job creation and reducing greenhouse gas emissions.SWOT analysis, including renewable energy communities, enables the identification and assessment of potential weaknesses and threats in the energy sector.Energy communities promote technological innovation [7] and progress in the renewable energy sector [85], opening up space for research and development of advanced solutions.In detail, examining the aspects considered in the section "Weaknesses", significant benefits associated with the spread of renewable energy communities emerge [86].Such diffusion would first and foremost allow the initial investment to be shared among multiple participants, reducing the economic burden on each member.In addition, promoting collaboration and cooperation among technical specialists would improve efficiency in the overall management of projects.An additional element of interest is the synergy created between energy communities and local farms.This synergy allows the biogas plant to be fed with a variety of biomass from different agricultural sources.Such diversification [87,88] could ensure even more satisfactory results in terms of overall energy yield, thus contributing to the sustainability and efficiency of operations [89].
Furthermore, an analysis of the elements displayed in the 'Threats' section of the SWOT analysis reveals interesting opportunities.Biogas plants, when operating within a community, can benefit from increased access to qualified personnel and the possibility of sharing multidisciplinary and innovative ideas.This context fosters the creation of meaningful collaborations and cooperation between research and development (R&D) teams, promoting knowledge sharing and the eventual development of innovative patents, which, once obtained, could help reduce the environmental and ecological footprint [90].
In addition, through a structured project, it would be possible to ensure the construction of plants in a dislocated manner and avoid local resistance [80,81].A further interesting aspect relates to environmental standards and regulations [82,83].Since renewable energy communities also generate impacts from a socio-economic perspective, we believe that it would be possible to increase political involvement and discussion between policymakers and stakeholders in order to achieve a stable equilibrium condition that, through investments and subsidies, allows biogas plants to be in line with current standards and regulations.

Conclusions
This study offered a comprehensive analysis of the dynamics of the biogas sector, examining, through a case study, energy yields and economic savings.The results confirm that biogas plants play a central role in facilitating the energy transition and ensuring the diffusion of the circular economy.However, a careful analysis of the studies in the literature shows that the initial investment is one of the main obstacles to its diffusion.Following a detailed analysis of the consortium system and of the company case study, interesting results have been obtained from a socio-economic and environmental point of view.
However, to fill the gap in the literature, the analysis focused on three key pillars: operational efficiency, economic sustainability, and environmental impacts.Through the adaptation and application of an advanced SWOT model, enriched by the integration of renewable energy communities, a deeper understanding of the challenges and successes within this rapidly evolving sector has been obtained, and it has been documented how renewable energy communities can help promote the decentralised development of biogas plants.
The presented results demonstrate concrete improvements in operational efficiency, accompanied by substantial economic savings and positive environmental impacts.These positive results largely stem from an innovative approach that promotes collaboration between biogas companies and renewable energy communities.This partnership model, focused on the expansion of the SWOT model, concretely demonstrates how weaknesses and threats can be transformed into real opportunities, thus contributing to the sustainable growth of the entire sector.Furthermore, the study provides a clear overview of the benefits that small-and medium-sized farms can derive from the management of livestock manure through the use of biogas plants.
The originality of this approach is manifested in its ability to improve not only the efficiency and economic aspects of the sector but also to favour a positive environmental impact, in line with the growing demands for sustainability.Ultimately, this study paves the way for new opportunities within the biogas industry, fostering a vision of collaboration, innovation, and ethical responsibility, and offering significant policy implications.The literature confirms that the diffusion of biogas plants faces two obstacles, which are linked to the nature of the investment and to the approval and regulatory processes, which should be simplified to incentivise and promote the growth of the sector.
A further interesting aspect should be linked to the promotion of cooperation between companies and communities by offering tax and financial incentives.
However, this study has some limitations.The data used were obtained from a single business case, which may limit the generalizability of the results.In this direction, it could be interesting to use a larger sample to obtain a more complete overview of the biogas sector.Moreover, all the calculations provided in this study are based on historical data and current trends, so the inclusion of future variables could influence future results.In addition, future research could conduct comparative research to better understand the variations and nuances of different business contexts, analyse the dynamics of collaboration between companies, and build successful collaboration strategies.

Figure 2 .
Figure 2. Circular economy developed in the biogas plant.

1 .
Calculation of Total Solids, Volatile Solids (kg), and Biogas Production (Nm 3 ) for Biomass Vegetation Water

Table 1 .
Results of measurements on the chemical characterisation of the buffalo wastewater.
Table 2 represents the reference values of Table B of the Campania Region's Executive Decree No. 20 of 26 January 2021.

Table 2 .
Characteristic values referred to the regional decree.From the volume value of buffalo wastewater expressed in cubic metres, multiply 1000 to calculate the weight of effluent expressed in kg end named  Knowing the manure and slurry wastewater  produced on the livestock farm and assuming the characteristic value  defined in Section 2.1.3,it is possible to calculate the weight of the volatile solids  , by multiplying the characterisation value of the  and the annual weight of the livestock farm

Table 3 .
Total of biomasses conferred at the plant.

Table 5 .
Calculation of parameters.

Table 6 .
Calculation of parameters.

Table 7 .
Calculation of parameters.

Table 8 .
Calculation of biogas production index.

Table 9 .
Animals by type.

Table 10 .
Quantity of buffalo wastewater.

Table 11 .
Calculation of the biogas.

Table 12 .
Energy consumption of livestock farm.

Table 13 .
Potential estimate of the biogas and electrical energy.