Exploring the potential role of decentralised biogas plants in meeting energy needs in sub-Saharan African countries: a techno-economic systems analysis

To achieve the Sustainable Development Goals by 2030, low-income sub-Saharan African countries urgently need to electrify. Biogas production from anaerobic digestion could make a contribution to a solution to improved electricity generation and access in these regions. This study evaluates its feasibility using Malawi as a case study. The aim is to provide households with a continuous supply of gas for cooking and electricity. The study examines different sizes of fixed dome reactors (3, 6, 12 m 3 ) and assumes individual household ownership of 2, 4, and 6 cows. Several feedstocks and conditions are considered, such as cow dung alone, co-generation of cow dung with human faeces, cow dung with grass, and cow dung with maize residue. The economic benefits of selling biogas and fertilisers are calculated, and the cost of construction for different sizes of reactors is determined. Results show that co-generation of cow dung and grass silage in the reactor of 12 m 3 with six cows has a positive net present value (NPV) of $8962, while for a small farm with a 6 m 3 reactor capacity, co-digestion of cow dung with maize residue is preferable. The feasibility of the technology depends heavily on current national economic conditions, such as inflation, electricity prices, and construction material costs. A sensitivity analysis estimated that a 25% increase in the cost of electricity could increase the net present value (NPV) from − $3345 to $1526 for the generation of biogas from cow dung alone. Overall, this technology could have a significant impact on the lives of low-income households in sub-Saharan Africa by improving their access to electricity and providing a source of income through the sale of biogas and digestate.


