From wastewater treatment to water resource recovery: Environmental and economic impacts of full-scale implementation

To reduce greenhouse gas emissions and promote resource recovery, many wastewater treatment operators are retrofitting existing plants to implement new technologies for energy, nutrient and carbon recovery.

1 Highlights (3-5 bullet points, max 85 characters including space)  Wastewater treatment plants retrofit with resource recovery and N 2 O control  Retrofitting comes with improved environmental impacts and increased costs  N 2 O control provides the best reduction of climate change impacts at lowest costs  Combining technologies for resource recovery reduce lifecycle impacts  Chemicals and electricity for resource recovery increase freshwater eutrophication

Introduction
Only a decade ago, wastewater was considered a serious environmental and health problem, while it is now increasingly valued as a resource in many parts of the world (Larsen, 2015;Mo and Zhang, 2013;Van Der Hoek et al., 2016). Wastewater is rich in nutrients, and when discharged untreated into receiving water bodies, severe eutrophication problems can occur. Additionally, efficient biological treatment processes demand energy, and incomplete nitrification/denitrification can lead to unwanted emissions of the potent greenhouse gas nitrous oxide (N 2 O), 265 times more powerful than CO 2 (Shindell et al., 2013).
The role of wastewater treatment plants (WWTPs) currently transforms from removal of nitrogen (N), phosphorous (P) and organic materials, into integrated resource recovery and pollution control. The majority of the removed phosphorus and part of the removed nitrogen ends up in residual wastewater sludge, which is therefore important to valorise when moving towards wastewater treatment integrated with resource recovery. There are many ways of valorising the sludge, e.g. through anaerobic digestion to produce biogas, and subsequent use of the degassed sludge as fertiliser on soil (Morero et al., 2017;Pfluger et al., 2019). However, high levels of heavy metals in sludge may limit its applicability as a fertiliser (Jensen and Jepsen, 2005). Consequently, four major Danish WWTPs incinerate degassed sludge and dispose of its ashes in landfills. Worldwide, technologies are now being developed for energy recovery (biogas, electricity, heat) and for recovering phosphorous (e.g. Hukari et al., 2016), heavy metals and sand from sludge ashes, to recycle P in its mineral form and reduce the consumption of conventional phosphatebased fertilisers, chemicals, and silica sand, respectively (EasyMining, 2020).
Due to these benefits, the circular economy is high on the agenda of wastewater utilities, and it is believed to be the right strategy for reaching resource-, energy-and CO 2 -neutrality (e.g. Danish EPA, 2020;SMART-Plant, 2021). Hence, major Danish wastewater utilities aim to retrofit their WWTPs into water resource recovery facilities (WRRFs), such as the VARGA project in Copenhagen (BIOFOS, n.d.).
Increasing circularity and reducing environmental impacts require investments and may decrease economic value for affected stakeholders. Resource recovery technologies may also produce environmental burden shifts, i.e. decreasing GHG emissions, while increasing the effects of other environmental impact categories. Hence, holistic assessments are needed.
Researchers currently use life cycle assessment (LCA) and life cycle costing to quantify the environmental and economic impacts of conventional wastewater treatment (e.g. Mcnamara et al., 2016;Niero et al., 2014), and a best practice guide has been published (Corominas et al., 2020). Lorenzo-Toja et al. (2016) used LCA and life cycle costing (LCC) to provide an eco-efficiency assessment (ISO 14045, 2012) of 22 conventional Spanish WWTPs.
Our review of recent existing studies on the subject (Table 1) illustrates that authors with few exceptions  have approached the problem either from an environmental (Delre et al., 2019;Fang et al., 2016;Guven et al., 2018;Hao et al., 2019;Kehrein et al., 2020;Pradel and Aissani, 2019) or an economic viewpoint (Boiocchi et al., 2017;Riley et al., 2020). To our knowledge, the majority of combined economic and environmental assessments of resource recovery facilities have been based on literature studies (e.g. Hao et al., 2019) or pilot-and lab-scale experiments (Guven et al., 2018;Pradel and Aissani, 2019). Tian et al. (2020) made a combined economic and environmental assessment of a full-scale WRRF including thermal energy recovery from effluent, the pyrolysis of sludge and combined heat and power generation.
The study focused on a state-of-the-art North American WWTP and covered the full life cycle, albeit without considering methane losses and laughing gas emissions from the plant. The study built upon proposed design scenarios and not the actual implementation.
Due to the numerous options for retrofitting WWTPs, we hypothesise that the true impacts of resource recovery facilities need to be uncovered from several real-life and full-scale retrofitting cases. Therefore, as a novelty, we provide a combined environmental and economic assessment of technological advancements 6 on an existing state-of-the-art, energy-efficient WWTP. By 2025, the plant will be a full-scale energy and resource recovery facility that valorises waste by-products and reduces GHG emissions. Retrofitting covers five alternatives to recover nutrients and energy, and reduce emissions, compared to a business-as-usual baseline WWTP in 2025. The novelty of our study relies therefore not only on the combined environmental and economic assessment of integrated resource recovery and pollution control measures but also on the reduced uncertainty in the data input that are mostly based on real plant data and pilot-scale results. Our results provide insights into the potential hotspots and trade-offs that come as a consequence of a new benchmark for efficient wastewater management.
The study aims to answer four important research questions:  Is the transition from currently operating WWTPs to WRRFs environmentally and economically sustainable?
 Who are the major affected stakeholders, and how do retrofitted WWTPs change economic value across stakeholders?
 Where are the main hotspots and uncertainties for an environmentally and economically sustainable WRRF?
 Are there trade-offs between environmental and economic impacts or between different environmental categories?

