Ammonia recovery from anaerobic digester centrate using onsite pilot scale bipolar membrane electrodialysis coupled to membrane stripping

Ammonia recovery from centrate of an anaerobic digester was investigated using an onsite bipolar-electrodialysis (BP-ED) pilot scale plant coupled to two liquid/liquid membrane contactor (LLMC) modules. To investigate the process performance and robustness, the pilot plant was operated at varying current densities, load ratio (current to nitrogen loading), and in continuous and intermittent current (Donnan) mode. A higher load ratio led to higher total ammonium nitrogen (TAN, sum of ammonia and ammonium) removal efficiency


Introduction
Nitrogen removal from wastewater is one of the most energyintensive processes in conventional wastewater treatment plants (WWTPs), as ~77% of their total electric energy consumption is used for aeration during the activated sludge process including nitrification (McCarty et al., 2011;Svardal and Kroiss, 2011).The nitrification-denitrification process, which converts ammonia to N 2 , requires around 42-45 MJ kg N − 1 (Maurer et al., 2003;Mulder, 2003).In addition, WWTPs account for 2.8-3.2% of the global anthropogenic emission of N 2 O, a greenhouse gas with a 298 times higher global warming potential than that of CO 2 (Law et al., 2012).N 2 O emissions therefore account for 83% of the overall plant carbon footprint of WWTPs (Daelman et al., 2013).At the same time, production of ammonia from N 2 through Haber-Bosch process requires 37-45 MJ kg N − 1 (Maurer et al., 2003) and is responsible for 1-2% of the primary global energy consumption (Kitano et al., 2012;Tallaksen et al., 2015).For all these reasons, the recovery of nitrogen from wastewater as a useful fertilizer can help to reduce the enormous energy and environmental footprint of an out of balance nitrogen cycle (Rockström et al., 2009).
A substantial fraction of the global macronutrient requirements can be recovered from waste streams as it contains up to 100% of phosphorus and potassium, and up to 50% of nitrogen (Batstone et al., 2015).For the recovery of total ammonium nitrogen (TAN, sum of ammonia and ammonium nitrogen) from these waste streams, several technologies have been tested at bench-scale such as forward osmosis, membrane filtration, membrane distillation, ion exchange and electrodialysis (ED) (Maurer et al., 2006;Zarebska et al., 2015).ED has gained significant attention in recent years as it can produce a concentrated and relatively pure product stream, at lower energy consumption compared to other (membrane-based) technologies (Kuntke et al., 2018;Maurer et al., 2006;van Linden et al., 2020;Xie et al., 2016).The ED process relies on charge-based fractionation of ions using ion exchange membranes (IEMs).ED employs both anion exchange membranes (AEMs) and cation exchange membranes (CEMs) to concentrate anions and cations.When ED is applied to an ammonium/ammonia rich waste stream, positively charged ammonium (NH 4 + ) and other cations are forced to move through a cation exchange membrane (CEM) into a concentrate stream by applying an electrical current.This ED principle for ammonium removal has been investigate for different wastewater; urine (Pronk et al., 2006;Rodríguez Arredondo et al., 2017), supernatant of anaerobic digester or centrate (Thompson Brewster et al., 2017;Ward et al., 2018) and swine manure (Ippersiel et al., 2012;Mondor et al., 2009Mondor et al., , 2008)).The products of this ED process are a concentrate salt solution with ammonium (concentrate) and a (partially) desalinated wastewater (diluate).One of the limitations identified in an ED system based on CEMs/AEMs was that the pH of the concentrate solution was not high enough to convert ionic ammonium (NH 4

+
) to volatile NH 3 (Ippersiel et al., 2012).Rodrigues et al. (2020a) proposed using bipolar membranes (BPMs) instead of AEMs to enable selective ammonia recovery in a stacked bipolar-electrodialysis (BP-ED) system.A BPM consists of a cation and an anion exchange layer that allow for transport of protons and hydroxyl ions, which are produced at the junction of both layers through the dissociation of water.The produced protons and hydroxyl ions lead to an acidic diluate (pH < 6) and an alkaline concentrate stream (pH > 8), thereby ammonium can be removed from the diluate and recovered from the concentrate stream (Huang and Xu, 2006;Pärnamäe et al., 2021;Rodrigues et al., 2020a).In their minimal BP-ED design and using a synthetic wastewater, Rodrigues et al. (2020a) achieved a 80% TAN at 100 A m − 2 while consuming 18.3 kJ g N − 1 of electrical energy in a laboratory scale (6 cell pairs) system.Larger scale application of ED is usually achieved by stacking multiple cell pairs (diluate and concentrate) defined by CEMs, AEMs and/or BPMs on top of each other.Recently, a pilot-scale ED unit (30 cell pairs of CEMs/AEMs) was presented for the treatment supernatant from a domestic anaerobic digester (centrate) which achieved a concentrated product of NH 4 + (7.1 g L − 1 ) and K + (2.5 g L − 1 ) at an energy input of 4.9 ± 1.5 kWh kg N -1 .(Ward et al., 2018) Unfortunately, this concentrated NH 4 + product contained high concentrations of sodium, making it less suitable as fertilizer.Under alkaline conditions, selective ammonia (NH 3 ) recovery from the concentrate stream can be achieved by NH 3 stripping, for example by using a liquid/liquid membrane contactor (LLMC) module.The LLMC module uses hydrophobic gas-permeable hollow fibres to recover NH 3 gas into an acid solution.The driving force for NH 3 transport is the difference in concentrations between the two solutions (concentrate and acid) (Rodríguez Arredondo et al., 2017;Ulbricht et al., 2013).Another major bottleneck for the application of (BP-)ED like systems for TAN recovery from wastewater is the risk of fouling and scaling on the IEMs.Scaling of the IEMs lead to an increased energy consumption due to the increasing membrane resistance and eventually operational failure of the ED systems.Strategies for scaling mitigation include pretreatment by coagulation, filtration, ion exchange, struvite precipitation (Hao et al., 2015;Ward et al., 2018;Zamora et al., 2017), chemical or mechanical cleaning, and Donnan dialysis (Rijnaarts et al., 2018;Rodrigues et al., 2021).A recent study demonstrated that Donnan dialysis delayed the scaling and formation of calcite on CEMs, allowing for a longer operation of a laboratory-scale ED system without the interruption for cleaning (Rodrigues et al., 2021).Under suitable conditions, Donnan dialysis can exchange Na + , K + , Mg 2+ , and Ca 2+ from the concentrate stream with ammonium from the diluate stream leading to a higher TAN recovery (Rodrigues et al., 2020b).
Furthermore, the centrate of anaerobic digester typically contains a significant load of organic pollutants, with per-and polyfluoroalkyl substances (PFASs) being of particular concern due to their persistency, toxicity, mobility and bioaccumulation potential (Zhou et al., 2019).PFASs are frequently detected in both biosolids and digestate from WWTPs in Europe and elsewhere (Brambilla et al., 2016;Clarke and Smith, 2011;Venkatesan and Halden, 2013).Given the very low pKa values (pKa < 2) and high ion mobility of the negatively charged, linear-chain PFAS (Radjenovic et al., 2020), they will be transported in the electric field (Sörengård et al., 2019) and thus may electromigrate through the ion exchange membranes, including BPMs (Blommaert et al., 2020).Also, due to the relative volatility of some PFASs (e.g., PFOA and shorter chain perfluorocarboxylic acids) (Witteveen+Bos and TTE Consultant, 2016), their fate within the LLMC module should be evaluated.
In this study, we present the operational results of a pilot-scale LIFE-NEWBIES (Nitrogen Extraction from Water By an Innovative Electrochemical System) installation based on BP-ED comprised of 65 cell pairs, coupled to two LLMC modules and treating centrate of the anaerobic digester.The pilot was operated either in continuous mode (constant current) and Donnan mode (intermittent current), to investigate the impact of Donnan dialysis on the process performance in terms of ammonia recovery, membrane scaling/fouling, and energy consumption.In addition, we have investigated the impact of long-term membrane scaling/fouling on the BP-ED performance, applied cleaning strategies to remove scaling/fouling and tested the effect of the applied cleaning strategies on membrane selectivity and resistance.The primary objective was to demonstrate the feasibility of using BP-ED and LLMC for selective extraction and recovery of ammonia from anaerobic digestate and determine the optimum operational conditions to achieve satisfactory NH 4 + -N product concentration and energy consumption.To understand the potential hazard posed by PFAS in the recovery of ammonia from waste streams using the BP-ED-LLMC, we studied the fate of legacy PFAS, namely C4-C8 perfluorocarboxylic acids and sulfonates, as well as a widely used substitute of perfluorooctane sulfonate (PFOS), 6:2 fluorotelomer sulfonate (FTS).