Introduction
While considerable progress with renewable electrification projects has been made, especially in the last two decades, the world remains off-track to achieve the UN Sustainable Development Goal (SDG) 7.1-to ensure universal access to affordable, reliable and modern energy services by 2030 (Naidoo & Loots, 2020).The African continent appears to be the region, where most work is still required, with over 600 million people (i.e., over 50% of the population) reported to be without access to electricity in sub-Saharan Africa (SSA), and with 15 countries in that region having access rates below 25% (Trotter & Abdullah, 2018).
The installation and operation of decentralised household and community scale micro-grid renewable energy systems have been reported to be critical for the achievement of universal electricity access.This is especially significant in sparsely populated rural regions, where the high cost of centralised power generation, transmission and distribution infrastructures has been a considerable barrier to the expansion of electricity to such areas (Alstone et al., 2015).The International Energy Agency (IEA) has identified the use of such systems as the least expensive route to ensure power provision and to improve access to more than half of the currently deprived populations by 2030 (Eales, 2018).
With abundant solar availability and potential (World Economic Forum, 2022), photovoltaic (PV) systems have been identified as an essential technology to meet electricity production using renewables in the sub-Saharan region.However, solar panels require significant maintenance, and, despite the substantial decrease in solar panel costs in recent years, they remain unaffordable for most Malawians.In addition, a considerable number of solar panels on the market are of poor quality and have a short lifespan (McCauley et al., 2022).In Malawi, it is reported that technological development in this area has been hindered by a lack of private foreign investment (Malawi & Ministry of Natural Resources, 2017).
As a result, alternative replicable renewable energy systems are needed to meet the intended expansion of electricity access across the region.Malawi is one of the poorest countries in the world, with one of the lowest electricity access rates, at 14.1% (estimate from 2020) of the total population having access to the main grid.In rural areas, the electrification access rate was lower, estimated at 3.7% in 2017 (Naidoo & Loots, 2020).A recent review using a mini-grid explored different solutions to increase the electrification rate (Ehimen et al., 2023).In recent times, Se4All (Sustainable Energy for All), an international organisation working with the UN, has developed an integrated energy plan (IEP) strategy to promote the installation of renewable energy in Malawi (IEP, 2023).
The use of biogas, produced by anaerobic digestion (AD), is an alternative to solar energy to meet the electricity access target for households and small communities.Various reactor digestors have been documented in the literature (O'Connor et al., 2021).The Chinese or Nepalese fixed dome is the most common, constructed using bricks and concrete with no moving parts.The main reactor is built underground to enhance insulation, and the dome is used for gas storage.The biomass or waste feedstock is fed daily into the semi-continuous reactor.This design has been deemed sturdy over the years, but maintenance is necessary to remove the suspended solids.There is generally no mixing (Perez Garcia, 2014).However, this design requires skilled workers for construction, and the structure must be checked frequently to prevent cracking and damage that could lead to leakage (Pérez et al., 2014).The floating dome design is less frequently used and comprises a concretebuilt main reactor and a second metal section (floating drum) above for gas storage.Corrosion is the primary concern with this design, depending on the digestion condition and biogas composition (Perez Garcia, 2014).Plug-flow or tubular reactors are prevalent in tropical countries, such as Southeast Asia.This design is easy to set up and requires low-grade materials (plastic membrane) (Garf í et al., 2011).The biogas is extracted from the top part.However, the these have a the short lifespan of 4-5 years (Perez Garcia, 2014).Although other designs using low cost materials are possible, such as balloon biogas digestor, they tend to be they can only be used for short terms (Kabyanga et al., 2018b).
Currently, anaerobic digestor reactor use in lowincome countries is mainly focused on meeting cooking and lighting needs to replace the use of fuels that cause harm to the environment and human health (i.e., firewood and kerosene fuel) (Amigun & Von Blottnitz, 2010;Gwavuya et al., 2012;Palmer & MacGregor, 2009;Tumwesige et al., 2014).
The benefits and economic viability of the use of biogas (a combination of carbon dioxide and methane) to meet clean cooking goals, improve waste valorisation and reduce deforestation has been studied in a number of sub-Saharan countries, including Nigeria (Adeoti et al., 2000) Uganda (Kabyanga et al., 2018b;Walekhwa et al., 2014), Ethiopia (Gwavuya et al., 2012) and South Africa (Obileke et al., 2020(Obileke et al., , 2022)).These studies generally concluded that AD is economically viable in SSA.Mungwe et al., 2016, looking at AD use in Cameroon, were less enthusiastic.Their view was that installing fixed dome reactors in Cameroon would not be financially viable without the local government's support.However, AD generated methane could also be exploited for broader usage other than cooking, such as producing electricity with a CHP generator.Tumwesige et al. (2014) describe converting biogas into electricity to power incubator and refrigerator systems using motor engines.The engine could generate 1-3 kWh with some modification to function as a spark engine or could be run on a mix of biogas with diesel.In Kenya, several installations have been financed by the German government.One of the digesters in a plantation in Kilifi could produce up to 150 kW of electricity from different wastes from sisal residue and cow dung.The actual yield was 90 kWh.The cost of production was estimated to be $0.17/kWh,which was comparable to the actual cost from the grid, although the installation suffered from many power cuts caused by bad maintenance and poor training of the staff (Michael Franz, 2009).Another anaerobic digestor was built in Robin and Ehimen Sustainable Energy Research (2024) 11:8 Keekonyokie (Kenya) to supply electricity for a mini-grid system to power six restaurants (light and refrigeration systems).The waste produced from a slaughterhouse was used to feed the digester.The generator could produce 20 kW from biogas and diesel with an actual cost of $0.15/kWh (Dimpl, 2010).
To improve the economic viability of the technology, studies have examined the establishment of microfinance programs to assist households in funding reactor development (Walekhwa et al., 2014).This is particularly critical in remote areas, such as Malawi, where the average daily income is approximately $2.15 (World Bank, 2023).

Scope and objective
This study aims to investigate an affordable method of producing electricity to power a single household by anaerobic digestion of locally sourced wastes.The study focuses on Malawi, mainly rural areas where access to electricity is low when compared to other regions in sub-Saharan Africa.Different feedstocks are examined, such as crop residues, cow dung and mixtures.The study includes technical and economic analyses for reactors of varying sizes, depending on the number of cows owned (2,4,6).Other household situations are examined, such as those with no access to cows, and/or no access to crops who may have to purchase waste.The objective is to determine the most suitable reactor size that can generate enough energy for cooking and electricity for a single household using biogas.The most efficient approach to generating electricity is assessed using net present value (NPV) outcomes.A sensitivity analysis is used to examine the technology's robustness in the face of external factors, such as fluctuations in material prices and local inflation.The findings of this study are intended to contribute to the development of sustainable electricity in rural regions of Malawi.The study also looks at the possibility of recycling water in remote areas with limited water access.Using anaerobic digesters, electricity could be produced in an environmentally friendly manner.This is not only beneficial for the community but also for potential investors or stakeholders who can support the technology.

Methodology and assumption
In this study, the main calculation was carried out using Excel (pack office 2021).The data and information are based on previous studies and data found online.Scopus (science direct) and google Scholar were used to search the different publications.

Anaerobic digestion parameters
In this study, a household located in the centre or south region of Malawian is used.The area is assumed not to be connected to the national grid and to be far from central cities.As defined by the UN FAO (Food and agriculture Organisation), it is assumed that one household has an average of 4.5 people (FAO, 2011).It is assumed that the majority of the people living in the village are farmers, and their primary income comes from farm production, which could include selling milk produced from cows, as well as the sale of maize or other products.It is assumed that most households possess a small lot of land of (minimum of 0.5 hectares), where livestock or crop production occurs.Some families could own a small farm of at least one hectare.It is assumed that buying cow dung for 0.02 $/kg is possible for families without cows (Walekhwa et al., 2014).Transportation is not considered in this study.
In Malawi, the average temperature is 27 °C; however, during the coldest month, the temperature could decrease to 10-13 °C overnight, at altitude, reducing the efficiency of the AD process.The average national altitude is 779 m, with some high plateaus reaching a height of 1500 to 2100 m in Mulanje and Nyika region (Climate Change Knowledge Portal, 2023).In this study, three different scenarios will be investigated, as shown in Fig. 1.  -Scenario 1 looks at four different options for low income villager including for those who own cows.-Scenario 2 looks at co-generation of cow dung with human faeces, grass, and residue from the production of maize.-Scenario 3 looks at a small farm, where maize crops are grown.
The household uses the CHP generator to produce electricity.When the cooker is in use, a valve connects it directly to the equipment for cooking, while the rest of the time, the line remains attached to the CHP unit, providing continuous energy access.The main reactor is connected to the loading tank (feeding tank).The tank reactors' standard sizes are 3, 6 and 12 m 3 , plus the dome used for gas storage.The principal reference reactor is 6 m 3 , as in the study in Nigeria (Adeoti et al., 2000).The electricity generated can be used for essential equipment.Any excess electricity produced can be sold to other households or the main grid, and the benefit is calculated based on the amount of excess electricity and digestate produced.Some data references used in this study are included in Table 1.

Biomass feedstock and biogas production
Malawi's primary revenue comes from agriculture with mainly small-scale farms (around one hectare).The most common crops are maize (3.9Mton/a), rice, cassava (4.3Mton/a), coffee, tea and tobacco (Zalengera et al., 2014, in Additional file 1: Table S1).These crops generate significant waste residues, which could be converted into energy and biogas after some pretreatment.Dung waste from livestock could be used as feedstock for digestion.Malawi's cattle population is lower than goats (approximately 1 million heads compared to 4.4 million, respectively), although cow dung is more easily recovered and converted into biogas (Zalengera et al., 2014).The amount of biogas produced relied on the number of cows owned and the daily rate of dung produced per animal.Studies have shown that cows India and Bangladesh could produce 10.88 kg of dung/day.The lower rate in Sudan with 9.8 kg/day (Rubab & Kandpal, 1996).On average, a farmer in Malawi owns 2.2 cows (Baur et al., 2017).This study will investigate different numbers of cows; for the first reactor (small), the household owns two cows; for the second reactor (medium) the household owns 4 cows, and for the third reactor (larger) the household own six cows.Equation 1 determines the theoretical amount of cow dung produced annually for each reactor: where m cow dung produced is the value produced for each reactor in 1 year (kg), n cow is the number of cows available, X yield cow dung is the yield of cow dung produced daily on average for one cow (kg), % collection is the average collection of cow dung in the field.Here, it was assumed to be 75% (Singh & Sooch, 2004).
The principal elemental analysis of cow dung and other considered feedstocks to be used for biogas production is presented in Table 2, based on literature values.C/N, HHV and the gas yield has been calculated from the CHNS values (on a dried weight basis), as in Gerin et al., (2008), Oleszek et al., (2014), Sahu and Biswal (2021), Singh et al., (2021).The energy content HHV (MJ/kg) was calculated from the elemental analysis using the Dulong equation (Buckley, 1991).
The feedstock is mixed with a dilution of 1:1 of fresh water and recycled water.In this case, standard reaction for anaerobic conditions are assumed with a reaction time was estimated to be between 50 and 60 days, with mesophilic temperature of approximately 40 °C with a pH of 6.8-7.1 (Mungwe et al., 2016;Oji Achuka et al., 2022).
Each household in Malawi, on average, includes 4.5 people.Consequently, the daily production of human faeces (HF) is roughly 1.67 kg, amounting to approximately 607.73 kg per year (Gotaas, 1956).For co-digestion, the weight of CD (depending on the number of cows) is added to the weight of HF (111.8 kg dried weight).Grass produced in a small field of 0.5 hectares can be used for (1) the co-digestion.In theory, 13 tons of dried grass are produced per hectare (O'Connor et al., 2020).Dried grass (6500 kg) is co-digested with CD.In a small farm, 1.25 tons of maize can be produced for a field of 0.5 hectares.66% of the whole corn goes to waste, including the stalks or silage, which could be used for the anaerobic digestion (Zalengera et al., 2014).

Biogas
The Boyle-Buswell equation and the gas law were used to determine the biogas production according to O'Connor et al. (2020) using the elemental composition of the dry initial feedstock: The composition of methane was assumed to be 55% for the anaerobic digestion of cow dung.First, the methane yield (in Table 2) and production were calculated from the annual weight production together dried weight and, subsequently, the expected biogas production divided by 55% (V biogas in m 3 /year).For the co-digestion, the biomethane production of both feedstocks was added.Some parameters including the pH, the concentration of volatile fatty acids should be monitored weekly to ensure the efficiency of the system.
Biogas could be used directly for cooking after a desulphurisation step using iron hydroxide or injected with a small quantity of oxygen or air.The gas usage is (2) equivalent to 0.34 m 3 /person/day.The household would need approximately 530 m 3 of biogas per year (291 m 3 of methane) (Singh & Sooch, 2004).The diagram in Fig. 2 shows the Anaerobic digestion process of a closed loop with waste valorisation.

Electricity generation
The remaining biogas can be transformed into electricity via a generator or CHP unit.Microturbines, Otto engines (with spark), or diesel generators can be used to transform biogas into electricity.In this study, Otto engines or diesel generators are considered suitable and economical for small-scale digesters (Dimpl, 2010).
Electricity could be valorised into three categories: electricity for the house; excess electricity sold to the grid; and electricity used to power some equipment for the reactor (stirrer or pump).
For the estimation of the potential electricity requirements of each household, it is assumed that each house possesses essential electrical equipment, including LED lamps, a small fan, a phone, a small TV, or radio, etc., corresponding to usage of approximately 0.9 kWh daily (335.8kWh/a).The electricity capacity of the CHP unit can be calculated using the following equation (Akbulut, 2012): where CHP electricity capacity is the electrical capacity CHP from biogas in kW, η elec is the % electricity efficiency (39%), E biogas is the total energy from the biogas (21 MJ/ m 3 ) (Berglund & Börjesson, 2006), and t is the operating time parameter (8000 h/year).The thermal capacity is calculated using the following formula, where the thermal efficiency η thermal is 45% (Akbulut, 2012): The electricity production from the biogas can be calculated using the following equation (Perez Garcia, 2014): The electricity production E electricity (kWh) is determined by multiplying the energy density of methane-(10.49kWh/m 3 ), % electricity efficiency η elec and the volume of methane V methane produced (m 3 ), the volume required for cooking V cooking methane was determined earlier.
The electricity available to sell to the grid E avail- able (kWh) was determined by the subtraction from (3) E electricity = (V methane − V cooking methane )*E methane * η elec the basic electrical need E basic (335.8 kWh) with, and the electricity required for the stirring and the pump E stirring,pump (7.2 kWh/kg of feedstock) to general production electricity E electricity (Dach et al., 2014):

Valorisation of the digestate
The expected weight of digested produced after the digestion was calculated as follows according to (Wresta et al., 2015): %VM is the fraction of volatile matter in percent of the feedstock (e.g., cow dung), %DM is the fraction of dry matter in percent of the feedstock, and %BY digestate is the fraction of conversion in percent (approximately 60%) m biomass is the mass in kg of the feedstock produced annually.In the case of co-digestion, the average value of both biomass feedstock can be used.The digestate could be used as a replacement for "NPK fertilisers".The estimated yield of the three main "fertilizers" is shown below for the theoretical yield of urea for nitrogen (NH 2 CONH 2 ), superphosphate for phosphorus (Ca(H 2 PO 4 ) 2 ⋅H 2 0 + CaSO 4 ⋅1/2H 2 0) and muriate potash (KCl) for potassium:  where m digestate is the value obtained in the previous equation, %N, %P and %K are the initial content of the feedstock for the nitrogen, phosphorus and potassium, f is the theoretical purification/separation factor of 60%.
%N urea is the atomic per cent of nitrogen in urea (46%), %P superphosphate is the % of phosphate in superphosphate (15%), and %K muriate is the % of potassium in muriate potash (52%) (Walekhwa et al., 2014).The digestate can be sold as an organic fertilizer alternative to chemicals with a price of 0.46 $/kg for urea and phosphate and potassium muriate.The total value of the digestate was the theoretical sum of the three fertilisers (Walekhwa et al., 2014).
The solid digestate can first be separated by filtration; afterwards, the concentrated matter is heated to collect the water by condensation.It was assumed that the amount of solid in the slurry was 30% after decanting (Gebrezgabher et al., 2010).This model is based on the work of Singh and Sooch (2004), more experimental studies are needed out to confirm the rate of slurry production.Using a pump would allow the recycling of 50-70% of water back to the digester (Sinha & Kandpal, 1990).

Economic study
The installation's estimated depreciation period is set at 20 years, being the standard life span of a brick reactor.For the sake of clarity and ease of comparability, the US dollar is used with costs and values for the case country of Malawi made using the current exchange rates: The discount rate, r, is calculated below using the market rate of inflation, a, and the market rate of interest, P (Adeoti et al., 2000).The rate of inflation in Malawi for 2021 was 8.60%, with a lending rate P of 18% (National Statistical Office, 2023;World Bank, 2023).
In this study, the discount rate 2021 was determined as the discount rate of 2022 t was impacted by a step rise in the global inflation (with a discount rate of 2.5%).( 8) The economic analysis is based on the cost-benefit analysis according to the standard method explained in OECD (2018).The technology's profitability is calculated from the net present value NPV; which determines whether the investor will gain money or not.The formula is calculated according to the following equation (Gebrezgabher et al., 2010): (CF) t is the expected cash flow at the year t; r is the discount rate; I 0 is the initial investment capital.CF is equal to the difference between the benefit and the annual cost.The benefit accounts for the money gained selling products from the farm (milk, maize, etc.), the excess of electricity produced and the digestate as fertilisers.The annual cost includes the price of the labour for maintenance of the reactor, the cost of water, and the cost of maintenance and operation, which is equal to 4% of the initial investment cost (including buying parts for the reactor and broader reason).
The internal rate of return (IRR) is obtained when the NPV equals 0. It is also used to determine the estimated interest rate using the same variable as previously (Gebrezgabher et al., 2010): The payback period determines the period the study can be profitable by dividing the initial investment I 0 over cash flow CF t using the following equation (Gebrezgabher et al., 2010): Levelized cost of electricity (LCOE) is commonly used to determine the cost of electricity production generated from the reactor (Mungwe et al., 2016): The unit of LCOE is $/kWh, C t is the sum of the total cost of the different costs and maintenance, including the initial investment in $, t is the number of years for the study, E t is the total energy produced by the reactor each year, r is the discount rate. (12) The sensitivity analysis investigates the variation of some data in the case of the different external economic fluctuations.Three variables were selected which could have the highest impact on the NPV: the discount rate; materials and cement price, and electricity costs.The deviation of + 25% and − 25% of the analysed value was calculated, including the discount rate going from 7 to 11.7%, the cement price from 7 to 13.8 $/bag, and the cost of electricity from 0.082 to 0.136 $/kWh.The net present value has been selected to be the most relevant for this analysis.

Environmental analysis LCA
This section calculated the environmental benefit to determine the quantity of carbon dioxide saved with biogas.The equation of the avoided emission AE (kg of CO 2 ) is shown below, where the avoided factor AF is equal to 500 kg of CO 2 /MWh and the electricity produced from biogas previously calculated in the previous section (MWh) (Perez Garcia, 2014): It is assumed that 20% of the annual production of cow dung is stored before being fed into the reactor tank.The emission produced during the storage was calculated by the multiplication of mass determined previously with the biogas potential factor (11.90 kg of CO 2 ).It was determined using the average composition of carbon dioxide and methane in the biogas (55%) and the greenhouse potential (GWP).The GWP of methane is 28, and carbon dioxide is 1 (O'Connor, 2022).
The emission of carbon dioxide produced by anaerobic digestion is determined using the perfect gas law, with the gas quantities derived using the Boyle-Buswell equation (O'Connor et al., 2020).R is constant rate 0.082 (atm L)/ (K mol), T the standard temperature 273.15K (0 °C) and the standard pressure P standard of 1 atm (1.013*10 5 Pa), ρCO 2 equals 0.0018 kg/L.Afterwards, the carbon dioxide mass is multiplied by the cow dung dried matter: The saved emission from the digestate used from the digestate is calculated using the following formula, as the weight calculations (kg) are reported earlier (F N , F P and F K ) for ammonia, potash and muriate, and the emission factors are reported in

Thermal energy analysis
This section looks at the energy produced from the reactor and the heat valorisation.The heating loss hl (kW) is calculated as follows: U is the coefficient of heat transfer (W m 2 °C), A is the area in m 2 and ∆T (°C) is the difference between reactor temperature and the exterior (O'Connor et al., 2020): The energy used to heat the feedstock is calculated below, where Q biomass (kW) is the parasitic thermal demand for heating the feedstock, Cp is the specific heat of the feedstock, or digestate demand is assumed to be similar to water (4.18 kJ/°C/kg or 0.0016 kW/°C/ kg) (Okoro et al., 2018), ∆T is the temperature difference (°C), the temperature of the reactor should be approximately 40 °C.Warming of the feedstock would be necessary only during the night and in wintertime in Malawi, so it could be assumed that this energy is negligible (O'Connor et al., 2020): The same equation was used for the drying of the digestate Q drying (kW) from 40 to approximately 99 °C.E Thermal (kW) was calculated as follows as the equation for the electricity generation.η thermal is the thermal efficiency conversion (45%).The other variable was described previously (Akbulut, 2012): The total energy E Total is the energy available to heat the digestate and to recycle the water back to the digestor.

Brick reactor construction design
The design of the reactor was made as simple as possible.It is made of a base with a rectangular shape, and, on the top, a dome made of brick and concrete and a plastic layer.Leaking and cracking in the reactor could reduce the digestion efficiency and increase the pollution surrounding the reactor; therefore, the system needs to be tight with a double wall.The central part of the reactor is based underneath the ground, and the top part could be above the ground or underneath to keep the temperature uniform in the digestor and to limit temperature fluctuation, it could improve the gas lost.Partially burying the digestor could significantly reduce the nuisance of foul (bad) odour and other sanitary disagreement.There are two auxiliary tanks to store the feedstocks and the digestate.A thin concrete slab can be added to avoid leakage in the ground.It would be necessary to have a double layer of bricks for the wall of the tank.Insulation materials should be added around the reactor to prevent heat loss, especially in the cold months of June and July.A simple diagram of the reactor is shown in Fig. 3.The volume of the main reactor is calculated as follows, where L is the Length, H Dig is the height, and W is the width; the value is included in the table below: The dome's volume is calculated as in the formula, where D dome is the dome's radius, and H dome is the dome's height: The total volume is the sum of the volume of the tank V tank and the volume of the dome V dome .The dimension measurement is presented in Table 4.
On average, 60 small bricks are used for the surface of 1 m 2 .For the dome, a double layer of bricks was used.It (26) S dome = 2 * π *D dome *H dome +2πD 2 dome could be assumed that 10% additional bricks are necessary in case of breaking or cracking.Clinker brick should be used with good quality production.The ideal size is 23 × 10.5 cm.Cement should be used as a binder to improve sealing and reduce water absorption.Solid mesh (chicken) and fibre should support the dome structure (Obileke et al., 2021).The dome should be covered with an insulation layer and concrete to avoid gas leaks.Technical considerations associated with the digester construction are provided in Additional file 1; two tanks in bricks are also built.The number of bricks is presented in Additional file 1: Table S2.
Approximately one ton of sand is needed for 1000 bricks.Four bags of cement weighing 50 kg is necessary for 500 bricks.28 L of water is essential for a bag of cement of 50 kg.The quantities required are in the following table (Littlehampton Bricks & Pavers, 2023).The amount of sand, water, and cement is in Additional file 1: Table S3.

Construction cost
Most of the quantities of the materials applied were derived (in Additional file 1: Table S4) from (Walekhwa et al., 2014), since the production scenarios were comparatively similar.However, the cost of cement was observed to have significantly increased by 30% with the current inflation rates in Malawi (Cement Prices Rise in Malawi, 2023).
Polyfilla exterior crack filler and sealant are used to avoid leaks and to make repairs.Reinforcing mesh UPA lay hold is used for the foundation of the dome.Insulating the reactor walls improves system impermeability from  gas loss and improve temperature uniformity.Concrete stone is used for the foundation in the pit to avoid underground leakage.A filter containing iron hydroxide are used for desulphurisation before the gas is stored to cook or for electricity generation via the CHP unit.It might be necessary to replace the filter and the lime inside during the reactor's lifespan.Other materials could include a plastic blanket in case of low temperatures overnight in the coldest month.Therefore, extra insulation might be required to avoid the loss of efficiency (Table 5).
Evaluating the labour inputs and costs associated with the AD unit construction and operation was challenging, as it depended on several parameters.The cost of unskilled labour for digging and construction was estimated at 0.045 $/h-man and for skilled labour (mainly masonry) up to 0.187 $/h-man) (Walekhwa et al., 2014).Similar calculations were carried out to evaluate other elements in the construction of the reactor, e.g., nails, stone, etc.The scrubber/CHP includes the price for all the unit components to achieve gas upgrading (using a filter with iron hydroxide) and the CHP generator (Khan et al., 2014).A pump is used to recirculate the water phase in the tank.The other miscellaneous cost is determined as 5% of the sum of the reactor and the labour cost.This estimate can also account for the cost of additional parts not described here.The workforce costs associated with the AD reactors construction and operations are presented in Table 6. Figure 4 shows the different price for the different categories/groups of materials or equipment and miscellaneous costs (labour, water) in the function of the reactor size.Walekhwa et al. (2014) determined that the cost for 8, 12 and 16 m 3 AD reactors was $1076, $1502, $1883, respectively, which is close to the values obtained in this study.The diagram in Fig. 4 shows that the cost of cement is approximately 30% of the total construction cost.As it was explained, the high demand for construction reduces the stock.Cement also part of the main cost in Rwanda, with $160 for constructing a 6 m 3 fixed dome reactor (Amigun & Von Blottnitz, 2010).Other reactor types, including balloon digestor and tubular reactor, have been investigated.For example, in Uganda, a small reactor costs approximately $550.However, these reactors are less resistant to the surrounding environment, with a lower life span (commonly less than 5 years) (Kabyanga et al., 2018a).

The annual cost for the AD reactor
In this study, five variables are be considered (Table 7), including: • Water cost: Here, a ratio of 1:1 is used.If the water is recycled, the cost of water would be negligible, less than 1$/year.• Maintenance costs: These include repairing some reactors in case of damage, or miscellaneous costs that could occur in 1 year.It is equal to 4% of the initial cost.• Labour costs: These include the workforce coming to repair, clean and drain.A similar wage rate was used to construct the reactor ($0.045/h).The number of hours required is based on the study of Singh and Sooch (2004).It was estimated that 165 h/year for a small reactor (3.28 m 3 ), 182.5 h/year for a medium

Biogas and digestate yields, and annual benefit
Different options for using AD to generate income were investigated.Table 8 includes the value of the benefit earned using a brick reactor, where (A) represents the cow dung alone, (B) the co-digestion of CD/HF, (C) the co-digestion of CD and grass silage and (D) the co-digestion of CD and corn silage.The results show that using cow dung from two cows does not allow the production of enough gas to generate electricity.If the CHP's capacity is insufficient to produce electricity, biodiesel (used vegetable oils) or standard diesel can be added to the biogas.Diesel generators, Stirling engines or Otto engines with spark ignition could be more relevant for this scale (0.5 to 10 kWe).Gasoline would be necessary to start the otto engine (Climate Technology Centre & Network, 2017;Dimpl, 2010;Maghanki et al., 2013).For the co-digestion of cow dung and human faeces (HF), it would be assumed that the reactor is connected directly to the sewage system, so that the person operating the reactor is not exposed to hazardous materials (Climate Technology Centre & Network, 2017; Maghanki et al., 2013).For the co-digestion with silage (grass and maize), the biomass should be pretreated, preferably chopped and ground into small pieces to enhance the degradation by bacteria.The storage tank should be continuously stirred, powered by an electrical system, or where a pump is not available, the slurry should be occasionally manually stirred.The use of the digestate as fertilisers have been demonstrated to improve crop production and avoid soil erosion (Erraji et al., 2023).

Scenarios 1 and 2: Low-income villagers for the digestion of cow dung alone and co-digestion
Different situations were investigated: as described in the previous section, the benefit is generated by selling the digestate and the extra energy produced from  the CHP generator.The NPV is calculated for 20 years.
Only positive NPV can be considered viable, as shown in Fig. 5.The internal rate of return (%IRR) and the payback period are presented in Table 9.The various scenarios are defined as follows: • A) The household does not own a cow; cow dung was bought from a neighbouring farm.The excess electricity produced from the biogas is sold using cow dung as the primary feedstock for digestion (reference value) • B) Excess electricity and digestate were sold as revenue, and the cow dung was bought • C) The household owns either 2, 4 or 6 cows and sells the excess electricity produced • D) The household owns either 2, 4 or 6 cows and sells the electricity and the digestate • E) Co-digestion feedstocks are used in the reactor with cow dung and human faeces.The excess electricity and digestate are sold.• F) Co-digestion of cow dung and grass silage.The excess electricity and digestate are sold.• G) Co-digestion of cow dung with residue from maize crop.The excess electricity and digestate are sold.
The digestion of only cow dung and selling the excess biogas and fertilizers is not a viable option, as calculated by the net present value.Selling digestate as fertilisers help to generate supplementary revenue, particularly as the size of the reactor increases.Reactor 1 (3.28 m 3 ) does not generate enough biogas to be sold.The option where the household does not possess a cow is not economically feasible.Likewise, the co-digestion of cow dung and human faeces yields negative NPV and may be challenging to implement at a one household scale.This option would be for larger installations with large latrines, such as a school or hospital, as the study carried out in Phalombe Secondary School (Malawi) combines human waste with waste food from the canteen (Kawelamzenje et al., 2021).
On the other hand, using grass in the digestion could mean a better alternative as it is readily available, using a 15.09 m 3 size reactor.For the co-digestion of cow dung with maize residue, the NPV, IRR, and payback were, respectively, $5236.95,6% and 5.33 years for the reactor size of 15.09 m 3 , which could also be a viable option.Therefore, it is more economically feasible to undertake anaerobic digestion with grass or maize residue co-digestion with a large reactor rather than the digestion of CD alone.