Materials and methods
We combined an environmental impact assessment with an economic value evaluation, using a standardised eco-efficiency framework (ISO 14045:2012). The environmental impact assessment was performed through LCA, while the system value was expressed in total value-added (TVA) supplemented by estimated abatement costs of CO 2-eq emissions and phosphorous recovery costs.

Goal, scope and functional unit
The main goal of the study was to assess the environmental and economic performances of technological advancements in WRRF, compared to a WWTP baseline in 2025. The "treatment of 1 m 3 of wastewater up to legally defined discharge limits of TN, TP, COD, BOD for a period of 50 years" constitutes the functional unit (FU), which is relevant for comparing treatment alternatives with the same wastewater inlet composition. Wastewater composition of Avedøre WWTP is dominantly municipal (industrial wastewater < 10%). Further details about wastewater characteristics and discharge limits are reported in SI A.

Case study, alternative definitions and system boundaries
Our starting point is the ongoing conversion of Avedøre WWTP to a WRRF by 2025 (VARGA, 2017) ( Figure   1). The treatment plant services Copenhagen, has a capacity of 400,000 person equivalent and treats 25-26 million m 3 wastewater annually, or around 271,000 PE, assuming a BOD PE of 0.06 kg/PE per day (Table A1. SI). The plant discharges into the Bay of Køge.

Alternatives
We define five levels of technological advances to retrofit the baseline WWTP ( Table 2). Modelling of the baseline WWTP (RF Baseline) in 2025 starts with the plant's 2016 performance, assuming that biogas production by 2025 will be upgraded for city gas distribution.
RF Baseline includes mechanical treatment and activated sludge for nitrogen removal, followed by phosphorous chemical removal. The sludge is anaerobically digested to produce biogas, cleaned with amine scrubbing, while the dewatered sludge is incinerated and then landfilled.
Our retrofitting alternatives (Table 2) make incremental improvements in resource and emission removal efficiency for the reference WWTP (RF Baseline). A1: RF N2O augments A0 with real-time monitoring and control of N 2 O production and emissions from biological processes. A2: RF N2O+CH4 includes biological upgrading (bio-methanation) of the biogas for increased methane production, in combination with a power-to-hydrogen (P2H) technology. A3: RF N2O+CH4+P adds sludge ash treatment to recover phosphorous, including co-production of ferric chloride, aluminium hydroxide and sand. A4: RF N2O+CH4+P+C substitutes the existing primary clarifier with new pre-filtration, built-in dewatering technology for increased carbon (COD) harvesting and, subsequently, higher net methane production (Gavala et al., 2003). Finally, A5: RF N2O+CH4+P+C+AX improves N removal, using anammox in the sidestream reject flow of the dewatering process to alleviate activated sludge system load.  2 ). Before being emitted to the gas grid, the biogas is upgraded through ammine scrubbing, to remove CO 2 and vide purified biomethane. The degassed sludge is then dewatered and subsequently incinerated in an onsite ineration plant. Sludge ashes are finally deposited in the onsite internal landfill. : RF N2O+CH4 The biogas produced from AD is biologically upgraded through bio-methanation. This process uses croorganisms such as archaea as a catalyser in the reaction of CO 2 , which is present in the raw biogas, and H 2 into CH 4 o-methane). H 2 is produced with onsite electrolysers (power-to-hydrogen (P2H) technology) that need electricity and ionised water. Electrolysis will also create by-products such as oxygen and heat that may be valorised. The pilot-scale -methanation plant at Avedøre has demonstrated the stable production of very high-quality gas (more than 97% CH 4 uge and Bach, 2018). : RF N2O+CH4+P The sludge ashes are converted from waste products into resources. They are assumed to be sent to wedish facility and treated through a novel world-leading technology (EasyMining, 2020) to recover: phosphorous as an phosphate products (90-95% recovery rate), silica sand residues as sand and iron (ca. 10% recovery rate) and minium (ca. 40% recovery rate) as iron chloride and aluminium hydroxide, respectively. The new products substitute nventional phosphate products, silica sand, iron chloride and aluminium hydroxide. NREC,