Newbies pilot-plant description
The influent of the NEWBIES pilot plant was anaerobic digester centrate obtained after centrifuging the mixed liquor effluent of the anaerobic digester of a WWTP, treating municipal wastewater.Centrifugation of the mixed liquor effluent of the anaerobic digester was done with the addition of Kemira Superfloc SD 6081 coagulant.The WWTP is located in Girona (Catalonia, Spain) with a design capacity of 27,500 inhabitants equivalent and 55,000 m 3 d − 1 .The primary and secondary sludge are treated in two mesophilic digesters operating at 35 • C.After digestion, the digestate is centrifuged and the reject water (i.e., centrate) is directed to the inlet of the plant for its treatment.The characteristics of the centrate are summarized in the supplementary material (Fig. S1 and Table S1).Fig. 1 shows the schematic of the Newbies Pilot installation.The centrate was collected in a 10 m 3 tank that allowed settling (HRT ~ 12 h) of the suspended solids (Fig. 1) and thus minimized the clogging of the 10 µm filters installed at the entrance of the pilot plant.
The centrate was then introduced into the BP-ED stack diluate compartment using a membrane pump (DDA 200-4, Grundfos Nederland B.V., Almere, The Netherlands).Due to the applied current, ammonium and other cations were transported through a CEM to a concentrate compartment (concentrate).The concentrate was recirculated using another membrane pump (DDA 200-4).The BP-ED module of the NEWBIES pilot plant consisted of 65 cell pairs using CEM (FKB-PK130, Fumatech GmbH, Germany) and BPM (FBM-PK130, Fumatech GmbH, Germany).The BP-ED stack was provided by REDstack BV (crossflow design: 22 x 22 cm, Sneek, The Netherlands).Two platinised titanium electrodes (22 x 22 cm MAGNETO Special Anodes B.V., Schiedam, The Netherlands) were used as the anode and cathode.Polypropylene spacers (22 x 22 cm, thickness 0.05 cm, 53% open) with a silicon gasket layer at two opposing sides for sealing were used to create diluate and concentrate compartments (DEUKUM GmbH, Frickenhausen, Germany).Two Nafion N117 membranes (22 x 22 cm, Fuelcellsetc, TX, USA) were used to separate the anode and cathode compartment from terminal diluate and concentrate compartment, respectively.The concentrate was then introduced into two LLMC modules (2.5 × 8 inch, type EXF, 3 M Liqui-Cel™, NC, USA) connected in parallel using a membrane pump, where the gaseous ammonia diffuses across the membrane and was transferred to a product liquid (Fig. 1).Sulfuric acid (37%, v/v) was continuously dosed by a membrane pump (DDA7.5-16,Grundfos) to keep the product's pH at 2.5, yielding ammonium sulfate solution.The electrolyte solution for both cathodic and anodic compartments was 0.1 M Na 2 SO 4 and was recirculated using a membrane pump Grundfos).Direct current was supplied to the BP-ED stack using a power supply (SM15K Delta Elektronika, Zierikzee, The Netherlands) with an upper voltage limit of 330 V.All functions (pumps, power supply, cleaning) of the pilot were controlled by a custom designed PLC (Pro-Control BV, De Rijp, the Netherlands), which also recorded operational data (volume, conductivity, pH, applied current and voltage).

