Effects of solid retention time and exposure mode to electric current on Remazol Brilliant Violet removal in an electro-membrane bioreactor

The performance of an electrochemically assisted anoxic–oxic membrane bioreactor (A/O-eMBR) was assessed as an alternative for azo dye (Remazol Brilhant Violet (RBV)) removal from simulated textile wastewater. The A/O-eMBR was operated under three experimental conditions (runs I, II, and III), in which different solids retention time (SRT) (45 and 20 d) and exposure mode to electric current (6′ON/30′OFF and 6′ON/12′OFF) were assessed. The reactor exhibited excellent decolorization performance for all runs, with average dye removal efficiency ranging from 94.3 to 98.2%. Activity batch assays showed that the dye removal rate (DRR) decreased from 16.8 to 10.2 mg RBV L−1 h−1 when the SRT was reduced from 45 to 20 d, likely attributed to the lower biomass content under lower sludge age. At the electric current exposure mode of 6′ ON/12′OFF, a more substantial decrease of DRR to 1.5 mg RBV L−1 h−1 was noticed, suggesting a possible inhibitory effect on dye removal via biodegradation. By reducing the SRT to 20 d, a worse mixed liquor filterability condition was observed, with a membrane fouling rate (MFR) of 0.979 kPa d−1. In contrast, using the electric current exposure mode of 6′ON/12′OFF resulted in lower membrane fouling propensity, with an MFR of 0.333 kPa d−1. A more attractive cost–benefit ratio for dye removal was obtained using the exposure mode of 6′ON/30′OFF, for which the energy demand was estimated at 21.9–22.6 kWh kg dye−1 removed, almost two times lower than that observed for the mode of 6′ON/12′OFF.


Introduction
The textile industry is one of the most important manufacturing industries worldwide, contributing to the economic development of many countries. Despite its undeniable importance, it is also known for generating highly polluting wastewater (Desore and Narula 2018;Moyo et al. 2022). Textile wastewater contains large amounts of chemicals in the form of dyes, salts, alkalis, surfactants, and pigments, resulting in residual aqueous streams with high pH, chemical oxygen demand (COD), and color values (Kozak et al. 2021). Besides, large quantities of water are required for textile processing, especially in the dyeing step, where between 30 and 50 L of water are required per kg of yarn (Kant 2012). Thus, the proper management of textile wastewater becomes a challenge not only because of its complex composition but also because of the large volumes generated. More than 10,000 types of synthetic dyes are currently produced worldwide, with azo dyes accounting for 65-70% (Rápó et al. 2020). Thus, azo dyes are the most important group of synthetic colorants (Stolz 2001). Despite their relevant commercial importance, azo dyes are also known for their genotoxicity, mutagenicity, and carcinogenicity in humans and animals (Chung 2016). Some azo dye components, such as benzidine, have been associated with a higher incidence of bladder cancer in humans (Puvaneswari et al. 2006). Among the various azo dyes available, Remazol Brilliant Violet (RBV-5R), a reactive dye, is one of the most used in the dyeing process, mainly to color cellulosic fibers (Rápó et al. 2020). It has been estimated that up to 50% of RBV-5R used in the dyeing process do not bind to the fibers, being consequently carried along with the effluent stream (Pearce et al. 2003). Considering their harmful effects on public health and the environment, the removal of dyes from textile wastewater has been intensively studied (Reghioua et al. 2021a).
Several physicochemical treatment methods, such as adsorption, advanced oxidation, and coagulation-flocculation, have been used to remove dyes from textile wastewater (Katheresan et al. 2018;Reghioua et al. 2021b). Compared to these treatment methods, biological treatment is less expensive and more environmentally friendly. As a result, biological processes such as activated sludge (AS) and membrane bioreactor (MBR) are commonly used in textile wastewater treatment plants. To obtain satisfactory dye removal in these treatment systems, the existence of anaerobic-aerobic environments is essential (Carvalho et al. 2020). Hence, anaerobic and aerobic tanks are sequentially positioned to favor the anaerobic cleavage of the dye molecule and the aerobic oxidation of the by-products formed, such as aromatic amines (dos Santos et al. 2004).
Despite the inherent advantages of biological processes, it is known that the toxicity or low biodegradability of textile wastewater can often impair biotreatment performance (Oller et al. 2011). Hence, the association of physicochemical methods with AS or MBR has been studied. The use of electrocoagulation applied directly in the mixed liquor of MBR has shown promising results as a novel technique for the treatment of textile wastewater . During the electrocoagulation process, coagulant species are generated in situ in the mixed liquor, where submerged metallic anodes undergo electrolytic oxidation through the use of electric current (Zampeta et al. 2022). As the current flows through the electrodes, the anode is dissociated, producing metallic cations (M n+ ), which may react with the hydroxyl ions (OH − ) generated by water hydrolysis at the cathode. As a result, metallic hydroxides (M(OH) n ) are formed, which act as coagulants capable of destabilizing the suspended organic matter, colloidal particles, and other pollutants (including dyes) present in wastewater (Mousazadeh et al. 2021;Moussa et al. 2017), as described by the DLVO (Derjaguin, Landau, Verwey, and Overbeek) theory (Rodrigues et al. 2020).
Compared to conventional coagulation methods, the use of electrocoagulation in MBR (eMBR) exhibits some advantages, such as the simplified dosage automation and reduced costs associated with the transportation of chemical solutions (e.g., Al 2 (SO 4 ) 3 or FeCl 3 ) (Wei et al. 2009). Furthermore, by integrating the electrocoagulation process into MBR, other pollutant removal mechanisms can occur, such as electrochemical oxidation, electroosmosis, and electrophoresis (Zaroual et al. 2006). Membrane fouling attenuation is also observed when the MBR is exposed to electrocoagulation, thus reducing the frequency of chemical cleaning of the membranes (Mendes Predolin et al. 2021). For instance, Hua et al. (2015) reported a membrane fouling rate of 7.8-fold lower in an eMBR compared to a conventional MBR.
As a relatively new reactor configuration, some parameters associated with eMBR operation still need further investigation, especially when this reactor is fed with industrial wastewater. Previous studies have mainly focused on using eMBR to treat municipal wastewater (Hasan et al. 2014;Giwa et al. 2015;Battistelli et al. 2019;Su et al. 2020), while its use for the treatment of industrial wastewater is scarcely reported in the literature. To the best of our knowledge, parameters such as solids retention time (SRT) and exposure time to electric current have not yet been investigated in eMBR treating azo dye-containing wastewater. As one of the main operating parameters of any wastewater treatment bioreactor, the SRT may impact the biodegradation performance and membrane fouling process in MBRs (Dereli et al. 2014;Yurtsever et al. 2017). When using the SRT of 45 d, Ravadelli et al. (2021) observed a high TSS content in an eMBR (27.1 g L −1 ), which resulted in a higher viscosity of the mixed liquor and, consequently, in a higher membrane fouling rate. According to these authors, using lower SRTs to reduce the TSS concentration in eMBR may be a strategy to minimize membrane fouling problems caused by the higher viscosity under high sludge age.
For electrochemically assisted MBRs, the exposure time to electric current plays a crucial role. Long exposure times can intensify anode deterioration without any additional removal efficiency, while short exposure times can decrease the pollutants removal performance (Tafti et al. 2015). Hence, the electric current application mode is a key parameter in eMBR systems as it affects both treatment performance and energy consumption. Nevertheless, few studies have explored the effects of electric exposure mode in eMBRs. Previous investigations have focused on assessing the impact of this operational parameter on eMBR systems treating municipal wastewater (Tafti et al. 2015;Su et al. 2022), but the effect of the current application mode on eMBR fed with azo dye-containing wastewater still needs to be investigated. A proper electrical exposure mode is crucial not only to ensure a better decolorization process of textile wastewater but also for energy saving.
So far, most studies have conducted the eMBR operation under aerobic conditions, which are unfavorable to the biological dye removal process. Hence, the use of anoxic-oxic (A/O) eMBR system (A/O-eMBR) emerges as a promising alternative to achieve dye removal via an electrochemically assisted biological process. Therefore, this study aimed to assess the performance of an A/O-eMBR on the removal of RBV-5R azo dye, COD, and NH 4 + -N from simulated textile wastewater. The study was conducted under three different experimental conditions to evaluate the impact of the SRT and exposure mode to electric current on the reactor performance. For each experimental condition, activity batch tests were performed to assess the heterotrophic biomass activity on the biodecolorization process and determine the corresponding oxygen uptake rates. Filtration batch tests were also carried out to better evaluate the mixed liquor filterability conditions over time.