RMR
Pilot-scale Solid waste management (sludge ashes) Secondary data (LCA + TVA) : RF N2O+CH4+P+C A pre-filtration (PF) unit with 16 filters is installed to replace conventional primary clarification. e aim is to harvest more suspended solids and, consequently, more carbon. This novel technology has an in-built watering unit that can achieve a concentration of total suspended solids up to 25%TS in the primary sludge against ca. TS of a conventional primary clarifier. This results in additional biogas production and savings in aeration energy. e alternative A4-replacing primary clarifier with pre-filters that can retain up to 70% suspended solids with the aid of ER Pilot-scale/Partlyimplemented Water treatment (primary mechanical treatment) lymers can also help increase the capacity of the digesters and hence release one of them to treat food waste (FW).
: RF+N2O+CH4+P+C+AX A sidestream anammox (anaerobic ammonium oxidation) plant can be installed to remove rogen from the sidestream without utilising carbon. The avoided carbon can instead be used for energy production. plementing an anammox plant has the additional benefit of saving potential expansion of aeration tanks. Anammox be a source of N 2 O, and therefore its implementation needs to be carefully evaluated.

PC-NREM Proposed
Dewatering of sludgereject flow back to activated sludge Secondary data (LCA) Primary data (TVA)

System boundaries
Foreground processes included wastewater influent, treatment, sludge management, receiving waterbody discharge and advancement options ( Figure 1). Background processes included directly linked upstream external processes, namely electricity and heat, raw material requirement and chemicals, and included the substitution of downstream background process impacts such as natural gas, heat, chemicals, silica sand, feed phosphate and artificial fertiliser, that receive inputs from the foreground system (Hauschild et al., 2005) ( Figure 1).

Data inventory: TVA + LCA
Life cycle inventory and cost data were based on results from the pilot-scale, full-scale implementation, water utility reports, augmented with literature values and expert estimates from project partners, where data were not available. Wastewater amounts and loads were assumed to increase by 8.4% from 2016 to 2025. Value-added taxes (VAT) were excluded from the analysis, while landfill and pollution taxes were included. All costs are reported as 2019 prices. One-time costs were amortised using a 4% interest rate. Table 3 lists key inventory data for the LCA.

Background energy production in 2025
Average electricity and heat mixes in 2025 were modelled based on the Danish energy outlook reportfrozen policy (Danish Energy Agency, 2018) that forecasts sources of energy production and consumption in Denmark up to 2030. Given the uncertainty behind the energy sector's actual development, we used a scenario analysis for the energy mix to explore how a changed pathway for future power generation could affect the results. Further details are in SI B.

Environmental impact assessment: LCA
LCA modelling followed an attributional framework. Since all the scenarios are multifunctional systems, we performed system expansion by crediting recovered resources, such as biogas and heat production and export, and the substitution of conventional phosphorus, sand and chemicals production. Avoided impacts in conventional background processes were credited as a mix of average market data. This choice is justified for "micro-level decision support" with no relevant consequences on the installed capacity of the background system (e.g. energy market on a national scale) (EC-JRC, 2010; Laurent et al., 2014). Most background processes were downloaded from ecoinvent database version 3.5 along with the "allocation at the point of substitution" system model approach (Wernet et al., 2016) that fits our choice of modelling the alternatives with an attributional framework A complete database with the selected ecoinvent processes and inventory data for this system model is reported in the SI B1-B6.