Operating conditions
The pilot plant was operated either with intermittent current (Donnan mode) or constant current (continuous mode).Besides these two operational modes, we studied the performance of the system at two load ratios (L N ): 1.4 and 1.8; and three current densities (J, A m − 2 ) 50, 75 and 100 A m − 2 .The L N is defined as the ratio between the applied J and total ammonia nitrogen (TAN) feeding rate both expressed as current (Rodríguez Arredondo et al., 2017): where C TAN,Feed inflow is the molar concentration of TAN in the centrate (mol m − 3 ), Q Feed is the feed inflow rate (m 3 s − 1 ), F the Faraday constant (96,485 C mol − 1 ) and A m is the surface area of the cation exchange membrane (3.15m 2 ).L N equal to 1 is when the TAN loading and the applied current are equal ("sufficient").L N < 1 means that there is more TAN than the current can transport ("deficit"), whereas a L N > 1 means that there is more current than TAN ("excess") (Rodríguez Arredondo et al., 2017).Table 1 summarizes the operating conditions conducted at the NEWBIES pilot plant.
In the Donnan mode, current was applied intermittently; current switched on for 20 s and off for 60 s, defining one Donnan cycle.In this mode, the centrate was only supplied to the pilot during the 20 s in a cycle when current is supplied.Therefore, the flow rate of the feed pump was adjusted to achieve the L N as intended when calculated over a complete duration of one Donnan cycle.Two values of L N were applied, Fig. 1.Simplified scheme of the NEWBIES pilot plant with marked sampling points:1.feed (i.e., centrate after settling), 2. diluate (centrate from the reservoir of ED unit), 3. concentrate, 4. product (NH 4 ) 2 SO 4 , 5. anolyte, 6. catholyte.C + is used here to represent cation transported in the BP-ED system.The repeated cell pairs (63x) consist of a bipolar membrane (BPM) and a cation exchange membrane (CEM).C + represents cations including Na + , K + , NH 4 + , Ca 2+ , Mg 2+ .The BP-ED was operated either in continuous mode (constant current) or intermittent mode (Donnan mode).