Experimental setup and reactor operating conditions
This study was conducted in an electrochemically assisted anoxic/oxic membrane bioreactor (A/O-eMBR), as shown in Fig. 1. The A/O-eMBR system was operated based on the modified Ludzack-Ettinger (MLE) process, with anoxic (24.7 L) and aerobic (51.5 L) tanks working in series. In the aerobic tank, a hollow fiber membrane module (0.93 m 2 ) provided by SUEZ Water Technologies & Solutions (membrane pore size of 0.04 µm) was submerged. Metallic electrodes (stainless-steel cathode and aluminum anode) in cylindrical shape were fixed in the aerobic tank, immersed around the membrane module (Souza et al. 2020). A digital DC power supply (0-30 V, 10A) was used to control the electric current applied to the electrodes. Peristaltic pumps (Watson Marlon, 520) were used for reactor feeding (flow rate of 92.16 L d −1 ), internal recycle sludge (500%), and filtration process (flux of 4.1 L m −2 h −1 ). The membrane permeation process was carried out under intermittent mode, with 9 min ON and 1 min OFF per filtration cycle. Therefore, the A/O-eMBR operated with a hydraulic retention time (HRT) of 20 h, 6.5 h for the anoxic tank, and 13.5 h for the aerobic tank.
In order to retard the fouling process, aeration was used between the membrane fibers (0.51 m 3 m −2 h −1 ). To minimize anode passivation, another aeration device was fixed at the bottom of the eMBR tank, in which the aeration rate per anode area of 1.5 m 3 m −2 h −1 was used. An electronic mixer was placed in the anoxic tank to maintain a complete mixing condition, thus preventing biomass sedimentation. The dissolved oxygen (DO) concentration varied between 4.5 and 5.5 mg L −1 in the aerobic tank and 0.2-0.3 mg L −1 in the anoxic tank. The transmembrane pressure (TMP) behavior was monitored using a digital gauge (model VDR-920). The recorded TMP values were used to determine the membrane fouling rate (MFR).
The A/O-eMBR was inoculated with activated sludge obtained from a wastewater treatment plant of a local dyeing industry. The A/O-eMBR was then subjected to a startup phase for biomass acclimation, lasting 60 days (data not shown). After this period, the reactor operation was conducted for 261 days, divided into three experimental runs (I, II, and III). In the first period (run I), the A/O-EMBR was operated for 135 days with solids retention time (SRT) set at 45 d and exposed to electric current under an intermittent mode of 6′ON/30′OFF. Subsequently, the SRT was reduced to 20 d, keeping the electric current application mode at 6′ON/30′OFF. Under these conditions, the reactor was operated for another 80 days (run II). In the last experimental period (run III), which lasted 46 days, the SRT was readjusted to 45 d, and the electric current application regime was set to 6′ON/12′OFF. Throughout the experimental period, the reactor operated under an electric current density (ECD) of 10 A m −2 . Table 1 summarizes the experimental conditions used in each run. The A/O-eMBR was fed with synthetic wastewater, whose composition is shown in Table 2. The characterization of the synthetic wastewater in terms of RBV-5R dye, COD, and NH 4 + -N, as well as the respective reactor loading rates for each component, is shown in Table 3.