15
Modelling of the impact assessment was performed with EASETECH v.3.3.7.  that is an LCA software that allows for tracking water/mass balances and substance flows across the different treatment steps. The ILCD method provides 15 impact categories (EC-JRC, 2010). We chose to limit the reporting to six particularly relevant categories, namely climate change (CC), terrestrial eutrophication (TE), freshwater eutrophication (FE), marine eutrophication (ME), depletion of abiotic resources-fossil (DAR-F) and -reserve base (DAR-RB). A primary screening for selecting categories was carried out by estimating normalized impacts. Normalisation to person equivalents (PE) followed ILCD guidelines (EC-JRC, 2010), and normalisation references are reported in  TVA is the sum of the economic value added (VA) for each assessed stakeholder (s) in alternative a. The economic value of the water user (VA water user ) is defined as the expected wastewater fee (EWWF) minus the actual wastewater fee (AWWF) for each of the implemented alternatives:

VA water user = EWWF -AWWF (Eq.2)
EWWF represents the wastewater fee expected by the consumer and was based on the average fee paid in 2016-2018, excluding fee contributions to sewers and administration (SI D1). EWWF can be considered a proxy of the willingness of the water user to pay (Angelis-Dimakis et al., 2016). AWWF represents the actual fee to be paid in an alternative strict cost-recovery scheme, i.e. AWWF equals the reimbursement needed to cover the difference between the wastewater operator's income from selling by-products and total capital and operation costs in each alternative:

AWWF = (Income SALE BY-PRODUCTS -CAPEX -OPEX) Wastewater Operator (Eq. 3)
The VA of the wastewater operator is zero, following the principle of full cost recovery.
Sludge ashes treatment and P-recovery create value for the P-recovery company:

VA P-recovery company = Income -CAPEX -OPEX (Eq.4)
The wastewater operator pays pollution and landfilling taxes to the state, and hence a value-added is included for the state:

Abatement costs for CO 2 -eq emissions and P-recovery costs
Abatement costs for carbon dioxide emissions and recovered phosphorous were calculated by considering the total costs, revenues and savings induced by the alternative, relative to avoided CO 2 -eq emissions and P-recovery. More details are in SI D2.

Data quality framework
Data quality revision (DQR) was performed with a pedigree matrix, using five data quality categories (Weidema and Wesnaes, 1996). An average data quality rating score (ADQ) was calculated and then reported against sensitivity ratios for selected parameters to identify the most uncertain and sensitive parameters for a Monte Carlo analysis (SI F).

Perturbation, uncertainty and scenario analysis
Perturbation and uncertainty analyses were carried out for both environmental and economic evaluation.
A perturbation analysis was performed by increasing by 10% the parameters contributing more than 5% to environmental and economic impacts. Normalised sensitivity ratios were calculated as: An uncertainty analysis was performed on the most sensitive and uncertain parameters (ADQ>4) by assigning an uncertainty range and probability distribution to the parameters (SI F & G). The parameters' contribution to overall uncertainty was estimated according to Bisinella et al. (2016) and built into EASETECH.
To place our results in the context of varying external factors, we provided a scenario analysis for alternate situations: 1) wastewater effluent recipient changed from marine to freshwater; 2) P2H electricity mix assumed to be 20% fossil power generation instead of excess wind power alone; 3) wind power-based electricity for all requirements; 4) sand substitutes cement; 5) the consumption of HCl sludge ash dissolution for P-recovery is considered LCA burden-free, since the P-recovery company can currently benefit from HCl produced as a by-product at the Kemira plant and 6) a scenario analysis of the TVA results was performed by internalising CO 2 -eq emissions, using the current CO 2 European Emission allowance.

Results and discussion
The results present the environmental and economic impacts of the six alternative plant configurations.
The alternatives build sequentially upon each other, adding another technology for each step from TP Baseline until RF N2O+CH4+P+C+AX. showing variations in the N 2 O-N emission factor between 2 and 8% of TN removed by anammox (Andersen et al., 2016;Uri Carreño, 2016). We assumed that 3% of the TN removed from anammox was converted into N 2 O-N in the alternative RF N2O+CH4+P+C+AX, so total N 2 O-N emissions increased to 1.7% of TN; 13% of TN sedimented in sludge, and 8% ended up in the effluent.

