Biogas in WWTPs is the most underused operational opportunity in the Spanish water sector. Most plants with anaerobic digestion digest only primary and secondary sludge, when they could produce considerably more biogas by co-digesting organic waste from the agri-food industry and fats.
Well-managed co-digestion raises biogas production with a small increase in the dewatered sludge to be managed, because these wastes degrade much more than sludge. If every incoming batch is characterised, the digestate remains suitable for agricultural use.
The operational question is not whether co-digestion works, but how it is designed without compromising effluent quality or the sludge line.
Biogas production in WWTPs is one of the most mature use cases of industrial anaerobic digestion: it has been operated for decades and is a standard part of the design of medium and large plants.
But the sector learning curve has stalled at the first step: digesting only the internal sludge and accepting the biogas generated as a by-product of sludge treatment.
The second step, where the real value lies, is operating anaerobic digestion as a business unit: maximising biogas production through co-digestion, controlling the cost of final dewatered sludge management and valorising the digestate under the applicable regulations.
On top of that economic argument there is a regulatory one. Directive (EU) 2024/3019, which recasts the urban wastewater treatment directive, requires the renewable energy generated by WWTPs of 10,000 population equivalent or more to equal, at national level, 20% of the energy they consume in 2030, 40% in 2035, 70% in 2040 and 100% in 2045. It also requires energy audits every four years, the first before the end of 2028 in plants of 100,000 PE or more. Spain has to transpose it before 31 July 2027. In a plant that already has a digester, co-digestion is one of the most direct measures to get closer to those percentages.
This article describes what changes between primary and secondary sludge, why co-digestion with agro-industrial waste and fats is the step with the greatest return, what to watch in digestate quality and when thermal pre-treatment starts to pay off economically.
What changes in WWTP biogas compared with agro-industrial biogas
Anaerobic digestion in a WWTP shares the biochemistry with agro-industrial digestion, but operates under very different contractual and regulatory constraints. Three structural differences explain it:
- The primary objective is not the biogas: it is compliance with the effluent discharge to the receiving watercourse. Biogas is a by-product of sludge treatment. Any decision about the digester must guarantee that the sludge line does not destabilise, because the digester return streams (supernatant, dewatering liquor from the digested sludge) go back to the head of the WWTP and affect the discharge.
- The substrate is endogenous and fairly stable: primary and secondary sludge have a predictable composition and a flow linked to the treated water flow, although it varies with rainfall, seasonality or the floating population. That makes operational control easier, but it caps the production ceiling: the methane production potential (BMP) of sludge is relatively low (150-350 NmL CH₄/g VS) compared with energy substrates such as silages (290-340) or fats, oils and grease (FOG), which reach 800-1,000.
- Co-digestion is optional and highly profitable: a WWTP with oversized digestion capacity (very common in plants designed before primary treatment optimisation) can accept external substrates for a gate fee, generating two simultaneous revenue streams: the treatment fee for the incoming waste and the additional biogas produced.
Co-digestion with agro-industrial waste and fats: the case with the greatest return
The co-digestion of WWTP sludge with non-hazardous organic waste from the agri-food industry (whey, waste from canneries and from fruit and vegetable processing, winery waste) and with fats from industrial grease separators is, in economic terms, one of the biogas uses with the best return.
Three effects accumulate:
- The average BMP of the diet rises: fats reach 800-1,000 NmL CH₄/g VS and most agri-food wastes are above the 150-350 of sludge.
- The plant absorbs more volume, using idle digester capacity.
- These wastes are more biodegradable than sludge: they bring a lot of biogas and relatively little dewatered sludge to be managed.
The critical condition for it to work is the stability of the input. The wastes must arrive conditioned (free of impurities, shredded if solid and homogenised) and characterised per batch.
If packaging, plastics or metal scraps arrive, the mechanical problems in pumps, heat exchangers and mixers wipe out the economic return.
The operational rule: the WWTP must not become a waste pre-treatment plant, but receive an already conditioned substrate.
Before receiving the first truck, the administrative side has to be sorted out. By treating third-party waste, the WWTP needs authorisation as a waste treatment facility under Law 7/2022, usually through a modification of its environmental authorisation. Some regions already have a well-established procedure: in the Valencian Community, EPSAR authorises industries to take non-hazardous by-products with a high organic load to certain public wastewater plants. If the waste is of animal origin, such as whey or slaughterhouse waste, the animal by-products regulation also applies, which may require prior hygienisation.
What about municipal OFMSW? Today it has no place in a WWTP. Law 7/2022 (article 28.1) requires separately collected biowaste to be treated in specific facilities and without mixing it with wastes not admitted by Regulation (EU) 2019/1009, which excludes sewage sludge. The organic fraction coming out of a mechanical-biological treatment plant is biostabilised material, and the same law prevents it from ceasing to be waste for use as a fertiliser (article 28.3). In both cases the agricultural outlet of the sludge is compromised.
And before fixing the proportion of each waste it is worth validating it in the laboratory. The BMP of the waste tells you how much potential it has, but it is a batch test, under ideal conditions and with a single load. The semi-continuous test feeds a laboratory reactor continuously over several weeks, with the load and retention time of the real digester, and reveals the kinetics, the tolerance to load, the inhibitions and the acclimation time. In a WWTP that is especially valuable, because it makes it possible to anticipate the effect on the return streams to the plant head before touching the plant.
How much external waste the digester can take
There is no universal optimum proportion. It depends on the waste, on the spare volume of the digester and on the nitrogen load that the water line can handle with the return streams. As a full-scale reference, in a municipal WWTP adding food waste at 10% by weight of the feed took the share of energy demand covered by biogas from a quarter to more than double (Koch et al., 2016). The prudent approach is to increase in steps, monitoring VFAs, FOS/TAC and ammonia, and to set the ceiling with a semi-continuous test. With fats the limit comes sooner: an excessive load causes foaming and inhibition by long-chain fatty acids.
VS reduction and final sludge disposal
The cost of final dewatered sludge management is one of the highest OPEX items in a medium-sized WWTP, and its price per tonne varies greatly depending on the destination (agricultural recovery, external composting or landfill) and the distance to it.
Every additional percentage point of VS removal in the digester translates into less dewatered sludge produced.
That saving comes from improving the degradation of the sludge itself (temperature, retention time, pre-treatments), not from co-digestion: the external waste adds biogas, but it also brings its own solids, so total dewatered sludge rises slightly.
In figures: for a plant managing 8,000 t/year of dewatered sludge, at an assumed price of EUR 65/t, every 1% less sludge is worth about EUR 5,200 a year in final disposal alone.
Digestate quality and agronomic limitations
The digestate (the digested sludge; after dewatering, its solid fraction is the sludge recovered on land) can be recovered agronomically as an organic amendment, but its agricultural use is governed by Royal Decree 1310/1990, on the use of sewage sludge in agriculture, whose heavy metal limits have referred since 2024 to annex IV of Royal Decree 1051/2022, on sustainable nutrition of agricultural soils. Regulation (EU) 2019/1009 on fertilising products excludes sewage sludge, so this digestate cannot be marketed as an EU fertilising product. This framework is under review: between October and November 2025 MITECO held a prior public consultation on a draft royal decree that amends Royal Decree 1310/1990 and repeals Order AAA/1072/2013, so its progress is worth following.
The agronomic quality of the digestate from a co-digesting WWTP depends critically on the quality of the external substrates accepted.
| Parameter | Legal limit or reference | Main risk |
|---|---|---|
| Cd (cadmium) | ≤ 10 mg/kg DM (Royal Decree 1051/2022, annex IV.A) | Uncharacterised industrial substrates |
| Pb (lead) | ≤ 750 mg/kg DM (Royal Decree 1051/2022, annex IV.A) | Waste with packaging or metal scraps |
| Hg (mercury) | ≤ 10 mg/kg DM (Royal Decree 1051/2022, annex IV.A) | Poor screening |
| Pathogens (E. coli) | No legal limit for digested sludge (fertilising product reference: < 1,000 per g of product) | Incomplete digestion or absent thermal pre-treatment |
| Salmonella | No legal limit for digested sludge (fertilising product reference: absent in 25 g) | Mesophilic digestion without hygienisation |
| Impurities (glass, metal and plastic) | ≤ 3 g/kg DM of glass, metal and plastic larger than 2 mm; plastic ≤ 2.5 g/kg DM from 16 July 2026 (Royal Decree 1051/2022, annex IV.D, which refers to CMC 3 and 5 of Regulation (EU) 2019/1009) | Waste poorly conditioned at source |
Thermal pre-treatments: when they pay off
Thermal pre-treatments (THP, Thermal Hydrolysis Process, with commercial technologies such as CAMBI, Exelys or BIOTHELYS) subject the sludge to thermal hydrolysis at about 140-165 °C and 6-8 bar before it enters the digester.
The biochemical effect is twofold:
- Solubilisation of the organic matter that is difficult to biodegrade, above all from secondary sludge, rich in biomass with resistant cell walls.
- Hygienisation of the sludge (it comes out practically free of pathogens).
The operational result is an increase in biogas production (manufacturers speak of up to 50%) and a hygienised digestate, although its agricultural use remains subject to the metal limits and application periods of Royal Decree 1310/1990.
THP is usually reserved for large plants, for two reasons: the CAPEX is high (several million euros) and the thermal OPEX requires economies of scale for the extra biogas to offset the energy consumed.
For medium-sized plants the ROI is usually marginal, unless there are additional drivers (a demanding agronomic destination, high final disposal costs). In small plants, THP rarely pays off.
Illustrative case: 150,000 PE WWTP with agro-industrial co-digestion
Figures calculated from typical values in the technical literature; they do not correspond to a specific plant.
A 150,000 PE WWTP with two mesophilic digesters (38 °C) and a hydraulic retention time of 22 days. Exclusive digestion of mixed sludge (60% primary, 40% thickened secondary): about 10,500 kg of dry matter a day, with 75% volatile solids. With VS removal of 41%, the plant produces about 2,900 m³ of biogas a day (19 L per PE per day) and about 12,100 t/year of dewatered sludge at 22% dryness.
Intervention: incorporating agro-industrial waste
Agreements with two nearby industries, a dairy and a vegetable cannery, to receive their organic waste already conditioned, with the regional authorisation for co-digestion.
Gradual incorporation over 16 weeks, starting at 5% of total VS fed and rising to 18%, with reinforced monitoring of FOS/TAC, individual VFAs (especially propionic acid), total ammonia and supernatant quality. At 18%, the external wastes bring in about 1,700 kg of VS a day and the retention time falls from 22 to about 20 days.
Result in steady operation
Biogas production: 2,900 → 3,900 m³/day (+35%).
VS removal of the mixture: 41% → 47% (+6 points).
Annual dewatered sludge: 12,100 → 13,100 t (+9%). The agro-industrial waste degrades better than sludge, but it adds solids to the digester: the final mass to be managed rises slightly.
Return streams to the plant head: the wastes bring in about 50 kg of nitrogen a day, of which about 35 kg leave as ammonium in the dewatering liquor. Compared with the roughly 1,800 kg of N a day entering with the raw water of 150,000 PE, that is about 2% more load: manageable if nitrification has spare capacity, and worth watching if it is already at its limit.
Frequently asked questions about biogas in WWTPs
How much biogas does WWTP sludge produce?
The typical BMP of primary sludge sits between 250 and 350 NmL CH₄/g VS; that of thickened secondary sludge, between 150 and 250 NmL CH₄/g VS, lower because of the greater resistance of the cell walls of the biomass.
In industrial operation, the real specific productivity stays below the theoretical BMP, conditioned by the digester HRT and the composition of the mixture; that real percentage is precisely what a semi-continuous test measures, and a BMP does not. Co-digestion with agro-industrial waste or fats can markedly raise the average productivity of the diet.
What external wastes can a WWTP co-digest?
Non-hazardous organic waste from the agri-food industry (dairies, canneries, fruit and vegetable processing, wineries) and fats from industrial grease separators or from the WWTP’s own degreasing, always with regional authorisation. Municipal OFMSW, both separately collected and that coming out of a mechanical-biological treatment plant, currently has no legal place in a WWTP (Law 7/2022, article 28).
The wastes must arrive conditioned: free of impurities, shredded if solid and homogenised. The minimum characterisation per batch must include VS, C/N ratio, total nitrogen, heavy metals and impurity content.
How does co-digestion affect the digestate and its agronomic use?
Co-digestion with agro-industrial waste can improve the nutrient content (N, P, K) of the digestate, but it can also worsen its quality if the wastes bring in heavy metals or non-separable impurities.
Agricultural use of digested sludge is governed by Royal Decree 1310/1990, with heavy metal limits (Cd, Pb, Hg, among others) that refer to annex IV of Royal Decree 1051/2022; Regulation EU 2019/1009 excludes sewage sludge. Analytical traceability of the digestate is critical: characterisation per batch, not only quarterly.
When does a thermal pre-treatment such as CAMBI or Exelys pay off?
Generally in large plants, because of the high CAPEX required and the need for economies of scale to amortise the thermal OPEX.
In medium-sized plants the ROI is usually marginal, unless there are additional drivers, such as an agronomic destination that requires hygienised sludge or high final sludge disposal costs. In small plants it rarely pays off.
How is the input of an external waste validated without risking the sludge line?
With a prior semi-continuous test. In a WWTP the risk is not only the digester: the digester return streams go back to the plant head and can compromise the discharge, so trial and error at plant scale is expensive.
A laboratory reactor fed continuously over several weeks, with the planned proportion of waste and the real HRT, shows in advance up to what percentage the system holds, how much ammonia accumulates and how many weeks the consortium needs to acclimate. The BMP does not give that information: it is a batch test that measures the maximum potential under ideal conditions.
Does your WWTP digest only sludge?
You are probably leaving money on the table. Request a Smallops Operational Excellence Diagnosis and we will assess the co-digestion potential without compromising the sludge line or the effluent.
Normative and bibliographic references
Mehariya, S. et al. (2018). Co-digestion of food waste and sewage sludge for methane production: Current status and perspective. Bioresource Technology, 265, 519-531.
Nghiem, L.D., Koch, K., Bolzonella, D. and Drewes, J.E. (2017). Full scale co-digestion of wastewater sludge and food waste: Bottlenecks and possibilities. Renewable and Sustainable Energy Reviews, 72, 354-362.
Royal Decree 1051/2022, of 27 December, establishing rules for sustainable nutrition in agricultural soils.
Royal Decree 1310/1990, of 29 October, regulating the use of sewage sludge in agriculture.
Regulation (EU) 2019/1009 on EU fertilising products.
Koch, K., Plabst, M., Schmidt, A., Helmreich, B. and Drewes, J.E. (2016). Co-digestion of food waste in a municipal wastewater treatment plant: Comparison of batch tests and full-scale experiences. Waste Management, 47, 28-33.
Directive (EU) 2024/3019 of the European Parliament and of the Council of 27 November 2024 concerning urban wastewater treatment (recast).
Law 7/2022, of 8 April, on waste and contaminated soils for a circular economy.
Order AAA/1072/2013, of 7 June, on the use of sewage sludge in agriculture.
Commission Regulation (EU) No 142/2011 of 25 February 2011 implementing Regulation (EC) No 1069/2009 on animal by-products.