Biological dye removal rates under anoxic and aerobic environments
Batch assays under anoxic and aerobic conditions were performed to assess the dye removal rate (DRR) at the end of the three experimental runs. The experiments were conducted in sealed vessels (500 mL), to which 150 mL of synthetic textile effluent (Table 2) and 350 mL of sludge taken from the eMBR tank were added. To obtain anoxic conditions, sodium nitrate (NaNO 3 ) was added to one of the vessels (60 mg L −1 ). A magnetic stirrer (Fisatom 754) was used in the anoxic tests to prevent biomass sedimentation and keep a completely mixed condition. For the aerobic tests, an air sparger was used to provide oxygen and ensure complete mixing conditions. During the experiments (5 h), mixed liquor samples were taken and filtered through a membrane (0.45 μm) for further analysis of the dye concentration. The volatile suspended solids (VSS) concentration was also determined to assess the specific DRR (SDRR).

Respirometric tests
The heterotrophic biomass activity was evaluated by respirometric batch experiments, from which the oxygen uptake rate (OUR) was determined (Iversen et al. 2009). Sludge samples (500 mL) from the eMBR tank were transferred to an Erlenmeyer flask, where the oxygen concentration was monitored using a DO probe (Optical YSI ProODO). After  an initial period of aeration for oxygen saturation, allylthiourea (ATU) was added to the Erlenmeyer to suppress nitrifying activity. The vessel was then spiked with sodium acetate (200 mg L −1 ) to stimulate the heterotrophic biomass activity. Throughout the batch experiments, temperature and pH were controlled at 20 °C and 7.5, respectively. The OUR values were obtained by the slopes of oxygen consumption over time. The VSS content was analyzed to obtain the respective specific OUR (SOUR) values. The experiments were performed at the final period of each run and were conducted in triplicate.