Table 1
Summary of the operational conditions of the experiments conducted at the NEWBIES pilot plant.Whereas the letters D and C refer to either Donnan mode or continuous mode of operation, the number (50, 75 and 100) refers to the applied current and low or high refers to the load ratio of 1.4 (low) or 1.8 (high).1.4 (low) and 1.8 (high), by varying the applied J (50, 75, and 100 A m − 2 ) and the feed pump flow rate (100, 132, 150, and 200 L h − 1 ).These values were selected to be similar to and slightly higher than the L N of 1.3 that has been determined as theoretically ideal to achieve a high ammonia removal efficiency.(Kuntke et al., 2018;Rodríguez Arredondo et al., 2017) Experiments in the Donnan mode were operated for 24 h and in continuous mode for 6 h, to ensure equal amount of electric charge was applied during each experiment.Data from the runs conducted in Donnan mode are calculated as average per minute because of the large difference in the values in the ON and OFF time.The experiment "D75 low" was repeated to demonstrate the reproducibility of the results.Calculations of the key performance indicators (KPIs) of the pilot plant such as ammonia removal efficiency (RE,%), specific energy consumption (SE, kWh kg N -1 ), and ammonia transport over the LLMC modules are summarized in the supplementary material (Text S1).Fouling and scaling in the BP-ED stack were removed using a cleaning in place (CIP) strategy described in the supplementary material (Text S2).After completing the pilot experiment, the BP-ED stack was disassembled for further analysis of the used materials (electrodes, membranes, and spacers) as described in the supplementary material (Text S3).

NEWBIES pilot system performance
In order to evaluate the pilot BP-ED system performance, the system was operated in either continuous mode or Donnan mode and at two different load ratios (L N of 1.8 or 1.4).

TAN removal increases with increasing load ratio and decreases over the course of one experiment
Fig. 2 shows that the TAN removal in the pilot scale BP-ED for continuous (A) and Donnan mode (B).The TAN removal efficiency in continuous and Donnan mode depended on both the applied J and the L N which is in accordance with earlier results and the L N model; higher L N leads to higher TAN removal efficiencies (Desloover et al., 2012;Kuntke et al., 2018;Rodríguez Arredondo et al., 2017).A higher current density did not directly increase the TAN removal efficiency but increased the amount of treated centrate resulting in a higher treatment capacity.
For example, when the BP-ED system was operated in Donnan mode at 50 A m − 2 , runs "D50 low" and "D50 high" conducted with an L N of 1.4 and 1.8, resulted in 41.8% and 58.1% of TAN removal after 2 h of operation, respectively.At the same current density in continuous mode, a higher L N of 1.8 ("C50 high") yielded higher TAN removal (52.9-57.4%),whereas in the case of lower L N of 1.4 ("C50 low") it was 34.5-35.5% in the first 1 h of operation.
Fig. 2 also shows that the TAN removal decreased over the operational time in all runs, with the highest TAN removal achieved at the beginning of each run.The replicate experiments ("D75 low 1 " and "D75 low 2 ") show almost identical removal efficiencies (Figs. 2 and S2), conductivity and pH values in diluate and concentrate stream, respectively (Table S5).The TAN removal decrease was a consequence of membrane fouling and scaling, that gradually worsened the reactor performance and had a detrimental impact on the removal and recovery of ammonia.(Rodrigues et al., 2021).Nonetheless, the employed cleaning strategy of the diluate and concentrate compartment restored the functioning of the system at least to some extend after each run.