Scenario 3: small size farm in the rural area
The farmer can generate revenue from cows selling milk, for example, crops from the field.The selling price of the milk was considered to be 0.42 $/kg (61 MWK).A cow on average in Malawi can produce on average 3.5 kg of milk/ per day (5.5 l/day), 300 days a year (Baur et al., 2017).Farmers can sell 80% of the total production (National Dairy Council Ireland, 2023).Therefore, with 2, 4 and 6 cows, the following benefits can be earned: $717.36,$1434.72,and $ 2152.08 for 1 year.The household could own a small farm, where maize is grown, with a size of 0.5 hectares.The average national land size in Malawi is 0.71 hectares (FAO, 2011).Most of the crops are harvested by hand, with limited use of machines.The corn is sold in the local market (80% of the total feedstock).The residue is fed into the anaerobic digestor.The production yield is assumed to be 2.5 tons/ hectare.The current price is $1.79/kg.The farmer could earn around $2237.5/year.
For the farm cost, it would be assumed that people from the household are working on the farm, and children could give a hand.In theory, 25,000 L of water is required for one hectare, although the FAO states that only 1.8% of the average land area is irrigated, costing $0.27 (FAO, 2011).For drying, milling and harvesting, some machines/devices could be used; the cost could be $378, according to Gerin et al. (2008).The price of land is 2,000,000 MKW/hectare or 1947.35$/hectare (Saleema Razvi et al., 2021).The investment also includes buying cows and the maintenance price, ($1694.92/cowand $24.38, respectively) (Gerin et al., 2008;Gwavuya et al., 2012).The overall investment cost of a farm in Malawi with two cows was estimated at $6475.41, $9891.34 with four cows, and $13,978.71 with six cows.The initial investment cost is significant.However, it could be assumed that the local farmer could receive a subsidy from the government or local NGO to help to invest.In this study, these subsidies are not included.
Different options are investigated.The results are presented in Fig. 6, Table 10: (i) The farmer owns a small farm, selling digestate and the excess electricity (shown as a reference value).(ii) Milk is sold as revenue with excess electricity produced and digestate.(iii) Maize is sold with the anaerobic digestion of cow dung and digestate.(iv) Co-digestion of maize silage and cow dung, and corn was sold as revenue.When the household invests in a small farm, selling maize products is more viable than selling dairy products.When the family owns a small farm, selling corn with a reactor size of 7.05 m 3 would be more feasible processing cow dung alone or with co-generation of cow dung and maize residue.The payback would be 5 years for solution 4, less than 1 year for solution 5.
As observed in Table 11, the cost of production decreases with a increasing reactor size; thus, it would be more economically viable to share the reactor between different household rather than each household having its own anaerobic digestor.It could be concluded that selling most of the harvest and milk production is essential to be financially viable.Otherwise, subsidies are necessary to avoid debt dependence on cow and crop yield.
The LCOE analysis confirms that constructing a bigger reactor size is more economically viable.Similar calculations were estimated for a study in India (Rubab & Kandpal, 1996).In Cameroon, the LCOE was estimated to be 0.0233$/kWh for a fixed dome reactor with a capacity of 10 m 3 using a mixture of cow/pig manure with a total solid of 13% (Mungwe et al., 2016).In 2017, it was determined that the LCOE for the hydro-dam in Mpatamanga was $0.0027/kWh, $0.0097/kWh for the wind, $0.01/ kWh for the solar and $0.0127/kWh in Malawi (Malawi & Ministry of Natural Resources, 2017).The cost of   energy of biogas is still more expensive than other renewable energy; therefore, a method should be investigated to reduce the cost of production using a bigger reactor size and making it more competitive.