Analytical methods and calculation procedures
Total nitrogen (TN), ammonia nitrogen (NH + -N), chemical oxygen demand (COD), and total phosphorus (TP) concentrations were determined based on the Hach methods 10,072, 10,031, 8000, and 10,127, respectively. The concentration of Remazol Brilliant Violet was determined in a spectrophotometer (Hach Lange DR3900) at a wavelength of 560 nm, at which RBV-5R dye presents the maximum absorbance (Yurtsever et al. 2017). VSS and total suspended solids (TSS) were measured in accordance with the Standard Methods (APHA 2017). The pH values were monitored using a portable pH probe (Orion Star A221), while DO values were analyzed using an optical DO probe (YSI, ProODO). Analyses of the UV-Vis spectra were performed in a Hach Lange DR5000 spectrophotometer.
Parallel experimental tests to measure mixed liquor filterability were conducted in a dead-end filtration device (Sartorius, 16,510-250 mL) using constant pressure of 500 kPa. For each filtration experiment (20 min), an acetate cellulose membrane with a nominal pore size of 0.2 μm was used. The permeation flux obtained was applied to Eq. 1 to calculate the specific cake resistance (Pollice et al. 2008).
where α is the specific cake resistance (m kg −1 ); ΔP is the pressure applied to the filtration cell (kPa); μ is the permeate viscosity (Pa.s); C is the TSS concentration (kg m −3 ); t is the filtration time (s); and V is cumulative volume of permeate.
Diluted sludge volume index (dSVI), an adaptation of the traditional SVI test, was assessed by diluting the mixed liquor samples with A/O-eMBR permeate. The dSVI test was determined following Standard Methods (APHA 2017). The capillary suction time (CST) of the sludge sampled from the eMBR tank was determined in an electronic analyzer (304 M CST, Triton).
The anode dissolution rate was estimated using Eq. 2 (Li et al. 2018).
where m is the anodic dissolution rate (g Al 3+ d −1 ), M w is the molar mass of the anode material (26.98 g mol −1 ), F a is the Faraday's constant (96.485 C mol −1 ), Z is the valence of the anode material (+ 3), T is the time of electric current application per day (h/d), and I is the electric current applied to the electrodes (3.19 A). Anodic corrosion per volume of permeate (mgAl 3+ L −1 ) was estimated by adding the daily permeate flow to Eq. 1, thus obtaining Eq. 3: Run I 49.6 ± 2.9 1446 ± 160 51.8 ± 2 6.9 ± 1. where W is the anodic corrosion per permeate volume (g m −3 ) and Q is the permeate flow (m 3 d −1 ). The estimate of energetic consumption associated with the electrocoagulation was calculated using Eq. 4 (Larue et al. 2003).
where EC is the energy consumption per volume of produced permeate (kWh m −3 ), U is the voltage applied to electrodes (V), I is the electric current (A), T is the time of electrocoagulation process applied daily, and Q is the volume of permeate produced per day (m 3 d −1 ). Based on Eqs. 3 and 4, the additional operating cost (USD m −3 ) related to electrocoagulation could be estimated for the A/O-EBRM system. In this cost estimate, energy demand (electricity) and anodic corrosion were taken into account, as expressed in Eq. 5 (Udomkittayachai et al. 2021).
where C is the additional operating cost attributed to electrocoagulation process (USD m −3 ); a is electricity cost (USD kWh −1 ); EC is the energy consumption (kWh m −3 ); b is the cost of the anodic material (USD kg −1 ); and W is the anodic corrosion (kg m −3 ).
The volumetric charge loading, expressed in mAh L −1 (Roy et al. 2020), was calculated taking into account the applied current (mA), the influent flow rate (L d −1 ), and the time of electric current application (T) per day (h d −1 ) (Ravadelli et al. 2021). Hence, the volumetric charge loading may be calculated according to Eq. 6.
where q is the electric charge loading (mAh L −1 ); I is the applied electric current (mA); T is the time of current application (h d −1 ); and Q is the influent flow rate (L d −1 ).

