## 1 Introduction
The produced biogas is collected in a gas tank (mounted on top of the container and protected against wind). The entire gas system operates at a maximum pressure of 5 mbar and is equipped with mechanical overpressure protection. In case of overpressure, biogas is released into the atmosphere. The quantity and quality of the produced biogas are directly dependent on the type and freshness of the organic waste introduced. The fermentation residue is drained and can be used as a liquid soil improver (e.g., fertilizer). The composition of the digestate is directly dependent on the materials introduced. Optionally, a separation unit can be provided to separate the solid and liquid components of the digestate immediately after disposal [14]. The most popular model of micro-biogas plants from eGmina, Infrastruktura, Energetyka Sp. z o. o., is MB-30 (Figure 1d). A micro-biogas plant is ideal for smaller livestock or agricultural farms [15]. Taking into account the specifications of the micro-biogas plant, the following can be achieved:  
* Year-round electricity production, i.e., 30 kW;
* Year-round heat production, i.e., 40 kW;
* The production of high-quality and natural fertilizer with any input of several tons per day (feces, silage, etc. );
* A simple and maintenance-free system, with supervision via the Internet. However, the MB-50 agricultural micro-biogas plant (Figure 1e) is a larger model for medium-sized farms that are able to supply several tons of input per day, reaching 50 kW of electricity and 70 kW of heat per year [15]. The cogeneration system (CHP) is one of the methods of obtaining heat and electricity with a wide range of applications regarding the fuels that can be used. A cogeneration system can use gaseous, liquid or even solid fuel in systems based, for example, on the production of steam. Compared to the separate production of heat and electricity, cogeneration saves energy. In advanced systems, the amount of waste heat can be at most 20%. When it comes to sustainable development, one of the fundamental issues is energy efficiency. Anaerobic digestion (AD) consists of many biochemical reactions during which bacteria decompose the organic matter of any substrate into gases such as methane (CH\({}_{4}\)), carbon dioxide (CO\({}_{2}\)), hydrogen (H\({}_{2}\)), hydrogen sulfide (H\({}_{2}\)S), etc. This process occurs in the absence of free oxygen. The raw materials that can be processed in AD include a wide range of organic residues, but there are certain requirements that make it useful or not. Co-fermentation of different feedstocks or their pretreatment can improve biogas production by balancing the concentration of different nutrients present in different feedstocks, which are crucial for efficient AD. The interaction between different types of microorganisms involved in the AD process allows for the degradation of complex biomass polymers reacting at different stages of the process. Different groups of bacteria lead at different stages, and the products of one reaction are used as a substrate for subsequent stages. During hydrolysis, water and extracellular enzymes break down the structure of compounds such as proteins, cellulose or starch, transforming them into monomers and oligomers such as glucose, fatty acids and amino acids. Hydrolytic bacteria multiply very quickly, and this stage occurs at high speed. However, for lignin-rich feedstocks, the degradation of lignin-based polymers becomes the rate-limiting step. At this point in the AD process, some compounds are already suitable for conversion into biogas, but most components still require further conversion steps. The next stage is acidogenesis, in which the leading bacteria are acid-forming. Hydrolysis products are mainly converted into short-chain volatile fatty acids (VFA), alcohol (ethanol or methanol), glycerol and acetone. During this process, by-products are produced, such as CO\({}_{2}\), H\({}_{2}\), NH\({}_{3}\), alcohols and trace amounts of other compounds.