Introduction

Constructed wetlands (CWs), as an ecological treatment system that simulates the natural processes including plants, substrates, and the associated microorganisms, have been successfully applied to treat various types of wastewaters due to the advantages of low cost, excellent removal performance, and easy management (Almeida et al. 2017; Masi et al. 2018). However, there is shortcoming that N removal efficiency was unsatisfactory due to the insufficient carbon source on treating the secondary effluent from wastewater treatment plants (WWTPs) by CW (Lai et al. 2020). P removal pathways in CWs mainly include biological P removal, plant uptake, and matrix adsorption, among which matrix adsorption plays a preponderant role, accounting for 36–88% (Gao et al. 2017). The P removal efficiency can be sufficient at the beginning of the operation, but it will inevitably reach a saturated state after a period of operation in the CWs (Lan et al. 2018; Tan et al. 2019). At the same time, the desorption of P also exists in CWs (Liu et al. 2010). Thus, maintaining a high stable removal of P for a long term is still a challenge in CWs (Yu et al. 2015).

Considering the poor performance of CWs in the treatment of the secondary effluent from WWTPs, there has been an increase in researches focusing on the new enhanced CWs based on simultaneous efficient removal of N and P (Hang et al. 2016; Song et al. 2016; Xu et al. 2016). Among these researches, the biofilm electrode coupled with constructed wetland (BECW) system, which combines the biofilm method and the electrochemical method (Tang et al. 2020), has been regarded as an efficient way to enhance N and P removal in CWs. Coupled with the existence of current, BECWs enable the pollutant degradation and removal by the combination of electrochemical and microbial metabolic activities (He et al. 2016). The nonmetallic cathode has been proven to be a relatively efficient promoter for NO3-N electroreduction (Liu et al. 2022), which can utilize hydrogen as electron donors for autotrophic denitrification in the electrochemical process (Wang et al. 2022a). Meanwhile, the electrocoagulation process has been successfully used for P removal where coagulation is formed in situ by the electrodissolution of sacrificed anodes, such as Fe or Al (Liu et al. 2021). Besides, the biological metabolic activities, especially the autotrophic denitrification with a higher relative abundance of autotrophic denitrifiers, are greatly promoted by electrocatalysis (He et al. 2021; Wang et al. 2019b). Due to the highly successful N treatment efficiency, sustainable P removal, small area occupied by the installation, and relatively low processing cost, BECWs have been proven to be a promising and effective method to enhance the simultaneous N and P removal (İrdemez et al. 2006) and received more and more attention (Gao et al. 2018; Ju et al. 2014; Xu et al. 2017b).

It is well known that HRT, as the contact time between the adsorbent and the adsorbate, not only affects the adsorption capacity of P, but also is a crucial role influencing N removal for conventional CWs (Kataki et al. 2021). So it is reasonable to believe that HRT also plays an important impact on the performance of BECWs (Wu et al. 2019). Besides, electrified time (ET) and current density (CD), as the key influencing factors of electrochemical reaction, also control most of the removal process of N and P in BECWs (Gao et al. 2017; Li et al. 2018). Appropriate ET and CD can significantly improve microbial metabolic activities to produce sufficient electrons and hydrogen to achieve efficient N and P removal performance (Kondaveeti et al. 2014; Liu et al. 2020b). In addition, the selection of electrode materials, especially for the anode, also has a significant influence on the pollutant removal performance, since the operation cost, treatment efficiency, and inner resistance vary among different materials (Liu et al. 2022).

The above studies indicate that autotrophic denitrification and efficient P removal of the secondary effluent from WWTPs can be ameliorated by BECWs. However, existing researches concentrate mainly on one type of anode material, and rare discussion has been reported on the systematic investigation of the influence factors on different types of electrodes. Hence, the major purposes of this study are as follows: (1) BECW system with different anode materials (graphite, aluminum, and iron, respectively) were constructed to comparatively analyze N and P removal performance and microbial community; (2) the effect mechanisms of the HRT, ET, and CD were investigated to improve the synchronous removal rates of the pollutants; and (3) the microbial community structures, different P speciation, and spatial distribution were determined to reveal the potential removal pathways and mechanism of N and P based on the sacrificed anode, especially for E-Fe system with excellent N and P removal effect.

Materials and methods

Experimental apparatus

Four lab-scale CWs were set up, including 3 biofilm electrode coupled systems (with graphite, aluminum, and iron serve as anodes) and a control system, namely E-C, E-Al, E-Fe, and CK (Fig. 1). Each system (144-mm diameter × 480-mm height, 3.5 L of an effective working volume) was made by cylindrical polyethylene (3 mm in thickness) and planted with Calamus (with uniform size and good growth). The bottom 100 mm was supporting layer and filled with gravel (φ 15–30 mm), and the upper 330 mm was substrate layer and filled with zeolite (φ 5–8 mm).

Fig. 1
figure 1

Schematic diagram of the biofilm electrode coupled with constructed wetlands (a CK, b E-C, c E-Al, d E-Fe, e three electrodes, and f the picture of the experimental devices)

The cathode materials were all graphite, while the anodes were graphite, aluminum, and iron, respectively. Each electrode (Shanghai Qichen Industrial Co., Ltd., China) was plated with a diameter of 100 mm and a thickness of 3 mm, and contained many pores for the water to get through. The pores were 5 mm in diameter, and the distance of 2 adjacent pores was 10 mm (center to center). The cathode was set 200 mm away from the bottom of the device, and the anode was placed parallel to the top of the cathode at a distance of 100 mm. The electrodes were connected to a DC power supply (LongWei PS-305DF, Shenzhen, China) using copper wires (a diameter of 1 mm) treated by wrapping insulation tapes. The CD could be controlled by adjusting the voltage.

The water inlet was located in the bottom center of the device, and the water outlet was 50 mm away from the top of the device. The simulated wastewater was continuously pumped into the CWs through the peristaltic pump (LeiFu YT 25, Baoding, China). The ET was directly controlled by a timer (Toone ZYT01X, Shanghai, China). The devices were carried out in a laboratory environment of 25–30 °C.

Experimental conditions