Results and discussion
Dye removal performance Figure 2a shows the dye removal efficiencies and the corresponding dye concentrations in influent and reactor permeate. As can be seen, the dye concentration in the reactor effluent gradually diminished during the first experimental period, reaching a minimum of 0.5 mg L −1 and maximum removal of 98% on operating day 126. As the SRT was reduced to 20 d in the second experimental period (days 126-211), the reactor exhibited a slightly lower decolorization performance, with dye concentration on permeate samples between 2.1 and 3.7 mg L −1 and removal efficiency of 92-95%. By returning the SRT to 45 days associated with the time of exposure to electric current of 6′ ON/12′ OFF (run III), the reactor dye removal performance increased again. From then onwards, RBV-5R concentrations in the A/O-eMBR effluent ranged from 0.5 to 1.5 mg L −1 , and the removal efficiencies were between 97 and 99%. Taking into account only the period wherein the A/O-eMBR operated under steady-state conditions for each experimental condition (i.e., when the difference in RBV-5R removal was lower than 5%), the average dye concentrations in the reactor permeate were 1.8 ± 0.4, 2.8 ± 0.6, and 0.9 ± 0.4 mg L −1 , for experimental runs I, II, and III, respectively (Table 4). These results indicate that the reactor performance on dye removal was slightly impacted at shorter SRT. Yurtsever et al. (2017) investigated the impact of different SRT on the performance of an anaerobic MBR followed by an aerobic MBR in the removal of the Remazol Brilliant Violet dye. Although the anaerobic MBR was not impacted by the reduction of the SRT from 60 to 30 d (> 99%), the authors observed a slight color increase in the aerobic MBR. This mechanism of recolorization was also observed by Ravadelli et al. (2021) but was no longer noticed when the MBR was subjected to electrocoagulation. Thus, the use of an electrochemically assisted MBR may be an alternative to attenuate the recolorization process inherent to some azo dyes. The higher dye removal achieved in the A/O-eMBR may be attributed to the interaction between the dye molecule and Al 3+ cations released from anodic dissolution (Al-Qodah et al. 2019). Al 3+ cations react with OH − anions formed by the water electrolysis, leading to the formation of aluminum hydroxide. Due to its large surface area, this metallic hydroxide acts by adsorbing the soluble compounds present in the mixed liquor, such as the azo dye RBV-5R. Thus, integrating electrocoagulation into the MBR system can ensure a substantial improvement in the dye removal process.
When the A/O-eMBR experienced the SRT of 45 d under the longest exposure time to electrical current, i.e., 6′ ON/ 12′ OFF (run III), the dye removal rate was slightly superior compared to the other experimental conditions (Table 5). Nevertheless, the energy demand per mass of dye removed increased substantially. As can be seen in Table 5, the energy demand increased to 43.6 kWh per kg of dye removed during run III, which is almost two times higher than those observed in runs I and II. This result indicates an unattractive cost-benefit in terms of dye removal when using the electric current application time of 8 h d −1 during run III.
The UV-Vis spectrum relative to influent and effluent samples is shown in Fig. 3. Compared to the influent values, the absorbance in the effluent samples decreased over the entire wavelength analyzed (190-650 nm) for the three experimental runs. A substantial absorbance decrease was observed near the 550 nm range, at which maximum absorption of the RVB-5R dye occurs (Çinar et al. 2008).
The UV-Vis spectrum results also revealed the reactor ability to remove aromatic compounds, given the reduction in absorbance in the wavelength range between 210 and 350 nm (Ozdemir et al. 2013). Besides, no new absorption peaks were detected in the UV-Vis spectrum of permeate  samples, suggesting that no intermediates were formed over the three operating conditions applied to A/O-eMBR. Based on the absorbance results for influent, effluent, and mixed liquor samples from anoxic and aerobic reactors, the total absorbance reduction efficiency and the corresponding reduction attributed to biological/electrocoagulation and membrane filtration processes were estimated (Fig. 4). Within the ultraviolet spectrum range (250-400 nm) (Fig. 4a), the A/O-eMBR achieved total absorbance reduction efficiency of 79, 64, and 76% for runs I, II, and III, respectively, whereas for the visible spectrum range (400-650 nm) (Fig. 4b), the corresponding reductions were 90, 77, and 89%. These results revealed a better reactor performance in removing compounds found in the visible spectrum compared to those found in the ultraviolet range. Due to the stable chemical structure (π-conjugated bonds) of the latter, biological treatment is more challenging, making their removal more dependent on other processes, such as photodegradation, ozonation, and electrocoagulation (Márquez et al. 2023).
The contribution of membrane filtration to the reduction of absorbance in both the ultraviolet and visible spectrum was small throughout the experimental period. In fact, the reduction in absorbance was below 9% for all runs (Fig. 4a,  b). This result may be associated with the majority presence of low molecular weight organic compounds in the mixed liquor, for which retention by the ultrafiltration process is negligible (Wang et al. 2011). Likewise, Han et al. (2010) also observed a poor performance of the ultrafiltration process in the rejection of the Acid Chrome Blue dye. According to these authors, the membrane pores were large enough to allow the transport of dye molecules. Thus, the use of combined treatment methods is necessary to ensure the removal of contaminants not retained by the ultrafiltration process (He et al. 2020).
The results also indicate a lower absorbance reduction in both the UV and visible ranges when the reactor experienced the SRT reduction from 45 d (run I) to 20 d (run II). Besides, the increment of the exposure time to electrical current to 8 h d −1 (run III) did not significantly improve the reactor performance on absorbance removal compared to the period with 4 h d −1 (run I). When analyzing the absorbance reduction profiles attributed to either biological/electrocoagulation or membrane filtration processes, the role of the membrane became even less expressive along run III, during which only 1.5% and 0.4% absorbance reduction were achieved for the UV and visible ranges, respectively.
On the other hand, the absorbance reduction attributed to biodegradation/electrocoagulation process increased during run III, reaching the highest value among the three experimental conditions, i.e., 75 and 88% for the UV and visible ranges, respectively. Thus, the longer exposure time to electric current not only favored a higher dye removal efficiency but also improved the removal of aromatic compounds (Ozdemir et al. 2013). Such results are likely linked to the intensification of the electrochemical mechanisms as the time of electric current application was increased to 8 h d −1 . With a longer exposure time, the dissolution of the anode is favored, resulting in higher Al 3+ release to the mixed liquor and a consequent intensification of the coagulation/flocculation mechanisms. On the other hand, the dye removal via biological process seems to be negatively impacted with the exposure mode of 8 h d −1 , as will be discussed in the "Batch assays to evaluate dye removal rates (DRR) under aerobic and anoxic environments" section.