Sensitivity analysis
In this section, the sensitivity was determined using previous results from the NPV analysis.Malawi's economy relies on its political stability and on the World economy.
Inflation is significant (21% in 2022), impacting essential products (World Bank, 2023).Real household incomes were observed to have decreased by 1% because of the Russia-Ukrainian war (Mamonov et al., 2022).The option of reactor 3 (15.09m 3 ) with a positive NPV was selected as the most significant in the study for the digestion of cow dung alone (selling the excess electricity and digestate), co-digestion of cow dung and grass, and cow dung and maize residue.
To increase the viability of the technology, it's possible to reduce the costs of cement, labour, and discount rates, as illustrated in Fig. 7A-C.It is widely accepted that the discount rate for capital investment in literature is 12% (Gupta & Ravindranath, 1997;Walekhwa et al., 2014).Reactor 2 is particularly vulnerable to a significant increase in cement cost when co-digesting cow dung with maize.By reducing the cost of cement at a low discount rate, it would be possible to use a smaller reactor (3 m 3 ) and two cows, with a net present value of $1312.46.57and $1225.11,respectively.As per Gwavuya et al. (2012), building a small reactor (4-6 m 3 ) is more sensitive to fluctuations in construction costs, including labour and cement.Therefore, choosing the right construction supplier and origin is crucial to minimize investment costs and increase resilience to inflation.In addition, generating revenue from various household products is recommended to reduce dependence on inflation.Based on the sensitivity analysis, it is better to use a larger reactor (15.09 m 3 ) with six cows to minimize the impact of different variations.