TAN removal rate flowed the expected pattern especially in Donnan mode: a higher current leads to a higher TAN removal rate
Table 2 shows the obtained TAN removal rates.In general, the TAN removal rate was higher in continuous mode than in Donnan mode.The difference in the operational mode leads to a difference in the membrane transport (i.e., ion migration and diffusion) processes.(Rodrigues et al., 2021(Rodrigues et al., , 2020b) ) In the continuous mode, at an applied current density of 50 A m − 2 and a L N of 1.8, the BP-ED system was able to remove up to Fig. 2. TAN removal efficiencies (%) during continuous (A) and Donnan mode (B).The removal decreased over the experimental time of each condition.
F. Ferrari et al. 562.4 g N d − 1 with a corresponding TAN transport rate of 178.8 g N m − 2 d − 1 .In the Donnan mode, at an applied current density of 50 A m − 2 and a L N of 1.8, the BP-ED system was able to remove up to 131.2 g N d − 1 with a corresponding TAN transport rate of 41.7 g N m − 2 d − 1 .Although these amounts and removal rates are slightly lower than the rates reported in literature at similar current densities, to the best of our knowledge this is the first time that such a large scale system was operated at realistic conditions (complex wastewater, onsite a WWTP).While Rodrigues et al., 2020  + m − 2 h − 1 ) in a similar sized ED system (~ 3.6 m 2 CEMs) operated in the laboratory using digestate after struvite precipitation at 20 A m − 2 (Ward et al., 2018).The observed TAN transport numbers range between 0.4 and 0.1, which is lower than the transport number reported for ED based systems (0.6 -0.4) (Rodrigues et al., 2020a;Ward et al., 2018).The TAN transport numbers decrease considerably during each experiment (Fig. S3).These results indicate that next to scaling of the IEMs, also NH 3 diffusion or ionic short circuits may have impacted the system performance (He and Cussler, 1992;Veerman et al., 2008;Vorobiev et al., 2002).
In general, the BP-ED Cell voltage (Fig. 3) and, therefore, the specific energy demand obtained during the intermittent (i.e., Donnan) mode of operation was found to be lower than in the continuous mode.The lowest energy consumption (6.3 and 6.5 kWh kg N − 1 ) were obtained in runs "D75 low 1 " and "D75 low 2 ", respectively (i.e., Donnan mode, L N =1.4,75 A m − 2 , 200 L h − 1 ) (Table 1).Although this run resulted in the somewhat lower TAN removal efficiency compared to the runs conducted at higher L N , it is likely that the application of higher feed flowrate was beneficial for the removal of scale from the system, thus leading to a lower total cell potential and power consumption.Previous study with pilot-scale ED treatment of centrate reported an even lower energy consumption, 4.9 kWh kg N − 1 .(Ward et al., 2018) This was likely due to less scaling of the membranes, and the lower applied current density (20 A m − 2 ).In order to prevent the scaling in the ED system, Ward et al. pretreated the centrate in a struvite crystallizer system, which reduced the amount of Mg 2+ and phosphate (Ward et al., 2018).Also, the BPMs used in the NEWBIES pilot have a higher ohmic resistance as they need an additional electric potential for the dissociation of water (Pärnamäe et al., 2021).