Organic matter and ammonia nitrogen removal
Throughout the experimental period, the reactor exhibited high performance in the removal of organic content (Fig. 2b), showing average removal efficiencies of over 99% in the three operating conditions (Table 4). This high COD abatement is usually reported for MBR systems assisted by the electrocoagulation process, whether treating municipal (Giwa et al. 2016) or industrial wastewater (Liu et al. 2017). Processes such as electrochemical oxidation, electroosmosis, Fig. 4 Average values of absorbance removal at ultraviolet range (a) and visible range (b) for each experimental period and electrophoresis, associated with the intense microbiological degradation characteristic of MBR systems, may explain the high organic matter removal performance of the A/O-eMBR (Zaroual et al. 2006). Thus, regardless of the SRT or time of exposure to electric current, the A/O-eMBR produced a final effluent with low organic content, with an average COD of 11.3 ± 2.9, 11.2 ± 3.9, and 7.5 ± 0.6 mg L −1 for the runs I, II, and III, respectively (Table 4). When reducing the SRT from 60 to 30 d, Yurtsever et al. (2017) also did not observe adverse impact on COD removal from textile wastewater in a sequential process composed of anaerobic and aerobic MBRs. However, they reported a higher organic content (COD of 58 ± 19 mg L −1 ) in the aerobic MBR permeate, a value higher than the range of 7.5-11.3 mg L −1 observed in our study. Hence, the electrochemically assisted MBR can produce permeate with lower organic carbon content, an important feature for water reuse purposes in the industrial sector.
As observed in the respirometric activity tests (Table 6), heterotrophic biomass exhibited a similar oxygen uptake rate (OUR) in runs I and II, with average values of 236.1 and 230.2 mg O 2 L −1 h −1 , respectively. However, the specific OUR (SOUR) was approximately 30% higher in run II (17.8 mg O 2 gVSS −1 h −1 ) than in run I (13.9 mg O 2 gVSS −1 h −1 ). Such results indicate that the SRT reduction led to an increment in the SOUR. Ouyang and Liu (2009) reported a similar behavior in an MBR treating municipal wastewater, attributing the higher heterotrophic activity to the increase in the F/M ratio experienced at lower SRT conditions. On the other hand, the experimental conditions applied in run III resulted in the lowest OUR and SOUR values observed in this study. It can be inferred that the longer exposure time to electric current adversely impacted the heterotrophic activity during run III. Thus, it is hypothesized that certain inhibitory effects on biomass, caused by the toxicity of by-products (e.g., H 2 O 2 or Cl 2 ) or the bacterial sensitivity to the electric current , would have intensified as the exposure time increased to 8 h d −1 in run III. Previous study with eMBR system has reported a partial inactivation of heterotrophic bacteria when the reactor was exposed to ECDs higher than 12.3 A m −2 (Wei et al. 2011). The authors attributed this adverse effect to the formation of harmful oxidants and irreversible permeabilization of the bacterial cell.
In contrast to COD removal, the nitrification process showed a slight oscillation between the different operating conditions applied to the reactor (Fig. 2c). As can be seen from Table 4, the average N-NH 4 + removal efficiencies obtained by the A/O-eMBR were 99.3 ± 1.1, 94.3 ± 3.4, and, 98.7 ± 2.6 for runs I, II, and III, respectively. Such values indicate a slight decrease in ammonium oxidation potential as the SRT value was reduced to 20 d (run II). The lower NH 4 + -N removal efficiency at the SRT of 20 d can be attributed to the higher sludge purging practiced in this period, which led to a decrease in the total amount of nitrifying bacteria in the mixed liquor (Belli et al. 2017). As the SRT was adjusted to 45 d in run III, ammonium removal efficiency readily returned to values close to 99%, with NH 4 + -N concentrations in the reactor permeate lower than 1 mg L −1 . This high performance in the ammonium removal process suggests that the nitrifying activity was not impacted by inhibitory effects linked to electric current application or the toxicity associated with aluminum dissolution, even under the longest exposure time to electrocoagulation (run III). In fact, previous studies have observed that the use of electrochemical processes in biological reactors has contributed to an improvement in nitrifying activity (Qian et al. 2017;Li et al. 2018).

Batch assays to evaluate dye removal rates (DRR) under aerobic and anoxic environments
The dye removal trends for each batch experiment conducted under anoxic and aerobic conditions are shown in Fig. 5. As expected, dye removal practically did not occur in the aerobic experiment since the molecular structure of RBV-5R is not cleaved in oxidizing environments (dos Santos et al. 2004). On the other hand, the RBV-5R concentration decreased in the anoxic experiments, exhibiting a DRR of 16.8, 10.2, and 1.5 mg RBV-5R L −1 h −1 , for runs I, II, and III, respectively. Such results indicate the occurrence of a biodecolorization process under anoxic conditions, a favorable environment to produce azoreductase enzymes responsible for the RBV-5R cleavage.
The results also reveal a substantial decrease in the DRR values from run I to III. However, when analyzing the specific DRR (SDRR), a different behavior was observed ( Table 6). The SRT reduction to 20 d (run II) led to an increment in the SDRR (2.42 to 3.43 mg RBV-5R gVSS h −1 ). In contrast, the increase in the time of exposure to electrical current, associated with the SRT of 45 d (run III), resulted in lower SDRR (0.23 mg RBV-5R gVSS h −1 ). These results indicate that the SRT reduction led to a lower dye volumetric removal capacity, but a higher biomass-specific biodecolorization rate (i.e., higher removal per VSS mass). On the other hand, the increment of the electrical current exposure time in run III (6′ ON/ 12′OFF) negatively impacted both volumetric and specific dye removal rates. This behavior suggests a possible inhibitory effect on the dye biological degradation activity when the A/O-eMBR was subjected to longer exposition to electric current. In view of this, it is inferred that the higher dye removal efficiency reached during run III (Table 4) may be linked to the intensification of electrochemical processes in this period, which seems to have negatively impacted the removal via biodegradation means, given the lower SDRR value for this period. When investigating the impact of electrocoagulation process on the bacterial viability of an MBR, Wei et al. (2011) observed that the percentage of live cells dropped by 29% when the current density was increased to 24.7 A m 2 . Hence, some operational parameters should be carefully evaluated to avoid adverse impacts on dye removal via biological process in eMBR systems. Despite the same amount of dye being added in each test, a lower dye concentration (within 15-20 mg L −1 ) was detected in the first minutes of the test carried out during III, while for runs I and II, the initial concentration was between 30 and 35 mg L −1 . It is speculated that this difference may be related to the intensification of the aluminum coagulation mechanism because of the longer exposure time to electrical current practiced in the last experimental condition.