Technical studies
In this section, the energy or the heat produced by the reactor and a brief environmental study will be described.The main aim is to demonstrate that the excess energy produced by the CHP can be used to recycle the water from the digestate.A second aim was to determine the environmental impact of the biogas production by calculating the carbon dioxide emission.

Environmental emission
Table 12 represents the carbon dioxide emission produced from the cow dung and the anaerobic digestion.Approximately 20% of cow dung is assumed to be stored inside before loading into the digestor.The calculation in the following table are based on Eqs. 14 and 15.The saved emissions are based on the emission of fossil fuel (Perez Garcia, 2014).
Figure 8 shows the emissions of the overall digestate slurry after the reaction based on the theoretical sum of NPK fertilizers.Non-negligible emissions from agriculture are produced using based petroleum fertilizers.Valorisation of the slurry from digestion could cut carbon emissions and improve the growth rate of some crops.
The digestate has an environmental impact in reducing carbon when replacing phosphate-like fertilizers.Finally, using biogas as electricity or as gas for cooking would allow them to save 1.5 tons of wood/year, equivalent to 2.9 tons of CO 2 eq and costs 35 $/year to buy the wood from the market annually.The forest area of Malawi is decreasing each year, representing a 14% loss between 2020 and 2021 (Subedi et al., 2014).Therefore, it is crucial to protect Malawi's biodiversity by reducing the cutting of trees for cooking.In the meanwhile, it also saved 269.8 kg of LPG (based on using 580 m 3 of biogas), costing $693.30/year(2.6 $/kg of LPG) and cutting the emission of 809.3 kg of CO 2 equivalent (MERA, 2023;SEAI, 2023).Finally, using biogas could improve life quality with less indoor pollution and reduce the work of women who usually pick up wood.