Mass flow analysis
In total, 93% of TP ended in the sludge ashes and was either landfilled in the alternatives TP -RF N2O+CH4 or recovered to produce high-value products such as feed phosphate (monocalcium phosphate (MCP)) in the alternatives with P recovery. P-recovery recycled 95% of TP from the sludge ashes, corresponding to approx. 171 tons per year.

20
In the four alternatives, namely RF Baseline until RF N2O+CH4+P, 33% of the COD was converted in the biological activated sludge system, while 34% was anaerobically digested and converted into energy, i.e.
The increase of COD in AD increased methane production compared to RF Baseline.

Environmental impacts
Overall, the five alternatives reduced climate change impacts compared to the baseline (Figure 3). The four alternatives RF N2O+CH4 -RF N2O+CH4+P+C+AX also reduced their impacts compared to both RF Baseline and RF N2O in the categories terrestrial eutrophication (TE) and fossil depletion (DAR-F) impacts, while freshwater eutrophication (FE) impacts were equally the highest for RF Baseline, RF N2O and RF N2O+CH4.
Marine eutrophication (ME) did not significantly vary across alternatives, except for the last alternative 21 implementing sidestream anammox. Only -in the category reserve base resource depletion (DAR-RB), RF baseline showed lower impacts compared to RF N2O+CH4. In 2025, the strategy to upgrade all biogas, rather than having CHP, seemed to pay off to obtain negative fossil depletion impacts already in the baseline plant performance (-0.23 MJ m -3 ), although a higher reduction is produced by the other alternatives ( Figure 3).  Table E.

Climate change
Despite only 1.6-2.6% of TN (Table 4) emitted as N 2 O, the climate change impacts were very large. They decreased by between -35% and -59% compared to the baseline following the implementation of new technologies. Implementing real-time N 2 O measurements and control as a first step decreased impacts by almost 40% compared to the baseline treatment plant performance, without a significant increase of impacts in the other environmental categories (<0.4%) (Figure 3). For the uncertainty assessment, we used a 30-60% reduction range based on previous full-scale results (Chen et al., 2019). We consider it a conservative estimate of long-term reduction, because the future optimisation of real-time controls (e.g. increasing suspended solids in the aeration tanks) may decrease N 2 O emissions even further.
Implementing bio-methanation for biogas upgrading (RF N2O+CH4 -RF N2O+CH4+P+C+AX) had a beneficial effect on both reducing climate change (up to -0.13 kg CO 2-eq m -3 ) and avoiding fossil resource depletion up to -2.4 MJ m -3 (avoidance of natural gas extraction and combustion). However, it increased reserve base resource depletion impacts (+93% increase, Figure 3). Implementing pre-filtration induced an additional 13% reduction in CO 2 emissions compared to the previous alternative. However, installing pre-filters may increase the production and emission of N 2 O, as the filters will harvest more COD that is needed for denitrification. Adding artificial carbon sources could counterbalance this negative effect. The potential increase in N 2 O, and the use of artificial carbon sources such as methanol, has not yet been established, so they are not included herein.
The alternatives implementing P-recovery and anammox (RF N2O+CH4+P and RF N2O+CH4+P+C+AX) increased climate change impacts by 4% and 12% compared to the previous alternative. More efficient nitrification/denitrification with anammox increased N 2 O emissions and used additional electricity, as also reported by Fenu et al. (2019). As studied by Andersen et al. (2016) and Uri Carreño (2016) in another Danish WWTP, up to 8% of the TN removed by anammox can be emitted as N 2 O. Herein, we assumed that 3% of TN removed from anammox would end up as N 2 O, hence the increase in climate change impacts in this last alternative.

Terrestrial eutrophication
TE impacts primarily stemmed from the onsite incineration of sludge ashes, while a negative contribution was made by avoided nitrogen oxides (NOx) during natural gas combustion, avoided heat production and the substitution of conventional monocalcium phosphate (MCP) production. TE impacts decreased along with the increased implementation of pollution control and resource recovery technology (-11% to -6%), except for RF N2O, with the same impacts as RF Baseline. P-recovery (RF N2O+CH4+P-RF N2O+CH4+P+C+AX) induced a net increase of 2% of TE impacts, as impacts from using chemicals and electricity exceeded impacts avoided from substituting conventional MCP production; however, overall TE impacts were still lower than RF Baseline.