Water transport over the LLMC limited the obtainable ammonia product concentration
The obtained product concentrations of 19-33 g N L − 1 (~ 2-3 wt%, Table 2) were less than half the concentration reached using a higher concentrated H 2 SO 4 (96%), NaOH solution (50%) and a heat assisted (up to 50 • C) LLMC process (i.e.2.1 M (NH 4 ) 2 SO 4 ~ 56 g N L − 1 ) (Ulbricht et al., 2013.)Recently, ammonia recovery using membrane contactors focused specifically on treating concentrated highly alkaline streams originating from WWTP Vecino et al., 2019.Used a two-step HF-LLMC to recover ammonia from zeolite regeneration brine (NH 3 4.5 g L − 1 and NaOH 80 g L − 1 ), achieving high removals (94%) and high nitrogen concentration (7.8 wt%, ~ 80 g N L − 1 ) using phosphoric acid (Vecino et al., 2019).Using nitric acid, Vecino et al., 2020 reached up to 10.1 wt% nitrogen   (accounting for both NH 4 + -N and NO 3 -N) using LLMC and further increased the product concentration to 15.6 wt% nitrogen using a subsequent electrodialysis step (Vecino et al., 2020).The work of Vecino also showed the need for ammonia pre-concentration (ion exchange using zeolite) and pre-treatment (granular activated carbon) for organic matter removal (Vecino et al., 2020(Vecino et al., , 2019)).The BP-ED-LLMC process presented in this work only requires settling and a prefilter.Furthermore, nitric acid and phosphoric acid are expensive compared to sulfuric acid, due to energy intensive production process (HNO 3 ) and raw material scarcity (rock phosphate) (Rockström et al., 2009).
Water transport across the membrane contactor severely affects the obtainable nutrient concentration (Ulbricht et al., 2013).Therefore, ammonia recovery using LLMC can be optimized (i.e., number of units, alignment, configuration, flow conditions/direction, and acid choice) to maximize the nutrient content of the product stream (Reig et al., 2021).
Nonetheless, recent work showed the effectiveness of ammonium sulfate fertilizer (~ 21 g N L − 1 ) recovered with a BP-ED-LLMC system (Rodrigues et al., 2022).Rodrigues et al., demonstrated comparable performances of BP-ED-LLMC recovered fertilizers to the performance of commercial fertilizer in growth experiments with spinach and radish.

Operation mode (Donnan or continuous) affects the scaling and transport of multivalent cation ions in the pilot scale BP-ED
The initial concentrations of Ca 2+ (65.4 mg L − 1 ) and Mg 2+ (21.6 mg L − 1 ) in the centrate were significantly lower compared to the ammonia concentration (485 mg L − 1 ) (Table S1).However, the impact of Donnan mode on the removal of divalent cations (i.e., Ca 2+ , Mg 2+ ) was significant.For example, the removal of Ca 2+ and Mg 2+ at the end of the runs in the Donnan mode was ~ 76% and ~ 57% for the applied L N of 1.4 (D50 low), whereas in the continuous mode the values were ~ 37% and ~ 30% (C50 low), respectively (Fig. S2).Likewise, at the higher L N of 1.8, the removal efficiency of Ca 2+ and Mg 2+ at the end of the runs in the Donnan mode was 85% and 64%, and in the continuous mode it was 56% and 39%, respectively (Fig. S2).Donnan dialysis is particularly effective for the removal and recovery of multivalent ions, and cations of higher charge tend to concentrate preferentially over those of lower charge (Wallace, 1967).

Analysis of the reusability of the ion exchange membranes
After several months of operation, the ED stacks were disassembled.Scaling was detected in the concentrate flow compartments, fully covering the spacers separating the CEM and BPM and completely filling the flow compartments in cell pairs from the CEM side to the BPM side (Fig. S4).In the case of the IEMs, fouling is dependent on the charge of the membrane, with AEM being significantly more prone to fouling and scaling compared with CEMs due to their lower ion exchange capacity (Mondor et al., 2009).In the conventional ED stack treating swine manure, scaling of CEMs was negligible, which was interpreted by the low contribution of Ca 2+ to overall ion transport due to the higher mobility of NH 4 + and K + (Mondor et al., 2009(Mondor et al., , 2008)).In other studies, CaCO 3 was identified to be the dominant scalant for CEMs (Ayala-Bribiesca et al., 2006;Bazinet and Araya-Farias, 2005), similar to the NEWBIES pilot plant where scaling of CEMs by the formed CaCO 3 was significant.Moreover, the deposits in those studies were formed in the interior of the membrane and could only be removed in the laboratory cleaning procedure.
To test if an acid cleaning procedure is effective in removing this scaling and leaving the membranes intact for reuse, the membranes were removed from the stack and cleaned by soaking in 1 M HCl acid for three days.This cleaning with acid removed completely the scale from the membranes (Fig. S4c).After cleaning both CEMs and BPMs were subjected to selectivity and resistance tests in an external test cell to determine if their performance was affected by the cleaning procedure.For the CEM the voltage drop was 300 mV at an applied current of 110 mA (~ 225 A m − 2 ) for the pristine membrane and remained comparable at 310 mV for the used membrane after cleaning.For the BPM, the voltage drop at 110 mA (~ 225 A m − 2 ) was increased from 980 mV (pristine) to 1007 mV for the used membrane after cleaning.The water splitting efficiency determined as the pH difference between the anode and cathode compartment remained unaffected after cleaning.Overall, it can be concluded that the performance of the CEM and BPM can be almost restored to pristine conditions (~ 96% of the performance).