The energy produced from the anaerobic digestion
The table in Additional file 1: Table S5 includes the heat energy calculated for the anaerobic digestion and the CHP unit with cow dung digestion in the brick fixed dome reactor.The heat coefficient for a wall in brick is 2.0 W m 2 °C, for concrete is 3.9 W m 2 °C and for a roof in brick is 1.0 W m 2 °C (O'Connor et al., 2020).A small heat exchanger was installed to help separate the liquid phase from the solid.The solid will be used as fertilizers.The liquid was heated near to boiling point and condensed back into the reactor.This step could additionally help to reduce the volume of the digestate.Solid digestate could be stored longer, and pathogenic agents are less likely to develop (Drosg et al., 2015).
Before being added to the digestor, the slurry might need mild heating to 35-40 °C (parasitic thermal demand).It would help the pretreatment of the feedstock.In addition, insulation might be necessary at night and during the coldest months.Excess heat after electricity production is obtained, except for the smaller reactor (3 m 3 ).This extra energy produced could be used for different purposes.The excess heat could also be used for the farm process of drying the feedstocks and digestate before storing.In all the scenario calculations, the heat energy produced by the CHP unit is enough to be valorised for recycling the water from the digestate, producing

Discussion
The results presented in this study shows that installing anaerobic digestors in Malawi for electricity generation is a viable option when using the co-digestion of grass and cow dung in household settings.The findings should be validated in pilot trials.It must be understood that cow dung production, biogas yield and other associated conditions fluctuate daily.Different studies used different methods based on the assumption that 25 kg of cow dung is required to produce 1 m 3 of biogas (Singh & Sooch, 2004;Walekhwa et al., 2014).Surveys should be carried out amongst farmers in Malawi to obtain an accurate database and determine a fully realistic model.The supply of water could be an issue for AD.Annually, 2.7 to 11 m 3 of water to be mixed with cow dung is required, depending on the size of the reactor.Some remote parts of Malawi have difficulty with access to running water.Furthermore, severe drought could lead to starvation/famine with cattle death and crop yield reduction.In 2015-2016, Malawi suffered from a significant drought affecting 6.5 million people in the country, reducing crop production by 60% and causing a 40% loss in livestock population (World Bank Group & United Nation, 2016).Furthermore, a complete closed loop should be designed to recycle all the waste produced during the process with more sophisticated water purification.(Orskov et al., 2014).Rainwater should be collected for daily usage, irrigation, and giving water to cattle.A fish pond could be installed in the surroundings of the reactor to provide water and to cultivate farm fish (Balasubramanian & Kasturi Bai, 1996).Selling fish could generate complementary revenue.A study in Bangladesh investigated integrating a water purification system powered by the biogas produced from cow dung.They have demonstrated the system's feasibility with a short payback period (less than 4 years).This setup could be developed in Malawi to enhance the availability of freshwater (Khan et al., 2014).
Producing biogas and electricity through co-generating cow dung and grass silage is the most sustainable method for ordinary villagers.Farmers may find the co-digestion of maize residue more relevant as it directly involves crop production.This installation can be economically beneficial for a community of 2-3 households, or government installations, such as schools and dispensaries for the other option for digesting cow dung and co-digestion of cow dung and human faeces.As observed in the sensitivity analysis, the reactor's construction material should be chosen locally and not imported to reduce the initial investment cost.
The reactor owner and interested community need to receive clear guidelines and ongoing support for finding relevant subsidies.Regular maintenance and support should be provided to ensure proper functioning.The success of these studies largely depends on the engagement and willing support provided by local authorities and related companies or NGOs.The major success obtained in other regions of the World, including in Asia (India and Nepal), should be analysed and considered (Kalina et al., 2022;Singh & Sooch, 2004).In addition, the setup of microfinance or subsidy would be crucial in implementing an anaerobic digestor.The interest rate should be low and regulated to reduce the impact on the investment.International carbon credit schemes could also partially finance the study, although investors know little about these types of programs (Shane et al., 2015).Today, anaerobic digestion still suffers from misconceptions or misjudgement; thus, proper education should be delivered to the local population from schools to different media to encourage them to invest in this technology.The solution should be investigated, where people are reluctant to handle animal dung matter in some regions.The critical success of the establishment relies on the household's motivation to adopt this process.
To have consistent revenue, the electricity and the digestate slurries should be sold to local suppliers (Orskov et al., 2014).The Malawian electricity company, ESCOM, should focus more on promoting the development of AD technology.Farmers who sell high-value products such as tea, coffee, or tobacco could benefit from installing large reactors in combination with other technologies, such as hydrothermal processing.This would allow them to produce biochar and valorise the energy and wastes produced on the farm, leading to an increase in revenue, improved efficiency, and a better quality of life for the surrounding community.Ultimately, more efforts should be made to reduce the cost of producing biogas, making it more competitive compared to other renewable sources of electricity.

Conclusion
The generation of electricity from biogas in rural Malawi has the potential to improve the quality of life there significantly.A recent study has revealed several economically feasible options, supported by a positive cost-benefit analysis over a 20-year timeframe.When compared to anaerobic digestion of cow dung alone, cogenerating cow dung with grass silage was found to be more favourable.The cost of constructing three reactors was found to be comparable to previous studies.To produce enough cow dung feedstock, households should have four to six cows.Construction of a 15.09 m 3 fixed dome reactor (with gas storage) was found to be most feasible, with a net present value of $8962.58 and a payback period of 4 years.The levelized cost of electricity was slightly lower than the actual electricity cost from the grid, at $0.06/KWh.Although the construction of a brick fixed dome is possible, careful selection of materials is necessary to reduce initial investment costs.This would provide households with basic electricity and a continuous gas supply for cooking while also earning a low income.Selling maize products instead of milk could also help make the study viable for small farm exploitation.The heat produced by the CHP unit could be used to recycle some water back to the digester and reduce the consumption of the water, reducing the strain of supplying water in remote areas.Finally, this study could be sustainable to generate electricity and improve the quality of life in rural areas in Malawi.

Fig. 1
Fig. 1 Diagram showing the different options available for the household for the installation of AD reactor

Fig. 2
Fig. 2 Diagram of the Anaerobic digestion system (dash line = valorised waste), where the different variables used and explained for this study (23) V tank =L*H Dig *W (24) S tank = 2* W*H Dig + 2* L*H Dig +(L*W) floor D dome − H dome )