The synthetic wastewater was prepared by dissolving glucose, ammonium chloride, potassium nitrate, and potassium dihydrogen-phosphate (all reagents were analytically pure) in tap water to maintain concentrations of about 50 mg/L chemical oxygen demand (COD), 5 mg/L NH4+-N, 10 mg/L NO3-N, 0.5 mg/L TP, and 7.5 pH throughout the entire experiment. There were also some microelements added into the synthetic wastewater, and the element’s content of simulated water is shown in Table S1.

The entire experiment operation was divided into three stages, and each stage lasted in stable operation for at least 7 days: the first stage was to reveal the influence of HRT on the removal performance of pollutants, the second stage was ET, and the last stage was CD. The specific operating factors of the three stages are shown in Table 1.

Table 1 Operation conditions during experimental phases

The sludge was obtained from the sedimentation tank of a municipal sewage plant in Zhengzhou (China). After 24 h of static settling, large debris were removed, and then, 1 L of the concentrated sludge (MLSS concentration of 12.5 g/L) was inoculated into the reactors. The systems were continuously fed with synthetic wastewater for more than 20 days to initiate the development of plants and biofilm in the four CWs.

Sampling and analytical methods

Water quality and microbial community analysis

Water from the feed tank and outlet of each system were sampled every 2 days. COD, NH4+-N, NO3-N, TN, and TP were measured using the Standard Methods(S.M., 2002). Besides, the dissolved oxygen (DO) and pH of the influent and effluent water samples were determined using DO meter (HQ40d, Hach, USA) and desktop pH meter (PHS-3C, Leici, China), respectively. Each chemical indicator was measured in triplicate.