Anode corrosion rate and energy demand
Through Eq. 2, the anode corrosion rates (m) were estimated at 3.81 g d −1 for runs I and II, and 7.62 g d −1 for run III. For these values, the corresponding anode dissolution per effluent flow (W) was estimated to be 41.4 and 82.9 g Al 3+  (Table 7). The higher anode dissolution obtained during run III shows that not only the ECD determines the electrode lifespan but also the exposure time to electric current. Hence, a short application time is more effective to prolong the electrode lifespan and minimize the costs inherent to its replacement.
The anodic corrosion rates observed in the A/O-eMBR are substantially lower than those observed in electrocoagulation experiments conducted without association with a biological process. With this configuration, Bener et al. (2019) reported an anode corrosion rate of 550 g m −3 when applying the ECD of 250 A m −2 treating textile effluent. Based on these values, it can be inferred that electrocoagulation integrated into the MBR system, as addressed in our study, is more attractive to reduce both anode deterioration and the frequency of its replacement.
For runs I and II, the energy consumption linked to electrocoagulation was estimated at 1.07 kWh m −3 , whereas for run III, the consumption was 2.14 kWh m −3 . Such values are close to the energy demand reported in other studies conducted in eMBR systems used to treat leachate (Farsani et al. 2022) and municipal wastewater (Hasan et al. 2014). However, when comparing these results with other electrocoagulation setups not integrated into an MBR system, the energy demand of 1.07-2.14 kWh m −3 is much lower. Bazrafshan et al. (2016), using a batch electrocoagulation reactor to treat real textile wastewater, found an electrical energy consumption of 9.3-84.3 kWh m −3 . Zampeta et al. (2022) have estimated the energy requirement of 2-29 kWh m −3 in a continuous flow electrocoagulation reactor treating printing ink wastewater, with an ECD of 210-830 A m −2 . For this reactor setup, the authors have found an optimum operating cost of 2.92 USD m −3 (value obtained considering the euro-dollar exchange ratio of 1 EUR = USD 1.04) to achieve the maximum treatment efficiency (over 80% removal of color, COD and TSS). For the present study, in which not only the energy demand (kWh m −3 ) was considered but also the anode dissolution rate (g d −1 ), the additional operating cost (C) attributed to electrocoagulation was estimated at 0.239-0.478 USD m −3 (Table 7). Hence, eMBR systems seem to be a more interesting alternative given their lower operating cost than continuous flow electrocoagulation reactors. Even considering the energy demand related to the aeration process, the operating cost for eMBR system seems more attractive. Assuming an energy consumption of 0.6-1.2 kWh m −3 for full-scale conventional MBRs (Iglesias et al. 2017) and that oxygen supply accounts for up to 60% of total energy, an additional cost of 0.045-0.09 USD m −3 would be estimated for aeration process in eMBR systems (considering the cost of electricity of 0.125 USD kWh −1 ) (Papadopoulos et al. 2019), increasing its theoretical energy requirement to 0.284-0.568 USD m −3 .
Despite the higher energy consumption when compared to conventional MBR (estimated at 0.07-0.15 USD m −3 ), the electrochemically assisted MBR would compensate by providing excellent COD, nutrients, and toxic compounds, as azo dyes (Asif et al. 2020). Besides the high treatment performance, the membrane cleaning frequency would be reduced in eMBR given the lower fouling rate observed in this reactor configuration (Hua et al. 2015). As a result, the cost associated with the chemical membrane cleaning procedure could be reduced (Xiao et al. 2019).
The A/O-eMBR experienced the charge loading (q) of 139.1 and 278.3 mAh L −1 when subjected to the electric current intermittence of 6′ON/30′OFF (runs I and II) and 6′ON/12′OFF (run III), respectively. Roy et al. (2020) assessed the charge loadings ranging from 100 to 400 mAhL −1 in an eMBR treating landfill leachate. For the charge loading of 400 mAhL −1 , these authors obtained a total organic carbon removal of 99.8% and did not observe a significant impact on the microbial community diversity within the eMBR.