Freshwater eutrophication
FE impacts were primarily induced by chemicals and electricity consumption in the baseline treatment plant and increased following the implementation of novel technologies by up to 22%. P-recovery implementation increased FE impacts by 7% compared to RF N2O+CH4, as impacts avoided from the beneficiation of phosphate rocks could not counterbalance the impacts from consumption (chemicals and electricity) needed for the sludge ash treatment to recover phosphorous. On the positive side, in alternatives with P-recovery, only 5% of the total P sludge ashes ended up being landfilled against 95% in alternatives without P-recovery, i.e. RF Baseline, RF N2O, RF N2O+CH4 (Table 4). The last two alternatives, specifically RF N2O+CH4+P+C, increased FE impacts by an additional 11%, due to the additional consumption of iron chloride and polymer for pre-filtration.

Marine eutrophication
Across alternatives, more than 95% of the ME impacts were caused by discharging nitrogen in the effluent.
No marked changes of ME impacts were seen when implementing novel technologies (up to -2%), except for the alternative implementing anammox (-16% compared to baseline). The discharged concentration of nitrogen across alternatives was 51% lower than the permitted discharge limit of 8 mg/l TN. However, the anammox plant decreased total nitrogen in the effluent by an additional 15%.

Fossil resource depletion
Fossil resource depletion impacts decreased following the implementation of new technologies. Increasing the production and export of bio-and neo-methane avoided extracting approx. 3.2 Million Nm 3 natural gas yearly in the alternatives RF N2O+CH4-RF N2O+CH4+P. Pre-filtration (RF N2O+CH4+P+C-RF N2O+CH4+P+C+AX) additionally increased biogas production, and hence the amount of upgraded biogas to natural gas, by 18% with total annual biogas production of approx. 3.7 Million of Nm 3 . The alternative RF N2O+CH4+P increased DAR-F impacts by 6%, due to producing chemicals required for the dissolution of sludge ashes and separation of P, Fe and Al.

Resource depletionreserve base
As opposed to fossil impacts, DAR-RB impacts generated a burden to the environment in all alternatives except for RF N2O+CH4+P. The alternative RF N2O+CH4 increased impacts by 93% compared to RF Baseline and RF N2O. Electrolysers for hydrogen production (RF N2O+CH4 -RF N2O+CH4+P+C+AX) consumed two times more electricity than the entire baseline plant operation (Table 3). P2H technology used excess wind power for electrolysis that affected the DAR-RB category, due to the production of wind turbines requiring minerals from the ground, such as Indium. The electricity mix is therefore of primary importance when designing a strategy for reducing CO 2-eq emissions.
In the alternative RF N2O+CH4+P, phosphorous is recovered in its mineral form, and its DAR-RB impacts reduced by -118% compared to the baseline -thanks to substituting conventional MCP, aluminium hydroxide, iron chloride and sand production that counterbalance additional impacts from additional chemical and heat consumption. Pre-filtration (RF N2O+CH4+P+C) induced an additional 273% increase in impacts compared to the previous alternative; however, net impacts were still 68% lower compared to the baseline. The increase was due to additional equipment and the use of iron chloride and polymers 26 (polymer for the dewatering unit and iron chloride used as a flocculant). DAR-RB impacts did not significantly increase, due to the use of anammox (1% increase).

Scenario analysis: LCA
The environmental performance for implementing novel technologies changed in different scenarios (SI H).
For example, FE impacts increased if effluent was released into a freshwater body, in which case the discharged phosphorous had the greatest impact. This means that wastewater operators should focus on reducing the effluent discharge concentration of P rather than optimising resource recovery. With a change in water recipient, ME impacts did not decrease, since the characterisation factor (CF) of nitrogen discharging into surface water is "1" in both the ME and FE impact categories. The LCIA method ReciPe 2016 updated CF of TN in surface water from 1 to 0.2968 in the ME category, which reduced ME impacts by up to 67% across alternatives ( Figure H2, SI H).
Electricity mix was fundamental in determining whether novel technologies performed better than the baseline. A 100% wind power-based electricity provision for all requirements decreased climate change impacts across alternatives. P2H for biogas upgrading with a share of 21% fossil-based electricity increased CC, TE and RD-F impacts, equalising or worsening impacts compared to RF Baseline ( Figure H1, SI H).
Assuming that sludge ash treatment for P-recovery utilised hydrochloric acid as a waste by-product reduced DAR-RB impacts of the last three alternatives compared to the baseline.

