## 3 Results
### Conclusions  
The foreseeable population increase in the European Union will continue to put pressure on the primary sector (agriculture and livestock) in order to continue to provide food for the population. This increase in the number of pigs is clear in regions such as Castile and Leon. Manure generation, which is considered to have one of the major environmental impacts regarding animal stall farms, may involve a model of distributed biogas generation and its use as primary energy for electricity generation, such as the one proposed in this study. The production capacity of electricity means, in some cases, a complete sustainable production in municipalities such as Cuellar (Segovia), as well as other municipalities with a bigger population that will also see their CO2 emissions reduced due to the use of biogas. The reduction of CO2 emissions could result in additional incomes to the electricity generation model, amounting to 22.70% in the expected case. Furthermore, the sensitivity analysis indicates that this parameter is the one with the greatest impact on the economic model; if a tightening of CO2 emission conditions in the power generation sector is expected in the coming years, the CO2 cost may approach the maximum values considered in this  
Figure 5: Sensitivity analysis for the different parameters studied. study. This will increase the interest of this model in the future. This primary energy, in addition to being renewable, offers high load factors and, therefore, a guarantee of supply compared to other intermittent renewable technologies (wind, photovoltaic). The impact of the model proposed here will be higher if, in addition to the electricity generation, the biogas is used in the installation of the co-generation and the use of heat in a district-heating system to be used in the households of the considered municipalities. The georeferencing of the pig herd at the municipality level makes it possible to establish the details of use of this waste for energy purposes, minimizing transport costs. In this case, the considered radius of 25 km is the adequate for four out of the five provinces under study; only the Burgos region increases its production capacity in a radius of influence of 30 km. Considering the established conditions in the present distributed biogas production model, 68% of the demanded electricity production in the municipalities with more than 5000 inhabitants could be covered. The distributed biogas generation model could be completed with a model to use digestate and produce biofertilizer, which would transform the present study into an example of a circular economy, tightening the agro-industrial and energy relationship. Results achieved in the present study can be applied to any livestock industry where organic waste can be considered a useful resource to generate energy. Moreover, the ETS has demonstrated its capacity to increase the interest in sustainable solutions to reduce GHG emissions in regulated industries, such as the electricity production sector. Thus, the outcomes of the present study might be suitable for policy makers in other non-European regions that aims to reduce GHG emissions. In the coming studies it will be necessary to evaluate the investment cost (CAPEX) and operational cost (OPEX) of the small and low-cost anaerobic digestion facilities to complete the economic study started in this study. Moreover, the model could be completed with the potential transformation of biogas into biomethane and its use to generate electricity and to be used as a fuel in the transport sector. Previous studies show that anaerobic digestion not only produces biogas but also reduces waste and GHG emissions, and that to transform biogas into biomethane there are more than one type of CO\({}_{2}\) capture technology available. C.R. : investigation, Conceptualization, methodology and supervision; L.S.-M.: investigation, writing--original draft preparation; L.d.G. : formal analysis, validation; P.M.: resources, methodology and supervision; B.L.