Substrates of the four CWs for microbial analysis were collected on the end of the experiments. To guarantee the representation of sampling in each system, 50 g samples were collected from anode and cathode zone and then fully mixed. The analysis of DNA extraction, PCR amplification, and high-throughput sequencing were conducted by Shanghai Ling En Biological Company, China. Microbial DNA was extracted using the E.Z.N.A.® Soil DNA Kit (Omega Bio-tek, Norcross, GA, USA) according to the manufacturer’s protocols. For V3–V4 region of 16S rRNA gene, the bacterial primers 341F (5′-CCTAYGGGRBGCASCAG-3′) and 806R (5′-GGACTACNNGGGTATCTAAT-3′) were used for PCR amplification by TransGen AP221-02: TransStart Fastpfu DNA Polymerase. The high-throughput sequencing was performed on Illumina platform PE250 model in UPARSE software (version 7.1 http://drive5.com/uparse/).

N mass balance calculation

Plant uptake, substrate adsorption, and microbial removal were identified as the main pathways for N removal in conventional CWs. Assuming that the TN input was equal to the TN output during the experiment. Therefore, the TN proportion of microbial removal was calculated by Eq. (1):

$${\mathrm{TN}}_{\mathrm{microbial removal}}={\mathrm{TN}}_{\mathrm{influent}}-{\mathrm{TN}}_{\mathrm{substrate adsorption}}-{\mathrm{TN}}_{\mathrm{plant uptake}}-{\mathrm{TN}}_{\mathrm{effluent}}$$
(1)

where TN plant uptake (mg/L) was the TN content in stems, leaves, and roots of the vegetation, and was determined by H2SO4-H2O2 solution digestion method (Mueller-Dombois and Ellenberg 1974; Yousaf et al. 2017); TNsubstrate adsorption (mg/L) was the TN content in the substrate of CWs and was determined with the same as TNplant uptake.

Analysis methods of P removal mechanism

To examine P removal mechanism in E-Fe, analysis of kinetic study of the phosphorus adsorption, the different P speciation in the substrates, and the effect of Fe in the matrix on P adsorption was performed.

The pseudo-first-order kinetic model (Eq. (2)) and pseudo-second-order kinetic model (Eq. (3)) were used to analyze the kinetics of P adsorption in this study at the optimal operating conditions preferred above. The initial concentration of P was 0.5 mg/L, and samples after filtration with 0.45-μm microporous membrane were taken for determination of P at different time.

$$\mathrm{ln}({q}_{e}-{q}_{t})=\mathrm{ln}({q}_{1cal}) -{k}_{1}t$$
(2)
$$\frac{t}{{q}_{t}}=\frac{1}{{k}_{2}{({q}_{2cal})}^{2}}+\frac{t}{{q}_{2cal}}$$
(3)

where qe (mg/g) and qt (mg/g) represented the equilibrium adsorption capacity and the adsorption capacity at a certain time t (min), respectively; q1cal (mg/g) and k1 (min−1) were the adsorption capacity calculated according to the pseudo-first-order kinetic equation and the rate constant, respectively; q2cal (mg/g) and k2 (g/(mg·min)) represented the adsorption capacity calculated according to the pseudo-second-order kinetic equation and the rate constant, respectively.

To examine P forms in substrates, approximately 2.00 g of substrates was taken from CK and E-Fe at 3 depths: 30 mm, 130 mm, and 230 mm at the end of the experiment. Samples were sequentially extracted and filtered, and then, the labile phosphorus (Labile-P), iron-aluminum bound phosphorus (Fe/Al-P), calcium-magnesium bound phosphorus (Ca/Mg-P), and humic phosphorus (Humic-P) were measured (Hedley et al. 1982; Kim et al. 2015). Supporting Information (Content S1) showed the methods and procedures for the different P speciation of extraction analysis.

To assess the effect of Fe in the matrix on P adsorption, the iron content of substrate in CK and E-Fe was measured using ICP-OES (Avio 500(ICP03), Perkin Elmer, USA) at the end of the experiment. Sample preparation was showed in Content S2.

FT-IR (Spectrum One B, PerkinElmer, USA) was used to characterize the anode shedding material in E-Fe system at the end of the experiment. Briefly, 100 g samples from the anode layer matrix were dried in an oven at 105 °C, shaken, and sieved to collect the shedding materials. The wave peak range was set at 400–4000 cm−1, the resolution was 0.09 cm−1, and the accuracy was 0.01 cm−1.

Energy consumption calculation

Energy consumption (EC) dominated the operation cost, consequently determining the feasibility of expanding applications in the future. EC of per gram pollutant removal (kW·h/g pollutants) was calculated by Eq. (4):

$$\mathrm{EC}=\mathrm{UIT}\times {10}^{-3}/\Delta m$$
(4)

where U was the average applied voltage (V), I was the average current (A), T was the ET (h) in a complete HRT cycle, and △m was the mass of the removed pollutants (mg).

Statistical analysis

Statistical procedures and data analyses were evaluated statistically using built-in statistical functions of Origin 2021 graphics and analysis software (Origin, MA, USA). All tests were performed using SPSS 22.0 (SPSS Inc., Chicago, USA), and the significance level was set to p < 0.05.

Results and discussion

Intensified performance of BECWs at different HRT

COD and P removal

Figure S1(a, b) reflects the impact of HRT on the COD removal of the four CWs. Previous researches have indicated that prolonged HRT can significantly improve the COD removal performance if sufficient contact time is provided (Ge et al. 2020). For traditional CWs, COD can be well degraded by anaerobic and aerobic microorganisms (Huang et al. 2019). As depicted in Fig. S1(a, b), the COD removal rates in CK, E-C, E-Al, and E-Fe increased significantly when the HRT increased from 6 to 10 h, and the corresponding average removal rates increased from 60.50%, 66.06%, 68.36%, and 70.59% to 82.40%, 83.99%, 85.46%, and 86.26%, respectively. Moreover, the average COD removal rates of the four CWs maintained a relatively stable level when HRT continued to 24 h. The average effluent concentrations in the four CWs were less than 9 mg/L at HRT = 10 h, so the HRT of 10 h was sufficient for COD removal in this study. Besides, in terms of the three BECWs, a slightly higher COD removal rate of the E-Fe might be related to the porous and loose structure on the surface of the different electrode materials (Fig. S2), and the iron element corroded by the electrode had a certain promotion effect on the uptake of organic matter (OM) by plants.

Figure 2a and b exhibit the influent and effluent TP concentrations and TP removal efficiencies of the four CWs under different HRT. Most researchers have found that the adsorption by substrates is the dominant route of P removal in CWs (Parde et al. 2021). Therefore, HRT used as the contact time between adsorbent zeolite and adsorbate phosphate had a very important impact on TP removal. As shown in Fig. 2a, b, the TP removal rates of the four CWs increased continuously with the increase of HRT, which was consistent with most researchers finding that prolonging the HRT of the adsorption process increased the removal or adsorption capacity (Verma et al. 2022). However, there was no significant influence on the effluent TP and remained relatively stable after increasing HRT to 10 h (p < 0.05), and the average TP removal rates of CK, E-C, E-Al, and E-Fe reached 75.71%, 79.51%, 86.12%, and 89.33%, respectively. From aforementioned results, we could infer that the HRT might not necessarily be an important determining factor alone affecting the PO43−-P removal. In terms of the three BECWs, the slightly higher TP removal rates of the E-Fe and E-Al might be related to the use of metal electrodes as sacrificial anodes to form iron salt and aluminum salt coagulants. Specially, Fe2+ produced from the iron anode and Fe3+ oxidized by O2 generated by plant roots had a better removal efficacy for PO43−-P. Similarly, Al3+ generated by aluminum anodic corrosion could form a complex with PO43−-P to remove TP.

Fig. 2
figure 2

Treatment performance of the four CWs under different HRT (unit: h) for TP (a, b), TN (c, d), NO3-N (e, f), and NH4.+-N (h, i)

N removal

As shown in Fig. 2c, d, the TN removal efficiencies of the four CWs showed an increasing trend with the prolongation of HRT, among which the highest TN removal efficiencies of 52.01%, 73.78%, 71.22%, and 79.04% were obtained at HRT for 10 h in CK, E-C, E-Al, and E-Fe, respectively, and the corresponding effluent concentrations were 7.39, 4.04, 4.43, and 3.23 mg/L, respectively. However, TN removal efficiencies were maintained at a relatively stable level when HRT continued to increase to 24 h, especially for the three BECWs, which showed no significant changes (p < 0.05). Figure 3d also clearly indicates that TN removal efficiencies of the BECWs were higher than that of CK, which implied that electrochemistry represented a positive role in TN removal.

Fig. 3
figure 3

Treatment performance of the four CWs under different ET (unit: h) for TP (a, b), TN (c, d), NO3-N (e, f), and NH4.+-N (h, i)

Figure 2e and f illustrate that the removal rates of NO3-N were similar to that of TN. When HRT increased from 6 to 24 h, the average removal rates of NO3-N in CK, E-C, E-Al, and E-Fe increased from 42.37, 64.32, 61.50, and 66.19 to 72.66%, 98.45%, 94.93%, and 99.18%, respectively. However, the NO3-N removal rates increased slightly during HRT increased from 10 to 24 h. Compared with CK, NO3-N removal rates of the three BECWs were higher, which was because NO3-N could be reduced to N2, NO2-N, or NH4+-N at the cathode in the electrochemical reaction. Among them, the highest NO3-N removal rate was obtained in E-Fe, indicating that the iron plate as an anode played a positive role in the removal of nitrate through electrochemical reduction (Shen et al. 2013).

Unlike the variation of TN and NO3-N, NH4+-N removal rates of the three BECWs gradually decreased with the prolongation of HRT. As shown in Fig. 2h, i, the average removal rate and concentration of NH4+-N in CK were maintained at 75% and 1.22 mg/L, respectively, during the HRT experimental stage. However, HRT increasing from 6 to 24 h led to the deteriorated NH4+-N removal efficiencies from 71.71, 69.61, and 74.42 to 46.79%, 41.61%, and 48.42%, respectively, in E-C, E-Al, and E-Fe. It was based on the fact that the electrolysis improved the removal efficiencies of TN and NO3-N, but it led to the increase of by-product NH4+-N, in which hydrogen electron donors produced by electrolysis promoted the reduction of NO3-N to NH4+-N and N2 (Xu et al. 2017a).

Intensified performance of BECWs at different ET

COD and P removal

As shown in Fig. S1c, d, the average COD removal rates of the four CWs were the same, exceeding 80%. Two main contributors to the reduction of OM were substrate adsorption and microorganism assimilation. Specifically, on the one hand, according to the above conclusion in “COD and P removal” section, the HRT of 10 h provided a sufficient microenvironment for the degradation of microorganisms (Zhang et al. 2022). On the other hand, the researches have shown that zeolite, as the main substrate in the four CW configuration in this study, belongs to a hydrated alkali aluminosilicate with a highly regular microporous structure and has a 3D structure with tremendous surface area compared with ceramsite and quartz (Cao et al. 2022), which was one of the reasons for the excellent removal rate of COD in the four CWs. Additionally, a slight increase of the COD removal rates was found in E-C, E-Al, and E-Fe with the increase of the ET, which increased by 4%, 5%, and 6%, respectively, during the ET of 10 h. It was because the facilitation of the microbial electron transfer from the anode cell to the cathode cell might improve the utilization of bioavailable OM. As a result, the energized CWs strengthened the removal ability to OM under suitable conditions (Wang et al. 2021).

The average influent PO43−-P concentration was maintained at around 0.53 mg/L throughout the experiment. As shown in Fig. 3a, b, the average effluent PO43−-P concentrations gradually reduced to 0.125, 0.105, 0.070, and 0.056 mg/L in CK, E-C, E-Al, and E-Fe, respectively, and the corresponding TP removal rates increased to 75.72%, 79.70%, 86.50%, and 89.13%, respectively, when the ET increased to 4 h. Since the content of PO43−-P in the effluent was already low, further prolonging the ET had little contribution to the removal of PO43−-P. Among them, the excellent P removal performance exhibited by E-Al and E-Fe was attributed not only to substrate adsorption but also to the influence of aluminum ions and iron ions generated by electrolysis. More specially, Al3+ generated by electrolysis could precipitate with PO43−-P to form AlPO4, which reduced the content of PO43−-P in the wastewater to a certain extent. Similarly, the in situ formation of iron ions by anodic oxidation of sacrificial anode was likely to cause chemical precipitation, physical adsorption, and flocculation of phosphorus (Ikematsu et al. 2006). From the aforementioned results, we concluded that aluminum ions and iron ions generated by electrolysis had a positive effect on P removal.

N removal

As shown in Fig. 3c, d, the TN removal rates of the BECWs illustrated a trend of gradual increase with the extension of the ET, and the E-Fe system was higher than E-C and E-Al. Specifically, the TN removal rates increased from 54.41, 55.00, and 68.75 to 77.73%, 74.42%, and 79.77%, respectively, when the ET increased from 2 to 10 h. However, the TN removal rate in CK always stayed around 51% during the entire experiment. As we can also see in Fig. S3, the positive correlation between TN removal rate, EC, and ET was observed in E-C, E-Al, and E-Fe; however, there were some differences in the increase rate. In terms of E-Fe, the nearly 10% removal efficiency of TN was increased with the increase of ET from 2 to 4 h, but only 2.6% from 4 to 10 h, the corresponding EC increased from 0.0176 to 0.0578 kW h/g TN. The increase rate of TN removal rate showed a downward trend while EC demonstrated an upward trend along with the prolonged ET.

Based on the above phenomenon, the reason possibly was that the number and rates of electrons and hydrogen released from the cathode region would inevitably increase along with the prolonging of ET, which could enhance the efficiency of autotrophic denitrification to remove TN by denitrifying bacteria, such as Hydrogenophaga, Dechloromonas, and Pseudomonas. When the ET was excessively prolonged, firstly, a great quantity of by-products, such as NO2-N, NO4+-N, and N2O, would be generated in the denitrification process to lead to deterioration of the TN removal rate (Zhong et al. 2021). Secondly, too long ET released continuous current and could cause negative stress on the metabolism of the microorganism, which mainly reflected in the cell membrane permeability (Ding et al. 2016). So, a large amount of energy would be consumed in microorganisms to resist electrical stress, and the gap between TN removal rate and EC curve under different ET might be the energy consumed by microorganisms (Gao et al. 2017; Liu et al. 2020b). Therefore, 4 h was selected as the optimal ET.

From Fig. 3e, f, the positive correlation between ET and the removal rates of NO3-N in the BECWs was observed. With the increase of ET, the NO3-N removal rates increased from 49.94, 53.95, and 69.67 to 97.59%, 97.59%, and 98.72%, respectively. While the NO3-N removal rate in CK remained at a relatively stable level (45.38%). In terms of E-Fe, the removal rate of NO3-N was faster in the early stage of the electrolysis reaction, but a certain number of by-products were formed with the extension of ET, which not only reduced the removal efficiency but also increased the EC. Therefore, the ET of 4 h with a higher NO3-N removal rate and lower by-products should be selected. The main reasons for electrochemical enhancement of E-Fe to improve the removal efficiency of NO3-N were as follows: (1) electrochemistry reduced the oxidation–reduction potential and improved the reduction performance of CWs, which was conducive to the reduction of NO3-N (Srivastava et al. 2018); (2) H2 produced in the electrochemical cathode region could be used as an electron donor to improve NO3-N removal (Huang et al. 2020); and (3) Fe2+ produced in the electrochemical anode region could also be used as an electron donor and relevant studies have proved that nitrate reduction based on Fe2+ is also an important way of NO3-N removal (Kiskira et al. 2017).

When the ET increased from 2 to 10 h, the effluent concentrations of NH4+-N in E-C, E-Al, and E-Fe increased from 1.64, 1.89, and 1.56 to 2.34, 2.57, and 2.35 mg/L, respectively, and the corresponding removal rates decreased from 66.45, 61.22, and 68.10 to 52.44%, 47.87%, and 52.34%, respectively (Fig. 3h, i), which was the opposite trend of the TN and NO3-N removal rates. The effluent NH4+-N concentrations in the BECWs were higher than those of CK (average 1.43 mg/L). The accumulation of NH4+-N in the integrated systems may result from two factors: (1) the NO3-N electrochemical reduction in the cathode region and (2) the occurrence of dissimilatory nitrate reduction to ammonium (DNRA) (Wang et al. 2022b). However, the NH4+-N removal rate in CK kept at about 70%, which was since substrate adsorption and microbial transformation were the main ways of NH4+-N removal in the CWs.

Intensified performance of BECWs at different CD

COD and P removal

A relative stable performance on COD removal for CK (81.99%), E-C (84.57%), E-Al (85.49%), and E-Fe (86.61%) is observed in Fig. S1(e, f). The slight increase in COD removal rate with the increase of CD indicated that the CD was not the limiting factor in terms of COD removal. Therefore, only a weak current was needed to stimulate the removal of COD when the reaction time was sufficient. However, the overall significance of the COD removal rates of the BECWs was higher than that of CK (p < 0.05), which proved that the introduction of current enhanced the removal capacity of CWs for OM. The average COD removal rates of the BECWs were greater than 84% at CD = 0.13 mA/cm2. It was because an optimal CD could avoid the phenomenon that “hydrogen inhibition” reduced the activity of microorganisms that were conducive to the degradation of COD(Li et al. 2009).

While TP removal rates under different CD are also monitored and displayed in Fig. 4a, b. The TP removal rate of CK was maintained at about 60% at CD = 0.13 mA/cm2, which was obviously lower than the removal rate of 75% obtained under the optimal HRT and ET. It was mainly because the TP removal of CK mainly depended on physical adsorption such as substrate interception and precipitation, which made it easy for the adsorption capacity of the substrate to reach a certain saturation along with the operation, resulting in a decline in removal performance. However, the performance was greatly improved when the current was applied to the BECWs. As displayed in Fig. 4a, b, when the CD increased from 0.02 to 0.13 mA/cm2, the average TP removal rates of E-C, E-Al, and E-Fe increased from 54.17, 62.92, and 67.83 to 71.33%, 84.93%, and 91.22%, respectively. However, when the CD continued to increase to 0.16 mA/cm2, the TP removal rate did not increase significantly. Among the three BECWs, both E-Al and E-Fe showed higher growth rates than E-C. The reason for the faster growth rate of TP removal in E-Al was that when the CD was high, the Al3+ generated by the anode not only form AlPO4 with PO43−-P but also some Al3+ hydrolyzed to form monomers and polyhydroxy compounds, which showed relatively strong adsorption effect, improving the P removal effect. Similarly, the reason for the faster growth rates in F-Fe was that Fe2+ from sacrificial iron anode provided sufficient chemical precipitation, flocculation, and physical adsorption sites for P (Kobya et al. 2021), which was conducive to the advanced P removal, especially for the wastewater with low P content.

Fig. 4
figure 4

Treatment performance of the four CWs under different CD (unit: mA/cm2) for TP (a, b), TN (c, d), NO3-N (e, f), and NH4.+-N (h, i)

N removal

As shown in Fig. 4c, d, the effluent TN concentrations of the BECWs gradually decreased and then tended to be stable with the increase of CD. Specifically, the TN removal rates of E-C, E-Al, and E-Fe increased from 54.86, 51.92, and 59.78 to 66.77%, 63.46%, and 74.93%, respectively, when the CD increased from 0.02 to 0.13 mA/cm2. However, with the further increase of CD, the TN removal rate decreased slightly. The main reasons were, on the one hand, that microbial activity could be improved under appropriate CD stimulation, but too high CD had some side effects on TN removal due to the damage to microorganisms. On the other hand, the lack of the external carbon source and insufficient H2 production from water electrolysis led to inadequate electron donors, resulting in poor removal of NO3-N when the CD was less than 0.13 mA/cm2. Furthermore, when the CD was higher than 0.13 mA/cm2, the higher stimulation weakened the removal effect of NH4+-N and inhibited the activity of nitrite-reducing bacteria, so finally TN removal rate decreased (Guo et al. 2021).

Results in Fig. 4e, f illustrated that the variation trend of NO3-N removal efficiencies with the increase of CD was the same as that of TN. The removal rates of E-C, E-Al, and E-Fe increased from 52.04, 49.11, and 57.86 to 85.30%, 82.06%, and 94.16%, respectively, when the CD increased from 0.02 to 0.13 mA/cm2. It was due to the fact that the greater the CD, the more H2 was produced at the cathode of the BECWs, leading to the greater ability to reduce NO3-N. However, microorganisms were inhibited or even killed by excessive current stimulation when the CD exceeded 0.13 mA/cm2 (Li et al. 2009). Moreover, excessive H2 production caused part of the biofilm to fall off, and the easy movement of NO3-N to the anode would affect the removal effect of NO3-N when the CD was too high.

According to “N removal” and “N removal” sections, it was found that NH4+-N was the unfavorable reduction product of the electrochemical process for denitrification. As shown in Fig. 4h, i, the concentrations of NH4+-N in the effluent of the BECWs increased sharply with the increase of CD. The results showed that the lower CD significantly reduced the generation of intermediate by-products NH4+-N during the electrolysis process.

In brief, the TN removal and negative effects of the minimum by-products produced by electrolysis should be considered for the regulation of electrolysis CD. Thus, the electrolysis CD of 0.13 mA/cm2 should be selected for our study.

Microbial community analysis

Species richness was calculated using alpha diversity (Chao1 and Shannon index). As shown in Table S2, the OTU counts (CK-1059, E-C-1414, E-Fe-1706, E-Al-1638) and the Chao1 (CK-1246; E-C-2015; E-Fe-2188; E-Al-1793) and Shannon index values (CK-5.204; E-C-5.964; E-Fe-5.972; E-Al-5.614) showed that the E-Fe of species diversity and richness was largest.

Venn plots could be used to count the numbers of shared and unique OTUs among the four CW samples. Figure S4 shows higher genetic relationship among the three BECWs.

Microbial community structure of the four CWs at the phylum level is displayed in Figs. 5a and S5 Proteobacteria, which was considered as the common electrochemically active bacteria (EAB) that played a crucial role in biological N and P removal and other pollutants (Song et al. 2019), was the predominant phylum in CK, E-C, E-Al, and E-Fe, accounting for 27%, 37%, 33%, and 36%, respectively. Chloroflexi, Acidobacteriota, Actinobacteriota, Cyanobacteria, and Bacteroidota were detected as the subdominant phylum, but their relative abundances in the four CWs were different. Chloroflexi, which can not only utilize OM for photosynthesis but also grow using NH4+-N and organic N as nitrogen sources (Zhang et al. 2018), was 3.2, 7.9, and 12.2 times higher than CK (2.05%), for E-C, E-Al, and E-Fe, respectively, indicating that the application of current promoted the relative abundance of Chloroflexi. Bacteroidota as denitrifying bacteria did not differ significantly in the four CWs. It was worth mentioning that Firmicutes which possessed the ability of denitrification under anaerobic conditions (Gao et al. 2019) accounted for 0.21%, 0.29%, 1.64%, and 1.48%, respectively, in CK, E-C, E-Al, and E-Fe. Seen from the phylum level, the biofilm formed on the electrode of the three BECWs was highly related to the nitrification and denitrification process.

Fig. 5
figure 5

a Relative abundance of dominant microorganisms at the phylum. b The heatmap of microbial communities at the genus level. c Microbial genera involved in Fe redox cycling at the genera level

To gain deeper insight into the similarities and differences among the four CWs, a heat map of hierarchical clustering for the top 50 abundant genera is shown in Fig. 5b. The main nitrifying microorganisms were Nitrospira (0.10–1.39%) and Chloroplast_norank (1.01–1.51%), among which Nitrospira as ammonia-oxidizing bacteria (AOB) is nitrocellubria (Wang et al. 2019a) and possesses the nitrification function (Peng et al. 2018). The denitrifying microbial genus mainly included Comamonadaceae_unculture (0.72–2.59%), Rhodobacter (0.85–6.86%), Rhodocyclaceae_Unclassified (0.37–1.52%), Blastocatellaceae_uncultured (0.17–4.91%), Dechloromonas (0.12–1.57%), Hydrogenophaga (0.52–1.30%), Pseudomonas (0.10–3.65%), and Sulfuritalea (0.44–0.98%) (Pan et al. 2017). Specifically, the proportion of all the nitrifiers and denitrifiers in the three BECWs was higher than that of CK; furthermore, the proportion in E-Fe was the highest in the three BECWs, which indicated that electrolysis could greatly affect the composition and diversity of bacterial communities, and the electrode pair of graphite and iron was conducive to the enrichment of nitrifiers and denitrifiers.

Among them, Hydrogenophaga, belonging to the hydrogen autotrophic denitrification that mainly used hydrogen for growth and denitrification (Chen et al. 2015), accounts for 0.52%, 0.68%, 0.80%, and 1.30%, respectively, in CK, E-C, E-Al, and E-Fe due to the application of electrolysis. Hydrogen autotrophic denitrifying could avoid the pollution caused by adding organic carbon sources and greatly reduce the biomass and sludge generation in the wastewater treatment process. Therefore, it had been widely used in the removal of NO3N (Ergas et al. 2001). BECWs were conducive to the growth of hydrogen autotrophic denitrifying microorganisms and suitable for nitrogen removal in low-pollution water with a low organic carbon sources (Zheng et al. 2019). As Gao et al. (2017) described, the abundance of hydrogen autotrophic denitrifying bacteria increased, resulting in the uninhibited denitrification process under the situation that the lack of carbon source.

In addition, the relative abundances of Dechloromonas (1.57%) that utilized Fe(II) as an electron donor to reduce NO3-N and Pseudomonas (3.65%) that enable directly converted to N2 in the nitrogen cycle in E-Fe reached the highest and were one of the pathways to remove NO3-N in the four CWs (Hosono et al. 2015).

At the same time, Rhodocyclaceae_Unclassified, belonging to the class Gamma-proteobacteria and the phylum Proteobacteria, as phosphate-accumulating bacteria (PAB) was observed in the four CWs with the relative high abundances of 0.37–1.52%, which was consistent with high PO43−-P removal rates in the four CWs (Liu et al. 2020a).

Microbial genera involved in Fe redox cycling at the genera level are also summarized in Fig. 5c. The microbial-mediated oxidation process of iron mainly included using O2 oxidation of Fe (Fe-OB) in neutral pH and slightly oxygen conditions (Table S3) and iron oxidizing dependent on nitrate (Fe-NRB) (Sorokina et al. 2012). The first type of bacteria detected in this study were Sediminibacterium (0.03–0.71%), Leptothrix (existed only in E-Fe), and Sideroxydans (0–0.12%). And the second were Acidovorax (0.06–0.40%), Rhodopseudomonas (0–0.15%), Sideroxydans (0–0.12%), Ferritrophicum (existed only in E-Fe, 0.18%), Thermomonas (0.13–0.53%), and Dechloromonas mentioned above. In addition, iron-reducing bacteria (Fe-RB) mainly were Geobacter (existed only in E-Fe, 0.07%), and Geothrix (0–0.39%), which could oxidize OM and mediate the dissimilation reduction process of iron with Fe(II) as single electron acceptor (Herrera and Videla 2009). Thus, the redox process of Fe(II)-Fe(III) was driven by the related Fe redox bacteria, which was interdependent and coupled with the removal of N.

Compared with CK, the contents of Hydrogenophaga, Rhodobacter, Nitrospira, Sulfuritalea, Dechloromonas, Pseudomonas, and the related Fe redox bacterias (Fe-OB, Fe-RB, and Fe-NRB) in the BECWs increased and the abundance in E-Fe was the highest. This was also the reason for the high TN removal rate and nitrate-free nitrogen accumulation in E-Fe.

Potential mechanism of N and P removal based on sacrificed electrode

Proposed N removal mechanism

Nitrogen mass balance analysis

The TN influent concentration of the four systems was 15.20 ± 0.83 mg/L, assuming that the TN input was equal to the TN output during the experiment. Figure 6 displays that the N transformation variation in the four CWs and N could be removed through various processes, such as plant uptake, microbial removal, and substrate adsorption. It was worth mentioning that the contribution of microbial removal (mainly including microbial nitrification, denitrification, and microbial growth) to TN played a decisive role in the adsorption of TN, accounting for 23.22%, 49.54%, 46.97%, and 55.53% in CK, E-C, E-Al, and E-Fe, respectively. The obvious degradation of TN by microorganisms in the three BECWs reflected the joint contribution of microorganisms and electrochemical effects. According to microbial analysis, electrochemistry improved the diversity, bacterial abundance, and distribution of microbial community structure in the integrated system (results and discussion on “Microbial community analysis” section). Therefore, the overall removal rates in the BECWs increased. Among them, the contribution of microbial removal to TN in E-Fe was as high as 55%, which was closely related to the N removal based on the sacrificed electrode (results and discussion on “The mechanism of N removal based on sacrificed electrode” section). As we all know, nitrogen can not only promote the synthesis of chlorophyll and enhance photosynthesis but also provide sufficient nutrients for plants to promote plant growth. Hence, the contribution of plant uptake to TN removal was also not negligible, which accounted for 3.42%, 9.47%, 8.49%, and 10.79% in CK, E-C, E-Al, and E-Fe, respectively. Among them, the contribution of plant uptake to TN in E-Fe was the highest, which was because iron, as an essential element for plant growth, promoted the growth of plants to the enrichment of TN. Meanwhile, the contribution of substrate adsorption to TN removal was also observed. The substrate adsorption of CK, E-C, E-Al, and E-Fe was not much different, accounting for 7.43%, 7.76%, 8.09%, and 8.56%, respectively.

Fig. 6
figure 6

Removal pathways and removal contribution of TN in the four CWs

The mechanism of N removal based on sacrificed electrode

Based on the aforementioned results, microbial removal was considered as the main process of permanent N removal. In general, ammoxidation is an important step in nitrification for NH4+-N removal, which transforms NH4+-N to NO2-N and NO3-N by ammonia-oxidizing bacteria (AOB), such as Nitrospira and Chloroplast_norank detected in the four CWs. However, CK achieved the poorest N removal rate in the four CWs, which might be related to the limited N removal paths. The excellent TN removal performances of the three BECWs might be related to the introduction of the electrolysis, which created a microenvironment conducive to N conversion for the CW beds. Specifically, electrolysis not only promoted the formation of a microenvironment that was relative anoxic and conducive to the action of denitrifying microorganisms but also generated a certain amount of alkalinity during the electrolysis process, which could also be used as a supplement to the alkalinity in the nitrification process, improving the nitrification of autotrophic-nitrifying bacteria (Table S3). Moreover, according to the microbial community analysis, it could be seen that Hydrogenophaga, which was reported to be responsible for hydrogen autotrophic denitrification, had been well enriched as the dominant autotrophic-denitrifying bacteria produced by the cathode after the construction of the integrated system.

In terms of the coupled systems constructed with three different anode materials, E-Fe achieved the best TN removal efficiency. The continuous corrosion of the anode iron was one of the reasons. Specifically, the reaction occurring on the surface of the iron anode was the corrosion of Fe0 to convert into Fe2+, and then oxidized into Fe3+. And the oxidation products of Fe were chemical catalysts, which could improve the enzyme activity and speed up the nitrification (Ma et al. 2021). Besides, Dechloromonas, reported as chemotrophic Fe(II) autotrophic denitrifying bacteria, achieved the highest abundance and promoted the biological removal of NO3-N in E-Fe. Another reason was the iron-carbon microelectrolysis structure composed of the iron anode and graphite cathode in the E-Fe. The refractory organic compounds were converted into biodegradable organics, which provided additional available carbon sources for denitrification and improved the removal of TN (Deng et al. 2020). Furthermore, Fe2+ and [H] produced by iron-carbon microelectrolysis were both electron donors with strong reducibility, which could promote the reduction of NO3-N into NH4+-N and N2 (Zheng et al. 2019).

Overall, the N removal mechanism of the BECWs included ammonia oxidation, nitrification, hydrogen autotrophic denitrification, and iron autotrophic denitrification through a comprehensive analysis of the N removal performance, species of N, and the microbial community structure. The excellent nitrate removal ability was ascribed to the synergy between nitrification and the denitrification process.

Proposed P removal mechanism

Kinetic study of phosphorus adsorption by electroflocculation

The test results were fitted by Eqs. (2) and (3), and the fitting results are summarized in Table S4 at the optimal operating conditions (HRT of 10 h, ET of 4 h, and CD of 0.13 mA/cm2). As shown in Table S4, the correlation coefficient R2 was greater than 0.98 when different electroflocculation materials were used to adsorb P. In addition, the q2cal values calculated according to the pseudo-second-order kinetic equation were almost the same as the qe values, while the q1cal values demonstrated a remarkable difference. Therefore, it could be deduced that the pseudo-second-order kinetic equation was more suitable for describing the adsorption process than the pseudo-first-order kinetic equation. It is well known that the pseudo-second-order model is based on the assumption that the adsorption rate is controlled by a chemisorption mechanism, which involves electron sharing or electron transfer between the adsorbent and the adsorbate (Ho 2006). Thence, the P adsorption process was mainly controlled by the chemical reaction.

Phosphorus adsorption form, adsorption capacity, and spatial distribution.

According to the above experimental results, the P removal performance of E-Fe was significantly improved compared with CK, E-C, and E-Al. After the test, the different P speciation of E-Fe was selected for comparative analysis with CK.

As shown in Fig. 7a, the average content of Fe/Al-P, Humic-P, Labile-P, and Ca/Mg-P at the three depths was 10.88, 3.66, 1.14, and 0.03 mg/kg, respectively, in CK and 13.18, 5.33, 1.27, and 0.11 mg/kg, respectively, in E-Fe. In traditional CWs, P removal mainly depended on substrate adsorption, namely chemical adsorption reactions between the oxides of calcium, magnesium, iron, and aluminum in the substrate and phosphate ions in the solution (Robert 2016). In this study, due to the contribution of the sacrificed iron electrode, a large number of iron ions generated in the process of electrolysis existed in the matrix layer and owned highly active flocculating groups with strong adsorption capacity (Yang et al. 2018). Phosphate in wastewater could be absorbed and co-precipitated to generate insoluble FePO4, and then, P could be fixed to form a yellow–brown precipitate in CWs. Compared with CK, the Fe/Al-P content in E-Fe was higher, indicating that electrolysis could promote the dissolution of iron ions, thus strengthening the P adsorption capacity.

Fig. 7
figure 7

a Four P speciation contents in different substrate layers. b Iron content in the substrate of CK and E-Fe. c Infrared spectrum of anode shedding in E-Fe. d The mechanism of P removal based on the sacrificed electrode

Further comparisons were made on the spatial distribution of different forms of P in CK and E-Fe. It concluded that in terms of Fe/Al-P, the upper layer (12.81 mg/kg) and the anode layer (12.70 mg/kg) were higher than the cathode layer (7.13 mg/kg) in CK, and the order of the E-Fe group was the anode layer (20.55 mg/kg) > the cathode layer (14.20 mg/kg) > the upper layer (4.77 mg/kg). In longitudinal comparison, the E-Fe anode layer was higher than the CK anode layer. It further confirmed that the E-Fe group was beneficial to the P removal because of the iron as anode.

Analysis of iron content and spatial distribution

According to the above experiment results, Fe/Al-P content in the matrix of CK and E-Fe was the highest, so the iron content in the matrix was analyzed to verify the adsorption mechanism of P removal. It could be seen from Fig. 7b that the iron content in the anode zone of CK and E-Fe was higher than that in the cathode zone, and the content of iron in E-Fe was much higher than that in CK (also comparing the color of reddish brown), which further proved that electrolysis could promote the dissolution of iron ions, leading to the increase of iron content. The removal process of P in the matrix by adsorption was mainly caused by the chemical adsorption reaction between iron oxide in the matrix and phosphate in the solution, and electrolysis could promote the removal of phosphate. However, the process of combination between iron and phosphate was needed to be further discussed and excessive iron, which would produce certain toxic effects, should also be controlled (Du et al. 2017).

FT-IR analysis of precipitations in anode region

To verify the mechanism of electrolytic dephosphorization in the E-Fe system, sediments in the anode region were measured by FT-IR. It could be seen from Fig. 7c that the precipitation had strong absorption peaks around 470–540 cm−1, 1030–1090 cm−1, 1400–1460 cm−1, and 3400–3500 cm−1. According to the results of infrared spectrum analysis, the absorption peak of the Fe–O structure was in the range of 470–540 cm−1. There were sharp and strong absorption bands in the range of 1030–1090 cm−1, which were generated by P–O bond vibration, indicating that phosphate in the solution had been coagulated in the precipitate (Xia 2018). The absorption peaks in the range of 1400–1640 cm−1 were the result of the chemical bond vibration of Fe–OH, and the wide absorption bands in the range of 3200–3420 cm−1 showed that the precipitated species had many products of hydroxyl polymerization (Li 2015), which indicated that the FeOOH played the main role in the process of P removal. Therefore, the results of FT-IR analysis showed that the iron ions released by the anodic dissolution in E-Fe could form coagulation products with phosphate and precipitate near the anode, thus achieving the effect of P removal.

The mechanism of P removal based on sacrificed electrode

Based on the former study of phosphorus and iron, the contribution process of the sacrificed anode in the BECWs has been proposed. The higher relative abundances of PAB in the three BECWs compared with that of CK might be due to the stimulation of electric current, which improved P removal efficiency in the BECWs. Therefore, it could be concluded that the biological P removal dominated by PAB and the adsorption of PO43−-P by zeolite were regarded as the main routes for the removal of P in CK and E-C. Different from CK and E-C, chemical P removal by co-precipitation of cations dissolved from anodes in E-Al and E-Fe with PO43−-P was also one of the ways of P removal. Specifically, Al3+ dissolved from aluminum anode could precipitate with PO43−-P to form AlPO4.

For Fe anode, due to the different valence states of iron, it was speculated that the mechanism of P removal based on electrocoagulation with sacrificial Fe anode might be as shown in Fig. 7d. The Fe2+ released from the iron electrode could be gradually oxidized to form Fe3+ in the solution by dissolved oxygen. Fe2+ and Fe3+ reacted with PO43-P to form complexes, such as FePO4 and Fe3(PO4)2. At the same time, the Fe2+ could also form Fe(OH)2 colloid, and then converted to amorphous polynuclear hydroxyl complex hydroxyl iron oxide (FeOOH) with a long-chain structure, which provided adsorption sites for PO43-P to form Fe3(PO3)2(OH)3 (Zhou et al. 2022), thus promoting the PO43-P removal. Besides, FeOOH could also be obtained from Fe3+ hydrolysis, which was obtained by anodic microbial oxidation of Fe2+, such as nitrate-dependent ferrous iron oxidation. Therefore, it was concluded that the high efficiency of TP removal in the E-Fe system was attributed to biochemical collaborative P removal, which mainly included biological P removal dominated by PAB and the adsorption of PO43−-P by zeolite, chemical P removal by co-precipitation of Fe(II) or Fe(III) with PO43−-P.

Applicability and limitations

The BECWs achieved simultaneous N and P removal in the secondary effluent from WWTPs, which would provide a promising approach for wastewater treatment with an extreme lack of carbon sources. It made full use of the electron donors provided by the DC to reduce nitrate and avoided secondary pollution caused by adding organic compounds. EC was our primary concern in engineering applications. When the CD increased from 0.02 to 0.16 mA/cm2, EC increased from 0.0019 to 0.0766 kW·h/g TN as well as the improved TN removal efficiencies of E-Fe (Table S5). The highest TN removal rates were achieved when the EC was 0.0409 kW·h/g TN. In practical engineering applications, the key issue that must be considered was to reduce EC. If reusable energy such as solar, wind, and geothermal energy could be used as an alternative, the process would have enormous market competitiveness.

However, the removal rate of TN was still a huge challenge. Removal efficiencies could be improved by adjusting the current, but continuously increasing the current would lead to the dissolution of the anode material, which would inevitably affect the color of the effluent. Therefore, it was also an important task to explore anode materials suitable for long-term operation. One way, waste iron slag or iron ore resource could be chosen as an alternate to replace iron plates to realize waste utilization, as well as to achieve sustainable wastewater treatment effect, reduce costs, and ensure a stable long-time operation (Deng et al. 2022). Another way, a three-dimensional electrode layer composed of iron scrap-modified conductive particles and carbon felt would also be a future research direction in which the system could still operate normally when iron was complete depletion (Tang et al. 2020).

Conclusion

  1. 1.

    The optimal removal rates of TN, NO3-N, NH4+-N, and TP in the E-Fe system were 74.93%, 93.65%, 51.64%, and 91.22%, respectively, with the HRT of 10 h, CD of 0.13 mA/cm2, and ET of 4 h.

  2. 2.

    Dechloromonas (1.57%) and Hydrogenophaga (1.30%) with the highest abundance in E-Fe acted as Fe-driven autotrophic denitrifiers and hydrogen autotrophic denitrifiers to improve N removal efficiency under the current stimulus. The N removal mechanism of E-Fe included ammonia oxidation, nitrification, hydrogen autotrophic denitrification, and iron autotrophic denitrification. The excellent nitrate removal ability was ascribed to the synergy between autotrophic denitrification and heterotrophic denitrification process simultaneously.

  3. 3.

    The sacrifice of iron anode was the main contribution to enhance P removal based on P and Fe spatial distribution analysis. The highest TP removal rate in the E-Fe was attributed to the formation of ferrous ions based on sacrificial iron anodes, causing co-precipitation of Fe(II) or Fe(III) with PO43−-P.

  4. 4.

    If reusable energy, such as solar, wind, and geothermal energy, could be used as an alternative, the BECWs would have enormous market competitiveness for the treatment of the secondary effluent from WWTPs.