## 1 Introduction  
The Polish market is abundant in large quantities of out-of-date food and has a large potential for agricultural biomass that can be a raw material for biogas production. Various sources [1, 2] suggest that this quantity may range from 12 to 14 billion cubic meters, including 7 to 8 billion cubic meters of biomethane. Meanwhile, in Poland, only 114 biogas plants are registered in the National Support Centre for Agriculture [3]. It can therefore be concluded that a theoretical potential for biogas production is unused. In the meantime, in agriculture, due to the need to sanitize livestock manure [4], biogas production will require enormous investment, despite the fact that biogas electricity generation plants are several times more expensive than comparably powerful photovoltaic plants. However, the necessity of investing in biogas production does not only result from the sanitization of livestock manure but also from technical limitations of our power grids that so far occur in the grid connection of photovoltaic plants [5]. This problem is expected to exacerbate in the coming years, as it requires enormous investments to be solved. It is more complex than that presented in media reports. Biomethane production is the future in Poland. Purification to network gas parameters is usually considered an alternative to various forms of biogas upgrading. Then, the methane content of biogas is improved but with some loss of methane and carbon dioxide. Biogas is purified using various methods based on, e.g., adsorption, including pressure swing adsorption (PSA), water, chemical and organic scruber methods, as well as membrane techniques. New developments in biogas treatment technologies such as cryogenic separation and in situ methane enrichment are also available. The lowest methane losses are associated with chemical scrubbers (<0.1%), while the greatest losses of up to 8% are observed in the in situ method. The most frequently mentioned advantage of biomethane over biogas is that biomethane can be considered a direct energy carrier in the gas network or as a fuel for transport [6, 7]. However, only the first such plants are constructed, and their impact on the economy will depend on the development of new plants and modernization of existing ones. In investment projects, however, a decisive factor is the economic calculation, notably with respect to modernization, as most cogeneration systems in our biogas plants are not yet depreciated. Further, economics will determine the extent and pace of investment in hydrogen production plants as even more than 50 kWh must be used to produce 39.72 kWh of energy contained in 1 kg of hydrogen, and an additional 15 kWh if it is liquefied. Although Poland ranks third in terms of total hydrogen production capacity, its commercial hydrogen production capacity is small. Most hydrogen, not only in Poland, is obtainable either from surpluses in chemical plants and refineries or is a waste product [8; 9]. At present, hydrogen production in Europe is principally based on fossil sources, primarily natural gas by means of steam reforming. This technology produces 90.6% of the hydrogen in Europe. The second method, in terms of production volume, is hydrogen as a by-product of chemical processes. This production currently provides 7.1% of hydrogen. The next process is electrolysis based on electricity from various sources, including fossil fuel power plants. This process is responsible for 1.6% of the hydrogen in Europe. This is followed by 0.7% of hydrogen produced by low-emission CCS steam reforming [10]. Only 0.1% of hydrogen is produced from renewable sources [11]. Therefore, notably in the case of off-grid and local biogas utilization, more attention should be paid to technologies that improve current biogas production and upgrading and utilizing techniques. In the interim period until the so-called Green Deal, the existing infrastructure and a new and improved product based on the already proven technology elements will be employed.