Total economic value added
With the implementation of new technologies for resource recovery and pollution control, the TVA decreased from 0.23 to a minimum 0.18 € m -3 for the pre-filtration and anammox alternatives (Figure 4.e).
RF Baseline and RF N2O showed the highest TVA, which reflects that by-product revenues did not counterbalance the increased costs of implementing resource recovery. Implementing real-time N 2 O control (RF N2O) reduced the available surplus refunded to the water user by less than 0.2%.
Across alternatives, water user VA contributed between 68 and 85% of the TVA (Figure 4.e). The state/government was the second-highest contributor to the TVA (between 12 and 15%), while the Precovery company contributed only 0.8% in the last three alternatives implementing sludge ash treatment and P-recovery.
The concept of full cost recovery defines the VA of the wastewater operator to zero (Figure 4.b). Any change in operation and investment cost is reflected in the actual wastewater fee paid by the water user.
Revenues from the sale of by-products (bio-methane, neo-methane and heat) and from expected wastewater fees generated a surplus (Available Surplus in Figure 4.b). Costs of implementing resource recovery technologies reduced the surplus by between 13 and 19%, except for RF N2O, which solely implemented N 2 O measurements and control.
The water user domain always showed a positive VA, due to the expected wastewater fee (EWWF) being 0.44 € m -3 and 36 to 45% higher than actual wastewater fees (AWWFs) in all alternatives, including the baseline (Figure a.b).
The VA of the state and P-recovery company was only affected by a change in the last three alternatives RF N2O+CH4+P -RF N2O+CH4+P+AX, due to sludge ash treatment for phosphate recovery and anammox affecting pollution taxes.

P2H and biological biogas upgrading
The bio-methanation plant coupled with P2H (RF N2O+CH4) increased the TOTEX (CAPEX + OPEX) by 24% (+0.08 € m -3 ), mainly caused by the significant cost of increased electricity consumption. Revenues from selling bio-and neo-methane and heat in the alternative RF N2O+CH4 increased by 91% (+0.05 € m -3 ) from the baseline, but they did not counterbalance the costs of additional electricity consumption (0.06 € m -3 ), drinking water (0.0006 € m -3 ) and investments (0.01 € m -3 ). In conclusion, biogas upgrading increased wastewater fees and consequently reduced VA for the water user.

P-recovery from sludge ashes
By implementing P-recovery from sludge ashes (RF N2O+CH4+P), the wastewater operator avoided paying landfill taxes but did pay the P-recovery company to perform the sludge ash treatment. The wastewater operator's VA, and consequently the water user's VA, increased by +0.5% (0.0009 € m -3 ), while for the state it decreased by 13% (-0.004 € m -3 ) in RF N2O+CH4+P, RF N2O+CH4+P+C and RF N2O+CH4+P+AX. The Precovery company increased its profit by +0.002 € m -3 . Overall, the TVA was 11% lower compared to RF Baseline in this alternative, primarily because the state decreased its VA by 14%, and this was not counterbalanced by the P-recovery company's income.

Pre-filtration for increased carbon harvesting
Additional pre-filtration decreased the TVA by 18% compared to the baseline and by an additional 6% compared to the bio-methanation alternative. This alternative, together with the last anammox alternative, generated the lowest TVA. The additional loss of TVA (-0.01 € m -3 ) was due to an increase in the TOTEX, which was not balanced by an increase in revenue from selling bio/neo-methane and heat (+0.018 € m -3 ).

30
The last and most complex alternative, RF N2O+CH4+P+C+AX, required additional investments of 0.003 € m -3 , while operation costs reduced by 0.002 € m -3 compared to previous alternatives, due to anammox decreasing TN in the effluent -and hence reducing pollution taxes.