Membrane fouling and mixed liquor characteristics
Based on the evolution of the TMP values, the corresponding membrane fouling rate (MFR) was calculated for each experimental condition. For runs I, II, and III, the average MFR was 0.484, 0.979, and 0.33 kPa d −1 , respectively (Table 8). These results indicate that the SRT reduction from 45d (run I) to 20 d (run II) led to a more severe membrane fouling, with an MFR value 2.02-fold higher under the latter condition. On the other hand, when the reactor was exposed to the charge loading of 8 h d −1 associated with the SRT of 45 d (run III), the membrane fouling was attenuated, allowing obtaining an MFR 32% lower in relation to that observed in run I. The results obtained from filtration batch tests indicated the same behavior. As observed for the MFR, the specific cake resistance (α) increased substantially during run II, exhibiting an average value of 5.37 × 10 12 kg m −1 , while for runs I and III, the corresponding values were 2.7 × 10 11 and 1.53 × 10 11 . Based on these results, it can be inferred that the A/O-eMBR In a previous study conducted in an aerobic membrane bioreactor fed with textile effluent containing RBV-5R, the filtration tests revealed a specific cake resistance around 1.8 × 10 14 m kg −1 (Yurtsever et al. 2016). This value is approximately 33 times higher than that observed in our study, even considering the data from run II, when the A/O-eMBR exhibited the worst filterability (α = 5.37 × 10 12 ). Such results suggest that eMBRs can provide a better filterability of the mixed liquor compared to conventional MBRs. As the MBR was exposed to electrocoagulation, the foulants with negative charge become neutralized by the Al 3 + released from anode dissociation. As a result of this mechanism, the filtration resistance caused by both suspended solids and the mixed liquor supernatant tends to decrease (Aguiar Battistelli et al. 2018;Battistelli et al. 2019). In addition to the coagulation process, other electrochemical mechanisms can occur simultaneously as the electrocoagulation is applied, such as electroosmosis and electrophoresis, which may be associated with a reduction in the specific resistance to filtration (Ibeid et al. 2013).
The mixed liquor filterability of the A/O-eMBR was also evaluated by means of CST and dSVI tests. As can be seen from Table 8, both the CST and dSVI increased considerately during run II, suggesting that the A/O-eMBR sludge showed worse dewatering and settling properties with shorter SRT (run II). Similarly, the soluble COD (sCOD) from eMBR tank was also higher at the SRT of 20 d (average of 58 ± 17 mg L −1 ). Sun et al. (2012) reported a strong correlation (R 2 = 0.91) between membrane fouling rate and the sCOD of the mixed liquor in a lab-scale moving-bed membrane bioreactor. Based on CST, dSVI, and sCOD results, it can be inferred that A/O-eMBR showed the worst mixed liquor filterability conditions at SRT of 20 d, explaining the higher membrane fouling rate observed during this period.
The biomass concentration increased gradually in the A/O-eMBR at SRT of 45 days in run I (Fig. 6). The maximum VSS values of 18 g L −1 and 21.6 g L −1 were reached in the anoxic and aerobic tanks, respectively. As the SRT was reduced from 45 to 20 d in run II, the biomass content decreased proportionally, with VSS concentrations of 9.5 g L −1 and 10.38 g L −1 in the anoxic and aerobic tanks, respectively. Despite this substantial reduction in VSS content, the reactor performance in terms of organic matter removal was not affected, while ammonium and dye removal were slightly impacted, as discussed in "Organic matter and ammonia nitrogen removal" section. As the SRT was returned to 45 d in run III, the biomass content increased gradually, reaching the VSS values close to those observed in the first experimental condition. When evaluating anaerobic and aerobic MBRs to treat synthetic textile wastewater containing Remazol Brilliant Violet 5R, Yurtsever et al. (2015) reported VSS concentrations between 1.5 and 5.5 g L −1 , a range of values lower than that observed in our study. It can be speculated that the A/O-eMBR achieved higher VSS values due to the phenomenon of biomass electrostimulation (Thrash and Coates 2008) and the precipitation of residual soluble organic matter from the mixed liquor (Ravadelli et al. 2021).
In contrast to the results reported in other studies addressing the operation of eMBRs (Ibeid et al. 2015;Borea et al. 2017;Battistelli et al. 2019), the VSS/TSS ratio showed slight variation during the entire experimental period. For runs I, II, and III, the average VSS/TSS ratio obtained in the aerobic tank was 0.76, 0.77, and 0.72, respectively. Such VSS/TSS ratios are higher than the range of 0.5-0.6 reported by Hua et al. (2015) for an eMBR operated with an ECD of 20 A m −2 . Applying an electric current with an exposure mode of 12 h d −1 , associated with an ECD of 35 A m −2 , Ibeid et al. (2015) observed that the VSS/TSS ratio dropped to 0.3 in a lab-scale eMBR. Given the large accumulation of inorganics in eMBRs, excessively long electrical current application times should be avoided, especially considering the long-term reactor operation.

Conclusions
An electrochemically assisted anoxic-oxic membrane bioreactor (A/O-eMBR) was assessed as an alternative for azo dye (RBV-5R) removal from simulated textile wastewater. The reactor was subjected to different solids retention times (SRT) and exposure modes to electric current. The A/O-eMBR exhibited high dye removal capacity regardless of operating conditions, with average removal efficiencies ranging from 94.3 to 98.2%. However, as indicated by activity batch tests, the dye removal rate (DRR) decreased 39% (16.8 to 10.2 mg RBV-5R L −1 h −1 ) when the SRT was reduced from 45 to 20 d and 91% (16.8 to 1.5 mg RBV-5R L −1 h −1 ) when exposure mode was adjusted from 6′ON/30′OFF to 6′ON/12′OFF. The substantial reduction in the DRR under longer exposure to electric current suggested a possible inhibitory effect on dye removal via biodegradation. On the other hand, the filterability of the mixed liquor was improved under these conditions, leading to a lower membrane fouling rate. Despite the lower fouling propensity, the exposure mode of 6′ON/12′OFF inevitably resulted in higher energy demand, estimated at 43.6 kWh kg dye −1 removed. Overall, this study suggests that the use of a longer SRT (45 d) combined with shorter exposure time to electric current (6′ ON/30′OFF) is more attractive for the treatment of azo dye-containing wastewater in an A/O-eMBR given the lower operating cost and the good COD and N-NH 4 + removal obtained.