Fig. 3
Fig. 3 Simple diagram in 2 dimensions of the AD reactor of the tank and the dome, where L is the length H is the total height of the reactor

Fig. 4 %
Fig. 4 % Cost of the construction of brick and concrete reactor with different reactor sizes

Fig. 5
Fig. 5 Diagram showing NPV value obtained for scenario 1 and for scenario 2 for the different reactor size Fig.6NPV value in $ for the scenario 3

Fig. 8
Fig.8CO 2 emission saved using the digested slurry produced in the brick reactor, where A is only cow dung, B is the co-digestion of CD/HF, C is the co-digestion of CD/grass, and D is the co-digestion of CD/maize

Table 1
Main reference values for techno-economical analysis

Table 2
Chemical content of the different feedstocks %DM biomass *%BY disgestate Electr t t icity t t excess E electr t t icity t t Electr t t icity t t Re R R actor E pu E E mp st s s irrer Electricity House E basic household

Table 3
Saved emission from digestate = E N *F N + E P *F P + E K *F K

Table 3
Value from the emission of the different fertilisers produced

Table 4
Dimension value of the brick reactorThe total volume of the reactor is indicated in bold.This value is used in all publications for all the calculations.

Table 5
Cost of the different materials to build the brick reactor

Table 6
Final cost of the reactor

Table 7
Annual cost for the brick reactor

Table 8
Benefit for the different size of the reactor size for the brick reactor producing biogas from (A) cow dung (CD), (B) CD/HF, (C) CD/grass silage, and (D) CD/maize silage

Table 9
NPV, IRR and payback value for the scenario 1 and 2

Table 10
NPV, %IRR and PB in dollars for the scenario 3

Table 11
Levelized cost of electricity LCOE analysis in $/kWh

Table 12
Different carbon emissions produced and saved compared to fossil fuel by cow dung and biogas production during the storage and the entire process