Presence and fate of PFASs during ammonia recovery by BP-ED from anaerobic digester centrate
The analysis of the target PFAS (Table S4) in the diluate and cation concentrate at the beginning and end of each run did not indicate a distinct decrease and increase, respectively, in their concentration in either of the current modes tested, thus the migration/diffusion of the PFAS through the ion exchange membranes could not be confirmed (Fig. S5).Nevertheless, the samples taken at t 1 and t 2 were grab samples and may not be representative of the entire system.Also, differences in the total volume of the cation concentrate (8 L) and the diluate (660 L), as well as slight changes in the volume during the operation of the ED system due to electro-osmosis, make it difficult to make an accurate mass balance of the PFAS.According to the design of the ED unit (Fig. 1), the negatively charged perfluorocarboxylic acids (PFCAs) would have to migrate across the BPMs to reach the cation concentrate stream.Although the configuration of a BPM minimizes the transport of the charged species (Sata, 2007), ions with a charge opposite of the fixed charge of the adjacent membrane layer (e.g., negatively charged PFAS facing the cation exchange layer of BPM) can enter the membrane through diffusion and/or migration, depending on the current density applied (Blommaert et al., 2020).The ion transport across the BPMs is expected to decrease with the increasing molecular weight (MW) of the ion (Blommaert et al., 2020).However, C4-C8 PFCAs and 6:2 FTS are linear chain molecules with very low steric hindrance (Table S5) and may be adsorbed inside the membrane and not just on its surface.Migration over the ion exchange membrane may be less challenging than expected based on their MW (Roman et al., 2019).The concentrations of the C4-C8 PFCAs in the cation concentrate were significant in both continuous current and Donnan mode, i.e., 10.8-69.1 ng L − 1 and 15.3-26.9ng L − 1 , respectively (Fig. S5b).The cation concentrate did not contain any perfluorosulfonic acids (PFSAs) in the continuous current mode, and very low amounts of PFBS (1.8±0.2 ng L − 1 ), PFHxS (1.6±0.6 ng L − 1 ) and PFOS (5.3±2.1 ng L − 1 ) in Donnan mode (Fig. S5d).Previously, adsorption of PFOS and other sulfonates onto the membrane and other parts of the filtration system (e.g., spacers) was observed in nanofiltration and reverse osmosis (Liu et al., 2021) and may be responsible for lower concentrations of PFSAs.Nevertheless, it is unclear whether the PFCAs and PFSAs are present in the cation concentrate due to their crossover from the diluate (Fig. 4) or may be released from the fluoropolymers used in the production of BPMs and CEMs.Thus, the fate and behavior of the PFAS within the ED unit requires further study under a more controlled conditions of a lab-scale set-up.
In continuous current mode, the product contained 7.4 ng L − 1 , 20.7 ng L − 1 and 55.5 ng L − 1 of PFOA, PFHxA, and PFBA, whereas in the Donnan mode their concentrations were similar, 11.0 ng L − 1 , 18.6 ng L − 1 and 68.8 ng L − 1 , respectively (Fig. 4).6:2 FTS was present in very low concentrations in the cation concentrate in both modes, i.e., 1.9 and 1.7 ng L − 1 in the continuous and Donnan mode, respectively.Nevertheless, the product contained 6:2 FTS in up to 253.5 ng L − 1 in continuous current mode, and 212.2 ng L − 1 in Donnan mode (Fig. 4).Given that the LLMC membrane (3 M Liqui-Cel™) is based on polypropylene fibers (3M, 2021), elevated concentrations of 6:2 FTS detected in the product are likely a consequence of its release from the Teflon-based components in the sulfuric acid dosage line (e.g., tubing, membrane-based acid dosing pump).For example, 6,2 FTS is often used as an alternative for PFOS or PFOA as a polymer processing aid in the synthesis of fluoropolymers (Buck et al., 2011).Also, low ng L − 1 concentrations of PFCAs were likely released in a similar manner, although due to their moderate volatility, their cross-over through the F. Ferrari et al. gas-permeable membrane cannot be excluded.The evidence presented in this study in terms of PFCAs and 6:2 FTS presence in the product obtained during the nutrient recovery from centrate indicates that the ED nutrient recovery requires a careful selection of the tubing and pump connecting to the LLMC modules.Due to the addition of PFOS in the Stockholm Convention and other regulations, 6:2 FTS has been adopted as an alternative product in the market.However, several studies reported biotransformation of 6:2 FTS to shorter-chain acids such as 5:3 fluorotelomer carboxylic acid (5:3 FTCA), perfluoropentanoic acid (PFPeA), PFHxA and PFBA (Zhang et al., 2016).In the restriction report of European Chemical Agency (ECHA) on PFHxS, its salts and PFHxS-related substances, 6:2 FTS was reported acutely toxic (ECHA, 2021).
The concentration of ammonia obtained in the final product of the ED stack was ranging from 19 to 33 g N L − 1 (Table 2).Thus, the obtained (NH 4 ) 2 SO 4 product would likely be diluted ~ 500 to 1000 times prior to its application is a fertilizer.(Mohammad et al., 1999;Yi et al., 2019) Although the encountered low ng L − 1 concentrations of PFASs may not pose a risk for such application (6:2 FTS would diluted to 0.25 -5 ng L − 1 ), their presence in the final product, likely due to the leaching of the Teflon-based components in the system, still merits attention due to their bioaccumulation in agricultural products (Bao et al., 2020).