Internalising CO 2 allowance prices
Our results suggest that increased wastewater management environmental performance, beyond biogas production, is not economically feasible in the current market. Internalising CO 2 -eq emission costs, using the current European allowance price of 25 €/ton CO 2 -eq (Markets Insider, 2019), will decrease the TVA by another 3-6% (Fig 4.e, red markers), but the alternative RF N2O will increase the TVA by only 2% above RF Baseline. The limited influence on TVA value suggests that the current European allowance price does not promote the reduction of CO 2-eq emissions.
3.5. Abatement cost for CO 2-eq emissions and P-recovery costs 3.5.1. Abatement cost for CO 2 -eq emissions According to our evaluation, it cost 2 €/ton CO 2 -eq to reduce emissions with real-time N 2 O control. In the alternatives with enhanced biogas production and carbon harvesting, costs were 651 to 967 €/ton avoided CO 2 -eq avoided ( Table 5). Including savings and revenues from resource recovery, costs were reduced by 67% to 215 and 57% to 412 €/tons avoided CO 2 -eq for the bio-methanation plant and the pre-filtration alternatives. Except for N 2 O control, abatement costs are five to 13 times higher than the current European allowance price for CO 2 -eq.

P-recovery costs
The costs of P-recovery in RF N2O+CH4+P, without and with savings and income, were estimated at 0.56 and -0.14 € kg P -1 , respectively, i.e. between two and 12 times less than the cost of P-  (Wernet et al., 2016). Since 32 the examined P-recovery technology is under continuous development, costs are expected to change over time.

Eco-efficiency and decision support matrix
Our results showed that for the current case, environmental improvements come with a financial cost, and no alternatives are eco-innovative. However, real-time N 2 O control showed a similar economic performance to RF Baseline and produced a visible reduction in CC impacts (Table 6). Several technologies were placed in a trade-off position in some impact categories, e.g. RF N2O+CH4. Table 6. Qualitative eco-efficiency assessment. Qualitative scores, i.e. "+", "-", "0" when the performance of the alternative is "better", "worse" or "insignificant" (< 5% difference ) compared to the baseline plant performance or the previous alternative in the six environmental categories and the economic value-added performance. The green colour indicates a trade-off in favour of reduced environmental impacts, but decreased economic value. Grey indicates a deterioration zone: increased environmental impacts and decreased economic value.

Conclusions and final recommendations
Our study uncovered the environmental and economic potentials and drawbacks of retrofitting an existing energy-efficient wastewater treatment into a full-scale resource recovery facility. The results revealed that:  Not all novel technologies were able to reduce impacts in all LCA categories, and none of the retrofitting alternatives showed improved financial performance compared to the baseline.
 N 2 O measurement and control seemed to be both environmentally sound and financially feasible by achieving a 40% reduction in N 2 O emissions and a 35% reduction in CC impacts while decreasing economic value by only 0.2% compared to the baseline.
 Power-to-hydrogen and bio-methanation could additionally decrease climate change and fossil impacts, but only if excess wind power is used as background electricity.
 The main strength of sludge ash treatment was in the high recovery of phosphorous (95%) and improved LCA performance by substituting the conventional production of monocalcium phosphate.
 Pre-filtration replacing a physical primary clarification process was beneficial for decreasing climate change and fossil depletion impacts, while anammox reduced marine eutrophication impacts.
Reductions came at the cost of increased impacts in DAR-RB and potentially increased N 2 O emissions.
 All alternatives showed a positive added economic value (0.18-0.23 € m -3 ), although novel technologies increased CAPEX and OPEX, and TVA decreased compared to the baseline except for RF N 2 O.
 In our case, abatement costs for CO 2 -eq reduction and P-recovery were in the range 2-1138 €/ton CO 2-eq avoided and -140 and 561 € ton P recovered.
Our findings provide a clear understanding of the possible hotspots and trade-offs of novel technologies for wastewater treatment and resource recovery. The study will help decision-makers understand system performance according to environmental and economic criteria. To uncover the full socio-economic benefits of implementing GHG control and resource recovery, other criteria, including the effect of nonmarketed values, will need attention in future studies.

Conflicts of interest
Unisense is a supplier of N 2 O sensor technology. EnviDan is a consultancy company within wastewater treatment technologies. BIOFOS is a publicly owned wastewater treatment service provider.
The partners UNISENSE, EnviDan and BIOFOS supported the project with data provision and discussion of the results. The final choice of parameter values, ranges for uncertainty analysis and calculations were carried out by the university authors independently of commercial partners. All values were assessed and justified by the university authors and reported by the inventory in our supporting information. Specifically, N 2 O emissions from UNISENSE were based on peer-reviewed studies (Chen at al., 2019).