Conclusions
The study demonstrated for the first time the feasibility of ammonia recovery from real wastewater using a pilot-plant BP-ED-LLMC system treating 150 L of anaerobic digester centrate per hour.The operational stability of the pilot plant system during multiple CIP cycles was successfully demonstrated, showing that scaling of the ion exchange membranes may be resolved by using automated cleaning strategies.BP-ED coupled to LLMC was capable of selective and efficient recovery of ammonia from anaerobic digester centrate in on-site conditions.The optimum operation of the pilot-plant unit in terms of ammonia recovery and energy consumption was achieved in the intermittent current mode that takes advantage of the Donnan dialysis and favors the exchange of ammonia over cations.The NEWBIES pilot plant could recover 235.7 g N d − 1 consuming 6.3 kWh kg N − 1 .Nevertheless, given that there was no centrate pretreatment other than gravitational settling, high concentrations of Ca 2+ led to intense scaling of the CEMs in both continuous current and Donnan mode.Thus, successful application of this technology in full-scale facilities may be hampered by the requirement for chemical additives for the regeneration of the membranes, and difficulties with the continuous operation of the reactor due to the necessity to implement cleaning procedures.Besides the conducted acid rinse, complementary strategies for the on-site control of CEMs fouling and scaling may include pre-treatment to remove Ca 2+ and other ions that may precipitate (e.g., Mg 2+ ) using struvite crystallization.
The presence of 212-253 ng L − 1 of 6:2 FTS in the obtained ammonium sulfate product suggested its release from the Teflon-based components in the sulfuric acid dosage line, which was an unexpected result and difficult to be foreseen in more fundamental studies conducted at laboratory scale.Thus, careful selection of the pilot plant tubing, pumps and other components is required to avoid any risks associated with the PFAS presence and ensure safe use of the final product as fertilizer.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 3 .
Fig. 3. BP-ED Cell voltage obtained at the different applied current densities.

F.
Ferrari et al.
reported a removal rate of 363 g N m − 2 d − 1 using synthetic wastewater and a laboratory scale version of this technology at 50 A m − 2 (Rodrigues et al., 2020a), Ward et al., 2018 reported 100 g N m − 2 d − 1 (0.3 mol NH 4

Table 2
BP-ED performance during Continuous and Donnan mode in terms of specific energy (SE) demand (SE kWh kg N − 1 ), transport (g N d − 1 ) and transport rate (g N m − 2 d − 1 ) of TAN, TAN removed, ammonia recovered (g N ) and product concentration (g N L − 1 ).